index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. <template>
  2. <zj-form-container>
  3. <!-- 支付费用-安装 -->
  4. <zj-form-module v-if="~[1, 2, 3, 4].indexOf(this.orderType)" title="支付费用">
  5. <zj-table
  6. ref="tableEl"
  7. :is-drop="true"
  8. :columns="paymentColumns"
  9. :table-data="paymentData"
  10. :table-attributes="{
  11. border: true
  12. }"
  13. />
  14. <el-dialog
  15. :modal="true"
  16. title="服务支付工单(商品详情)"
  17. :visible.sync="installDialog"
  18. width="60%"
  19. :show-close="true"
  20. :close-on-click-modal="false"
  21. :modal-append-to-body="false"
  22. >
  23. <zj-table
  24. ref="tableEl"
  25. :is-drop="true"
  26. :columns="installColumns"
  27. :table-data="installTableData"
  28. :table-attributes="{
  29. border: true
  30. }"
  31. />
  32. </el-dialog>
  33. </zj-form-module>
  34. <!-- 支付费用-维修/移机 -->
  35. <zj-form-module v-else title="支付费用">
  36. <div class="ZF_header">维修费用信息</div>
  37. <el-descriptions class="margin-top" :column="3" :border="true" :label-style="{ width: '140px' }">
  38. <!-- <el-descriptions-item>
  39. <template slot="label"> 网点名称 </template>
  40. {{ info.websitName }}
  41. </el-descriptions-item>
  42. <el-descriptions-item>
  43. <template slot="label"> 工单号 </template>
  44. {{ info.orderBaseId }}
  45. </el-descriptions-item> -->
  46. <el-descriptions-item>
  47. <template slot="label"> 流水号 </template>
  48. {{ info.orderPayStreamWaterId }}
  49. </el-descriptions-item>
  50. <el-descriptions-item>
  51. <template slot="label"> 操作者名称 </template>
  52. {{ info.updateBy }}
  53. </el-descriptions-item>
  54. <el-descriptions-item>
  55. <template slot="label"> 操作者编号 </template>
  56. {{ info.insureName }}
  57. </el-descriptions-item>
  58. <el-descriptions-item>
  59. <template slot="label"> 支付方式 </template>
  60. 微信支付
  61. </el-descriptions-item>
  62. <el-descriptions-item>
  63. <template slot="label"> 客户名称 </template>
  64. {{ info.customerName }}
  65. </el-descriptions-item>
  66. <el-descriptions-item>
  67. <template slot="label"> 电话号码 </template>
  68. {{ info.customerMobile }}
  69. </el-descriptions-item>
  70. <el-descriptions-item>
  71. <template slot="label"> 支付状态 </template>
  72. {{ info.isPay === 'YES' ? '是' : '否' }}
  73. </el-descriptions-item>
  74. <el-descriptions-item>
  75. <template slot="label"> 支付总金额 </template>
  76. {{ info.payValue }}
  77. </el-descriptions-item>
  78. <el-descriptions-item>
  79. <template slot="label"> 总手续费 </template>
  80. {{ (info.chargeValue || 0) * (info.qty || 0) }}
  81. </el-descriptions-item>
  82. <el-descriptions-item>
  83. <template slot="label"> 支付时间 </template>
  84. {{ info.payTime }}
  85. </el-descriptions-item>
  86. <el-descriptions-item v-if="~[6].indexOf(this.orderType)">
  87. <template slot="label"> 移机类型 </template>
  88. {{ info.insureName }}
  89. </el-descriptions-item>
  90. <el-descriptions-item>
  91. <template v-if="~[6].indexOf(this.orderType)" slot="label"> 匹数 </template>
  92. {{ info.insureName }}
  93. </el-descriptions-item>
  94. </el-descriptions>
  95. <br>
  96. <div class="ZF_header">支付明细</div>
  97. <zj-table
  98. ref="tableEl"
  99. :is-drop="true"
  100. :columns="repairPaymentColumns"
  101. :table-data="repairPaymentData"
  102. :table-attributes="{
  103. border: true
  104. }"
  105. />
  106. <!-- -->
  107. <!-- <zj-table
  108. v-if="~[6].indexOf(this.orderType)"
  109. ref="tableEl"
  110. :is-drop="true"
  111. :columns="washPaymentColumns"
  112. :table-data="washPaymentData"
  113. :table-attributes="{
  114. border: true
  115. }"
  116. /> -->
  117. <br>
  118. <el-descriptions class="margin-top" :column="1" :border="false" :label-style="{ width: '140px' }">
  119. <el-descriptions-item>
  120. <template slot="label"> 收费单据 </template>
  121. <div v-if="info.fileUrl.length > 0">
  122. <el-image
  123. v-for="v in info.fileUrl"
  124. :key="v.fileUrl"
  125. style="width: 210px; height: 130px; margin-right: 10px"
  126. :src="$imageUrl + v.fileUrl"
  127. :preview-src-list="[$imageUrl + v.fileUrl]"
  128. >
  129. <div slot="error" style="height: 100%; display: flex; justify-content: center; align-items: center">
  130. <i>暂无图片</i>
  131. </div>
  132. </el-image>
  133. </div>
  134. </el-descriptions-item>
  135. <el-descriptions-item>
  136. <template slot="label"> 备注 </template>
  137. <el-input v-model="info.remark" type="textarea" disabled />
  138. </el-descriptions-item>
  139. </el-descriptions>
  140. <el-descriptions
  141. v-if="~[6].indexOf(this.orderType)"
  142. class="margin-top"
  143. :column="2"
  144. :border="false"
  145. :label-style="{ width: '140px' }"
  146. >
  147. <el-descriptions-item>
  148. <template slot="label"> 支付状态 </template>
  149. {{ info.isPay === 'YES'? '是':'否'}}
  150. </el-descriptions-item>
  151. <el-descriptions-item>
  152. <template slot="label"> 支付时间 </template>
  153. {{ info.payTime }}
  154. </el-descriptions-item>
  155. <el-descriptions-item>
  156. <template slot="label"> 商户交易号 </template>
  157. {{ info.outTradeNo }}
  158. </el-descriptions-item>
  159. <el-descriptions-item>
  160. <template slot="label"> 第三方交易号 </template>
  161. {{ info.transactionId }}
  162. </el-descriptions-item>
  163. </el-descriptions>
  164. <br>
  165. <div class="ZF_header">交易记录</div>
  166. <zj-table
  167. ref="tableEl"
  168. :is-drop="true"
  169. :columns="repairBusinessColumns"
  170. :table-data="repairBusinessData"
  171. :table-attributes="{
  172. border: true
  173. }"
  174. />
  175. </zj-form-module>
  176. </zj-form-container>
  177. </template>
  178. <script>
  179. // import { getOrderPayOutlayList, getOrderPayOutlayFileList, getOrderPayOutlayDetail } from '@/api/detailModule'
  180. export default {
  181. data() {
  182. return {
  183. installDialog: false,
  184. installTableData: [],
  185. info: {
  186. websitName: '',
  187. orderBaseId: '',
  188. updateBy: '',
  189. updateByNumber: '',
  190. customerName: '',
  191. customerMobile: '',
  192. payValue: '',
  193. chargeValue: '',
  194. remark: '',
  195. payTime: '',
  196. // websitName:'',
  197. // websitName:'',
  198. // websitName:'',
  199. // websitName:'',
  200. fileUrl: [],
  201. qty: ''
  202. },
  203. paymentData: [],
  204. repairPaymentData: [],
  205. repairBusinessData: [],
  206. washPaymentData: [],
  207. orderType: ''
  208. }
  209. },
  210. computed: {
  211. paymentColumns() {
  212. return [
  213. // {
  214. // columnAttributes: {
  215. // label: 'ID',
  216. // prop: 'orderBaseId',
  217. // width: 200
  218. // }
  219. // },
  220. {
  221. columnAttributes: {
  222. label: '辅材单号',
  223. prop: 'outTradeNo',
  224. width: 200
  225. }
  226. },
  227. {
  228. columnAttributes: {
  229. label: '支付商户单号',
  230. prop: 'outTradeNo',
  231. width: 200
  232. }
  233. },
  234. {
  235. columnAttributes: {
  236. label: '操作网点',
  237. prop: 'websitName'
  238. }
  239. },
  240. {
  241. columnAttributes: {
  242. label: '操作人',
  243. prop: 'createBy'
  244. }
  245. },
  246. // {
  247. // columnAttributes: {
  248. // label: '是否被删除',
  249. // prop: 'flag'
  250. // }
  251. // },
  252. {
  253. columnAttributes: {
  254. label: '支付状态',
  255. prop: 'isPay'
  256. },
  257. render: (h, { row, column, $index }) => {
  258. return (
  259. <div style='padding-left:6px'>{row.isPay == 'YES' ? '已支付' : row.isPay == 'NO' ? '未支付' : ''}</div>
  260. )
  261. }
  262. },
  263. {
  264. columnAttributes: {
  265. label: '支付时间',
  266. prop: 'payTime'
  267. }
  268. },
  269. {
  270. columnAttributes: {
  271. label: '金额',
  272. prop: 'payValue'
  273. }
  274. },
  275. {
  276. columnAttributes: {
  277. label: '商品详情',
  278. prop: 'brandName'
  279. },
  280. render: (h, { row, column, $index }) => {
  281. return (
  282. <div style=''>
  283. {' '}
  284. <el-button
  285. size='mini'
  286. type='text'
  287. onClick={async() => {
  288. this.installDialog = true
  289. this.getOrderPayOutlayDetail(row.orderBaseId, row.orderPayRecordId, 'INSTALL')
  290. }}
  291. >
  292. 查看详情
  293. </el-button>
  294. </div>
  295. )
  296. }
  297. },
  298. {
  299. columnAttributes: {
  300. label: '备注',
  301. prop: 'remark'
  302. }
  303. }
  304. ]
  305. },
  306. installColumns() {
  307. return [
  308. {
  309. columnAttributes: {
  310. label: '商品ID',
  311. prop: 'orderBaseId',
  312. width: 200
  313. }
  314. },
  315. {
  316. columnAttributes: {
  317. label: '商品名称',
  318. prop: 'goodsName'
  319. }
  320. },
  321. {
  322. columnAttributes: {
  323. label: '数量',
  324. prop: 'qty'
  325. }
  326. },
  327. {
  328. columnAttributes: {
  329. label: '单价',
  330. prop: 'price'
  331. }
  332. },
  333. {
  334. columnAttributes: {
  335. label: '小计',
  336. prop: 'totalAmount'
  337. }
  338. }
  339. ]
  340. },
  341. repairPaymentColumns() {
  342. return [
  343. {
  344. columnAttributes: {
  345. label: '费用项目',
  346. prop: 'goodsName'
  347. }
  348. },
  349. {
  350. columnAttributes: {
  351. label: '收取费用',
  352. prop: 'totalAmount'
  353. }
  354. },
  355. {
  356. columnAttributes: {
  357. label: '手续费',
  358. prop: 'chargeValue'
  359. }
  360. },
  361. {
  362. columnAttributes: {
  363. label: '单价',
  364. prop: 'price'
  365. }
  366. },
  367. {
  368. columnAttributes: {
  369. label: '数量',
  370. prop: 'qty'
  371. }
  372. },
  373. {
  374. columnAttributes: {
  375. label: '总手续费',
  376. prop: ''
  377. },
  378. render: (h, { row, column, $index }) => {
  379. return (
  380. <div>{+row.chargeValue * +row.qty}</div>
  381. )
  382. }
  383. },
  384. ]
  385. },
  386. repairBusinessColumns() {
  387. return [
  388. // {
  389. // columnAttributes: {
  390. // label: 'ID',
  391. // prop: 'orderBaseId'
  392. // }
  393. // },
  394. {
  395. columnAttributes: {
  396. label: '交易类型',
  397. prop: 'tradeType'
  398. }
  399. },
  400. {
  401. columnAttributes: {
  402. label: '交易金额',
  403. prop: 'payValue'
  404. }
  405. },
  406. {
  407. columnAttributes: {
  408. label: '原工单流水',
  409. prop: 'payValue'
  410. }
  411. },
  412. {
  413. columnAttributes: {
  414. label: '商户交易号',
  415. prop: 'outTradeNo'
  416. }
  417. },
  418. {
  419. columnAttributes: {
  420. label: '第三方交易号',
  421. prop: 'transactionId'
  422. }
  423. },
  424. {
  425. columnAttributes: {
  426. label: '交易状态',
  427. prop: 'isPay'
  428. },
  429. render: (h, { row, column, $index }) => {
  430. return (
  431. <div style='padding-left:6px'>{row.isPay == 'YES' ? '已支付' : row.isPay == 'NO' ? '未支付' : ''}</div>
  432. )
  433. }
  434. },
  435. {
  436. columnAttributes: {
  437. label: '交易时间',
  438. prop: 'payTime'
  439. }
  440. },
  441. {
  442. columnAttributes: {
  443. label: '创建时间',
  444. prop: 'createTime'
  445. }
  446. }
  447. // {
  448. // columnAttributes: {
  449. // label: '操作',
  450. // prop: 'brandName'
  451. // },
  452. // render: (h, { row, column, $index }) => {
  453. // return (
  454. // <div style="">
  455. // <el-button
  456. // size="mini"
  457. // type="text"
  458. // onClick={async () => {
  459. // this.installDialog = true
  460. // this.getOrderPayOutlayDetail(row.orderBaseId, row.outTradeNo, 'REPAIR')
  461. // this.getOrderPayOutlayFileList(row.orderBaseId, row.outTradeNo)
  462. // }}
  463. // >
  464. // 查看详情
  465. // </el-button>
  466. // </div>
  467. // )
  468. // }
  469. // }
  470. ]
  471. },
  472. washPaymentColumns() {
  473. return [
  474. {
  475. columnAttributes: {
  476. label: '清洗费用名称',
  477. prop: 'goodsName'
  478. }
  479. },
  480. {
  481. columnAttributes: {
  482. label: '单价',
  483. prop: 'price'
  484. }
  485. },
  486. {
  487. columnAttributes: {
  488. label: '数量',
  489. prop: 'qty'
  490. }
  491. },
  492. // {
  493. // columnAttributes: {
  494. // label: '单位',
  495. // prop: 'brandName'
  496. // }
  497. // },
  498. {
  499. columnAttributes: {
  500. label: '收取总费用',
  501. prop: 'totalAmount'
  502. }
  503. },
  504. {
  505. columnAttributes: {
  506. label: '清洗手续费',
  507. prop: 'chargeValue'
  508. }
  509. }
  510. ]
  511. }
  512. },
  513. methods: {
  514. init(id, params, orderType) {
  515. this.orderType = orderType
  516. this.getOrderPayOutlayList(id)
  517. },
  518. getOrderPayOutlayList(id, type) {
  519. getOrderPayOutlayList({ orderBaseId: id }).then(res => {
  520. if (~[1, 2, 3, 4].indexOf(this.orderType)) {
  521. this.paymentData = res.data.filter(k => k.isPay === 'YES')
  522. } else {
  523. this.repairBusinessData = res.data.filter(k => k.isPay === 'YES')
  524. if (this.repairBusinessData && this.repairBusinessData.length) {
  525. this.info.websitName = this.repairBusinessData[0].websitName
  526. this.info.orderBaseId = this.repairBusinessData[0].orderBaseId
  527. this.info.updateBy = this.repairBusinessData[0].updateBy
  528. this.info.updateByNumber = this.repairBusinessData[0].updateByNumber
  529. this.info.customerName = this.repairBusinessData[0].customerName
  530. this.info.customerMobile = this.repairBusinessData[0].customerMobile
  531. this.info.payValue = this.repairBusinessData[0].payValue
  532. this.info.payTime = this.repairBusinessData[0].payTime
  533. this.info.chargeValue = this.repairBusinessData[0].chargeValue
  534. this.info.qty = this.repairBusinessData[0].qty
  535. this.info.remark = this.repairBusinessData[0].remark
  536. this.info.isPay = this.repairBusinessData[0].isPay
  537. this.info.outTradeNo = this.repairBusinessData[0].outTradeNo
  538. this.info.transactionId = this.repairBusinessData[0].transactionId
  539. this.getOrderPayOutlayDetail(id, this.repairBusinessData[0].orderPayRecordId)
  540. this.getOrderPayOutlayFileList(id, this.repairBusinessData[0].outTradeNo)
  541. }
  542. }
  543. })
  544. },
  545. getOrderPayOutlayFileList(orderBaseId, outTradeNo) {
  546. getOrderPayOutlayFileList({ orderBaseId, outTradeNo }).then(res => {
  547. if (~[6].indexOf(this.orderType)) {
  548. this.info.fileUrl = res.data ? res.data : []
  549. } else {
  550. this.info.fileUrl = res.data ? [res.data[0].fileUrl] : ''
  551. }
  552. })
  553. },
  554. getOrderPayOutlayDetail(orderBaseId, orderPayRecordId, type) {
  555. // {/* INSTALL=安装单 REPAIR=维修单*/}
  556. getOrderPayOutlayDetail({ orderPayRecordId }).then(res => {
  557. if (~[1, 2, 3, 4].indexOf(this.orderType)) {
  558. this.installTableData = res.data
  559. } else {
  560. this.repairPaymentData = res.data
  561. }
  562. })
  563. }
  564. }
  565. }
  566. </script>
  567. <style lang="scss" scoped>
  568. .ZF_header {
  569. font-size: 14px;
  570. margin: 0px 0 8px;
  571. }
  572. </style>
  573. .