diff --git a/api/request2.js b/api/request2.js index 31da9570..fbb4b9ad 100644 --- a/api/request2.js +++ b/api/request2.js @@ -223,6 +223,21 @@ export function getContainerByNumber(number) { }); } + +/** + * 查询器具信息接口 + * @param {*} number 器具代码 + */ +export function getContainerDetailByNumber(number) { + + return request({ + url: baseApi + "/wms/container-main/getContainerByNumber?number=" + number, + method: "get", + data: {}, + }); +} + + /** * 按器具查询库存明细 * @param {*器具代码} diff --git a/mycomponents/balance/moveStatus.vue b/mycomponents/balance/moveStatus.vue index 11a8f3a7..a626435b 100644 --- a/mycomponents/balance/moveStatus.vue +++ b/mycomponents/balance/moveStatus.vue @@ -4,7 +4,7 @@ • {{statusDesc(fromInventoryStatus)}} - -> + —> • {{statusDesc(toInventoryStatus)}} diff --git a/pages/inventoryMove/coms/comMove.vue b/pages/inventoryMove/coms/comMove.vue index f0022442..be6915d0 100644 --- a/pages/inventoryMove/coms/comMove.vue +++ b/pages/inventoryMove/coms/comMove.vue @@ -10,21 +10,21 @@ + :isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack' + :allowEditStatus="allowEditStatus"> - + + :locationTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"> @@ -33,7 +33,8 @@ - + + @@ -56,15 +57,15 @@ import { getDirectoryItemArray } from '@/common/directory.js'; - + import { getPrecisionStrategyList } from '@/common/balance.js'; - + import { getPackingNumberAndBatchByList } from '@/common/basic.js'; - + import { getBusinessType, createItemInfo, @@ -100,24 +101,27 @@ type: Boolean, default: false }, - businessTypeCode: { type: String, default: "Move" - } //业务类型 + }, //业务类型 + toLocationCode: { + type: String, + default: "" + }, }, data() { return { fromLocationCode: "", - toLocationCode: "", + // toLocationCode: "", toLocationInfo: {}, toLocationTypeArray: [], toInventoryStatus: "", businessType: {}, //业务类型 detailSource: [], //绑定在页面上的数据源 - title:"", - dataContent:{}, - toWarehouseCode:"", + title: "", + dataContent: {}, + toWarehouseCode: "", fromlocationTypeList: [], tolocationTypeList: [], } @@ -143,27 +147,27 @@ methods: { updateTitle() { - if(this.businessTypeCode=="InventoryMove"){ + if (this.businessTypeCode == "InventoryMove") { this.title = "库存转移记录"; - this.toInventoryStatus = "OK" - }else if(this.businessTypeCode=="HoldToOk"){ - this.title = "隔离转合格记录"; - this.toInventoryStatus = "OK" - }else if(this.businessTypeCode=="HoldToScrap"){ - this.title = "隔离转报废记录"; - this.toInventoryStatus = "SCRAP" - }else if(this.businessTypeCode=="OkToHold"){ - this.title = "合格转隔离记录"; - this.toInventoryStatus ="HOLD" - }else if(this.businessTypeCode=="OktoScrap"){ - this.title = "合格转报废记录"; - this.toInventoryStatus ="SCRAP" - }else if(this.businessTypeCode=="ScrapToHold"){ - this.title = "报废转隔离记录"; - this.toInventoryStatus ="HOLD" + this.toInventoryStatus = "OK" + } else if (this.businessTypeCode == "HoldToOk") { + this.title = "隔离转合格记录"; + this.toInventoryStatus = "OK" + } else if (this.businessTypeCode == "HoldToScrap") { + this.title = "隔离转报废记录"; + this.toInventoryStatus = "SCRAP" + } else if (this.businessTypeCode == "OkToHold") { + this.title = "合格转隔离记录"; + this.toInventoryStatus = "HOLD" + } else if (this.businessTypeCode == "OktoScrap") { + this.title = "合格转报废记录"; + this.toInventoryStatus = "SCRAP" + } else if (this.businessTypeCode == "ScrapToHold") { + this.title = "报废转隔离记录"; + this.toInventoryStatus = "HOLD" } uni.setNavigationBarTitle({ - title: this.title + title: this.title }) }, openScanPopup() { @@ -203,10 +207,10 @@ } }) if (item == undefined) { - var itemp = createItemInfo(balance,pack); + var itemp = createItemInfo(balance, pack); let newDetail = createDetailInfo(balance, pack); // - newDetail.inventoryStatus =balance.inventoryStatus; - newDetail.toInventoryStatus =this.toInventoryStatus + newDetail.inventoryStatus = balance.inventoryStatus; + newDetail.toInventoryStatus = this.toInventoryStatus itemp.subList.push(newDetail); this.detailSource.push(itemp) } else { @@ -223,7 +227,7 @@ if (detail == undefined) { let newDetail = createDetailInfo(balance, pack); newDetail.inventoryStatus = balance.inventoryStatus; - newDetail.toInventoryStatus =this.toInventoryStatus + newDetail.toInventoryStatus = this.toInventoryStatus item.subList.push(newDetail); } else { this.showErrorMessage(balance.packingNumber + "已经在列表中") @@ -274,7 +278,7 @@ this.clearData() }) }, - clearData(){ + clearData() { this.fromLocationCode = ''; this.subList = []; this.detailSource = []; @@ -283,7 +287,7 @@ this.toWarehouseCode = "" }, commit() { - + if (this.toLocationCode == "") { this.showMessage("请先选择目标库位") return; @@ -296,37 +300,38 @@ }); this.managementList = []; var precisionStrategParams = this.setPrecisionStrategParams() - + getPrecisionStrategyList(precisionStrategParams, res => { if (res.success) { this.managementList = res.list; var params = this.setParams() console.log("提交" + JSON.stringify(params)) - inventoryMoveRecordSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - this.showCommitSuccessMessage("提交成功
生成"+this.title+"记录
" + res.data) - } else { - this.showErrorMessage("提交失败[" + res.msg + "]") - } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) - }) - + inventoryMoveRecordSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成" + this.title + "记录
" + + res.data) + } else { + this.showErrorMessage("提交失败[" + res.msg + "]") + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + } else { uni.hideLoading(); this.showErrorMessage(res.message); } - + }) - + } else { this.showErrorMessage("没有要提交的数据,请先扫描") } - + }, - + setPrecisionStrategParams() { var itemList = [] this.detailSource.forEach(item => { @@ -347,14 +352,14 @@ } itemList.push(result) } - + } }) }) return itemList; }, setParams() { - + var subList = [] var creator = this.$store.state.user.id this.detailSource.forEach(item => { @@ -366,22 +371,22 @@ detail.itemName = detail.package.itemName; detail.itemDesc1 = detail.package.itemDesc1; detail.itemDesc2 = detail.package.itemDesc2; - + detail.fromInventoryStatus = detail.inventoryStatus; // detail.toInventoryStatus = this.toInventoryStatus; - + detail.fromPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber; - + detail.fromContainerNumber = detail.containerNumber; detail.toContainerNumber = detail.containerNumber - + detail.fromBatch = info.batch; detail.toBatch = info.batch; - + detail.fromLocationCode = detail.locationCode; detail.toLocationCode = detail.toLocationCode; - + subList.push(detail) } }) @@ -393,11 +398,11 @@ this.dataContent.businessType = this.businessTypeCode; return this.dataContent; }, - - - - - + + + + + } } diff --git a/pages/inventoryMove/coms/comMovebalance.vue b/pages/inventoryMove/coms/comMovebalance.vue index 095f3258..12142f4f 100644 --- a/pages/inventoryMove/coms/comMovebalance.vue +++ b/pages/inventoryMove/coms/comMovebalance.vue @@ -18,6 +18,9 @@ + + +