diff --git a/pages/count/job/countDetail.vue b/pages/count/job/countDetail.vue index 80790ecc..568ffcc2 100644 --- a/pages/count/job/countDetail.vue +++ b/pages/count/job/countDetail.vue @@ -443,8 +443,14 @@ }, scanLocationCode(location, code) { - this.fromLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/count/record/countRecord.vue b/pages/count/record/countRecord.vue index 41c77a7a..d9a7cbed 100644 --- a/pages/count/record/countRecord.vue +++ b/pages/count/record/countRecord.vue @@ -367,8 +367,14 @@ }, scanLocationCode(location, code) { - this.fromLocationCode = code - this.fromLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue index 037db6e6..d2cc77d3 100644 --- a/pages/customerReturn/job/returnDetail.vue +++ b/pages/customerReturn/job/returnDetail.vue @@ -305,8 +305,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { diff --git a/pages/customerReturn/record/returnRecord.vue b/pages/customerReturn/record/returnRecord.vue index 63e9edb9..e867950c 100644 --- a/pages/customerReturn/record/returnRecord.vue +++ b/pages/customerReturn/record/returnRecord.vue @@ -243,8 +243,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/deliver/job/deliverDetail.vue b/pages/deliver/job/deliverDetail.vue index 1951065a..88e54331 100644 --- a/pages/deliver/job/deliverDetail.vue +++ b/pages/deliver/job/deliverDetail.vue @@ -311,8 +311,14 @@ scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { diff --git a/pages/deliver/record/deliverRecord.vue b/pages/deliver/record/deliverRecord.vue index 9baab9a7..6ca627a4 100644 --- a/pages/deliver/record/deliverRecord.vue +++ b/pages/deliver/record/deliverRecord.vue @@ -254,8 +254,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/issue/coms/comIssueDetailCard.vue b/pages/issue/coms/comIssueDetailCard.vue index cb2ac161..3430b1de 100644 --- a/pages/issue/coms/comIssueDetailCard.vue +++ b/pages/issue/coms/comIssueDetailCard.vue @@ -16,7 +16,7 @@ - + diff --git a/pages/issue/job/issueDetail.vue b/pages/issue/job/issueDetail.vue index 615c1767..1e3d1f80 100644 --- a/pages/issue/job/issueDetail.vue +++ b/pages/issue/job/issueDetail.vue @@ -36,7 +36,6 @@ updateTitle, getRemoveOption, getISODateTime, - getDirectoryItemArray } from '@/common/basic.js'; @@ -135,6 +134,7 @@ mask: true }); getIssueJobDetail(that.id).then(res => { + debugger uni.hideLoading(); if (res.data == null) { that.showMessage('未获取到详情'); @@ -146,7 +146,6 @@ // that.fromLocationCode = that.subList[0].FromLocationCode // that.toLocationCode = that.subList[0].toLocationCode // that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) - updateTitle(this.jobContent.number); that.resizeCollapse(); uni.hideLoading(); } else { diff --git a/pages/package/record/mergePackageRecord.vue b/pages/package/record/mergePackageRecord.vue index 106634b4..916cfc55 100644 --- a/pages/package/record/mergePackageRecord.vue +++ b/pages/package/record/mergePackageRecord.vue @@ -224,8 +224,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/package/record/overPackageRecord.vue b/pages/package/record/overPackageRecord.vue index 6e321a34..b84644d8 100644 --- a/pages/package/record/overPackageRecord.vue +++ b/pages/package/record/overPackageRecord.vue @@ -248,8 +248,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/package/record/splitPackageRecord.vue b/pages/package/record/splitPackageRecord.vue index 5b460309..c56dfecb 100644 --- a/pages/package/record/splitPackageRecord.vue +++ b/pages/package/record/splitPackageRecord.vue @@ -248,8 +248,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/productDismantle/job/productDismantleDetail.vue b/pages/productDismantle/job/productDismantleDetail.vue index e68b0f9c..8b7b8ba4 100644 --- a/pages/productDismantle/job/productDismantleDetail.vue +++ b/pages/productDismantle/job/productDismantleDetail.vue @@ -306,8 +306,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { diff --git a/pages/productDismantle/record/productDismantleRecord.vue b/pages/productDismantle/record/productDismantleRecord.vue index 1229f1b1..ac69d0ab 100644 --- a/pages/productDismantle/record/productDismantleRecord.vue +++ b/pages/productDismantle/record/productDismantleRecord.vue @@ -222,8 +222,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/productPutaway/job/productPutawayDetail.vue b/pages/productPutaway/job/productPutawayDetail.vue index 2c766d5e..3c1ad745 100644 --- a/pages/productPutaway/job/productPutawayDetail.vue +++ b/pages/productPutaway/job/productPutawayDetail.vue @@ -339,8 +339,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { diff --git a/pages/productPutaway/record/productPutawayRecord.vue b/pages/productPutaway/record/productPutawayRecord.vue index 307d95ad..4b31331b 100644 --- a/pages/productPutaway/record/productPutawayRecord.vue +++ b/pages/productPutaway/record/productPutawayRecord.vue @@ -225,8 +225,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/productReceipt/job/productReceiptDetail.vue b/pages/productReceipt/job/productReceiptDetail.vue index 88943737..eaca83fc 100644 --- a/pages/productReceipt/job/productReceiptDetail.vue +++ b/pages/productReceipt/job/productReceiptDetail.vue @@ -283,8 +283,14 @@ scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, async commit() { diff --git a/pages/productReceipt/record/productReceiptRecord.vue b/pages/productReceipt/record/productReceiptRecord.vue index f91336c5..49675d40 100644 --- a/pages/productReceipt/record/productReceiptRecord.vue +++ b/pages/productReceipt/record/productReceiptRecord.vue @@ -208,8 +208,14 @@ // }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/productionReceipt/job/productionReceiptDetail.vue b/pages/productionReceipt/job/productionReceiptDetail.vue index b577a739..6508ecf6 100644 --- a/pages/productionReceipt/job/productionReceiptDetail.vue +++ b/pages/productionReceipt/job/productionReceiptDetail.vue @@ -297,8 +297,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { diff --git a/pages/productionReceipt/record/productionReceiptRecord.vue b/pages/productionReceipt/record/productionReceiptRecord.vue index c9afdd39..f5de1a4f 100644 --- a/pages/productionReceipt/record/productionReceiptRecord.vue +++ b/pages/productionReceipt/record/productionReceiptRecord.vue @@ -215,8 +215,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/productionReturn/job/returnDetail.vue b/pages/productionReturn/job/returnDetail.vue index fcb2fb06..17bd143a 100644 --- a/pages/productionReturn/job/returnDetail.vue +++ b/pages/productionReturn/job/returnDetail.vue @@ -287,21 +287,35 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, commit() { - if (this.toLocationCode == "") { - this.showMessage("请扫描目标库位") + this.scanCount = getScanCount(this.subList); + if (this.scanCount == 0) { + this.showErrorMessage("扫描数为0,请先扫描") return; } - //允许部分提交 - if (this.jobContent.allowPartialComplete == "TRUE") { + if (!this.checkLocation()) { + return + } + //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { this.submitJob(); - } else { - this.scanCount = getScanCount(this.subList); - if (this.scanCount < this.subList.length) { + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.submitJob(); + } else { + //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + "]箱总共[" + this .subList.length + "]箱", res => { @@ -309,8 +323,6 @@ this.openScanPopup(); } }); - } else { - this.submitJob(); } } }, @@ -377,6 +389,18 @@ this.jobContent.creator =creator; return this.jobContent; }, + + checkLocation() { + var isPass = true; + if (this.toLocationCode == "") { + this.showMessageHint('请扫描收货库位', callback => { + this.$refs.comScanLocation.showLocation(); + }) + + return isPass = false; + } + return isPass; + }, showMessage(message) { setTimeout(r => { diff --git a/pages/purchaseReceipt/job/receiptDetail.vue b/pages/purchaseReceipt/job/receiptDetail.vue index 06a05270..6f8efe71 100644 --- a/pages/purchaseReceipt/job/receiptDetail.vue +++ b/pages/purchaseReceipt/job/receiptDetail.vue @@ -258,15 +258,14 @@ commit() { this.scanCount = this.getScanCount(); + if( this.scanCount==0){ + this.showErrorMessage("扫描数为0,请先扫描") + return; + } //校验库位、 if (!this.checkLocation()) { return } - - if( this.scanCount==0){ - this.showErrorMessage("扫描数为0,请先扫描") - return; - } console.log("校验通过") diff --git a/pages/putaway/job/putawayDetail.vue b/pages/putaway/job/putawayDetail.vue index 2209d995..cf049210 100644 --- a/pages/putaway/job/putawayDetail.vue +++ b/pages/putaway/job/putawayDetail.vue @@ -349,13 +349,13 @@ commit() { this.scanCount = getScanCount(this.subList); - if (!this.checkLocation()) { - return - } if (this.scanCount == 0) { this.showErrorMessage("扫描数为0,请先扫描") return; } + if (!this.checkLocation()) { + return + } //扫描数量和任务数量相等,直接提交 if (this.scanCount == this.subList.length) { diff --git a/pages/repleinsh/job/repleinshDetail.vue b/pages/repleinsh/job/repleinshDetail.vue index 154b67c1..8162ba7d 100644 --- a/pages/repleinsh/job/repleinshDetail.vue +++ b/pages/repleinsh/job/repleinshDetail.vue @@ -5,7 +5,8 @@ + @remove="updateData" @updateData="updateData" @openDetail="openDetail" + :locationTypeList='tolocationTypeList'> @@ -14,7 +15,7 @@ @@ -285,7 +286,11 @@ ']不一致,是否继续上架?', res => { if (res) { itemDetail.scaned = true; - itemDetail.handleQty = Number(result.label.qty); + itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); + itemDetail.balance = result.balance; + itemDetail.balance.balanceQty = result.balance.qty; + itemDetail.balance.stdPackQty =result.package.stdPackQty + itemDetail.balance.stdPackUnit =result.package.stdPackUnit this.calcHandleQty(); } else { this.scanPopupGetFocus(); @@ -293,7 +298,11 @@ }); } else { itemDetail.scaned = true; - itemDetail.handleQty = Number(result.label.qty); + itemDetail.handleQty = Number(result.label.qty)>Number(result.balance.qty)?Number(result.balance.qty):Number(result.label.qty); + itemDetail.balance = result.balance; + itemDetail.balance.balanceQty = result.balance.qty; + itemDetail.balance.stdPackQty =result.package.stdPackQty + itemDetail.balance.stdPackUnit =result.package.stdPackUnit this.calcHandleQty(); } } @@ -305,8 +314,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位["+code+"]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, openDetail(item) { @@ -314,84 +329,149 @@ }, commit() { - if (this.toLocationCode == "") { - this.showMessage("请先选择目标库位") + this.scanCount = getScanCount(this.subList); + if (this.scanCount == 0) { + this.showErrorMessage("扫描数为0,请先扫描") return; } + //校验库位、 + if (!this.checkLocation()) { + return + } - //允许部分提交 - if (this.jobContent.allowPartialComplete == "TRUE") { + //扫描数量和任务数量相等,直接提交 + if (this.scanCount == this.subList.length) { this.submitJob(); - } else { - this.scanCount = getScanCount(this.subList); - if (this.scanCount < this.subList.length) { + } else if (this.scanCount < this.subList.length) { + //扫描数量小于任务数量,判断是否允许部分提交 + if (this.jobContent.allowPartialComplete == "TRUE") { + //提交 + this.submitJob(); + } else { + //不允许部分提交,提示 this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交
' + "已经扫描[" + this.scanCount + - "]箱总共[" + this.subList.length + "]箱", res => { + "]箱总共[" + this + .subList.length + "]箱", res => { if (res) { this.openScanPopup(); } }); - } else { - this.submitJob(); } } }, - - async submitJob() { + + submitJob() { uni.showLoading({ 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)); - // repleinshJobSubmit(this.id, params).then(res => { - // uni.hideLoading() - // if (res.data) { - // var hint = res.data.Number; - // this.showCommitSuccessMessage("提交成功" + hint) - - // } else { - // this.showErrorMessage("提交失败") - // } - // }).catch(error => { - // uni.hideLoading() - // this.showErrorMessage(error) - // }) - } else { - uni.hideLoading(); - this.showErrorMessage(res.message); - } - }); - + + //如果目标库位等于null,不查询管理模式,否则查询管理模式 + if (this.toLocationCode == null || this.toLocationCode == "") { + var params = this.setParams(false) + console.log("提交参数", JSON.stringify(params)); + // repleinshJobSubmit( params).then(res => { + // if (res.data) { + // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, ) + // } else { + // this.showErrorMessage("提交失败"+res.msg) + // } + // uni.hideLoading() + // }).catch(error => { + // uni.hideLoading() + // this.showErrorMessage(error) + // }) + + } else { + 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(true) + console.log("提交参数", JSON.stringify(params)); + + // repleinshJobSubmit( params).then(res => { + // if (res.data) { + // this.showCommitSuccessMessage("提交成功
生成采购收货记录" + res.data, ) + // } else { + // this.showErrorMessage("提交失败"+res.msg) + // } + // uni.hideLoading() + // }).catch(error => { + // uni.hideLoading() + // this.showErrorMessage(error) + // }) + } else { + uni.hideLoading(); + this.showErrorMessage(res.message); + } + }); + } + }, - setParams() { + checkLocation() { + var isPass = true; + if (this.toLocationCode == "") { + this.showMessageHint('请扫描收货库位', callback => { + this.$refs.comScanLocation.showLocation(); + }) + + return isPass = false; + } + return isPass; + }, + + showMessageHint(hint, callback) { + this.$refs.comMessage.showErrorMessage(hint, res => { + if (res) { + callback() + } + }); + }, + + + setParams(queryModel) { var subList = [] var createTime = getCurrDateTime(); var creator = this.$store.state.user.id - + 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; - subList.push(detail) + var subItem = {}; + Object.assign(subItem, detail) + if (queryModel) { + var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, + detail.packingNumber, detail.batch); + subItem.package ="" ; + subItem.balance ="" ; + subItem.toPackingNumber = info.packingNumber;; + subItem.toContainerNumber = subItem.containerNumber + subItem.toBatch = info.batch; + subItem.toInventoryStatus = subItem.inventoryStatus + subItem.toLocationCode = this.toLocationCode + } else { + subItem.package ="" ; + subItem.balance ="" ; + subItem.toPackingNumber = subItem.packingNumber; + subItem.toContainerNumber = subItem.containerNumber + subItem.toBatch = subItem.toBatch; + subItem.toInventoryStatus = subItem.inventoryStatus + subItem.toLocationCode = "" + } + + subList.push(subItem) } }) }) this.jobContent.subList = subList this.jobContent.createTime = createTime; - this.jobContent.creator =creator; + this.jobContent.creator = creator; return this.jobContent; }, diff --git a/pages/scrap/job/scrapJobDetail.vue b/pages/scrap/job/scrapJobDetail.vue index ffcaace5..6c318589 100644 --- a/pages/scrap/job/scrapJobDetail.vue +++ b/pages/scrap/job/scrapJobDetail.vue @@ -249,8 +249,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, async commit() { diff --git a/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue b/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue index 118f6bd8..fafc77cb 100644 --- a/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue +++ b/pages/supplierDeliver/record/supplierDeliverRecordDetail.vue @@ -194,8 +194,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/transfer/coms/comTransferRecord.vue b/pages/transfer/coms/comTransferRecord.vue index 6793e1f1..de7f7061 100644 --- a/pages/transfer/coms/comTransferRecord.vue +++ b/pages/transfer/coms/comTransferRecord.vue @@ -234,8 +234,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationCode = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, diff --git a/pages/unPlanned/job/receiptJobDetail.vue b/pages/unPlanned/job/receiptJobDetail.vue index 103bee91..a34e39fe 100644 --- a/pages/unPlanned/job/receiptJobDetail.vue +++ b/pages/unPlanned/job/receiptJobDetail.vue @@ -282,8 +282,14 @@ }, scanLocationCode(location, code) { - this.toLocationCode = code - this.toLocationInfo = location; + this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => { + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + }) + }) + }) }, async commit() {