applyPay.vue 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  1. <template>
  2. <!-- 发起付款申请 -->
  3. <el-dialog
  4. :close-on-click-modal="false"
  5. :close-on-press-escape="false"
  6. :title="dialogTitle"
  7. :visible.sync="dialogVisible"
  8. top="50px"
  9. width="75%"
  10. :before-close="beforeClose"
  11. class="statistic_base"
  12. :append-to-body="true"
  13. :modal-append-to-body="true"
  14. custom-class="tagdialog"
  15. >
  16. <div class="tabsdom">
  17. <el-tabs v-model="activeName" @tab-click="handleClick">
  18. <el-tab-pane label="付款申请" name="first">
  19. <el-card shadow="always" style="padding: 15px 5px 5px 15px">
  20. <el-form
  21. ref="elformData"
  22. :model="formData"
  23. :rules="rules"
  24. class="payform"
  25. label-width="200px"
  26. size="medium"
  27. >
  28. <el-card style="padding:0px 20px;margin-bottom: 25px">
  29. <h3 style="margin-top: 0"><span style="color: red">*</span> 订单详情</h3>
  30. <el-row :gutter="15">
  31. <el-col :span="24">
  32. <el-form-item
  33. :style="{width: '100%'}"
  34. clearable
  35. label="采购单号"
  36. label-width="160px"
  37. >
  38. <el-select
  39. v-model="formData.orderNo"
  40. filterable
  41. placeholder="采购单号"
  42. @change="selectOutOrderDetails"
  43. >
  44. <el-option
  45. v-for="(item,index) in OutOrderList"
  46. :key="index"
  47. :label="item.supplierName+item.orderNo"
  48. :value="item.id"
  49. >
  50. <span style="float: left">{{ item.supplierName }}
  51. </span>
  52. <span style="float: right; color: #8492a6; font-size: 13px">
  53. {{ item.orderNo }}
  54. </span>
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="12">
  60. <el-form-item label="关联项目名称" label-width="160px" prop="proId">
  61. <el-input v-model="formData.proName" readonly />
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="12">
  65. <el-form-item label="客户名称" label-width="160px">
  66. <el-input v-model="formData.custName" readonly />
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="12">
  70. <el-form-item label="发包日期" label-width="160px">
  71. <el-date-picker
  72. v-model="formData.dealAt"
  73. placeholder="发包日期"
  74. readonly
  75. style="width: 100%"
  76. type="datetime"
  77. value-format="yyyy-MM-dd HH:mm:ss"
  78. />
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="12">
  82. <el-form-item label="要求完成时间" label-width="160px">
  83. <el-date-picker
  84. v-model="formData.outTimeline"
  85. placeholder="要求完成时间"
  86. readonly
  87. style="width: 100%"
  88. type="datetime"
  89. value-format="yyyy-MM-dd HH:mm:ss"
  90. />
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="12">
  94. <el-form-item label="供应商" label-width="160px" prop="bizId">
  95. <el-input v-model="formData.supplierName" readonly />
  96. </el-form-item>
  97. </el-col>
  98. <el-col :span="12">
  99. <el-form-item label="联系人" label-width="160px" prop="bizBy">
  100. <el-input v-model="formData.contactUser" readonly />
  101. <!-- <el-select-->
  102. <!-- v-model="formData.bizBy"-->
  103. <!-- disabled-->
  104. <!-- >-->
  105. <!-- <el-option-->
  106. <!-- v-for="item in bizByList"-->
  107. <!-- :key="item.id"-->
  108. <!-- :label="item.username"-->
  109. <!-- :value="item.id"-->
  110. <!-- />-->
  111. <!-- </el-select>-->
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="12">
  115. <el-form-item label="订单总金额" label-width="160px" prop="orderAmount">
  116. <el-input v-model="formData.orderAmount" readonly type="number" />
  117. </el-form-item>
  118. </el-col>
  119. <el-col :span="12">
  120. <el-form-item label="税率(%)" label-width="160px" prop="taxRate">
  121. <el-input v-model="formData.taxRate" readonly type="number" />
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="12">
  125. <el-form-item label="支付方式" label-width="160px">
  126. <el-select v-model="formData.payType" disabled placeholder="支付方式">
  127. <el-option
  128. v-for="item in dc_data.PAY_TYPE"
  129. :key="item.value"
  130. :label="item.label"
  131. :value="item.value"
  132. />
  133. </el-select>
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="12">
  137. <el-form-item label="下单人" label-width="160px">
  138. <el-input v-model="formData.dealBy" readonly />
  139. </el-form-item>
  140. </el-col>
  141. <el-col :span="24">
  142. <el-form-item label="支付说明" label-width="160px">
  143. <el-input
  144. v-model="formData.remark"
  145. :rows="3"
  146. readonly
  147. type="textarea"
  148. />
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. <!-- <el-row>-->
  153. <!-- <el-col style="padding-bottom: 10px">-->
  154. <!-- <span class="card_title">支付列表</span>-->
  155. <!-- <el-card shadow="always" style="padding:0px 20px 20px 20px">-->
  156. <!-- <el-row>-->
  157. <!-- <el-col :span="24">-->
  158. <!-- <el-table-->
  159. <!-- row-class-name="g_table_row"-->
  160. <!-- stripe-->
  161. <!-- >-->
  162. <!-- <el-table-column label="支付日期" prop="payAt"/>-->
  163. <!-- <el-table-column label="付款名称" prop="payName"/>-->
  164. <!-- <el-table-column label="付款金额" prop="payAmount"/>-->
  165. <!-- <el-table-column label="发票号" prop="invoiceNo"/>-->
  166. <!-- <el-table-column label="发票金额" prop="invoiceAmount"/>-->
  167. <!-- <el-table-column label="申请人" prop="applyByName"/>-->
  168. <!-- <el-table-column label="申请日期" prop="applyTime"/>-->
  169. <!-- </el-table>-->
  170. <!-- </el-col>-->
  171. <!-- </el-row>-->
  172. <!-- </el-card>-->
  173. <!-- </el-col>-->
  174. <!-- </el-row>-->
  175. </el-card>
  176. <el-card style="padding:0px 20px;margin-bottom: 25px">
  177. <h3 style="margin-top: 0"><span style="color: red">*</span> 支付信息</h3>
  178. <el-row :gutter="15">
  179. <el-col :span="12">
  180. <el-form-item
  181. label="项目累计已回款金额(元)"
  182. >
  183. <div style="line-height: 40px;height: 40px">{{ formData.totalReturnMoney }}</div>
  184. <!-- <el-input-->
  185. <!-- v-model="formData.totalReturnMoney"-->
  186. <!-- :style="{width: '100%'}"-->
  187. <!-- clearable-->
  188. <!-- placeholder="请输入项目累计已回款金额(元)"-->
  189. <!-- readonly-->
  190. <!-- />-->
  191. </el-form-item>
  192. </el-col>
  193. <el-col :span="12">
  194. <el-form-item label="订单累计已支付金额(元)" prop="totalPayMoney">
  195. <div style="line-height: 40px;height: 40px">{{ formData.totalPayMoney }}</div>
  196. <!-- <el-input-->
  197. <!-- v-model="formData.totalPayMoney"-->
  198. <!-- :style="{width: '100%'}"-->
  199. <!-- clearable-->
  200. <!-- placeholder="请输入订单累计已支付金额(元)"-->
  201. <!-- readonly-->
  202. <!-- />-->
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="24" style="padding-bottom: 10px">
  206. <el-table
  207. ref="payDetailTable"
  208. :data="payDetailData"
  209. stripe
  210. row-class-name="g_table_row"
  211. @select="setSelectRow"
  212. @select-all="selectAll"
  213. >
  214. <el-table-column width="55" type="selection" />
  215. <el-table-column label="计划付款日期" prop="planPayTime" />
  216. <el-table-column label="提醒日期" prop="remindTime" />
  217. <el-table-column label="付款名称" prop="payName" />
  218. <el-table-column label="付款金额/元" prop="payAmount" />
  219. <el-table-column label="更新时间" prop="updatedAt" />
  220. <el-table-column label="付款状态" prop="statusName" />
  221. <el-table-column label="实际付款日期" prop="payAt" />
  222. </el-table>
  223. </el-col>
  224. <el-col :span="12">
  225. <el-form-item label="付款名称" prop="payName">
  226. <el-input
  227. v-model="formData.payName"
  228. :style="{width: '100%'}"
  229. clearable
  230. placeholder="请勾选付款计划"
  231. readonly
  232. />
  233. </el-form-item>
  234. </el-col>
  235. <el-col :span="12">
  236. <el-form-item label="付款金额" prop="payMoney">
  237. <el-input
  238. v-model="formData.payMoney"
  239. :style="{width: '100%'}"
  240. clearable
  241. placeholder="请勾选付款计划"
  242. readonly
  243. />
  244. </el-form-item>
  245. </el-col>
  246. <!-- <el-col :span="24">-->
  247. <!-- <el-form-item label="费用成本归属" prop="costsType">-->
  248. <!-- <el-select-->
  249. <!-- v-model="formData.costsType"-->
  250. <!-- clearable-->
  251. <!-- filterable-->
  252. <!-- placeholder="请选择"-->
  253. <!-- >-->
  254. <!-- <el-option-->
  255. <!-- v-for="item in dc_data.BUDGET_CB"-->
  256. <!-- :key="item.value"-->
  257. <!-- :label="item.label"-->
  258. <!-- :value="item.value"-->
  259. <!-- />-->
  260. <!-- </el-select>-->
  261. <!-- </el-form-item>-->
  262. <!-- </el-col>-->
  263. </el-row>
  264. </el-card>
  265. <el-card style="padding:0px 20px;margin-bottom: 25px">
  266. <h3 style="margin-top: 0">
  267. 发票信息
  268. </h3>
  269. <el-row :gutter="15">
  270. <el-col :span="12">
  271. <el-form-item label="发票类型" label-width="160px" prop="billType">
  272. <el-radio-group v-model="formData.billType" size="mini">
  273. <el-radio
  274. v-for="(item, index) in billTypeOptions"
  275. :key="index"
  276. :disabled="item.disabled"
  277. :label="item.value"
  278. >
  279. {{ item.label }}
  280. </el-radio>
  281. </el-radio-group>
  282. </el-form-item>
  283. </el-col>
  284. <el-col :span="12">
  285. <el-form-item label="开票金额" label-width="160px" prop="billMoney">
  286. <el-input
  287. v-model="formData.billMoney"
  288. :style="{width: '100%'}"
  289. clearable
  290. placeholder="请输入开票金额"
  291. />
  292. </el-form-item>
  293. </el-col>
  294. <el-col :span="12">
  295. <el-form-item label="发票号" label-width="160px" prop="billNumber">
  296. <el-input
  297. v-model="formData.billNumber"
  298. :style="{width: '100%'}"
  299. clearable
  300. placeholder="请输入发票号"
  301. />
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="12">
  305. <el-form-item label="税率(%)" label-width="160px" prop="billRate">
  306. <el-select v-model="formData.billRate" placeholder="请选择">
  307. <el-option
  308. v-for="item in dc_data.PURCHASE_TAX_RATE"
  309. :key="item.value"
  310. :label="item.label"
  311. :value="item.value"
  312. />
  313. </el-select>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="24">
  317. <el-form-item label="上传" label-width="160px" prop="fileDataIds">
  318. <el-upload
  319. :action="$constant.BASE_URI+'/FileController/upload'"
  320. :file-list="formData.fileUrlList"
  321. :http-request="uploadFile"
  322. class="upload-demo"
  323. multiple
  324. >
  325. <el-button size="small" type="primary">点击上传</el-button>
  326. <div slot="file" slot-scope="{file}">
  327. <a :href="file.url">{{ file.name }}</a>
  328. <span class="el-upload-list__item-actions">
  329. <i class="el-icon-delete" @click="handlePictureRemove(file,formData.fileUrlList)" />
  330. </span>
  331. </div>
  332. </el-upload>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :span="24">
  336. <el-form-item label="抄送" label-width="160px" prop="field119">
  337. <user-select
  338. :default-select="selectList"
  339. :multiple="true"
  340. width="700"
  341. @selectValue="parentMethod"
  342. />
  343. </el-form-item>
  344. </el-col>
  345. </el-row>
  346. </el-card>
  347. </el-form>
  348. </el-card>
  349. </el-tab-pane>
  350. <el-tab-pane label="流程图 " name="second">
  351. <div style="width: 100%">
  352. <el-row>
  353. <el-col :span="24">
  354. <div class="node_info">
  355. <div>节点说明:</div>
  356. <div v-for="item in nodeColor" class="dis_flex">
  357. <div class="node_class" :style="{backgroundColor: item.nodeback}" />
  358. {{ item.name }}
  359. </div>
  360. </div>
  361. <div v-show="true" id="containerPay1" style="width: 100%" />
  362. </el-col>
  363. </el-row>
  364. </div>
  365. </el-tab-pane>
  366. </el-tabs>
  367. </div>
  368. <div slot="footer">
  369. <el-button @click="setVisible(false,'')">取 消</el-button>
  370. <el-button :loading="buttonLoading" type="primary" @click="confirmSubmit()">确 定</el-button>
  371. </div>
  372. </el-dialog>
  373. </template>
  374. <script>
  375. import { upload } from '@/static/utils/channel'
  376. import Base from '@/views/base/base'
  377. import BaseData from '@/views/base/baseData'
  378. import UserSelect from '@/views/components/UserSelect'
  379. import * as echarts from 'echarts'
  380. const lineStyle = {
  381. color: '#00116a',
  382. width: 2
  383. }
  384. const redLinestyle = {
  385. color: 'red',
  386. width: 2
  387. }
  388. const intiData = {}
  389. export default {
  390. name: 'ApplyPay',
  391. components: {
  392. UserSelect
  393. },
  394. mixins: [Base, BaseData],
  395. data() {
  396. return {
  397. fileError: false,
  398. bizByList: [],
  399. selectList: [],
  400. detailsForm: {},
  401. buttonLoading: false,
  402. // 查询的时候用的字典========================================
  403. dc_key: ['PAY_TYPE', 'BUDGET_CB', 'RECEIPT_TYPE', 'PURCHASE_TAX_RATE'],
  404. fileDataIdsAction: 'https://jsonplaceholder.typicode.com/posts/',
  405. formData: {
  406. fileUrlList: []
  407. },
  408. billTypeOptions: [
  409. { 'label': '增票', 'value': 1 },
  410. { 'label': '普票', 'value': 2 },
  411. { 'label': '发票候补', 'value': 3 }
  412. ],
  413. nodeColor: [
  414. { name: '审核通过', nodeback: '#2A3980' },
  415. { name: '未经过', nodeback: '#999999' },
  416. { name: '退回', nodeback: '#E04242' },
  417. { name: '审核中', nodeback: '#E08E42' },
  418. { name: '撤回', nodeback: '#4294E0' }
  419. ],
  420. onlineForm: {},
  421. dialogTitle: '发起付款申请1111',
  422. dialogVisible: false,
  423. form: {},
  424. activeName: 'first',
  425. OutOrderList: [],
  426. shouldAmount: 0,
  427. rules: {
  428. fileDataIds: [{ required: false, message: '请上传发票文件', trigger: 'change' }],
  429. totalPayMoney: [{ required: true, message: '请输入订单累计已支付金额', trigger: 'change' }],
  430. payName: [{ required: true, message: '付款名称不能为空', trigger: 'change' }],
  431. payMoney: [{ required: true, message: '付款金额不能为空', trigger: 'change' }]
  432. // costsType: [{required: true, message: '请选择', trigger: 'change'}],
  433. },
  434. payDetailData: [],
  435. zhidanStatus:true,
  436. zffhStatus:true,
  437. confirmForm: {},
  438. }
  439. },
  440. mounted() {
  441. const _this = this
  442. _this.initDict(_this.dc_key).then((res) => {
  443. })
  444. _this.getOutOrderList()
  445. _this.getBizeUserList()
  446. // /webServer/BugLibraryController/listBizUserAll
  447. },
  448. methods: {
  449. beforeClose() {
  450. this.formData = {
  451. fileUrlList: []
  452. }
  453. this.dialogVisible = false
  454. },
  455. handleClick(tab, event) {
  456. if (this.activeName == 'second') this.createNodeCanvas()
  457. },
  458. createNodeCanvas() {
  459. this.$nextTick(() => {
  460. const chartDom = document.getElementById('containerPay1')
  461. var myCharts = echarts.init(chartDom)
  462. const charts = {
  463. nodes: [ // 节点
  464. {
  465. name: '申请人发起',
  466. value: [45, 250],
  467. symbol: 'image://' + require('../asste/huifangkuai.png'),
  468. symbolSize: [110, 60]
  469. },
  470. {
  471. name: '直接上级审核',
  472. value: [125, 250],
  473. symbol: 'image://' + require('../asste/huifangkuai.png'),
  474. symbolSize: [110, 60]
  475. },
  476. {
  477. name: '部门负责人审核',
  478. value: [205, 250],
  479. symbol: 'image://' + require('../asste/huifangkuai.png'),
  480. symbolSize: [110, 60]
  481. },
  482. {
  483. name: '分管领导审核',
  484. value: [285, 250],
  485. symbol: 'image://' + require('../asste/huifangkuai.png'),
  486. symbolSize: [110, 60]
  487. },
  488. {
  489. name: '上级分管领导\n审核',
  490. value: [365, 250],
  491. symbol: 'image://' + require('../asste/huifangkuai.png'),
  492. symbolSize: [110, 60]
  493. },
  494. {
  495. name: '主要领导\n审核',
  496. value: [445, 250],
  497. symbol: 'image://' + require('../asste/huifangkuai.png'),
  498. symbolSize: [110, 60]
  499. },
  500. {
  501. name: '出纳支付',
  502. value: [525, 250],
  503. symbol: 'image://' + require('../asste/huifangkuai.png'),
  504. symbolSize: [110, 60]
  505. },
  506. {
  507. name: '支付审核',
  508. value: [525, 100],
  509. symbol: 'image://' + require('../asste/huifangkuai.png'),
  510. symbolSize: [110, 60]
  511. },
  512. {
  513. name: '结束',
  514. value: [445, 100],
  515. symbol: 'image://' + require('../asste/huifangkuai.png'),
  516. symbolSize: [110, 60]
  517. },
  518. {
  519. label: {
  520. show: true,
  521. color: 'red', // 节点文字颜色
  522. backgroundColor: '#f5f5f5'
  523. },
  524. itemStyle: {
  525. color: '#f5f5f5'
  526. },
  527. name: '返回上一节点',
  528. value: [550, 180]
  529. },
  530. {
  531. label: {
  532. show: true,
  533. color: 'red', // 节点文字颜色
  534. backgroundColor: '#f5f5f5'
  535. },
  536. itemStyle: {
  537. color: '#f5f5f5'
  538. },
  539. name: '退回发起人 ',
  540. value: [450, 600],
  541. symbolSize: [70, 20]
  542. },
  543. {
  544. label: {
  545. show: true,
  546. color: 'red', // 节点文字颜色
  547. backgroundColor: '#f5f5f5'
  548. },
  549. itemStyle: {
  550. color: '#f5f5f5'
  551. },
  552. name: '退回发起人',
  553. value: [350, 550],
  554. symbolSize: [70, 20]
  555. },
  556. {
  557. label: {
  558. show: true,
  559. color: 'red', // 节点文字颜色
  560. backgroundColor: '#f5f5f5'
  561. },
  562. itemStyle: {
  563. color: '#f5f5f5'
  564. },
  565. name: ' 退回发起人 ',
  566. value: [300, 500],
  567. symbolSize: [20, 20]
  568. },
  569. {
  570. label: {
  571. show: true,
  572. color: 'red', // 节点文字颜色
  573. backgroundColor: '#f5f5f5'
  574. },
  575. itemStyle: {
  576. color: '#f5f5f5'
  577. },
  578. name: ' 退回发起人 ',
  579. value: [250, 450],
  580. symbolSize: [20, 20]
  581. },
  582. {
  583. label: {
  584. show: true,
  585. color: 'red', // 节点文字颜色
  586. backgroundColor: '#f5f5f5'
  587. },
  588. itemStyle: {
  589. color: '#f5f5f5'
  590. },
  591. name: ' 退回发起人 ',
  592. value: [250, 450],
  593. symbolSize: [20, 20]
  594. },
  595. {
  596. label: {
  597. show: true,
  598. color: 'red', // 节点文字颜色
  599. backgroundColor: '#f5f5f5'
  600. },
  601. itemStyle: {
  602. color: '#f5f5f5'
  603. },
  604. name: ' 退回发起人 ',
  605. value: [175, 400],
  606. symbolSize: [20, 20]
  607. },
  608. {
  609. label: {
  610. show: true,
  611. color: 'red', // 节点文字颜色
  612. backgroundColor: '#f5f5f5'
  613. },
  614. itemStyle: {
  615. color: '#f5f5f5'
  616. },
  617. name: ' 退回发起人 ',
  618. value: [100, 350],
  619. symbolSize: [20, 20]
  620. }
  621. ],
  622. linesData: [ // 连线
  623. {
  624. lineStyle: lineStyle,
  625. coords: [[45, 250], [105, 250]]
  626. },
  627. {
  628. lineStyle: lineStyle,
  629. coords: [[125, 250], [185, 250]]
  630. },
  631. {
  632. lineStyle: lineStyle,
  633. coords: [[205, 250], [265, 250]]
  634. },
  635. {
  636. lineStyle: lineStyle,
  637. coords: [[285, 250], [345, 250]]
  638. },
  639. {
  640. lineStyle: lineStyle,
  641. coords: [[365, 250], [425, 250]]
  642. },
  643. {
  644. lineStyle: lineStyle,
  645. coords: [[445, 250], [505, 250]]
  646. },
  647. {
  648. lineStyle: lineStyle,
  649. coords: [[450, 250], [450, 550]],
  650. symbol: 'none'
  651. },
  652. {
  653. lineStyle: lineStyle,
  654. coords: [[370, 250], [370, 500]],
  655. symbol: 'none'
  656. },
  657. {
  658. lineStyle: lineStyle,
  659. coords: [[290, 250], [290, 450]],
  660. symbol: 'none'
  661. },
  662. {
  663. lineStyle: lineStyle,
  664. coords: [[210, 250], [210, 400]],
  665. symbol: 'none'
  666. },
  667. {
  668. lineStyle: lineStyle,
  669. coords: [[130, 250], [130, 350]],
  670. symbol: 'none'
  671. },
  672. {
  673. lineStyle: lineStyle,
  674. coords: [[50, 250], [50, 600]],
  675. symbol: 'none'
  676. },
  677. {
  678. lineStyle: lineStyle,
  679. coords: [[450, 550], [50, 550]],
  680. symbol: 'none'
  681. },
  682. {
  683. lineStyle: lineStyle,
  684. coords: [[370, 500], [50, 500]],
  685. symbol: 'none'
  686. },
  687. {
  688. lineStyle: lineStyle,
  689. coords: [[290, 450], [50, 450]],
  690. symbol: 'none'
  691. },
  692. {
  693. lineStyle: lineStyle,
  694. coords: [[210, 400], [50, 400]],
  695. symbol: 'none'
  696. },
  697. {
  698. lineStyle: lineStyle,
  699. coords: [[130, 350], [50, 350]],
  700. symbol: 'none'
  701. },
  702. {
  703. lineStyle: lineStyle,
  704. coords: [[50, 600], [530, 600]],
  705. symbol: 'none'
  706. },
  707. {
  708. lineStyle: lineStyle,
  709. coords: [[530, 600], [530, 250]],
  710. symbol: 'none'
  711. },
  712. {
  713. lineStyle: lineStyle,
  714. coords: [[530, 250], [530, 130]]
  715. },
  716. {
  717. lineStyle: lineStyle,
  718. coords: [[535, 130], [535, 220]]
  719. },
  720. {
  721. lineStyle: lineStyle,
  722. coords: [[525, 100], [475, 100]]
  723. }
  724. ]
  725. }
  726. const option = {
  727. xAxis: {
  728. min: 0,
  729. max: 600,
  730. padding: [0, 50, 0, 50],
  731. show: false,
  732. type: 'value'
  733. },
  734. yAxis: {
  735. min: 0,
  736. max: 650,
  737. show: false,
  738. type: 'value'
  739. },
  740. grid: {
  741. left: 50,
  742. right: 0,
  743. bottom: 0,
  744. top: 0
  745. },
  746. series: [
  747. {
  748. type: 'graph',
  749. coordinateSystem: 'cartesian2d',
  750. symbol: 'rect',
  751. symbolSize: [80, 40],
  752. itemStyle: {
  753. color: 'rgb(225,7,7)'
  754. },
  755. symbolOffset: [10, 0],
  756. // force: {
  757. // edgeLength: 100,//连线的长度
  758. // repulsion: 200 //子节点之间的间距
  759. // },
  760. label: {
  761. show: true,
  762. color: 'white' // 节点文字颜色
  763. },
  764. data: charts.nodes
  765. },
  766. {
  767. type: 'lines',
  768. polyline: false,
  769. coordinateSystem: 'cartesian2d',
  770. symbol: ['', 'arrow'],
  771. symbolSize: 10,
  772. data: charts.linesData
  773. }
  774. ]
  775. }
  776. myCharts.clear()
  777. myCharts.setOption(option)
  778. window.addEventListener('resize', () => {
  779. myCharts.resize()
  780. })
  781. })
  782. },
  783. handlePictureRemove(file, fileUrlList) {
  784. var index = fileUrlList.indexOf(file)
  785. fileUrlList.splice(index, 1)
  786. },
  787. uploadFile: function(param) {
  788. const _this = this
  789. upload(param, true).then((res) => {
  790. _this.formData.fileUrlList.push(res)
  791. })
  792. },
  793. downloadFaPiao(url) {
  794. window.open(url)
  795. },
  796. parentMethod(val) {
  797. if (val.length > 0) {
  798. this.formData.ccList = val.join(',')
  799. }
  800. },
  801. async getBizeUserList() {
  802. const { data } = await this.baseRequest1('BugLibraryController', 'listBizUserAll', {})
  803. this.bizByList = data
  804. },
  805. async selectOutOrderDetails(e) {
  806. const postData = { id: e }
  807. const { data } = await this.baseRequest1('OutOrderMainController', 'getVoById', postData)
  808. // ApplyPaymentController/getTotalMoneyByProId
  809. const index = this.OutOrderList.findIndex((a) => a.id == e)
  810. const res = await this.baseRequest1('ApplyPaymentController', 'getTotalMoneyByProId', { proId: this.OutOrderList[index].proId })
  811. const res2 = await this.baseRequest1('ApplyPaymentController', 'getTotalPayMoneyByOrderNo', { orderNo: this.OutOrderList[index].orderNo })
  812. const fileUrlList = this.formData.fileUrlList
  813. this.formData = { ...data, fileUrlList: fileUrlList }
  814. this.formData.projectName = data.proName
  815. this.formData.customerName = data.custName
  816. // this.formData.supplierName = data.bizName
  817. this.formData.bizBy = data.bizBy
  818. this.formData.dealAt = this.$common.transServDate(data.dealAt)
  819. this.formData.outTimeline = this.$common.transServDate(data.outTimeline)
  820. this.formData.orderNo = data.supplierName + '-' + data.orderNo
  821. this.formData.orderId = e
  822. this.formData.totalReturnMoney = res.data.data
  823. this.formData.totalPayMoney = res2.data.data
  824. this.shouldAmount = data.shouldAmount
  825. // this.formData.fileUrlList = []
  826. this.getPayDetail(e)
  827. },
  828. getPayDetail: function(id) {
  829. const _this = this
  830. _this.payDetailData = []
  831. this.basePayDetailRequest('listForAudit', { outOrderMainId: id }).then((res) => {
  832. if (res.data) {
  833. res.data.forEach(function(item) {
  834. const jsonMap = _this.getPayItemJson(item)
  835. _this.payDetailData.push(jsonMap)
  836. })
  837. }
  838. })
  839. },
  840. getPayItemJson: function(item) {
  841. item.payAt = this.$common.transDate(item.payAt, this.$constant.DATE_PATTERN.DATE)
  842. item.applyTime = item.applyTime ? this.$common.transDate(item.applyTime, this.$constant.DATE_PATTERN.DATE) : ''
  843. item.updatedAt = item.updatedAt ? this.$common.transDate(item.updatedAt, this.$constant.DATE_PATTERN.DATE) : ''
  844. item.planPayTime = item.planPayTime ? this.$common.transDate(item.planPayTime, this.$constant.DATE_PATTERN.DATE) : ''
  845. item.remindTime = item.remindTime ? this.$common.transDate(item.remindTime, this.$constant.DATE_PATTERN.DATE) : ''
  846. item.statusName = item.status === '2' ? '已付款' : '待付款'
  847. item.applyBy = this.UserMap[item.applyBy]
  848. return item
  849. },
  850. setSelectRow(selection) {
  851. if (selection.length > 1) {
  852. const del_row = selection.shift()
  853. this.$refs.payDetailTable.toggleRowSelection(del_row, false)
  854. }
  855. if (selection.length) {
  856. this.formData.payName = selection[0].payName
  857. this.formData.payMoney = selection[0].payAmount
  858. this.formData.outOrderPayId = selection[0].id
  859. } else {
  860. this.formData.payName = ''
  861. this.formData.payMoney = ''
  862. this.formData.outOrderPayId =''
  863. }
  864. this.formData = JSON.parse(JSON.stringify(this.formData))
  865. },
  866. selectAll() {
  867. this.$message.warning('该列表只能单选')
  868. this.$refs.payDetailTable.clearSelection()
  869. },
  870. // /webServer/OutOrderMainController/list
  871. async getOutOrderList() {
  872. // 获取采购订单号下拉数据
  873. const postData = {
  874. shouldAmount: 0
  875. }
  876. const { data } = await this.baseRequest1('OutOrderMainController', 'listAllVo', postData)
  877. this.OutOrderList = data
  878. },
  879. baseRequest1(prefix, opUrl, postData) {
  880. return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
  881. },
  882. async confirmSubmit() {
  883. this.$refs.elformData.validate(async(valid) => {
  884. if (valid) {
  885. if (this.shouldAmount === 0) {
  886. this.$message.error('采购订单结余为0,不能提交!')
  887. return
  888. }
  889. if (this.shouldAmount < this.formData.payMoney) {
  890. this.$message.error('付款已大于采购订单结余,不能提交!')
  891. return
  892. }
  893. if (this.formData.fileUrlList.length > 0) {
  894. this.formData.fileDataIds = this.formData.fileUrlList.map((e) => {
  895. return e.data
  896. }).toString()
  897. }
  898. const formData = { ...this.formData }
  899. delete formData.fileUrlList
  900. this.buttonLoading = true
  901. const { data } = await this.baseRequest1(
  902. 'ApplyPaymentController',
  903. 'addApplyPayment',
  904. { ...formData })
  905. this.buttonLoading = false
  906. if (data.code == 200) {
  907. this.$message.success('流程已发起')
  908. this.dialogVisible = false
  909. this.$refs.elformData.clearValidate()
  910. this.$emit('getData')
  911. }
  912. //
  913. } else {
  914. }
  915. })
  916. },
  917. setVisible(status, data) {
  918. this.dialogVisible = status
  919. if (this.$refs.elformData) {
  920. this.$refs.elformData.clearValidate()
  921. }
  922. },
  923. basePayDetailRequest(opUrl, postData) {
  924. return this.$channel.globleRequest('OutOrderPayController', opUrl, postData, 'project')
  925. }
  926. }
  927. }
  928. </script>
  929. <style lang="scss">
  930. #containerPay1 {
  931. width: 100%;
  932. height: 600px;
  933. background: #F5F5F5;
  934. }
  935. .mb25 {
  936. margin-bottom: 25px;
  937. }
  938. .pdtopbottom16 {
  939. padding: 0px 16px;
  940. }
  941. .pdtop16px {
  942. padding-top: 16px;
  943. }
  944. .elformdom {
  945. label {
  946. text-align: right;
  947. font-size: 16px;
  948. font-family: 微软雅黑;
  949. padding-right: 10px;
  950. line-height: 40px;
  951. word-break: keep-all;
  952. white-space: nowrap;
  953. -webkit-font-smoothing: antialiased;
  954. color: #303133;
  955. text-rendering: optimizeLegibility;
  956. font-weight: 400;
  957. }
  958. .el-radio {
  959. height: 15px;
  960. margin-top: -19px;
  961. }
  962. }
  963. .payform {
  964. .el-form-item__label {
  965. text-align: right;
  966. font-size: 16px;
  967. font-family: 微软雅黑;
  968. padding-right: 10px;
  969. line-height: 40px;
  970. word-break: keep-all;
  971. white-space: nowrap;
  972. font-weight: 400;
  973. }
  974. }
  975. .tabsdom {
  976. .el-tabs__header {
  977. text-align: center !important;
  978. width: 139px !important;
  979. text-align: center !important;
  980. display: block !important;
  981. margin: auto !important;
  982. margin-bottom: 15px !important;
  983. }
  984. .el-tabs__nav-wrap::after {
  985. display: none;
  986. }
  987. }
  988. .cost_form {
  989. .col-input {
  990. font-weight: 400;
  991. }
  992. .el-form-item__label {
  993. text-align: right;
  994. font-size: 16px;
  995. font-family: 微软雅黑;
  996. padding-right: 10px;
  997. line-height: 40px;
  998. word-break: keep-all;
  999. white-space: nowrap;
  1000. color: #606266;
  1001. text-rendering: optimizeLegibility;
  1002. font-weight: 400;
  1003. }
  1004. .el-form-item__label .moneydetails {
  1005. text-align: right;
  1006. font-size: 16px;
  1007. font-family: 微软雅黑;
  1008. padding-right: 10px;
  1009. line-height: 40px;
  1010. word-break: keep-all;
  1011. white-space: nowrap;
  1012. color: #606266;
  1013. text-rendering: optimizeLegibility;
  1014. font-weight: 400;
  1015. }
  1016. }
  1017. </style>