index.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. <template>
  2. <zj-page-container>
  3. <zj-page-fill class="neibuview">
  4. <template v-if="payData.length">
  5. <zj-form-container>
  6. <template v-for="(item, index) in payData">
  7. <zj-form-module
  8. :key="index"
  9. :title="`支付费用${index + 1} 【支付订单号:${item.orderId}】`"
  10. :form-data="payData[index]"
  11. :form-items="
  12. [formItemsL1, formItems(item)][!!~[1, 2, 3].indexOf(workOrderType) ? 0 : workOrderType == 4 ? 1 : 0]
  13. "
  14. >
  15. <div v-if="item.examineStatus === 'FAIL'" style="text-align: right">
  16. <el-button size="mini" type="danger" plain @click="enginMaterialCancelFun(item)">取消申请</el-button>
  17. </div>
  18. </zj-form-module>
  19. </template>
  20. </zj-form-container>
  21. </template>
  22. <el-empty v-else description="暂时没有支付信息"></el-empty>
  23. </zj-page-fill>
  24. </zj-page-container>
  25. </template>
  26. <script>
  27. import { listPageV2 } from '@/api/workOrder/appraise'
  28. import { tableDataParsing } from '@/utils/common.js'
  29. import { changeOrderGetOrderList, enginMaterialDetailWorker, enginMaterialCancel } from '@/api/workOrderPool.js'
  30. import { orderBaseDetail } from '@/api/workOrderPool.js'
  31. import { number } from 'echarts'
  32. export default {
  33. props: {
  34. id: {
  35. type: [String, Number],
  36. default: null
  37. },
  38. workOrderType: {
  39. type: Number,
  40. default: 1 // 1普通工单, 4维保工单
  41. }
  42. },
  43. data() {
  44. return {
  45. payData: [],
  46. orderBaseDetail: {}
  47. }
  48. },
  49. watch: {
  50. id: {
  51. handler(newVal, oldVal) {
  52. this.getxiangqing()
  53. },
  54. deep: true,
  55. immediate: true
  56. }
  57. },
  58. computed: {
  59. formItemsL1() {
  60. return [
  61. {
  62. md: 24,
  63. name: 'slot-component',
  64. formItemAttributes: {
  65. label: '费用信息'
  66. },
  67. render: (h, { props, onInput }) => {
  68. var { formData } = props
  69. return (
  70. <el-descriptions
  71. border
  72. title=""
  73. column={3}
  74. colon={false}
  75. labelStyle={{ width: '11%' }}
  76. contentStyle={{ width: '22.3%' }}
  77. >
  78. <el-descriptions-item label="网点名称">{formData.websitName}</el-descriptions-item>
  79. <el-descriptions-item label="工单号">{formData.workerOrderId}</el-descriptions-item>
  80. <el-descriptions-item label="工程师编号">
  81. {formData.workerNumber || formData.workerId}
  82. </el-descriptions-item>
  83. <el-descriptions-item label="工程师名称">{formData.workerName}</el-descriptions-item>
  84. <el-descriptions-item label="工程师电话">{formData.workerMobile}</el-descriptions-item>
  85. <el-descriptions-item label="支付方式">
  86. {{ WECHAT: '微信支付', LINE: '线下支付', EXAMINE: '审批' }[formData.payType] || '微信支付'}
  87. </el-descriptions-item>
  88. <el-descriptions-item label="客户名称">{formData.pgOrderBase.userName}</el-descriptions-item>
  89. <el-descriptions-item label="电话号码">{formData.userMobile}</el-descriptions-item>
  90. <el-descriptions-item label="支付状态">
  91. {{ CANCEL: '取消', WAIT: '待支付', PAID: '已支付' }[formData.payStatus]}
  92. </el-descriptions-item>
  93. <el-descriptions-item label="支付总金额">{this.toFixed(formData.totalAmount)}</el-descriptions-item>
  94. {!!~[1, 2, 3].indexOf(this?.workOrderType) ? (
  95. <el-descriptions-item label="总手续费">{formData.commissionAmount}</el-descriptions-item>
  96. ) : null}
  97. <el-descriptions-item label="支付时间">{formData.payTime}</el-descriptions-item>
  98. <el-descriptions-item label="分账状态">
  99. {{ WAIT: '待结算', OK: '完成', YC: '异常结算', LINE: '线下结算' }[formData.settlementStatus]}
  100. </el-descriptions-item>
  101. {this?.workOrderType == 4
  102. ? [
  103. <el-descriptions-item label=""></el-descriptions-item>,
  104. <el-descriptions-item label="审批状态">
  105. {{ WAIT: '待审', OK: '审批', FAIL: '驳回', NO: '取消' }[formData.examineStatus] || ''}
  106. </el-descriptions-item>,
  107. <el-descriptions-item label="审批人">{formData.examineName}</el-descriptions-item>,
  108. <el-descriptions-item label="审批时间">{formData.examineTime}</el-descriptions-item>
  109. ]
  110. : null}
  111. </el-descriptions>
  112. )
  113. }
  114. },
  115. {
  116. md: 24,
  117. name: 'slot-component',
  118. formItemAttributes: {
  119. label: '支付明细'
  120. },
  121. render: (h, { props, onInput }) => {
  122. var { formData } = props
  123. return (
  124. <zj-table
  125. columns={[
  126. {
  127. columnAttributes: {
  128. label: '费用名称',
  129. prop: 'goodsName'
  130. }
  131. },
  132. {
  133. columnAttributes: {
  134. label: '单价',
  135. prop: 'goodsAmount'
  136. },
  137. render: (h, { row, column }) => {
  138. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  139. }
  140. },
  141. {
  142. columnAttributes: {
  143. label: '数量',
  144. prop: 'num'
  145. }
  146. },
  147. {
  148. columnAttributes: {
  149. label: '费用金额',
  150. prop: 'totalAmount'
  151. },
  152. render: (h, { row, column }) => {
  153. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  154. }
  155. },
  156. ...(() => {
  157. if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
  158. return [
  159. {
  160. columnAttributes: {
  161. label: '师傅分账金额',
  162. prop: 'workerAmount'
  163. },
  164. render: (h, { row, column }) => {
  165. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  166. }
  167. },
  168. {
  169. columnAttributes: {
  170. label: '师傅手续费',
  171. prop: 'workerProceAmount'
  172. },
  173. render: (h, { row, column }) => {
  174. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  175. }
  176. },
  177. {
  178. columnAttributes: {
  179. label: '网点分账金额',
  180. prop: 'websitAmount'
  181. },
  182. render: (h, { row, column }) => {
  183. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  184. }
  185. },
  186. {
  187. columnAttributes: {
  188. label: '网点手续费',
  189. prop: 'websitProceAmount'
  190. },
  191. render: (h, { row, column }) => {
  192. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  193. }
  194. }
  195. ]
  196. }
  197. return []
  198. })()
  199. ]}
  200. table-data={
  201. [formData.workerOrderItems, formData.rpMaterialOrderItems][
  202. !!~[1, 2, 3].indexOf(this?.workOrderType) ? 0 : this?.workOrderType == 4 ? 1 : 0
  203. ]
  204. }
  205. />
  206. )
  207. }
  208. },
  209. {
  210. name: 'el-input',
  211. md: 24,
  212. attributes: { disabled: true, type: 'textarea', placeholder: '' },
  213. formItemAttributes: { label: '备注', prop: 'remark' }
  214. },
  215. {
  216. md: 24,
  217. name: 'slot-component',
  218. formItemAttributes: {
  219. label: '交易记录'
  220. },
  221. render: (h, { props, onInput }) => {
  222. var { formData } = props
  223. return (
  224. <zj-table
  225. columns={[
  226. {
  227. columnAttributes: {
  228. label: 'id',
  229. prop: 'orderId'
  230. }
  231. },
  232. {
  233. columnAttributes: {
  234. label: '交易类型',
  235. prop: 'goodsType'
  236. },
  237. render: (h, { row }) => {
  238. return <div>{{ M: '辅材', P: '配件' }[row.goodsType]}</div>
  239. }
  240. },
  241. {
  242. columnAttributes: {
  243. label: '交易金额',
  244. prop: 'totalAmount'
  245. },
  246. render: (h, { row, column }) => {
  247. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  248. }
  249. },
  250. {
  251. columnAttributes: {
  252. label: '交易状态',
  253. prop: 'payStatus'
  254. },
  255. render: (h, { row }) => {
  256. return <div>{{ CANCEL: '取消', WAIT: '待支付', PAID: '已支付' }[row.payStatus]}</div>
  257. }
  258. },
  259. {
  260. columnAttributes: {
  261. label: '交易时间',
  262. prop: 'payTime'
  263. }
  264. },
  265. {
  266. columnAttributes: {
  267. label: '创建时间',
  268. prop: 'createTime'
  269. }
  270. }
  271. ]}
  272. table-data={[formData]}
  273. />
  274. )
  275. }
  276. },
  277. {
  278. isShow: this.orderBaseDetail.orderType == 'REPAIR',
  279. md: 24,
  280. name: 'slot-component',
  281. formItemAttributes: {
  282. label: '配件信息'
  283. },
  284. render: (h, { props, onInput }) => {
  285. var { formData } = props
  286. return (
  287. <zj-table
  288. columns={[
  289. {
  290. columnAttributes: {
  291. label: '维修标识',
  292. prop: 'repairFlag'
  293. },
  294. render: (h, { row }) => {
  295. return <div>{{ INNER: '保内', OUTSIDE: '保外' }[row.repairFlag]}</div>
  296. }
  297. },
  298. {
  299. columnAttributes: {
  300. label: '旧配件编号',
  301. prop: 'oldPartsNumber'
  302. }
  303. },
  304. {
  305. columnAttributes: {
  306. label: '旧配件名称',
  307. prop: 'oldPartsName'
  308. }
  309. },
  310. {
  311. columnAttributes: {
  312. label: '新配件编号',
  313. prop: 'goodsCode'
  314. }
  315. },
  316. {
  317. columnAttributes: {
  318. label: '新配件名称',
  319. prop: 'goodsName'
  320. }
  321. }
  322. ]}
  323. table-data={formData.workerOrderItems || []}
  324. />
  325. )
  326. }
  327. },
  328. {
  329. md: 24,
  330. name: 'slot-component',
  331. formItemAttributes: {
  332. label: '其它费用表',
  333. 'label-width': '90px'
  334. },
  335. render: (h, { props, onInput }) => {
  336. var { formData } = props
  337. return (
  338. <zj-table
  339. columns={[
  340. {
  341. columnAttributes: {
  342. label: '费用名称',
  343. prop: 'amountName'
  344. },
  345. render: (h, { row, column }) => {
  346. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  347. }
  348. },
  349. {
  350. columnAttributes: {
  351. label: '费用金额',
  352. prop: 'normAmount'
  353. },
  354. render: (h, { row, column }) => {
  355. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  356. }
  357. },
  358. {
  359. columnAttributes: {
  360. label: '师傅分账金额',
  361. prop: 'sffzje'
  362. },
  363. render: (h, { row, column }) => {
  364. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  365. }
  366. },
  367. {
  368. columnAttributes: {
  369. label: '师傅手续费',
  370. prop: 'sfsxf'
  371. },
  372. render: (h, { row, column }) => {
  373. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  374. }
  375. }
  376. ]}
  377. table-data={formData.gengduofeiyong || []}
  378. />
  379. )
  380. }
  381. }
  382. ]
  383. }
  384. },
  385. methods: {
  386. formItems(itemData) {
  387. return [
  388. {
  389. md: 24,
  390. name: 'slot-component',
  391. formItemAttributes: {
  392. label: '基本信息'
  393. },
  394. render: (h, { props, onInput }) => {
  395. var { formData } = props
  396. return (
  397. <el-descriptions
  398. border
  399. title=""
  400. column={2}
  401. colon={false}
  402. labelStyle={{ width: '13%' }}
  403. contentStyle={{ width: '37%' }}
  404. >
  405. <el-descriptions-item label="申请单号">{formData.orderId}</el-descriptions-item>
  406. <el-descriptions-item label="项目名称">{formData.rpProjectRepairName}</el-descriptions-item>
  407. <el-descriptions-item label="工单单号">{formData.workerOrderId}</el-descriptions-item>
  408. <el-descriptions-item label="负责人">{formData.userName}</el-descriptions-item>
  409. <el-descriptions-item label="联系电话">{formData.userMobile}</el-descriptions-item>
  410. <el-descriptions-item label="项目地址">{formData.pgOrderBase.address}</el-descriptions-item>
  411. <el-descriptions-item label="创单人">{formData.pgOrderBase.createBy}</el-descriptions-item>
  412. <el-descriptions-item label="创单人电话">{formData.pgOrderBase.createMobile}</el-descriptions-item>
  413. <el-descriptions-item label="创单时间">{formData.pgOrderBase.createTime}</el-descriptions-item>
  414. <el-descriptions-item label="工单类型">{formData.orderSmallTypeText}</el-descriptions-item>
  415. <el-descriptions-item label="网点名称">{formData.websitName}</el-descriptions-item>
  416. <el-descriptions-item label="申请人">{formData.workerName}</el-descriptions-item>
  417. <el-descriptions-item label="联系电话">{formData.workerMobile}</el-descriptions-item>
  418. <el-descriptions-item label="申请时间">{formData.createTime}</el-descriptions-item>
  419. <el-descriptions-item label="包含全部费用">
  420. {{ YES: '是', NO: '否' }[formData.isAllFee]}
  421. </el-descriptions-item>
  422. {formData.isAllFee == 'NO' || formData.payType == 'WECHAT' || formData.payType == 'LINE' ? (
  423. <el-descriptions-item label="费用支付方式">
  424. {{ EXAMINE: '审批后结算', SITE: '现场支付' }[formData.feePayMethod]}
  425. </el-descriptions-item>
  426. ) : null}
  427. {(formData.isAllFee == 'NO' || formData.payType == 'WECHAT') && formData.feePayMethod == 'EXAMINE'
  428. ? [
  429. <el-descriptions-item label="费用单状态">
  430. {
  431. { WAIT: '待审', OK: '通过', FAIL: '驳回', PAID: '现场支付', NO: '取消', NO_PAID: '未支付' }[
  432. formData.examineStatus
  433. ]
  434. }
  435. </el-descriptions-item>,
  436. <el-descriptions-item label="审批人">{formData.examineName}</el-descriptions-item>,
  437. <el-descriptions-item label="审批时间">{formData.examineTime}</el-descriptions-item>,
  438. <el-descriptions-item label="取消人">{formData.cancelName}</el-descriptions-item>,
  439. <el-descriptions-item label="取消时间">{formData.cancelTime}</el-descriptions-item>
  440. ]
  441. : null}
  442. {formData.payType == 'LINE' && formData.feePayMethod == 'EXAMINE'
  443. ? [
  444. <el-descriptions-item label="结算状态">
  445. {{ WAIT: '待结算', OVER: '已结算' }[formData.status]}
  446. </el-descriptions-item>,
  447. <el-descriptions-item label="结算人">{formData.settleName}</el-descriptions-item>,
  448. <el-descriptions-item label="结算时间">{formData.settleTime}</el-descriptions-item>
  449. ]
  450. : null}
  451. </el-descriptions>
  452. )
  453. }
  454. },
  455. {
  456. md: 24,
  457. name: 'slot-component',
  458. formItemAttributes: {
  459. label: '费用明细'
  460. },
  461. render: (h, { props, onInput }) => {
  462. var { formData } = props
  463. return (
  464. <zj-table
  465. columns={[
  466. {
  467. columnAttributes: {
  468. label: '费用名称',
  469. prop: 'goodsName'
  470. }
  471. },
  472. {
  473. columnAttributes: {
  474. label: '费用类型',
  475. prop: 'chargeType'
  476. },
  477. render: (h, { row, column, index }) => {
  478. return (
  479. <div style="padding-left:10px">
  480. {{ MCC: '辅材物料', ACC: '配件物料', SERV: '服务收费' }[row.chargeType]}
  481. </div>
  482. )
  483. }
  484. },
  485. {
  486. columnAttributes: {
  487. label: '单价',
  488. prop: 'goodsAmount'
  489. },
  490. render: (h, { row, column }) => {
  491. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  492. }
  493. },
  494. {
  495. columnAttributes: {
  496. label: '数量',
  497. prop: 'num'
  498. }
  499. },
  500. {
  501. columnAttributes: {
  502. label: '费用金额',
  503. prop: 'totalAmount'
  504. },
  505. render: (h, { row, column }) => {
  506. return <div>{this.toFixed(row[column.columnAttributes.prop])}</div>
  507. }
  508. }
  509. ]}
  510. table-data={formData.rpMaterialOrderItems}
  511. />
  512. )
  513. }
  514. },
  515. {
  516. md: 8,
  517. isShow: itemData.goodsType == 'M',
  518. name: 'slot-component',
  519. formItemAttributes: {
  520. label: '辅材费用合计'
  521. },
  522. render: (h, { props, onInput }) => {
  523. var { formData } = props
  524. return (
  525. <span>
  526. {[
  527. 0,
  528. 0,
  529. 0,
  530. ...formData.rpMaterialOrderItems
  531. .filter(item => item.chargeType == 'MCC')
  532. .map(item => item.totalAmount)
  533. ]
  534. .reduce(function (prev, curr, idx, arr) {
  535. return prev + curr
  536. })
  537. .toFixed(2)}
  538. </span>
  539. )
  540. }
  541. },
  542. {
  543. md: 8,
  544. isShow: itemData.goodsType == 'P',
  545. name: 'slot-component',
  546. formItemAttributes: {
  547. label: '配件费用合计'
  548. },
  549. render: (h, { props, onInput }) => {
  550. var { formData } = props
  551. return (
  552. <span>
  553. {[
  554. 0,
  555. 0,
  556. 0,
  557. ...formData.rpMaterialOrderItems
  558. .filter(item => item.chargeType == 'ACC')
  559. .map(item => item.totalAmount)
  560. ]
  561. .reduce(function (prev, curr, idx, arr) {
  562. return prev + curr
  563. })
  564. .toFixed(2)}
  565. </span>
  566. )
  567. }
  568. },
  569. {
  570. md: 8,
  571. name: 'slot-component',
  572. formItemAttributes: {
  573. label: '服务收费费用合计'
  574. },
  575. render: (h, { props, onInput }) => {
  576. var { formData } = props
  577. return (
  578. <span>
  579. {[
  580. 0,
  581. 0,
  582. 0,
  583. ...formData.rpMaterialOrderItems
  584. .filter(item => item.chargeType == 'SERV')
  585. .map(item => item.totalAmount)
  586. ]
  587. .reduce(function (prev, curr, idx, arr) {
  588. return prev + curr
  589. })
  590. .toFixed(2)}
  591. </span>
  592. )
  593. }
  594. },
  595. {
  596. md: 8,
  597. name: 'slot-component',
  598. formItemAttributes: {
  599. label: '总金额'
  600. },
  601. render: (h, { props, onInput }) => {
  602. var { formData } = props
  603. return (
  604. <span>
  605. {[0, 0, 0, ...formData.rpMaterialOrderItems.map(item => item.totalAmount)]
  606. .reduce(function (prev, curr, idx, arr) {
  607. return prev + curr
  608. })
  609. .toFixed(2)}
  610. </span>
  611. )
  612. }
  613. },
  614. {
  615. name: 'el-input',
  616. md: 24,
  617. attributes: { disabled: true, type: 'textarea', placeholder: '' },
  618. formItemAttributes: { label: '申请备注', prop: 'remark' }
  619. },
  620. {
  621. md: 24,
  622. isShow: itemData.payType == 'WECHAT',
  623. name: 'slot-component',
  624. formItemAttributes: {
  625. label: '交易记录'
  626. },
  627. render: (h, { props, onInput }) => {
  628. var { formData } = props
  629. return (
  630. <zj-table
  631. columns={[
  632. {
  633. columnAttributes: {
  634. label: 'id',
  635. prop: 'orderId'
  636. }
  637. },
  638. {
  639. columnAttributes: {
  640. label: '交易类型',
  641. prop: 'goodsType'
  642. },
  643. render: (h, { row }) => {
  644. return <div>{{ M: '辅材', P: '配件' }[row.goodsType]}</div>
  645. }
  646. },
  647. {
  648. columnAttributes: {
  649. label: '交易金额',
  650. prop: 'totalAmount'
  651. }
  652. },
  653. {
  654. columnAttributes: {
  655. label: '交易状态',
  656. prop: 'payStatus'
  657. },
  658. render: (h, { row }) => {
  659. return <div>{{ CANCEL: '取消', WAIT: '待支付', PAID: '已支付' }[row.payStatus]}</div>
  660. }
  661. },
  662. {
  663. columnAttributes: {
  664. label: '交易时间',
  665. prop: 'payTime'
  666. }
  667. },
  668. {
  669. columnAttributes: {
  670. label: '创建时间',
  671. prop: 'createTime'
  672. }
  673. }
  674. ]}
  675. table-data={[formData]}
  676. />
  677. )
  678. }
  679. }
  680. ]
  681. },
  682. getxiangqing() {
  683. if (this.id) {
  684. orderBaseDetail({
  685. orderBaseId: this.id
  686. }).then(resData => {
  687. this.orderBaseDetail = resData.data
  688. if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
  689. changeOrderGetOrderList({
  690. id: this.id
  691. }).then(res => {
  692. this.payData = res.data.map(item => {
  693. return {
  694. ...item,
  695. gengduofeiyong: [
  696. {
  697. chargeType: 'SERV',
  698. amountName: '服务费用',
  699. normAmount: item.servicePrice || 0,
  700. sfsxf: Math.ceil((item.servicePrice || 0) * 0.6) / 100,
  701. sffzje: item.servicePrice - Math.ceil((item.servicePrice || 0) * 0.6) / 100
  702. },
  703. {
  704. chargeType: 'SERV',
  705. amountName: '其他费用',
  706. normAmount: item.otherPrice || 0,
  707. sfsxf: Math.ceil((item.otherPrice || 0) * 0.6) / 100,
  708. sffzje: item.otherPrice - Math.ceil((item.otherPrice || 0) * 0.6) / 100
  709. }
  710. ]
  711. }
  712. })
  713. console.log(this.payData)
  714. })
  715. } else if (this?.workOrderType == 4) {
  716. enginMaterialDetailWorker({
  717. workerOrderId: this.id
  718. }).then(res => {
  719. this.payData = res.data.map(item => {
  720. return {
  721. ...item,
  722. gengduofeiyong: [
  723. {
  724. chargeType: 'SERV',
  725. amountName: '服务费用',
  726. normAmount: item.servicePrice || 0,
  727. sfsxf: Math.ceil((item.servicePrice || 0) * 0.6) / 100,
  728. sffzje: item.servicePrice - Math.ceil((item.servicePrice || 0) * 0.6) / 100
  729. },
  730. {
  731. chargeType: 'SERV',
  732. amountName: '其他费用',
  733. normAmount: item.otherPrice || 0,
  734. sfsxf: Math.ceil((item.otherPrice || 0) * 0.6) / 100,
  735. sffzje: item.otherPrice - Math.ceil((item.otherPrice || 0) * 0.6) / 100
  736. }
  737. ]
  738. }
  739. })
  740. console.log(this.payData)
  741. })
  742. }
  743. })
  744. }
  745. },
  746. enginMaterialCancelFun(item) {
  747. this.$confirm('是否确认取消申请?', '提示', {
  748. confirmButtonText: '确定',
  749. cancelButtonText: '取消',
  750. type: 'warning'
  751. })
  752. .then(() => {
  753. enginMaterialCancel({
  754. id: item.orderId
  755. }).then(res => {
  756. this.getxiangqing()
  757. })
  758. })
  759. .catch(() => {})
  760. },
  761. toFixed(num = 0) {
  762. return (num || 0).toFixed(2)
  763. }
  764. }
  765. }
  766. </script>
  767. <style lang="scss" scoped>
  768. .neibuview {
  769. box-sizing: border-box;
  770. padding-left: 16px;
  771. ::v-deep & > .zj-page-fill-scroll {
  772. box-sizing: border-box;
  773. padding-right: 16px;
  774. & > div:nth-child(1) {
  775. margin-top: 20px;
  776. }
  777. }
  778. }
  779. </style>