物料绑定界面支持手动输入

This commit is contained in:
hehaibing-1996
2025-03-11 19:15:32 +08:00
parent c598fd0fe9
commit dda24bca5a
3 changed files with 56 additions and 6 deletions

View File

@ -51,7 +51,7 @@
<view style="flex: 3;"></view>
<view style="flex: 32;">
<button class="mini-btn" type="warn" size="mini" @click="callEmptyShelf">呼叫货架</button>
<button class="mini-btn" style="font-size: 25rpx;" type="warn" size="mini" @click="callEmptyShelf">呼叫货架</button>
</view>
</view>
@ -445,6 +445,34 @@
},
queryMatList: function() {
//支持手动输入
const regex = /^\d{6}XY\d{6}$/;
if (regex.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = '';
this.analysisScanCode(this.locationCode);
return;
}
const regex1 = /^\d{6}xy\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = '';
this.analysisScanCode(this.locationCode);
return;
}
const regex2 = /^[1-9]\d{5}$/;
//只有在未扫码的时候输入货架编码有用
if (regex2.test(this.matCodeCondition) && this.isNeedScanLocationCode) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = '';
this.analysisScanCode(this.shelfCode);
return;
}
if (this.isNeedScanLocationCode) {
uni.showToast({
title: '请先扫描工位码!',

View File

@ -38,7 +38,7 @@
<view style="margin-top:70rpx;margin-bottom: 20rpx;text-align: center;">
<view >{{serverIPAndPort}}</view>
<view >V1.0</view>
<view >V1.1</view>
</view>
</view>

View File

@ -320,7 +320,7 @@ if (uni.restoreGlobal) {
1
/* TEXT */
),
vue.createElementVNode("view", null, "V1.0")
vue.createElementVNode("view", null, "V1.1")
])
]);
}
@ -1013,6 +1013,27 @@ if (uni.restoreGlobal) {
});
},
queryMatList: function() {
const regex = /^\d{6}XY\d{6}$/;
if (regex.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = "";
this.analysisScanCode(this.locationCode);
return;
}
const regex1 = /^\d{6}xy\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = "";
this.analysisScanCode(this.locationCode);
return;
}
const regex2 = /^[1-9]\d{5}$/;
if (regex2.test(this.matCodeCondition) && this.isNeedScanLocationCode) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = "";
this.analysisScanCode(this.shelfCode);
return;
}
if (this.isNeedScanLocationCode) {
uni.showToast({
title: "请先扫描工位码!",
@ -1113,7 +1134,7 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:555", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:583", "请求完成", event);
}
});
},
@ -1204,7 +1225,7 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:657", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:685", "请求完成", event);
}
});
},
@ -1232,7 +1253,7 @@ if (uni.restoreGlobal) {
this.matQty = 0;
},
handlePopupClose() {
formatAppLog("log", "at pages/bind/bind.vue:689", "弹出层已关闭");
formatAppLog("log", "at pages/bind/bind.vue:717", "弹出层已关闭");
}
}
};
@ -1326,6 +1347,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "32" } }, [
vue.createElementVNode("button", {
class: "mini-btn",
style: { "font-size": "25rpx" },
type: "warn",
size: "mini",
onClick: _cache[6] || (_cache[6] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))