|
|
@ -217,9 +217,7 @@ |
|
|
|
}, |
|
|
|
autoCommit(){ |
|
|
|
//判断数量是否相等 |
|
|
|
var noCommitInfo=null |
|
|
|
let str="" |
|
|
|
|
|
|
|
this.detailSource.forEach((item) => { |
|
|
|
item.subList.forEach(cur => { |
|
|
|
if (cur.qty != cur.handleQty) { |
|
|
@ -238,11 +236,11 @@ |
|
|
|
str = '任务明细未全部完成,是否提交?\n'+str |
|
|
|
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { |
|
|
|
if (res) { |
|
|
|
this.commit() |
|
|
|
this.$throttle(this.commit,2000,this)() |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.commit() |
|
|
|
this.$throttle(this.commit,2000,this)() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
@ -364,6 +362,7 @@ |
|
|
|
itemDetail.balance.packQty = Number(result.package.packQty) |
|
|
|
itemDetail.balance.packUnit = result.package.packUnit |
|
|
|
this.calcHandleQty(); |
|
|
|
console.log("自动提交") |
|
|
|
this.autoCommit(); |
|
|
|
} else { |
|
|
|
this.scanPopupGetFocus(); |
|
|
@ -387,6 +386,7 @@ |
|
|
|
itemDetail.balance.packQty = Number(result.package.packQty) |
|
|
|
itemDetail.balance.packUnit = result.package.packUnit |
|
|
|
this.calcHandleQty(); |
|
|
|
|
|
|
|
this.autoCommit(); |
|
|
|
} |
|
|
|
} |
|
|
@ -411,12 +411,14 @@ |
|
|
|
//扫描数量和任务数量相等,直接提交 |
|
|
|
if (this.scanCount == this.subList.length) { |
|
|
|
this.submitJob(); |
|
|
|
console.log("提交this.submitJob()") |
|
|
|
} else if (this.scanCount < this.subList.length) { |
|
|
|
//扫描数量小于任务数量,判断是否允许部分提交 |
|
|
|
if (this.jobContent.allowPartialComplete == "TRUE") { |
|
|
|
//提交 |
|
|
|
this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => { |
|
|
|
if (res) { |
|
|
|
console.log("提交this.submitJob()") |
|
|
|
this.submitJob() |
|
|
|
} |
|
|
|
}); |
|
|
@ -470,34 +472,33 @@ |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
var itemCodes = [] |
|
|
|
this.detailSource.forEach(item => { |
|
|
|
itemCodes.push(item.itemCode) |
|
|
|
}) |
|
|
|
|
|
|
|
getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.managementList = res.list; |
|
|
|
var params = this.setParams() |
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
productionReceiptJobSubmit(params).then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
this.showCommitSuccessMessage("提交成功\n生成发料接收记录\n" + res.data) |
|
|
|
} else { |
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showErrorMessage(error) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.hideLoading(); |
|
|
|
this.showErrorMessage(res.message); |
|
|
|
} |
|
|
|
}); |
|
|
|
// var itemCodes = [] |
|
|
|
// this.detailSource.forEach(item => { |
|
|
|
// itemCodes.push(item.itemCode) |
|
|
|
// }) |
|
|
|
|
|
|
|
// getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
|
// if (res.success) { |
|
|
|
// this.managementList = res.list; |
|
|
|
// var params = this.setParams() |
|
|
|
// console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
// productionReceiptJobSubmit(params).then(res => { |
|
|
|
// uni.hideLoading() |
|
|
|
// if (res.data) { |
|
|
|
// this.showCommitSuccessMessage("提交成功\n生成发料接收记录\n" + res.data) |
|
|
|
// } else { |
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
// } |
|
|
|
// }).catch(error => { |
|
|
|
// uni.hideLoading() |
|
|
|
// this.showErrorMessage(error) |
|
|
|
// }) |
|
|
|
// } else { |
|
|
|
// uni.hideLoading(); |
|
|
|
// this.showErrorMessage(res.message); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
}, |
|
|
|
|
|
|
|
setParams() { |
|
|
|