From 60e996ebd21349725e7b206967f2218016d05aa0 Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Sun, 23 Feb 2025 14:46:12 +0800 Subject: [PATCH] =?UTF-8?q?PDA=E7=89=A9=E6=96=99=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDA/PDA/pages/bind/bind.vue | 58 ++++++-- .../dist/dev/app-plus/app-service.js | 56 ++++++-- WCS.BLL/Services/Service/PDAMatBindService.cs | 23 ++- .../GetShelfInfoByLocationCodeRequest.cs | 5 + .../Controllers/PDAMatBindController.cs | 133 +++++++++++++++--- 5 files changed, 225 insertions(+), 50 deletions(-) diff --git a/PDA/PDA/pages/bind/bind.vue b/PDA/PDA/pages/bind/bind.vue index 6f9e1c4..3931fdb 100644 --- a/PDA/PDA/pages/bind/bind.vue +++ b/PDA/PDA/pages/bind/bind.vue @@ -102,8 +102,16 @@ - - + + + 点击选择送回区域: + + {{shelfAreaOptions[selectedShelfAreaIndex].locationAreaName}} + + + + @@ -156,6 +164,13 @@ matSpec: '', matQty: 100, //默认数量值 + // 货架区域选项 + shelfAreaOptions: [{ + id: 1, + locationAreaName: '请先获取工位码' + }], + selectedShelfAreaIndex: 0, // 选择的货架区域索引 + userName: '', //当前登录的用户名 } }, @@ -189,6 +204,10 @@ // originalString += String.fromCharCode(byteArray[i]); // } this.locationCode = encodedString; + this.getShelfInfoByLocationCode(); + + }, + getShelfInfoByLocationCode: function() { //调用接口获取当前工位信息 当前工位是否有货架 var serverIPAndPort = getServerIPAndPort(); uni.request({ @@ -196,6 +215,7 @@ method: 'POST', // 设置请求方式为 POST data: { "locationCode": this.locationCode, + "shelfCode": this.locationCode, "userName": this.userName, "deviceType": "PDA" }, @@ -208,6 +228,7 @@ //接口返回数据为200 表示获取成功! if (res.data.code == 200) { this.locationId = res.data.data.locationId; + this.locationCode = res.data.data.locationCode; this.shelfId = res.data.data.shelfId; this.shelfCode = res.data.data.shelfCode; @@ -216,9 +237,11 @@ this.isNeedScanLocationCode = false; this.isNeedCallShelfCode = true; this.placeholderText = '请呼叫货架'; - } - else - { + } else if (this.shelfId != null && this.shelfCode != null && this + .shelfCode.includes('运输中')) { + this.placeholderText = '请等待货架运输'; + + } else { this.isNeedScanLocationCode = false; this.isNeedCallShelfCode = false; this.placeholderText = '输入编码或名称'; @@ -234,7 +257,7 @@ uni.showToast({ title: '获取失败:' + res.data.message, icon: 'none', - duration: 3500 + duration: 3600 }); this.clear(); } @@ -263,7 +286,6 @@ console.log('请求完成', event); } }); - }, bindSelectedMat: function(item) { @@ -355,6 +377,8 @@ icon: 'none', duration: 1000 }); + + this.getShelfInfoByLocationCode(); return; } if (this.matCodeCondition == null || this.matCodeCondition == '') { @@ -370,7 +394,7 @@ this.$refs.proup.show(); } }, - + //物料绑定 callEmptyShelf: function() { this.userName = getConfig('userName', ''); @@ -397,7 +421,7 @@ icon: 'none', duration: 1500 }); - + } else { uni.showToast({ title: '呼叫失败:' + res.data.message, @@ -405,7 +429,7 @@ duration: 1500 }); } - + } else { uni.showToast({ title: '呼叫失败:服务器返回错误状态码' + res.statusCode, @@ -427,9 +451,9 @@ console.log('请求完成', event); } }); - + }, - + //清空当前界面所有内容 clear: function() { @@ -455,6 +479,16 @@