diff --git a/api/request2.js b/api/request2.js index 9a457bfe..31da9570 100644 --- a/api/request2.js +++ b/api/request2.js @@ -2962,8 +2962,8 @@ export function repleinshRequestSubmit(params) { */ export function repleinshRecordSubmit(params) { return request({ - url: baseApi + "/magic-api/pda/job/putaway/jobSubmit", - method: "put", + url: baseApi + "/wms/repleinsh-record-main/create", + method: "post", data: params, }); } diff --git a/pages/inventoryMove/coms/comMove.vue b/pages/inventoryMove/coms/comMove.vue index 976003c0..f0022442 100644 --- a/pages/inventoryMove/coms/comMove.vue +++ b/pages/inventoryMove/coms/comMove.vue @@ -143,22 +143,22 @@ methods: { updateTitle() { - if(this.businessTypeCode=="InventoryMoveRecord"){ + if(this.businessTypeCode=="InventoryMove"){ this.title = "库存转移记录"; this.toInventoryStatus = "OK" - }else if(this.businessTypeCode=="HoldToOkRecord"){ + }else if(this.businessTypeCode=="HoldToOk"){ this.title = "隔离转合格记录"; this.toInventoryStatus = "OK" - }else if(this.businessTypeCode=="HoldToScrapRecord"){ + }else if(this.businessTypeCode=="HoldToScrap"){ this.title = "隔离转报废记录"; this.toInventoryStatus = "SCRAP" - }else if(this.businessTypeCode=="OkToHoldRecord"){ + }else if(this.businessTypeCode=="OkToHold"){ this.title = "合格转隔离记录"; this.toInventoryStatus ="HOLD" - }else if(this.businessTypeCode=="OktoScrapRecord"){ + }else if(this.businessTypeCode=="OktoScrap"){ this.title = "合格转报废记录"; this.toInventoryStatus ="SCRAP" - }else if(this.businessTypeCode=="ScrapToHoldRecord"){ + }else if(this.businessTypeCode=="ScrapToHold"){ this.title = "报废转隔离记录"; this.toInventoryStatus ="HOLD" } diff --git a/pages/inventoryMove/coms/comMoveJob.vue b/pages/inventoryMove/coms/comMoveJob.vue index 07ed5031..17d78497 100644 --- a/pages/inventoryMove/coms/comMoveJob.vue +++ b/pages/inventoryMove/coms/comMoveJob.vue @@ -114,15 +114,15 @@ var name = "" if (this.businessTypeCode == "Move") { name = "库存转移"; - } else if (this.businessTypeCode == "HoldToOkJob") { + } else if (this.businessTypeCode == "HoldToOk") { name = "隔离转合格"; - } else if (this.businessTypeCode == "HoldToScrapJob") { + } else if (this.businessTypeCode == "HoldToScrap") { name = "隔离转报废"; - } else if (this.businessTypeCode == "OkToHoldJob") { + } else if (this.businessTypeCode == "OkToHold") { name = "合格转隔离"; - } else if (this.businessTypeCode == "OktoScrapJob") { + } else if (this.businessTypeCode == "OktoScrap") { name = "合格转报废"; - } else if (this.businessTypeCode == "ScrapToHoldJob") { + } else if (this.businessTypeCode == "ScrapToHold") { name = "报废转隔离"; } diff --git a/pages/inventoryMove/job/HoldToScrapMoveJob.vue b/pages/inventoryMove/job/HoldToScrapMoveJob.vue index 37260299..410b2abf 100644 --- a/pages/inventoryMove/job/HoldToScrapMoveJob.vue +++ b/pages/inventoryMove/job/HoldToScrapMoveJob.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/job/OktoScrapMoveJob.vue b/pages/inventoryMove/job/OktoScrapMoveJob.vue index 758d0224..c78799e0 100644 --- a/pages/inventoryMove/job/OktoScrapMoveJob.vue +++ b/pages/inventoryMove/job/OktoScrapMoveJob.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/job/holdToOkMoveJob.vue b/pages/inventoryMove/job/holdToOkMoveJob.vue index c1adf7c1..149213d6 100644 --- a/pages/inventoryMove/job/holdToOkMoveJob.vue +++ b/pages/inventoryMove/job/holdToOkMoveJob.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/job/okToHoldMoveJob.vue b/pages/inventoryMove/job/okToHoldMoveJob.vue index 57ea603b..4c2bcca0 100644 --- a/pages/inventoryMove/job/okToHoldMoveJob.vue +++ b/pages/inventoryMove/job/okToHoldMoveJob.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/holdToOkRecord.vue b/pages/inventoryMove/record/holdToOkRecord.vue index 76c60d7c..6efc0d0a 100644 --- a/pages/inventoryMove/record/holdToOkRecord.vue +++ b/pages/inventoryMove/record/holdToOkRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/holdToScrapRecord.vue b/pages/inventoryMove/record/holdToScrapRecord.vue index 9887e2d0..5bcb87f5 100644 --- a/pages/inventoryMove/record/holdToScrapRecord.vue +++ b/pages/inventoryMove/record/holdToScrapRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/moveFreeRecord.vue b/pages/inventoryMove/record/moveFreeRecord.vue index 45c0dadc..b5b5cb32 100644 --- a/pages/inventoryMove/record/moveFreeRecord.vue +++ b/pages/inventoryMove/record/moveFreeRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/okToHoldRecord.vue b/pages/inventoryMove/record/okToHoldRecord.vue index db8932c0..fd3f5ee6 100644 --- a/pages/inventoryMove/record/okToHoldRecord.vue +++ b/pages/inventoryMove/record/okToHoldRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/oktoScrapRecord.vue b/pages/inventoryMove/record/oktoScrapRecord.vue index 79e69ce3..b9d41ad1 100644 --- a/pages/inventoryMove/record/oktoScrapRecord.vue +++ b/pages/inventoryMove/record/oktoScrapRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/inventoryMove/record/scrapToHoldRecord.vue b/pages/inventoryMove/record/scrapToHoldRecord.vue index 6a52c442..9ab54ffd 100644 --- a/pages/inventoryMove/record/scrapToHoldRecord.vue +++ b/pages/inventoryMove/record/scrapToHoldRecord.vue @@ -1,6 +1,6 @@ diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue index a2cb862d..d552d498 100644 --- a/pages/issue/record/issueRecord.vue +++ b/pages/issue/record/issueRecord.vue @@ -48,6 +48,8 @@ updateTitle, getRemoveOption, getISODateTime, + getCurrDateTime, + getPackingNumberAndBatch } from '@/common/basic.js'; import { @@ -56,6 +58,10 @@ import { getBusinessType, } from '@/common/record.js'; + + import { + getManagementPrecisions + } from '@/common/balance.js'; import comBlankView from '@/mycomponents/common/comBlankView.vue' import comIssueRequestPopup from '@/pages/issue/coms/comIssueRequestPopup.vue' @@ -92,6 +98,8 @@ fromInventoryStatuses: "", toInventoryStatuses: "", requestList: [], + dataContent:{}, + managementList:[] } }, mounted() { @@ -246,40 +254,116 @@ }, setParams() { - return this.detailSource + var subList = [] + var createTime = getCurrDateTime(); + var creator = this.$store.state.user.id + this.detailSource.forEach(toLocationCode => { + toLocationCode.Items.forEach(item => { + item.Locations.forEach(fromLocation => { + fromLocation.Batchs.forEach(batch => { + let subItem = batch.detail; + subItem.recordList = []; + if (batch.Records.length > 0) { + batch.Records.forEach(r => { + let record = {}; + record.handleQty = r.qty; + + record.fromPackingNumber = r + .packingNumber; + record.fromBatch = r.batch; + record.fromContainerNumber = r + .ContainerNumber; + + record.toContainerNumber = r + .ContainerNumber; + record.toInventoryStatus = r + .inventoryStatus; + record.toLocationCode = subItem + .toLocationCode; + record.fromLocationCode = fromLocation.fromLocationCode + record.supplierCode = r.supplierCode; + + //使用在途库不改变管理模式 + var info = getPackingNumberAndBatch( + this.managementList, r + .itemCode, + r.packingNumber, r + .batch); + record.toPackingNumber = info + .packingNumber; + record.toBatch = info.batch; + subItem.recordList.push(record); + }) + subList.push(subItem); + } + }) + }) + }) + }) + + this.dataContent.subList = subList + this.dataContent.createTime = createTime; + this.dataContent.creator = creator; + return this.dataContent; }, submit() { uni.showLoading({ title: "提交中....", mask: true }); + + //目前任务只到一个库位 + var itemCodes = [] + let locationCode = this.detailSource[0].toLocationCode + this.detailSource.forEach(toLocation => { + toLocation.Items.forEach(item => { + itemCodes.push(item.itemCode) + }) + }) + + //获取管理模式,封装参数 + getManagementPrecisions(itemCodes, locationCode, res => { + if (res.success) { + this.managementList = res.list; + this.submitJob(); + } else { + uni.hideLoading(); + this.showErrorMessage(res.message); + } + }); + }, + + submitJob() { var params = this.setParams() console.log("提交参数", JSON.stringify(params)); + issueRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { - this.showCommitSuccessMessage("提交成功
生成发料记录" + res.data) + this.showCommitSuccessMessage("提交成功
生成发料记录
" + res.data) } else { - this.showErrorMessage("提交失败[" + res.msg + "]") + this.showErrorMessage("提交失败:" + res.msg) } }).catch(error => { uni.hideLoading() this.showErrorMessage(error) }) - - }, + showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { - if (this.fromType == "requestType") { - uni.navigateTo({ - url: './issueRequest' - }) - } + this.clearData(); }) }, + clearData(){ + this.detailSource =[]; + this.requestList=[]; + this.dataContent ={} + this.managementList=[] + }, + showMessage(message) { this.$refs.comMessage.showMessage(message, res => { if (res) { diff --git a/pages/repleinsh/coms/comRepleinshRequestPopup.vue b/pages/repleinsh/coms/comRepleinshRequestPopup.vue index 6202f8c7..aa1ca50d 100644 --- a/pages/repleinsh/coms/comRepleinshRequestPopup.vue +++ b/pages/repleinsh/coms/comRepleinshRequestPopup.vue @@ -145,7 +145,7 @@ // } this.$refs.popup.open('bottom'); - this.showScanLocation(); + // this.showScanLocation(); }, closeRequestPopup() { this.$refs.popup.close() diff --git a/pages/repleinsh/record/repleinshRecord.vue b/pages/repleinsh/record/repleinshRecord.vue index 5c5360dd..dac6914e 100644 --- a/pages/repleinsh/record/repleinshRecord.vue +++ b/pages/repleinsh/record/repleinshRecord.vue @@ -1,7 +1,7 @@