detailDialog.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960
  1. <template>
  2. <div>
  3. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  4. <headerTitle title="订单信息"> </headerTitle>
  5. <el-row>
  6. <el-col :span="8">
  7. <el-form-item label="订单编号:" prop="orderNo">
  8. {{ form.orderNo }}
  9. </el-form-item>
  10. </el-col>
  11. <el-col :span="8">
  12. <el-form-item label="订单类型:" prop="requireDeptName">
  13. {{ form.sourceTypeName }}
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="8">
  17. <el-form-item label="项目名称:" prop="projectName">
  18. {{ form.projectName }}
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="8" v-if="form.relationType == 4">
  22. <el-form-item label="合同名称:" prop="contractName">
  23. {{ form.contractName }}
  24. </el-form-item>
  25. </el-col>
  26. <el-col :span="8" v-if="form.relationType == 2">
  27. <el-form-item label="采购计划名称:" prop="relationName">
  28. {{ form.relationName }}
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="8" v-if="form.relationType == 1">
  32. <el-form-item label="采购需求单:" prop="relationName">
  33. {{ form.relationName }}
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="8" v-if="form.relationType == 3">
  37. <el-form-item label="采购核价单:" prop="relationName">
  38. {{ form.relationName }}
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="8">
  42. <el-form-item label="需求部门:" prop="requireDeptName">
  43. {{ form.requireDeptName }}
  44. </el-form-item>
  45. </el-col>
  46. <el-col :span="8">
  47. <el-form-item label="需求人:" prop="requireUserName">
  48. {{ form.requireUserName }}
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="8">
  52. <el-form-item label="采购部门:" prop="purchaseDeptName">
  53. {{ form.purchaseDeptName }}
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="8">
  57. <el-form-item label="采购员:" prop="purchaseUserName">
  58. {{ form.purchaseUserName }}
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-form-item label="交易方式:" prop="transactionMode">
  63. {{ transactionMethodsOp.find(item => item.value == form.transactionMode)?.label }}
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="8">
  67. <el-form-item label="收货模式:" prop="deliveryMode">
  68. {{ shippingModePurchaseOp.find(item => item.value == form.deliveryMode)?.label }}
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="8">
  72. <el-form-item label="结算方式:" prop="settlementModeName">
  73. {{ detailData.settlementModeName }}
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="8" v-if="form.settlementMode == 1">
  77. <el-form-item label="结算日期范围:" prop="settlementDate">
  78. {{ form.settlementDate }}
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="8" v-if="form.settlementMode == 2">
  82. <el-form-item label="结算月份范围:" prop="settlementDate">
  83. {{ form.settlementDate }}
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8" v-if="form.settlementMode == 2">
  87. <el-form-item label="收款日期:" prop="receiptDate">
  88. 每月{{ form.receiptDate }}日
  89. </el-form-item>
  90. </el-col>
  91. <el-col :span="8">
  92. <el-form-item
  93. label="期数:"
  94. prop="issueNumber"
  95. >
  96. {{ form.issueNumber }}期
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="8">
  100. <el-form-item label="优惠总金额:" prop="payAmount">
  101. {{ form.payAmount }}元
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="8">
  105. <el-form-item label="订单总金额:" prop="totalAmount">
  106. {{ form.totalAmount }}元
  107. </el-form-item>
  108. </el-col>
  109. <el-col :span="8">
  110. <el-form-item prop="orderFiles" label="附件:">
  111. <fileMain v-model="form.orderFiles" type="view"></fileMain>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="8">
  115. <el-form-item prop="remark" label="备注:">
  116. {{ form.remark }}
  117. </el-form-item>
  118. </el-col>
  119. </el-row>
  120. <headerTitle title="基本信息"></headerTitle>
  121. <el-row>
  122. <el-col :span="12">
  123. <el-form-item label="采购方名称:" prop="partaName">
  124. {{ form.partaName }}
  125. </el-form-item>
  126. <el-form-item
  127. label="采购方统一社会信用代码"
  128. prop="partaUnifiedSocialCreditCode"
  129. label-width="170px"
  130. >
  131. {{ form.partaUnifiedSocialCreditCode }}
  132. </el-form-item>
  133. <el-form-item label="采购方联系人:" prop="partaLinkName">
  134. {{ form.partaLinkName }}
  135. </el-form-item>
  136. <el-form-item label="采购方电话:" prop="partaTel">
  137. {{ form.partaTel }}
  138. </el-form-item>
  139. <el-form-item label="采购方传真:" prop="partaFax">
  140. {{ form.partaFax }}
  141. </el-form-item>
  142. <el-form-item label=" 采购方Email:" prop="partaEmail">
  143. {{ form.partaEmail }}
  144. </el-form-item>
  145. <el-form-item label="采购方地址:" prop="partaAddress">
  146. {{ form.partaAddress }}
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="12">
  150. <el-form-item label="供应商名称:" prop="partbName">
  151. {{ form.partbName }}
  152. </el-form-item>
  153. <el-form-item
  154. label="供应商统一社会信用代码"
  155. prop="partbUnifiedSocialCreditCode"
  156. label-width="180px"
  157. >
  158. {{ form.partbUnifiedSocialCreditCode }}
  159. </el-form-item>
  160. <el-form-item label="供应商联系人:" prop="partbLinkName">
  161. {{ form.partbLinkName }}
  162. </el-form-item>
  163. <el-form-item
  164. prop="partbTel"
  165. label="供应商联系电话:"
  166. label-width="140px"
  167. >
  168. {{ form.partbTel }}
  169. </el-form-item>
  170. <el-form-item prop="partbFax" label="供应商传真:">
  171. {{ form.partbFax }}
  172. </el-form-item>
  173. <el-form-item label="供应商Email:" prop="partbEmail">
  174. {{ form.partbEmail }}
  175. </el-form-item>
  176. <el-form-item label="供应商地址:" prop="partbAddress">
  177. {{ form.partbAddress }}
  178. </el-form-item>
  179. </el-col>
  180. </el-row>
  181. </el-form>
  182. <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
  183. <el-tab-pane label="物品清单" name="1">
  184. <ele-pro-table
  185. ref="table"
  186. :needPage="false"
  187. :columns="competAnalysisListcolumns"
  188. :datasource="detailData.productList"
  189. row-key="id"
  190. tool-class="ele-toolbar-form"
  191. @columns-change="handleColumnChange"
  192. :cache-key="cacheKeyUrl"
  193. >
  194. <template v-slot:toolbar>
  195. <div class="headbox">
  196. <span class="amount">总计:{{ detailData.totalAmount }}元</span>
  197. <span class="amount">应付金额:{{ detailData.payAmount }}元</span>
  198. </div>
  199. </template>
  200. <template v-slot:technicalDrawings="{ row }">
  201. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  202. </template>
  203. </ele-pro-table>
  204. </el-tab-pane>
  205. <el-tab-pane
  206. label="带料清单"
  207. name="2"
  208. v-if="orderSourceType.includes(form.sourceType)"
  209. >
  210. <ele-pro-table
  211. ref="table"
  212. :needPage="false"
  213. :columns="competAnalysisListcolumns1"
  214. :toolkit="[]"
  215. :datasource="detailData.rawList"
  216. row-key="id"
  217. >
  218. <template v-slot:technicalDrawings="{ row }">
  219. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  220. </template>
  221. </ele-pro-table>
  222. </el-tab-pane>
  223. <el-tab-pane
  224. label="产出清单"
  225. name="3"
  226. v-if="orderSourceType.includes(form.sourceType)"
  227. >
  228. <ele-pro-table
  229. ref="table"
  230. :needPage="false"
  231. :columns="competAnalysisListcolumns1"
  232. :toolkit="[]"
  233. :datasource="detailData.outputList"
  234. row-key="id"
  235. >
  236. <template v-slot:technicalDrawings="{ row }">
  237. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  238. </template>
  239. </ele-pro-table>
  240. </el-tab-pane>
  241. </el-tabs>
  242. <headerTitle
  243. title="付款计划"
  244. style="margin-top: 30px"
  245. ></headerTitle>
  246. <PaymentCollectionPlan
  247. ref="paymentCollectionPlanRef"
  248. menu="sale"
  249. type="view"
  250. ></PaymentCollectionPlan>
  251. </div>
  252. </template>
  253. <script>
  254. import { getpurchaseorderDetail } from '@/api/bpm/components/purchasingManage/purchaseOrder';
  255. import { getFile } from '@/api/system/file';
  256. import dictMixins from '@/mixins/dictMixins';
  257. // import fileMain from '@/components/addDoc/index.vue';
  258. import { orderSourceType, outsourceSceneList } from '@/enum/dict';
  259. import { lbjtList } from '@/enum/dict.js';
  260. import { levelList, pricingWayList, quoteTypeOp } from '@/enum/dict.js';
  261. import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
  262. import { shippingModePurchaseOp, transactionMethodsOp } from '@/enum/dict.js';
  263. import PaymentCollectionPlan from '@/BIZComponents/paymentCollectionPlan/Index.vue'
  264. export default {
  265. mixins: [dictMixins, tableColumnsMixin],
  266. components: { PaymentCollectionPlan },
  267. props: {
  268. businessId: {
  269. default: ''
  270. }
  271. },
  272. data() {
  273. return {
  274. quoteTypeOp,
  275. cacheKeyUrl: 'purchase-order-bizcomponent-InventoryTableDetails',
  276. shippingModePurchaseOp,
  277. transactionMethodsOp,
  278. orderSourceType,
  279. outsourceSceneList,
  280. visible: false,
  281. detailId: '',
  282. title: '详情',
  283. row: {},
  284. activeName: '1',
  285. form: {
  286. orderFiles: [{ name: '222' }]
  287. },
  288. rules: {},
  289. detailData: {},
  290. receiptPaymentListcolumns: [
  291. {
  292. width: 45,
  293. type: 'index',
  294. columnKey: 'index',
  295. align: 'center',
  296. fixed: 'left'
  297. },
  298. {
  299. width: 200,
  300. prop: 'moneyName',
  301. label: '款项名称',
  302. slot: 'moneyName'
  303. },
  304. {
  305. width: 100,
  306. prop: 'price',
  307. label: '金额',
  308. slot: 'price',
  309. formatter: (_row, _column, cellValue) => {
  310. return _row.price + '元';
  311. }
  312. },
  313. {
  314. width: 100,
  315. prop: 'ratio',
  316. label: '比例',
  317. slot: 'ratio',
  318. formatter: (_row, _column, cellValue) => {
  319. return _row.ratio + '%';
  320. }
  321. },
  322. {
  323. width: 160,
  324. prop: 'deadLine',
  325. label: '截止日期',
  326. slot: 'deadLine'
  327. },
  328. {
  329. prop: 'remark',
  330. label: ' 说明',
  331. slot: 'remark'
  332. }
  333. ],
  334. competAnalysisListcolumns: [
  335. {
  336. width: 45,
  337. type: 'index',
  338. columnKey: 'index',
  339. align: 'center',
  340. fixed: 'left'
  341. },
  342. {
  343. width: 200,
  344. prop: 'productName',
  345. label: '名称',
  346. slot: 'productName',
  347. align: 'center'
  348. },
  349. {
  350. width: 120,
  351. prop: 'productCode',
  352. label: '编码',
  353. slot: 'productCode',
  354. align: 'center'
  355. },
  356. {
  357. width: 200,
  358. prop: 'productCategoryName',
  359. label: '类型',
  360. slot: 'productCategoryName',
  361. align: 'center'
  362. },
  363. {
  364. width: 160,
  365. prop: 'productBrand',
  366. label: '牌号',
  367. slot: 'productBrand',
  368. align: 'center'
  369. },
  370. {
  371. width: 140,
  372. prop: 'pricingWay',
  373. label: '计价方式',
  374. align: 'center',
  375. fixed: 'left',
  376. formatter: (row, column) => {
  377. return pricingWayList.find((item) => item.id == row.pricingWay)
  378. ?.name;
  379. }
  380. },
  381. {
  382. width: 120,
  383. prop: 'modelType',
  384. label: '型号',
  385. slot: 'modelType',
  386. align: 'center'
  387. },
  388. {
  389. width: 120,
  390. prop: 'supplierMark',
  391. label: '供应商代号',
  392. slot: 'supplierMark',
  393. align: 'center'
  394. },
  395. {
  396. width: 120,
  397. prop: 'specification',
  398. label: '规格',
  399. slot: 'specification',
  400. align: 'center'
  401. },
  402. {
  403. minWidth: 200,
  404. prop: 'taskName',
  405. label: '工序',
  406. slot: 'taskName',
  407. align: 'center'
  408. },
  409. {
  410. width: 150,
  411. prop: 'purchaseCount',
  412. label: '数量',
  413. align: 'center',
  414. formatter: (row, column) => {
  415. if (row.purchaseCount) {
  416. return row.purchaseCount + ' ' + (row.purchaseUnit || '');
  417. }
  418. }
  419. },
  420. // {
  421. // width: 150,
  422. // prop: 'purchaseUnit',
  423. // label: '单位',
  424. // align: 'center'
  425. // },
  426. // {
  427. // minWidth: 180,
  428. // prop: 'packingSpecification',
  429. // align: 'center',
  430. // label: '包装规格',
  431. // showOverflowTooltip: true
  432. // },
  433. {
  434. width: 120,
  435. prop: 'totalCount',
  436. label: '计量数量',
  437. formatter: (row, column) => {
  438. if (row.totalCount) {
  439. return row.totalCount + ' ' + (row.measuringUnit || '');
  440. }
  441. },
  442. align: 'center'
  443. },
  444. // {
  445. // width: 120,
  446. // prop: 'measuringUnit',
  447. // label: '计量单位',
  448. // slot: 'measuringUnit',
  449. // align: 'center'
  450. // },
  451. {
  452. width: 120,
  453. prop: 'produceType',
  454. align: 'center',
  455. label: '属性类型',
  456. showOverflowTooltip: true,
  457. formatter: (row, column) => {
  458. if (row.produceType) {
  459. return row.produceType
  460. .map((item) => {
  461. return lbjtList[item];
  462. })
  463. .toString();
  464. }
  465. }
  466. },
  467. {
  468. width: 120,
  469. prop: 'packingSpecification',
  470. align: 'center',
  471. label: '包装规格',
  472. showOverflowTooltip: true
  473. },
  474. {
  475. width: 120,
  476. prop: 'singleWeight',
  477. label: '单重',
  478. formatter: (row, column) => {
  479. if (row.singleWeight) {
  480. return row.singleWeight + ' ' + (row.weightUnit || '');
  481. }
  482. },
  483. align: 'center'
  484. },
  485. {
  486. width: 120,
  487. prop: 'totalWeight',
  488. label: '总重',
  489. formatter: (row, column) => {
  490. if (row.totalWeight) {
  491. return row.totalWeight + ' ' + (row.weightUnit || '');
  492. }
  493. },
  494. align: 'center'
  495. },
  496. {
  497. width: 180,
  498. prop: 'increaseTotalWeight',
  499. label: '增重重量',
  500. align: 'center',
  501. formatter: (row, column) => {
  502. if (row.increaseTotalWeight) {
  503. return row.increaseTotalWeight + ' ' + (row.weightUnit || '');
  504. }
  505. }
  506. },
  507. // {
  508. // width: 120,
  509. // prop: 'weightUnit',
  510. // label: '重量单位',
  511. // slot: 'weightUnit',
  512. // align: 'center'
  513. // },
  514. // {
  515. // width: 160,
  516. // prop: 'pricingWay',
  517. // label: '计价方式',
  518. // slot: 'pricingWay',
  519. // align: 'center',
  520. // formatter: (row, column) => {
  521. // return row.pricingWay == 1
  522. // ? '按数量计费'
  523. // : row.pricingWay == 2
  524. // ? '按重量计费'
  525. // : '';
  526. // }
  527. // },
  528. {
  529. minWidth: 120,
  530. prop: 'goodsLevel',
  531. label: '物品级别',
  532. formatter: (_row, _column, cellValue) => {
  533. return levelList.find((item) => item.value == _row.goodsLevel)
  534. ?.label;
  535. },
  536. align: 'center'
  537. },
  538. {
  539. width: 160,
  540. prop: 'singlePrice',
  541. label: '单价',
  542. slot: 'singlePrice',
  543. align: 'center'
  544. },
  545. {
  546. width: 120,
  547. prop: 'taxRate',
  548. label: '税率',
  549. formatter: (_row, _column, cellValue) => {
  550. return _row.taxRate ? _row.taxRate + '%' : '';
  551. },
  552. align: 'center'
  553. },
  554. {
  555. width: 150,
  556. prop: 'notaxSinglePrice',
  557. label: '不含税单价',
  558. align: 'center'
  559. },
  560. {
  561. width: 150,
  562. prop: 'quoteWay',
  563. label: '报价方式',
  564. align: 'center',
  565. formatter: (_row, _column, cellValue) => {
  566. return this.quoteTypeOp.find((item) => item.value == _row.quoteWay)
  567. ?.label || '';
  568. }
  569. },
  570. {
  571. width: 150,
  572. prop: 'discountRatio',
  573. label: '折让比例',
  574. align: 'center',
  575. isNone: !this.isDiscount,
  576. formatter: (_row, _column, cellValue) => {
  577. return _row.discountRatio
  578. ? Number(_row.discountRatio).toFixed(2) + '%'
  579. : '';
  580. }
  581. },
  582. {
  583. width: 160,
  584. prop: 'discountSinglePrice',
  585. label: '折后单价',
  586. slot: 'discountSinglePrice',
  587. align: 'center'
  588. },
  589. {
  590. width: 120,
  591. prop: 'totalPrice',
  592. label: '合计',
  593. slot: 'totalPrice',
  594. formatter: (_row, _column, cellValue) => {
  595. return _row.totalPrice + '元';
  596. },
  597. align: 'center'
  598. },
  599. {
  600. width: 120,
  601. prop: 'discountTotalPrice',
  602. label: '折后合计',
  603. slot: 'discountTotalPrice',
  604. formatter: (_row, _column, cellValue) => {
  605. return _row.discountTotalPrice + '元';
  606. },
  607. align: 'center'
  608. },
  609. {
  610. width: 110,
  611. prop: 'batchNo',
  612. label: '批次号',
  613. slot: 'batchNo',
  614. align: 'center'
  615. },
  616. {
  617. prop: 'provenance',
  618. label: '产地',
  619. slot: 'provenance',
  620. align: 'center',
  621. minWidth: 200,
  622. showOverflowTooltip: true,
  623. formatter: (row, column) => {
  624. return row.provenance && row.provenance.length
  625. ? row.provenance
  626. .map((item) => this.getDictValue('产地', item))
  627. .join(',')
  628. : '';
  629. }
  630. },
  631. {
  632. minWidth: 120,
  633. prop: 'modelKey',
  634. label: '机型',
  635. showOverflowTooltip: true,
  636. align: 'center'
  637. },
  638. {
  639. minWidth: 120,
  640. prop: 'colorKey',
  641. showOverflowTooltip: true,
  642. label: '颜色',
  643. align: 'center'
  644. },
  645. {
  646. width: 160,
  647. prop: 'deliveryDeadline',
  648. label: '交期截止日期',
  649. slot: 'deliveryDeadline',
  650. align: 'center'
  651. },
  652. {
  653. width: 200,
  654. prop: 'guaranteePeriod',
  655. label: '有效期',
  656. slot: 'guaranteePeriod',
  657. formatter: (_row, _column, cellValue) => {
  658. return (
  659. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  660. );
  661. },
  662. align: 'center'
  663. },
  664. {
  665. width: 160,
  666. prop: 'guaranteePeriodDeadline',
  667. label: '有效期截止日期',
  668. slot: 'guaranteePeriodDeadline',
  669. align: 'center'
  670. },
  671. {
  672. width: 120,
  673. prop: 'technicalAnswerName',
  674. label: '技术答疑人',
  675. slot: 'technicalAnswerName',
  676. align: 'center'
  677. },
  678. {
  679. width: 220,
  680. prop: 'technicalParams',
  681. label: '技术参数',
  682. slot: 'technicalParams',
  683. align: 'center'
  684. },
  685. {
  686. width: 240,
  687. prop: 'technicalDrawings',
  688. label: '技术图纸',
  689. slot: 'technicalDrawings',
  690. formatter: (_row, _column, cellValue) => {
  691. return (
  692. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  693. );
  694. },
  695. align: 'center'
  696. },
  697. {
  698. width: 220,
  699. prop: 'remark',
  700. label: '备注',
  701. slot: 'remark',
  702. align: 'center'
  703. }
  704. ],
  705. competAnalysisListcolumns1: [
  706. {
  707. width: 45,
  708. type: 'index',
  709. columnKey: 'index',
  710. align: 'center',
  711. fixed: 'left'
  712. },
  713. {
  714. width: 200,
  715. prop: 'productName',
  716. label: '名称',
  717. slot: 'productName',
  718. align: 'center'
  719. },
  720. {
  721. width: 120,
  722. prop: 'productCode',
  723. label: '编码',
  724. slot: 'productCode',
  725. align: 'center'
  726. },
  727. {
  728. width: 200,
  729. prop: 'productCategoryName',
  730. label: '类型',
  731. slot: 'productCategoryName',
  732. align: 'center'
  733. },
  734. {
  735. width: 160,
  736. prop: 'productBrand',
  737. label: '牌号',
  738. slot: 'productBrand',
  739. align: 'center'
  740. },
  741. {
  742. width: 120,
  743. prop: 'modelType',
  744. label: '型号',
  745. slot: 'modelType',
  746. align: 'center'
  747. },
  748. {
  749. width: 120,
  750. prop: 'supplierMark',
  751. label: '供应商代号',
  752. slot: 'supplierMark',
  753. align: 'center'
  754. },
  755. {
  756. width: 120,
  757. prop: 'specification',
  758. label: '规格',
  759. slot: 'specification',
  760. align: 'center'
  761. },
  762. {
  763. minWidth: 200,
  764. prop: 'taskName',
  765. label: '工序',
  766. slot: 'taskName',
  767. align: 'center'
  768. },
  769. {
  770. width: 120,
  771. prop: 'totalCount',
  772. label: '数量',
  773. slot: 'totalCount',
  774. formatter: (row, column) => {
  775. if (row.totalCount) {
  776. return row.totalCount + ' ' + (row.measuringUnit || '');
  777. }
  778. },
  779. align: 'center'
  780. },
  781. {
  782. width: 120,
  783. prop: 'singleWeight',
  784. label: '单重',
  785. formatter: (row, column) => {
  786. if (row.singleWeight) {
  787. return row.singleWeight + ' ' + (row.weightUnit || '');
  788. }
  789. },
  790. align: 'center'
  791. },
  792. {
  793. width: 120,
  794. prop: 'totalWeight',
  795. label: '总重',
  796. formatter: (row, column) => {
  797. if (row.totalWeight) {
  798. return row.totalWeight + ' ' + (row.weightUnit || '');
  799. }
  800. },
  801. align: 'center'
  802. },
  803. // {
  804. // width: 120,
  805. // prop: 'weightUnit',
  806. // label: '重量单位',
  807. // slot: 'weightUnit',
  808. // align: 'center'
  809. // },
  810. {
  811. width: 110,
  812. prop: 'batchNo',
  813. label: '批次号',
  814. slot: 'batchNo',
  815. align: 'center'
  816. },
  817. {
  818. width: 120,
  819. prop: 'deliveryDays',
  820. label: '交期(天)',
  821. slot: 'deliveryDays'
  822. },
  823. {
  824. width: 160,
  825. prop: 'deliveryDeadline',
  826. label: '交期截止日期',
  827. slot: 'deliveryDeadline',
  828. align: 'center'
  829. },
  830. {
  831. width: 200,
  832. prop: 'guaranteePeriod',
  833. label: '有效期',
  834. slot: 'guaranteePeriod',
  835. formatter: (_row, _column, cellValue) => {
  836. return (
  837. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  838. );
  839. },
  840. align: 'center'
  841. },
  842. {
  843. width: 160,
  844. prop: 'guaranteePeriodDeadline',
  845. label: '有效期截止日期',
  846. slot: 'guaranteePeriodDeadline',
  847. align: 'center'
  848. },
  849. {
  850. width: 120,
  851. prop: 'technicalAnswerName',
  852. label: '技术答疑人',
  853. slot: 'technicalAnswerName',
  854. align: 'center'
  855. },
  856. {
  857. width: 220,
  858. prop: 'technicalParams',
  859. label: '技术参数',
  860. slot: 'technicalParams',
  861. align: 'center'
  862. },
  863. {
  864. width: 240,
  865. prop: 'technicalDrawings',
  866. label: '技术图纸',
  867. slot: 'technicalDrawings',
  868. formatter: (_row, _column, cellValue) => {
  869. return (
  870. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  871. );
  872. },
  873. align: 'center'
  874. },
  875. {
  876. width: 220,
  877. prop: 'remark',
  878. label: '备注',
  879. slot: 'remark',
  880. align: 'center'
  881. }
  882. ]
  883. };
  884. },
  885. created() {
  886. this.requestDict('产地');
  887. this.requestDict('生产类型');
  888. this.getDetailData(this.businessId);
  889. },
  890. methods: {
  891. downloadFile(file) {
  892. getFile({ objectName: file.storePath }, file.name);
  893. },
  894. async getDetailData(id) {
  895. this.loading = true;
  896. const data = await getpurchaseorderDetail(id);
  897. this.loading = false;
  898. if (data) {
  899. data.settlementDate = data.startSettlementDate ? [data.startSettlementDate, data.endSettlementDate] : [];
  900. this.form = data;
  901. this.detailData = data;
  902. this.$refs.paymentCollectionPlanRef && this.$refs.paymentCollectionPlanRef.putTableValue(data);
  903. }
  904. }
  905. }
  906. };
  907. </script>
  908. <style scoped lang="scss">
  909. .ele-dialog-form {
  910. .el-form-item {
  911. margin-bottom: 5px;
  912. }
  913. }
  914. .headbox {
  915. display: flex;
  916. justify-content: flex-start;
  917. align-items: center;
  918. .amount {
  919. font-size: 14px;
  920. font-weight: bold;
  921. margin-right: 20px;
  922. }
  923. }
  924. .switch_left ul .active {
  925. border-top: 4px solid var(--color-primary);
  926. color: var(--color-primary-5);
  927. }
  928. .switch {
  929. padding-bottom: 20px;
  930. }
  931. :deep .divider .content {
  932. justify-content: flex-start;
  933. }
  934. </style>