|
@ -814,6 +814,9 @@ |
|
|
"]的父包装已经扫描") |
|
|
"]的父包装已经扫描") |
|
|
} else { |
|
|
} else { |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
|
|
|
if(!this.checkHandleQty(batch,record)){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
batch.Records.push(record); |
|
|
batch.Records.push(record); |
|
|
this.issueRecord.unshift(record) |
|
|
this.issueRecord.unshift(record) |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.calcBatchHandleQty(batch); |
|
@ -836,6 +839,9 @@ |
|
|
if (res) { |
|
|
if (res) { |
|
|
batch.Records = []; |
|
|
batch.Records = []; |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
|
|
|
if(!this.checkHandleQty(batch,record)){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
batch.Records.push(record); |
|
|
batch.Records.push(record); |
|
|
this.issueRecord.unshift(record) |
|
|
this.issueRecord.unshift(record) |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.calcBatchHandleQty(batch); |
|
@ -846,6 +852,9 @@ |
|
|
console.log("扫描的是父包装,是否移除子包装") |
|
|
console.log("扫描的是父包装,是否移除子包装") |
|
|
} else { |
|
|
} else { |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
let record = this.creatRecord(label, balance, packageInfo); |
|
|
|
|
|
if(!this.checkHandleQty(batch,record)){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
batch.Records.push(record); |
|
|
batch.Records.push(record); |
|
|
this.issueRecord.unshift(record) |
|
|
this.issueRecord.unshift(record) |
|
|
this.calcBatchHandleQty(batch); |
|
|
this.calcBatchHandleQty(batch); |
|
@ -856,7 +865,24 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
checkHandleQty(batch,record){ |
|
|
|
|
|
var isPassed=true; |
|
|
|
|
|
if(this.jobContent.allowBiggerQty=="FALSE"){ |
|
|
|
|
|
var tempHandleQty=0 |
|
|
|
|
|
batch.Records.forEach(res => { |
|
|
|
|
|
tempHandleQty = calc.add(tempHandleQty, res.qty) |
|
|
|
|
|
}) |
|
|
|
|
|
var vailQty =calc.sub(batch.qty,tempHandleQty) |
|
|
|
|
|
if( record.qty>vailQty){ |
|
|
|
|
|
this.showErrorMessage("扫描标签数量["+record.qty+"]大于剩余推荐数量["+vailQty+"]") |
|
|
|
|
|
isPassed=false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return isPassed |
|
|
|
|
|
} |
|
|
|
|
|
, |
|
|
getfocus() { |
|
|
getfocus() { |
|
|
if (this.$refs.comscan != undefined) { |
|
|
if (this.$refs.comscan != undefined) { |
|
|
this.$refs.comscan.getfocus(); |
|
|
this.$refs.comscan.getfocus(); |
|
|