Browse Source

YT-999pda发料,提示不准确,有多个批次,提示应加批次

intex
zhang_li 2 weeks ago
parent
commit
20fe89d13f
  1. 56
      src/pages/issue/job/issueDetailBatch.vue

56
src/pages/issue/job/issueDetailBatch.vue

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

Loading…
Cancel
Save