applyReceivablesAdjust.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768
  1. <template>
  2. <!-- 加班申请单 发起应收款调整申请(不要调用接口的)-->
  3. <el-dialog
  4. v-loading="loading1"
  5. :close-on-click-modal="false"
  6. :close-on-press-escape="false"
  7. :visible.sync="dialogVisible"
  8. title="发起应收款调整申请"
  9. top="50px"
  10. width="75%"
  11. :append-to-body="true"
  12. :before-close="beforeClose"
  13. class="statistic_base"
  14. :modal-append-to-body="true"
  15. custom-class="tagdialog"
  16. >
  17. <div class="tabsdom">
  18. <el-tabs v-model="activeName" @tab-click="handleClick">
  19. <el-tab-pane label="应收款调整申请" name="first">
  20. <el-row type="flex" justify="end">
  21. <el-col :span="3" class="col-txt"><span>流程编号:</span></el-col>
  22. <el-col :span="6" class="col-input"><span style="font-size: 14px">{{ formData.flowNum }}</span></el-col>
  23. </el-row>
  24. <el-form
  25. ref="elForm"
  26. :model="formData"
  27. :rules="rules"
  28. label-width="150px"
  29. >
  30. <el-card shadow="always" style="padding: 15px 5px 5px 15px">
  31. <el-row :gutter="15">
  32. <el-col :span="24">
  33. <el-form-item label="标题" prop="titlexxx">
  34. <el-input v-model="formData.title" />
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <el-form-item label="创建人">
  39. <el-input v-model="userinfo.truename" placeholder="创建人" readonly />
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="12">
  43. <el-form-item label="创建部门">
  44. <el-input v-model="userinfo.deptName" placeholder="创建部门" readonly />
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="24">
  48. <el-form-item label="房屋">
  49. <el-form-item>
  50. <el-cascader
  51. v-model="formData.houseIds"
  52. :append-to-body="false"
  53. style="width: 100%;"
  54. :options="TreeData"
  55. :props="{ multiple: true}"
  56. />
  57. </el-form-item>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="24">
  61. <el-form-item label="应收款调整说明">
  62. <el-input
  63. v-model="formData.payRemark"
  64. :autosize="{minRows: 4, maxRows: 4}"
  65. :style="{width: '100%'}"
  66. placeholder="请填写"
  67. type="textarea"
  68. maxlength="2000"
  69. show-word-limit
  70. />
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="7">
  74. <el-form-item label="相关附件">
  75. <el-upload
  76. :action="$constant.BASE_URI+'/FileController/upload'"
  77. :file-list="formData.fileUrlList"
  78. :http-request="uploadFile"
  79. class="upload-demo"
  80. multiple
  81. :limit="6"
  82. :before-upload="$common.beforeUploadJustWordExcel"
  83. >
  84. <el-button size="small" type="primary">上传附件</el-button>
  85. <div slot="file" slot-scope="{file}">
  86. <a :href="file.url">{{ file.name }}</a>
  87. <span class="el-upload-list__item-actions">
  88. <i class="el-icon-delete" @click="handlePictureRemoveXF66(file,formData.fileUrlList)" />
  89. </span>
  90. </div>
  91. </el-upload>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="17" />
  95. </el-row>
  96. </el-card>
  97. </el-form>
  98. </el-tab-pane>
  99. <el-tab-pane label="流程图 " name="second">
  100. <div style="width: 100%">
  101. <el-row>
  102. <el-col :span="24">
  103. <div class="node_info">
  104. <div>节点说明:</div>
  105. <div v-for="item in nodeColor" class="dis_flex">
  106. <div class="node_class" :style="{backgroundColor: item.nodeback}" />
  107. {{ item.name }}
  108. </div>
  109. </div>
  110. <div v-show="true" id="containeraddwork1" style="width: 100%" />
  111. </el-col>
  112. </el-row>
  113. </div>
  114. </el-tab-pane>
  115. </el-tabs>
  116. </div>
  117. <div slot="footer">
  118. <el-button @click="dialogVisible=false">取消</el-button>
  119. <el-button :loading="loading" type="primary" @click="handelConfirm">确定</el-button>
  120. </div>
  121. </el-dialog>
  122. </template>
  123. <script>
  124. import { upload } from '@/static/utils/channel'
  125. import Base from '@/views/base/base'
  126. import BaseData from '@/views/base/baseData'
  127. import UserSelect from '@/views/components/UserSelect'
  128. import * as echarts from 'echarts'
  129. import { isPassword } from '@/static/utils/validate'
  130. const lineStyle = {
  131. color: '#00116a',
  132. width: 2
  133. }
  134. const redLinestyle = {
  135. color: 'red',
  136. width: 2
  137. }
  138. export default {
  139. name: 'applyContract',
  140. components: {
  141. upload, UserSelect
  142. },
  143. mixins: [Base, BaseData],
  144. data() {
  145. return {
  146. loading1: false,
  147. loading: false,
  148. nodeColor: [
  149. { name: '审核通过', nodeback: '#2A3980' },
  150. { name: '未经过', nodeback: '#999999' },
  151. { name: '退回', nodeback: '#E04242' },
  152. { name: '审核中', nodeback: '#E08E42' },
  153. { name: '撤回', nodeback: '#4294E0' }
  154. ],
  155. dc_key: ['ANSWER_NEED'],
  156. dialogVisible: false,
  157. formData: {
  158. payerName: '无锡市安居投资发展有限公司',
  159. fileUrlList: []
  160. },
  161. userinfo: {},
  162. activeName: 'first',
  163. rules: {
  164. title: [{
  165. required: true,
  166. message: '请输入标题',
  167. trigger: 'change'
  168. }],
  169. applyPayMoney: [{
  170. required: true,
  171. message: '请输入申请金额(小写)',
  172. trigger: 'change'
  173. }
  174. ],
  175. applyPayMoneyUppercase: [{
  176. required: true,
  177. message: '请输入申请金额(大写)',
  178. trigger: 'change'
  179. }]
  180. // applyReasons: [{
  181. // required: true,
  182. // message: '请输入加班事由',
  183. // trigger: 'change'
  184. // }],
  185. // position: [{
  186. // required: true,
  187. // message: '加班位置不能为空',
  188. // trigger: 'change'
  189. // }]
  190. },
  191. positionOptions: [
  192. {
  193. 'label': '公司',
  194. 'value': 1
  195. },
  196. {
  197. 'label': '客户处',
  198. 'value': 2
  199. }, {
  200. 'label': '居家',
  201. 'value': 3
  202. }],
  203. nodes: [ // 节点
  204. {
  205. name: '经办人发起',
  206. value: [45, 100],
  207. symbol: 'image://' + require('../asste/huifangkuai.png'),
  208. symbolSize: [110, 60]
  209. },
  210. {
  211. name: '部门负责人审核',
  212. value: [125, 100],
  213. symbol: 'image://' + require('../asste/huifangkuai.png'),
  214. symbolSize: [110, 60]
  215. },
  216. {
  217. name: '财务负责人审核',
  218. value: [205, 100],
  219. symbol: 'image://' + require('../asste/huifangkuai.png'),
  220. symbolSize: [110, 60]
  221. },
  222. {
  223. name: '分管领导审核',
  224. value: [285, 100],
  225. symbol: 'image://' + require('../asste/huifangkuai.png'),
  226. symbolSize: [110, 60]
  227. },
  228. {
  229. name: '总经理审核',
  230. value: [365, 100],
  231. symbol: 'image://' + require('../asste/huifangkuai.png'),
  232. symbolSize: [110, 60]
  233. },
  234. {
  235. name: '董事长审核',
  236. value: [445, 100],
  237. symbol: 'image://' + require('../asste/huifangkuai.png'),
  238. symbolSize: [110, 60]
  239. },
  240. {
  241. name: '结束',
  242. value: [525, 100],
  243. symbol: 'image://' + require('../asste/huifangkuai.png'),
  244. symbolSize: [110, 60]
  245. },
  246. {
  247. label: {
  248. show: true,
  249. color: 'red', // 节点文字颜色
  250. backgroundColor: '#f5f5f5'
  251. },
  252. itemStyle: {
  253. color: '#f5f5f5'
  254. },
  255. name: '退回发起人',
  256. value: [350, 400],
  257. symbolSize: [70, 20]
  258. },
  259. {
  260. label: {
  261. show: true,
  262. color: 'red', // 节点文字颜色
  263. backgroundColor: '#f5f5f5'
  264. },
  265. itemStyle: {
  266. color: '#f5f5f5'
  267. },
  268. name: ' 退回发起人 ',
  269. value: [300, 350],
  270. symbolSize: [20, 20]
  271. },
  272. {
  273. label: {
  274. show: true,
  275. color: 'red', // 节点文字颜色
  276. backgroundColor: '#f5f5f5'
  277. },
  278. itemStyle: {
  279. color: '#f5f5f5'
  280. },
  281. name: ' 退回发起人 ',
  282. value: [250, 300],
  283. symbolSize: [20, 20]
  284. },
  285. {
  286. label: {
  287. show: true,
  288. color: 'red', // 节点文字颜色
  289. backgroundColor: '#f5f5f5'
  290. },
  291. itemStyle: {
  292. color: '#f5f5f5'
  293. },
  294. name: ' 退回发起人 ',
  295. value: [250, 300],
  296. symbolSize: [20, 20]
  297. },
  298. {
  299. label: {
  300. show: true,
  301. color: 'red', // 节点文字颜色
  302. backgroundColor: '#f5f5f5'
  303. },
  304. itemStyle: {
  305. color: '#f5f5f5'
  306. },
  307. name: ' 退回发起人 ',
  308. value: [175, 250],
  309. symbolSize: [20, 20]
  310. },
  311. {
  312. label: {
  313. show: true,
  314. color: 'red', // 节点文字颜色
  315. backgroundColor: '#f5f5f5'
  316. },
  317. itemStyle: {
  318. color: '#f5f5f5'
  319. },
  320. name: ' 退回发起人 ',
  321. value: [100, 200],
  322. symbolSize: [20, 20]
  323. }
  324. ],
  325. linesData: [ // 连线
  326. {
  327. lineStyle: lineStyle,
  328. coords: [[45, 100], [105, 100]]
  329. },
  330. {
  331. lineStyle: lineStyle,
  332. coords: [[125, 100], [185, 100]]
  333. },
  334. {
  335. lineStyle: lineStyle,
  336. coords: [[205, 100], [265, 100]]
  337. },
  338. {
  339. lineStyle: lineStyle,
  340. coords: [[285, 100], [345, 100]]
  341. },
  342. {
  343. lineStyle: lineStyle,
  344. coords: [[365, 100], [425, 100]]
  345. },
  346. {
  347. lineStyle: lineStyle,
  348. coords: [[445, 100], [505, 100]]
  349. },
  350. {
  351. lineStyle: lineStyle,
  352. coords: [[450, 100], [450, 400]],
  353. symbol: 'none'
  354. },
  355. {
  356. lineStyle: lineStyle,
  357. coords: [[370, 100], [370, 350]],
  358. symbol: 'none'
  359. },
  360. {
  361. lineStyle: lineStyle,
  362. coords: [[290, 100], [290, 300]],
  363. symbol: 'none'
  364. },
  365. {
  366. lineStyle: lineStyle,
  367. coords: [[210, 100], [210, 250]],
  368. symbol: 'none'
  369. },
  370. {
  371. lineStyle: lineStyle,
  372. coords: [[130, 100], [130, 200]],
  373. symbol: 'none'
  374. },
  375. {
  376. lineStyle: lineStyle,
  377. coords: [[50, 100], [50, 400]],
  378. symbol: 'none'
  379. },
  380. {
  381. lineStyle: lineStyle,
  382. coords: [[450, 400], [50, 400]],
  383. symbol: 'none'
  384. },
  385. {
  386. lineStyle: lineStyle,
  387. coords: [[370, 350], [50, 350]],
  388. symbol: 'none'
  389. },
  390. {
  391. lineStyle: lineStyle,
  392. coords: [[290, 300], [50, 300]],
  393. symbol: 'none'
  394. },
  395. {
  396. lineStyle: lineStyle,
  397. coords: [[210, 250], [50, 250]],
  398. symbol: 'none'
  399. },
  400. {
  401. lineStyle: lineStyle,
  402. coords: [[130, 200], [50, 200]],
  403. symbol: 'none'
  404. },
  405. {
  406. lineStyle: lineStyle,
  407. coords: [[50, 150], [50, 150]],
  408. symbol: 'none'
  409. }
  410. ],
  411. TreeData: []
  412. }
  413. },
  414. computed: {},
  415. watch: {},
  416. created() {
  417. },
  418. mounted() {
  419. this.initDict(this.dc_key).then((res) => {
  420. })
  421. // this.initProject({ /* signstatus: '2,3'*/ })
  422. },
  423. methods: {
  424. handlePictureRemoveXF66(file, fileUrlList) {
  425. var index = fileUrlList.indexOf(file)
  426. this.$nextTick((e) => {
  427. this.formData.fileUrlList.splice(index, 1)
  428. })
  429. const formDataFileUrlList = JSON.parse(JSON.stringify(this.formData.fileUrlList))
  430. this.formData.fileUrlList = []
  431. this.formData.fileUrlList = formDataFileUrlList
  432. this.$forceUpdate()
  433. },
  434. uploadFile: function(param) {
  435. const _this = this
  436. upload(param, true).then((res) => {
  437. _this.formData.fileUrlList.push(res)
  438. console.log(' _this.formData.fileUrlList', _this.formData.fileUrlList)
  439. })
  440. },
  441. beforeClose() {
  442. // eslint-disable-next-line no-mixed-spaces-and-tabs
  443. this.formData = {
  444. // payerName: '无锡市安居投资发展有限公司'
  445. // eslint-disable-next-line no-mixed-spaces-and-tabs
  446. }
  447. this.dialogVisible = false
  448. this.activeName = 'first'
  449. this.$forceUpdate()
  450. },
  451. handleClick(tab, event) {
  452. if (this.activeName == 'second') this.createNodeCanvas()
  453. },
  454. createNodeCanvas() {
  455. this.$nextTick(() => {
  456. const chartDom = document.getElementById('containeraddwork1')
  457. var myCharts = echarts.init(chartDom)
  458. const charts = {
  459. nodes: this.nodes,
  460. linesData: this.linesData
  461. }
  462. const option = {
  463. xAxis: {
  464. min: 0,
  465. max: 600,
  466. padding: [0, 50, 0, 50],
  467. show: false,
  468. type: 'value'
  469. },
  470. yAxis: {
  471. min: 0,
  472. max: 450,
  473. show: false,
  474. type: 'value'
  475. },
  476. grid: {
  477. left: 50,
  478. right: 0,
  479. bottom: 0,
  480. top: 0
  481. },
  482. series: [
  483. {
  484. type: 'graph',
  485. coordinateSystem: 'cartesian2d',
  486. symbol: 'rect',
  487. symbolSize: [80, 40],
  488. itemStyle: {
  489. color: 'rgb(225,7,7)'
  490. },
  491. symbolOffset: [10, 0],
  492. // force: {
  493. // edgeLength: 100,//连线的长度
  494. // repulsion: 200 //子节点之间的间距
  495. // },
  496. label: {
  497. show: true,
  498. color: 'white' // 节点文字颜色
  499. },
  500. data: charts.nodes
  501. },
  502. {
  503. type: 'lines',
  504. polyline: false,
  505. coordinateSystem: 'cartesian2d',
  506. symbol: ['', 'arrow'],
  507. symbolSize: 10,
  508. data: charts.linesData
  509. }
  510. ]
  511. }
  512. myCharts.clear()
  513. myCharts.setOption(option)
  514. window.addEventListener('resize', () => {
  515. myCharts.resize()
  516. })
  517. })
  518. },
  519. async getUserInfo() {
  520. const { data: userinfo } = await this.baseRequest1('ApplyCheckInController', 'getUserInfoByUserId', { userId: '' })
  521. this.userinfo = userinfo
  522. this.formData.truename = userinfo.truename
  523. this.formData.deptName = userinfo.deptName
  524. console.log(this.userinfo)
  525. },
  526. baseRequest1(prefix, opUrl, postData) {
  527. return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
  528. },
  529. setVisible(status) {
  530. // this.loading1 = true
  531. this.formData = {
  532. payerName: '无锡市安居投资发展有限公司'
  533. }
  534. this.formData.fileUrlList = []
  535. // this.getMaxNum()
  536. this.getUserInfo()
  537. this.findRoomTree()
  538. this.dialogVisible = status
  539. },
  540. onOpen() {
  541. },
  542. onClose() {
  543. this.$refs['elForm'].resetFields()
  544. },
  545. close() {
  546. this.$emit('update:visible', false)
  547. },
  548. async handelConfirm() {
  549. const _this = this
  550. if (_this.formData.houseIds == undefined || _this.formData.houseIds.length < 1) {
  551. _this.$message({
  552. message: '请选择出租载体',
  553. type: 'warning'
  554. })
  555. return
  556. } else {
  557. _this.formData.houseIds.forEach(item => {
  558. if (item.length < 4) {
  559. _this.$message({
  560. message: '有房间尚未选择,请校验后重新选择',
  561. type: 'warning'
  562. })
  563. return
  564. }
  565. })
  566. }
  567. this.$refs['elForm'].validate(async valid => {
  568. if (!valid) return
  569. // delete formData.applyAddWorkTime
  570. if (this.formData.fileUrlList.length > 0) {
  571. this.formData.fileDataIds = this.formData.fileUrlList.map((e) => {
  572. return e.data
  573. }).toString()
  574. }
  575. const formData = {
  576. ...this.formData
  577. }
  578. this.loading = true
  579. const { data } = await this.baseRequest1('ApplyCheckInController', 'addApplyCheckIn', { ...formData })
  580. if (data.code == 200) {
  581. this.loading = false
  582. this.$message.success('应收款调整申请发起成功')
  583. this.dialogVisible = false
  584. this.$emit('getData')
  585. }
  586. this.close()
  587. })
  588. },
  589. findRoomTree: function() {
  590. const _this = this
  591. this.pubRequest('getTreeData1', '').then((res) => {
  592. _this.TreeData = res.data.data
  593. }).catch(() => {
  594. })
  595. },
  596. pubRequest(opUrl, postData) {
  597. return this.$channel.globeRequest('ParkInfoController', opUrl, postData, 'project')
  598. }
  599. }
  600. }
  601. </script>
  602. <style lang="scss">
  603. .cclist {
  604. .col-input {
  605. padding: 0;
  606. }
  607. }
  608. #containeraddwork1 {
  609. height: 600px;
  610. width: 100%;
  611. background: #F5F5F5;
  612. }
  613. .pdr10px {
  614. padding-right: 10px;
  615. }
  616. .mgb10px {
  617. margin-bottom: 10px;
  618. }
  619. .mb25 {
  620. margin-bottom: 25px;
  621. }
  622. .pdtopbottom16 {
  623. padding: 0px 16px;
  624. }
  625. .pdtop16px {
  626. padding-top: 16px;
  627. }
  628. .totalApplyTime {
  629. font-size: 16px;
  630. font-family: 微软雅黑;
  631. font-weight: 400;
  632. color: #1890FF;
  633. text-align: right;
  634. margin: 15px 0 15px 0;
  635. width: 100%;
  636. }
  637. .cost_form {
  638. .col-input {
  639. font-weight: 400;
  640. }
  641. .el-form-item__label .moneydetails {
  642. text-align: right;
  643. font-size: 16px;
  644. font-family: 微软雅黑;
  645. padding-right: 10px;
  646. line-height: 40px;
  647. word-break: keep-all;
  648. white-space: nowrap;
  649. color: #606266;
  650. text-rendering: optimizeLegibility;
  651. font-weight: 400;
  652. }
  653. .moneydetails {
  654. text-align: right;
  655. font-size: 16px;
  656. font-family: 微软雅黑;
  657. padding-right: 10px;
  658. word-break: keep-all;
  659. white-space: nowrap;
  660. color: #606266;
  661. text-rendering: optimizeLegibility;
  662. font-weight: 400;
  663. }
  664. .moneydetails:before {
  665. content: "*";
  666. color: #ff4949;
  667. }
  668. }
  669. .txtc {
  670. text-align: center
  671. }
  672. .ml5 {
  673. margin-left: 5px;
  674. }
  675. .eltype {
  676. margin-bottom: 15px;
  677. }
  678. .tabsdom {
  679. .el-input {
  680. width: 100%;
  681. }
  682. .el-upload {
  683. width: 100%;
  684. text-align: left;
  685. }
  686. .el-tabs__header {
  687. text-align: center !important;
  688. width: 139px !important;
  689. text-align: center !important;
  690. display: block !important;
  691. margin: auto !important;
  692. margin-bottom: 15px !important;
  693. }
  694. .el-tabs__nav-wrap::after {
  695. display: none;
  696. }
  697. .el-upload {
  698. width: 100%;
  699. }
  700. }
  701. .feeMoneyTotal {
  702. width: 100%;
  703. height: 14px;
  704. font-size: 14px;
  705. font-weight: 400;
  706. color: #1890FF;
  707. margin-top: 31px;
  708. margin-bottom: 13px;
  709. }
  710. </style>