|
|
@ -179,7 +179,8 @@ |
|
|
|
fontSize: "100rpx" |
|
|
|
}, |
|
|
|
bussinessCode: 'Issue', |
|
|
|
toLocationAreaTypeList: [] |
|
|
|
toLocationAreaTypeList: [], |
|
|
|
itemInfo:null |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -292,7 +293,7 @@ |
|
|
|
) |
|
|
|
return; |
|
|
|
} else { |
|
|
|
|
|
|
|
this.itemInfo=item |
|
|
|
var params = { |
|
|
|
itemCode: result.package.itemCode, |
|
|
|
batch: result.label.batch, |
|
|
@ -572,7 +573,7 @@ |
|
|
|
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode + |
|
|
|
"】与推荐的库位不一致,是否要继续发货?", res => { |
|
|
|
if (res) { |
|
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo, item.qty); |
|
|
|
let locaion = that.createLocationInfo(label, balance, packageInfo); |
|
|
|
if(locaion){ |
|
|
|
item.Locations.push(locaion); |
|
|
|
this.getfocus(); |
|
|
@ -740,7 +741,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
//增加不是任务中的库位,实际扫描的明细 |
|
|
|
createLocationInfo(label, balance, packageInfo, itemCodeQty) { |
|
|
|
createLocationInfo(label, balance, packageInfo) { |
|
|
|
let location = { |
|
|
|
fromLocationCode: balance.locationCode, |
|
|
|
qty: balance.qty, |
|
|
@ -749,7 +750,7 @@ |
|
|
|
isNewAdd: true, |
|
|
|
Batchs: [] |
|
|
|
} |
|
|
|
let batch = this.createBatchInfo(label, balance, packageInfo, itemCodeQty); |
|
|
|
let batch = this.createBatchInfo(label, balance, packageInfo); |
|
|
|
if(batch){ |
|
|
|
batch.detail = balance; |
|
|
|
batch.detail.fromLocationCode = balance.locationCode; |
|
|
@ -762,7 +763,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
createBatchInfo(data, balance, packageInfo, itemCodeQty) { |
|
|
|
createBatchInfo(data, balance, packageInfo) { |
|
|
|
let batch = { |
|
|
|
isNewAdd: true, |
|
|
|
batch: data.batch, |
|
|
@ -772,7 +773,7 @@ |
|
|
|
Records: [] |
|
|
|
} |
|
|
|
let record = this.creatRecord(data, balance, packageInfo); |
|
|
|
if (!this.checkQty(batch, record,itemCodeQty)) { |
|
|
|
if (!this.checkHandleQty(record)) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
@ -897,14 +898,19 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
checkHandleQty(batch, record) { |
|
|
|
checkHandleQty(record) { |
|
|
|
var isPassed = true; |
|
|
|
if (this.jobContent.allowBiggerQty == "FALSE") { |
|
|
|
var tempHandleQty = 0 |
|
|
|
batch.Records.forEach(res => { |
|
|
|
tempHandleQty = calc.add(tempHandleQty, res.qty) |
|
|
|
var scanQty=0 |
|
|
|
var recommendQty =this.itemInfo.qty |
|
|
|
this.itemInfo.Locations.forEach(location=>{ |
|
|
|
location.Batchs.forEach(batch=>{ |
|
|
|
batch.Records.forEach(record=>{ |
|
|
|
scanQty= calc.add(scanQty, record.qty) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
var vailQty = calc.sub(batch.qty, tempHandleQty) |
|
|
|
var vailQty = calc.sub(recommendQty, scanQty) |
|
|
|
if (record.qty > vailQty) { |
|
|
|
this.showErrorMessage("扫描标签数量[" + record.qty + "]大于剩余推荐数量[" + vailQty + "]") |
|
|
|
isPassed = false; |
|
|
|