|
|
@ -354,17 +354,44 @@ |
|
|
|
this.showErrorMessage("扫描数为0,请先扫描") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//允许部分提交 |
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
this.checkCount(); |
|
|
|
} else if (this.scanCount < this.subList.length) { |
|
|
|
//扫描数量小于任务数量,判断是否允许部分提交 |
|
|
|
if (this.jobContent.allowPartialComplete == "TRUE") { |
|
|
|
//提交 |
|
|
|
this.checkCount(); |
|
|
|
} else { |
|
|
|
//不允许部分提交,提示 |
|
|
|
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => { |
|
|
|
if (res) { |
|
|
|
this.openScanPopup(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
checkCount(){ |
|
|
|
// 提交的数量和任务数量不一致提示 |
|
|
|
let str = '' |
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
if (cur.qty != cur.handleQty) { |
|
|
|
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` |
|
|
|
var tempHandleQty =0 |
|
|
|
if(cur.handleQty){ |
|
|
|
tempHandleQty=cur.handleQty |
|
|
|
}else { |
|
|
|
tempHandleQty =0 |
|
|
|
} |
|
|
|
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n` |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (str) { |
|
|
|
str += ',是否确认提交?' |
|
|
|
str = '任务明细未全部完成,是否提交?\n'+str |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
if (res) { |
|
|
|
this.submitJob() |
|
|
@ -373,26 +400,6 @@ |
|
|
|
} else { |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
// //允许部分提交 |
|
|
|
// //扫描数量和任务数量相等,直接提交 |
|
|
|
// if (this.scanCount == this.subList.length) { |
|
|
|
// this.submitJob(); |
|
|
|
// } else if (this.scanCount < this.subList.length) { |
|
|
|
// //扫描数量小于任务数量,判断是否允许部分提交 |
|
|
|
// if (this.jobContent.allowPartialComplete == "TRUE") { |
|
|
|
// //提交 |
|
|
|
// this.submitJob(); |
|
|
|
// } else { |
|
|
|
// //不允许部分提交,提示 |
|
|
|
// this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + |
|
|
|
// "]箱总共[" + this |
|
|
|
// .subList.length + "]箱", res => { |
|
|
|
// if (res) { |
|
|
|
// this.openScanPopup(); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
submitJob() { |
|
|
|