From 2816e6ace06eaa2428692da640f165645589dc5e Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Tue, 17 Jun 2025 10:40:16 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E6=96=99=E6=8F=90=E4=BA=A4bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../repleinsh/job/repleinshDetailBatch.vue | 69 ++++++++++++++-----
1 file changed, 52 insertions(+), 17 deletions(-)
diff --git a/src/pages/repleinsh/job/repleinshDetailBatch.vue b/src/pages/repleinsh/job/repleinshDetailBatch.vue
index f45358ba..13dee911 100644
--- a/src/pages/repleinsh/job/repleinshDetailBatch.vue
+++ b/src/pages/repleinsh/job/repleinshDetailBatch.vue
@@ -385,12 +385,12 @@
return r.batch == batch &&
r.fromLocationCode == result.fromLocationCode
})
+ console.log(555,this.fromLocationCode)
//扫描的数据不在任务中,添加到列表
if (itemDetail == undefined) {
var item = {
scaned: true,
packingNumber: packingNumber,
- fromLocationCode: this.fromLocationCode,
toLocationCode: this.toLocationCode,
batch: result.label.batch,
handleQty: result.label.qty,
@@ -412,7 +412,21 @@
balanceQty: result.balance.qty,
packQty: result.package.packQty,
packUnit: result.package.packUnit,
- }]
+ }],
+
+ backNumber:result.balance.backNumber,
+ itemCode:itemCode,
+ itemDesc1:result.balance.itemDesc1,
+ itemDesc2:result.balance.itemDesc2,
+ itemName:result.balance.itemName,
+ deliNo:detail.subList[0].deliNo,
+ day:detail.subList[0].day,
+ fromAreaCode:detail.subList[0].fromAreaCode,
+ fromLocationCode:this.fromLocationCode,
+ productionLine:detail.subList[0].productionLine,
+ productionLineCode:detail.subList[0].productionLineCode,
+ projectCode:detail.subList[0].projectCode,
+ toAreaCode:detail.subList[0].toAreaCode,
}
detail.subList.push(item)
//计算数量
@@ -486,7 +500,6 @@
var item = {
scaned: true,
packingNumber: packingNumber,
- fromLocationCode: this.fromLocationCode,
toLocationCode: this.toLocationCode,
batch: result.label.batch,
handleQty: result.label.qty,
@@ -509,7 +522,20 @@
balanceQty: result.balance.qty,
packQty: result.package.packQty,
packUnit: result.package.packUnit,
- }]
+ }],
+ backNumber:result.balance.backNumber,
+ itemCode:itemCode,
+ itemDesc1:result.balance.itemDesc1,
+ itemDesc2:result.balance.itemDesc2,
+ itemName:result.balance.itemName,
+ deliNo:detail.subList[0].deliNo,
+ day:detail.subList[0].day,
+ fromAreaCode:detail.subList[0].fromAreaCode,
+ fromLocationCode:this.fromLocationCode,
+ productionLine:detail.subList[0].productionLine,
+ productionLineCode:detail.subList[0].productionLineCode,
+ projectCode:detail.subList[0].projectCode,
+ toAreaCode:detail.subList[0].toAreaCode,
}
detail.subList.push(item)
//计算数量
@@ -660,7 +686,8 @@
productionLine:item.productionLine,
productionLineCode:item.productionLineCode,
projectCode: item.projectCode,
- qty: item.qty,
+ qty: toLocationCode.qty,
+ handleQty:toLocationCode.handleQty,
toAreaCode: item.toAreaCode,
toLocationCode: item.toLocationCode,
uom:item.uom,
@@ -671,7 +698,8 @@
subItem.recordList = [];
// batch.Records.forEach(r => {
let record = {};
- record.handleQty = item.qty;
+ record.handleQty = item.handleQty;
+ record.qty = item.qty;
record.fromBatch = item.batch;
record.fromContainerNumber = item.containerNumber;
@@ -785,20 +813,22 @@
// let item = this.detailSource.find(r => r.itemCode == detail.itemCode && r.fromLocationCode == detail
// .fromLocationCode && r.batch == detail.batch);
// 在老数据源寻找
- let itemOriginal = this.detailSourceOriginal.find(r => r.itemCode == detail.itemCode && r.fromLocationCode ==
- detail.fromLocationCode && r.batch == detail.batch);
+ let itemOriginal = this.detailSourceOriginal.find(r => r.itemCode == detail.itemCode);
+ let itemo = this.detailSource.find(r => r.itemCode == detail.itemCode);
+ let batchIndexOriginal = itemOriginal.subList.findIndex(r => r.fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
+ let batchIndex = itemo.subList.findIndex(r => r.fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
if (itemOriginal) {
- if (detail.packList.length == 0) {
- this.detailSourceOriginal = this.detailSourceOriginal.filter(r => r.itemCode == detail.itemCode && r
- .fromLocationCode == detail.fromLocationCode && r.batch == detail.batch);
- this.detailSource = this.detailSource.filter(r => r.itemCode == detail.itemCode && r.fromLocationCode ==
- detail.fromLocationCode && r.batch == detail.batch);
+ if(batchIndexOriginal<0){
+ if (detail.packList.length == 0) {
+ itemo.subList.splice(batchIndex,1)
+ }
}
+
}
this.updateData()
},
openScanPopup() {
- let fromlocationCode = '';
+ let fromLocationCodeParams = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
@@ -809,14 +839,16 @@
fromlocationList.push(l.fromLocationCode);
}
//来源库位赋默认值
- if (fromlocationCode == '') {
+ if (fromLocationCodeParams == '') {
if (!l.scaned) {
- fromlocationCode = l.fromLocationCode;
+ fromLocationCodeParams = l.fromLocationCode;
}
}
})
}
- this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
+ this.fromLocationCode = fromLocationCodeParams
+ console.log(555,this.fromLocationCode)
+ this.$refs.scanPopup.openScanPopupForJob(fromLocationCodeParams, fromlocationList, this.jobContent);
},
scanPopupGetFocus() {
@@ -900,6 +932,9 @@
})
})
return scanCount;
+ },
+ confirmFromLocation(fromLocationCodeParams) {
+ this.fromLocationCode = fromLocationCodeParams
}