|
@ -428,33 +428,48 @@ |
|
|
title: "提交中....", |
|
|
title: "提交中....", |
|
|
mask: true |
|
|
mask: true |
|
|
}); |
|
|
}); |
|
|
var itemCodes = [] |
|
|
var params = this.setParams() |
|
|
this.detailSource.forEach(item => { |
|
|
console.log("提交参数", JSON.stringify(params)); |
|
|
itemCodes.push(item.itemCode) |
|
|
productionReceiptJobSubmit(params).then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录<br>" + res.data) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showErrorMessage(error) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
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 => { |
|
|
// var itemCodes = [] |
|
|
uni.hideLoading() |
|
|
// this.detailSource.forEach(item => { |
|
|
if (res.data) { |
|
|
// itemCodes.push(item.itemCode) |
|
|
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录<br>" + res.data) |
|
|
// }) |
|
|
} else { |
|
|
|
|
|
this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
// getManagementPrecisions(itemCodes, this.toLocationCode, res => { |
|
|
} |
|
|
// if (res.success) { |
|
|
}).catch(error => { |
|
|
// this.managementList = res.list; |
|
|
uni.hideLoading() |
|
|
// var params = this.setParams() |
|
|
this.showErrorMessage(error) |
|
|
// console.log("提交参数", JSON.stringify(params)); |
|
|
}) |
|
|
|
|
|
} else { |
|
|
// productionReceiptJobSubmit(params).then(res => { |
|
|
uni.hideLoading(); |
|
|
// uni.hideLoading() |
|
|
this.showErrorMessage(res.message); |
|
|
// if (res.data) { |
|
|
} |
|
|
// this.showCommitSuccessMessage("提交成功<br>生成发料接收记录<br>" + res.data) |
|
|
}); |
|
|
// } else { |
|
|
|
|
|
// this.showErrorMessage("提交失败[" + res.msg + "]") |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(error => { |
|
|
|
|
|
// uni.hideLoading() |
|
|
|
|
|
// this.showErrorMessage(error) |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
|
// this.showErrorMessage(res.message); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
setParams() { |
|
|
setParams() { |
|
@ -464,10 +479,10 @@ |
|
|
this.detailSource.forEach(item => { |
|
|
this.detailSource.forEach(item => { |
|
|
item.subList.forEach(detail => { |
|
|
item.subList.forEach(detail => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, |
|
|
detail.packingNumber, detail.batch); |
|
|
// detail.packingNumber, detail.batch); |
|
|
detail.toPackingNumber = info.packingNumber; |
|
|
detail.toPackingNumber = detail.packingNumber; |
|
|
detail.toBatch = info.batch; |
|
|
detail.toBatch = detail.batch; |
|
|
detail.toContainerNumber = ""; |
|
|
detail.toContainerNumber = ""; |
|
|
detail.toLocationCode = this.toLocationCode; |
|
|
detail.toLocationCode = this.toLocationCode; |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|