details.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973
  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="110px">
  9. <el-col :span="8">
  10. <el-form-item label="出库单号">
  11. <span>{{ infoData?.bizNo?.toString() }}</span>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :span="8">
  15. <el-form-item label="出库物品类型">
  16. <span>{{
  17. handleAssetType(infoData.extInfo?.assetType)
  18. }}</span>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="8">
  22. <el-form-item label="出库场景">
  23. <span>{{ getSceneState(infoData.bizType) }}</span>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :span="8">
  27. <el-form-item label="关联订单:">
  28. <span>{{ extInfo?.documentSource }}</span>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="8" v-if="infoData.bizType == 3">
  32. <el-form-item label="客户名称">
  33. <span>{{ infoData.clientName }}</span>
  34. </el-form-item> </el-col
  35. ><el-col :span="8" v-if="infoData.bizType == 3">
  36. <el-form-item label="客户联系人">
  37. <span>{{ infoData.clientUser }}</span>
  38. </el-form-item> </el-col
  39. ><el-col :span="8" v-if="infoData.bizType == 3">
  40. <el-form-item label="客户电话">
  41. <span>{{ infoData.clientPhone }}</span>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="8">
  45. <el-form-item
  46. :label="infoData.bizType == 4 ? '领料单' : '来源单据'"
  47. >
  48. <span>{{ infoData.sourceBizNo }}</span>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="8">
  52. <el-form-item label="领料人联系方式">
  53. <span>{{ infoData.fromUserPhone }}</span>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="8">
  57. <el-form-item label="出库登记人">
  58. <span>{{ infoData.extInfo?.createUserName }}</span>
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="8">
  62. <el-form-item label="权属部门">
  63. <span>{{ infoData.extInfo?.deptName }}</span>
  64. </el-form-item>
  65. </el-col>
  66. <!-- <el-col :span="8">
  67. <el-form-item label="创建时间">
  68. <span>{{ infoData.createTime }}</span>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="8">
  72. <el-form-item label="出库时间">
  73. <span>{{ infoData.createTime }}</span>
  74. </el-form-item>
  75. </el-col> -->
  76. <el-col :span="8">
  77. <el-form-item label="状态:">
  78. <span>{{ stepsTitle }}</span>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="8">
  82. <el-form-item label="领料人部门">
  83. <span>{{ infoData.extInfo?.verifyDeptName }}</span>
  84. </el-form-item>
  85. </el-col>
  86. <el-col :span="8">
  87. <el-form-item label="领料人">
  88. <span>{{ infoData.fromUser }}</span>
  89. </el-form-item>
  90. </el-col>
  91. <el-col :span="16">
  92. <el-form-item label="备注">
  93. <span>{{ infoData.remark }}</span>
  94. </el-form-item>
  95. </el-col>
  96. </el-form>
  97. </div>
  98. </div>
  99. <div class="content-detail mt20">
  100. <header-title title="产品信息" size="16px"></header-title>
  101. <el-table
  102. ref="productListTable"
  103. :data="productList"
  104. tooltip-effect="dark"
  105. :max-height="300"
  106. :header-cell-style="rowClass"
  107. border
  108. >
  109. <el-table-column label="序号" type="index" width="50">
  110. </el-table-column>
  111. <el-table-column
  112. minWidth="150"
  113. label="出库单号"
  114. prop="bizNo"
  115. v-if="isIds"
  116. align="center"
  117. :show-overflow-tooltip="true"
  118. ></el-table-column>
  119. <el-table-column
  120. label="仓库"
  121. prop="warehouseName"
  122. :show-overflow-tooltip="true"
  123. >
  124. </el-table-column>
  125. <el-table-column
  126. label="编码"
  127. prop="categoryCode"
  128. align="center"
  129. :show-overflow-tooltip="true"
  130. ></el-table-column>
  131. <el-table-column
  132. label="名称"
  133. align="center"
  134. prop="categoryName"
  135. :show-overflow-tooltip="true"
  136. ></el-table-column>
  137. <el-table-column
  138. v-if="clientEnvironmentId == 4"
  139. label="级别"
  140. prop="level"
  141. align="center"
  142. >
  143. </el-table-column>
  144. <el-table-column
  145. label="型号"
  146. align="center"
  147. prop="categoryModel"
  148. :show-overflow-tooltip="true"
  149. ></el-table-column>
  150. <el-table-column
  151. label="规格"
  152. align="center"
  153. prop="specification"
  154. :show-overflow-tooltip="true"
  155. ></el-table-column>
  156. <el-table-column
  157. label="牌号"
  158. align="center"
  159. prop="brandNum"
  160. :show-overflow-tooltip="true"
  161. ></el-table-column>
  162. <el-table-column
  163. v-for="(item, index) in newColumns"
  164. :label="item.label"
  165. :align="item.align"
  166. :prop="item.prop"
  167. :show-overflow-tooltip="item.showOverflowTooltip"
  168. ></el-table-column>
  169. <el-table-column
  170. label="批次号"
  171. prop="batchNo"
  172. align="center"
  173. :show-overflow-tooltip="true"
  174. >
  175. </el-table-column>
  176. <el-table-column
  177. label="包装数量"
  178. v-if="clientEnvironmentId == 3"
  179. prop="packingQuantity"
  180. align="center"
  181. >
  182. <template slot-scope="{ row, $index }">
  183. {{ row.packingQuantity }} {{ row.packingUnit }}
  184. </template>
  185. </el-table-column>
  186. <el-table-column
  187. v-else
  188. label="包装数量"
  189. prop="packingQuantity"
  190. width="80"
  191. ></el-table-column>
  192. <el-table-column
  193. v-if="clientEnvironmentId == 3"
  194. label="最小包装单元"
  195. align="center"
  196. width="120"
  197. prop="minPackingQuantity"
  198. >
  199. <template slot-scope="{ row, $index }">
  200. {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
  201. row.packingUnit
  202. }}
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. v-else
  207. label="单位"
  208. prop="packingUnit"
  209. ></el-table-column>
  210. <el-table-column
  211. label="计量数量"
  212. prop="measureQuantity"
  213. :show-overflow-tooltip="true"
  214. ></el-table-column>
  215. <el-table-column
  216. label="计量单位"
  217. prop="measureUnit"
  218. ></el-table-column>
  219. <el-table-column
  220. label="重量"
  221. prop="weight"
  222. align="center"
  223. :show-overflow-tooltip="true"
  224. >
  225. </el-table-column>
  226. <el-table-column
  227. label="重量单位"
  228. prop="weightUnit"
  229. align="center"
  230. :show-overflow-tooltip="true"
  231. >
  232. </el-table-column>
  233. <el-table-column label="机型" prop="modelKey" width="200">
  234. </el-table-column>
  235. <el-table-column label="颜色" prop="colorKey" width="200">
  236. </el-table-column>
  237. <el-table-column
  238. label="单价"
  239. prop="price"
  240. align="center"
  241. v-if="isPrice == 1"
  242. >
  243. <template slot-scope="{ row }">
  244. <template>
  245. {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
  246. </template>
  247. </template>
  248. </el-table-column>
  249. <el-table-column
  250. label="库存"
  251. prop="stockNum"
  252. align="center"
  253. :show-overflow-tooltip="true"
  254. >
  255. </el-table-column>
  256. <el-table-column
  257. v-if="isPrice == 1"
  258. label="金额"
  259. align="center"
  260. prop="contentImage"
  261. :show-overflow-tooltip="true"
  262. >
  263. <template slot-scope="{ row, $index }">
  264. {{ row.totalMoney ? row.totalMoney : 0 }}
  265. </template>
  266. </el-table-column>
  267. <el-table-column
  268. v-if="clientEnvironmentId == 4"
  269. label="采购原因"
  270. align="center"
  271. prop="purpose"
  272. :show-overflow-tooltip="true"
  273. ></el-table-column>
  274. <!-- <el-table-column
  275. label="仓库"
  276. prop="warehouseName"
  277. :show-overflow-tooltip="true"
  278. >
  279. </el-table-column> -->
  280. </el-table>
  281. </div>
  282. <div class="mt20">
  283. <header-title :title="`包装明细`" size="16px"></header-title>
  284. <el-table
  285. ref="showPackingListTable"
  286. :data="showPackingList"
  287. tooltip-effect="dark"
  288. :max-height="300"
  289. :row-class-name="tableRowClassName"
  290. :header-cell-style="rowClass"
  291. border
  292. v-el-table-infinite-scroll="pickingHandleScroll"
  293. >
  294. <el-table-column label="序号" type="index" width="50">
  295. </el-table-column>
  296. <el-table-column
  297. label="编码"
  298. prop="categoryCode"
  299. :show-overflow-tooltip="true"
  300. ></el-table-column>
  301. <el-table-column
  302. label="名称"
  303. prop="categoryName"
  304. :show-overflow-tooltip="true"
  305. ></el-table-column>
  306. <el-table-column
  307. label="批次号"
  308. prop="batchNo"
  309. :show-overflow-tooltip="true"
  310. ></el-table-column>
  311. <el-table-column
  312. label="发货条码"
  313. prop="barcodes"
  314. :show-overflow-tooltip="true"
  315. ></el-table-column>
  316. <el-table-column
  317. label="包装编码"
  318. prop="packageNo"
  319. :show-overflow-tooltip="true"
  320. ></el-table-column>
  321. <el-table-column
  322. label="包装数量"
  323. prop="packingQuantity"
  324. :show-overflow-tooltip="true"
  325. ></el-table-column>
  326. <el-table-column
  327. label="单位"
  328. prop="packingUnit"
  329. :show-overflow-tooltip="true"
  330. ></el-table-column>
  331. <el-table-column
  332. label="计量数量"
  333. prop="measureQuantity"
  334. :show-overflow-tooltip="true"
  335. ></el-table-column>
  336. <el-table-column
  337. label="计量单位"
  338. prop="measureUnit"
  339. :show-overflow-tooltip="true"
  340. ></el-table-column>
  341. <el-table-column
  342. label="物料代号"
  343. prop="materielDesignation"
  344. :show-overflow-tooltip="true"
  345. >
  346. </el-table-column>
  347. <el-table-column
  348. label="客户代号"
  349. prop="clientCode"
  350. :show-overflow-tooltip="true"
  351. >
  352. </el-table-column>
  353. <el-table-column
  354. label="刻码"
  355. prop="engrave"
  356. :show-overflow-tooltip="true"
  357. >
  358. </el-table-column>
  359. <el-table-column
  360. label="重量"
  361. prop="weight"
  362. :show-overflow-tooltip="true"
  363. >
  364. </el-table-column>
  365. <el-table-column
  366. label="重量单位"
  367. prop="weightUnit"
  368. :show-overflow-tooltip="true"
  369. >
  370. </el-table-column>
  371. <el-table-column label="机型" prop="modelKey" width="200">
  372. </el-table-column>
  373. <el-table-column label="颜色" prop="colorKey" width="200">
  374. </el-table-column>
  375. <el-table-column
  376. prop="supplierName"
  377. label="供应商"
  378. min-width="200"
  379. :show-overflow-tooltip="true"
  380. ></el-table-column>
  381. <el-table-column
  382. prop="supplierCode"
  383. label="供应商代号"
  384. min-width="200"
  385. :show-overflow-tooltip="true"
  386. ></el-table-column>
  387. <el-table-column
  388. label="质检结果"
  389. prop="result"
  390. :show-overflow-tooltip="true"
  391. >
  392. <template slot-scope="{ row }">
  393. <span>{{ qualityResults[row.result] }}</span>
  394. </template>
  395. </el-table-column>
  396. <el-table-column
  397. label="质检状态"
  398. prop="status"
  399. :show-overflow-tooltip="true"
  400. >
  401. <template slot-scope="{ row }">
  402. <span>{{ qualityStatus[row.status] }}</span>
  403. </template>
  404. </el-table-column>
  405. <el-table-column
  406. label="生产日期"
  407. prop="productionDate"
  408. :show-overflow-tooltip="true"
  409. >
  410. </el-table-column>
  411. <el-table-column
  412. label="采购日期"
  413. prop="purchaseDate"
  414. :show-overflow-tooltip="true"
  415. >
  416. </el-table-column>
  417. </el-table>
  418. </div>
  419. <!-- <div class="mt20">
  420. <header-title :title="`物料明细`" size="16px"> </header-title>
  421. <el-table
  422. ref="multipleTable"
  423. :data="showMaterialList"
  424. tooltip-effect="dark"
  425. :max-height="300"
  426. :row-class-name="tableRowClassName"
  427. :header-cell-style="rowClass"
  428. border
  429. style="width: 100%"
  430. stripe
  431. height="300px"
  432. v-el-table-infinite-scroll="materielHandleScroll"
  433. >
  434. <el-table-column label="序号" type="index" width="50">
  435. </el-table-column>
  436. <el-table-column
  437. label="编码"
  438. prop="categoryCode"
  439. :show-overflow-tooltip="true"
  440. ></el-table-column>
  441. <el-table-column
  442. label="名称"
  443. prop="categoryName"
  444. :show-overflow-tooltip="true"
  445. ></el-table-column>
  446. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  447. <el-table-column
  448. label="物料编码"
  449. prop="materialCode"
  450. :show-overflow-tooltip="true"
  451. ></el-table-column>
  452. <el-table-column
  453. label="发货条码"
  454. prop="barcodes"
  455. :show-overflow-tooltip="true"
  456. ></el-table-column>
  457. <el-table-column
  458. label="计量数量"
  459. prop="measureQuantity"
  460. ></el-table-column>
  461. <el-table-column
  462. label="计量单位"
  463. prop="measureUnit"
  464. ></el-table-column>
  465. <el-table-column label="物料代号" prop="materielDesignation">
  466. </el-table-column>
  467. <el-table-column label="客户代号" prop="clientCode">
  468. </el-table-column>
  469. <el-table-column label="刻码" prop="engrave"> </el-table-column>
  470. <el-table-column width="100" label="重量" prop="weight">
  471. </el-table-column>
  472. <el-table-column label="重量单位" prop="weightUnit">
  473. </el-table-column>
  474. <el-table-column label="质检结果" prop="result" width="120">
  475. <template slot-scope="{ row }">
  476. <span>{{ qualityResults[row.result] }}</span>
  477. </template>
  478. </el-table-column>
  479. <el-table-column label="质检状态" prop="status" width="120">
  480. <template slot-scope="{ row }">
  481. <span>{{ qualityStatus[row.status] }}</span>
  482. </template>
  483. </el-table-column>
  484. </el-table>
  485. </div> -->
  486. </div>
  487. </el-card>
  488. </div>
  489. </template>
  490. <script>
  491. import elTableInfiniteScroll from 'el-table-infinite-scroll';
  492. import { getFile } from '@/api/system/file/index.js';
  493. import storageApi from '@/api/warehouseManagement';
  494. import { allCategoryLevel } from '@/api/classifyManage';
  495. import {
  496. useDictLabel,
  497. outputSceneState,
  498. qualityResults,
  499. qualityStatus
  500. } from '@/utils/dict/index';
  501. import { mapGetters, mapActions } from 'vuex';
  502. import { parameterGetByCode } from '@/api/main/index.js';
  503. export default {
  504. directives: {
  505. 'el-table-infinite-scroll': elTableInfiniteScroll
  506. },
  507. props: {
  508. businessId: {
  509. type: String,
  510. default: ''
  511. },
  512. isInterior: {
  513. type: Boolean,
  514. default: false
  515. },
  516. isIds: {
  517. //多个出库单ID
  518. type: Boolean,
  519. default: false
  520. }
  521. },
  522. data() {
  523. return {
  524. newColumns: [], // 动态表头
  525. qualityStatus, // 质检状态 0未检 1已检
  526. qualityResults, // 质检结果 0无 1合格 2不合格
  527. productList: [], // 产品列表
  528. showPackingList: [], // 展示的包装列表
  529. packingList: [], // 包装列表
  530. showMaterialList: [], // 展示物料列表
  531. materialList: [], // 物料列表
  532. extInfo: {}, // 扩展信息
  533. pageSize: 20,
  534. pickingPageNum: 1,
  535. materielPageNum: 1,
  536. codeList: [],
  537. infoData: {},
  538. stepsTitle: '已完成',
  539. stepsStatus: 'success',
  540. active: 0,
  541. isPrice: 1
  542. };
  543. },
  544. watch: {
  545. 'infoData.verifyStatus': {
  546. immediate: true,
  547. handler(val) {
  548. if (val == 0) {
  549. this.active = 1;
  550. this.stepsTitle = '未审核';
  551. this.stepsStatus = 'wait';
  552. } else if (val == 1) {
  553. this.active = 2;
  554. this.stepsTitle = '审核中';
  555. this.stepsStatus = 'process';
  556. } else if (val == 2) {
  557. this.active = 2;
  558. this.stepsTitle = '审核通过';
  559. this.stepsStatus = 'success';
  560. } else if (val == 3) {
  561. this.active = 2;
  562. this.stepsTitle = '驳回';
  563. this.stepsStatus = 'error';
  564. }
  565. }
  566. },
  567. packingList: {
  568. handler(newVal) {
  569. console.log('包装列表', newVal);
  570. console.log('当前包装列表加载页数1', this.pickingPageNum);
  571. this.showPackingList = newVal.slice(
  572. 0,
  573. this.pageSize * (this.pickingPageNum > 0 ? this.pickingPageNum : 1)
  574. );
  575. },
  576. deep: true
  577. },
  578. materialList: {
  579. handler(newVal) {
  580. console.log('物料列表', newVal);
  581. console.log('当前物料列表加载页数', this.materielPageNum);
  582. this.showMaterialList = newVal.slice(
  583. 0,
  584. this.pageSize *
  585. (this.materielPageNum > 0 ? this.materielPageNum : 1)
  586. );
  587. },
  588. deep: true
  589. }
  590. },
  591. computed: {
  592. ...mapGetters(['getDictValue']),
  593. clientEnvironmentId() {
  594. return this.$store.state.user.info.clientEnvironmentId;
  595. }
  596. },
  597. created() {
  598. this.getFieldModel();
  599. //仓库出入库是否显示金额(0:不显示 1:显示)
  600. parameterGetByCode({
  601. code: 'wms_price'
  602. }).then((res) => {
  603. this.isPrice = res.value;
  604. });
  605. this.requestDict('类型用途');
  606. this.getAllCategoryType();
  607. this._getInfo(this.businessId);
  608. },
  609. methods: {
  610. // 获取动态表头
  611. getFieldModel() {
  612. storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
  613. console.log(
  614. res,
  615. 'res111111111111111111111111111111111111111111111111'
  616. );
  617. let newRes = res.map((m) => {
  618. return {
  619. prop: 'extField.' + m.prop,
  620. label: m.label,
  621. align: 'center',
  622. showOverflowTooltip: true
  623. };
  624. });
  625. this.newColumns = [...newRes];
  626. });
  627. },
  628. pickingHandleScroll() {
  629. console.log('---------pickingHandleScroll------------');
  630. if (this.showPackingList.length < this.packingList.length) {
  631. if (this.packingList.length > this.pageSize) {
  632. this.pickingPageNum += 1;
  633. }
  634. this.pickingFetchData();
  635. }
  636. },
  637. pickingFetchData() {
  638. const start = (this.pickingPageNum - 1) * this.pageSize;
  639. const end = start + this.pageSize;
  640. this.showPackingList = this.showPackingList.concat(
  641. this.packingList.slice(start, end)
  642. );
  643. },
  644. materielHandleScroll() {
  645. console.log('---------materielHandleScroll------------');
  646. if (this.showMaterialList.length < this.materialList.length) {
  647. if (this.materialList.length > this.pageSize) {
  648. this.materielPageNum += 1;
  649. }
  650. this.materielFetchData();
  651. }
  652. },
  653. materielFetchData() {
  654. const start = (this.materielPageNum - 1) * this.pageSize;
  655. const end = start + this.pageSize;
  656. this.showMaterialList = this.showMaterialList.concat(
  657. this.materialList.slice(start, end)
  658. );
  659. console.log(this.showMaterialList);
  660. },
  661. ...mapActions('dict', ['requestDict']),
  662. getSceneState: useDictLabel(outputSceneState),
  663. handleAssetType(r) {
  664. const code = this.codeList.find((item) => item.dictCode == r);
  665. return code?.dictValue;
  666. },
  667. tableRowClassName({ row, rowIndex }) {
  668. console.log(row);
  669. if (row.result == 2) {
  670. return 'warning-row';
  671. } else {
  672. return '';
  673. }
  674. },
  675. rowClass({ row, column, rowIndex, columnIndex }) {
  676. if (rowIndex === 1) {
  677. return {
  678. display: 'none',
  679. background: '#EEEEEE'
  680. };
  681. }
  682. return { background: '#0000' };
  683. },
  684. async getAllCategoryType() {
  685. const { data } = await allCategoryLevel();
  686. this.codeList = data.map((item) => {
  687. return { dictCode: item.id, dictValue: item.name };
  688. });
  689. },
  690. async _getInfo(id) {
  691. if (!id) {
  692. return;
  693. }
  694. let res = {};
  695. let resAll = [];
  696. console.log('isInterior', this.isInterior);
  697. if (this.isInterior) {
  698. res = await storageApi.getInboundDetailsById(id);
  699. } else if (this.isIds) {
  700. resAll = await storageApi.getInboundDetailsByIds(id);
  701. } else {
  702. res = await storageApi.getInfoBySourceBizNoAll(id);
  703. res = res[0] || {};
  704. }
  705. console.log(
  706. '===============================================================',
  707. res
  708. );
  709. if (this.isIds) {
  710. res = JSON.parse(JSON.stringify(resAll[0]));
  711. this.extInfo = resAll[0].extInfo;
  712. res['outInDetailList'] = [];
  713. resAll.forEach((item) => {
  714. item.outInDetailList.forEach((val) => {
  715. val['bizNo'] = item.bizNo;
  716. res['outInDetailList'].push(val);
  717. });
  718. });
  719. res['bizNo'] = resAll.map((item) => item.bizNo);
  720. this.infoData = res;
  721. } else {
  722. this.infoData = res;
  723. this.extInfo = res?.extInfo;
  724. }
  725. this.productList = res?.outInDetailList?.map(
  726. (productItem, productIndex) => {
  727. // if(this.isIds){
  728. // productItem['bizNo']=res.bizNo[productIndex]
  729. // }
  730. return {
  731. ...productItem,
  732. outInDetailRecordRequestList:
  733. productItem.outInDetailRecordRequestList?.map((packingItem) => {
  734. return {
  735. ...packingItem,
  736. categoryName: productItem.categoryName,
  737. categoryCode: productItem.categoryCode,
  738. supplierCode: productItem.supplierCode,
  739. supplierName: productItem.supplierName,
  740. materialDetailList: packingItem.materialDetailList?.map(
  741. (materialItem) => {
  742. return {
  743. ...materialItem,
  744. categoryName: productItem.categoryName,
  745. categoryCode: productItem.categoryCode
  746. };
  747. }
  748. )
  749. };
  750. })
  751. };
  752. }
  753. );
  754. // 获取包装维度数据
  755. const arr = [];
  756. for (const key in this.productList) {
  757. for (const k in this.productList[key].outInDetailRecordRequestList) {
  758. arr.push({
  759. ...this.productList[key].outInDetailRecordRequestList[k]
  760. });
  761. }
  762. }
  763. this.packingList = arr;
  764. // 获取物料维度数据
  765. let iArr = [];
  766. arr.forEach((item) => {
  767. item.materialDetailList.forEach((ele) => {
  768. iArr.push({ ...ele });
  769. });
  770. });
  771. this.materialList = iArr;
  772. console.log(this.packingList);
  773. console.log(this.materialList);
  774. this.pickingFetchData();
  775. this.materielFetchData();
  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>