outboundDetailsDialog.vue 21 KB

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