From 7e7cef43c261fb3dd0ecd7b126ca3c9949eedddb Mon Sep 17 00:00:00 2001 From: zhang_li Date: Fri, 11 Apr 2025 10:50:10 +0800 Subject: [PATCH] =?UTF-8?q?YT-2355PDA=E3=80=8A=E7=9B=B4=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E6=96=99=E3=80=8B=E6=94=B9=E4=B8=BA=E6=89=AB=E6=8F=8F=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=BA=93=E4=BD=8D=EF=BC=8C=E6=89=AB=E6=8F=8F=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=BA=93=E4=BD=8D=E5=90=8E=EF=BC=8C=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=9B=AE=E6=A0=87=E5=BA=93=E4=BD=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=88=B0=E3=80=8A=E5=B7=A5=E4=BD=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=8B=E4=B8=AD=E6=9F=A5=E6=89=BE=E8=BF=99=E4=B8=AA=E5=BA=93?= =?UTF-8?q?=E4=BD=8D=E4=BD=9C=E4=B8=BA=E5=8E=9F=E6=96=99=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E7=9A=84=E7=94=9F=E4=BA=A7=E7=BA=BF=E3=80=82=20=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC1.0.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/request2.js | 11 ++- src/manifest.json | 4 +- src/pages/issue/record/directIssueByBatch.vue | 82 ++++++++++++++----- 3 files changed, 75 insertions(+), 22 deletions(-) diff --git a/src/api/request2.js b/src/api/request2.js index 80e5a146..4fae264d 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -4982,5 +4982,14 @@ export function printPurchaseLabel(requestNumber) { method: "get", }); } - +/** + * 根据库位获取工位管理信息 + */ +export async function workstationByLocation(data) { + return await request({ + url: baseApi + `/wms/workstation/senior`, + method: "post", + data: data, + }); +} diff --git a/src/manifest.json b/src/manifest.json index 9e1bf46a..c26acdb9 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -3,8 +3,8 @@ "package" : "com.yingtai.pda", "appid" : "__UNI__F36DDCF", "description" : "", - "versionName" : "1.0.8", - "versionCode" : 8, + "versionName" : "1.0.9", + "versionCode" : 9, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/pages/issue/record/directIssueByBatch.vue b/src/pages/issue/record/directIssueByBatch.vue index 4be17a26..9315e08a 100644 --- a/src/pages/issue/record/directIssueByBatch.vue +++ b/src/pages/issue/record/directIssueByBatch.vue @@ -23,15 +23,19 @@ - - 生产线: - - - {{positionInfo}} + + + + + 生  产  线 + + + {{positionInfo}} + + - - @@ -58,7 +62,8 @@ issueRecordSubmit, getWorkShopLineStation, getBalanceByFilter, - issueCheck + issueCheck, + workstationByLocation } from '@/api/request2.js'; import { @@ -139,11 +144,12 @@ businessTypeCode: "Issue", positionList: [], show: false, - positionInfo: "请选择生产线", + positionInfo: "", resultData: {}, itemCode: "", managementType: '', - fifoSwitch: false + fifoSwitch: false, + toLocationCode:'', }; }, onLoad(option) { @@ -191,6 +197,7 @@ this.businessType = res.businessType; this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); this.fromLocationAreaTypeList = res.fromLocationAreaTypeList + this.toLocationAreaTypeList = res?.toLocationAreaTypeList; this.showFromLocationPopup(); } else { this.showErrorMessage(res.message) @@ -416,15 +423,47 @@ } }, - // scanLocationCode(location, code) { - // this.toLocationCode = code - // this.toLocationCode = location; - - // }, + async scanLocationCode(location, code) { + const params = { + pageNo: 1, + pageSize: 100, + filters:[{action: "==", + column: "rawLocationCode", + value:code, + }] + } + // 查询目标库位对应的产线并赋值 + const res = await workstationByLocation(params) + if(res.code == 0){ + if(res.data&&res.data.list&&res.data.list.length>0){ + this.positionInfo = res.data.list[0].productionLineCode + this.workStationCode = res.data.list[0].workshopCode + }else{ + this.showErrorMessage("未查询到库位对应的生产线,请重新扫描。") + this.positionInfo = '' + this.workStationCode = '' + return + } + }else{ + this.positionInfo = '' + this.workStationCode = '' + this.showErrorMessage(res.mag) + return + } + this.toLocationCode = code + this.detailSource.forEach(item => { + item.subList.forEach(detail => { + detail.toLocationCode = code + detail.productionLineCode = this.positionInfo + detail.workStationCode = this.workStationCode + }) + }) + + }, commit() { - if (this.positionInfo == '请选择生产线' || !this.positionInfo) { - this.showErrorMessage("请选择生产线") + if (!this.toLocationCode) { + this.showErrorMessage("请选择目标库位") return } var commitHint = "" @@ -502,6 +541,9 @@ submitItem.fromLocationCode = detail.locationCode; submitItem.toLocationCode = detail.toLocationCode; + submitItem.productionLineCode = detail.productionLineCode; + submitItem.workStationCode = detail.workStationCode + // detail.toInventoryStatus = detail.inventoryStatus // detail.toLocationCode = detail.toLocationCode @@ -517,6 +559,8 @@ toBatch: info.batch, fromLocationCode: detail.locationCode, toLocationCode: detail.toLocationCode, + productionLineCode : detail.productionLineCode, + workStationCode : detail.workshopCode, handleQty: detail.handleQty, fromPackUnit: detail.packUnit, toPackUnit: detail.packUnit, @@ -592,7 +636,7 @@ this.fromWarehouseCode = ''; this.toWarehouseCode = ''; this.detailSource = []; - this.positionInfo = "请选择生产线"; + this.positionInfo = ""; this.itemCode = "" } }