From 11f14f6d3568c943fc5360ead95edc0fe4bd2db1 Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Thu, 16 Jan 2025 18:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=BB=91=E5=AE=9A=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3=E7=AD=89?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDA/PDA/config.js | 2 +- PDA/PDA/pages.json | 7 + PDA/PDA/pages/bind/bind.vue | 290 +++++++++- PDA/PDA/pages/bindSelectMat/bindSelectMat.vue | 153 ++++++ PDA/PDA/pages/index/index.vue | 23 - .../dist/dev/app-plus/app-config-service.js | 2 +- .../dist/dev/app-plus/app-service.js | 519 ++++++++++++++++-- .../dist/dev/app-plus/static/预约查看.png | Bin 5081 -> 0 bytes 货架标准上位机/Models/JsConfig.cs | 4 + 9 files changed, 906 insertions(+), 94 deletions(-) create mode 100644 PDA/PDA/pages/bindSelectMat/bindSelectMat.vue delete mode 100644 PDA/PDA/unpackage/dist/dev/app-plus/static/预约查看.png diff --git a/PDA/PDA/config.js b/PDA/PDA/config.js index 8c480df..9d3cef8 100644 --- a/PDA/PDA/config.js +++ b/PDA/PDA/config.js @@ -10,7 +10,7 @@ export function getConfig(key, defaultValue) { } export function getServerIPAndPort() { - var serverIP = getConfig('serverIP', '127.0.0.1'); + var serverIP = getConfig('serverIP', '192.168.139.36'); var serverPort = getConfig('serverPort', '8888'); return serverIP + ':' + serverPort; } \ No newline at end of file diff --git a/PDA/PDA/pages.json b/PDA/PDA/pages.json index 6448a6b..165c90f 100644 --- a/PDA/PDA/pages.json +++ b/PDA/PDA/pages.json @@ -26,6 +26,13 @@ { "navigationBarTitleText" : "智慧物流系统-物料绑定" } + }, + { + "path" : "pages/bindSelectMat/bindSelectMat", + "style" : + { + "navigationBarTitleText" : "" + } } ], "globalStyle": { diff --git a/PDA/PDA/pages/bind/bind.vue b/PDA/PDA/pages/bind/bind.vue index d825db9..33917a7 100644 --- a/PDA/PDA/pages/bind/bind.vue +++ b/PDA/PDA/pages/bind/bind.vue @@ -1,5 +1,7 @@ + + \ No newline at end of file diff --git a/PDA/PDA/pages/index/index.vue b/PDA/PDA/pages/index/index.vue index 2e009cf..f46374d 100644 --- a/PDA/PDA/pages/index/index.vue +++ b/PDA/PDA/pages/index/index.vue @@ -87,29 +87,6 @@ unregisterReceiver() }, methods: { - getEquipmentInfo(encodedString) { - // 去除末尾的逗号和"..."(如果有的话) - encodedString = encodedString.replace(/,\s*\.\.\.$/, ''); - console.log("1:" + encodedString); - // 分割字符串并转换为字节数组 - let byteStrings = encodedString.split(','); - let byteArray = []; - for (let byteString of byteStrings) { - byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数 - } - console.log("2:" + encodedString); - // 将字节数组转换为UTF-8字符串 - // 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳 - let originalString = ''; - for (let i = 0; i < byteArray.length; i++) { - // 对于每个字节,使用fromCharCode转换为对应的字符 - // 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符 - originalString += String.fromCharCode(byteArray[i]); - } - console.log("3:" + originalString); - this.title = originalString; - console.log("4:" + this.title); - }, login() { var serverIPAndPort = getServerIPAndPort(); console.log('http://' + serverIPAndPort + '/user/userLogin'); diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js b/PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js index eabb066..c0dd15b 100644 --- a/PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js +++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-config-service.js @@ -2,7 +2,7 @@ ;(function(){ let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[]; const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"智慧物流系统-移动端","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"PDA","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.36","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}}; - const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); + const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); __uniConfig.styles=[];//styles __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); 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 5446e28..ab82fed 100644 --- a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js +++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js @@ -40,6 +40,85 @@ if (uni.restoreGlobal) { } var main = null; var receiver = null; + function recive(success, fail) { + main = plus.android.runtimeMainActivity(); + receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", { + onReceive: function(context, intent) { + plus.android.importClass(intent); + var action = intent.getAction(); + var data; + switch (action) { + case "com.android.server.scannerservice.broadcast": + data = intent.getExtra("scannerdata"); + break; + case "android.intent.action.SCANRESULT": + data = intent.getExtra("value"); + break; + case "android.intent.ACTION_DECODE_DATA": + data = intent.getExtra("barcode_string"); + break; + case "com.android.provider.sdlmessage": + data = intent.getExtra("msg"); + break; + case "com.neusoft.action.scanner.read": + data = intent.getStringExtra("scanner_value"); + if (data == null) { + data = intent.getStringExtra("Scanner_value"); + } + break; + case "nlscan.action.SCANNER_RESULT": + data = intent.getExtra("SCAN_BARCODE1"); + break; + case "com.barcode.sendBroadcast": + data = intent.getExtra("BARCODE"); + break; + case "scan.rcv.message": + let barocode = intent.getByteArrayExtra("barocode"); + let barocodelen = intent.getIntExtra("length", 0); + data = new String(barocode, 0, barocodelen); + break; + case "xlyk.wz": + data = intent.getExtra("qrcode"); + break; + case "com.android.scanner.broadcast": + data = intent.getExtra("scandata"); + break; + case "com.honeywell.scan.broadcast": + data = intent.getExtra("data"); + break; + } + if (data) { + success({ + type: "barcode", + data: data.replace(/\n/, "").replace(/\t/, "").trim() + //处理结束符和换行符为空 + }); + } else { + fail({ + type: "barcode", + data: "未识别到扫码数据" + //处理结束符和换行符为空 + }); + } + } + }); + var IntentFilter = plus.android.importClass("android.content.IntentFilter"); + plus.android.importClass("android.content.Intent"); + var filter = new IntentFilter(); + filter.addAction("com.android.provider.sdlMessage"); + filter.addAction("com.neusoft.action.scanner.read"); + filter.addAction("nlscan.action.SCANNER_RESULT"); + filter.addAction("scan.rcv.message"); + filter.addAction("com.android.server.scannerservice.broadcast"); + filter.addAction("android.intent.action.SCANRESULT"); + filter.addAction("android.intent.ACTION_DECODE_DATA"); + filter.addAction("com.barcode.sendBroadcast"); + filter.addAction("xlyk.wz"); + filter.addAction("com.android.scanner.broadcast"); + filter.addAction("com.android.scanner.broadcast"); + filter.addAction("com.honeywell.scan.broadcast"); + main.registerReceiver(receiver, filter); + } function unregisterReceiver() { formatAppLog("log", "at src/libs/Broadcast.js:110", "取消监听广播"); main.unregisterReceiver(receiver); @@ -51,7 +130,7 @@ if (uni.restoreGlobal) { return uni.getStorageSync(key) || defaultValue; } function getServerIPAndPort() { - var serverIP = getConfig("serverIP", "127.0.0.1"); + var serverIP = getConfig("serverIP", "192.168.139.36"); var serverPort = getConfig("serverPort", "8888"); return serverIP + ":" + serverPort; } @@ -63,7 +142,7 @@ if (uni.restoreGlobal) { } return target; }; - const _sfc_main$4 = { + const _sfc_main$5 = { data() { return { title: "登录", @@ -84,26 +163,9 @@ if (uni.restoreGlobal) { unregisterReceiver(); }, methods: { - getEquipmentInfo(encodedString) { - encodedString = encodedString.replace(/,\s*\.\.\.$/, ""); - formatAppLog("log", "at pages/index/index.vue:93", "1:" + encodedString); - let byteStrings = encodedString.split(","); - let byteArray = []; - for (let byteString of byteStrings) { - byteArray.push(parseInt(byteString, 10)); - } - formatAppLog("log", "at pages/index/index.vue:100", "2:" + encodedString); - let originalString = ""; - for (let i = 0; i < byteArray.length; i++) { - originalString += String.fromCharCode(byteArray[i]); - } - formatAppLog("log", "at pages/index/index.vue:109", "3:" + originalString); - this.title = originalString; - formatAppLog("log", "at pages/index/index.vue:111", "4:" + this.title); - }, login() { var serverIPAndPort = getServerIPAndPort(); - formatAppLog("log", "at pages/index/index.vue:115", "http://" + serverIPAndPort + "/user/userLogin"); + formatAppLog("log", "at pages/index/index.vue:92", "http://" + serverIPAndPort + "/user/userLogin"); uni.request({ url: "http://" + serverIPAndPort + "/user/userLogin", // 请求的接口地址 @@ -150,13 +212,13 @@ if (uni.restoreGlobal) { }); }, complete: (event) => { - formatAppLog("log", "at pages/index/index.vue:167", "请求完成", event); + formatAppLog("log", "at pages/index/index.vue:144", "请求完成", event); } }); } } }; - function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [ vue.createElementVNode("navigator", { url: "../config/config", @@ -242,8 +304,8 @@ if (uni.restoreGlobal) { ]) ]); } - const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]); - const _sfc_main$3 = { + const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]); + const _sfc_main$4 = { data() { return { serverIP: "", @@ -265,7 +327,7 @@ if (uni.restoreGlobal) { } } }; - function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("label", null, "服务器IP:"), @@ -302,7 +364,7 @@ if (uni.restoreGlobal) { }, "保存配置") ]); } - const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]); + const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]); const _imports_0$1 = "/static/logOut.png"; const _imports_1 = "/static/bind.png"; const _imports_2 = "/static/bindQuery.png"; @@ -310,13 +372,13 @@ if (uni.restoreGlobal) { const _imports_4 = "/static/callOut.png"; const _imports_5 = "/static/stockTaking.png"; const _imports_6 = "/static/task.png"; - const _sfc_main$2 = { + const _sfc_main$3 = { data() { return {}; }, methods: {} }; - function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [ vue.createElementVNode("view", null, [ vue.createElementVNode("navigator", { @@ -442,30 +504,367 @@ if (uni.restoreGlobal) { ]) ]); } - const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]); - const _imports_0 = "/static/scan.png"; - const _sfc_main$1 = { + const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]); + const _sfc_main$2 = { data() { return { + visible: false, + matCodeCondition: "", + userName: "", + matBaseInfoList: [] + // 用于存储物料数据的数组 + }; + }, + methods: { + show() { + this.visible = true; + this.matCodeCondition = getConfig("matCodeCondition", ""); + this.userName = getConfig("userName", ""); + var serverIPAndPort = getServerIPAndPort(); + uni.request({ + url: "http://" + serverIPAndPort + "/matBaseInfo/getMatBaseInfo", + // 请求的接口地址 + method: "POST", + // 设置请求方式为 POST + data: { + "MatCode": this.matCodeCondition, + "MatName": "", + "MatSpec": "", + "IsEnable": null, + "PageNumber": 1, + "PageSize": 20, + "UserName": this.userName, + "DeviceType": "PDA" + }, + header: { + "Content-Type": "application/json" + // 如果需要以JSON格式发送数据 + }, + success: (res) => { + if (res.statusCode === 200) { + if (res.data.code == 200) { + if (res.data.data.lists != null && res.data.data.lists.length > 0) { + this.matBaseInfoList = res.data.data.lists; + } else { + this.visible = false; + uni.showToast({ + title: "根据查询条件未查询到物料!", + icon: "none", + duration: 1500 + }); + } + } else { + this.visible = false; + uni.showToast({ + title: "查询物料失败:" + res.data.message, + icon: "none", + duration: 1500 + }); + } + } else { + uni.showToast({ + title: "查询物料失败:服务器返回错误状态码" + res.statusCode, + icon: "none", + duration: 1500 + }); + } + }, + fail: (err) => { + uni.showToast({ + title: "查询物料失败:请求失败" + err, + icon: "none", + duration: 1500 + }); + }, + complete: (event) => { + formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:106", "请求完成", event); + } + }); + }, + handleClose() { + this.visible = false; + this.$emit("close"); + }, + onItemClick(item) { + this.visible = false; + this.$emit("selected", item); + } + } + }; + function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { + return $data.visible ? (vue.openBlock(), vue.createElementBlock("view", { + key: 0, + class: "popup-container" + }, [ + vue.createElementVNode("view", { class: "popup-content" }, [ + vue.createElementVNode("scroll-view", { + class: "scroll-view", + "scroll-y": "true" + }, [ + vue.createCommentVNode(' \r\n '), + (vue.openBlock(true), vue.createElementBlock( + vue.Fragment, + null, + vue.renderList($data.matBaseInfoList, (item, index) => { + return vue.openBlock(), vue.createElementBlock("view", { + key: index, + class: "list-item", + onClick: ($event) => $options.onItemClick(item) + }, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName) + " - " + vue.toDisplayString(item.matSpec), 9, ["onClick"]); + }), + 128 + /* KEYED_FRAGMENT */ + )) + ]), + vue.createElementVNode("button", { + onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args)) + }, "关闭") + ]) + ])) : vue.createCommentVNode("v-if", true); + } + const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]); + const _imports_0 = "/static/scan.png"; + const _sfc_main$1 = { + components: { + bindSelectMat: PagesBindSelectMatBindSelectMat + }, + data() { + return { + isNeedScanLocationCode: true, + isNeedCallShelfCode: true, + placeholderText: "请先扫描工位码", + matCodeCondition: "", + //物料编码搜索条件 + matBaseInfoId: null, matCode: "", + locationId: null, locationCode: "", + shelfId: null, shelfCode: "", matCode: "", matName: "", matSpec: "", - matQty: 100 + matQty: 100, + //默认数量值 + userName: "" + //当前登录的用户名 }; }, + onShow: function() { + this.userName = getConfig("userName", "admin"); + const self = this; + recive(function(res) { + formatAppLog("log", "at pages/bind/bind.vue:166", "Success:" + res.data); + self.analysisScanCode(res.data); + }, function(err) { + formatAppLog("log", "at pages/bind/bind.vue:169", "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.locationCode = originalString; + var serverIPAndPort = getServerIPAndPort(); + uni.request({ + url: "http://" + serverIPAndPort + "/pdaMatBind/getShelfInfoByLocationCode", + // 请求的接口地址 + method: "POST", + // 设置请求方式为 POST + data: { + "locationCode": this.locationCode, + "userName": this.userName, + "deviceType": "PDA" + }, + header: { + "Content-Type": "application/json" + // 如果需要以JSON格式发送数据 + }, + success: (res) => { + if (res.statusCode === 200) { + if (res.data.code == 200) { + this.locationId = res.data.data.locationId; + this.shelfId = res.data.data.shelfId; + this.shelfCode = res.data.data.shelfCode; + if (this.shelfId == null) { + this.shelfCode = "(工位无货架,请呼叫!)"; + this.isNeedScanLocationCode = false; + this.isNeedCallShelfCode = true; + this.placeholderText = "请呼叫货架"; + } else { + this.isNeedScanLocationCode = false; + this.isNeedCallShelfCode = false; + this.placeholderText = "输入编码或名称"; + } + uni.showToast({ + title: "获取成功!", + icon: "none", + duration: 1500 + }); + } else { + uni.showToast({ + title: "获取失败:" + res.data.message, + icon: "none", + duration: 3500 + }); + this.clear(); + } + } else { + uni.showToast({ + title: "服务器返回错误状态码" + res.statusCode, + icon: "none", + duration: 3e3 + }); + this.clear(); + } + }, + fail: (err) => { + uni.showToast({ + title: "请求失败" + err, + icon: "none", + duration: 3e3 + }); + this.clear(); + }, + complete: (event) => { + formatAppLog("log", "at pages/bind/bind.vue:260", "请求完成", event); + } + }); + }, + bindSelectedMat: function(item) { + formatAppLog("log", "at pages/bind/bind.vue:267", "用户选择了项目:", item); + this.matCode = item.matCode; + this.matName = item.matName; + this.matSpec = item.matSpec; + this.matBaseInfoId = item.id; + }, + //物料绑定 bind: function() { - formatAppLog("log", "at pages/bind/bind.vue:120", "123"); - document.getElementById("inputMatCode").scrollIntoView(true); - formatAppLog("log", "at pages/bind/bind.vue:122", "111"); + this.userName = getConfig("userName", ""); + var serverIPAndPort = getServerIPAndPort(); + uni.request({ + url: "http://" + serverIPAndPort + "/pdaMatBind/bindMatDetail", + // 请求的接口地址 + method: "POST", + // 设置请求方式为 POST + data: { + "locationId": this.locationId, + "locationCode": this.locationCode, + "shelfId": this.shelfId, + "shelfCode": this.shelfCode, + "matBaseInfoId": this.matBaseInfoId, + "matCode": this.matCode, + "qty": this.matQty, + "userName": this.userName, + "deviceType": "PDA" + }, + header: { + "Content-Type": "application/json" + // 如果需要以JSON格式发送数据 + }, + success: (res) => { + if (res.statusCode === 200) { + if (res.data.code == 200) { + this.clearMatInfo(); + uni.showToast({ + title: "绑定成功!", + icon: "none", + duration: 1500 + }); + } else { + this.visible = false; + uni.showToast({ + title: "绑定失败:" + res.data.message, + icon: "none", + duration: 1500 + }); + } + } else { + uni.showToast({ + title: "绑定失败:服务器返回错误状态码" + res.statusCode, + icon: "none", + duration: 1500 + }); + } + }, + fail: (err) => { + uni.showToast({ + title: "绑定失败:请求失败" + err, + icon: "none", + duration: 1500 + }); + }, + complete: (event) => { + formatAppLog("log", "at pages/bind/bind.vue:334", "请求完成", event); + } + }); + }, + queryMatList: function() { + if (this.isNeedScanLocationCode) { + uni.showToast({ + title: "请先扫描工位码!", + icon: "none", + duration: 1e3 + }); + return; + } + if (this.isNeedCallShelfCode) { + uni.showToast({ + title: "请先呼叫货架!", + icon: "none", + duration: 1e3 + }); + return; + } + if (this.matCodeCondition == null || this.matCodeCondition == "") { + uni.showToast({ + title: "输入物料编码或物料名称后进行查询!", + icon: "none", + duration: 1e3 + }); + return; + } else { + this.clearMatInfo(); + saveConfig("matCodeCondition", this.matCodeCondition); + this.$refs.proup.show(); + } + }, + //清空当前界面所有内容 + clear: function() { + this.locationId = null; + this.locationCode = ""; + this.shelfId = null; + this.shelfCode = ""; + this.isNeedCallShelfCode = true; + this.isNeedScanLocationCode = true; + this.placeholderText = "请先扫描工位码"; + }, + clearMatInfo: function() { + this.matCode = ""; + this.matName = ""; + this.matSpec = ""; + }, + handlePopupClose() { + formatAppLog("log", "at pages/bind/bind.vue:388", "弹出层已关闭"); } } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { + const _component_bindSelectMat = vue.resolveComponent("bindSelectMat"); return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [ + vue.createVNode(_component_bindSelectMat, { + ref: "proup", + onClose: $options.handlePopupClose, + onSelected: $options.bindSelectedMat + }, null, 8, ["onClose", "onSelected"]), vue.createElementVNode("view", { class: "diy-flex-row" }, [ vue.createElementVNode("view", { style: { "flex": "3" } }, [ vue.createCommentVNode(" 占位 ") @@ -485,25 +884,22 @@ if (uni.restoreGlobal) { class: "uni-input-wrapper", style: { "flex": "60" } }, [ - vue.withDirectives(vue.createElementVNode( - "input", - { - id: "inputMatCode", - class: "uni-input", - style: { "font-size": "50rpx", "padding": "10rpx" }, - placeholder: "请先扫描工位码", - "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.matCode = $event) - }, - null, - 512 - /* NEED_PATCH */ - ), [ - [vue.vModelText, $data.matCode] + vue.withDirectives(vue.createElementVNode("input", { + id: "inputMatCode", + class: "uni-input", + style: { "font-size": "50rpx", "padding": "10rpx" }, + placeholder: $data.placeholderText, + "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.matCodeCondition = $event), + onBlur: _cache[1] || (_cache[1] = (...args) => $options.queryMatList && $options.queryMatList(...args)) + }, null, 40, ["placeholder"]), [ + [vue.vModelText, $data.matCodeCondition] ]) ]), vue.createElementVNode("view", { style: { "flex": "3" } }), vue.createElementVNode("view", { style: { "flex": "30" } }, [ - vue.createElementVNode("button", null, "查询") + vue.createElementVNode("button", { + onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args)) + }, "查询") ]) ]) ]), @@ -523,7 +919,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { style: { "flex": "35" } }, "工位编码:"), vue.createElementVNode( "view", - { style: { "flex": "50" } }, + { style: { "flex": "50", "overflow": "hidden" } }, vue.toDisplayString($data.locationCode), 1 /* TEXT */ @@ -544,7 +940,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { style: { "flex": "35" } }, "货架编码:"), vue.createElementVNode( "view", - { style: { "flex": "90" } }, + { style: { "flex": "90", "overflow": "hidden" } }, vue.toDisplayString($data.shelfCode), 1 /* TEXT */ @@ -558,7 +954,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { style: { "flex": "35" } }, "物料编码:"), vue.createElementVNode( "view", - { style: { "flex": "90" } }, + { style: { "flex": "90", "overflow": "hidden" } }, vue.toDisplayString($data.matCode), 1 /* TEXT */ @@ -572,7 +968,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { style: { "flex": "35" } }, "物料名称:"), vue.createElementVNode( "view", - { style: { "flex": "90" } }, + { style: { "flex": "90", "overflow": "hidden" } }, vue.toDisplayString($data.matName), 1 /* TEXT */ @@ -586,7 +982,7 @@ if (uni.restoreGlobal) { vue.createElementVNode("view", { style: { "flex": "35" } }, "物料规格:"), vue.createElementVNode( "view", - { style: { "flex": "90" } }, + { style: { "flex": "90", "overflow": "hidden" } }, vue.toDisplayString($data.matSpec), 1 /* TEXT */ @@ -608,7 +1004,7 @@ if (uni.restoreGlobal) { class: "uni-input", style: { "font-size": "40rpx" }, placeholder: "请输入物料数量", - "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matQty = $event) + "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matQty = $event) }, null, 512 @@ -619,13 +1015,21 @@ if (uni.restoreGlobal) { ]), vue.createElementVNode("view", { style: { "flex": "40" } }, [ vue.createElementVNode("button", { - onClick: _cache[2] || (_cache[2] = (...args) => $options.bind && $options.bind(...args)), + onClick: _cache[4] || (_cache[4] = (...args) => $options.bind && $options.bind(...args)), class: "mini-btn", style: { "margin-left": "10rpx" }, type: "warn", size: "mini" }, "绑定") ]) + ]), + vue.createElementVNode("view", { style: { "flex": "1" } }, [ + vue.createElementVNode("view", { style: { "flex": "40", "text-align": "center" } }, [ + vue.createElementVNode("button", { + style: { "margin": "50rpx" }, + size: "mini" + }, "送货架") + ]) ]) ]) ]); @@ -635,6 +1039,7 @@ if (uni.restoreGlobal) { __definePage("pages/config/config", PagesConfigConfig); __definePage("pages/main/main", PagesMainMain); __definePage("pages/bind/bind", PagesBindBind); + __definePage("pages/bindSelectMat/bindSelectMat", PagesBindSelectMatBindSelectMat); const _sfc_main = { onLaunch: function() { formatAppLog("log", "at App.vue:4", "App Launch"); diff --git a/PDA/PDA/unpackage/dist/dev/app-plus/static/预约查看.png b/PDA/PDA/unpackage/dist/dev/app-plus/static/预约查看.png deleted file mode 100644 index 247f8d3c46d215672da6ac8a6d3be5eaa58b490f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5081 zcmV;~6DI75P)Px|lSxEDRCr$PolSDwI1+_{k`6HAnSIL(Ibu%H@=0tjZ6CtcA;wO7+?5s`iU`xRA#2HLxHf}`Crff_xfK={DS;oK$?hq#3X~Aa#Ap7D$uQf*qZq8`TF&SFaNmApMeYFE`)sE_(LxXo zR4JybK>>W3)I%$B2MA19tZj#{R)YvE0~Huj05$>#{resec;u=(+Go>HfjKCE8G`#h z-T(rV<(#8yHHU7%GWIEe_Vu=(H-P-(-``&b??0twrS(W_#1yqF09ldSsfz{>bU~sI z;gx37N$rBMeCtvGSt-&^d^dnR0p~uh-<&5`|E^1F)^?5xU~bmlTfzb1$kiPC0?XW^ z0OB=8gWxfm<~_9AEZd*@*UaShFN#CV{?t_vy}$D1N61!=oxgeN(T16G{DHcVq7I-= z+`Zx%Z3p#h$9`}DfW(n3kB(qPnk1Xu$8L|I_tgc+zN9e-4F2X-t0@5)x5ps;o`8(o zCLM3Pwc(o^ zWoK?dxXfg@sU#L)EG;Evn)5Ke1|kBYQBC;_yc%KT?E*+Acsy93lwfv`A=-$BdB^(d z%}!~-YUr_dVnWNhn^i>XTcu4vMj{Pa^tLa`_w}gW(7OuNCB>_n&CmF6yHG(x91SF++{{IOGprM5|DK!&K7Yk^> zj3fj^AYPs|DRZ+g0TDEyA}Ik8ik59njOPI$Kz#V@ckY|8s^a9KITbQ7if3GZaUq2d z5D=kYZF2eb!G|xhvnB{2C1Rg0*`Q@B1Y|uYyVqb%2#E3v2R=p%0tz*hEZ3Us{IBQQ z^+^Q8paBQ6Fa~7&-Ed{)!E?{ECVH2PfZ%PUNl8F7s%3t0x*pfY2?WHr0Uu>YKnmz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hJCo?K)XgK)or8)V86>K}l3yH`2Y>Mky$Rt<=@qnKajH(H`>+px;0JFwmBk}N+QsDt$WPeOkSv#yMlh1I zlqzfLk=JLBElKhU;GDJjnhNrneg(K-6zd(ikQ@#?B>{;=$}?S9rI;$M05Xf5&Sf1b zav(X>83Kfm)X}L3h^!s-klas%!+_jD(rj+gj1^r`l6pIsH^++|Jl2|Okm``oXmvjh{E(>iA vNck%A4OAdcfi{NTuOka*aaC{MZo~frMY(-jh1y`S00000NkvXXu0mjf%8q-* diff --git a/货架标准上位机/Models/JsConfig.cs b/货架标准上位机/Models/JsConfig.cs index 6e63896..5af90b1 100644 --- a/货架标准上位机/Models/JsConfig.cs +++ b/货架标准上位机/Models/JsConfig.cs @@ -48,6 +48,10 @@ namespace 智慧物流软件系统 public string ModuleCodePattern { get; set; } + /// + /// 工位编码 WCS前端当前的工位编码 + /// + public string LocationCode { get; set; } #region 盟讯公司配置 public bool IsMx { get; set; }