From d74893e692169829b3ce5dbd942328f0c6a7bdd1 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Thu, 21 Dec 2023 09:39:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BF=BB=E5=8C=85?= =?UTF-8?q?=E5=92=8C=E6=8B=86=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/scan/winScanContainer.vue | 2 +- mycomponents/scan/winScanPackAndLocation.vue | 2 +- pages/package/record/mergePackageRecord.vue | 2 +- pages/package/record/overPackageRecord.vue | 2 +- pages/package/record/splitPackageRecord.vue | 2 +- pages/pallet/record/unBindPalletRecord.vue | 2 +- static/config.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mycomponents/scan/winScanContainer.vue b/mycomponents/scan/winScanContainer.vue index dae2d39b..b114584d 100644 --- a/mycomponents/scan/winScanContainer.vue +++ b/mycomponents/scan/winScanContainer.vue @@ -12,7 +12,7 @@ - diff --git a/mycomponents/scan/winScanPackAndLocation.vue b/mycomponents/scan/winScanPackAndLocation.vue index c61dd364..5760d413 100644 --- a/mycomponents/scan/winScanPackAndLocation.vue +++ b/mycomponents/scan/winScanPackAndLocation.vue @@ -27,7 +27,7 @@ + @confirm="scanLocation" style='height: 30px;'> diff --git a/pages/package/record/mergePackageRecord.vue b/pages/package/record/mergePackageRecord.vue index b7f4e1ce..9cf29be0 100644 --- a/pages/package/record/mergePackageRecord.vue +++ b/pages/package/record/mergePackageRecord.vue @@ -35,7 +35,7 @@ - + diff --git a/pages/package/record/overPackageRecord.vue b/pages/package/record/overPackageRecord.vue index 1492819a..eef1d1d0 100644 --- a/pages/package/record/overPackageRecord.vue +++ b/pages/package/record/overPackageRecord.vue @@ -30,7 +30,7 @@ - + diff --git a/pages/package/record/splitPackageRecord.vue b/pages/package/record/splitPackageRecord.vue index ec2410db..4c70c950 100644 --- a/pages/package/record/splitPackageRecord.vue +++ b/pages/package/record/splitPackageRecord.vue @@ -29,7 +29,7 @@ - + diff --git a/pages/pallet/record/unBindPalletRecord.vue b/pages/pallet/record/unBindPalletRecord.vue index c8aac886..c40b08d9 100644 --- a/pages/pallet/record/unBindPalletRecord.vue +++ b/pages/pallet/record/unBindPalletRecord.vue @@ -297,7 +297,7 @@ this.scanPopupGetFocus(); }, getContainer(containerInfo) { - this.containerCode = containerInfo.Number; + this.containerCode = containerInfo.number; getContainerDetailByNumber(this.containerCode).then(res => { if (res.data.length > 0) { this.detailSource = this.getDataSource(res.data) diff --git a/static/config.json b/static/config.json index 7426682e..c33affa0 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://dev.ccwin-in.com:25100/api/admin-api", + "value": "http://192.168.0.106:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api", From 1930f8887be615fd0411379e79bb809aa14a84f1 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Thu, 21 Dec 2023 13:08:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mycomponents/location/requiredLocation.vue | 13 +- mycomponents/record/recordComDetailCard.vue | 3 +- pages/putaway/record/putawayRecord.vue | 150 ++++++-------------- static/config.json | 2 +- 4 files changed, 54 insertions(+), 114 deletions(-) diff --git a/mycomponents/location/requiredLocation.vue b/mycomponents/location/requiredLocation.vue index 0ac2a93c..ff43f421 100644 --- a/mycomponents/location/requiredLocation.vue +++ b/mycomponents/location/requiredLocation.vue @@ -5,9 +5,12 @@ padding-right: 10rpx; font-size:32rpx;"> - {{title}} -   请扫描 -   {{locationCode}} + + {{title}} + +   请扫描 +   {{locationCode}} + - - + @@ -56,12 +55,6 @@ getDirectoryItemArray } from '@/common/directory.js'; - import { - getDetailOption, - getDetailRemoveOption, - getDetailEditRemoveOption - } from '@/common/array.js'; - import { getBusinessType, createItemInfo, @@ -116,15 +109,6 @@ }; }, onLoad(option) { - this.fromType = option.fromType - if (this.fromType == "requestType") { - this.showToLoaction = false - updateTitle("原料上架申请") - } else { - updateTitle("原料上架记录") - this.showToLoaction = true - - } var typeCode = "PurchasePutaway" getBusinessType(typeCode, res => { if (res.success) { @@ -188,10 +172,10 @@ showErrorMessage(message) { this.$refs.comMessage.showErrorMessage(message, res => { - if (res) { - } + if (res) {} }); }, + calcHandleQty() { for (let item of this.detailSource) { item.qty = 0; @@ -207,6 +191,7 @@ updateData() { this.calcHandleQty(); }, + removeItem(index, item) { this.detailSource.splice(index, 1) }, @@ -228,6 +213,7 @@ } this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType); }, + showFromLocationPopup() { this.$nextTick(() => { this.$refs.scanLocationCode.openScanPopup(); @@ -259,110 +245,60 @@ mask: true }); - if (this.fromType == "requestType") { - var params = this.setRequestParams() - console.log("提交" + JSON.stringify(params)) - // putawayRequestSubmit(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 { - //记录有目标库位,需要查询管理模式 - 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.setRecordParams(true) - console.log("提交参数", JSON.stringify(params)); - - // putawayRecordSubmit(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); - } - }); - } - }, - - setRecordParams(queryModel) { - var subList = [] - var creator = this.$store.state.user.id + //记录有目标库位,需要查询管理模式 + var itemCodes = [] this.detailSource.forEach(item => { - item.subList.forEach(detail => { - if (detail.scaned) { - if (queryModel) { - var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, - detail.packingNumber, detail.batch); - detail.toPackingNumber = info.packingNumber;; - detail.toContainerNumber = detail.containerNumber - detail.toBatch = info.batch; - detail.toInventoryStatus = detail.inventoryStatus - detail.toLocationCode = this.toLocationCode + itemCodes.push(item.itemCode) + }) + //获取管理模式,封装参数 + getManagementPrecisions(itemCodes, this.toLocationCode, res => { + if (res.success) { + this.managementList = res.list; + var params = this.setRecordParams(true) + console.log("提交参数", JSON.stringify(params)); + + putawayRecordSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成采购上架记录" + res.data, ) } else { - // detail.toPackingNumber = detail.packingNumber; - // detail.toContainerNumber = detail.containerNumber - // detail.toBatch = detail.toBatch; - // detail.toInventoryStatus = detail.inventoryStatus - // detail.toLocationCode = "" + this.showErrorMessage("提交失败[" + res.msg + "]") } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + } else { + uni.hideLoading(); + this.showErrorMessage(res.message); + } + }); - subList.push(detail) - } - }) - }) - this.dataContent.subList = subList - this.dataContent.creator = creator; - return this.dataContent; }, - - setRequestParams(){ + + setRecordParams(queryModel) { var subList = [] - var supplierCode="" + var creator = this.$store.state.user.id this.detailSource.forEach(item => { item.subList.forEach(detail => { if (detail.scaned) { - if(supplierCode==""){ - supplierCode = detail.package.supplierCode - } + var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, + detail.packingNumber, detail.batch); + detail.toPackingNumber = info.packingNumber;; + detail.toContainerNumber = detail.containerNumber + detail.toBatch = info.batch; + detail.toInventoryStatus = detail.inventoryStatus + detail.toLocationCode = this.toLocationCode + detail.package=null; subList.push(detail) } }) }) - this.dataContent.subList = subList - this.dataContent.supplierCode = supplierCode - this.dataContent.businessType = "PurchasePutaway" - this.dataContent.departmentCode= "研发部门"; - this.dataContent.status= 1 ; - this.dataContent.autoCommit = "FALSE"; - this.dataContent.autoAgree = "FALSE"; - this.dataContent.autoExecute = "FALSE"; - this.dataContent.directCreateRecord = "FALSE"; + this.dataContent.creator = creator; return this.dataContent; }, - showMessage(message) { this.$refs.comMessage.showMessage(message, res => { if (res) {} diff --git a/static/config.json b/static/config.json index c33affa0..7426682e 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.106:12080/admin-api", + "value": "http://dev.ccwin-in.com:25100/api/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api", From 3ebfe853f0ef4a9f1e84cb49cf5c32eaad0fad2b Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Thu, 21 Dec 2023 15:20:20 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B0=83=E6=8B=A8?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=92=8C=E7=9B=B4=E6=8E=A5=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/request2.js | 16 +++ common/balance.js | 43 +++++++- common/record.js | 1 + common/style/pdabasic.css | 1 + pages/putaway/record/putawayRecord.vue | 130 +++++++++++++++++-------- pages/transfer/job/receiptDetail.vue | 94 +++++++++++------- 6 files changed, 211 insertions(+), 74 deletions(-) diff --git a/api/request2.js b/api/request2.js index 94572f52..8ee91e69 100644 --- a/api/request2.js +++ b/api/request2.js @@ -304,6 +304,22 @@ export function getBasicLocationByCode(code) { }); } + +/** + * 校验库位零件关系 + * @param {*} + * + */ +export function validateItemAndLocation(parmas) { + return request({ + url: baseApi + "/wms/location/validate", + method: "post", + data: parmas, + }); +} + + + /** * 查询物品信息接口 * @param {*} code 物品代码 diff --git a/common/balance.js b/common/balance.js index 77dcd174..84c7073e 100644 --- a/common/balance.js +++ b/common/balance.js @@ -4,6 +4,47 @@ import { getBalanceByFilter } from '@/api/request2.js'; +/** + * + 获取管理精度查询策略参数 + * @param {*} + * + */ +export function getPrecisionStrategyParams(dataSource) { + +} +/** + * + 获取管理精度查询策略参数 + * @param {*} + * + */ +export function getPrecisionStrategyParamsByLocation(detailSource,toLocationCode) { + var itemList = [] + detailSource.forEach(item => { + item.subList.forEach(detail => { + if (detail.scaned) { + detail.toLocationCode = toLocationCode; + var filterResult = itemList.filter(res => { + if (res.itemCode == item.itemCode && + res.locationCode == detail.toLocationCode) { + return res + } + }) + //去掉重复元素 + if (filterResult.length == 0) { + var result = { + itemCode: item.itemCode, + locationCode: detail.toLocationCode + } + itemList.push(result) + } + + } + }) + }) + return itemList; +} /** * "itemCode": [], @@ -19,7 +60,7 @@ export function getPrecisionStrategyList(itemList, callback) { success: true, message: '' }; - + getPrecisionStrategy(itemList).then(res => { if (res.data == null) { result.success = false diff --git a/common/record.js b/common/record.js index ff25f732..f931a55c 100644 --- a/common/record.js +++ b/common/record.js @@ -19,6 +19,7 @@ export function createItemInfo(balance, pack) { } return item; } + export function createDetailInfo(data, pack) { data.scaned = true; // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus; diff --git a/common/style/pdabasic.css b/common/style/pdabasic.css index 96e132e0..78a0b6d2 100644 --- a/common/style/pdabasic.css +++ b/common/style/pdabasic.css @@ -725,6 +725,7 @@ page { .page-header .header_item { /* padding-left: 10rpx; */ padding: 5rpx 10rpx; + font-size:15px ; } .page-header .header_job_top { diff --git a/pages/putaway/record/putawayRecord.vue b/pages/putaway/record/putawayRecord.vue index 9064f814..ac335ec7 100644 --- a/pages/putaway/record/putawayRecord.vue +++ b/pages/putaway/record/putawayRecord.vue @@ -41,7 +41,8 @@