diff --git a/src/api/production/production-return.js b/src/api/production/production-return.js index 700a435..541117c 100644 --- a/src/api/production/production-return.js +++ b/src/api/production/production-return.js @@ -29,4 +29,6 @@ export const printLabelInfo = data => createAPI('/label/setting/printLabel','pos // 打印标签 export const printLabelCommon = data => createAPI('/label/setting/printLabelCommon','post',data) -export const createNewReturnHandlingUnits = data => createAPI(`/pda/production/return/createNewReturnHandlingUnits`,'post',data) \ No newline at end of file +export const createNewReturnHandlingUnits = data => createAPI(`/pda/production/return/createNewReturnHandlingUnits`,'post',data) + +export const getMaterialLabelByIssueDetail = data => createAPI(`/pda/production/return/getMaterialLabelByIssueDetail`,'post',data) \ No newline at end of file diff --git a/src/views/modules/production-return/productionReturnIssueList.vue b/src/views/modules/production-return/productionReturnIssueList.vue index 0897e6f..72cdc0e 100644 --- a/src/views/modules/production-return/productionReturnIssueList.vue +++ b/src/views/modules/production-return/productionReturnIssueList.vue @@ -84,6 +84,7 @@ export default { lineItemNo: '', releaseNo: '', sequenceNo: '', + umId:'' }; }, methods: { @@ -137,6 +138,7 @@ export default { sequenceNo: this.sequenceNo, wdrNo: item.WAIV_DEV_REJ_NO , engChgLevel: item.ENG_CHG_LEVEL || '1', + umId: this.umId, }, }); }, @@ -150,6 +152,7 @@ export default { this.lineItemNo = this.$route.query.lineItemNo; this.releaseNo = this.$route.query.releaseNo; this.sequenceNo = this.$route.query.sequenceNo; + this.umId = this.$route.query.uom; this.loadIssueList(); }, }; diff --git a/src/views/modules/production-return/productionReturnPDA.vue b/src/views/modules/production-return/productionReturnPDA.vue index f296432..c5f587b 100644 --- a/src/views/modules/production-return/productionReturnPDA.vue +++ b/src/views/modules/production-return/productionReturnPDA.vue @@ -307,6 +307,7 @@ export default { lineItemNo: material.bomItemNo, // 物料行号 releaseNo: this.selectedRequestMaterial.releaseNo, // 版本 sequenceNo: this.selectedRequestMaterial.sequenceNo, // 版本行号 + uom: material.uom } }) }, diff --git a/src/views/modules/production-return/productionReturnPDAIssueList.vue b/src/views/modules/production-return/productionReturnPDAIssueList.vue index 624c978..a63723e 100644 --- a/src/views/modules/production-return/productionReturnPDAIssueList.vue +++ b/src/views/modules/production-return/productionReturnPDAIssueList.vue @@ -377,6 +377,7 @@ import { scanMaterialLabel, productionReturnUnissueConfirm, printLabelInfo, + getMaterialLabelByIssueDetail, } from '@/api/production/production-return' import moment from 'moment' @@ -963,6 +964,7 @@ export default { .catch(() => { this.$message.error('获取订单详情失败') }) + }, addWmsLabel() { if (!this.printData.materialCode1.trim()) { diff --git a/src/views/modules/production-return/productionReturnPDAList.vue b/src/views/modules/production-return/productionReturnPDAList.vue index d903856..5f444fb 100644 --- a/src/views/modules/production-return/productionReturnPDAList.vue +++ b/src/views/modules/production-return/productionReturnPDAList.vue @@ -82,6 +82,7 @@ export default { lineItemNo:'', releaseNo:'', sequenceNo:'', + umId:'', }; }, methods: { @@ -137,6 +138,7 @@ export default { sequenceNo:this.sequenceNo, wdrNo: item.WAIV_DEV_REJ_NO , engChgLevel: item.ENG_CHG_LEVEL || '1', + umId: this.umId, } }, }); @@ -153,6 +155,7 @@ export default { this.lineItemNo = this.$route.query.lineItemNo; this.releaseNo = this.$route.query.releaseNo; this.sequenceNo = this.$route.query.sequenceNo; + this.umId = this.$route.query.uom; this.loadIssueList(); }, }; diff --git a/src/views/modules/production-return/productionReturnPicking.vue b/src/views/modules/production-return/productionReturnPicking.vue index 48c3ef4..bae7739 100644 --- a/src/views/modules/production-return/productionReturnPicking.vue +++ b/src/views/modules/production-return/productionReturnPicking.vue @@ -295,6 +295,7 @@ export default { componentPartNo: material.componentPartNo, componentPartDesc: material.componentPartDesc, lineItemNo: material.lineItemNo, + uom: material.uom, }, }); }, diff --git a/src/views/modules/production-return/productionReturnPickingDetail.vue b/src/views/modules/production-return/productionReturnPickingDetail.vue index b104e1a..ef49ca1 100644 --- a/src/views/modules/production-return/productionReturnPickingDetail.vue +++ b/src/views/modules/production-return/productionReturnPickingDetail.vue @@ -98,8 +98,8 @@ {{ label.labelCode }}
- 物料号: - {{ label.partNo || '-' }} + 批次号: + {{ label.batchNo}}
库位号: @@ -112,6 +112,11 @@
退料数量: {{ label.quantity || 0 }} + + 是否被占用: + + {{ label.isInWh === 'Y' ? '是' : '否' }} +
@@ -296,6 +301,7 @@ import { scanMaterialLabel, productionReturnConfirm, printLabelCommon, + getMaterialLabelByIssueDetail } from '@/api/production/production-return' import moment from 'moment' @@ -349,6 +355,7 @@ export default { wdrNo: '', engChgLevel: '', enablePrint: true, // 是否打印标签,默认勾选 + umId: '', } }, computed: { @@ -682,6 +689,17 @@ export default { return } + // 从 labelList 中移除 isInWh 为 'Y' 且 quantity 为 0 的标签 + this.labelList = this.labelList.filter((label) => { + return !(label.isInWh === 'Y' && (Number(label.quantity) === 0 || !label.quantity)); + }); + + // 如果过滤后没有标签了,提示用户 + if (this.labelList.length === 0) { + this.$message.warning('没有可退料的标签') + return + } + const returnParams = { site: localStorage.getItem('site'), workOrderNo: this.orderNo, @@ -697,6 +715,7 @@ export default { lineItemNo:this.lineItemNo, releaseNo: this.releaseNo, sequenceNo: this.sequenceNo, + umId: this.umId, // 退料标签列表 selectedMaterials: this.labelList.map((label) => ({ labelCode: label.labelCode, @@ -711,6 +730,8 @@ export default { newPrint: label.newPrint || 'OLD', })), } + console.log(returnParams); + this.loading = true productionReturnConfirm(returnParams) @@ -833,6 +854,19 @@ export default { this.orderInfo.quantity = this.quantity this.orderInfo.componentPartDesc = this.componentPartDesc this.orderInfo.qtyReversed = this.qtyReversed + + const paramdetail = { + workOrderNo: this.orderNo, + batchNo: this.batchNo, + site: localStorage.getItem('site'), + partNo: this.componentPartNo, + quantity:this.quantity + } + getMaterialLabelByIssueDetail(paramdetail).then(({data}) =>{ + if(data.code == 0){ + this.labelList = data.labelInfo + } + }) }, addWmsLabel() { if (!this.printData.materialCode1.trim()) { @@ -878,6 +912,7 @@ export default { this.sequenceNo = this.$route.query.sequenceNo this.wdrNo = this.$route.query.wdrNo this.engChgLevel = this.$route.query.engChgLevel + this.umId = this.$route.query.umId console.log( '订单号:', this.orderNo, @@ -1353,6 +1388,12 @@ export default { font-size: 12px; } +.card-value.is-occupied { + color: #ff4949; + font-weight: bold; + font-size: 12px; +} + .empty-labels { padding: 40px 20px; text-align: center;