|
|
@ -305,7 +305,7 @@ |
|
|
|
let packingCode = label.packingNumber; |
|
|
|
let lot = label.batch; |
|
|
|
let item = that.toLocation.find(r => r.itemCode == itemCode); |
|
|
|
item.scaned =true |
|
|
|
// item.scaned =true |
|
|
|
let fromLocation = that.toLocation.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
|
// 成品发货任务--同一物料,可以扫描提交不在任务中的库位 |
|
|
|
if(!fromLocation){ |
|
|
@ -334,7 +334,6 @@ |
|
|
|
item.Locations.push(fromLocation) |
|
|
|
} |
|
|
|
if (fromLocation != undefined) { |
|
|
|
console.log(34444) |
|
|
|
let batch = fromLocation.batch; |
|
|
|
if (batch != undefined) { |
|
|
|
that.addRecord(item.batch, label, balance, packageInfo) |
|
|
@ -405,8 +404,12 @@ |
|
|
|
scaned: true, |
|
|
|
itemCode: label.itemCode, |
|
|
|
packingNumber: label.packingNumber, |
|
|
|
parentPackingNumber: packageInfo.parentNumber, |
|
|
|
batch: label.batch, |
|
|
|
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), |
|
|
|
// qty: Number(balance.qty), |
|
|
|
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), |
|
|
|
qty: Number(balance.qty), |
|
|
|
handleQty:0, |
|
|
|
uom: balance.uom, |
|
|
|
inventoryStatus: balance.inventoryStatus, |
|
|
|
balance: balance, |
|
|
@ -414,15 +417,14 @@ |
|
|
|
supplierCode: label.supplierCode, |
|
|
|
packUnit: packageInfo.packUnit, |
|
|
|
packQty: packageInfo.packQty, |
|
|
|
singlePrice:balance.singlePrice, |
|
|
|
amount:balance.amount |
|
|
|
fromLocationCode:balance.locationCode, |
|
|
|
} |
|
|
|
return record; |
|
|
|
}, |
|
|
|
|
|
|
|
calcBatchHandleQty(batch,label,balance) { |
|
|
|
this.dataContent.subList.forEach(item => { |
|
|
|
if(item.itemCode == balance.itemCode&&item.batch == batch){ |
|
|
|
if(item.itemCode == label.itemCode&&item.batch == label.batch){ |
|
|
|
item.handleQty = item.handleQty || 0 |
|
|
|
item.handleQty = calc.add(item.handleQty, label.qty); |
|
|
|
} |
|
|
@ -430,8 +432,22 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
addRecord(batch, label, balance, packageInfo) { |
|
|
|
var checkData = this.dataContent.subList.find(r => { |
|
|
|
if (r.batch == balance.batch) { |
|
|
|
return r; |
|
|
|
} |
|
|
|
}) |
|
|
|
if (checkData) { |
|
|
|
checkData.scaned = true |
|
|
|
this.calcBatchHandleQty(batch,label,balance); |
|
|
|
this.getfocus(); |
|
|
|
} else { |
|
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
|
this.dataContent.subList.push(record); |
|
|
|
this.calcBatchHandleQty(batch,label,balance); |
|
|
|
this.getfocus(); |
|
|
|
this.$emit("afterScan"); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getfocus() { |
|
|
|