From 65e027e2358fbd9b1147f96da44fdb383ea77e94 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Tue, 23 Sep 2025 16:56:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E9=A2=86=E6=96=99=E9=80=80?= =?UTF-8?q?=E6=96=99=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 4 +- .../modules/production-issue/directIssue.vue | 1 + .../production-issue/directIssueDetail.vue | 8 ++- .../production-return/productionReturnPDA.vue | 10 ++-- .../productionReturnPDAIssueList.vue | 50 +++++++++++++------ .../productionReturnPDAList.vue | 23 ++++++--- 6 files changed, 66 insertions(+), 30 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index a55197d..5d0be3d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -54,8 +54,8 @@ const globalRoutes = [ {path: "/productionReturnIssueList", name: "productionReturnIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, {path: "/productionReturnPickingDetail/:orderNo/:orderType/:partNo/:transactionId/:quantity/:batchNo", name: "productionReturnPickingDetail", component: resolve => require(["@/views/modules/production-return/productionReturnPickingDetail.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, {path: "/productionReturnPDA", name: "productionReturnPDA", component: resolve => require(["@/views/modules/production-return/productionReturnPDA.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, - {path: "/productionReturnPDAList/:workOrderNo/:partNo/:unissureQty", name: "productionReturnPDAList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, - {path: "/productionReturnPDAIssueList/:notifyNo/:itemNo/:workOrderNo/:unissureQty", name: "productionReturnPDAIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, + {path: "/productionReturnPDAList/:workOrderNo/:partNo/:unissureQty/:itemNo", name: "productionReturnPDAList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, + {path: "/productionReturnPDAIssueList/:workOrderNo/:material", name: "productionReturnPDAIssueList", component: resolve => require(["@/views/modules/production-return/productionReturnPDAIssueList.vue"], resolve), meta: { transition: 'instant', preload: true, keepAlive: true } }, {path: '/production-return/pick/:orderNo', name: 'ProductionIssuePick',component: resolve => require(["@/views/modules/production-return/pick.vue"], resolve), meta: { transition: 'instant' ,preload: true,keepAlive: true}}, diff --git a/src/views/modules/production-issue/directIssue.vue b/src/views/modules/production-issue/directIssue.vue index 97a8553..7f37939 100644 --- a/src/views/modules/production-issue/directIssue.vue +++ b/src/views/modules/production-issue/directIssue.vue @@ -266,6 +266,7 @@ export default { partDesc: material.componentPartDesc, requiredQty: material.qtyRequired, issuedQty: material.qtyIssued || 0, + itemNo: material.lineItemNo, }, }); }, diff --git a/src/views/modules/production-issue/directIssueDetail.vue b/src/views/modules/production-issue/directIssueDetail.vue index f90434a..85f8b22 100644 --- a/src/views/modules/production-issue/directIssueDetail.vue +++ b/src/views/modules/production-issue/directIssueDetail.vue @@ -27,7 +27,7 @@
- 工单号:{{ workOrderNo }} + 工单号:{{ workOrderNo }}  行号:{{itemNo}}
@@ -117,6 +117,7 @@ export default { componentPartDesc: '', requiredQty: 0, issuedQty: 0, + itemNo: '', } }, computed: { @@ -165,6 +166,7 @@ export default { quantity: data.labelInfo.availableQty, batchNo: data.labelInfo.batchNo, warehouseId: data.labelInfo.warehouseId, + locationId: data.labelInfo.locationId, }) this.$message.success('扫描成功') } else { @@ -215,12 +217,13 @@ export default { workOrderNo: this.workOrderNo, componentPartNo: this.componentPartNo, operatorName: localStorage.getItem('userName'), + itemNo: this.itemNo, selectedMaterials: this.scannedLabels.map((l, i) => ({ - itemNo: i + 1, labelCode: l.labelCode, issueQty: l.quantity, batchNo: l.batchNo, warehouseId: l.warehouseId, + locationId: l.locationId, materialCode: l.materialCode, })), } @@ -243,6 +246,7 @@ export default { this.componentPartDesc = this.$route.params.partDesc || '' this.requiredQty = Number(this.$route.params.requiredQty || 0) this.issuedQty = Number(this.$route.params.issuedQty || 0) + this.itemNo = this.$route.params.itemNo || '' /* if (!this.workOrderNo || !this.materialCode) { this.$message.error('参数错误') diff --git a/src/views/modules/production-return/productionReturnPDA.vue b/src/views/modules/production-return/productionReturnPDA.vue index 8d3d4eb..e5ad456 100644 --- a/src/views/modules/production-return/productionReturnPDA.vue +++ b/src/views/modules/production-return/productionReturnPDA.vue @@ -20,9 +20,7 @@
- 申请单号:{{ material.notifyNo }}    行号:{{ - material.itemNo - }} + 申请单号:{{ material.notifyNo }}
@@ -278,8 +276,10 @@ export default { }, 3000) }, }, - - mounted() { + created () { + this.resetRequest() + }, + mounted() { // 聚焦申请单号输入框 this.$nextTick(() => { if (this.$refs.requestNoInput) { diff --git a/src/views/modules/production-return/productionReturnPDAIssueList.vue b/src/views/modules/production-return/productionReturnPDAIssueList.vue index f875c26..c8ddc03 100644 --- a/src/views/modules/production-return/productionReturnPDAIssueList.vue +++ b/src/views/modules/production-return/productionReturnPDAIssueList.vue @@ -387,7 +387,9 @@ export default { printData: {}, partNo:"", // 物料编码 transactionId:"", // 关联单号 + accountingId:"", // 会计科目 quantity:"", // 本次退料数量 + qtyReversed:0, // 已退料数量 batchNo:"", // 批次号 printLabelList: [], // 编辑弹框相关 @@ -400,6 +402,7 @@ export default { }, editIndex: -1, // 当前编辑的标签索引 unissureQty:0, // 需求数量 + itemNo:'', // 物料ID }; }, computed: { @@ -435,6 +438,8 @@ export default { orderNo: this.orderNo, orderType: this.orderType, site: this.$store.state.user.site, + batchNo: this.batchNo, + componentPartNo: this.partNo, }; // 模拟生产退料标签验证 @@ -454,9 +459,11 @@ export default { id: Date.now(), labelCode: labelCode, partNo: data.labelInfo.partNo, - quantity: data.labelInfo.quantity, + quantity: data.labelInfo.availableQty, batchNo: data.labelInfo.batchNo, returnReason: data.labelInfo.returnReason, + locationId: data.labelInfo.locationId , + warehouseId: data.labelInfo.warehouseId , }); this.$message.success("操作成功"); @@ -556,20 +563,31 @@ export default { return; } - if (!this.returnReason) { + /* if (!this.returnReason) { this.$message.warning("请选择退料原因"); return; - } + } */ const returnParams = { site: this.$store.state.user.site, - orderNo: this.orderNo, + workOrderNo: this.orderNo, orderType: this.orderType, - labels: this.labelList.map((label) => ({ + batchNo: this.batchNo, + componentPartNo: this.partNo, + warehouseId: '1', + transactionId: this.transactionId, + accountingId:this.accountingId, + itemNo:this.itemNo, + ifsReversedQty:this.qtyReversed, + issueQty: this.quantity, + // 退料标签列表 + selectedMaterials: this.labelList.map((label) => ({ labelCode: label.labelCode, - quantity: label.quantity, + issueQty: label.quantity, batchNo: label.batchNo, partNo: label.partNo, + locationId: label.locationId, + wdrNo: label.wdrNo || '*', })), }; @@ -792,14 +810,18 @@ export default { mounted() { // 获取路由参数 - this.orderNo = this.$route.params.orderNo; - this.orderType = this.$route.params.orderType || "workOrder"; - this.partNo = this.$route.params.partNo - this.transactionId = this.$route.params.transactionId - this.quantity = this.$route.params.quantity - this.batchNo = this.$route.params.batchNo - this.unissureQty = this.$route.params.unissureQty - console.log("订单号:", this.orderNo, "订单类型:", this.orderType,"物料编码:",this.partNo); + console.log("路由参数:", this.$route.params.material); + + this.orderNo = this.$route.params.workOrderNo; + this.orderType = this.$route.params.material.orderType || "workOrder"; + this.partNo = this.$route.params.material.partNo + this.transactionId = this.$route.params.material.ifsTransactionID + this.accountingId = this.$route.params.material.ifsAccountingID + this.quantity = this.$route.params.material.quantity + this.batchNo = this.$route.params.material.batchNo + this.unissureQty = this.$route.params.material.unissureQty + this.itemNo = this.$route.params.material.itemNo + this.qtyReversed= this.$route.params.material.qtyReversedBy || 0 if (!this.orderNo) { this.$message.error("参数错误"); diff --git a/src/views/modules/production-return/productionReturnPDAList.vue b/src/views/modules/production-return/productionReturnPDAList.vue index c13135e..e4d8332 100644 --- a/src/views/modules/production-return/productionReturnPDAList.vue +++ b/src/views/modules/production-return/productionReturnPDAList.vue @@ -67,6 +67,7 @@