details.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386
  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. <ele-pro-table
  117. ref="productListTable"
  118. :datasource="productList"
  119. :columns="columns"
  120. :needPage="false"
  121. max-height="300px"
  122. row-key="id"
  123. :cache-key="cacheKeyUrl"
  124. @columns-change="handleColumnChange"
  125. >
  126. <template v-slot:packingQuantity="{ row }">
  127. {{ row.packingQuantity }} {{ row.packingUnit }}
  128. </template>
  129. <template v-slot:minPackingQuantity="{ row }">
  130. {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{ row.packingUnit }}
  131. </template>
  132. <template v-slot:isUnpack="{ row }">
  133. {{ row.isUnpack == 1 ? '是' : '否' }}
  134. </template>
  135. <template v-slot:unitPrice="{ row }">
  136. {{ row.unitPrice ? row.unitPrice + '/元' : '' }}
  137. </template>
  138. <template v-slot:totalMoney="{ row }">
  139. {{ row.totalMoney ? row.totalMoney : 0 }}
  140. </template>
  141. <template v-slot:provenance="{ row }">
  142. {{ row.provenance && row.provenance.map((item) => getDictValue('产地', item)).join(',') }}
  143. </template>
  144. </ele-pro-table>
  145. </div>
  146. <div class="mt20">
  147. <header-title :title="`包装明细`" size="16px"></header-title>
  148. <el-table
  149. ref="showPackingListTable"
  150. :data="showPackingList"
  151. tooltip-effect="dark"
  152. :max-height="300"
  153. :row-class-name="tableRowClassName"
  154. :header-cell-style="rowClass"
  155. border
  156. v-el-table-infinite-scroll="pickingHandleScroll"
  157. >
  158. <el-table-column label="序号" type="index" width="50">
  159. </el-table-column>
  160. <el-table-column
  161. label="批次号"
  162. prop="batchNo"
  163. width="80"
  164. :show-overflow-tooltip="true"
  165. ></el-table-column>
  166. <el-table-column
  167. label="包装编码"
  168. prop="packageNo"
  169. width="130"
  170. :show-overflow-tooltip="true"
  171. ></el-table-column>
  172. <el-table-column
  173. label="名称"
  174. prop="categoryName"
  175. width="120"
  176. :show-overflow-tooltip="true"
  177. ></el-table-column>
  178. <el-table-column
  179. label="编码"
  180. prop="categoryCode"
  181. width="120"
  182. :show-overflow-tooltip="true"
  183. ></el-table-column>
  184. <el-table-column
  185. label="型号"
  186. prop="categoryModel"
  187. width="80"
  188. :show-overflow-tooltip="true"
  189. ></el-table-column>
  190. <el-table-column
  191. label="规格"
  192. prop="specification"
  193. width="80"
  194. :show-overflow-tooltip="true"
  195. ></el-table-column>
  196. <el-table-column
  197. label="牌号"
  198. prop="brandNum"
  199. width="80"
  200. :show-overflow-tooltip="true"
  201. ></el-table-column>
  202. <!-- <el-table-column label="编码" prop="categoryCode" :show-overflow-tooltip="true"></el-table-column>
  203. <el-table-column label="名称" prop="categoryName" :show-overflow-tooltip="true"></el-table-column>
  204. <el-table-column label="批次号" prop="batchNo" :show-overflow-tooltip="true"></el-table-column> -->
  205. <el-table-column
  206. label="发货条码"
  207. prop="barcodes"
  208. :show-overflow-tooltip="true"
  209. ></el-table-column>
  210. <el-table-column
  211. label="包装数量"
  212. prop="packingQuantity"
  213. :show-overflow-tooltip="true"
  214. ></el-table-column>
  215. <el-table-column
  216. label="包装单位"
  217. prop="packingUnit"
  218. :show-overflow-tooltip="true"
  219. ></el-table-column>
  220. <el-table-column
  221. label="计量数量"
  222. prop="measureQuantity"
  223. :show-overflow-tooltip="true"
  224. ></el-table-column>
  225. <el-table-column
  226. label="计量单位"
  227. prop="measureUnit"
  228. :show-overflow-tooltip="true"
  229. ></el-table-column>
  230. <el-table-column
  231. label="物料代号"
  232. prop="materielDesignation"
  233. :show-overflow-tooltip="true"
  234. >
  235. </el-table-column>
  236. <el-table-column
  237. label="客户代号"
  238. prop="clientCode"
  239. :show-overflow-tooltip="true"
  240. >
  241. <template slot-scope="{ row, $index }">
  242. <span v-if="bizType != 2">{{ row?.clientCode }}</span>
  243. <span v-if="bizType == 2">{{ row?.customerMark }}</span>
  244. </template>
  245. </el-table-column>
  246. <el-table-column
  247. label="刻码"
  248. prop="engrave"
  249. :show-overflow-tooltip="true"
  250. >
  251. </el-table-column>
  252. <el-table-column
  253. label="重量"
  254. prop="weight"
  255. :show-overflow-tooltip="true"
  256. >
  257. </el-table-column>
  258. <el-table-column
  259. label="重量单位"
  260. prop="weightUnit"
  261. :show-overflow-tooltip="true"
  262. >
  263. </el-table-column>
  264. <el-table-column label="机型" prop="modelKey" width="200">
  265. </el-table-column>
  266. <el-table-column label="颜色" prop="colorKey" width="200">
  267. </el-table-column>
  268. <el-table-column
  269. label="供应商"
  270. prop="supplierName"
  271. :show-overflow-tooltip="true"
  272. >
  273. </el-table-column>
  274. <el-table-column
  275. label="供应商代号"
  276. prop="supplierCode"
  277. width="120"
  278. :show-overflow-tooltip="true"
  279. >
  280. </el-table-column>
  281. <el-table-column
  282. label="质检结果"
  283. prop="result"
  284. :show-overflow-tooltip="true"
  285. >
  286. <template slot-scope="{ row }">
  287. <span>{{ qualityResults[row.result] }}</span>
  288. </template>
  289. </el-table-column>
  290. <el-table-column
  291. label="质检状态"
  292. prop="status"
  293. :show-overflow-tooltip="true"
  294. >
  295. <template slot-scope="{ row }">
  296. <span>{{ qualityStatus[row.status] }}</span>
  297. </template>
  298. </el-table-column>
  299. <el-table-column
  300. label="仓库"
  301. prop="warehouseName"
  302. :show-overflow-tooltip="true"
  303. >
  304. </el-table-column>
  305. <el-table-column
  306. label="货区"
  307. prop="areaName"
  308. :show-overflow-tooltip="true"
  309. >
  310. </el-table-column>
  311. <el-table-column
  312. label="货架"
  313. prop="goodsShelfName"
  314. :show-overflow-tooltip="true"
  315. >
  316. </el-table-column>
  317. <el-table-column
  318. label="货位"
  319. prop="goodsAllocationName"
  320. :show-overflow-tooltip="true"
  321. >
  322. </el-table-column>
  323. <el-table-column
  324. label="生产日期"
  325. prop="productionDate"
  326. :show-overflow-tooltip="true"
  327. >
  328. </el-table-column>
  329. <el-table-column
  330. label="采购日期"
  331. prop="purchaseDate"
  332. :show-overflow-tooltip="true"
  333. >
  334. </el-table-column>
  335. <el-table-column
  336. label="失效日期"
  337. prop="expireDate"
  338. :show-overflow-tooltip="true"
  339. >
  340. </el-table-column>
  341. <!-- <el-table-column
  342. label="盘具"
  343. prop="reelSpecification"
  344. :show-overflow-tooltip="true"
  345. >
  346. </el-table-column> -->
  347. </el-table>
  348. </div>
  349. <!-- <div class="mt20" v-if="bizType != '2'">
  350. <header-title :title="`物料明细`" size="16px"> </header-title>
  351. <el-table
  352. ref="multipleTable"
  353. :data="showMaterialList"
  354. tooltip-effect="dark"
  355. :max-height="300"
  356. :row-class-name="tableRowClassName"
  357. :header-cell-style="rowClass"
  358. border
  359. style="width: 100%"
  360. stripe
  361. height="300px"
  362. v-el-table-infinite-scroll="materielHandleScroll"
  363. >
  364. <el-table-column label="序号" type="index" width="50">
  365. </el-table-column>
  366. <el-table-column
  367. label="编码"
  368. prop="categoryCode"
  369. :show-overflow-tooltip="true"
  370. ></el-table-column>
  371. <el-table-column
  372. label="名称"
  373. prop="categoryName"
  374. :show-overflow-tooltip="true"
  375. ></el-table-column>
  376. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  377. <el-table-column
  378. label="物料编码"
  379. prop="materialCode"
  380. :show-overflow-tooltip="true"
  381. ></el-table-column>
  382. <el-table-column
  383. label="发货条码"
  384. prop="barcodes"
  385. :show-overflow-tooltip="true"
  386. ></el-table-column>
  387. <el-table-column
  388. label="计价方式"
  389. prop="pricingWay"
  390. :show-overflow-tooltip="true"
  391. >
  392. <template slot-scope="{ row, $index }">
  393. <span v-if="row.pricingWay == 1">数量</span>
  394. <span v-if="row.pricingWay == 2">重量</span>
  395. </template>
  396. </el-table-column>
  397. <el-table-column
  398. label="计量数量"
  399. prop="measureQuantity"
  400. ></el-table-column>
  401. <el-table-column
  402. label="计量单位"
  403. prop="measureUnit"
  404. ></el-table-column>
  405. <el-table-column label="物料代号" prop="materielDesignation">
  406. </el-table-column>
  407. <el-table-column label="客户代号" prop="clientCode">
  408. <template slot-scope="{ row, $index }">
  409. <span v-if="bizType != 2">{{ row?.clientCode }}</span>
  410. <span v-if="bizType == 2">{{ row?.customerMark }}</span>
  411. </template>
  412. </el-table-column>
  413. <el-table-column label="刻码" prop="engrave"> </el-table-column>
  414. <el-table-column width="100" label="重量" prop="weight">
  415. </el-table-column>
  416. <el-table-column label="重量单位" prop="weightUnit">
  417. </el-table-column>
  418. <el-table-column label="质检结果" prop="result" width="120">
  419. <template slot-scope="{ row }">
  420. <span>{{ qualityResults[row.result] }}</span>
  421. </template>
  422. </el-table-column>
  423. <el-table-column label="质检状态" prop="status" width="120">
  424. <template slot-scope="{ row }">
  425. <span>{{ qualityStatus[row.status] }}</span>
  426. </template>
  427. </el-table-column>
  428. </el-table>
  429. </div>-->
  430. </div>
  431. </el-card>
  432. </div>
  433. </template>
  434. <script>
  435. import elTableInfiniteScroll from 'el-table-infinite-scroll';
  436. // import fileUpload from '@/BIZComponents/addDoc/index.vue';
  437. import { getFile } from '@/api/system/file/index.js';
  438. import storageApi from '@/api/warehouseManagement';
  439. import { allCategoryLevel } from '@/api/classifyManage';
  440. import {
  441. useDictLabel,
  442. sceneState,
  443. qualityStatus,
  444. qualityResults
  445. } from '@/utils/dict/index';
  446. import { mapGetters, mapActions } from 'vuex';
  447. import { parameterGetByCode } from '@/api/main/index.js';
  448. import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
  449. export default {
  450. directives: {
  451. 'el-table-infinite-scroll': elTableInfiniteScroll
  452. },
  453. mixins: [tableColumnsMixin],
  454. // components: { fileUpload },
  455. props: {
  456. bizType: {
  457. type: String,
  458. default: ''
  459. },
  460. businessId: {
  461. type: String,
  462. default: ''
  463. },
  464. isUpload: {
  465. type: Boolean,
  466. default: false
  467. },
  468. isInterior: {
  469. type: Boolean,
  470. default: false
  471. },
  472. isIds: {
  473. //多个入库单ID
  474. type: Boolean,
  475. default: false
  476. }
  477. },
  478. data() {
  479. return {
  480. cacheKeyUrl: 'stockManagement-productList-20260508',
  481. dinamicoColumns: [], // 动态表头
  482. qualityFile: [], // 回执附件
  483. qualityStatus, // 质检状态 0未检 1已检
  484. qualityResults, // 质检结果 0无 1合格 2不合格
  485. productList: [], // 产品列表
  486. showPackingList: [], // 展示的包装列表
  487. packingList: [], // 包装列表
  488. showMaterialList: [], // 展示物料列表
  489. materialList: [], // 物料列表
  490. extInfo: {}, // 扩展信息
  491. pageSize: 20,
  492. pickingPageNum: 1,
  493. materielPageNum: 1,
  494. codeList: [],
  495. infoData: {},
  496. stepsTitle: '已完成',
  497. stepsStatus: 'success',
  498. active: 0,
  499. isPrice: 1,
  500. columnsVersion: 1,
  501. tabMixinsInit: true,
  502. };
  503. },
  504. watch: {
  505. 'infoData.verifyStatus': {
  506. immediate: true,
  507. handler(val) {
  508. if (val == 0) {
  509. this.active = 1;
  510. this.stepsTitle = '未审核';
  511. this.stepsStatus = 'wait';
  512. } else if (val == 1) {
  513. this.active = 2;
  514. this.stepsTitle = '审核中';
  515. this.stepsStatus = 'process';
  516. } else if (val == 2) {
  517. this.active = 2;
  518. this.stepsTitle = '审核通过';
  519. this.stepsStatus = 'success';
  520. } else if (val == 3) {
  521. this.active = 2;
  522. this.stepsTitle = '驳回';
  523. this.stepsStatus = 'error';
  524. }
  525. }
  526. },
  527. businessId(val) {
  528. if (val) {
  529. this._getInfo(val);
  530. }
  531. }
  532. },
  533. computed: {
  534. ...mapGetters(['getDictValue']),
  535. clientEnvironmentId() {
  536. return this.$store.state.user.info.clientEnvironmentId;
  537. },
  538. columns() {
  539. let columnsVersion = this.columnsVersion;
  540. const columns = [
  541. {
  542. columnKey: 'index',
  543. label: '序号',
  544. type: 'index',
  545. width: 50,
  546. align: 'center'
  547. }
  548. ];
  549. if (this.isIds) {
  550. columns.push({
  551. minWidth: 150,
  552. label: '入库单号',
  553. prop: 'bizNo',
  554. align: 'center',
  555. showOverflowTooltip: true
  556. });
  557. }
  558. columns.push(
  559. {
  560. label: '仓库',
  561. prop: 'warehouseName',
  562. showOverflowTooltip: true
  563. },
  564. {
  565. label: '编码',
  566. prop: 'categoryCode',
  567. align: 'center',
  568. showOverflowTooltip: true
  569. },
  570. {
  571. label: '名称',
  572. align: 'center',
  573. prop: 'categoryName',
  574. showOverflowTooltip: true
  575. }
  576. );
  577. if (this.clientEnvironmentId == 4) {
  578. columns.push({
  579. label: '级别',
  580. prop: 'level',
  581. align: 'center'
  582. });
  583. }
  584. columns.push(
  585. {
  586. label: '型号',
  587. align: 'center',
  588. prop: 'categoryModel',
  589. showOverflowTooltip: true
  590. },
  591. {
  592. label: '规格',
  593. align: 'center',
  594. prop: 'specification',
  595. showOverflowTooltip: true
  596. },
  597. {
  598. label: '牌号',
  599. align: 'center',
  600. prop: 'brandNum',
  601. showOverflowTooltip: true
  602. }
  603. );
  604. // 动态表头
  605. if (this.dinamicoColumns && this.dinamicoColumns.length) {
  606. this.dinamicoColumns.forEach((item) => {
  607. columns.push({
  608. label: item.label,
  609. align: item.align,
  610. prop: item.prop,
  611. showOverflowTooltip: item.showOverflowTooltip
  612. });
  613. });
  614. }
  615. columns.push({
  616. label: '批次号',
  617. prop: 'batchNo',
  618. align: 'center',
  619. showOverflowTooltip: true
  620. });
  621. if (this.clientEnvironmentId == 3) {
  622. columns.push({
  623. label: '包装数量',
  624. prop: 'packingQuantity',
  625. align: 'center',
  626. slot: 'packingQuantity'
  627. },
  628. {
  629. label: '最小包装单元',
  630. align: 'center',
  631. width: 120,
  632. prop: 'minPackingQuantity',
  633. slot: 'minPackingQuantity'
  634. });
  635. } else {
  636. columns.push(
  637. {
  638. label: '包装数量',
  639. prop: 'packingQuantity',
  640. width: 80
  641. },
  642. {
  643. label: '包装单位',
  644. prop: 'packingUnit'
  645. }
  646. );
  647. }
  648. columns.push(
  649. {
  650. label: '允许拆包',
  651. prop: 'isUnpack',
  652. width: 100,
  653. align: 'center',
  654. slot: 'isUnpack'
  655. },
  656. {
  657. label: '计量数量',
  658. prop: 'measureQuantity',
  659. showOverflowTooltip: true
  660. },
  661. {
  662. label: '计量单位',
  663. prop: 'measureUnit'
  664. },
  665. {
  666. label: '重量',
  667. prop: 'weight',
  668. align: 'center',
  669. showOverflowTooltip: true
  670. },
  671. {
  672. label: '重量单位',
  673. prop: 'weightUnit',
  674. align: 'center',
  675. showOverflowTooltip: true
  676. },
  677. {
  678. label: '生产要求',
  679. align: 'center',
  680. width: 200,
  681. prop: 'productionRequirements',
  682. showOverflowTooltip: true
  683. },
  684. {
  685. label: '机型',
  686. prop: 'modelKey',
  687. width: 200
  688. },
  689. {
  690. label: '颜色',
  691. prop: 'colorKey',
  692. width: 200
  693. },
  694. {
  695. label: '盘具',
  696. prop: 'reelSpecification',
  697. width: 200
  698. },
  699. );
  700. if (this.isPrice == 1) {
  701. columns.push(
  702. {
  703. label: '单价',
  704. prop: 'unitPrice',
  705. align: 'center',
  706. slot: 'unitPrice'
  707. },
  708. {
  709. label: '金额',
  710. align: 'center',
  711. prop: 'totalMoney',
  712. showOverflowTooltip: true,
  713. slot: 'totalMoney'
  714. }
  715. );
  716. }
  717. if (this.clientEnvironmentId == 4) {
  718. columns.push({
  719. label: '采购原因',
  720. align: 'center',
  721. prop: 'purpose',
  722. showOverflowTooltip: true
  723. });
  724. }
  725. columns.push(
  726. {
  727. label: '供应商',
  728. prop: 'supplierName',
  729. showOverflowTooltip: true
  730. },
  731. {
  732. label: '供应商代号',
  733. prop: 'supplierCode',
  734. width: 120,
  735. showOverflowTooltip: true
  736. }
  737. );
  738. if (this.bizType == 2) {
  739. columns.push({
  740. label: '产地',
  741. align: 'center',
  742. prop: 'provenance',
  743. showOverflowTooltip: true,
  744. width: 120,
  745. slot: 'provenance'
  746. });
  747. }
  748. columns.push(
  749. {
  750. label: '生产日期',
  751. prop: 'detailProductionDate',
  752. showOverflowTooltip: true
  753. },
  754. {
  755. label: '采购日期',
  756. prop: 'detailPurchaseDate',
  757. showOverflowTooltip: true
  758. },
  759. {
  760. label: '失效日期',
  761. prop: 'detailExpireDate',
  762. showOverflowTooltip: true
  763. }
  764. );
  765. return columns;
  766. },
  767. packingColumns() {
  768. return [
  769. {
  770. columnKey: 'index',
  771. label: '序号',
  772. type: 'index',
  773. width: 50,
  774. align: 'center'
  775. },
  776. {
  777. label: '批次号',
  778. prop: 'batchNo',
  779. width: 80,
  780. showOverflowTooltip: true
  781. },
  782. {
  783. label: '包装编码',
  784. prop: 'packageNo',
  785. width: 130,
  786. showOverflowTooltip: true
  787. },
  788. {
  789. label: '名称',
  790. prop: 'categoryName',
  791. width: 120,
  792. showOverflowTooltip: true
  793. },
  794. {
  795. label: '编码',
  796. prop: 'categoryCode',
  797. width: 120,
  798. showOverflowTooltip: true
  799. },
  800. {
  801. label: '型号',
  802. prop: 'categoryModel',
  803. width: 80,
  804. showOverflowTooltip: true
  805. },
  806. {
  807. label: '规格',
  808. prop: 'specification',
  809. width: 80,
  810. showOverflowTooltip: true
  811. },
  812. {
  813. label: '牌号',
  814. prop: 'brandNum',
  815. width: 80,
  816. showOverflowTooltip: true
  817. },
  818. {
  819. label: '发货条码',
  820. prop: 'barcodes',
  821. showOverflowTooltip: true
  822. },
  823. {
  824. label: '包装数量',
  825. prop: 'packingQuantity',
  826. showOverflowTooltip: true
  827. },
  828. {
  829. label: '包装单位',
  830. prop: 'packingUnit',
  831. showOverflowTooltip: true
  832. },
  833. {
  834. label: '计量数量',
  835. prop: 'measureQuantity',
  836. showOverflowTooltip: true
  837. },
  838. {
  839. label: '计量单位',
  840. prop: 'measureUnit',
  841. showOverflowTooltip: true
  842. },
  843. {
  844. label: '物料代号',
  845. prop: 'materielDesignation',
  846. showOverflowTooltip: true
  847. },
  848. {
  849. label: '客户代号',
  850. prop: 'clientCode',
  851. showOverflowTooltip: true,
  852. slot: 'clientCode'
  853. },
  854. {
  855. label: '刻码',
  856. prop: 'engrave',
  857. showOverflowTooltip: true
  858. },
  859. {
  860. label: '重量',
  861. prop: 'weight',
  862. showOverflowTooltip: true
  863. },
  864. {
  865. label: '重量单位',
  866. prop: 'weightUnit',
  867. showOverflowTooltip: true
  868. },
  869. {
  870. label: '机型',
  871. prop: 'modelKey',
  872. width: 200
  873. },
  874. {
  875. label: '颜色',
  876. prop: 'colorKey',
  877. width: 200
  878. },
  879. {
  880. label: '供应商',
  881. prop: 'supplierName',
  882. showOverflowTooltip: true
  883. },
  884. {
  885. label: '供应商代号',
  886. prop: 'supplierCode',
  887. width: 120,
  888. showOverflowTooltip: true
  889. },
  890. {
  891. label: '质检结果',
  892. prop: 'result',
  893. showOverflowTooltip: true,
  894. slot: 'result'
  895. },
  896. {
  897. label: '质检状态',
  898. prop: 'status',
  899. showOverflowTooltip: true,
  900. slot: 'status'
  901. },
  902. {
  903. label: '仓库',
  904. prop: 'warehouseName',
  905. showOverflowTooltip: true
  906. },
  907. {
  908. label: '货区',
  909. prop: 'areaName',
  910. showOverflowTooltip: true
  911. },
  912. {
  913. label: '货架',
  914. prop: 'goodsShelfName',
  915. showOverflowTooltip: true
  916. },
  917. {
  918. label: '货位',
  919. prop: 'goodsAllocationName',
  920. showOverflowTooltip: true
  921. },
  922. {
  923. label: '生产日期',
  924. prop: 'productionDate',
  925. showOverflowTooltip: true
  926. },
  927. {
  928. label: '采购日期',
  929. prop: 'purchaseDate',
  930. showOverflowTooltip: true
  931. },
  932. {
  933. label: '失效日期',
  934. prop: 'expireDate',
  935. showOverflowTooltip: true
  936. }
  937. ];
  938. }
  939. },
  940. mounted() {
  941. this.getFieldModel();
  942. this.requestDict('类型用途');
  943. this.requestDict('产地');
  944. this.getAllCategoryType();
  945. this._getInfo(this.businessId);
  946. },
  947. created() {
  948. //仓库出入库是否显示金额(0:不显示 1:显示)
  949. parameterGetByCode({
  950. code: 'wms_price'
  951. }).then((res) => {
  952. this.isPrice = res.value;
  953. });
  954. },
  955. methods: {
  956. // 获取动态表头
  957. getFieldModel() {
  958. storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
  959. let newRes = res.map((m) => {
  960. return {
  961. prop: 'extField.' + m.prop,
  962. label: m.label,
  963. align: 'center',
  964. showOverflowTooltip: true
  965. };
  966. });
  967. this.dinamicoColumns = [...newRes];
  968. });
  969. },
  970. //获取回执附件
  971. getQualityFile() {
  972. return { qualityFile: this.qualityFile, id: this.infoData.id };
  973. },
  974. pickingHandleScroll() {
  975. console.log('---------pickingHandleScroll------------');
  976. if (this.showPackingList.length < this.packingList.length) {
  977. if (this.packingList.length > this.pageSize) {
  978. this.pickingPageNum += 1;
  979. }
  980. this.pickingFetchData();
  981. }
  982. },
  983. pickingFetchData() {
  984. const start = (this.pickingPageNum - 1) * this.pageSize;
  985. const end = start + this.pageSize;
  986. this.showPackingList = this.showPackingList.concat(
  987. this.packingList.slice(start, end)
  988. );
  989. },
  990. materielHandleScroll() {
  991. console.log('---------materielHandleScroll------------');
  992. if (this.showMaterialList.length < this.materialList.length) {
  993. if (this.materialList.length > this.pageSize) {
  994. this.materielPageNum += 1;
  995. }
  996. this.materielFetchData();
  997. }
  998. },
  999. materielFetchData() {
  1000. const start = (this.materielPageNum - 1) * this.pageSize;
  1001. const end = start + this.pageSize;
  1002. this.showMaterialList = this.showMaterialList.concat(
  1003. this.materialList.slice(start, end)
  1004. );
  1005. console.log(this.showMaterialList);
  1006. },
  1007. ...mapActions('dict', ['requestDict']),
  1008. getSceneState: useDictLabel(sceneState),
  1009. handleAssetType(r) {
  1010. if (r) {
  1011. let arr = r.split(',');
  1012. const filteredData = this.codeList.filter((item) =>
  1013. arr.includes(item.dictCode)
  1014. );
  1015. return filteredData.map((item) => item.dictValue).join(',');
  1016. }
  1017. // const code = this.codeList.find((item) => item.dictCode == r);
  1018. // return code?.dictValue;
  1019. },
  1020. tableRowClassName({ row, rowIndex }) {
  1021. console.log(row);
  1022. if (row.result == 2) {
  1023. return 'warning-row';
  1024. } else {
  1025. return '';
  1026. }
  1027. },
  1028. rowClass({ row, column, rowIndex, columnIndex }) {
  1029. if (rowIndex === 1) {
  1030. return {
  1031. display: 'none',
  1032. background: '#EEEEEE'
  1033. };
  1034. }
  1035. return { background: '#0000' };
  1036. },
  1037. async getAllCategoryType() {
  1038. const { data } = await allCategoryLevel();
  1039. this.codeList = data.map((item) => {
  1040. return { dictCode: item.id, dictValue: item.name };
  1041. });
  1042. },
  1043. async _getInfo(id) {
  1044. if (!id) return;
  1045. let res = null;
  1046. let resAll = null;
  1047. if (this.isInterior) {
  1048. res = await storageApi.getInboundDetailsById(id);
  1049. } else if (this.isIds) {
  1050. resAll = await storageApi.getInboundDetailsByIds(id);
  1051. } else {
  1052. res = await storageApi.getInfoBySourceBizNo(id);
  1053. }
  1054. console.log(
  1055. 'idsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss',
  1056. this.isIds
  1057. );
  1058. if (this.isIds) {
  1059. res = JSON.parse(JSON.stringify(resAll[0]));
  1060. this.extInfo = resAll[0].extInfo;
  1061. res['outInDetailList'] = [];
  1062. resAll.forEach((item) => {
  1063. item.outInDetailList.forEach((val) => {
  1064. val['bizNo'] = item.bizNo;
  1065. res['outInDetailList'].push(val);
  1066. });
  1067. });
  1068. res['bizNo'] = resAll.map((item) => item.bizNo);
  1069. this.infoData = res;
  1070. console.log('resAll---------------', resAll);
  1071. } else {
  1072. this.infoData = res;
  1073. this.extInfo = res.extInfo;
  1074. console.log(
  1075. res,
  1076. 'resresresresresresresresresresresresresresresresresresresresres2222'
  1077. );
  1078. }
  1079. console.log('===', res);
  1080. this.productList = res?.outInDetailList?.map(
  1081. (productItem, productIndex) => {
  1082. // if (this.isIds) {
  1083. // productItem['bizNo'] = res.bizNo[productIndex];
  1084. // }
  1085. return {
  1086. ...productItem,
  1087. outInDetailRecordRequestList:
  1088. productItem.outInDetailRecordRequestList.map((packingItem) => {
  1089. return {
  1090. ...packingItem,
  1091. categoryName: productItem.categoryName,
  1092. categoryCode: productItem.categoryCode,
  1093. supplierCode: productItem.supplierCode,
  1094. supplierName: productItem.supplierName,
  1095. materialDetailList: packingItem.materialDetailList.map(
  1096. (materialItem) => {
  1097. return {
  1098. ...materialItem,
  1099. categoryName: productItem.categoryName,
  1100. categoryCode: productItem.categoryCode
  1101. };
  1102. }
  1103. )
  1104. };
  1105. })
  1106. };
  1107. }
  1108. );
  1109. // 获取包装维度数据
  1110. const arr = [];
  1111. for (const key in this.productList) {
  1112. for (const k in this.productList[key].outInDetailRecordRequestList) {
  1113. arr.push({
  1114. ...this.productList[key].outInDetailRecordRequestList[k]
  1115. });
  1116. }
  1117. }
  1118. this.packingList = arr;
  1119. // 获取物料维度数据
  1120. let iArr = [];
  1121. arr.forEach((item) => {
  1122. item.materialDetailList.forEach((ele) => {
  1123. iArr.push({ ...ele });
  1124. });
  1125. });
  1126. this.materialList = iArr;
  1127. console.log(this.packingList);
  1128. console.log(this.materialList);
  1129. this.pickingFetchData();
  1130. this.materielFetchData();
  1131. console.log(this.productList, 'this.productList');
  1132. },
  1133. download(row) {
  1134. if (row.storePath) {
  1135. getFile({ objectName: row.storePath }, row.name);
  1136. }
  1137. }
  1138. }
  1139. };
  1140. </script>
  1141. <style lang="scss" scoped>
  1142. ::v-deep .warning-row {
  1143. color: red;
  1144. }
  1145. ::v-deep .page-title {
  1146. border-bottom: none;
  1147. }
  1148. ::v-deep .page-title-div {
  1149. width: 100%;
  1150. }
  1151. .stepsStatus {
  1152. width: 40%;
  1153. margin: 0 auto;
  1154. }
  1155. .el-form-item {
  1156. margin-bottom: 10px;
  1157. }
  1158. .p20 {
  1159. padding: 20px;
  1160. }
  1161. .flex {
  1162. display: flex;
  1163. }
  1164. .title {
  1165. justify-content: space-between;
  1166. border-bottom: 1px solid #ccc;
  1167. padding-bottom: 5px;
  1168. span {
  1169. font-size: 16px;
  1170. }
  1171. .col {
  1172. padding-left: 40px;
  1173. font-size: 14px;
  1174. color: #aaaaaa;
  1175. }
  1176. }
  1177. .degree {
  1178. margin-right: 10px;
  1179. padding: 0px 15px;
  1180. color: #fff;
  1181. font-size: 13px;
  1182. line-height: 23px;
  1183. border-radius: 23px;
  1184. display: flex;
  1185. align-items: center;
  1186. justify-content: space-between;
  1187. span {
  1188. width: 5px;
  1189. height: 5px;
  1190. border-radius: 100%;
  1191. margin-right: 6px;
  1192. background-color: #fff;
  1193. }
  1194. }
  1195. .red {
  1196. background-color: rgb(163, 0, 20);
  1197. }
  1198. .blue {
  1199. background-color: #1989fa;
  1200. }
  1201. .createdInfo {
  1202. justify-content: space-around;
  1203. margin-top: 10px;
  1204. font-size: 14px;
  1205. .col {
  1206. color: #6e6e6e;
  1207. padding-right: 10px;
  1208. }
  1209. }
  1210. .mt40 {
  1211. margin-top: 40px;
  1212. }
  1213. .custSteps {
  1214. margin-top: 20px;
  1215. margin-left: 70px;
  1216. .box {
  1217. width: 158px;
  1218. border: 1px solid #ccc;
  1219. padding: 10px;
  1220. flex-direction: row;
  1221. flex-wrap: wrap;
  1222. // justify-content: space-between;
  1223. font-size: 12px;
  1224. color: #9e9e9e;
  1225. .x {
  1226. width: 20px;
  1227. height: 15px;
  1228. margin-right: 5px;
  1229. }
  1230. .q {
  1231. background-color: #d0e4d5;
  1232. }
  1233. .b {
  1234. background-color: #1989fa;
  1235. }
  1236. .g {
  1237. background-color: #157a2c;
  1238. }
  1239. .r {
  1240. background-color: #a30014;
  1241. }
  1242. .a {
  1243. align-items: center;
  1244. margin-bottom: 10px;
  1245. }
  1246. .mr10 {
  1247. margin-right: 10px;
  1248. }
  1249. .mb0 {
  1250. margin-bottom: 0;
  1251. }
  1252. }
  1253. .stepsInfo {
  1254. // flex: 1;
  1255. width: 483px;
  1256. }
  1257. }
  1258. .mt20 {
  1259. margin-top: 20px;
  1260. }
  1261. .content-detail {
  1262. overflow: hidden;
  1263. }
  1264. .executor {
  1265. font-size: 14px;
  1266. .col {
  1267. color: #6e6e6e;
  1268. padding-right: 10px;
  1269. }
  1270. }
  1271. .result {
  1272. justify-content: space-around;
  1273. }
  1274. .mr20 {
  1275. margin-right: 20px;
  1276. }
  1277. .details {
  1278. font-size: 14px;
  1279. margin-bottom: 10px;
  1280. }
  1281. .customSteps {
  1282. margin-top: 40px;
  1283. font-size: 14px;
  1284. margin-left: 80px;
  1285. .time {
  1286. font-size: 12px;
  1287. color: #6e6e6e;
  1288. margin-right: 20px;
  1289. position: relative;
  1290. &::after {
  1291. content: '';
  1292. width: 1px;
  1293. height: 100%;
  1294. background-color: #157a2c;
  1295. position: absolute;
  1296. right: -26px;
  1297. }
  1298. }
  1299. .flex:last-child {
  1300. .time {
  1301. &::after {
  1302. display: none;
  1303. }
  1304. }
  1305. }
  1306. .round {
  1307. margin-right: 20px;
  1308. width: 10px;
  1309. height: 10px;
  1310. border-radius: 100%;
  1311. background-color: #157a2c;
  1312. position: relative;
  1313. span {
  1314. position: absolute;
  1315. top: 50%;
  1316. left: 50%;
  1317. width: 4px;
  1318. height: 4px;
  1319. background-color: #fff;
  1320. border-radius: 100%;
  1321. transform: translate(-2px, -2px);
  1322. }
  1323. }
  1324. .text {
  1325. .info {
  1326. margin-top: 10px;
  1327. width: 955px;
  1328. background-color: #f0f3f3;
  1329. overflow: hidden;
  1330. padding: 10px;
  1331. margin-bottom: 10px;
  1332. }
  1333. }
  1334. }
  1335. .switch_left li {
  1336. border-right: 1px solid rgba(222, 222, 222, 1);
  1337. border-left: 1px solid rgba(222, 222, 222, 1);
  1338. }
  1339. </style>