|
@ -538,46 +538,46 @@ |
|
|
let str1 = "" |
|
|
let str1 = "" |
|
|
let str2 = "" |
|
|
let str2 = "" |
|
|
this.detailSource.forEach(detail => { |
|
|
this.detailSource.forEach(detail => { |
|
|
var taskQty = 0; |
|
|
detail.taskQty = 0; |
|
|
var totalQty = 0; |
|
|
detail.totalQty = 0; |
|
|
detail.subList.forEach(item => { |
|
|
detail.subList.forEach(item => { |
|
|
item.taskQty=0 |
|
|
item.qty = item.qty || 0 |
|
|
item.totalQty=0 |
|
|
item.handleQty = item.handleQty || 0 |
|
|
item.taskQty =calc.add(item.taskQty,item.qty) |
|
|
detail.taskQty =calc.add(detail.taskQty,item.qty) |
|
|
item.totalQty =calc.add(item.totalQty,item.handleQty) |
|
|
detail.totalQty =calc.add(detail.totalQty,item.handleQty) |
|
|
if (this.jobContent.allowSmallerQty == "FALSE") { |
|
|
if(item.scaned){ |
|
|
if(item.handleQty<item.taskQty){ |
|
|
if(item.handleQty>item.balance.qty){ |
|
|
str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n` |
|
|
str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.allowBiggerQty == 'FALSE') { |
|
|
|
|
|
if ( item.taskQty < item.totalQty) { |
|
|
|
|
|
str1 += '数量[' + item.totalQty + ']不允许大于任务数量[' + item.taskQty + ']' |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(item.balance){ |
|
|
|
|
|
if(item.handleQty>item.balance.qty){ |
|
|
|
|
|
str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
if(detail.handleQty < detail.taskQty){ |
|
|
|
|
|
str += `物料号【${detail.itemCode}】数量【${detail.handleQty}】不允许小于任务数量【${detail.taskQty}】\n` |
|
|
|
|
|
} |
|
|
|
|
|
if(detail.handleQty > detail.taskQty){ |
|
|
|
|
|
str1 += `物料号【${detail.itemCode}】数量【${detail.handleQty}】不允许大于任务数量【${detail.taskQty}】\n` |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
if (this.jobContent.allowSmallerQty == "FALSE") { |
|
|
if (str) { |
|
|
if (str) { |
|
|
str = '不允许提交\n' + str |
|
|
str = '不允许提交\n' + str |
|
|
this.showErrorMessage(str) |
|
|
this.showErrorMessage(str) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if (str1) { |
|
|
if (this.allowBiggerQty == 'FALSE') { |
|
|
str1 = '不允许提交\n' + str1 |
|
|
if (str1) { |
|
|
this.showErrorMessage(str1) |
|
|
str1 = '不允许提交\n' + str1 |
|
|
|
|
|
this.showErrorMessage(str1) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (str2) { |
|
|
if (str2) { |
|
|
str2 = '不允许提交\n' + str2 |
|
|
str2 = '不允许提交\n' + str2 |
|
|
this.showErrorMessage(str2) |
|
|
this.showErrorMessage(str2) |
|
|
} |
|
|
} |
|
|
return str || str1 || str2 ? false : true |
|
|
return str || str1 || str2 ? false : true |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submitJob() { |
|
|
submitJob() { |
|
|