details.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. <template>
  2. <div>
  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.storageTime }}</span>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="8">
  45. <el-form-item label="状态:">
  46. <span>{{ stepsTitle }}</span>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="8">
  50. <el-form-item label="审核人:">
  51. <span>{{ infoData.verifyName }}</span>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="8">
  55. <el-form-item label="客户:">
  56. <span>{{ infoData.clientName }}</span>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="8">
  60. <el-form-item label="供应商:">
  61. <span>{{ extInfo.supplierName }}</span>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="8">
  65. <el-form-item label="供应商代号:">
  66. <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">
  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. <fileMain v-model="qualityFile" />
  92. </el-form-item>
  93. </el-col>
  94. <el-col v-else :span="8">
  95. <el-form-item label="附件:">
  96. <fileMain 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. v-if="isPrice == 1"
  250. >
  251. <template slot-scope="{ row }">
  252. <template>
  253. {{ row.unitPrice ? row.unitPrice + '/元' : '' }}
  254. </template>
  255. </template>
  256. </el-table-column>
  257. <el-table-column
  258. label="金额"
  259. align="center"
  260. prop="totalMoney"
  261. v-if="isPrice == 1"
  262. :show-overflow-tooltip="true"
  263. >
  264. <template slot-scope="{ row, $index }">
  265. {{ row.totalMoney ? row.totalMoney : 0 }}
  266. </template>
  267. </el-table-column>
  268. <el-table-column
  269. v-if="clientEnvironmentId == 4"
  270. label="采购原因"
  271. align="center"
  272. prop="purpose"
  273. :show-overflow-tooltip="true"
  274. ></el-table-column>
  275. <el-table-column
  276. label="供应商"
  277. prop="supplierName"
  278. :show-overflow-tooltip="true"
  279. >
  280. </el-table-column>
  281. <el-table-column
  282. label="供应商代号"
  283. prop="supplierCode"
  284. width="120"
  285. :show-overflow-tooltip="true"
  286. >
  287. </el-table-column>
  288. <el-table-column
  289. label="产地"
  290. align="center"
  291. prop="provenance"
  292. v-if="bizType == 2"
  293. :show-overflow-tooltip="true"
  294. width="120"
  295. >
  296. <template slot-scope="{ row, $index }">
  297. {{
  298. row.provenance &&
  299. row.provenance
  300. .map((item) => getDictValue('产地', item))
  301. .join(',')
  302. }}
  303. </template>
  304. </el-table-column>
  305. <el-table-column
  306. label="生产日期"
  307. prop="detailProductionDate"
  308. :show-overflow-tooltip="true"
  309. >
  310. </el-table-column>
  311. <el-table-column
  312. label="采购日期"
  313. prop="detailPurchaseDate"
  314. :show-overflow-tooltip="true"
  315. >
  316. </el-table-column>
  317. <el-table-column
  318. label="失效日期"
  319. prop="detailExpireDate"
  320. :show-overflow-tooltip="true"
  321. >
  322. </el-table-column>
  323. </el-table>
  324. </div>
  325. <div class="mt20">
  326. <header-title :title="`包装明细`" size="16px"></header-title>
  327. <el-table
  328. ref="showPackingListTable"
  329. :data="showPackingList"
  330. tooltip-effect="dark"
  331. :max-height="300"
  332. :row-class-name="tableRowClassName"
  333. :header-cell-style="rowClass"
  334. border
  335. v-el-table-infinite-scroll="pickingHandleScroll"
  336. >
  337. <el-table-column label="序号" type="index" width="50">
  338. </el-table-column>
  339. <el-table-column
  340. label="批次号"
  341. prop="batchNo"
  342. width="80"
  343. :show-overflow-tooltip="true"
  344. ></el-table-column>
  345. <el-table-column
  346. label="包装编码"
  347. prop="packageNo"
  348. width="130"
  349. :show-overflow-tooltip="true"
  350. ></el-table-column>
  351. <el-table-column
  352. label="名称"
  353. prop="categoryName"
  354. width="120"
  355. :show-overflow-tooltip="true"
  356. ></el-table-column>
  357. <el-table-column
  358. label="编码"
  359. prop="categoryCode"
  360. width="120"
  361. :show-overflow-tooltip="true"
  362. ></el-table-column>
  363. <el-table-column
  364. label="型号"
  365. prop="categoryModel"
  366. width="80"
  367. :show-overflow-tooltip="true"
  368. ></el-table-column>
  369. <el-table-column
  370. label="规格"
  371. prop="specification"
  372. width="80"
  373. :show-overflow-tooltip="true"
  374. ></el-table-column>
  375. <el-table-column
  376. label="牌号"
  377. prop="brandNum"
  378. width="80"
  379. :show-overflow-tooltip="true"
  380. ></el-table-column>
  381. <!-- <el-table-column label="编码" prop="categoryCode" :show-overflow-tooltip="true"></el-table-column>
  382. <el-table-column label="名称" prop="categoryName" :show-overflow-tooltip="true"></el-table-column>
  383. <el-table-column label="批次号" prop="batchNo" :show-overflow-tooltip="true"></el-table-column> -->
  384. <el-table-column
  385. label="发货条码"
  386. prop="barcodes"
  387. :show-overflow-tooltip="true"
  388. ></el-table-column>
  389. <el-table-column
  390. label="包装数量"
  391. prop="packingQuantity"
  392. :show-overflow-tooltip="true"
  393. ></el-table-column>
  394. <el-table-column
  395. label="包装单位"
  396. prop="packingUnit"
  397. :show-overflow-tooltip="true"
  398. ></el-table-column>
  399. <el-table-column
  400. label="计量数量"
  401. prop="measureQuantity"
  402. :show-overflow-tooltip="true"
  403. ></el-table-column>
  404. <el-table-column
  405. label="计量单位"
  406. prop="measureUnit"
  407. :show-overflow-tooltip="true"
  408. ></el-table-column>
  409. <el-table-column
  410. label="物料代号"
  411. prop="materielDesignation"
  412. :show-overflow-tooltip="true"
  413. >
  414. </el-table-column>
  415. <el-table-column
  416. label="客户代号"
  417. prop="clientCode"
  418. :show-overflow-tooltip="true"
  419. >
  420. <template slot-scope="{ row, $index }">
  421. <span v-if="bizType != 2">{{ row?.clientCode }}</span>
  422. <span v-if="bizType == 2">{{ row?.customerMark }}</span>
  423. </template>
  424. </el-table-column>
  425. <el-table-column
  426. label="刻码"
  427. prop="engrave"
  428. :show-overflow-tooltip="true"
  429. >
  430. </el-table-column>
  431. <el-table-column
  432. label="重量"
  433. prop="weight"
  434. :show-overflow-tooltip="true"
  435. >
  436. </el-table-column>
  437. <el-table-column
  438. label="重量单位"
  439. prop="weightUnit"
  440. :show-overflow-tooltip="true"
  441. >
  442. </el-table-column>
  443. <el-table-column
  444. label="供应商"
  445. prop="supplierName"
  446. :show-overflow-tooltip="true"
  447. >
  448. </el-table-column>
  449. <el-table-column
  450. label="供应商代号"
  451. prop="supplierCode"
  452. width="120"
  453. :show-overflow-tooltip="true"
  454. >
  455. </el-table-column>
  456. <el-table-column
  457. label="质检结果"
  458. prop="result"
  459. :show-overflow-tooltip="true"
  460. >
  461. <template slot-scope="{ row }">
  462. <span>{{ qualityResults[row.result] }}</span>
  463. </template>
  464. </el-table-column>
  465. <el-table-column
  466. label="质检状态"
  467. prop="status"
  468. :show-overflow-tooltip="true"
  469. >
  470. <template slot-scope="{ row }">
  471. <span>{{ qualityStatus[row.status] }}</span>
  472. </template>
  473. </el-table-column>
  474. <el-table-column
  475. label="仓库"
  476. prop="warehouseName"
  477. :show-overflow-tooltip="true"
  478. >
  479. </el-table-column>
  480. <el-table-column
  481. label="货区"
  482. prop="areaName"
  483. :show-overflow-tooltip="true"
  484. >
  485. </el-table-column>
  486. <el-table-column
  487. label="货架"
  488. prop="goodsShelfName"
  489. :show-overflow-tooltip="true"
  490. >
  491. </el-table-column>
  492. <el-table-column
  493. label="货位"
  494. prop="goodsAllocationName"
  495. :show-overflow-tooltip="true"
  496. >
  497. </el-table-column>
  498. <el-table-column
  499. label="生产日期"
  500. prop="productionDate"
  501. :show-overflow-tooltip="true"
  502. >
  503. </el-table-column>
  504. <el-table-column
  505. label="采购日期"
  506. prop="purchaseDate"
  507. :show-overflow-tooltip="true"
  508. >
  509. </el-table-column>
  510. <el-table-column
  511. label="失效日期"
  512. prop="expireDate"
  513. :show-overflow-tooltip="true"
  514. >
  515. </el-table-column>
  516. </el-table>
  517. </div>
  518. <!-- <div class="mt20" v-if="bizType != '2'">
  519. <header-title :title="`物料明细`" size="16px"> </header-title>
  520. <el-table
  521. ref="multipleTable"
  522. :data="showMaterialList"
  523. tooltip-effect="dark"
  524. :max-height="300"
  525. :row-class-name="tableRowClassName"
  526. :header-cell-style="rowClass"
  527. border
  528. style="width: 100%"
  529. stripe
  530. height="300px"
  531. v-el-table-infinite-scroll="materielHandleScroll"
  532. >
  533. <el-table-column label="序号" type="index" width="50">
  534. </el-table-column>
  535. <el-table-column
  536. label="编码"
  537. prop="categoryCode"
  538. :show-overflow-tooltip="true"
  539. ></el-table-column>
  540. <el-table-column
  541. label="名称"
  542. prop="categoryName"
  543. :show-overflow-tooltip="true"
  544. ></el-table-column>
  545. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  546. <el-table-column
  547. label="物料编码"
  548. prop="materialCode"
  549. :show-overflow-tooltip="true"
  550. ></el-table-column>
  551. <el-table-column
  552. label="发货条码"
  553. prop="barcodes"
  554. :show-overflow-tooltip="true"
  555. ></el-table-column>
  556. <el-table-column
  557. label="计价方式"
  558. prop="pricingWay"
  559. :show-overflow-tooltip="true"
  560. >
  561. <template slot-scope="{ row, $index }">
  562. <span v-if="row.pricingWay == 1">数量</span>
  563. <span v-if="row.pricingWay == 2">重量</span>
  564. </template>
  565. </el-table-column>
  566. <el-table-column
  567. label="计量数量"
  568. prop="measureQuantity"
  569. ></el-table-column>
  570. <el-table-column
  571. label="计量单位"
  572. prop="measureUnit"
  573. ></el-table-column>
  574. <el-table-column label="物料代号" prop="materielDesignation">
  575. </el-table-column>
  576. <el-table-column label="客户代号" prop="clientCode">
  577. <template slot-scope="{ row, $index }">
  578. <span v-if="bizType != 2">{{ row?.clientCode }}</span>
  579. <span v-if="bizType == 2">{{ row?.customerMark }}</span>
  580. </template>
  581. </el-table-column>
  582. <el-table-column label="刻码" prop="engrave"> </el-table-column>
  583. <el-table-column width="100" label="重量" prop="weight">
  584. </el-table-column>
  585. <el-table-column label="重量单位" prop="weightUnit">
  586. </el-table-column>
  587. <el-table-column label="质检结果" prop="result" width="120">
  588. <template slot-scope="{ row }">
  589. <span>{{ qualityResults[row.result] }}</span>
  590. </template>
  591. </el-table-column>
  592. <el-table-column label="质检状态" prop="status" width="120">
  593. <template slot-scope="{ row }">
  594. <span>{{ qualityStatus[row.status] }}</span>
  595. </template>
  596. </el-table-column>
  597. </el-table>
  598. </div>-->
  599. </div>
  600. </el-card>
  601. </div>
  602. </template>
  603. <script>
  604. import elTableInfiniteScroll from 'el-table-infinite-scroll';
  605. // import fileUpload from '@/BIZComponents/addDoc/index.vue';
  606. import { getFile } from '@/api/system/file/index.js';
  607. import storageApi from '@/api/warehouseManagement';
  608. import { allCategoryLevel } from '@/api/classifyManage';
  609. import {
  610. useDictLabel,
  611. sceneState,
  612. qualityStatus,
  613. qualityResults
  614. } from '@/utils/dict/index';
  615. import { mapGetters, mapActions } from 'vuex';
  616. import { parameterGetByCode } from '@/api/main/index.js';
  617. export default {
  618. directives: {
  619. 'el-table-infinite-scroll': elTableInfiniteScroll
  620. },
  621. // components: { fileUpload },
  622. props: {
  623. bizType: {
  624. type: String,
  625. default: ''
  626. },
  627. businessId: {
  628. type: String,
  629. default: ''
  630. },
  631. isUpload: {
  632. type: Boolean,
  633. default: false
  634. },
  635. isInterior: {
  636. type: Boolean,
  637. default: false
  638. },
  639. isIds: {
  640. //多个入库单ID
  641. type: Boolean,
  642. default: false
  643. }
  644. },
  645. data() {
  646. return {
  647. newColumns: [], // 动态表头
  648. qualityFile: [], // 回执附件
  649. qualityStatus, // 质检状态 0未检 1已检
  650. qualityResults, // 质检结果 0无 1合格 2不合格
  651. productList: [], // 产品列表
  652. showPackingList: [], // 展示的包装列表
  653. packingList: [], // 包装列表
  654. showMaterialList: [], // 展示物料列表
  655. materialList: [], // 物料列表
  656. extInfo: {}, // 扩展信息
  657. pageSize: 20,
  658. pickingPageNum: 1,
  659. materielPageNum: 1,
  660. codeList: [],
  661. infoData: {},
  662. stepsTitle: '已完成',
  663. stepsStatus: 'success',
  664. active: 0,
  665. isPrice:1
  666. };
  667. },
  668. watch: {
  669. 'infoData.verifyStatus': {
  670. immediate: true,
  671. handler(val) {
  672. if (val == 0) {
  673. this.active = 1;
  674. this.stepsTitle = '未审核';
  675. this.stepsStatus = 'wait';
  676. } else if (val == 1) {
  677. this.active = 2;
  678. this.stepsTitle = '审核中';
  679. this.stepsStatus = 'process';
  680. } else if (val == 2) {
  681. this.active = 2;
  682. this.stepsTitle = '审核通过';
  683. this.stepsStatus = 'success';
  684. } else if (val == 3) {
  685. this.active = 2;
  686. this.stepsTitle = '驳回';
  687. this.stepsStatus = 'error';
  688. }
  689. }
  690. },
  691. businessId(val) {
  692. if (val) {
  693. this._getInfo(val);
  694. }
  695. }
  696. },
  697. computed: {
  698. ...mapGetters(['getDictValue']),
  699. clientEnvironmentId() {
  700. return this.$store.state.user.info.clientEnvironmentId;
  701. }
  702. },
  703. mounted() {
  704. this.getFieldModel();
  705. this.requestDict('类型用途');
  706. this.requestDict('产地');
  707. this.getAllCategoryType();
  708. this._getInfo(this.businessId);
  709. },
  710. created(){
  711. //仓库出入库是否显示金额(0:不显示 1:显示)
  712. parameterGetByCode({
  713. code: 'wms_price'
  714. }).then((res) => {
  715. this.isPrice = res.value;
  716. });
  717. },
  718. methods: {
  719. // 获取动态表头
  720. getFieldModel() {
  721. storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
  722. let newRes = res.map((m) => {
  723. return {
  724. prop: 'extField.' + m.prop,
  725. label: m.label,
  726. align: 'center',
  727. showOverflowTooltip: true
  728. };
  729. });
  730. this.newColumns = [...newRes];
  731. });
  732. },
  733. //获取回执附件
  734. getQualityFile() {
  735. return { qualityFile: this.qualityFile, id: this.infoData.id };
  736. },
  737. pickingHandleScroll() {
  738. console.log('---------pickingHandleScroll------------');
  739. if (this.showPackingList.length < this.packingList.length) {
  740. if (this.packingList.length > this.pageSize) {
  741. this.pickingPageNum += 1;
  742. }
  743. this.pickingFetchData();
  744. }
  745. },
  746. pickingFetchData() {
  747. const start = (this.pickingPageNum - 1) * this.pageSize;
  748. const end = start + this.pageSize;
  749. this.showPackingList = this.showPackingList.concat(
  750. this.packingList.slice(start, end)
  751. );
  752. },
  753. materielHandleScroll() {
  754. console.log('---------materielHandleScroll------------');
  755. if (this.showMaterialList.length < this.materialList.length) {
  756. if (this.materialList.length > this.pageSize) {
  757. this.materielPageNum += 1;
  758. }
  759. this.materielFetchData();
  760. }
  761. },
  762. materielFetchData() {
  763. const start = (this.materielPageNum - 1) * this.pageSize;
  764. const end = start + this.pageSize;
  765. this.showMaterialList = this.showMaterialList.concat(
  766. this.materialList.slice(start, end)
  767. );
  768. console.log(this.showMaterialList);
  769. },
  770. ...mapActions('dict', ['requestDict']),
  771. getSceneState: useDictLabel(sceneState),
  772. handleAssetType(r) {
  773. const code = this.codeList.find((item) => item.dictCode == r);
  774. return code?.dictValue;
  775. },
  776. tableRowClassName({ row, rowIndex }) {
  777. console.log(row);
  778. if (row.result == 2) {
  779. return 'warning-row';
  780. } else {
  781. return '';
  782. }
  783. },
  784. rowClass({ row, column, rowIndex, columnIndex }) {
  785. if (rowIndex === 1) {
  786. return {
  787. display: 'none',
  788. background: '#EEEEEE'
  789. };
  790. }
  791. return { background: '#0000' };
  792. },
  793. async getAllCategoryType() {
  794. const { data } = await allCategoryLevel();
  795. this.codeList = data.map((item) => {
  796. return { dictCode: item.id, dictValue: item.name };
  797. });
  798. },
  799. async _getInfo(id) {
  800. if (!id) return;
  801. let res = null;
  802. let resAll = null;
  803. if (this.isInterior) {
  804. res = await storageApi.getInboundDetailsById(id);
  805. } else if (this.isIds) {
  806. resAll = await storageApi.getInboundDetailsByIds(id);
  807. } else {
  808. res = await storageApi.getInfoBySourceBizNo(id);
  809. }
  810. console.log(
  811. 'idsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss',
  812. this.isIds
  813. );
  814. if (this.isIds) {
  815. res = JSON.parse(JSON.stringify(resAll[0]));
  816. this.extInfo = resAll[0].extInfo;
  817. res['outInDetailList'] = [];
  818. resAll.forEach((item) => {
  819. item.outInDetailList.forEach((val) => {
  820. val['bizNo'] = item.bizNo;
  821. res['outInDetailList'].push(val);
  822. });
  823. });
  824. res['bizNo'] = resAll.map((item) => item.bizNo);
  825. this.infoData = res;
  826. console.log('resAll---------------', resAll);
  827. } else {
  828. this.infoData = res;
  829. this.extInfo = res.extInfo;
  830. console.log(
  831. res,
  832. 'resresresresresresresresresresresresresresresresresresresresres2222'
  833. );
  834. }
  835. console.log('===', res);
  836. this.productList = res.outInDetailList.map(
  837. (productItem, productIndex) => {
  838. // if (this.isIds) {
  839. // productItem['bizNo'] = res.bizNo[productIndex];
  840. // }
  841. return {
  842. ...productItem,
  843. outInDetailRecordRequestList:
  844. productItem.outInDetailRecordRequestList.map((packingItem) => {
  845. return {
  846. ...packingItem,
  847. categoryName: productItem.categoryName,
  848. categoryCode: productItem.categoryCode,
  849. supplierCode: productItem.supplierCode,
  850. supplierName: productItem.supplierName,
  851. materialDetailList: packingItem.materialDetailList.map(
  852. (materialItem) => {
  853. return {
  854. ...materialItem,
  855. categoryName: productItem.categoryName,
  856. categoryCode: productItem.categoryCode
  857. };
  858. }
  859. )
  860. };
  861. })
  862. };
  863. }
  864. );
  865. // 获取包装维度数据
  866. const arr = [];
  867. for (const key in this.productList) {
  868. for (const k in this.productList[key].outInDetailRecordRequestList) {
  869. arr.push({
  870. ...this.productList[key].outInDetailRecordRequestList[k]
  871. });
  872. }
  873. }
  874. this.packingList = arr;
  875. // 获取物料维度数据
  876. let iArr = [];
  877. arr.forEach((item) => {
  878. item.materialDetailList.forEach((ele) => {
  879. iArr.push({ ...ele });
  880. });
  881. });
  882. this.materialList = iArr;
  883. console.log(this.packingList);
  884. console.log(this.materialList);
  885. this.pickingFetchData();
  886. this.materielFetchData();
  887. console.log(this.productList, 'this.productList');
  888. },
  889. download(row) {
  890. if (row.storePath) {
  891. getFile({ objectName: row.storePath }, row.name);
  892. }
  893. }
  894. }
  895. };
  896. </script>
  897. <style lang="scss" scoped>
  898. ::v-deep .warning-row {
  899. color: red;
  900. }
  901. ::v-deep .page-title {
  902. border-bottom: none;
  903. }
  904. ::v-deep .page-title-div {
  905. width: 100%;
  906. }
  907. .stepsStatus {
  908. width: 40%;
  909. margin: 0 auto;
  910. }
  911. .el-form-item {
  912. margin-bottom: 10px;
  913. }
  914. .p20 {
  915. padding: 20px;
  916. }
  917. .flex {
  918. display: flex;
  919. }
  920. .title {
  921. justify-content: space-between;
  922. border-bottom: 1px solid #ccc;
  923. padding-bottom: 5px;
  924. span {
  925. font-size: 16px;
  926. }
  927. .col {
  928. padding-left: 40px;
  929. font-size: 14px;
  930. color: #aaaaaa;
  931. }
  932. }
  933. .degree {
  934. margin-right: 10px;
  935. padding: 0px 15px;
  936. color: #fff;
  937. font-size: 13px;
  938. line-height: 23px;
  939. border-radius: 23px;
  940. display: flex;
  941. align-items: center;
  942. justify-content: space-between;
  943. span {
  944. width: 5px;
  945. height: 5px;
  946. border-radius: 100%;
  947. margin-right: 6px;
  948. background-color: #fff;
  949. }
  950. }
  951. .red {
  952. background-color: rgb(163, 0, 20);
  953. }
  954. .blue {
  955. background-color: #1989fa;
  956. }
  957. .createdInfo {
  958. justify-content: space-around;
  959. margin-top: 10px;
  960. font-size: 14px;
  961. .col {
  962. color: #6e6e6e;
  963. padding-right: 10px;
  964. }
  965. }
  966. .mt40 {
  967. margin-top: 40px;
  968. }
  969. .custSteps {
  970. margin-top: 20px;
  971. margin-left: 70px;
  972. .box {
  973. width: 158px;
  974. border: 1px solid #ccc;
  975. padding: 10px;
  976. flex-direction: row;
  977. flex-wrap: wrap;
  978. // justify-content: space-between;
  979. font-size: 12px;
  980. color: #9e9e9e;
  981. .x {
  982. width: 20px;
  983. height: 15px;
  984. margin-right: 5px;
  985. }
  986. .q {
  987. background-color: #d0e4d5;
  988. }
  989. .b {
  990. background-color: #1989fa;
  991. }
  992. .g {
  993. background-color: #157a2c;
  994. }
  995. .r {
  996. background-color: #a30014;
  997. }
  998. .a {
  999. align-items: center;
  1000. margin-bottom: 10px;
  1001. }
  1002. .mr10 {
  1003. margin-right: 10px;
  1004. }
  1005. .mb0 {
  1006. margin-bottom: 0;
  1007. }
  1008. }
  1009. .stepsInfo {
  1010. // flex: 1;
  1011. width: 483px;
  1012. }
  1013. }
  1014. .mt20 {
  1015. margin-top: 20px;
  1016. }
  1017. .content-detail {
  1018. overflow: hidden;
  1019. }
  1020. .executor {
  1021. font-size: 14px;
  1022. .col {
  1023. color: #6e6e6e;
  1024. padding-right: 10px;
  1025. }
  1026. }
  1027. .result {
  1028. justify-content: space-around;
  1029. }
  1030. .mr20 {
  1031. margin-right: 20px;
  1032. }
  1033. .details {
  1034. font-size: 14px;
  1035. margin-bottom: 10px;
  1036. }
  1037. .customSteps {
  1038. margin-top: 40px;
  1039. font-size: 14px;
  1040. margin-left: 80px;
  1041. .time {
  1042. font-size: 12px;
  1043. color: #6e6e6e;
  1044. margin-right: 20px;
  1045. position: relative;
  1046. &::after {
  1047. content: '';
  1048. width: 1px;
  1049. height: 100%;
  1050. background-color: #157a2c;
  1051. position: absolute;
  1052. right: -26px;
  1053. }
  1054. }
  1055. .flex:last-child {
  1056. .time {
  1057. &::after {
  1058. display: none;
  1059. }
  1060. }
  1061. }
  1062. .round {
  1063. margin-right: 20px;
  1064. width: 10px;
  1065. height: 10px;
  1066. border-radius: 100%;
  1067. background-color: #157a2c;
  1068. position: relative;
  1069. span {
  1070. position: absolute;
  1071. top: 50%;
  1072. left: 50%;
  1073. width: 4px;
  1074. height: 4px;
  1075. background-color: #fff;
  1076. border-radius: 100%;
  1077. transform: translate(-2px, -2px);
  1078. }
  1079. }
  1080. .text {
  1081. .info {
  1082. margin-top: 10px;
  1083. width: 955px;
  1084. background-color: #f0f3f3;
  1085. overflow: hidden;
  1086. padding: 10px;
  1087. margin-bottom: 10px;
  1088. }
  1089. }
  1090. }
  1091. .switch_left li {
  1092. border-right: 1px solid rgba(222, 222, 222, 1);
  1093. border-left: 1px solid rgba(222, 222, 222, 1);
  1094. }
  1095. </style>