|
@ -417,7 +417,9 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectBalanceItem(balance) { |
|
|
selectBalanceItem(balance) { |
|
|
|
|
|
if(balance){ |
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
this.afterGetBalance(this.label, balance, this.packageInfo); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
afterGetBalance(label, balance, packageInfo) { |
|
|
afterGetBalance(label, balance, packageInfo) { |
|
@ -431,7 +433,7 @@ |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
that.fromLocationCode = balance.locationCode; |
|
|
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); |
|
|
//如果库存余额中的库位与任务推荐的不一致 |
|
|
//如果库存余额中的库位与任务推荐的不一致 |
|
|
if (fromLocation != undefined) { |
|
|
if (fromLocation && !fromLocation.isNewAdd) { |
|
|
let batch = fromLocation.Batchs.find(r => r.batch == lot); |
|
|
let batch = fromLocation.Batchs.find(r => r.batch == lot); |
|
|
if (batch != undefined) { |
|
|
if (batch != undefined) { |
|
|
if (batch.Records == undefined) { |
|
|
if (batch.Records == undefined) { |
|
@ -487,8 +489,24 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
if (this.jobContent.allowModifyLocation == "TRUE") { |
|
|
|
|
|
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + |
|
|
|
|
|
"】与推荐的库位不一致,是否要继续发料?", res => { |
|
|
|
|
|
if (res) { |
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
item.Locations.push(locaion); |
|
|
item.Locations.push(locaion); |
|
|
|
|
|
this.getfocus(); |
|
|
|
|
|
that.$emit("afterScan"); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + |
|
|
|
|
|
"】与推荐的库位不一致,不允许继续发料?") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
this.showErrorMessage(e.stack, |
|
|
this.showErrorMessage(e.stack, |
|
@ -506,6 +524,7 @@ |
|
|
qty: balance.qty, |
|
|
qty: balance.qty, |
|
|
uom: balance.uom, |
|
|
uom: balance.uom, |
|
|
handleQty: 0, |
|
|
handleQty: 0, |
|
|
|
|
|
isNewAdd: true, |
|
|
Batchs: [] |
|
|
Batchs: [] |
|
|
} |
|
|
} |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|