detailDialog.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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. :append-to-body="true"
  9. :maxable="true"
  10. :resizable="true"
  11. :close-on-click-modal="false"
  12. width="70%"
  13. @close="cancel"
  14. >
  15. <div class="switch">
  16. <div class="switch_left">
  17. <ul>
  18. <li
  19. v-for="item in tabOptions"
  20. :key="item.key"
  21. :class="{ active: activeComp == item.key }"
  22. @click="handleTag(item.key)"
  23. >
  24. {{ item.name }}
  25. </li>
  26. </ul>
  27. </div>
  28. </div>
  29. <div v-if="activeComp === 'main'">
  30. <el-form ref="form" :model="form" :rules="rules" label-width="140px">
  31. <headerTitle title="发货信息"></headerTitle>
  32. <el-row>
  33. <el-col :span="12">
  34. <el-form-item label="客户名称:" prop="contactName">
  35. <el-input v-model="form.contactName" disabled></el-input>
  36. </el-form-item>
  37. <el-form-item label="客户联系人:" prop="linkName">
  38. <el-input v-model="form.linkName" disabled></el-input>
  39. </el-form-item>
  40. <el-form-item label="客户电话:" prop="linkPhone">
  41. <el-input v-model="form.linkPhone" disabled></el-input>
  42. </el-form-item>
  43. <el-form-item label="客户地址:" prop="partaAddress">
  44. <el-input v-model="form.partaAddress" disabled></el-input>
  45. </el-form-item>
  46. <!-- <el-form-item label="计价方式:">
  47. <el-select v-model="form.pricingWay" disabled style="width: 100%">
  48. <el-option label="按数量计费" :value="1"></el-option>
  49. <el-option label="按重量计费" :value="2"></el-option>
  50. </el-select>
  51. </el-form-item> -->
  52. <el-form-item label="车牌号:" prop="partaAddress">
  53. <el-input v-model="form.carNo" disabled></el-input>
  54. </el-form-item>
  55. <el-form-item label="托盘数:">
  56. <el-input v-model="form.trayNum" disabled></el-input>
  57. </el-form-item>
  58. <el-form-item label="发货附件:" prop="sendFiles">
  59. <fileMain v-model="form.sendFiles" type="view"></fileMain>
  60. </el-form-item>
  61. <el-form-item label="回执附件:" prop="sendFiles">
  62. <fileMain v-model="form.repliedFiles" type="view"></fileMain>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="12">
  66. <!-- <el-form-item label="车辆名称" >
  67. <el-input disabled v-model="form.deviceName"/>
  68. </el-form-item>
  69. <el-form-item
  70. label="车牌号:"
  71. prop="carNo">
  72. <el-input v-model="form.carNo" disabled></el-input>
  73. </el-form-item> -->
  74. <el-form-item label="受托收货单编码:" prop="entrustedCode">
  75. <el-input v-model="form.entrustedCode" disabled></el-input>
  76. </el-form-item>
  77. <el-form-item label="发货单编码:" prop="docNo">
  78. <el-input v-model="form.docNo" disabled></el-input>
  79. </el-form-item>
  80. <el-form-item prop="orderNo" label="订单编码:">
  81. <el-input v-model="form.orderNo" disabled></el-input>
  82. </el-form-item>
  83. <el-form-item prop="replied" label="是否回执:">
  84. <el-select v-model="form.replied" disabled style="width: 100%">
  85. <el-option label="是" :value="1"></el-option>
  86. <el-option label="否" :value="0"></el-option>
  87. </el-select>
  88. </el-form-item>
  89. <el-form-item label="审核状态:" prop="reviewStatus">
  90. <el-select
  91. v-model="form.reviewStatus"
  92. disabled
  93. style="width: 100%"
  94. >
  95. <el-option
  96. v-for="item in reviewStatusEnum"
  97. :value="item.value"
  98. :label="item.label"
  99. ></el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item label="制单人:" prop="makerName">
  103. <el-input v-model="form.makerName" disabled></el-input>
  104. </el-form-item>
  105. </el-col>
  106. </el-row>
  107. </el-form>
  108. <el-tabs type="border-card">
  109. <el-tab-pane label="物品清单">
  110. <ele-pro-table
  111. ref="table"
  112. :needPage="false"
  113. :columns="competAnalysisListcolumns"
  114. :datasource="detailData.productList"
  115. row-key="id"
  116. :toolkit="[]"
  117. >
  118. <!-- <template v-slot:toolbar>
  119. <div class="headbox">
  120. <span class="amount">总计:{{detailData.totalAmount}}元</span>
  121. <span class="amount">应付金额:{{detailData.payAmount}}元</span>
  122. </div>
  123. </template> -->
  124. <template v-slot:technicalDrawings="{ row }">
  125. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  126. </template>
  127. <template v-slot:packagingStrength="scope">
  128. <DictSelection
  129. disabled
  130. dict-name="包装强度"
  131. v-model="scope.row.extField.packagingStrength"
  132. ></DictSelection>
  133. </template>
  134. <template v-slot:packagingDensity="scope">
  135. <DictSelection
  136. disabled
  137. dict-name="包装密度"
  138. v-model="scope.row.extField.packagingDensity"
  139. ></DictSelection>
  140. </template>
  141. <template v-slot:stockLedger="scope">
  142. <el-popover placement="right" width="60%" trigger="hover">
  143. <ele-pro-table
  144. :ref="'childrenTable' + scope.$index"
  145. row-key="id"
  146. max-height="300px"
  147. :needPage="false"
  148. :columns="childrenColumns"
  149. :datasource="scope.row.sendProductDetail"
  150. cache-key="stockLedgerRoleTable"
  151. class="time-form"
  152. >
  153. </ele-pro-table>
  154. <!-- <el-button type="text" slot="reference">明细</el-button> -->
  155. </el-popover>
  156. </template>
  157. </ele-pro-table>
  158. </el-tab-pane>
  159. <el-tab-pane label="托盘清单">
  160. <palletTable ref="palletTableRef" type="view"></palletTable>
  161. </el-tab-pane>
  162. <el-tab-pane label="装载叉车信息">
  163. <stowageTable ref="stowageTableRef" dialog-type="view"></stowageTable>
  164. </el-tab-pane>
  165. <el-tab-pane label="运输清单">
  166. <taskInfoTable
  167. ref="taskInfoTableRef"
  168. dialog-type="view"
  169. ></taskInfoTable>
  170. </el-tab-pane>
  171. <el-tab-pane label="替代料" name="5">
  172. <replaceTable
  173. :pricingWay="form.pricingWay"
  174. :disabled="true"
  175. ref="replaceRef"
  176. ></replaceTable>
  177. </el-tab-pane>
  178. </el-tabs>
  179. </div>
  180. <bpmDetail
  181. v-if="activeComp === 'bpm' && form.processInstanceId"
  182. :id="form.processInstanceId"
  183. ></bpmDetail>
  184. <out-bound-details
  185. v-if="activeComp === 'store'"
  186. ref="innerBoundDetailsRef"
  187. ></out-bound-details>
  188. <div slot="footer" class="footer">
  189. <el-button @click="cancel">返回</el-button>
  190. </div>
  191. </ele-modal>
  192. </template>
  193. <script>
  194. import { getFile } from '@/api/system/file';
  195. import dictMixins from '@/mixins/dictMixins';
  196. import { reviewStatusEnum, lbjtList } from '@/enum/dict';
  197. import { copyObj } from '@/utils/util';
  198. import { getSendSaleOrderrecordDetailSplit } from '@/api/saleManage/saleordersendrecord';
  199. import bpmDetail from '@/views/bpm/processInstance/detail.vue';
  200. import outBoundDetails from '@/BIZComponents/outdetails.vue';
  201. import taskInfoTable from '@/views/saleManage/saleOrder/invoice/components/taskInfoTable.vue';
  202. import stowageTable from '@/views/saleManage/saleOrder/invoice/components/stowageTable.vue';
  203. import getDynamicsColumns from '@/mixins/getDynamicsColumns';
  204. import fileMain from '@/components/addDoc/index.vue';
  205. import PalletTable from '@/views/saleManage/saleOrder/invoice/components/palletTable.vue';
  206. import replaceTable from './replaceTable.vue';
  207. import { fieldModelAPI } from '@/api/main';
  208. export default {
  209. mixins: [dictMixins, getDynamicsColumns],
  210. components: {
  211. PalletTable,
  212. fileMain,
  213. taskInfoTable,
  214. outBoundDetails,
  215. bpmDetail,
  216. stowageTable,
  217. replaceTable
  218. },
  219. data() {
  220. return {
  221. activeComp: 'main',
  222. tabOptions: [
  223. { key: 'main', name: '发货单详情' },
  224. { key: 'bpm', name: '流程详情' },
  225. { key: 'store', name: '出库单详情' }
  226. ],
  227. fullscreen: false,
  228. reviewStatusEnum,
  229. visible: false,
  230. outboundDetailsDialogFlag: false,
  231. title: '详情',
  232. form: {
  233. orderFiles: []
  234. },
  235. rules: {},
  236. detailData: {},
  237. childrenColumns: [
  238. {
  239. width: 45,
  240. type: 'index',
  241. columnKey: 'index',
  242. align: 'center',
  243. fixed: 'left'
  244. },
  245. {
  246. minWidth: 100,
  247. prop: 'code',
  248. label: '编码',
  249. align: 'center'
  250. },
  251. {
  252. minWidth: 140,
  253. prop: 'barcodes',
  254. label: '发货条码',
  255. align: 'center'
  256. },
  257. {
  258. minWidth: 100,
  259. prop: 'engrave',
  260. label: '刻码',
  261. align: 'center'
  262. }
  263. ]
  264. };
  265. },
  266. created() {
  267. this.requestDict('产地');
  268. this.requestDict('生产类型');
  269. },
  270. computed: {
  271. clientEnvironmentId() {
  272. return this.$store.state.user.info.clientEnvironmentId;
  273. },
  274. competAnalysisListcolumns() {
  275. return [
  276. {
  277. width: 45,
  278. type: 'index',
  279. columnKey: 'index',
  280. align: 'center',
  281. fixed: 'left'
  282. },
  283. {
  284. width: 200,
  285. prop: 'productName',
  286. label: '名称',
  287. slot: 'productName',
  288. align: 'center'
  289. },
  290. {
  291. width: 120,
  292. prop: 'productCode',
  293. label: '编码',
  294. slot: 'productCode',
  295. align: 'center'
  296. },
  297. {
  298. width: 200,
  299. prop: 'productCategoryName',
  300. label: '类型',
  301. slot: 'productCategoryName',
  302. align: 'center'
  303. },
  304. {
  305. width: 160,
  306. prop: 'batchNo',
  307. label: '批次号',
  308. slot: 'batchNo',
  309. align: 'center'
  310. },
  311. {
  312. width: 160,
  313. prop: 'productBrand',
  314. label: '牌号',
  315. slot: 'productBrand',
  316. align: 'center'
  317. },
  318. {
  319. width: 120,
  320. prop: 'modelType',
  321. label: '型号',
  322. slot: 'modelType',
  323. align: 'center'
  324. },
  325. {
  326. width: 120,
  327. prop: 'specification',
  328. label: '规格',
  329. slot: 'specification',
  330. align: 'center'
  331. },
  332. {
  333. width: 120,
  334. prop: 'imgCode',
  335. align: 'center',
  336. label: '图号/件号',
  337. showOverflowTooltip: true
  338. },
  339. {
  340. width: 120,
  341. prop: 'produceType',
  342. align: 'center',
  343. label: '属性类型',
  344. formatter: (row, column) => {
  345. if (row.produceType) {
  346. return row.produceType
  347. .map((item) => {
  348. return lbjtList[item];
  349. })
  350. .toString();
  351. }
  352. },
  353. showOverflowTooltip: true
  354. },
  355. {
  356. width: 120,
  357. prop: 'customerMark',
  358. label: '客户代号',
  359. slot: 'customerMark',
  360. align: 'center'
  361. },
  362. {
  363. width: 200,
  364. prop: 'warehouseName',
  365. label: '仓库名称',
  366. slot: 'warehouseName',
  367. align: 'center'
  368. },
  369. // {
  370. // width: 100,
  371. // prop: 'warehouseNum',
  372. // label: '库存',
  373. // align: 'center',
  374. // slot: 'warehouseNum',
  375. // headerSlot: 'headerWarehouseNum'
  376. // },
  377. // {
  378. // width: 100,
  379. // prop: 'stockLedger',
  380. // label: '发货明细',
  381. // slot: 'stockLedger',
  382. // align: 'center'
  383. // },
  384. {
  385. width: 120,
  386. prop: 'totalCount',
  387. label: '发货数量',
  388. slot: 'totalCount',
  389. headerSlot: 'headerTotalCount',
  390. align: 'center'
  391. },
  392. {
  393. width: 120,
  394. prop: 'orderTotalCount',
  395. label: '订单数量',
  396. slot: 'orderTotalCount',
  397. align: 'center'
  398. },
  399. {
  400. width: 80,
  401. prop: 'measuringUnit',
  402. label: '计量单位',
  403. slot: 'measuringUnit',
  404. align: 'center'
  405. },
  406. {
  407. width: 120,
  408. prop: 'blockCount',
  409. label: '发货块数',
  410. slot: 'blockCount',
  411. align: 'center',
  412. show: this.clientEnvironmentId == '4'
  413. },
  414. {
  415. width: 120,
  416. prop: 'singleWeight',
  417. label: '单重',
  418. slot: 'singleWeight',
  419. align: 'center'
  420. },
  421. {
  422. width: 200,
  423. prop: 'receiveTotalWeight',
  424. label: '收货总重',
  425. slot: 'receiveTotalWeight',
  426. align: 'center',
  427. headerSlot: 'headerTotalCount'
  428. },
  429. {
  430. width: 100,
  431. prop: 'sendTotalWeight',
  432. label: '发货总重',
  433. slot: 'sendTotalWeight',
  434. align: 'center'
  435. },
  436. {
  437. width: 100,
  438. prop: 'increaseTotalWeight',
  439. label: '增重重量',
  440. slot: 'increaseTotalWeight',
  441. align: 'center'
  442. },
  443. {
  444. width: 100,
  445. prop: 'weightUnit',
  446. label: '重量单位',
  447. slot: 'weightUnit',
  448. align: 'center'
  449. },
  450. {
  451. width: 160,
  452. prop: 'pricingWay',
  453. label: '计价方式',
  454. slot: 'pricingWay',
  455. align: 'center',
  456. formatter: (row, column) => {
  457. return row.pricingWay == 1
  458. ? '按数量计费'
  459. : row.pricingWay == 2
  460. ? '按重量计费'
  461. : '';
  462. }
  463. },
  464. {
  465. width: 160,
  466. prop: 'singlePrice',
  467. label: '单价',
  468. slot: 'singlePrice',
  469. align: 'center'
  470. },
  471. {
  472. width: 160,
  473. prop: 'taxRate',
  474. label: '税率',
  475. formatter: (_row, _column, cellValue) => {
  476. return _row.taxRate ? _row.taxRate + '%' : '';
  477. },
  478. align: 'center'
  479. },
  480. {
  481. width: 160,
  482. prop: 'notaxSinglePrice',
  483. label: '不含税单价',
  484. align: 'center'
  485. },
  486. {
  487. width: 160,
  488. prop: 'discountSinglePrice',
  489. label: '折后单价',
  490. slot: 'discountSinglePrice',
  491. align: 'center'
  492. },
  493. {
  494. width: 120,
  495. prop: 'totalPrice',
  496. label: '合计',
  497. slot: 'totalPrice',
  498. align: 'center'
  499. },
  500. // {
  501. // width: 160,
  502. // prop: 'notaxTotalPrice',
  503. // label: '含税合计',
  504. // align: 'center'
  505. // },
  506. {
  507. width: 120,
  508. prop: 'discountTotalPrice',
  509. label: '折后合计',
  510. slot: 'discountTotalPrice',
  511. align: 'center'
  512. },
  513. ...this.dynamicsColumns,
  514. {
  515. width: 120,
  516. prop: 'deliveryDays',
  517. label: '交期(天)',
  518. slot: 'deliveryDays',
  519. align: 'center'
  520. },
  521. {
  522. width: 200,
  523. prop: 'guaranteePeriod',
  524. label: '质保期',
  525. slot: 'guaranteePeriod',
  526. formatter: (_row, _column, cellValue) => {
  527. return (
  528. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  529. );
  530. },
  531. align: 'center'
  532. },
  533. // {
  534. // width: 160,
  535. // prop: 'guaranteePeriodDeadline',
  536. // label: '质保截止日期',
  537. // slot: 'guaranteePeriodDeadline',
  538. // align: 'center'
  539. // },
  540. {
  541. prop: 'provenance',
  542. label: '产地',
  543. slot: 'provenance',
  544. align: 'center',
  545. // show:this.contractBookType==2,
  546. minWidth: 200,
  547. showOverflowTooltip: true,
  548. formatter: (row, column) => {
  549. return row.provenance && row.provenance.length
  550. ? row.provenance
  551. .map((item) => this.getDictValue('产地', item))
  552. .join(',')
  553. : '';
  554. }
  555. },
  556. {
  557. width: 130,
  558. prop: 'technicalAnswerName',
  559. label: '技术答疑人',
  560. slot: 'technicalAnswerName',
  561. align: 'center'
  562. },
  563. {
  564. width: 220,
  565. prop: 'technicalParams',
  566. label: '技术参数',
  567. slot: 'technicalParams',
  568. align: 'center'
  569. },
  570. {
  571. width: 240,
  572. prop: 'technicalDrawings',
  573. label: '技术图纸',
  574. slot: 'technicalDrawings',
  575. align: 'center'
  576. },
  577. {
  578. width: 220,
  579. prop: 'remark',
  580. label: '备注',
  581. slot: 'remark',
  582. align: 'center'
  583. }
  584. ];
  585. }
  586. },
  587. methods: {
  588. async open(row) {
  589. this.activeComp = 'main';
  590. this.visible = true;
  591. await this.getDetailData(row.id);
  592. console.log(this.competAnalysisListcolumns);
  593. },
  594. handleTag(val) {
  595. this.activeComp = val;
  596. if (val == 'store') {
  597. this.$nextTick(() => {
  598. this.$refs.innerBoundDetailsRef._getInfo(this.form.docNo);
  599. });
  600. }
  601. },
  602. cancel() {
  603. this.$nextTick(() => {
  604. // 关闭后,销毁所有的表单数据
  605. (this.form = copyObj(this.formDef)),
  606. (this.otherForm = copyObj(this.otherFormDef)),
  607. (this.tableBankData = []);
  608. this.tableLinkData = [];
  609. this.visible = false;
  610. });
  611. },
  612. downloadFile(file) {
  613. getFile({ objectName: file.storePath }, file.name);
  614. },
  615. async getDetailData(id) {
  616. this.loading = true;
  617. const data = await getSendSaleOrderrecordDetailSplit(id);
  618. this.loading = false;
  619. if (data) {
  620. data.productList.forEach((item) => {
  621. item.pricingWay = item.pricingWay || data.pricingWay;
  622. });
  623. this.form = data;
  624. this.detailData = data;
  625. this.$refs.taskInfoTableRef &&
  626. this.$refs.taskInfoTableRef.putTableValue(
  627. data.logisticTrakListNoteVOList
  628. );
  629. this.$refs.stowageTableRef &&
  630. this.$refs.stowageTableRef.putTableValue(data.carList);
  631. this.$refs.palletTableRef &&
  632. this.$refs.palletTableRef.putTableValue(data.trayList);
  633. this.form.pricingWay = data?.saleOrder?.pricingWay;
  634. this.$refs.replaceRef &&
  635. this.$refs.replaceRef.putTableValue(data.replaceList);
  636. }
  637. }
  638. }
  639. };
  640. </script>
  641. <style scoped lang="scss">
  642. .ele-dialog-form {
  643. .el-form-item {
  644. margin-bottom: 10px;
  645. }
  646. }
  647. .headbox {
  648. display: flex;
  649. justify-content: flex-start;
  650. align-items: center;
  651. .amount {
  652. font-size: 14px;
  653. font-weight: bold;
  654. margin-right: 20px;
  655. }
  656. }
  657. </style>