From f3d825333cc0827eb3f784cdf8e56ff93053df21 Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Thu, 13 Feb 2025 10:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=91=E5=AE=9A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDA/PDA/components/Card.vue | 10 +- PDA/PDA/components/StocktakingCard.vue | 2 +- PDA/PDA/pages/main/main.vue | 28 +++++ PDA/PDA/pages/queryBindList/queryBindList.vue | 89 ++++++++------ PDA/PDA/static/shelfLocation.png | Bin 0 -> 5838 bytes .../dist/dev/app-plus/app-service.js | 115 ++++++++++++------ 6 files changed, 162 insertions(+), 82 deletions(-) create mode 100644 PDA/PDA/static/shelfLocation.png diff --git a/PDA/PDA/components/Card.vue b/PDA/PDA/components/Card.vue index 6716565..5c1a550 100644 --- a/PDA/PDA/components/Card.vue +++ b/PDA/PDA/components/Card.vue @@ -16,17 +16,13 @@ 数量: {{item.matQty}} - - 盘点数量: - {{item.stocktakingQty}} - - + 库位: {{item.locationCode}} - - 货架编码: + + 货架: {{item.shelfCode}} diff --git a/PDA/PDA/components/StocktakingCard.vue b/PDA/PDA/components/StocktakingCard.vue index 41e8fb1..51d73e5 100644 --- a/PDA/PDA/components/StocktakingCard.vue +++ b/PDA/PDA/components/StocktakingCard.vue @@ -27,7 +27,7 @@ {{item.locationCode}} - 货架编码: + 货架: {{item.shelfCode}} diff --git a/PDA/PDA/pages/main/main.vue b/PDA/PDA/pages/main/main.vue index ce7aed2..7789221 100644 --- a/PDA/PDA/pages/main/main.vue +++ b/PDA/PDA/pages/main/main.vue @@ -62,6 +62,34 @@ + + + + + + + + + 货架位置 + + + + + + + + + + + diff --git a/PDA/PDA/pages/queryBindList/queryBindList.vue b/PDA/PDA/pages/queryBindList/queryBindList.vue index 0cfc214..8a9d457 100644 --- a/PDA/PDA/pages/queryBindList/queryBindList.vue +++ b/PDA/PDA/pages/queryBindList/queryBindList.vue @@ -69,7 +69,8 @@ - + @@ -108,6 +109,9 @@ nextTick } from 'vue'; import uniPopup from '@/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup'; + import { + getCurrentInstance + } from 'vue'; export default { components: { @@ -115,6 +119,9 @@ Card }, setup() { + const { + proxy + } = getCurrentInstance(); // 不能修改的信息 const fixedInfo = { infoId: 0, @@ -136,9 +143,6 @@ inputValue.value = info.matQty; popup.value.open(); - // nextTick(() => { - // inputRef.value.focus(); - // }); }; const hidePopup = () => { @@ -175,7 +179,8 @@ //调用接口进行数量的修改 uni.request({ - url: 'http://' + serverIPAndPort +'/matDetailCurrenInfo/updateMatDetailCurrentInfoById', // 请求的接口地址 + url: 'http://' + serverIPAndPort + + '/matDetailCurrenInfo/updateMatDetailCurrentInfoById', // 请求的接口地址 method: 'POST', // 设置请求方式为 POST data: { "matQty": inputValue.value, @@ -191,13 +196,14 @@ if (res.statusCode === 200) { //接口返回数据为200 表示获取成功! if (res.data.code == 200) { - + hidePopup(); uni.showToast({ title: '修改成功!', icon: 'none', - duration: 1200 + duration: 2000 }); - hidePopup(); + + proxy.queryMatList(); } else { uni.showToast({ title: '修改失败:' + res.data.message, @@ -257,6 +263,11 @@ placeholderText: '请先扫描货架码', matCodeCondition: '', //物料编码搜索条件 cardData: null, + + //监控滑动的位置 + touchStartX: 0, + touchStartY: 0, + isMove: false, //滑动标识 是否滑动 } }, onShow: function() { @@ -274,21 +285,21 @@ analysisScanCode: function(encodedString) { // 去除末尾的逗号和"..."(如果有的话) encodedString = encodedString.replace(/,\s*\.\.\.$/, ''); - // 分割字符串并转换为字节数组 - let byteStrings = encodedString.split(','); - let byteArray = []; - for (let byteString of byteStrings) { - byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数 - } - // 将字节数组转换为UTF-8字符串 - // 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳 - let originalString = ''; - for (let i = 0; i < byteArray.length; i++) { - // 对于每个字节,使用fromCharCode转换为对应的字符 - // 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符 - originalString += String.fromCharCode(byteArray[i]); - } - this.shelfCode = originalString; + // // 分割字符串并转换为字节数组 + // let byteStrings = encodedString.split(','); + // let byteArray = []; + // for (let byteString of byteStrings) { + // byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数 + // } + // // 将字节数组转换为UTF-8字符串 + // // 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳 + // let originalString = ''; + // for (let i = 0; i < byteArray.length; i++) { + // // 对于每个字节,使用fromCharCode转换为对应的字符 + // // 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符 + // originalString += String.fromCharCode(byteArray[i]); + // } + this.shelfCode = encodedString; //调用接口获取当前工位信息 当前工位是否有货架 var serverIPAndPort = getServerIPAndPort(); uni.request({ @@ -301,7 +312,7 @@ "userName": this.userName, "deviceType": "PDA", "pageNumber": 1, - "pageSize": 100 + "pageSize": 300, }, header: { 'Content-Type': 'application/json', // 如果需要以JSON格式发送数据 @@ -375,8 +386,6 @@ }); return; } - - var serverIPAndPort = getServerIPAndPort(); uni.request({ url: 'http://' + serverIPAndPort + @@ -388,7 +397,7 @@ "userName": this.userName, "deviceType": "PDA", "pageNumber": 1, - "pageSize": 100 + "pageSize": 300 }, header: { 'Content-Type': 'application/json', // 如果需要以JSON格式发送数据 @@ -459,18 +468,24 @@ this.cardData = null; this.recordCount = 0; }, - + //解决长按和滑动冲突的问题 + cardTouchStart(e) { + this.isMove = false; + this.touchStartX = e.touches[0].clientX; + this.touchStartY = e.touches[0].clientY; + }, + cardTouchMove(e) { + var deltaX = e.changedTouches[0].clientX - this.touchStartX; + var deltaY = e.changedTouches[0].clientY - this.touchStartY; + if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) { + this.isMove = true; + } + }, //长按 longpress(item) { - // uni.showToast({ - // title: '您长按了' + item.matCode, - // icon: 'none', - // duration: 1500 - // }); - - this.showPopup(item); - //this.$refs.popup.open(); - + if (this.isMove == false) { + this.showPopup(item); + } }, } } diff --git a/PDA/PDA/static/shelfLocation.png b/PDA/PDA/static/shelfLocation.png new file mode 100644 index 0000000000000000000000000000000000000000..b9e0e7787b8a5c09bb8e46c0fd22eae21de328b2 GIT binary patch literal 5838 zcmV;<7BT6GP)Py0h)G02RCr$PT}^h}I1UEoI>1b3_NiVt@69QkoW$|c&LJEhqLZcVlcaKrc`sR{ zvQIm609%}{F0{DOrAS5Zsf9w+Y$LIg9SFl=_CA_U}R_NDS ztF`&30$u$tK>gqKpWg2O1*-bDQuY6*O8BY@wf%K{zF}W@z5%E#1HTe5U?|Gf`^wA} zTqxLq!tZVNK+>SL20R8he|>oKz;c@fUo->6QTYZCXXV*jZ6bium&cL7@#3WEdJ76R z1*pdyWk>=%nv?-TkYN)g_#*^iaYs`!SX?ET0fLa=o<1qKMNAViRBu76$D)8ujx6>n z$pEpC)vG_hfBZX}jt~?>o6}pR;V$Pa)5^~P8IV!j(PCQh^@uvEJbgI-XggzR<1#=x z8eax5x@Mk%G6eh#kd|c9qf%IZpQ%?@Vi_O+V4{Z7t9#xv3#_ruI9}<85?=29cm1FJ zf#r;=nf2C-2FNn$l&!sG+GQlQSb+Td^Y^!Tgk_X7E&)@DrtE&Cn&tH7TaR7?XZsYjmK+%8F0Qu*q?_c~SvGE_G zu>d9Uyd+tG_yb4$!038T@6;<{kR%BZZ{SE+@dh+rfs&}Kk^_hza4f4*Qx`EzJAeDR zcmiWj5F|+f#0xkQRI-h!dy6KC$uAjzxL2$6wovM7=}+6acNwHr-AV!=uIC))^!xYC z`8yj=yM!@SG|^{Y=#(oRXA?a@Tu;a|IQk*)10*RlIYteTT8XP4WUsFD!_)PfEAsrr zCsy)>vs?N>tKL4{y!j($F+~j!r=&cwWRlAWos;*-olv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PDA/PDA/unpackage/dist/dev/app-plus/app-service.js +++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js @@ -381,6 +381,7 @@ if (uni.restoreGlobal) { const _imports_4 = "/static/callOut.png"; const _imports_5 = "/static/stockTaking.png"; const _imports_6 = "/static/task.png"; + const _imports_7 = "/static/shelfLocation.png"; const _sfc_main$a = { data() { return {}; @@ -520,6 +521,42 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { class: "function-text" }, "任务管理") ]), vue.createElementVNode("view", { style: { "flex": "1" } }) + ]), + vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "row", "margin-bottom": "10rpx", "margin-top": "30rpx" } }, [ + vue.createElementVNode("view", { style: { "flex": "1" } }), + vue.createElementVNode("view", { + class: "uni-flex uni-column", + style: { "flex": "5" } + }, [ + vue.createElementVNode("navigator", { + url: "../bind/bind", + "hover-class": "navigator-hover" + }, [ + vue.createElementVNode("view", { + class: "uni-flex uni-row", + style: { "-webkit-justify-content": "center", "justify-content": "center" } + }, [ + vue.createElementVNode("image", { + class: "function-image", + src: _imports_7 + }) + ]), + vue.createElementVNode("view", { class: "function-text" }, "货架位置") + ]) + ]), + vue.createElementVNode("view", { + class: "uni-flex uni-column", + style: { "flex": "5" } + }, [ + vue.createCommentVNode(' \r\n \r\n \r\n \r\n 库存盘点\r\n ') + ]), + vue.createElementVNode("view", { + class: "uni-flex uni-column", + style: { "flex": "5" } + }, [ + vue.createCommentVNode(' \r\n \r\n \r\n 任务管理 ') + ]), + vue.createElementVNode("view", { style: { "flex": "1" } }) ]) ]); } @@ -1877,23 +1914,10 @@ if (uni.restoreGlobal) { /* TEXT */ ) ]), - vue.createElementVNode("view", { - class: "content-item", - style: { "font-weight": "600" } - }, [ - vue.createElementVNode("text", null, "盘点数量:"), - vue.createElementVNode( - "text", - null, - vue.toDisplayString($props.item.stocktakingQty), - 1 - /* TEXT */ - ) - ]), vue.createElementVNode("view", { class: "content-combined" }, [ vue.createElementVNode("view", { class: "content-item", - style: { "font-weight": "600", "color": "firebrick" } + style: { "font-weight": "400", "color": "firebrick" } }, [ vue.createElementVNode("text", null, "库位:"), vue.createElementVNode( @@ -1906,9 +1930,9 @@ if (uni.restoreGlobal) { ]), vue.createElementVNode("view", { class: "content-item", - style: { "font-weight": "600", "color": "firebrick" } + style: { "font-weight": "400", "color": "firebrick" } }, [ - vue.createElementVNode("text", null, "货架编码:"), + vue.createElementVNode("text", null, "货架:"), vue.createElementVNode( "text", null, @@ -2367,6 +2391,9 @@ if (uni.restoreGlobal) { Card }, setup() { + const { + proxy + } = vue.getCurrentInstance(); const fixedInfo = { infoId: 0, matCode: "示例名称", @@ -2433,12 +2460,13 @@ if (uni.restoreGlobal) { success: (res) => { if (res.statusCode === 200) { if (res.data.code == 200) { + hidePopup(); uni.showToast({ title: "修改成功!", icon: "none", - duration: 1200 + duration: 2e3 }); - hidePopup(); + proxy.queryMatList(); } else { uni.showToast({ title: "修改失败:" + res.data.message, @@ -2487,32 +2515,28 @@ if (uni.restoreGlobal) { placeholderText: "请先扫描货架码", matCodeCondition: "", //物料编码搜索条件 - cardData: null + cardData: null, + //监控滑动的位置 + touchStartX: 0, + touchStartY: 0, + isMove: false + //滑动标识 是否滑动 }; }, onShow: function() { this.userName = getConfig("userName", "admin"); const self = this; recive(function(res) { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:267", "Success:" + res.data); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:278", "Success:" + res.data); self.analysisScanCode(res.data); }, function(err) { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:270", "Error:", JSON.stringify(err)); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:281", "Error:", JSON.stringify(err)); }); }, methods: { analysisScanCode: function(encodedString) { encodedString = encodedString.replace(/,\s*\.\.\.$/, ""); - let byteStrings = encodedString.split(","); - let byteArray = []; - for (let byteString of byteStrings) { - byteArray.push(parseInt(byteString, 10)); - } - let originalString = ""; - for (let i = 0; i < byteArray.length; i++) { - originalString += String.fromCharCode(byteArray[i]); - } - this.shelfCode = originalString; + this.shelfCode = encodedString; var serverIPAndPort = getServerIPAndPort(); uni.request({ url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos", @@ -2525,7 +2549,7 @@ if (uni.restoreGlobal) { "userName": this.userName, "deviceType": "PDA", "pageNumber": 1, - "pageSize": 100 + "pageSize": 300 }, header: { "Content-Type": "application/json" @@ -2575,7 +2599,7 @@ if (uni.restoreGlobal) { this.clear(); }, complete: (event) => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:362", "请求完成", event); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:373", "请求完成", event); } }); }, @@ -2600,7 +2624,7 @@ if (uni.restoreGlobal) { "userName": this.userName, "deviceType": "PDA", "pageNumber": 1, - "pageSize": 100 + "pageSize": 300 }, header: { "Content-Type": "application/json" @@ -2650,7 +2674,7 @@ if (uni.restoreGlobal) { this.clear(); }, complete: (event) => { - formatAppLog("log", "at pages/queryBindList/queryBindList.vue:449", "请求完成", event); + formatAppLog("log", "at pages/queryBindList/queryBindList.vue:458", "请求完成", event); } }); }, @@ -2660,9 +2684,24 @@ if (uni.restoreGlobal) { this.cardData = null; this.recordCount = 0; }, + //解决长按和滑动冲突的问题 + cardTouchStart(e) { + this.isMove = false; + this.touchStartX = e.touches[0].clientX; + this.touchStartY = e.touches[0].clientY; + }, + cardTouchMove(e) { + var deltaX = e.changedTouches[0].clientX - this.touchStartX; + var deltaY = e.changedTouches[0].clientY - this.touchStartY; + if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) { + this.isMove = true; + } + }, //长按 longpress(item) { - this.showPopup(item); + if (this.isMove == false) { + this.showPopup(item); + } } } }; @@ -2829,6 +2868,8 @@ if (uni.restoreGlobal) { vue.renderList($data.cardData, (item, index) => { return vue.openBlock(), vue.createElementBlock("view", { key: index, + onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)), + onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)), onLongpress: ($event) => $options.longpress(item) }, [ vue.createVNode(_component_Card, { @@ -2946,7 +2987,7 @@ if (uni.restoreGlobal) { class: "content-item", style: { "font-weight": "600", "color": "firebrick" } }, [ - vue.createElementVNode("text", null, "货架编码:"), + vue.createElementVNode("text", null, "货架:"), vue.createElementVNode( "text", null,