From 290e97ccdb1fe508c2e9b5704d9c170a12332588 Mon Sep 17 00:00:00 2001 From: niexiting <85552560@qq.com> Date: Fri, 2 Aug 2024 17:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A0=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AE=8C=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 16 +++++++ src/pages/fg/coms/comNoReceiptPopup.vue | 58 ++++++++++++------------- src/pages/fg/receiptNoPlan.vue | 24 ++++++---- 3 files changed, 58 insertions(+), 40 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index dec2045b..91e1ac68 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -568,6 +568,22 @@ export function getProductionlineItem(params) { }); } + +/** + * 查询生产线物料关系 + * @param {*} productionLineCode 生产线code + * + */ +export function getBomVersionByProductionline(productionline) { + return request({ + url: baseApi + "/wms/productionlineitem/getBomVersionByProductionline?productionline=" + productionline, + method: "get", + data: {}, + }); +} + + + /** * 通过物料查询包装规格 * @param {*} itemCode diff --git a/src/pages/fg/coms/comNoReceiptPopup.vue b/src/pages/fg/coms/comNoReceiptPopup.vue index 474bcb79..ca20e37e 100644 --- a/src/pages/fg/coms/comNoReceiptPopup.vue +++ b/src/pages/fg/coms/comNoReceiptPopup.vue @@ -13,14 +13,13 @@ - 生产线: {{productionLineName}} - + {{itemCode}} - + + Bom版本{{bomVersion}} + + res.value == this.productionLineCode) var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode) this.fgLocationCode = fgLocation[0].fgLocationCode; + this.workshop = parent[0].workshop; + this.clearItemCode() this.clearPackUnit() @@ -363,20 +373,10 @@ title: "加载中", mask: true }) - let param = { - pageSize: 20, - pageNo: 1, - productionLineCode: this.productionLineCode - }; - - getProductionlineItem(param).then(res => { + getBomVersionByProductionline(this.productionLineCode).then(res => { uni.hideLoading() - if (res.data.list && res.data.list.length > 0) { - res.data.list.forEach(item => { - item.label = item.itemCode - item.value = item - }) - this.itemCodeList = res.data.list + if (res.data && res.data.length > 0) { + this.itemCodeList = res.data this.showItemCodeSelect = true } else { this.showErrorMessage('未查找到物料信息'); @@ -387,9 +387,10 @@ }) }, confirmSelectItem(data) { - let itemInfo = data[0].value; - this.itemCode = itemInfo.itemCode; - this.uom = itemInfo.uom + this.itemCode = data[0].label; + this.bomVersion = data[1].value; + this.uom=data[0].uom; + // this.uom = itemInfo.uom //清除其他数据 this.clearPackUnit(); @@ -470,11 +471,6 @@ return item.label } }, - - - - - } } diff --git a/src/pages/fg/receiptNoPlan.vue b/src/pages/fg/receiptNoPlan.vue index c2ab1f73..f75792f4 100644 --- a/src/pages/fg/receiptNoPlan.vue +++ b/src/pages/fg/receiptNoPlan.vue @@ -9,9 +9,9 @@ 完工库位 - {{dataContent.fgLocationCode}} + {{dataContent.fgLocationCode}} - + 计划数 @@ -34,8 +34,8 @@ {{dataContent.handleQty}}/ - - {{dataContent.packQtyHint}} + + {{dataContent.packQtyHint}} @@ -47,7 +47,7 @@ + style="margin-left: 30rpx; margin-top: 10rpx; margin-bottom: 10rpx;">