details.vue 29 KB

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