|
@ -351,33 +351,21 @@ const showMessageHint = (hint, callback) => { |
|
|
const submitJob = () => { |
|
|
const submitJob = () => { |
|
|
proxy.$modal.loading('提交中....') |
|
|
proxy.$modal.loading('提交中....') |
|
|
const itemCodes = [] |
|
|
const itemCodes = [] |
|
|
detailSource.value.forEach((item) => { |
|
|
const params = setParams() |
|
|
itemCodes.push(item.itemCode) |
|
|
console.log('提交参数', JSON.stringify(params)) |
|
|
}) |
|
|
productionReceiptJobSubmit(params) |
|
|
|
|
|
.then((res) => { |
|
|
getManagementPrecisions(itemCodes, toLocationCode.value, (res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
managementList.value = res.list |
|
|
|
|
|
const params = setParams() |
|
|
|
|
|
|
|
|
|
|
|
productionReceiptJobSubmit(params) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
showCommitSuccessMessage(`提交成功<br>生成发料接收记录<br>${res.data}`) |
|
|
|
|
|
} else { |
|
|
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
showErrorMessage(res.message) |
|
|
if (res.data) { |
|
|
} |
|
|
showCommitSuccessMessage(`提交成功<br>生成发料接收记录<br>${res.data}`) |
|
|
}) |
|
|
} else { |
|
|
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((error) => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
showErrorMessage(error) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
const setParams = () => { |
|
|
const setParams = () => { |
|
|
const subList = [] |
|
|
const subList = [] |
|
@ -386,9 +374,9 @@ const setParams = () => { |
|
|
detailSource.value.forEach((item) => { |
|
|
detailSource.value.forEach((item) => { |
|
|
item.subList.forEach((detail) => { |
|
|
item.subList.forEach((detail) => { |
|
|
if (detail.scaned) { |
|
|
if (detail.scaned) { |
|
|
const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, detail.packingNumber, detail.batch) |
|
|
// const info = getPackingNumberAndBatch(managementList.value, detail.itemCode, 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 = toLocationCode.value |
|
|
detail.toLocationCode = toLocationCode.value |
|
|
subList.push(detail) |
|
|
subList.push(detail) |
|
|