innerdetails.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050
  1. <template>
  2. <div class="ele-body">
  3. <el-card shadow="never">
  4. <div>
  5. <div class="content-detail">
  6. <header-title title="基本信息" size="16px"></header-title>
  7. <div class="mt20">
  8. <el-form label-width="120px">
  9. <el-col :span="8">
  10. <el-form-item label="入库单:">
  11. <span>{{ infoData.bizNo }}</span>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :span="8">
  15. <el-form-item label="入库物品类型:">
  16. <span>{{ handleAssetType(extInfo?.assetType) }}</span>
  17. </el-form-item>
  18. </el-col>
  19. <el-col :span="8">
  20. <el-form-item label="入库场景:">
  21. <span>{{ getSceneState(infoData?.bizType) }}</span>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="8">
  25. <el-form-item label="关联订单:">
  26. <span>{{ extInfo?.documentSource }}</span>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="8">
  30. <el-form-item label="权属部门:">
  31. <span>{{ extInfo?.deptName }}</span>
  32. </el-form-item>
  33. </el-col>
  34. <el-col :span="8">
  35. <el-form-item label="入库登记人:">
  36. <span>{{ extInfo?.createUserName }}</span>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="8">
  40. <el-form-item label="入库时间:">
  41. <span>{{ infoData?.storageTime }}</span>
  42. </el-form-item>
  43. </el-col>
  44. <!-- <el-col :span="8">
  45. <el-form-item label="状态:">
  46. <span>{{ stepsTitle }}</span>
  47. </el-form-item>
  48. </el-col> -->
  49. <el-col :span="8">
  50. <el-form-item label="审核人:">
  51. <span>{{ infoData?.verifyName }}</span>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="8" v-if="infoData?.bizType == 2">
  55. <el-form-item label="客户:">
  56. <span>{{ infoData?.clientName }}</span>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="8" v-if="infoData?.bizType == 2">
  60. <el-form-item label="供应商:">
  61. <span>{{ extInfo?.supplierName }}</span>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8">
  65. <el-form-item label="送货人:">
  66. <span>{{ infoData?.fromUser }}</span>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="8">
  70. <el-form-item label="送货人联系方式:">
  71. <span>{{ extInfo?.deliveryPhone }}</span>
  72. </el-form-item>
  73. </el-col>
  74. <el-col :span="8">
  75. <el-form-item label="附件:">
  76. <el-link
  77. type="primary"
  78. v-for="item in infoData?.qualityFile"
  79. @click="download(item)"
  80. :key="item.name"
  81. >{{ item.name }}</el-link
  82. >
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="24">
  86. <el-form-item label="备注:">
  87. <span>{{ infoData?.remark }}</span>
  88. </el-form-item>
  89. </el-col>
  90. </el-form>
  91. </div>
  92. </div>
  93. <div class="content-detail mt20">
  94. <header-title title="产品信息" size="16px"></header-title>
  95. <el-table
  96. ref="productListTable"
  97. :data="productList"
  98. tooltip-effect="dark"
  99. border
  100. :max-height="300"
  101. :header-cell-style="rowClass"
  102. @selection-change="handleSelectionProductChange"
  103. >
  104. <el-table-column label="序号" type="index" width="50">
  105. </el-table-column>
  106. <el-table-column
  107. type="selection"
  108. width="55"
  109. align="center"
  110. :selectable="selectable"
  111. >
  112. </el-table-column>
  113. <el-table-column
  114. label="编码"
  115. prop="categoryCode"
  116. align="center"
  117. :show-overflow-tooltip="true"
  118. ></el-table-column>
  119. <el-table-column
  120. label="名称"
  121. align="center"
  122. prop="categoryName"
  123. :show-overflow-tooltip="true"
  124. ></el-table-column>
  125. <el-table-column
  126. label="级别"
  127. prop="level"
  128. align="center"
  129. >
  130. </el-table-column>
  131. <el-table-column
  132. label="型号"
  133. align="center"
  134. prop="categoryModel"
  135. :show-overflow-tooltip="true"
  136. ></el-table-column>
  137. <el-table-column
  138. label="规格"
  139. align="center"
  140. prop="specification"
  141. :show-overflow-tooltip="true"
  142. ></el-table-column>
  143. <el-table-column
  144. label="牌号"
  145. align="center"
  146. prop="brandNum"
  147. :show-overflow-tooltip="true"
  148. ></el-table-column>
  149. <el-table-column
  150. v-for="(item, index) in newColumns"
  151. :label="item.label"
  152. :align="item.align"
  153. :prop="item.prop"
  154. :show-overflow-tooltip="item.showOverflowTooltip"
  155. ></el-table-column>
  156. <el-table-column
  157. label="批次号"
  158. prop="batchNo"
  159. align="center"
  160. :show-overflow-tooltip="true"
  161. >
  162. </el-table-column>
  163. <el-table-column
  164. label="客户代号"
  165. prop="clientCode"
  166. :show-overflow-tooltip="true"
  167. >
  168. </el-table-column>
  169. <el-table-column
  170. label="供应商"
  171. prop="supplierName"
  172. :show-overflow-tooltip="true"
  173. width="120"
  174. >
  175. </el-table-column>
  176. <el-table-column
  177. label="供应商代号"
  178. prop="supplierCode"
  179. :show-overflow-tooltip="true"
  180. width="120"
  181. >
  182. </el-table-column>
  183. <el-table-column label="数量" prop="packingQuantity" align="center">
  184. <template slot-scope="{ row, $index }">
  185. {{ row.packingQuantity }} {{ row.packingUnit }}
  186. </template>
  187. </el-table-column>
  188. <el-table-column
  189. label="计量数量"
  190. prop="measureQuantity"
  191. width="100"
  192. align="center"
  193. >
  194. </el-table-column>
  195. <el-table-column label="计量单位" prop="measureUnit" align="center">
  196. <template slot-scope="{ row, $index }">
  197. <template>
  198. {{ row.measureUnit }}
  199. </template>
  200. </template>
  201. </el-table-column>
  202. <el-table-column
  203. label="重量"
  204. prop="weight"
  205. align="center"
  206. :show-overflow-tooltip="true"
  207. >
  208. </el-table-column>
  209. <el-table-column
  210. label="重量单位"
  211. prop="weightUnit"
  212. align="center"
  213. :show-overflow-tooltip="true"
  214. >
  215. </el-table-column>
  216. <el-table-column label="单价" prop="price" align="center">
  217. <template slot-scope="{ row }">
  218. <template>
  219. {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
  220. </template>
  221. </template>
  222. </el-table-column>
  223. <el-table-column
  224. label="金额"
  225. align="center"
  226. prop="contentImage"
  227. :show-overflow-tooltip="true"
  228. >
  229. <template slot-scope="{ row, $index }">
  230. {{ row.totalMoney ? row.totalMoney : 0 }}
  231. </template>
  232. </el-table-column>
  233. <el-table-column
  234. v-if="clientEnvironmentId == 4"
  235. label="采购原因"
  236. align="center"
  237. prop="purpose"
  238. :show-overflow-tooltip="true"
  239. ></el-table-column>
  240. <el-table-column
  241. label="仓库"
  242. prop="warehouseName"
  243. :show-overflow-tooltip="true"
  244. >
  245. </el-table-column>
  246. <el-table-column
  247. label="生产日期"
  248. prop="detailProductionDate"
  249. :show-overflow-tooltip="true"
  250. >
  251. </el-table-column>
  252. <el-table-column
  253. label="采购日期"
  254. prop="detailPurchaseDate"
  255. :show-overflow-tooltip="true"
  256. >
  257. </el-table-column>
  258. <el-table-column
  259. label="失效日期"
  260. prop="detailExpireDate"
  261. :show-overflow-tooltip="true"
  262. >
  263. </el-table-column>
  264. </el-table>
  265. </div>
  266. <div class="mt20">
  267. <header-title :title="`包装明细`" size="16px"></header-title>
  268. <el-table
  269. ref="showPackingListTable"
  270. :data="showPackingList"
  271. tooltip-effect="dark"
  272. :max-height="300"
  273. border
  274. :row-class-name="tableRowClassName"
  275. :header-cell-style="rowClass"
  276. v-el-table-infinite-scroll="pickingHandleScroll"
  277. @selection-change="handleSelectionChange"
  278. >
  279. <el-table-column label="序号" type="index" width="50">
  280. </el-table-column>
  281. <el-table-column
  282. type="selection"
  283. width="55"
  284. align="center"
  285. :selectable="selectablePick"
  286. >
  287. </el-table-column>
  288. <el-table-column
  289. label="编码"
  290. prop="categoryCode"
  291. :show-overflow-tooltip="true"
  292. ></el-table-column>
  293. <el-table-column
  294. label="名称"
  295. prop="categoryName"
  296. :show-overflow-tooltip="true"
  297. ></el-table-column>
  298. <el-table-column
  299. label="批次号"
  300. prop="batchNo"
  301. :show-overflow-tooltip="true"
  302. ></el-table-column>
  303. <el-table-column
  304. label="发货条码"
  305. prop="barcodes"
  306. :show-overflow-tooltip="true"
  307. ></el-table-column>
  308. <el-table-column
  309. label="包装编码"
  310. prop="packageNo"
  311. :show-overflow-tooltip="true"
  312. ></el-table-column>
  313. <el-table-column
  314. label="包装数量"
  315. prop="packingQuantity"
  316. :show-overflow-tooltip="true"
  317. ></el-table-column>
  318. <el-table-column
  319. label="包装单位"
  320. prop="packingUnit"
  321. :show-overflow-tooltip="true"
  322. ></el-table-column>
  323. <el-table-column
  324. label="计量数量"
  325. prop="measureQuantity"
  326. :show-overflow-tooltip="true"
  327. ></el-table-column>
  328. <el-table-column
  329. label="计量单位"
  330. prop="measureUnit"
  331. :show-overflow-tooltip="true"
  332. ></el-table-column>
  333. <el-table-column
  334. label="物料代号"
  335. prop="materielDesignation"
  336. :show-overflow-tooltip="true"
  337. >
  338. </el-table-column>
  339. <el-table-column
  340. label="客户代号"
  341. prop="clientCode"
  342. :show-overflow-tooltip="true"
  343. >
  344. </el-table-column>
  345. <el-table-column
  346. label="供应商"
  347. prop="supplierName"
  348. :show-overflow-tooltip="true"
  349. width="120"
  350. >
  351. </el-table-column>
  352. <el-table-column
  353. label="供应商代号"
  354. prop="supplierCode"
  355. :show-overflow-tooltip="true"
  356. width="120"
  357. >
  358. </el-table-column>
  359. <el-table-column
  360. label="刻码"
  361. prop="engrave"
  362. :show-overflow-tooltip="true"
  363. >
  364. </el-table-column>
  365. <el-table-column
  366. label="重量"
  367. prop="weight"
  368. :show-overflow-tooltip="true"
  369. >
  370. </el-table-column>
  371. <el-table-column
  372. label="重量单位"
  373. prop="weightUnit"
  374. :show-overflow-tooltip="true"
  375. >
  376. </el-table-column>
  377. <el-table-column
  378. label="质检结果"
  379. prop="result"
  380. :show-overflow-tooltip="true"
  381. >
  382. <template slot-scope="{ row }">
  383. <span>{{ qualityResults[row.result] }}</span>
  384. </template>
  385. </el-table-column>
  386. <el-table-column
  387. label="质检状态"
  388. prop="status"
  389. :show-overflow-tooltip="true"
  390. >
  391. <template slot-scope="{ row }">
  392. <span>{{ qualityStatus[row.status] }}</span>
  393. </template>
  394. </el-table-column>
  395. <el-table-column
  396. label="仓库"
  397. prop="warehouseName"
  398. :show-overflow-tooltip="true"
  399. >
  400. </el-table-column>
  401. <el-table-column
  402. label="货区"
  403. prop="areaName"
  404. :show-overflow-tooltip="true"
  405. >
  406. </el-table-column>
  407. <el-table-column
  408. label="货架"
  409. prop="goodsShelfName"
  410. :show-overflow-tooltip="true"
  411. >
  412. </el-table-column>
  413. <el-table-column
  414. label="货位"
  415. prop="goodsAllocationName"
  416. :show-overflow-tooltip="true"
  417. >
  418. </el-table-column>
  419. <el-table-column
  420. label="生产日期"
  421. prop="productionDate"
  422. :show-overflow-tooltip="true"
  423. >
  424. </el-table-column>
  425. <el-table-column
  426. label="采购日期"
  427. prop="purchaseDate"
  428. :show-overflow-tooltip="true"
  429. >
  430. </el-table-column>
  431. <el-table-column
  432. label="失效日期"
  433. prop="expireDate"
  434. :show-overflow-tooltip="true"
  435. >
  436. </el-table-column>
  437. </el-table>
  438. </div>
  439. <!-- <div class="mt20">
  440. <header-title :title="`物料明细`" size="16px"> </header-title>
  441. <el-table
  442. ref="multipleTable"
  443. :data="showMaterialList"
  444. tooltip-effect="dark"
  445. :max-height="300"
  446. border
  447. :row-class-name="tableRowClassName"
  448. :header-cell-style="rowClass"
  449. style="width: 100%"
  450. stripe
  451. height="300px"
  452. v-el-table-infinite-scroll="materielHandleScroll"
  453. >
  454. <el-table-column label="序号" type="index" width="50">
  455. </el-table-column>
  456. <el-table-column
  457. label="编码"
  458. prop="categoryCode"
  459. :show-overflow-tooltip="true"
  460. ></el-table-column>
  461. <el-table-column
  462. label="名称"
  463. prop="categoryName"
  464. :show-overflow-tooltip="true"
  465. ></el-table-column>
  466. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  467. <el-table-column
  468. label="物料编码"
  469. prop="materialCode"
  470. :show-overflow-tooltip="true"
  471. ></el-table-column>
  472. <el-table-column
  473. label="发货条码"
  474. prop="barcodes"
  475. :show-overflow-tooltip="true"
  476. ></el-table-column>
  477. <el-table-column
  478. label="计量数量"
  479. prop="measureQuantity"
  480. ></el-table-column>
  481. <el-table-column
  482. label="计量单位"
  483. prop="measureUnit"
  484. ></el-table-column>
  485. <el-table-column label="物料代号" prop="materielDesignation">
  486. </el-table-column>
  487. <el-table-column label="客户代号" prop="clientCode">
  488. </el-table-column>
  489. <el-table-column label="刻码" prop="engrave"> </el-table-column>
  490. <el-table-column width="100" label="重量" prop="weight">
  491. </el-table-column>
  492. <el-table-column label="重量单位" prop="weightUnit">
  493. </el-table-column>
  494. <el-table-column label="质检结果" prop="result" width="120">
  495. <template slot-scope="{ row }">
  496. <span>{{ qualityResults[row.result] }}</span>
  497. </template>
  498. </el-table-column>
  499. <el-table-column label="质检状态" prop="status" width="120">
  500. <template slot-scope="{ row }">
  501. <span>{{ qualityStatus[row.status] }}</span>
  502. </template>
  503. </el-table-column>
  504. </el-table>
  505. </div> -->
  506. </div>
  507. </el-card>
  508. </div>
  509. </template>
  510. <script>
  511. import elTableInfiniteScroll from 'el-table-infinite-scroll';
  512. import { getFile } from '@/api/system/file/index.js';
  513. import { fieldModelAPI } from '@/api/main';
  514. import { allCategoryLevel, getInfoBySourceBizNoAPI } from '@/api/wms';
  515. import { mapGetters, mapActions } from 'vuex';
  516. import { useDictLabel } from '@/utils/dict';
  517. import { sceneStateEnum } from '@/enum/dict';
  518. export default {
  519. components: {},
  520. directives: {
  521. 'el-table-infinite-scroll': elTableInfiniteScroll
  522. },
  523. data() {
  524. return {
  525. newColumns: [], // 动态表头
  526. qualityStatus: {
  527. 0: '未质检',
  528. 1: '待检',
  529. 2: '已质检'
  530. }, // 质检状态
  531. qualityResults: {
  532. 1: '合格',
  533. 2: '不合格',
  534. 3: '让步接收'
  535. }, // 质检结果 1合格 2不合格
  536. productList: [], // 产品列表
  537. showPackingList: [], // 展示的包装列表
  538. packingList: [], // 包装列表
  539. showMaterialList: [], // 展示物料列表
  540. materialList: [], // 物料列表
  541. extInfo: {}, // 扩展信息
  542. pageSize: 20,
  543. pickingPageNum: 1,
  544. materielPageNum: 1,
  545. productSelection: [],
  546. multipleSelection: [],
  547. codeList: [],
  548. infoData: {},
  549. // stepsTitle: '已完成',
  550. stepsStatus: 'success',
  551. active: 0
  552. };
  553. },
  554. watch: {
  555. packingList: {
  556. handler(newVal) {
  557. this.showPackingList = newVal.slice(
  558. 0,
  559. this.pageSize * (this.pickingPageNum > 0 ? this.pickingPageNum : 1)
  560. );
  561. },
  562. deep: true
  563. },
  564. materialList: {
  565. handler(newVal) {
  566. this.showMaterialList = newVal.slice(
  567. 0,
  568. this.pageSize *
  569. (this.materielPageNum > 0 ? this.materielPageNum : 1)
  570. );
  571. },
  572. deep: true
  573. }
  574. },
  575. computed: {
  576. ...mapGetters(['getDictValue']),
  577. clientEnvironmentId() {
  578. return this.$store.state.user.info.clientEnvironmentId;
  579. }
  580. },
  581. created() {
  582. this.getFieldModel();
  583. this.requestDict('类型用途');
  584. this.getAllCategoryType();
  585. this._getInfo();
  586. },
  587. methods: {
  588. selectable(row, index) {
  589. let arr = this.multipleSelection.map((item) => {
  590. return item.batchNo + item.categoryId;
  591. });
  592. return !arr.includes(row.batchNo + row.categoryId);
  593. },
  594. selectablePick(row, index) {
  595. let arr = this.productSelection.map((item) => {
  596. return item.batchNo + item.categoryId;
  597. });
  598. return !arr.includes(row.batchNo + row.categoryId);
  599. },
  600. // 获取动态表头
  601. getFieldModel() {
  602. fieldModelAPI({ fieldModel: 't_main_category' }).then((res) => {
  603. let newRes = res.map((m) => {
  604. return {
  605. prop: 'extField.' + m.prop,
  606. label: m.label,
  607. align: 'center',
  608. showOverflowTooltip: true
  609. };
  610. });
  611. this.newColumns = [...newRes];
  612. });
  613. },
  614. isUpper(row) {
  615. let filterPackingList = this.packingList.filter((packingItem) => {
  616. return packingItem.parentIndex === row.index;
  617. });
  618. let boolen = filterPackingList.every((item) => {
  619. return item.areaId && item.goodsShelfId && item.goodsAllocationId;
  620. });
  621. return boolen;
  622. },
  623. formDataData() {
  624. // 处理包装数据
  625. this.packingList = this.packingList.map((packingItem) => {
  626. return {
  627. ...packingItem,
  628. materialDetailList: this.materialList.filter(
  629. (item) => item.parentIndex === packingItem.index
  630. )
  631. };
  632. });
  633. // 处理产品数据
  634. this.productList = this.productList.map((productItem) => {
  635. return {
  636. ...productItem,
  637. outInDetailRecordRequestList: this.packingList.filter(
  638. (item) => item.parentIndex === productItem.index
  639. )
  640. };
  641. });
  642. this.infoData.outInDetailList = this.productList;
  643. },
  644. pickingHandleScroll() {
  645. if (this.showPackingList.length < this.packingList.length) {
  646. if (this.packingList.length > this.pageSize) {
  647. this.pickingPageNum += 1;
  648. }
  649. this.pickingFetchData();
  650. }
  651. },
  652. pickingFetchData() {
  653. const start = (this.pickingPageNum - 1) * this.pageSize;
  654. const end = start + this.pageSize;
  655. this.showPackingList = this.showPackingList.concat(
  656. this.packingList.slice(start, end)
  657. );
  658. },
  659. materielHandleScroll() {
  660. if (this.showMaterialList.length < this.materialList.length) {
  661. if (this.materialList.length > this.pageSize) {
  662. this.materielPageNum += 1;
  663. }
  664. this.materielFetchData();
  665. }
  666. },
  667. materielFetchData() {
  668. const start = (this.materielPageNum - 1) * this.pageSize;
  669. const end = start + this.pageSize;
  670. this.showMaterialList = this.showMaterialList.concat(
  671. this.materialList.slice(start, end)
  672. );
  673. },
  674. ...mapActions('dict', ['requestDict']),
  675. getSceneState: useDictLabel(sceneStateEnum),
  676. handleAssetType(r) {
  677. let codes = r.split(',');
  678. let name = codes.map((code) => {
  679. return this.codeList.find((val) => val.dictCode == code)?.dictValue;
  680. });
  681. return name.toString();
  682. },
  683. tableRowClassName({ row, rowIndex }) {
  684. if (row.result == 2) {
  685. return 'warning-row';
  686. } else {
  687. return '';
  688. }
  689. },
  690. goBack() {
  691. this.$router.go(-1);
  692. },
  693. rowClass({ row, column, rowIndex, columnIndex }) {
  694. if (rowIndex === 1) {
  695. return {
  696. display: 'none',
  697. background: '#EEEEEE'
  698. };
  699. }
  700. return { background: '#0000' };
  701. },
  702. async getAllCategoryType() {
  703. const { data } = await allCategoryLevel();
  704. this.codeList = data.map((item) => {
  705. return { dictCode: item.id, dictValue: item.name };
  706. });
  707. },
  708. async _getInfo(sourceBizNo) {
  709. if (!sourceBizNo) {
  710. return;
  711. }
  712. const res = await getInfoBySourceBizNoAPI(sourceBizNo);
  713. this.infoData = res;
  714. this.extInfo = res.extInfo;
  715. this.productList = res?.outInDetailList?.map(
  716. (productItem, productIndex) => {
  717. return {
  718. ...productItem,
  719. index: this.productList?.length + productIndex,
  720. outInDetailRecordRequestList:
  721. productItem.outInDetailRecordRequestList.map(
  722. (packingItem, packingIndex) => {
  723. return {
  724. ...packingItem,
  725. index:
  726. this.productList?.length +
  727. productIndex +
  728. '-' +
  729. packingIndex, // 包装索引
  730. parentIndex: this.productList?.length + productIndex, // 物品索引
  731. categoryName: productItem.categoryName,
  732. categoryCode: productItem.categoryCode,
  733. materialDetailList: packingItem.materialDetailList.map(
  734. (materialItem, materialIndex) => {
  735. return {
  736. ...materialItem,
  737. index:
  738. this.productList?.length +
  739. productIndex +
  740. '-' +
  741. packingIndex +
  742. '——' +
  743. materialIndex, // 包装索引
  744. parentIndex:
  745. this.productList?.length +
  746. productIndex +
  747. '-' +
  748. packingIndex, // 物品索引
  749. categoryName: productItem.categoryName,
  750. categoryCode: productItem.categoryCode
  751. };
  752. }
  753. )
  754. };
  755. }
  756. )
  757. };
  758. }
  759. );
  760. // 获取包装维度数据
  761. const arr = [];
  762. for (const key in this.productList) {
  763. for (const k in this.productList[key].outInDetailRecordRequestList) {
  764. arr.push({
  765. ...this.productList[key].outInDetailRecordRequestList[k]
  766. });
  767. }
  768. }
  769. this.packingList = arr;
  770. // 获取物料维度数据
  771. let iArr = [];
  772. arr.forEach((item) => {
  773. item.materialDetailList.forEach((ele) => {
  774. iArr.push({ ...ele });
  775. });
  776. });
  777. this.materialList = iArr;
  778. this.pickingFetchData();
  779. this.materielFetchData();
  780. },
  781. handleSelectionChange(val) {
  782. this.multipleSelection = val;
  783. },
  784. handleSelectionProductChange(val) {
  785. this.productSelection = val;
  786. },
  787. setMultipleSelection() {
  788. return this.multipleSelection.map((item) => {
  789. item['packageId'] = item.id;
  790. item['outInCode'] = item.bizNo;
  791. item['outboundType'] = item.outType;
  792. item['outboundDetailId'] = item.id;
  793. item['productName'] = item.categoryName;
  794. item['productCode'] = item.categoryCode;
  795. item['measuringUnit'] = item.measureUnit;
  796. item['productId'] = item.categoryId;
  797. item['receiveTotalWeight'] = item.weight;
  798. this.productList.forEach((val) => {
  799. if (item.categoryCode == val.categoryCode) {
  800. item['warehouseId'] = val.warehouseId;
  801. item['warehouseName'] = val.warehouseName;
  802. }
  803. });
  804. item.id = '';
  805. return item;
  806. })||[]
  807. },
  808. setProductSelection() {
  809. return (
  810. this.productSelection.map((item) => {
  811. item['outInCode'] = item.bizNo;
  812. item['wmsOutId'] = item.outInId;
  813. item['wmsOutNo'] = item.bizNo;
  814. item['outboundType'] = item.outType;
  815. // item['outboundDetailId'] = item.id;
  816. item['productName'] = item.categoryName;
  817. item['productCode'] = item.categoryCode;
  818. item['measuringUnit'] = item.measureUnit;
  819. item['productId'] = item.categoryId;
  820. item['receiveTotalWeight'] = item.weight;
  821. item['provenance'] = item['provenance'] || [];
  822. item.id = '';
  823. return item;
  824. }) || []
  825. );
  826. },
  827. getValue() {
  828. return [...this.setMultipleSelection(), ...this.setProductSelection()];
  829. },
  830. download(row) {
  831. if (row.storePath) {
  832. getFile({ objectName: row.storePath }, row.name);
  833. }
  834. }
  835. }
  836. };
  837. </script>
  838. <style lang="scss" scoped>
  839. ::v-deep .warning-row {
  840. color: red;
  841. }
  842. ::v-deep .page-title {
  843. border-bottom: none;
  844. }
  845. ::v-deep .page-title-div {
  846. width: 100%;
  847. }
  848. .stepsStatus {
  849. width: 40%;
  850. margin: 0 auto;
  851. }
  852. .el-form-item {
  853. margin-bottom: 10px;
  854. }
  855. .p20 {
  856. padding: 20px;
  857. }
  858. .flex {
  859. display: flex;
  860. }
  861. .title {
  862. justify-content: space-between;
  863. border-bottom: 1px solid #ccc;
  864. padding-bottom: 5px;
  865. span {
  866. font-size: 16px;
  867. }
  868. .col {
  869. padding-left: 40px;
  870. font-size: 14px;
  871. color: #aaaaaa;
  872. }
  873. }
  874. .degree {
  875. margin-right: 10px;
  876. padding: 0px 15px;
  877. color: #fff;
  878. font-size: 13px;
  879. line-height: 23px;
  880. border-radius: 23px;
  881. display: flex;
  882. align-items: center;
  883. justify-content: space-between;
  884. span {
  885. width: 5px;
  886. height: 5px;
  887. border-radius: 100%;
  888. margin-right: 6px;
  889. background-color: #fff;
  890. }
  891. }
  892. .red {
  893. background-color: rgb(163, 0, 20);
  894. }
  895. .blue {
  896. background-color: #1989fa;
  897. }
  898. .createdInfo {
  899. justify-content: space-around;
  900. margin-top: 10px;
  901. font-size: 14px;
  902. .col {
  903. color: #6e6e6e;
  904. padding-right: 10px;
  905. }
  906. }
  907. .mt40 {
  908. margin-top: 40px;
  909. }
  910. .custSteps {
  911. margin-top: 20px;
  912. margin-left: 70px;
  913. .box {
  914. width: 158px;
  915. border: 1px solid #ccc;
  916. padding: 10px;
  917. flex-direction: row;
  918. flex-wrap: wrap;
  919. // justify-content: space-between;
  920. font-size: 12px;
  921. color: #9e9e9e;
  922. .x {
  923. width: 20px;
  924. height: 15px;
  925. margin-right: 5px;
  926. }
  927. .q {
  928. background-color: #d0e4d5;
  929. }
  930. .b {
  931. background-color: #1989fa;
  932. }
  933. .g {
  934. background-color: #157a2c;
  935. }
  936. .r {
  937. background-color: #a30014;
  938. }
  939. .a {
  940. align-items: center;
  941. margin-bottom: 10px;
  942. }
  943. .mr10 {
  944. margin-right: 10px;
  945. }
  946. .mb0 {
  947. margin-bottom: 0;
  948. }
  949. }
  950. .stepsInfo {
  951. // flex: 1;
  952. width: 483px;
  953. }
  954. }
  955. .mt20 {
  956. margin-top: 20px;
  957. }
  958. .content-detail {
  959. overflow: hidden;
  960. }
  961. .executor {
  962. font-size: 14px;
  963. .col {
  964. color: #6e6e6e;
  965. padding-right: 10px;
  966. }
  967. }
  968. .result {
  969. justify-content: space-around;
  970. }
  971. .mr20 {
  972. margin-right: 20px;
  973. }
  974. .details {
  975. font-size: 14px;
  976. margin-bottom: 10px;
  977. }
  978. .customSteps {
  979. margin-top: 40px;
  980. font-size: 14px;
  981. margin-left: 80px;
  982. .time {
  983. font-size: 12px;
  984. color: #6e6e6e;
  985. margin-right: 20px;
  986. position: relative;
  987. &::after {
  988. content: '';
  989. width: 1px;
  990. height: 100%;
  991. background-color: #157a2c;
  992. position: absolute;
  993. right: -26px;
  994. }
  995. }
  996. .flex:last-child {
  997. .time {
  998. &::after {
  999. display: none;
  1000. }
  1001. }
  1002. }
  1003. .round {
  1004. margin-right: 20px;
  1005. width: 10px;
  1006. height: 10px;
  1007. border-radius: 100%;
  1008. background-color: #157a2c;
  1009. position: relative;
  1010. span {
  1011. position: absolute;
  1012. top: 50%;
  1013. left: 50%;
  1014. width: 4px;
  1015. height: 4px;
  1016. background-color: #fff;
  1017. border-radius: 100%;
  1018. transform: translate(-2px, -2px);
  1019. }
  1020. }
  1021. .text {
  1022. .info {
  1023. margin-top: 10px;
  1024. width: 955px;
  1025. background-color: #f0f3f3;
  1026. overflow: hidden;
  1027. padding: 10px;
  1028. margin-bottom: 10px;
  1029. }
  1030. }
  1031. }
  1032. .switch_left li {
  1033. border-right: 1px solid rgba(222, 222, 222, 1);
  1034. border-left: 1px solid rgba(222, 222, 222, 1);
  1035. }
  1036. </style>