|
|
@ -248,51 +248,42 @@ |
|
|
|
// } |
|
|
|
|
|
|
|
const commit = () => { |
|
|
|
if (toLocationCode.value == "") { |
|
|
|
showQuestionMessage('未指定目标库位,系统将按上架策略推荐库位是否继续提交?', res => { |
|
|
|
if (res) { |
|
|
|
commitRecord(); |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
commitRecord(); |
|
|
|
} |
|
|
|
} |
|
|
|
const commitRecord = ()=>{ |
|
|
|
|
|
|
|
if (detailSource.value.length > 0 && detailSource.value[0].subList.length > 0) { |
|
|
|
// 查询管理模式 |
|
|
|
|
|
|
|
proxy.$modal.loading('提交中....') |
|
|
|
managementList.value = [] |
|
|
|
const precisionStrategParams = setPrecisionStrategParams() |
|
|
|
|
|
|
|
getPrecisionStrategyList(precisionStrategParams, (res) => { |
|
|
|
if (res.success) { |
|
|
|
managementList.value = res.list |
|
|
|
const params = setParams() |
|
|
|
productPutawayRecordSubmit(params) |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
showCommitSuccessMessage(`提交成功<br>生成制品上架记录<br>${res.data}`) |
|
|
|
let removeId = []; |
|
|
|
detailSource.value.forEach(r => { |
|
|
|
removeId.push(r.expectinNumber) |
|
|
|
}) |
|
|
|
removeRecommendLocation(removeId); |
|
|
|
} else { |
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
uni.hideLoading() |
|
|
|
showErrorMessage(error) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
uni.hideLoading() |
|
|
|
showErrorMessage(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
// managementList.value = [] |
|
|
|
// const precisionStrategParams = setPrecisionStrategParams() |
|
|
|
|
|
|
|
// getPrecisionStrategyList(precisionStrategParams, (res) => { |
|
|
|
// if (res.success) { |
|
|
|
// managementList.value = res.list |
|
|
|
// |
|
|
|
// } else { |
|
|
|
// uni.hideLoading() |
|
|
|
// showErrorMessage(res.message) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
const params = setParams() |
|
|
|
productPutawayRecordSubmit(params) |
|
|
|
.then((res) => { |
|
|
|
uni.hideLoading() |
|
|
|
if (res.data) { |
|
|
|
showCommitSuccessMessage(`提交成功<br>生成制品上架记录<br>${res.data}`) |
|
|
|
let removeId = []; |
|
|
|
detailSource.value.forEach(r => { |
|
|
|
removeId.push(r.expectinNumber) |
|
|
|
}) |
|
|
|
removeRecommendLocation(removeId); |
|
|
|
} else { |
|
|
|
showErrorMessage(`提交失败[${res.msg}]`) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((error) => { |
|
|
|
uni.hideLoading() |
|
|
|
showErrorMessage(error) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
showErrorMessage('没有要提交的数据,请先扫描') |
|
|
|
} |
|
|
@ -330,7 +321,7 @@ |
|
|
|
item.subList.forEach((detail) => { |
|
|
|
if (detail.scaned) { |
|
|
|
const submitItem = deepCopyData(detail) |
|
|
|
const info = getPackingNumberAndBatchByList(managementList.value, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch) |
|
|
|
// const info = getPackingNumberAndBatchByList(managementList.value, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch) |
|
|
|
submitItem.itemCode = detail.itemCode |
|
|
|
submitItem.itemName = detail.package.itemName |
|
|
|
submitItem.itemDesc1 = detail.package.itemDesc1 |
|
|
@ -338,14 +329,20 @@ |
|
|
|
|
|
|
|
submitItem.inventoryStatus = detail.inventoryStatus |
|
|
|
|
|
|
|
submitItem.fromPackingNumber = info.packingNumber |
|
|
|
submitItem.toPackingNumber = info.packingNumber |
|
|
|
// submitItem.fromPackingNumber = info.packingNumber |
|
|
|
// submitItem.toPackingNumber = info.packingNumber |
|
|
|
|
|
|
|
submitItem.fromPackingNumber = detail.packingNumber; |
|
|
|
submitItem.toPackingNumber = detail.packingNumber; |
|
|
|
|
|
|
|
// submitItem.fromContainerNumber = detail.containerNumber |
|
|
|
// submitItem.toContainerNumber = detail.containerNumber |
|
|
|
|
|
|
|
submitItem.fromContainerNumber = detail.containerNumber |
|
|
|
submitItem.toContainerNumber = detail.containerNumber |
|
|
|
// submitItem.fromBatch = info.batch |
|
|
|
// submitItem.toBatch = info.batch |
|
|
|
|
|
|
|
submitItem.fromBatch = info.batch |
|
|
|
submitItem.toBatch = info.batch |
|
|
|
submitItem.fromBatch = detail.package.batch; |
|
|
|
submitItem.toBatch = detail.package.batch; |
|
|
|
|
|
|
|
submitItem.fromLocationCode = detail.locationCode |
|
|
|
submitItem.toLocationCode = item.toLocationCode |
|
|
|