|
@ -621,6 +621,7 @@ |
|
|
let str="" |
|
|
let str="" |
|
|
let str1="" |
|
|
let str1="" |
|
|
let str2="" |
|
|
let str2="" |
|
|
|
|
|
let str3="" |
|
|
var totalQty =0; |
|
|
var totalQty =0; |
|
|
var taskQty =0; |
|
|
var taskQty =0; |
|
|
console.log(877,this.detailSource) |
|
|
console.log(877,this.detailSource) |
|
@ -628,56 +629,57 @@ |
|
|
detail.subList.forEach(item => { |
|
|
detail.subList.forEach(item => { |
|
|
if(item.scaned){ |
|
|
if(item.scaned){ |
|
|
taskQty =calc.add(taskQty,item.qty) |
|
|
taskQty =calc.add(taskQty,item.qty) |
|
|
totalQty =calc.add(totalQty,item.handleQty) |
|
|
totalQty =calc.add(totalQty,item.handleQty) |
|
|
if (this.jobContent.allowSmallerQty == "FALSE") { |
|
|
if(parseFloat(item.handleQty)<parseFloat(item.qty)){ |
|
|
if(parseFloat(item.handleQty)<parseFloat(item.qty)){ |
|
|
str += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许小于任务数量【${item.qty}】` |
|
|
str += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许小于任务数量【${item.qty}】` |
|
|
str3 += `批次【${item.batch}】扫描数量【${parseFloat(item.handleQty)}】和任务数量【${item.qty}】不一致` |
|
|
} |
|
|
} |
|
|
} |
|
|
if (parseFloat( item.handleQty )> parseFloat(item.qty)){ |
|
|
if (this.jobContent.allowBiggerQty == 'FALSE') { |
|
|
str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` |
|
|
if (parseFloat( item.handleQty )> parseFloat(item.qty)){ |
|
|
|
|
|
str1 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不允许大于任务数量【${item.qty}】` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(parseFloat(item.handleQty)>parseFloat( item.balance.qty)){ |
|
|
if(parseFloat(item.handleQty)>parseFloat( item.balance.qty)){ |
|
|
str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` |
|
|
str2 += `批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}】` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
console.log(877,str) |
|
|
if (this.jobContent.allowSmallerQty == "FALSE") { |
|
|
if (str) { |
|
|
if (str) { |
|
|
str1 = '不允许提交\n' + str |
|
|
str = '不允许提交\n' + str |
|
|
this.showErrorMessage(str) |
|
|
this.showErrorMessage(str) |
|
|
return |
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if (str1) { |
|
|
if (this.jobContent.allowBiggerQty == 'FALSE') { |
|
|
str1 = '不允许提交\n' + str1 |
|
|
if (str1) { |
|
|
this.showErrorMessage(str1) |
|
|
str1 = '不允许提交\n' + str1 |
|
|
return |
|
|
this.showErrorMessage(str1) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (str2) { |
|
|
if (str2) { |
|
|
str2 = '不允许提交\n' + str2 |
|
|
str2 = '不允许提交\n' + str2 |
|
|
this.showErrorMessage(str2) |
|
|
this.showErrorMessage(str2) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if(str){ |
|
|
console.log(str3) |
|
|
str = '任务明细未全部完成,是否提交?\n' + str |
|
|
if(str3){ |
|
|
} |
|
|
str3 = str3+",是否提交" |
|
|
if(totalQty!=taskQty){ |
|
|
this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => { |
|
|
str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交" |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
|
|
if (res) { |
|
|
if (res) { |
|
|
//防止重复点击 |
|
|
//防止重复点击 |
|
|
this.$throttle(this.submit, 2000, this)() |
|
|
// this.$throttle(this.submit, 2000, this)() |
|
|
} else { |
|
|
} else { |
|
|
this.scanPopupGetFocus() |
|
|
this.scanPopupGetFocus() |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}else { |
|
|
}else { |
|
|
//防止重复点击 |
|
|
//防止重复点击 |
|
|
this.$throttle(this.submit, 2000, this)() |
|
|
// this.$throttle(this.submit, 2000, this)() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|