|
@ -197,7 +197,7 @@ |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submit() { |
|
|
// submit() { |
|
|
//3.如果是按批次先进先出发料提交时如果扫描的箱码不是先进的批次,则报错 |
|
|
//3.如果是按批次先进先出发料提交时如果扫描的箱码不是先进的批次,则报错 |
|
|
//:请扫描XXX批次,改批次满足先进先出规则。否则可以直接提交 |
|
|
//:请扫描XXX批次,改批次满足先进先出规则。否则可以直接提交 |
|
|
// var isOutIn = getApp().globalData.feed_configList.filter( |
|
|
// var isOutIn = getApp().globalData.feed_configList.filter( |
|
@ -207,13 +207,6 @@ |
|
|
// } |
|
|
// } |
|
|
// }); |
|
|
// }); |
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: '提交中...', |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.submitJob(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.dataContent.itemCodeList.forEach(res => { |
|
|
// this.dataContent.itemCodeList.forEach(res => { |
|
|
// if (res.handleQty > res.recommendQty) { |
|
|
// if (res.handleQty > res.recommendQty) { |
|
@ -231,9 +224,9 @@ |
|
|
// }) |
|
|
// }) |
|
|
// } |
|
|
// } |
|
|
// }) |
|
|
// }) |
|
|
}, |
|
|
// }, |
|
|
|
|
|
|
|
|
submitJob() { |
|
|
submit() { |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
@ -248,13 +241,13 @@ |
|
|
|
|
|
|
|
|
//使用在途库,不查询管理模式 |
|
|
//使用在途库,不查询管理模式 |
|
|
if (this.jobContent.useOnTheWayLocation == 'TRUE') { |
|
|
if (this.jobContent.useOnTheWayLocation == 'TRUE') { |
|
|
this.submit(); |
|
|
this.submitJob(); |
|
|
} else { |
|
|
} else { |
|
|
//获取管理模式,封装参数 |
|
|
//获取管理模式,封装参数 |
|
|
getManagementPrecisions(itemCodes, locationCode, res => { |
|
|
getManagementPrecisions(itemCodes, locationCode, res => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.managementList = res.list; |
|
|
this.managementList = res.list; |
|
|
this.submit(); |
|
|
this.submitJob(); |
|
|
} else { |
|
|
} else { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
this.showErrorMessage(res.message); |
|
|
this.showErrorMessage(res.message); |
|
@ -263,6 +256,23 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
submitJob() { |
|
|
|
|
|
var params = this.setParams() |
|
|
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
|
|
|
issueJobSubmit(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成发货记录" + res.data) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败" + res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
|
var subList = [] |
|
|
var subList = [] |
|
|
var createTime = getCurrDateTime(); |
|
|
var createTime = getCurrDateTime(); |
|
@ -316,24 +326,6 @@ |
|
|
return this.jobContent; |
|
|
return this.jobContent; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submit() { |
|
|
|
|
|
var params = this.setParams() |
|
|
|
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
|
|
|
|
|
|
|
|
|
issueJobSubmit(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成发货记录" + res.data) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败" + res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancel() { |
|
|
cancel() { |
|
|
let that = this; |
|
|
let that = this; |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的零件和目标库位信息?', res => { |
|
|
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的零件和目标库位信息?', res => { |
|
@ -415,6 +407,14 @@ |
|
|
this.$refs.comMessage.showCommitSuccess(); |
|
|
this.$refs.comMessage.showCommitSuccess(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showCommitSuccessMessage(hint) { |
|
|
|
|
|
this.$refs.comMessage.showSuccessMessage(hint, res => { |
|
|
|
|
|
uni.navigateTo({ |
|
|
|
|
|
url: './issueJob' |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
showRescanMessage(message) { |
|
|
showRescanMessage(message) { |
|
|
this.$refs.comMessage.showRescanMessage(message); |
|
|
this.$refs.comMessage.showRescanMessage(message); |
|
|
}, |
|
|
}, |
|
|