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