outboundDetailsDialog.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. :visible.sync="outboundDetailsDialogFlag"
  6. :title="title"
  7. append-to-body
  8. :close-on-click-modal="false"
  9. width="70%"
  10. :before-close="cancel"
  11. :maxable="true"
  12. :resizable="true"
  13. >
  14. <div>
  15. <div class="content-detail">
  16. <header-title title="基本信息" size="16px"></header-title>
  17. <div class="mt20">
  18. <el-form label-width="110px">
  19. <el-col :span="8">
  20. <el-form-item label="出库单号">
  21. <span>{{ infoData.bizNo }}</span>
  22. </el-form-item>
  23. </el-col>
  24. <el-col :span="8">
  25. <el-form-item label="出库物品类型">
  26. <span>{{
  27. infoData.bizType == 3
  28. ? '物品'
  29. : getDictValue('类型用途', infoData.assetType)
  30. }}</span>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="8">
  34. <el-form-item label="出库场景">
  35. <!-- <span>{{ getSceneState(infoData.bizType) }}</span>-->
  36. </el-form-item>
  37. </el-col>
  38. <el-col :span="8" >
  39. <el-form-item label="客户名称">
  40. <span>{{ infoData.clientName }}</span>
  41. </el-form-item>
  42. </el-col>
  43. <!-- <el-col :span="8" v-if="infoData.bizType == 3">
  44. <el-form-item label="客户联系人">
  45. <span>{{ infoData.clientUser }}</span>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="8" v-if="infoData.bizType == 3">
  49. <el-form-item label="客户电话">
  50. <span>{{ infoData.clientPhone }}</span>
  51. </el-form-item>
  52. </el-col> -->
  53. <el-col :span="8">
  54. <el-form-item
  55. :label="infoData.bizType == 4 ? '领料单' : '来源单据'"
  56. >
  57. <span>{{ infoData.sourceBizNo }}</span>
  58. </el-form-item>
  59. </el-col>
  60. <el-col :span="8">
  61. <el-form-item label="领料人联系方式">
  62. <span>{{ infoData.fromUserPhone }}</span>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="8">
  66. <el-form-item label="出库登记人">
  67. <span>{{ infoData.extInfo?.createUserName }}</span>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :span="8">
  71. <el-form-item label="权属部门">
  72. <span>{{ infoData.extInfo?.deptName }}</span>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="8">
  76. <el-form-item label="创建时间">
  77. <span>{{ infoData.createTime }}</span>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="8">
  81. <el-form-item label="出库时间">
  82. <span>{{ infoData.createTime }}</span>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="8">
  86. <el-form-item label="状态:">
  87. <span>{{ stepsTitle }}</span>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="8">
  91. <el-form-item label="领料人部门">
  92. <span>{{ infoData.verifyDeptName }}</span>
  93. </el-form-item>
  94. </el-col>
  95. <el-col :span="8">
  96. <el-form-item label="领料人">
  97. <span>{{ infoData.fromUser }}</span>
  98. </el-form-item>
  99. </el-col>
  100. <el-col :span="16">
  101. <el-form-item label="备注">
  102. <span>{{ infoData.remark }}</span>
  103. </el-form-item>
  104. </el-col>
  105. </el-form>
  106. </div>
  107. </div>
  108. <div class="content-detail mt20">
  109. <header-title title="出库物品明细" size="16px"></header-title>
  110. <div class="mt20">
  111. <div class="mt10">
  112. <el-table
  113. ref="multipleTable"
  114. :data="warehousingMaterialList"
  115. tooltip-effect="dark"
  116. style="width: 100%"
  117. stripe
  118. :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
  119. >
  120. <el-table-column label="序号" type="index" width="50">
  121. </el-table-column>
  122. <el-table-column
  123. label="编码"
  124. prop="categoryCode"
  125. ></el-table-column>
  126. <el-table-column label="名称" prop="name"></el-table-column>
  127. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  128. <el-table-column label="最小包装单元" width="120">
  129. <template slot-scope="{ row }">
  130. {{ row.minPackingCount }}{{ row.measuringUnit }}/{{
  131. row.packingUnit
  132. }}
  133. </template>
  134. </el-table-column>
  135. <el-table-column label="包装数量" prop="availableCountBase">
  136. <template slot-scope="{ row }">
  137. {{ row.packingCount }}{{ row.packingUnit }}
  138. </template>
  139. </el-table-column>
  140. <el-table-column label="计量数量" prop="count"></el-table-column>
  141. <el-table-column
  142. label="计量单位"
  143. prop="measuringUnit"
  144. ></el-table-column>
  145. <el-table-column label="重量" prop="weight"></el-table-column>
  146. <el-table-column
  147. label="重量单位"
  148. prop="weightUnit"
  149. ></el-table-column>
  150. <el-table-column label="单价">
  151. <template slot-scope="{ row }">
  152. {{ row.price ? row.price : '-' }}元/{{ row.measuringUnit }}
  153. </template>
  154. </el-table-column>
  155. <el-table-column label="金额" prop="totalMoney"></el-table-column>
  156. <el-table-column label="领料部门" prop="llbm"></el-table-column>
  157. </el-table>
  158. </div>
  159. </div>
  160. </div>
  161. <!-- ${
  162. infoData.bizType == 3
  163. ? '物品'
  164. : getDictValue('类型用途', infoData.assetType)
  165. }明细 -->
  166. <div class="mt20">
  167. <header-title :title="`出库包装明细`" size="16px"></header-title>
  168. <el-table
  169. ref="multipleTable"
  170. :data="materialCodeReqList"
  171. tooltip-effect="dark"
  172. style="width: 100%"
  173. @selection-change="selectionChange2"
  174. stripe
  175. :header-cell-style="{ background: '#EEEEEE', border: 'none' }"
  176. >
  177. <el-table-column label="序号" type="index" width="50">
  178. </el-table-column>
  179. <!-- ${
  180. infoData.bizType == 3
  181. ? '物品'
  182. : getDictValue('类型用途', infoData.assetType)
  183. } -->
  184. <el-table-column
  185. :label="`编码`"
  186. prop="categoryCode"
  187. ></el-table-column>
  188. <el-table-column :label="`名称`" prop="name"></el-table-column>
  189. <el-table-column label="批次号" prop="batchNo"></el-table-column>
  190. <el-table-column
  191. label="包装编码"
  192. prop="code"
  193. width="80"
  194. ></el-table-column>
  195. <el-table-column label="包装数量" prop="packingCount" width="80">
  196. <template slot-scope="{ row }">
  197. {{ row.packingCount == 0 ? '0' : row.packingCount }}
  198. </template>
  199. </el-table-column>
  200. <el-table-column
  201. label="包装单位"
  202. prop="packingUnit"
  203. ></el-table-column>
  204. <el-table-column label="计量数量" prop="totalCount"></el-table-column>
  205. <el-table-column
  206. label="计量单位"
  207. prop="measuringUnit"
  208. ></el-table-column>
  209. <!-- <el-table-column label="领料部门" prop=""></el-table-column> -->
  210. <el-table-column
  211. v-if="infoData.bizType == 2 || infoData.bizType == 1"
  212. label="物料代号"
  213. prop="materielCode"
  214. >
  215. <template slot-scope="{ row }">
  216. {{ row.materielCode }}
  217. </template>
  218. </el-table-column>
  219. <el-table-column
  220. v-if="infoData.bizType == 2 || infoData.bizType == 1"
  221. label="客户代号"
  222. prop="clientCode"
  223. >
  224. <template slot-scope="{ row }">
  225. {{ row.clientCode }}
  226. </template>
  227. </el-table-column>
  228. <!-- v-if="infoData.bizType == 1" -->
  229. <el-table-column label="刻码" prop="engrave">
  230. <template slot-scope="{ row }">
  231. {{ row.engrave }}
  232. </template>
  233. </el-table-column>
  234. <el-table-column label="重量" prop="weight">
  235. <template slot-scope="{ row }">
  236. {{ row.weight }}
  237. </template>
  238. </el-table-column>
  239. <el-table-column label="重量单位" prop="weightUtil">
  240. <template slot-scope="{ row }">
  241. {{ row.weightUtil }}
  242. </template>
  243. </el-table-column>
  244. <el-table-column label="日期" prop="createTime" width="200">
  245. <template slot="header" slot-scope="scope">
  246. <!-- {{ dateTypes != 1 ? '采购日期' : '生产日期' }} -->
  247. 采购日期
  248. </template>
  249. <template slot-scope="{ row }">
  250. {{ row.createTime }}
  251. </template>
  252. </el-table-column>
  253. <el-table-column label="领料部门" prop="">
  254. <template slot-scope="{ row }">
  255. {{ row.llbm }}
  256. </template>
  257. </el-table-column>
  258. <!-- <el-table-column label="转消耗" prop="">
  259. <template slot-scope="{ row }">
  260. <el-checkbox
  261. disabled
  262. v-model="row.isTransferAsset"
  263. ></el-checkbox>
  264. </template>
  265. </el-table-column> -->
  266. </el-table>
  267. </div>
  268. </div>
  269. </ele-modal>
  270. </template>
  271. <script>
  272. import { mapGetters, mapActions } from 'vuex';
  273. import { getOutInBySourceBizNoAPI } from '@/api/saleManage/returnGoods';
  274. import { deepClone } from '@/utils';
  275. export default {
  276. props: {
  277. outboundDetailsDialogFlag: {
  278. type: Boolean,
  279. default: false
  280. }
  281. },
  282. data() {
  283. return {
  284. title: '出库单信息',
  285. selectionChangeList: [],
  286. selectionChangeList2: [],
  287. selectionChangeList3: [],
  288. metaList: [],
  289. rows: {},
  290. infoData: {},
  291. warehousingMaterialList: [],
  292. materialCodeReqList: [],
  293. tableData2: [],
  294. fromUserList: [],
  295. num: 1,
  296. stepsList: [
  297. { status: 'Done', nodeName: '创建' },
  298. { status: 'Done', nodeName: '暂存', time: '2023-01-06' },
  299. { status: 'Done', nodeName: '收货中' },
  300. { status: 'Processing', nodeName: '已收货' }
  301. ],
  302. list: [
  303. {
  304. name: '紧急',
  305. color: 'red'
  306. },
  307. {
  308. name: '重要',
  309. color: 'blue'
  310. },
  311. {
  312. name: '已催办',
  313. color: 'red'
  314. }
  315. ],
  316. stepsTitle: '已完成',
  317. stepsStatus: 'success',
  318. active: 0
  319. };
  320. },
  321. watch: {},
  322. computed: {
  323. ...mapGetters(['getDictValue'])
  324. // tableHeader() {
  325. // return tableHeader(this.infoData?.extInfo?.assetType);
  326. // }
  327. },
  328. created() {
  329. //
  330. // this.getUser();
  331. // this._getInfo();
  332. // this.requestDict('类型用途');
  333. },
  334. methods: {
  335. async init(row = {}) {
  336. this.rows = row;
  337. const data = await getOutInBySourceBizNoAPI(row.sendNo);
  338. this.infoData = deepClone(data);
  339. //出库物料明细
  340. this.warehousingMaterialList = this.infoData?.outInDetailVOList || [];
  341. //出库包装明细
  342. if (this.warehousingMaterialList.length) {
  343. this.materialCodeReqList = [];
  344. this.warehousingMaterialList.forEach((item) => {
  345. if (item.outInDetailRecordVOList?.length) {
  346. item.outInDetailRecordVOList = item.outInDetailRecordVOList.map(
  347. (i) => {
  348. return {
  349. ...i,
  350. outInCode: this.infoData.bizNo,
  351. outInId: item.outInId,
  352. measurementCount: i.totalCount,
  353. outboundDetailId: i.id,
  354. outboundType: 1,
  355. packageCount: i.packingCount,
  356. packingUnit: i.packingUnit,
  357. weight: i.weight,
  358. specification: item.specification,
  359. name: i.name,
  360. carveCode: i.engrave,
  361. categoryCode: i.categoryCode,
  362. id: ''
  363. };
  364. }
  365. );
  366. this.materialCodeReqList.push(...item.outInDetailRecordVOList);
  367. }
  368. });
  369. //出库物料明细
  370. if (this.materialCodeReqList.length) {
  371. this.metaList = [];
  372. this.materialCodeReqList.forEach((item) => {
  373. if (item.outInDetailRecordMaterialDetailVOList?.length) {
  374. item.outInDetailRecordMaterialDetailVOList =
  375. item.outInDetailRecordMaterialDetailVOList.map((i) => {
  376. return {
  377. ...i,
  378. outInId: item.outInId,
  379. outInCode: item.outInCode,
  380. measurementCount: 1,
  381. outboundDetailId: i.id,
  382. outboundType: 2,
  383. packageCount: i.packingCount,
  384. packingUnit: i.packingUnit,
  385. weight: i.weight,
  386. weightUtil: i.weightUnit,
  387. specification: item.specification,
  388. categoryCode: i.assetCode,
  389. carveCode: i.engrave,
  390. name: i.assetName,
  391. id: ''
  392. };
  393. });
  394. this.metaList.push(
  395. ...item.outInDetailRecordMaterialDetailVOList
  396. );
  397. }
  398. });
  399. }
  400. }
  401. },
  402. getUserName(id) {
  403. let obj = this.fromUserList.find((x) => x.id == id);
  404. return obj && obj.name;
  405. },
  406. async getUser() {
  407. let res22 = await warehouseDefinition.getUserPage({
  408. groupId: 1,
  409. size: 9999,
  410. page: 1
  411. });
  412. this.fromUserList = res22.list;
  413. },
  414. // selectionChange(val){
  415. // this.selectionChangeList = val
  416. // },
  417. selectionChange2(val) {
  418. this.selectionChangeList2 = val;
  419. },
  420. selectionChange3(val) {
  421. this.selectionChangeList3 = val;
  422. },
  423. handleSave() {
  424. if (
  425. !this.selectionChangeList2.length &&
  426. !this.selectionChangeList3.length
  427. )
  428. return this.$message.warning('请选择物品!');
  429. let params = [
  430. ...this.selectionChangeList2,
  431. ...this.selectionChangeList3
  432. ];
  433. this.$emit('saveDate', params);
  434. this.cancel();
  435. },
  436. cancel() {
  437. this.$emit('update:outboundDetailsDialogFlag', false);
  438. },
  439. ...mapActions('dict', ['requestDict'])
  440. }
  441. };
  442. </script>
  443. <style lang="scss" scoped>
  444. .stepsStatus {
  445. width: 40%;
  446. margin: 0 auto;
  447. }
  448. .p20 {
  449. padding: 20px;
  450. }
  451. .flex {
  452. display: flex;
  453. }
  454. .title {
  455. justify-content: space-between;
  456. border-bottom: 1px solid #ccc;
  457. padding-bottom: 5px;
  458. span {
  459. font-size: 16px;
  460. }
  461. .col {
  462. padding-left: 40px;
  463. font-size: 14px;
  464. color: #aaaaaa;
  465. }
  466. }
  467. .degree {
  468. margin-right: 10px;
  469. padding: 0px 15px;
  470. color: #fff;
  471. font-size: 13px;
  472. line-height: 23px;
  473. border-radius: 23px;
  474. display: flex;
  475. align-items: center;
  476. justify-content: space-between;
  477. span {
  478. width: 5px;
  479. height: 5px;
  480. border-radius: 100%;
  481. margin-right: 6px;
  482. background-color: #fff;
  483. }
  484. }
  485. .red {
  486. background-color: rgb(163, 0, 20);
  487. }
  488. .blue {
  489. background-color: #1989fa;
  490. }
  491. .createdInfo {
  492. justify-content: space-around;
  493. margin-top: 10px;
  494. font-size: 14px;
  495. .col {
  496. color: #6e6e6e;
  497. padding-right: 10px;
  498. }
  499. }
  500. .mt40 {
  501. margin-top: 40px;
  502. }
  503. .custSteps {
  504. margin-top: 20px;
  505. margin-left: 70px;
  506. .box {
  507. width: 158px;
  508. border: 1px solid #ccc;
  509. padding: 10px;
  510. flex-direction: row;
  511. flex-wrap: wrap;
  512. // justify-content: space-between;
  513. font-size: 12px;
  514. color: #9e9e9e;
  515. .x {
  516. width: 20px;
  517. height: 15px;
  518. margin-right: 5px;
  519. }
  520. .q {
  521. background-color: #d0e4d5;
  522. }
  523. .b {
  524. background-color: #1989fa;
  525. }
  526. .g {
  527. background-color: #157a2c;
  528. }
  529. .r {
  530. background-color: #a30014;
  531. }
  532. .a {
  533. align-items: center;
  534. margin-bottom: 10px;
  535. }
  536. .mr10 {
  537. margin-right: 10px;
  538. }
  539. .mb0 {
  540. margin-bottom: 0;
  541. }
  542. }
  543. .stepsInfo {
  544. // flex: 1;
  545. width: 483px;
  546. }
  547. }
  548. .mt20 {
  549. margin-top: 20px;
  550. }
  551. .content-detail {
  552. overflow: hidden;
  553. }
  554. .executor {
  555. font-size: 14px;
  556. .col {
  557. color: #6e6e6e;
  558. padding-right: 10px;
  559. }
  560. }
  561. .result {
  562. justify-content: space-around;
  563. }
  564. .mr20 {
  565. margin-right: 20px;
  566. }
  567. .details {
  568. font-size: 14px;
  569. margin-bottom: 10px;
  570. }
  571. .customSteps {
  572. margin-top: 40px;
  573. font-size: 14px;
  574. margin-left: 80px;
  575. .time {
  576. font-size: 12px;
  577. color: #6e6e6e;
  578. margin-right: 20px;
  579. position: relative;
  580. &::after {
  581. content: '';
  582. width: 1px;
  583. height: 100%;
  584. background-color: #157a2c;
  585. position: absolute;
  586. right: -26px;
  587. }
  588. }
  589. .flex:last-child {
  590. .time {
  591. &::after {
  592. display: none;
  593. }
  594. }
  595. }
  596. .round {
  597. margin-right: 20px;
  598. width: 10px;
  599. height: 10px;
  600. border-radius: 100%;
  601. background-color: #157a2c;
  602. position: relative;
  603. span {
  604. position: absolute;
  605. top: 50%;
  606. left: 50%;
  607. width: 4px;
  608. height: 4px;
  609. background-color: #fff;
  610. border-radius: 100%;
  611. transform: translate(-2px, -2px);
  612. }
  613. }
  614. .text {
  615. .info {
  616. margin-top: 10px;
  617. width: 955px;
  618. background-color: #f0f3f3;
  619. overflow: hidden;
  620. padding: 10px;
  621. margin-bottom: 10px;
  622. }
  623. }
  624. }
  625. </style>