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