outdetails.vue 30 KB

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