|
|
@ -541,13 +541,12 @@ |
|
|
|
var taskQty = 0; |
|
|
|
var totalQty = 0; |
|
|
|
detail.subList.forEach(item => { |
|
|
|
if(item.scaned){ |
|
|
|
item.taskQty=0 |
|
|
|
item.totalQty=0 |
|
|
|
item.taskQty =calc.add(item.taskQty,item.qty) |
|
|
|
item.totalQty =calc.add(item.totalQty,item.handleQty) |
|
|
|
if (this.jobContent.allowSmallerQty == "FALSE") { |
|
|
|
if(item.handleQty!=item.taskQty){ |
|
|
|
if(item.handleQty<item.taskQty){ |
|
|
|
str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n` |
|
|
|
} |
|
|
|
} |
|
|
@ -556,11 +555,11 @@ |
|
|
|
str1 += '数量[' + item.totalQty + ']不允许大于任务数量[' + item.taskQty + ']' |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.handleQty>item.balance.qty){ |
|
|
|
str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` |
|
|
|
if(item.balance){ |
|
|
|
if(item.handleQty>item.balance.qty){ |
|
|
|
str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】` |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
@ -582,19 +581,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数", params); |
|
|
|
console.log("提交参数", params.subList); |
|
|
|
// const isTrue = params.subList.some(item=>{ |
|
|
|
// console.log(item.recordList.some(cur=>cur.scaned)) |
|
|
|
// return item.recordList.some(cur=>cur.scaned) == true |
|
|
|
// }) |
|
|
|
const isTrue = params.subList.some(item=>item.scaned) |
|
|
|
if(!isTrue){ |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage("请扫描您需要提交的发货任务") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// return; |
|
|
|
// if (params.subList.length == 0) { |
|
|
|
// uni.hideLoading() |
|
|
@ -612,6 +599,20 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数", params); |
|
|
|
console.log("提交参数", params.subList); |
|
|
|
// const isTrue = params.subList.some(item=>{ |
|
|
|
// console.log(item.recordList.some(cur=>cur.scaned)) |
|
|
|
// return item.recordList.some(cur=>cur.scaned) == true |
|
|
|
// }) |
|
|
|
const isTrue = params.subList.some(item=>item.scaned) |
|
|
|
if(!isTrue){ |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage("请扫描您需要提交的发货任务") |
|
|
|
return |
|
|
|
} |
|
|
|
deliverJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|