From 6d9386a0795e4369848e6f1addf5e1e7e1b852a3 Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Thu, 27 Feb 2025 18:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDA/PDA/pages/bind/bind.vue | 6 +- PDA/PDA/pages/bindSelectMat/bindSelectMat.vue | 72 +++++++++------ .../dist/dev/app-plus/app-service.js | 87 ++++++++++++------- .../unpackage/dist/dev/app-plus/manifest.json | 4 +- 4 files changed, 109 insertions(+), 60 deletions(-) diff --git a/PDA/PDA/pages/bind/bind.vue b/PDA/PDA/pages/bind/bind.vue index 61ebb98..8309567 100644 --- a/PDA/PDA/pages/bind/bind.vue +++ b/PDA/PDA/pages/bind/bind.vue @@ -1,6 +1,6 @@ @@ -435,6 +436,7 @@ } else { this.clearMatInfo(); saveConfig('matCodeCondition', this.matCodeCondition); + this.$refs.proup.show(); } }, diff --git a/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue b/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue index 476291f..ced74f9 100644 --- a/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue +++ b/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue @@ -1,17 +1,17 @@ @@ -35,14 +35,19 @@ matCodeCondition: '', userName: '', matBaseInfoList: [], // 用于存储物料数据的数组 + scrollTop: 0, + showScrollbar: true }; }, methods: { show() { this.visible = true; this.matCodeCondition = getConfig('matCodeCondition', ''); + console.log('scroll - view height:', this.matCodeCondition); + this.userName = getConfig('userName', ''); var serverIPAndPort = getServerIPAndPort(); + //获取列表 uni.request({ url: 'http://' + serverIPAndPort + '/matBaseInfo/getMatBaseInfo', // 请求的接口地址 @@ -67,24 +72,25 @@ if (res.data.code == 200) { if (res.data.data.lists != null && res.data.data.lists.length > 0) { this.matBaseInfoList = res.data.data.lists; + console.log('matBaseInfoList:', this.matBaseInfoList); } else { this.visible = false; + this.matBaseInfoList = null; uni.showToast({ title: '根据查询条件未查询到物料!', icon: 'none', - duration: 1500 + duration: 2000 }); } - } else { this.visible = false; + this.matBaseInfoList = null; uni.showToast({ title: '查询物料失败:' + res.data.message, icon: 'none', - duration: 1500 + duration: 2000 }); } - } else { uni.showToast({ title: '查询物料失败:服务器返回错误状态码' + res.statusCode, @@ -106,7 +112,6 @@ console.log('请求完成', event); } }); - }, handleClose() { this.visible = false; @@ -114,7 +119,19 @@ }, onItemClick(item) { this.visible = false; - this.$emit('selected',item); + this.$emit('selected', item); + }, + upper() { + console.log('scrolltoupper'); + }, + lower() { + console.log('scrolltolower'); + }, + scroll() { + console.log('scroll'); + }, + end() { + console.log('scrollend'); } } }; @@ -122,14 +139,16 @@ \ No newline at end of file diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js index a888115..b16d13f 100644 --- a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js +++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js @@ -581,14 +581,17 @@ if (uni.restoreGlobal) { visible: false, matCodeCondition: "", userName: "", - matBaseInfoList: [] + matBaseInfoList: [], // 用于存储物料数据的数组 + scrollTop: 0, + showScrollbar: true }; }, methods: { show() { this.visible = true; this.matCodeCondition = getConfig("matCodeCondition", ""); + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:46", "scroll - view height:", this.matCodeCondition); this.userName = getConfig("userName", ""); var serverIPAndPort = getServerIPAndPort(); uni.request({ @@ -615,20 +618,23 @@ if (uni.restoreGlobal) { if (res.data.code == 200) { if (res.data.data.lists != null && res.data.data.lists.length > 0) { this.matBaseInfoList = res.data.data.lists; + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:75", "matBaseInfoList:", this.matBaseInfoList); } else { this.visible = false; + this.matBaseInfoList = null; uni.showToast({ title: "根据查询条件未查询到物料!", icon: "none", - duration: 1500 + duration: 2e3 }); } } else { this.visible = false; + this.matBaseInfoList = null; uni.showToast({ title: "查询物料失败:" + res.data.message, icon: "none", - duration: 1500 + duration: 2e3 }); } } else { @@ -647,7 +653,7 @@ if (uni.restoreGlobal) { }); }, complete: (event) => { - formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:106", "请求完成", event); + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:112", "请求完成", event); } }); }, @@ -658,6 +664,18 @@ if (uni.restoreGlobal) { onItemClick(item) { this.visible = false; this.$emit("selected", item); + }, + upper() { + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:125", "scrolltoupper"); + }, + lower() { + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:128", "scrolltolower"); + }, + scroll() { + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:131", "scroll"); + }, + end() { + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:134", "scrollend"); } } }; @@ -668,10 +686,16 @@ if (uni.restoreGlobal) { }, [ vue.createElementVNode("view", { class: "popup-content" }, [ vue.createElementVNode("scroll-view", { - class: "scroll-view", - "scroll-y": "true" + "scroll-top": $data.scrollTop, + direction: "vertical", + class: "scroll-Y", + "scroll-with-animation": "true", + onScrolltoupper: _cache[0] || (_cache[0] = (...args) => $options.upper && $options.upper(...args)), + onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.lower && $options.lower(...args)), + onScroll: _cache[2] || (_cache[2] = (...args) => $options.scroll && $options.scroll(...args)), + onScrollend: _cache[3] || (_cache[3] = (...args) => $options.end && $options.end(...args)), + "show-scrollbar": $data.showScrollbar }, [ - vue.createCommentVNode(' \r\n '), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, @@ -680,15 +704,16 @@ if (uni.restoreGlobal) { key: index, class: "list-item", onClick: ($event) => $options.onItemClick(item) - }, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName) + " - " + vue.toDisplayString(item.matSpec), 9, ["onClick"]); + }, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName), 9, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) - ]), + ], 40, ["scroll-top", "show-scrollbar"]), vue.createElementVNode("button", { - onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args)) - }, "关闭") + style: { "background-color": "darkred", "color": "white" }, + onClick: _cache[4] || (_cache[4] = (...args) => $options.handleClose && $options.handleClose(...args)) + }, "关    闭") ]) ])) : vue.createCommentVNode("v-if", true); } @@ -738,10 +763,10 @@ if (uni.restoreGlobal) { this.userName = getConfig("userName", "admin"); const self = this; recive(function(res) { - formatAppLog("log", "at pages/bind/bind.vue:210", "Success:" + res.data); + formatAppLog("log", "at pages/bind/bind.vue:211", "Success:" + res.data); self.analysisScanCode(res.data); }, function(err) { - formatAppLog("log", "at pages/bind/bind.vue:213", "Error:", JSON.stringify(err)); + formatAppLog("log", "at pages/bind/bind.vue:214", "Error:", JSON.stringify(err)); }); }, methods: { @@ -749,11 +774,11 @@ if (uni.restoreGlobal) { cameraScanCode() { uni.scanCode({ success: (res) => { - formatAppLog("log", "at pages/bind/bind.vue:221", "扫码结果:", res.result); + formatAppLog("log", "at pages/bind/bind.vue:222", "扫码结果:", res.result); this.analysisScanCode(res.result); }, fail: (err) => { - formatAppLog("error", "at pages/bind/bind.vue:225", "扫码失败:", err); + formatAppLog("error", "at pages/bind/bind.vue:226", "扫码失败:", err); } }); }, @@ -845,12 +870,12 @@ if (uni.restoreGlobal) { } }, complete: (event) => { - formatAppLog("log", "at pages/bind/bind.vue:329", "请求完成", event); + formatAppLog("log", "at pages/bind/bind.vue:330", "请求完成", event); } }); }, bindSelectedMat: function(item) { - formatAppLog("log", "at pages/bind/bind.vue:335", "用户选择了项目:", item); + formatAppLog("log", "at pages/bind/bind.vue:336", "用户选择了项目:", item); this.matCode = item.matCode; this.matName = item.matName; this.matSpec = item.matSpec; @@ -914,7 +939,7 @@ if (uni.restoreGlobal) { }); }, complete: (event) => { - formatAppLog("log", "at pages/bind/bind.vue:403", "请求完成", event); + formatAppLog("log", "at pages/bind/bind.vue:404", "请求完成", event); } }); }, @@ -1019,7 +1044,7 @@ if (uni.restoreGlobal) { }); }, complete: (event) => { - formatAppLog("log", "at pages/bind/bind.vue:516", "请求完成", event); + formatAppLog("log", "at pages/bind/bind.vue:518", "请求完成", event); } }); }, @@ -1110,7 +1135,7 @@ if (uni.restoreGlobal) { }); }, complete: (event) => { - formatAppLog("log", "at pages/bind/bind.vue:618", "请求完成", event); + formatAppLog("log", "at pages/bind/bind.vue:620", "请求完成", event); } }); }, @@ -1136,7 +1161,7 @@ if (uni.restoreGlobal) { this.matSpec = ""; }, handlePopupClose() { - formatAppLog("log", "at pages/bind/bind.vue:648", "弹出层已关闭"); + formatAppLog("log", "at pages/bind/bind.vue:650", "弹出层已关闭"); } } }; @@ -1144,6 +1169,7 @@ if (uni.restoreGlobal) { const _component_bindSelectMat = vue.resolveComponent("bindSelectMat"); return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [ vue.createVNode(_component_bindSelectMat, { + type: "dialog", ref: "proup", onClose: $options.handlePopupClose, onSelected: $options.bindSelectedMat @@ -1173,16 +1199,15 @@ if (uni.restoreGlobal) { class: "uni-input", style: { "font-size": "50rpx", "padding": "10rpx" }, placeholder: $data.placeholderText, - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event), - onBlur: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args)) - }, null, 40, ["placeholder"]), [ + "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event) + }, null, 8, ["placeholder"]), [ [vue.vModelText, $data.matCodeCondition] ]) ]), vue.createElementVNode("view", { style: { "flex": "3" } }), vue.createElementVNode("view", { style: { "flex": "30" } }, [ vue.createElementVNode("button", { - onClick: _cache[3] || (_cache[3] = (...args) => $options.queryMatList && $options.queryMatList(...args)) + onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args)) }, "查询") ]) ]) @@ -1207,7 +1232,7 @@ if (uni.restoreGlobal) { }, [ vue.createElementVNode("picker", { range: $data.shelfTypeOptions, - onChange: _cache[4] || (_cache[4] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)), + onChange: _cache[3] || (_cache[3] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)), "range-key": "shelfTypeName", value: $data.selectedShelfTypeIndex, style: { "font-size": "35rpx" } @@ -1230,7 +1255,7 @@ if (uni.restoreGlobal) { class: "mini-btn", type: "warn", size: "mini", - onClick: _cache[5] || (_cache[5] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args)) + onClick: _cache[4] || (_cache[4] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args)) }, "呼叫货架") ]) ]), @@ -1321,7 +1346,7 @@ if (uni.restoreGlobal) { class: "uni-input", style: { "font-size": "40rpx" }, placeholder: "请输入物料数量", - "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.matQty = $event) + "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matQty = $event) }, null, 512 @@ -1332,7 +1357,7 @@ if (uni.restoreGlobal) { ]), vue.createElementVNode("view", { style: { "flex": "40" } }, [ vue.createElementVNode("button", { - onClick: _cache[7] || (_cache[7] = (...args) => $options.bind && $options.bind(...args)), + onClick: _cache[6] || (_cache[6] = (...args) => $options.bind && $options.bind(...args)), class: "mini-btn", style: { "margin-left": "10rpx" }, type: "warn", @@ -1349,7 +1374,7 @@ if (uni.restoreGlobal) { range: $data.shelfAreaOptions, "range-key": "locationAreaName", value: $data.selectedShelfAreaIndex, - onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)), + onChange: _cache[7] || (_cache[7] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)), style: { "font-size": "35rpx" } }, [ vue.createElementVNode( @@ -1364,7 +1389,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("button", { style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" }, size: "mini", - onClick: _cache[9] || (_cache[9] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args)) + onClick: _cache[8] || (_cache[8] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args)) }, "送货架") ]) ]) diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/manifest.json b/PDA/PDA/unpackage/dist/dev/app-plus/manifest.json index 09563ec..648ccc7 100644 --- a/PDA/PDA/unpackage/dist/dev/app-plus/manifest.json +++ b/PDA/PDA/unpackage/dist/dev/app-plus/manifest.json @@ -94,7 +94,9 @@ "" ] }, - "apple": {}, + "apple": { + "dSYMs": false + }, "plugins": { "audio": { "mp3": {