detailDialog.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. v-if="visible"
  6. :visible.sync="visible"
  7. :title="title"
  8. :close-on-click-modal="false"
  9. width="80%"
  10. @close="cancel"
  11. >
  12. <div class="switch">
  13. <div class="switch_left">
  14. <ul>
  15. <li
  16. v-for="item in tabOptions"
  17. :key="item.key"
  18. :class="{ active: activeComp == item.key }"
  19. @click="activeComp = item.key"
  20. >
  21. {{ item.name }}
  22. </li>
  23. </ul>
  24. </div>
  25. </div>
  26. <div v-if="activeComp == 'order'">
  27. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  28. <headerTitle title="订单信息"> </headerTitle>
  29. <el-row>
  30. <el-col :span="12">
  31. <el-form-item
  32. label="订单编号:"
  33. prop="orderNo"
  34. style="margin-bottom: 16px"
  35. >
  36. {{ form.orderNo }}
  37. </el-form-item>
  38. <el-form-item
  39. label="项目名称:"
  40. prop="projectName"
  41. style="margin-bottom: 16px"
  42. >
  43. {{ form.projectName }}
  44. </el-form-item>
  45. <el-form-item
  46. label="需求部门:"
  47. prop="requireDeptName"
  48. style="margin-bottom: 16px"
  49. >
  50. {{ form.requireDeptName }}
  51. </el-form-item>
  52. <el-form-item
  53. label="需求类型:"
  54. prop="requireDeptName"
  55. style="margin-bottom: 16px"
  56. >
  57. {{ form.sourceTypeName }}
  58. </el-form-item>
  59. <el-form-item
  60. label="采购订单类型:"
  61. prop="purchaseTypeName"
  62. style="margin-bottom: 16px"
  63. >
  64. {{ form.purchaseTypeName }}
  65. </el-form-item>
  66. <el-form-item prop="orderFiles" label="附件:">
  67. <div
  68. v-if="detailData.orderFiles && detailData.orderFiles?.length"
  69. >
  70. <el-link
  71. v-for="link in detailData.orderFiles"
  72. :key="link.id"
  73. type="primary"
  74. :underline="false"
  75. @click="downloadFile(link)"
  76. >
  77. {{ link.name }}</el-link
  78. >
  79. </div>
  80. </el-form-item>
  81. <el-form-item prop="remark" label="备注:">
  82. {{ form.remark }}
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="12">
  86. <el-form-item
  87. label="合同名称:"
  88. prop="contractName"
  89. style="margin-bottom: 16px"
  90. >
  91. {{ form.contractName }}
  92. </el-form-item>
  93. <el-form-item
  94. label="采购计划名称:"
  95. prop="purchasePlanName"
  96. style="margin-bottom: 16px"
  97. >
  98. {{ form.purchasePlanName }}
  99. </el-form-item>
  100. <el-form-item
  101. label="结算方式:"
  102. prop="settlementModeName"
  103. style="margin-bottom: 16px"
  104. >
  105. {{ detailData.settlementModeName }}
  106. </el-form-item>
  107. <el-form-item
  108. label="需求人:"
  109. prop="requireUserName"
  110. style="margin-bottom: 16px"
  111. >
  112. {{ form.requireUserName }}
  113. </el-form-item>
  114. <el-form-item
  115. label="优惠总金额:"
  116. prop="payAmount"
  117. style="margin-bottom: 16px"
  118. >
  119. {{ form.payAmount }}元
  120. </el-form-item>
  121. <el-form-item
  122. label="订单总金额:"
  123. prop="totalAmount"
  124. style="margin-bottom: 16px"
  125. >
  126. {{ form.totalAmount }}元
  127. </el-form-item>
  128. </el-col>
  129. </el-row>
  130. <headerTitle title="基本信息"></headerTitle>
  131. <el-row>
  132. <el-col :span="12">
  133. <el-form-item
  134. label="采购方名称:"
  135. prop="partaName"
  136. style="margin-bottom: 16px"
  137. >
  138. {{ form.partaName }}
  139. </el-form-item>
  140. <el-form-item
  141. label="采购方统一社会信用代码"
  142. prop="partaUnifiedSocialCreditCode"
  143. label-width="170px"
  144. style="margin-bottom: 16px"
  145. >
  146. {{ form.partaUnifiedSocialCreditCode }}
  147. </el-form-item>
  148. <el-form-item
  149. label="采购方联系人:"
  150. prop="partaLinkName"
  151. style="margin-bottom: 16px"
  152. >
  153. {{ form.partaLinkName }}
  154. </el-form-item>
  155. <el-form-item
  156. label="采购方电话:"
  157. prop="partaTel"
  158. style="margin-bottom: 16px"
  159. >
  160. {{ form.partaTel }}
  161. </el-form-item>
  162. <el-form-item
  163. label="采购方传真:"
  164. prop="partaFax"
  165. style="margin-bottom: 16px"
  166. >
  167. {{ form.partaFax }}
  168. </el-form-item>
  169. <el-form-item
  170. label=" 采购方Email:"
  171. prop="partaEmail"
  172. style="margin-bottom: 16px"
  173. >
  174. {{ form.partaEmail }}
  175. </el-form-item>
  176. <el-form-item
  177. label="采购方地址:"
  178. prop="partaAddress"
  179. style="margin-bottom: 16px"
  180. >
  181. {{ form.partaAddress }}
  182. </el-form-item>
  183. <!-- <el-form-item
  184. label="客户税号"
  185. prop="contactAddress"
  186. style="margin-bottom: 16px"
  187. >
  188. <el-input
  189. clearable
  190. v-model="form.contactAddress"
  191. placeholder="请输入"
  192. />
  193. </el-form-item> -->
  194. </el-col>
  195. <el-col :span="12">
  196. <el-form-item
  197. label="供应商名称:"
  198. prop="partbName"
  199. style="margin-bottom: 16px"
  200. >
  201. {{ form.partbName }}
  202. </el-form-item>
  203. <el-form-item
  204. label="供应商统一社会信用代码"
  205. prop="partbUnifiedSocialCreditCode"
  206. label-width="180px"
  207. style="margin-bottom: 16px"
  208. >
  209. {{ form.partbUnifiedSocialCreditCode }}
  210. </el-form-item>
  211. <el-form-item
  212. label="供应商联系人:"
  213. prop="partbLinkName"
  214. style="margin-bottom: 16px"
  215. >
  216. {{ form.partbLinkName }}
  217. </el-form-item>
  218. <el-form-item
  219. prop="partbTel"
  220. label="供应商联系电话:"
  221. label-width="140px"
  222. >
  223. {{ form.partbTel }}
  224. </el-form-item>
  225. <el-form-item prop="partbFax" label="供应商传真:">
  226. {{ form.partbFax }}
  227. </el-form-item>
  228. <el-form-item
  229. label="供应商Email:"
  230. prop="partbEmail"
  231. style="margin-bottom: 16px"
  232. >
  233. {{ form.partbEmail }}
  234. </el-form-item>
  235. <el-form-item
  236. label="供应商地址:"
  237. prop="partbAddress"
  238. style="margin-bottom: 16px"
  239. >
  240. {{ form.partbAddress }}
  241. </el-form-item>
  242. <!-- <el-form-item
  243. label="售出方税号"
  244. prop="contactAddress"
  245. style="margin-bottom: 16px"
  246. >
  247. <el-input
  248. clearable
  249. v-model="form.contactAddress"
  250. placeholder="请输入"
  251. />
  252. </el-form-item> -->
  253. </el-col>
  254. </el-row>
  255. </el-form>
  256. <headerTitle title="产品清单"></headerTitle>
  257. <ele-pro-table
  258. ref="table"
  259. :needPage="false"
  260. :columns="competAnalysisListcolumns"
  261. :toolkit="[]"
  262. :datasource="detailData.productList"
  263. row-key="id"
  264. >
  265. <template v-slot:toolbar>
  266. <div class="headbox">
  267. <span class="amount">总计:{{ detailData.totalAmount }}元</span>
  268. <span class="amount">应付金额:{{ detailData.payAmount }}元</span>
  269. </div>
  270. </template>
  271. <template v-slot:technicalDrawings="{ row }">
  272. <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
  273. <el-link
  274. v-for="link in row.technicalDrawings"
  275. :key="link.id"
  276. type="primary"
  277. :underline="false"
  278. @click="downloadFile(link)"
  279. >
  280. {{ link.name }}</el-link
  281. >
  282. </div>
  283. </template>
  284. </ele-pro-table>
  285. </div>
  286. <bpmDetail
  287. v-if="activeComp === 'bpm' && form.processInstanceId"
  288. :id="form.processInstanceId"
  289. ></bpmDetail>
  290. <div v-if="activeComp == 'invoice'">
  291. <invoiceList :orderId="detailId"></invoiceList>
  292. </div>
  293. <div v-if="activeComp == 'returnorder'">
  294. <returnGoodsList :orderId="detailId"></returnGoodsList>
  295. </div>
  296. <div v-if="activeComp == 'accountstatement'">
  297. <accountstatementList :orderId="detailId"></accountstatementList>
  298. </div>
  299. <div slot="footer" class="footer">
  300. <el-button @click="cancel">返回</el-button>
  301. </div>
  302. </ele-modal>
  303. </template>
  304. <script>
  305. import {
  306. // getpurchaseorderDetail,
  307. getpurchaseorderDetail
  308. } from '@/api/purchasingManage/purchaseOrder';
  309. import invoiceList from '@/views/purchasingManage/purchaseOrder/orderAssociation/invoiceList.vue';
  310. import returnGoodsList from '@/views/purchasingManage/purchaseOrder/orderAssociation/returnGoodsList.vue';
  311. import accountstatementList from '@/views/purchasingManage/purchaseOrder/orderAssociation/accountstatementList.vue';
  312. import { getFile } from '@/api/system/file';
  313. import dictMixins from '@/mixins/dictMixins';
  314. import { copyObj } from '@/utils/util';
  315. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  316. export default {
  317. mixins: [dictMixins],
  318. components: {
  319. invoiceList,
  320. returnGoodsList,
  321. accountstatementList,
  322. bpmDetail
  323. },
  324. data() {
  325. return {
  326. activeComp: 'order',
  327. tabOptions: [
  328. { key: 'order', name: '订单详情' },
  329. { key: 'bpm', name: '流程详情' },
  330. { key: 'invoice', name: '收货列表' },
  331. { key: 'returnorder', name: '退货列表' },
  332. { key: 'accountstatement', name: '对账列表' }
  333. ],
  334. visible: false,
  335. detailId: '',
  336. title: '详情',
  337. row: {},
  338. activeName: 'base',
  339. form: {
  340. orderFiles: [{ name: '222' }]
  341. },
  342. rules: {},
  343. detailData: {},
  344. receiptPaymentListcolumns: [
  345. {
  346. width: 45,
  347. type: 'index',
  348. columnKey: 'index',
  349. align: 'center',
  350. fixed: 'left'
  351. },
  352. {
  353. width: 200,
  354. prop: 'moneyName',
  355. label: '款项名称',
  356. slot: 'moneyName'
  357. },
  358. {
  359. width: 100,
  360. prop: 'price',
  361. label: '金额',
  362. slot: 'price',
  363. formatter: (_row, _column, cellValue) => {
  364. return _row.price + '元';
  365. }
  366. },
  367. {
  368. width: 100,
  369. prop: 'ratio',
  370. label: '比例',
  371. slot: 'ratio',
  372. formatter: (_row, _column, cellValue) => {
  373. return _row.ratio + '%';
  374. }
  375. },
  376. {
  377. width: 160,
  378. prop: 'deadLine',
  379. label: '截止日期',
  380. slot: 'deadLine'
  381. },
  382. {
  383. prop: 'remark',
  384. label: ' 说明',
  385. slot: 'remark'
  386. }
  387. ],
  388. competAnalysisListcolumns: [
  389. {
  390. width: 45,
  391. type: 'index',
  392. columnKey: 'index',
  393. align: 'center',
  394. fixed: 'left'
  395. },
  396. {
  397. width: 200,
  398. prop: 'productName',
  399. label: '名称',
  400. slot: 'productName'
  401. },
  402. {
  403. width: 120,
  404. prop: 'productCode',
  405. label: '编码',
  406. slot: 'productCode'
  407. },
  408. {
  409. width: 200,
  410. prop: 'productCategoryName',
  411. label: '类型',
  412. slot: 'productCategoryName'
  413. },
  414. {
  415. width: 160,
  416. prop: 'productBrand',
  417. label: '牌号',
  418. slot: 'productBrand'
  419. },
  420. {
  421. width: 120,
  422. prop: 'modelType',
  423. label: '型号',
  424. slot: 'modelType'
  425. },
  426. {
  427. width: 120,
  428. prop: 'supplierMark',
  429. label: '供应商代号',
  430. slot: 'supplierMark'
  431. },
  432. {
  433. width: 120,
  434. prop: 'specification',
  435. label: '规格',
  436. slot: 'specification'
  437. },
  438. {
  439. width: 120,
  440. prop: 'totalCount',
  441. label: '数量',
  442. slot: 'totalCount'
  443. },
  444. {
  445. width: 120,
  446. prop: 'measuringUnit',
  447. label: '计量单位',
  448. slot: 'measuringUnit'
  449. },
  450. {
  451. width: 160,
  452. prop: 'singlePrice',
  453. label: '单价',
  454. slot: 'singlePrice'
  455. },
  456. {
  457. width: 160,
  458. prop: 'discountSinglePrice',
  459. label: '折后单价',
  460. slot: 'discountSinglePrice'
  461. },
  462. {
  463. width: 120,
  464. prop: 'totalPrice',
  465. label: '合计',
  466. slot: 'totalPrice',
  467. formatter: (_row, _column, cellValue) => {
  468. return _row.totalPrice + '元';
  469. }
  470. },
  471. {
  472. width: 120,
  473. prop: 'discountTotalPrice',
  474. label: '折后合计',
  475. slot: 'discountTotalPrice',
  476. formatter: (_row, _column, cellValue) => {
  477. return _row.discountTotalPrice + '元';
  478. }
  479. },
  480. {
  481. width: 120,
  482. prop: 'deliveryDays',
  483. label: '交期(天)',
  484. slot: 'deliveryDays'
  485. },
  486. {
  487. width: 160,
  488. prop: 'deliveryDeadline',
  489. label: '交期截止日期',
  490. slot: 'deliveryDeadline'
  491. },
  492. {
  493. width: 200,
  494. prop: 'guaranteePeriod',
  495. label: '质保期',
  496. slot: 'guaranteePeriod',
  497. formatter: (_row, _column, cellValue) => {
  498. return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
  499. }
  500. },
  501. {
  502. width: 160,
  503. prop: 'guaranteePeriodDeadline',
  504. label: '质保截止日期',
  505. slot: 'guaranteePeriodDeadline'
  506. },
  507. {
  508. width: 120,
  509. prop: 'technicalAnswerName',
  510. label: '技术答疑人',
  511. slot: 'technicalAnswerName'
  512. },
  513. {
  514. width: 220,
  515. prop: 'technicalParams',
  516. label: '技术参数',
  517. slot: 'technicalParams'
  518. },
  519. {
  520. width: 240,
  521. prop: 'technicalDrawings',
  522. label: '技术图纸',
  523. slot: 'technicalDrawings',
  524. formatter: (_row, _column, cellValue) => {
  525. return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
  526. }
  527. },
  528. {
  529. width: 220,
  530. prop: 'remark',
  531. label: '备注',
  532. slot: 'remark'
  533. }
  534. ]
  535. };
  536. },
  537. methods: {
  538. async open(row) {
  539. this.form = row;
  540. this.visible = true;
  541. this.getDetailData(row.id);
  542. this.detailId = row.id;
  543. },
  544. cancel() {
  545. this.$nextTick(() => {
  546. // 关闭后,销毁所有的表单数据
  547. (this.form = copyObj(this.formDef)),
  548. (this.otherForm = copyObj(this.otherFormDef)),
  549. (this.tableBankData = []);
  550. this.tableLinkData = [];
  551. this.visible = false;
  552. });
  553. },
  554. downloadFile(file) {
  555. getFile({ objectName: file.storePath }, file.name);
  556. },
  557. async getDetailData(id) {
  558. this.loading = true;
  559. const data = await getpurchaseorderDetail(id);
  560. this.loading = false;
  561. if (data) {
  562. this.form = data;
  563. this.detailData = data;
  564. }
  565. }
  566. }
  567. };
  568. </script>
  569. <style scoped lang="scss">
  570. .ele-dialog-form {
  571. .el-form-item {
  572. margin-bottom: 10px;
  573. }
  574. }
  575. .headbox {
  576. display: flex;
  577. justify-content: flex-start;
  578. align-items: center;
  579. .amount {
  580. font-size: 14px;
  581. font-weight: bold;
  582. margin-right: 20px;
  583. }
  584. }
  585. .switch_left ul .active {
  586. border-top: 4px solid var(--color-primary);
  587. color: var(--color-primary-5);
  588. }
  589. .switch {
  590. padding-bottom: 20px;
  591. }
  592. :deep .divider .content {
  593. justify-content: flex-start;
  594. }
  595. </style>