outdetails.vue 31 KB

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