|
|
@ -314,6 +314,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
getScanResult(result,managementPrecision) { |
|
|
|
this.managementType = managementPrecision |
|
|
|
if(managementPrecision == 'BY_BATCH' || managementPrecision == 'BY_QUANTITY' ){ |
|
|
|
this.setDataBatch(result,managementPrecision) |
|
|
|
}else{ |
|
|
@ -322,6 +323,7 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
setDataBatch(result,managementPrecision){ |
|
|
|
console.log(877,result.balance.qty) |
|
|
|
try { |
|
|
|
var packingNumber = result.label.packingNumber; |
|
|
|
var batch = result.label.batch; |
|
|
@ -482,6 +484,7 @@ |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING' |
|
|
|
console.log(11,this.managementType) |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
@ -490,7 +493,7 @@ |
|
|
|
//允许部分提交 |
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
if(this.managementType == 'BY_BATCH'){ |
|
|
|
if(this.managementType == 'BY_BATCH' || this.managementType == 'BY_QUANTITY'){ |
|
|
|
this.checkCountBatch(); |
|
|
|
}else{ |
|
|
|
this.checkCount(); |
|
|
@ -545,6 +548,7 @@ |
|
|
|
checkCountBatch(){ |
|
|
|
// 提交的数量和任务数量不一致提示 |
|
|
|
let str = '' |
|
|
|
let str1 = '' |
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
if (cur.qty != cur.handleQty) { |
|
|
@ -556,9 +560,19 @@ |
|
|
|
} |
|
|
|
str += |
|
|
|
`提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` |
|
|
|
if( cur.handleQty > cur.balance.balanceQty){ |
|
|
|
console.log(2333,cur.handleQty) |
|
|
|
console.log(2333,cur.balance.balanceQty) |
|
|
|
str1 += |
|
|
|
`提交数量【${ cur.handleQty}】不可以大于库存数量【${cur.balance.balanceQty}】` |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if(str1){ |
|
|
|
this.$refs.comMessage.showConfirmWarningModal(str1) |
|
|
|
return |
|
|
|
} |
|
|
|
if (str) { |
|
|
|
str = '任务明细未全部完成,是否提交?\n' + str |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
@ -577,6 +591,7 @@ |
|
|
|
}); |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交" + JSON.stringify(params)) |
|
|
|
return |
|
|
|
inventoryMoveSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|