diff --git a/PDA/PDA/config.js b/PDA/PDA/config.js
index dc4db23..eeac328 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', '192.168.119.36');
+ var serverIP = getConfig('serverIP', '192.168.5.132');
var serverPort = getConfig('serverPort', '8888');
return serverIP + ':' + serverPort;
}
\ No newline at end of file
diff --git a/PDA/PDA/pages/bind/bind.vue b/PDA/PDA/pages/bind/bind.vue
index 33917a7..a765eb0 100644
--- a/PDA/PDA/pages/bind/bind.vue
+++ b/PDA/PDA/pages/bind/bind.vue
@@ -187,7 +187,7 @@
// 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符
originalString += String.fromCharCode(byteArray[i]);
}
- this.locationCode = originalString;
+ this.locationCode = encodedString;
//调用接口获取当前工位信息 当前工位是否有货架
var serverIPAndPort = getServerIPAndPort();
uni.request({
@@ -215,7 +215,9 @@
this.isNeedScanLocationCode = false;
this.isNeedCallShelfCode = true;
this.placeholderText = '请呼叫货架';
- } else {
+ }
+ else
+ {
this.isNeedScanLocationCode = false;
this.isNeedCallShelfCode = false;
this.placeholderText = '输入编码或名称';
diff --git a/PDA/PDA/pages/stockTaking/stockTaking.vue b/PDA/PDA/pages/stockTaking/stockTaking.vue
index 8183fd0..ad63337 100644
--- a/PDA/PDA/pages/stockTaking/stockTaking.vue
+++ b/PDA/PDA/pages/stockTaking/stockTaking.vue
@@ -1,22 +1,570 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 记录数:[{{recordCount}}]
+
+
+
+ 货架码:{{shelfCode}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .mini-btn {
+ margin-right: 10rpx;
+ }
+
+ .bg-image {
+ background-image: url('/static/background.png');
+ /* 背景图片路径 */
+ background-size: cover;
+ /* 背景图片覆盖整个元素 */
+ background-position: center;
+ /* 背景图片居中 */
+ height: 100%;
+ /* 视图高度设置为100% */
+ width: 100%;
+ /* 视图宽度设置为100% */
+ position: fixed;
+ /* 视图定位为固定 */
+ top: 0;
+ left: 0;
+ /* z-index: -1; */
+ }
+
+ .diy-flex-row {
+ display: flex;
+ flex-direction: row;
+ margin-top: 15rpx;
+ margin-bottom: 15rpx;
+ font-size: 50rpx;
+ }
+
+ .diy-flex-column {
+ display: flex;
+ flex-direction: column;
+ }
+
+ .diy-flex-inforow {
+ display: flex;
+ flex-direction: row;
+ font-size: 40rpx;
+ font-weight: 500;
+ margin-top: 8rpx;
+ margin-bottom: 8rpx;
+ }
+
+ .scroll-view {
+ height: 75vh;
+ }
+
+ .popup-content {
+ padding: 20px;
+ background-color: rgba(0, 0, 0, 1);
+ background-color: white;
+ z-index: 2;
+ border-radius: 20rpx;
+ }
+
+
+ .input-item {
+ margin-bottom: 5rpx;
+ display: flex;
+ align-items: center;
+ /* 让内部元素垂直居中 */
+ }
+
+ .input-item label {
+ display: inline-block;
+ }
+
+ .input-item input {
+ display: inline-block;
+ background: wheat;
+ width: 280rpx;
+ }
+
+ .button-group {
+ display: flex;
+ justify-content: space-between;
+ margin-top: 20rpx;
+ }
+
+ .button-group button {
+ margin-top: 20rpx;
+ padding: 10rpx 10rpx;
+ border: none;
+ border-radius: 5px;
+ background-color: #007AFF;
+ color: #fff;
+ cursor: pointer;
+ }
+
\ No newline at end of file
diff --git a/PDA/PDA/src/libs/Broadcast.js b/PDA/PDA/src/libs/Broadcast.js
index ec3ec37..a6dd65d 100644
--- a/PDA/PDA/src/libs/Broadcast.js
+++ b/PDA/PDA/src/libs/Broadcast.js
@@ -2,34 +2,38 @@ var main = null;
var receiver = null;
//接收广播
export function recive(success, fail) {
-
+
// #ifdef APP
main = plus.android.runtimeMainActivity(); //获取activity
//创建自定义广播实例
receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
onReceive: function(context, intent) { //实现onReceiver回调函数
plus.android.importClass(intent); //通过intent实例引入intent类,方便以后的‘.’操作
- var action = intent.getAction()
-
- var data
+ var action = intent.getAction();
+ console.log('zhanglp', action);
+ var data;
switch (action) {
case "com.android.server.scannerservice.broadcast":
data = intent.getExtra("scannerdata");
break
-
+ case "com.service.scanner.data":
+ data = intent.getExtra("ScanCode");
+ console.log('zhanglp', data.replace(/\n/, ''))
+ 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"); //东软pda
if (data == null) {
data = intent.getStringExtra("Scanner_value"); //东软pda
@@ -41,7 +45,7 @@ export function recive(success, fail) {
case "com.barcode.sendBroadcast":
data = intent.getExtra("BARCODE");
break
-
+
case "scan.rcv.message":
let barocode = intent.getByteArrayExtra("barocode");
let barocodelen = intent.getIntExtra("length", 0);
@@ -50,15 +54,15 @@ export function recive(success, fail) {
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) {
// console.log('zhanglp', data.replace(/\n/, ''))
@@ -68,24 +72,24 @@ export function recive(success, fail) {
data: data.replace(/\n/, '').replace(/\t/, '').trim() //处理结束符和换行符为空
})
} else {
-
+
fail({
type: 'barcode',
data: '未识别到扫码数据' //处理结束符和换行符为空
})
}
-
-
+
+
}
});
var IntentFilter = plus.android.importClass('android.content.IntentFilter'); //网络
var Intent = 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"); //新大陆 霍尼韦尔
@@ -99,8 +103,8 @@ export function recive(success, fail) {
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.honeywell.scan.broadcast");
-
-
+ filter.addAction("com.service.scanner.data");
+
main.registerReceiver(receiver, filter); //注册监听
// #endif
}
@@ -110,4 +114,4 @@ export function unregisterReceiver() {
console.log("取消监听广播")
main.unregisterReceiver(receiver);
// #endif
-}
+}
\ No newline at end of file
diff --git a/PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json b/PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json
index 64ff8a0..9404df8 100644
--- a/PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json
+++ b/PDA/PDA/unpackage/dist/cache/.vite/deps/_metadata.json
@@ -1,8 +1,8 @@
{
- "hash": "b0fe367b",
+ "hash": "f663bba1",
"configHash": "e12fdbcd",
- "lockfileHash": "e3b0c442",
- "browserHash": "aae2cf7f",
+ "lockfileHash": "d2aaf416",
+ "browserHash": "5c516658",
"optimized": {},
"chunks": {}
}
\ No newline at end of file
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 73cec4e..2e70fa5 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.45","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}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/queryBindList/queryBindList","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}},{"path":"pages/queryBindList/queryBindList","meta":{"navigationBar":{"titleText":"智慧物流系统-绑定查询","type":"default"},"isNVue":false}},{"path":"pages/stockTaking/stockTaking","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 fbef8ac..9f5168d 100644
--- a/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
+++ b/PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
@@ -49,11 +49,16 @@ if (uni.restoreGlobal) {
onReceive: function(context, intent) {
plus.android.importClass(intent);
var action = intent.getAction();
+ formatAppLog("log", "at src/libs/Broadcast.js:13", "zhanglp", action);
var data;
switch (action) {
case "com.android.server.scannerservice.broadcast":
data = intent.getExtra("scannerdata");
break;
+ case "com.service.scanner.data":
+ data = intent.getExtra("ScanCode");
+ formatAppLog("log", "at src/libs/Broadcast.js:21", "zhanglp", data.replace(/\n/, ""));
+ break;
case "android.intent.action.SCANRESULT":
data = intent.getExtra("value");
break;
@@ -120,10 +125,11 @@ if (uni.restoreGlobal) {
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.android.scanner.broadcast");
filter.addAction("com.honeywell.scan.broadcast");
+ filter.addAction("com.service.scanner.data");
main.registerReceiver(receiver, filter);
}
function unregisterReceiver() {
- formatAppLog("log", "at src/libs/Broadcast.js:110", "取消监听广播");
+ formatAppLog("log", "at src/libs/Broadcast.js:114", "取消监听广播");
main.unregisterReceiver(receiver);
}
function saveConfig(key, value) {
@@ -133,7 +139,7 @@ if (uni.restoreGlobal) {
return uni.getStorageSync(key) || defaultValue;
}
function getServerIPAndPort() {
- var serverIP = getConfig("serverIP", "192.168.119.36");
+ var serverIP = getConfig("serverIP", "192.168.5.132");
var serverPort = getConfig("serverPort", "8888");
return serverIP + ":" + serverPort;
}
@@ -145,7 +151,7 @@ if (uni.restoreGlobal) {
}
return target;
};
- const _sfc_main$a = {
+ const _sfc_main$b = {
data() {
return {
title: "登录",
@@ -221,7 +227,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("navigator", {
url: "../config/config",
@@ -307,8 +313,8 @@ if (uni.restoreGlobal) {
])
]);
}
- const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]);
- const _sfc_main$9 = {
+ const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]);
+ const _sfc_main$a = {
data() {
return {
serverIP: "",
@@ -330,7 +336,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("label", null, "服务器IP:"),
@@ -367,7 +373,7 @@ if (uni.restoreGlobal) {
}, "保存配置")
]);
}
- const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]);
+ const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__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";
@@ -375,13 +381,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$8 = {
+ const _sfc_main$9 = {
data() {
return {};
},
methods: {}
};
- function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("navigator", {
@@ -482,16 +488,21 @@ if (uni.restoreGlobal) {
class: "uni-flex uni-column",
style: { "flex": "5" }
}, [
- vue.createElementVNode("view", {
- class: "uni-flex uni-row",
- style: { "-webkit-justify-content": "center", "justify-content": "center" }
+ vue.createElementVNode("navigator", {
+ url: "../stockTaking/stockTaking",
+ "hover-class": "navigator-hover"
}, [
- vue.createElementVNode("image", {
- class: "function-image",
- src: _imports_5
- })
- ]),
- vue.createElementVNode("view", { class: "function-text" }, "库存盘点")
+ vue.createElementVNode("view", {
+ class: "uni-flex uni-row",
+ style: { "-webkit-justify-content": "center", "justify-content": "center" }
+ }, [
+ vue.createElementVNode("image", {
+ class: "function-image",
+ src: _imports_5
+ })
+ ]),
+ vue.createElementVNode("view", { class: "function-text" }, "库存盘点")
+ ])
]),
vue.createElementVNode("view", {
class: "uni-flex uni-column",
@@ -512,8 +523,8 @@ if (uni.restoreGlobal) {
])
]);
}
- const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]);
- const _sfc_main$7 = {
+ const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]);
+ const _sfc_main$8 = {
data() {
return {
visible: false,
@@ -599,7 +610,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
return $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "popup-container"
@@ -630,9 +641,9 @@ if (uni.restoreGlobal) {
])
])) : vue.createCommentVNode("v-if", true);
}
- const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
+ const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
const _imports_0 = "/static/scan.png";
- const _sfc_main$6 = {
+ const _sfc_main$7 = {
components: {
bindSelectMat: PagesBindSelectMatBindSelectMat
},
@@ -672,15 +683,9 @@ if (uni.restoreGlobal) {
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;
+ this.locationCode = encodedString;
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/pdaMatBind/getShelfInfoByLocationCode",
@@ -865,7 +870,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$6(_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, {
@@ -1042,7 +1047,7 @@ if (uni.restoreGlobal) {
])
]);
}
- const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bind/bind.vue"]]);
+ const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bind/bind.vue"]]);
class MPAnimation {
constructor(options, _this) {
this.options = options;
@@ -1153,7 +1158,7 @@ if (uni.restoreGlobal) {
clearTimeout(_this.timer);
return new MPAnimation(option, _this);
}
- const _sfc_main$5 = {
+ const _sfc_main$6 = {
name: "uniTransition",
emits: ["click", "change"],
props: {
@@ -1400,7 +1405,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
ref: "ani",
@@ -1412,8 +1417,8 @@ if (uni.restoreGlobal) {
vue.renderSlot(_ctx.$slots, "default")
], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
}
- const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
- const _sfc_main$4 = {
+ const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
+ const _sfc_main$5 = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@@ -1741,7 +1746,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@@ -1801,8 +1806,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
- const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-4dd3c44b"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
- const _sfc_main$3 = {
+ const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-4dd3c44b"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
+ const _sfc_main$4 = {
__name: "Card",
props: {
item: {
@@ -1826,7 +1831,7 @@ if (uni.restoreGlobal) {
return __returned__;
}
};
- 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: "card" }, [
vue.createElementVNode("view", { class: "card-header" }, [
vue.createElementVNode(
@@ -1927,8 +1932,8 @@ if (uni.restoreGlobal) {
])
]);
}
- const Card = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-29c414df"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/Card.vue"]]);
- const _sfc_main$2 = {
+ const Card = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-29c414df"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/Card.vue"]]);
+ const _sfc_main$3 = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@@ -2281,7 +2286,7 @@ if (uni.restoreGlobal) {
}
}
};
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@@ -2341,8 +2346,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
- const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-7db519c7"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
- const _sfc_main$1 = {
+ const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-7db519c7"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
+ const _sfc_main$2 = {
components: {
uniPopup,
Card
@@ -2647,6 +2652,491 @@ if (uni.restoreGlobal) {
}
}
};
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
+ const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
+ const _component_Card = vue.resolveComponent("Card");
+ return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
+ vue.createVNode(
+ _component_uni_popup,
+ {
+ ref: "popup",
+ type: "dialog"
+ },
+ {
+ default: vue.withCtx(() => [
+ vue.createElementVNode("view", { class: "popup-content" }, [
+ vue.createElementVNode("view", { class: "info-item" }, [
+ vue.createElementVNode("label", null, "物料编码:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString($setup.fixedInfo.matCode),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "info-item" }, [
+ vue.createElementVNode("label", null, "物料名称:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString($setup.fixedInfo.matName),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", { class: "info-item" }, [
+ vue.createElementVNode("label", null, "物料规格:"),
+ vue.createElementVNode(
+ "text",
+ null,
+ vue.toDisplayString($setup.fixedInfo.matSpec),
+ 1
+ /* TEXT */
+ )
+ ]),
+ vue.createElementVNode("view", {
+ class: "input-item",
+ style: { "background-color": "wheat" }
+ }, [
+ vue.createElementVNode("label", null, "数量:"),
+ vue.withDirectives(vue.createElementVNode(
+ "input",
+ {
+ ref: "inputRef",
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.inputValue = $event),
+ type: "number",
+ placeholder: "输入数量"
+ },
+ null,
+ 512
+ /* NEED_PATCH */
+ ), [
+ [
+ vue.vModelText,
+ $setup.inputValue,
+ void 0,
+ { number: true }
+ ]
+ ])
+ ]),
+ vue.createElementVNode("view", { class: "button-group" }, [
+ vue.createElementVNode("button", {
+ onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
+ }, "取消"),
+ vue.createElementVNode("button", {
+ onClick: _cache[2] || (_cache[2] = (...args) => $setup.saveData && $setup.saveData(...args))
+ }, "保存")
+ ])
+ ])
+ ]),
+ _: 1
+ /* STABLE */
+ },
+ 512
+ /* NEED_PATCH */
+ ),
+ vue.createElementVNode("view", { class: "diy-flex-row" }, [
+ vue.createElementVNode("view", { style: { "flex": "3" } }, [
+ vue.createCommentVNode(" 占位 ")
+ ]),
+ vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
+ vue.createElementVNode("view", { class: "diy-flex-row" }, [
+ vue.createElementVNode("view", {
+ class: "rightImageContainer",
+ style: { "flex": "12", "padding-top": "20rpx" }
+ }, [
+ vue.createElementVNode("image", {
+ style: { "width": "60rpx", "height": "60rpx" },
+ src: _imports_0
+ })
+ ]),
+ vue.createElementVNode("view", {
+ class: "uni-input-wrapper",
+ style: { "flex": "60" }
+ }, [
+ vue.withDirectives(vue.createElementVNode("input", {
+ id: "inputMatCode",
+ class: "uni-input",
+ style: { "font-size": "50rpx", "padding": "10rpx" },
+ placeholder: $data.placeholderText,
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
+ onBlur: _cache[4] || (_cache[4] = (...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", {
+ onClick: _cache[5] || (_cache[5] = (...args) => $options.queryMatList && $options.queryMatList(...args))
+ }, "查询")
+ ])
+ ])
+ ]),
+ vue.createElementVNode("view", { style: { "flex": "2" } }, [
+ vue.createCommentVNode(" 占位 ")
+ ])
+ ]),
+ vue.createElementVNode("view", {
+ class: "diy-flex-column",
+ style: { "margin-top": "5rpx" }
+ }, [
+ vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
+ vue.createElementVNode("view", { style: { "width": "10rpx" } }),
+ vue.createElementVNode(
+ "view",
+ { style: { "width": "275rpx" } },
+ "记录数:[" + vue.toDisplayString($data.recordCount) + "]",
+ 1
+ /* TEXT */
+ ),
+ vue.createElementVNode("view", { style: { "width": "10rpx" } }),
+ vue.createElementVNode(
+ "view",
+ { style: { "width": "455rpx" } },
+ "货架码:" + vue.toDisplayString($data.shelfCode),
+ 1
+ /* TEXT */
+ )
+ ])
+ ]),
+ vue.createElementVNode("view", {
+ class: "diy-flex-column",
+ style: { "margin-top": "5rpx" }
+ }, [
+ vue.createElementVNode("scroll-view", {
+ class: "scroll-view",
+ "scroll-y": "true"
+ }, [
+ (vue.openBlock(true), vue.createElementBlock(
+ vue.Fragment,
+ null,
+ vue.renderList($data.cardData, (item, index) => {
+ return vue.openBlock(), vue.createElementBlock("view", {
+ key: index,
+ onLongpress: ($event) => $options.longpress(item)
+ }, [
+ vue.createVNode(_component_Card, {
+ item,
+ currentIndex: index,
+ cardData: $data.cardData
+ }, null, 8, ["item", "currentIndex", "cardData"])
+ ], 40, ["onLongpress"]);
+ }),
+ 128
+ /* KEYED_FRAGMENT */
+ ))
+ ])
+ ])
+ ]);
+ }
+ const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
+ const _sfc_main$1 = {
+ components: {
+ uniPopup,
+ Card
+ },
+ setup() {
+ const fixedInfo = {
+ infoId: 0,
+ matCode: "示例名称",
+ matName: "这是一段示例描述",
+ matSpec: "",
+ matQty: 0
+ };
+ const popup = vue.ref(null);
+ const inputValue = vue.ref("");
+ const showPopup = (info) => {
+ fixedInfo.infoId = info.id;
+ fixedInfo.matCode = info.matCode;
+ fixedInfo.matName = info.matName;
+ fixedInfo.matSpec = info.matSpec;
+ fixedInfo.matQty = info.matQty;
+ inputValue.value = info.matQty;
+ popup.value.open();
+ };
+ const hidePopup = () => {
+ popup.value.close();
+ };
+ const saveData = () => {
+ if (inputValue.value == fixedInfo.matQty) {
+ uni.showToast({
+ title: "本次修改未修改数量",
+ icon: "none",
+ duration: 1500
+ });
+ hidePopup();
+ return;
+ }
+ if (inputValue.value < 0) {
+ uni.showToast({
+ title: "您所输入的数量应该大于0!",
+ icon: "none",
+ duration: 1500
+ });
+ return;
+ }
+ if (inputValue.value == 0) {
+ uni.showToast({
+ title: "数量为0,请使用删除功能!",
+ icon: "none",
+ duration: 1500
+ });
+ return;
+ }
+ var serverIPAndPort = getServerIPAndPort();
+ uni.request({
+ url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/updateMatDetailCurrentInfoById",
+ // 请求的接口地址
+ method: "POST",
+ // 设置请求方式为 POST
+ data: {
+ "matQty": inputValue.value,
+ "matDetailCurrentInfoId": fixedInfo.infoId,
+ "userName": getConfig("userName", "admin"),
+ "deviceType": "PDA"
+ },
+ header: {
+ "Content-Type": "application/json"
+ // 如果需要以JSON格式发送数据
+ },
+ success: (res) => {
+ if (res.statusCode === 200) {
+ if (res.data.code == 200) {
+ uni.showToast({
+ title: "修改成功!",
+ icon: "none",
+ duration: 1200
+ });
+ hidePopup();
+ } else {
+ uni.showToast({
+ title: "修改失败:" + res.data.message,
+ icon: "none",
+ duration: 2500
+ });
+ }
+ } else {
+ uni.showToast({
+ title: "服务器返回错误状态码" + res.statusCode,
+ icon: "none",
+ duration: 2500
+ });
+ }
+ },
+ fail: (err) => {
+ uni.showToast({
+ title: "请求失败" + err,
+ icon: "none",
+ duration: 2500
+ });
+ this.clear();
+ },
+ complete: (event) => {
+ }
+ });
+ };
+ return {
+ fixedInfo,
+ popup,
+ inputValue,
+ showPopup,
+ hidePopup,
+ saveData
+ };
+ },
+ data() {
+ return {
+ locationId: null,
+ locationCode: "",
+ userName: "",
+ //当前登录的用户名
+ recordCount: 0,
+ shelfId: null,
+ shelfCode: "",
+ placeholderText: "请先扫描货架码",
+ matCodeCondition: "",
+ //物料编码搜索条件
+ cardData: null
+ };
+ },
+ onShow: function() {
+ this.userName = getConfig("userName", "admin");
+ const self = this;
+ recive(function(res) {
+ formatAppLog("log", "at pages/stockTaking/stockTaking.vue:267", "Success:" + res.data);
+ self.analysisScanCode(res.data);
+ }, function(err) {
+ formatAppLog("log", "at pages/stockTaking/stockTaking.vue:270", "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;
+ var serverIPAndPort = getServerIPAndPort();
+ uni.request({
+ url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
+ // 请求的接口地址
+ method: "POST",
+ // 设置请求方式为 POST
+ data: {
+ "shelfCode": this.shelfCode,
+ "matCode": "",
+ "userName": this.userName,
+ "deviceType": "PDA",
+ "pageNumber": 1,
+ "pageSize": 100
+ },
+ header: {
+ "Content-Type": "application/json"
+ // 如果需要以JSON格式发送数据
+ },
+ success: (res) => {
+ if (res.statusCode === 200) {
+ if (res.data.code == 200) {
+ if (res.data.data == null || res.data.data.count == 0) {
+ uni.showToast({
+ title: "该货架不存在绑定的物料信息!",
+ icon: "none",
+ duration: 1500
+ });
+ return;
+ }
+ this.cardData = res.data.data.lists;
+ this.recordCount = res.data.data.count;
+ uni.showToast({
+ title: "获取成功!",
+ icon: "none",
+ duration: 100
+ });
+ } 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/stockTaking/stockTaking.vue:362", "请求完成", event);
+ }
+ });
+ },
+ queryMatList: function() {
+ if (this.shelfCode == null || this.shelfCode == "") {
+ uni.showToast({
+ title: "请先扫描货架码!",
+ icon: "none",
+ duration: 1e3
+ });
+ return;
+ }
+ var serverIPAndPort = getServerIPAndPort();
+ uni.request({
+ url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
+ // 请求的接口地址
+ method: "POST",
+ // 设置请求方式为 POST
+ data: {
+ "shelfCode": this.shelfCode,
+ "matCode": this.matCodeCondition,
+ "userName": this.userName,
+ "deviceType": "PDA",
+ "pageNumber": 1,
+ "pageSize": 100
+ },
+ header: {
+ "Content-Type": "application/json"
+ // 如果需要以JSON格式发送数据
+ },
+ success: (res) => {
+ if (res.statusCode === 200) {
+ if (res.data.code == 200) {
+ if (res.data.data == null || res.data.data.count == 0) {
+ uni.showToast({
+ title: "该货架不存在绑定的物料信息!",
+ icon: "none",
+ duration: 1500
+ });
+ return;
+ }
+ this.cardData = res.data.data.lists;
+ this.recordCount = res.data.data.count;
+ uni.showToast({
+ title: "获取成功!",
+ icon: "none",
+ duration: 100
+ });
+ } 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/stockTaking/stockTaking.vue:449", "请求完成", event);
+ }
+ });
+ },
+ //清空当前界面所有内容
+ clear: function() {
+ this.placeholderText = "请先扫描货架码";
+ this.cardData = null;
+ this.recordCount = 0;
+ },
+ //长按
+ longpress(item) {
+ this.showPopup(item);
+ }
+ }
+ };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
@@ -2826,13 +3316,14 @@ if (uni.restoreGlobal) {
])
]);
}
- const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
+ const PagesStockTakingStockTaking = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/stockTaking/stockTaking.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
__definePage("pages/config/config", PagesConfigConfig);
__definePage("pages/main/main", PagesMainMain);
__definePage("pages/bind/bind", PagesBindBind);
__definePage("pages/bindSelectMat/bindSelectMat", PagesBindSelectMatBindSelectMat);
__definePage("pages/queryBindList/queryBindList", PagesQueryBindListQueryBindList);
+ __definePage("pages/stockTaking/stockTaking", PagesStockTakingStockTaking);
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");
diff --git a/货架标准上位机/ViewModels/MatDetailStocktakingInfoViewModel.cs b/货架标准上位机/ViewModels/MatDetailStocktakingInfoViewModel.cs
index 3f61662..8ee958c 100644
--- a/货架标准上位机/ViewModels/MatDetailStocktakingInfoViewModel.cs
+++ b/货架标准上位机/ViewModels/MatDetailStocktakingInfoViewModel.cs
@@ -30,7 +30,7 @@ namespace 智慧物流软件系统.ViewModel
StocktakingStatuses.Add(status.ToString());
}
- SelectedStocktakingStatus = StocktakingStatuses.First();
+
}
#region Property
@@ -125,7 +125,7 @@ namespace 智慧物流软件系统.ViewModel
MatCode = string.Empty;
MatName = string.Empty;
StocktakingUser = string.Empty;
- SelectedStocktakingStatus = StocktakingStatuses.First();
+ SelectedStocktakingStatus = StocktakingStatuses.Where(t => t.Contains("未提交")).First();
}
public ICommand BtnSearchCommand { get => new DelegateCommand(BtnSearchReset); }
@@ -184,7 +184,7 @@ namespace 智慧物流软件系统.ViewModel
public ICommand BtnCommitCommand { get => new DelegateCommand(BtnCommit); }
public async void BtnCommit()
{
- Growl.Ask($"是否提交所有勾选得数据]!", isConfirmed =>
+ Growl.Ask($"是否提交所有勾选的数据?", isConfirmed =>
{
if (isConfirmed)
{
diff --git a/货架标准上位机/Views/MatDetailStocktakingInfoView.xaml b/货架标准上位机/Views/MatDetailStocktakingInfoView.xaml
index d8a1260..01148d6 100644
--- a/货架标准上位机/Views/MatDetailStocktakingInfoView.xaml
+++ b/货架标准上位机/Views/MatDetailStocktakingInfoView.xaml
@@ -186,7 +186,6 @@
Binding="{Binding MatQty}">
-