1.绑定页面支持扫描物料的二维码 返回搜索条件所有的物料
This commit is contained in:
@ -14,7 +14,8 @@
|
|||||||
|
|
||||||
<view class="uni-input-wrapper" style="flex: 60;">
|
<view class="uni-input-wrapper" style="flex: 60;">
|
||||||
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
||||||
:placeholder="placeholderText" v-model="matCodeCondition"></input>
|
:placeholder="placeholderText" v-model="matCodeCondition" @focus="handleFocus"
|
||||||
|
@blur="handleBlur"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="flex: 3;">
|
<view style="flex: 3;">
|
||||||
@ -191,6 +192,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isMatConditionFoucused: false,
|
||||||
|
|
||||||
isNeedScanLocationCode: true,
|
isNeedScanLocationCode: true,
|
||||||
isNeedCallShelfCode: true,
|
isNeedCallShelfCode: true,
|
||||||
@ -238,6 +240,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleFocus() {
|
||||||
|
console.log('foucus');
|
||||||
|
this.isMatConditionFoucused = true;
|
||||||
|
},
|
||||||
|
handleBlur() {
|
||||||
|
console.log('bulur');
|
||||||
|
this.isMatConditionFoucused = false;
|
||||||
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
@ -253,6 +263,11 @@
|
|||||||
},
|
},
|
||||||
//扫码枪扫码
|
//扫码枪扫码
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
|
console.log(this.isMatConditionFoucused);
|
||||||
|
if (this.isMatConditionFoucused) {
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||||
this.locationCode = encodedString;
|
this.locationCode = encodedString;
|
||||||
@ -284,13 +299,13 @@
|
|||||||
this.locationCode = res.data.data.locationCode;
|
this.locationCode = res.data.data.locationCode;
|
||||||
this.shelfId = res.data.data.shelfId;
|
this.shelfId = res.data.data.shelfId;
|
||||||
this.shelfCode = res.data.data.shelfCode;
|
this.shelfCode = res.data.data.shelfCode;
|
||||||
|
|
||||||
this.shelfTypeOptions = res.data.data.shelfTypes;
|
this.shelfTypeOptions = res.data.data.shelfTypes;
|
||||||
var typeIndex = getConfig("bindSelectedShelfTypeIndex", 0);
|
var typeIndex = getConfig("bindSelectedShelfTypeIndex", 0);
|
||||||
if (typeIndex + 1 < this.shelfTypeOptions.length) {
|
if (typeIndex + 1 < this.shelfTypeOptions.length) {
|
||||||
this.selectedShelfTypeIndex = typeIndex;
|
this.selectedShelfTypeIndex = typeIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.shelfAreaOptions = res.data.data.locationArea;
|
this.shelfAreaOptions = res.data.data.locationArea;
|
||||||
var index = getConfig("bindSelectedShelfAreaIndex", 0);
|
var index = getConfig("bindSelectedShelfAreaIndex", 0);
|
||||||
if (index + 1 < this.shelfAreaOptions.length) {
|
if (index + 1 < this.shelfAreaOptions.length) {
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
"MatSpec": "",
|
"MatSpec": "",
|
||||||
"IsEnable": null,
|
"IsEnable": null,
|
||||||
"PageNumber": 1,
|
"PageNumber": 1,
|
||||||
"PageSize": 20,
|
"PageSize": 300,
|
||||||
"UserName": this.userName,
|
"UserName": this.userName,
|
||||||
"DeviceType": "PDA"
|
"DeviceType": "PDA"
|
||||||
},
|
},
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
<view class="uni-input-wrapper" style="flex: 60;">
|
<view class="uni-input-wrapper" style="flex: 60;">
|
||||||
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
||||||
:placeholder="placeholderText" v-model="matCodeCondition" @blur="queryMatList"></input>
|
:placeholder="placeholderText" v-model="matCodeCondition" @focus="handleFocus"
|
||||||
|
@blur="handleBlur"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="flex: 3;">
|
<view style="flex: 3;">
|
||||||
@ -204,8 +205,10 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
||||||
placeholderText: '请先扫描工位码',
|
placeholderText: '请先扫描工位码',
|
||||||
|
isMatConditionFoucused : false,
|
||||||
matCodeCondition: '', //物料编码搜索条件
|
matCodeCondition: '', //物料编码搜索条件
|
||||||
//工位ID 工位码
|
//工位ID 工位码
|
||||||
locationId: 0,
|
locationId: 0,
|
||||||
@ -237,6 +240,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleFocus() {
|
||||||
|
console.log('foucus');
|
||||||
|
this.isMatConditionFoucused = true;
|
||||||
|
},
|
||||||
|
handleBlur() {
|
||||||
|
console.log('bulur');
|
||||||
|
this.isMatConditionFoucused = false;
|
||||||
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
@ -252,6 +263,10 @@
|
|||||||
},
|
},
|
||||||
//扫码获取工位信息
|
//扫码获取工位信息
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
|
if(this.isMatConditionFoucused)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||||
this.locationCode = encodedString;
|
this.locationCode = encodedString;
|
||||||
|
@ -182,7 +182,7 @@ if (uni.restoreGlobal) {
|
|||||||
methods: {
|
methods: {
|
||||||
login() {
|
login() {
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
formatAppLog("log", "at pages/index/index.vue:92", "http://" + serverIPAndPort + "/user/userLogin");
|
formatAppLog("log", "at pages/index/index.vue:93", "http://" + serverIPAndPort + "/user/userLogin");
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "http://" + serverIPAndPort + "/user/userLogin",
|
url: "http://" + serverIPAndPort + "/user/userLogin",
|
||||||
// 请求的接口地址
|
// 请求的接口地址
|
||||||
@ -207,7 +207,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
saveConfig("userName", this.userName);
|
saveConfig("userName", this.userName);
|
||||||
saveConfig("passWord", this.passWord);
|
saveConfig("passWord", this.passWord);
|
||||||
formatAppLog("log", "at pages/index/index.vue:118", res.data.data.getRoles[0].authNames);
|
formatAppLog("log", "at pages/index/index.vue:119", res.data.data.getRoles[0].authNames);
|
||||||
saveConfig("roleName", res.data.data.getRoles[0].authNames);
|
saveConfig("roleName", res.data.data.getRoles[0].authNames);
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "/pages/main/main"
|
url: "/pages/main/main"
|
||||||
@ -231,7 +231,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/index/index.vue:147", "请求完成", event);
|
formatAppLog("log", "at pages/index/index.vue:148", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -319,7 +319,8 @@ if (uni.restoreGlobal) {
|
|||||||
vue.toDisplayString($data.serverIPAndPort),
|
vue.toDisplayString($data.serverIPAndPort),
|
||||||
1
|
1
|
||||||
/* TEXT */
|
/* TEXT */
|
||||||
)
|
),
|
||||||
|
vue.createElementVNode("view", null, "V1.0")
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@ -654,7 +655,7 @@ if (uni.restoreGlobal) {
|
|||||||
"MatSpec": "",
|
"MatSpec": "",
|
||||||
"IsEnable": null,
|
"IsEnable": null,
|
||||||
"PageNumber": 1,
|
"PageNumber": 1,
|
||||||
"PageSize": 20,
|
"PageSize": 300,
|
||||||
"UserName": this.userName,
|
"UserName": this.userName,
|
||||||
"DeviceType": "PDA"
|
"DeviceType": "PDA"
|
||||||
},
|
},
|
||||||
@ -779,6 +780,7 @@ if (uni.restoreGlobal) {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isMatConditionFoucused: false,
|
||||||
isNeedScanLocationCode: true,
|
isNeedScanLocationCode: true,
|
||||||
isNeedCallShelfCode: true,
|
isNeedCallShelfCode: true,
|
||||||
placeholderText: "请先扫描工位码",
|
placeholderText: "请先扫描工位码",
|
||||||
@ -818,27 +820,39 @@ if (uni.restoreGlobal) {
|
|||||||
this.userName = getConfig("userName", "admin");
|
this.userName = getConfig("userName", "admin");
|
||||||
const self = this;
|
const self = this;
|
||||||
recive(function(res) {
|
recive(function(res) {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:234", "Success:" + res.data);
|
formatAppLog("log", "at pages/bind/bind.vue:236", "Success:" + res.data);
|
||||||
self.analysisScanCode(res.data);
|
self.analysisScanCode(res.data);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:237", "Error:", JSON.stringify(err));
|
formatAppLog("log", "at pages/bind/bind.vue:239", "Error:", JSON.stringify(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleFocus() {
|
||||||
|
formatAppLog("log", "at pages/bind/bind.vue:244", "foucus");
|
||||||
|
this.isMatConditionFoucused = true;
|
||||||
|
},
|
||||||
|
handleBlur() {
|
||||||
|
formatAppLog("log", "at pages/bind/bind.vue:248", "bulur");
|
||||||
|
this.isMatConditionFoucused = false;
|
||||||
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:245", "扫码结果:", res.result);
|
formatAppLog("log", "at pages/bind/bind.vue:255", "扫码结果:", res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/bind/bind.vue:249", "扫码失败:", err);
|
formatAppLog("error", "at pages/bind/bind.vue:259", "扫码失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//扫码枪扫码
|
//扫码枪扫码
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
|
formatAppLog("log", "at pages/bind/bind.vue:266", this.isMatConditionFoucused);
|
||||||
|
if (this.isMatConditionFoucused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
||||||
this.locationCode = encodedString;
|
this.locationCode = encodedString;
|
||||||
this.getShelfInfoByLocationCode(true);
|
this.getShelfInfoByLocationCode(true);
|
||||||
@ -924,12 +938,12 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:358", "请求完成", event);
|
formatAppLog("log", "at pages/bind/bind.vue:373", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
bindSelectedMat: function(item) {
|
bindSelectedMat: function(item) {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:364", "用户选择了项目:", item);
|
formatAppLog("log", "at pages/bind/bind.vue:379", "用户选择了项目:", item);
|
||||||
this.matCode = item.matCode;
|
this.matCode = item.matCode;
|
||||||
this.matName = item.matName;
|
this.matName = item.matName;
|
||||||
this.matSpec = item.matSpec;
|
this.matSpec = item.matSpec;
|
||||||
@ -994,7 +1008,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:433", "请求完成", event);
|
formatAppLog("log", "at pages/bind/bind.vue:448", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1099,7 +1113,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:547", "请求完成", event);
|
formatAppLog("log", "at pages/bind/bind.vue:562", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1190,7 +1204,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:649", "请求完成", event);
|
formatAppLog("log", "at pages/bind/bind.vue:664", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1218,7 +1232,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.matQty = 0;
|
this.matQty = 0;
|
||||||
},
|
},
|
||||||
handlePopupClose() {
|
handlePopupClose() {
|
||||||
formatAppLog("log", "at pages/bind/bind.vue:681", "弹出层已关闭");
|
formatAppLog("log", "at pages/bind/bind.vue:696", "弹出层已关闭");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1256,15 +1270,17 @@ if (uni.restoreGlobal) {
|
|||||||
class: "uni-input",
|
class: "uni-input",
|
||||||
style: { "font-size": "50rpx", "padding": "10rpx" },
|
style: { "font-size": "50rpx", "padding": "10rpx" },
|
||||||
placeholder: $data.placeholderText,
|
placeholder: $data.placeholderText,
|
||||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event)
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event),
|
||||||
}, null, 8, ["placeholder"]), [
|
onFocus: _cache[2] || (_cache[2] = (...args) => $options.handleFocus && $options.handleFocus(...args)),
|
||||||
|
onBlur: _cache[3] || (_cache[3] = (...args) => $options.handleBlur && $options.handleBlur(...args))
|
||||||
|
}, null, 40, ["placeholder"]), [
|
||||||
[vue.vModelText, $data.matCodeCondition]
|
[vue.vModelText, $data.matCodeCondition]
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
vue.createElementVNode("view", { style: { "flex": "3" } }),
|
vue.createElementVNode("view", { style: { "flex": "3" } }),
|
||||||
vue.createElementVNode("view", { style: { "flex": "30" } }, [
|
vue.createElementVNode("view", { style: { "flex": "30" } }, [
|
||||||
vue.createElementVNode("button", {
|
vue.createElementVNode("button", {
|
||||||
onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
onClick: _cache[4] || (_cache[4] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
||||||
}, "查询")
|
}, "查询")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -1289,7 +1305,7 @@ if (uni.restoreGlobal) {
|
|||||||
}, [
|
}, [
|
||||||
vue.createElementVNode("picker", {
|
vue.createElementVNode("picker", {
|
||||||
range: $data.shelfTypeOptions,
|
range: $data.shelfTypeOptions,
|
||||||
onChange: _cache[3] || (_cache[3] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
|
onChange: _cache[5] || (_cache[5] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
|
||||||
"range-key": "shelfTypeName",
|
"range-key": "shelfTypeName",
|
||||||
value: $data.selectedShelfTypeIndex,
|
value: $data.selectedShelfTypeIndex,
|
||||||
style: { "font-size": "35rpx" }
|
style: { "font-size": "35rpx" }
|
||||||
@ -1312,7 +1328,7 @@ if (uni.restoreGlobal) {
|
|||||||
class: "mini-btn",
|
class: "mini-btn",
|
||||||
type: "warn",
|
type: "warn",
|
||||||
size: "mini",
|
size: "mini",
|
||||||
onClick: _cache[4] || (_cache[4] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
|
onClick: _cache[6] || (_cache[6] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
|
||||||
}, "呼叫货架")
|
}, "呼叫货架")
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
@ -1404,7 +1420,7 @@ if (uni.restoreGlobal) {
|
|||||||
class: "uni-input",
|
class: "uni-input",
|
||||||
style: { "font-size": "40rpx" },
|
style: { "font-size": "40rpx" },
|
||||||
placeholder: "请输入批次",
|
placeholder: "请输入批次",
|
||||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matBatch = $event)
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.matBatch = $event)
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
512
|
512
|
||||||
@ -1432,7 +1448,7 @@ if (uni.restoreGlobal) {
|
|||||||
type: "number",
|
type: "number",
|
||||||
style: { "font-size": "40rpx" },
|
style: { "font-size": "40rpx" },
|
||||||
placeholder: "请输入物料数量",
|
placeholder: "请输入物料数量",
|
||||||
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.matQty = $event)
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.matQty = $event)
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
512
|
512
|
||||||
@ -1443,7 +1459,7 @@ if (uni.restoreGlobal) {
|
|||||||
]),
|
]),
|
||||||
vue.createElementVNode("view", { style: { "flex": "40" } }, [
|
vue.createElementVNode("view", { style: { "flex": "40" } }, [
|
||||||
vue.createElementVNode("button", {
|
vue.createElementVNode("button", {
|
||||||
onClick: _cache[7] || (_cache[7] = (...args) => $options.bind && $options.bind(...args)),
|
onClick: _cache[9] || (_cache[9] = (...args) => $options.bind && $options.bind(...args)),
|
||||||
class: "mini-btn",
|
class: "mini-btn",
|
||||||
style: { "margin-left": "10rpx" },
|
style: { "margin-left": "10rpx" },
|
||||||
type: "warn",
|
type: "warn",
|
||||||
@ -1461,7 +1477,7 @@ if (uni.restoreGlobal) {
|
|||||||
range: $data.shelfAreaOptions,
|
range: $data.shelfAreaOptions,
|
||||||
"range-key": "locationAreaName",
|
"range-key": "locationAreaName",
|
||||||
value: $data.selectedShelfAreaIndex,
|
value: $data.selectedShelfAreaIndex,
|
||||||
onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
onChange: _cache[10] || (_cache[10] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
||||||
style: { "font-size": "35rpx" }
|
style: { "font-size": "35rpx" }
|
||||||
}, [
|
}, [
|
||||||
vue.createElementVNode(
|
vue.createElementVNode(
|
||||||
@ -1476,7 +1492,7 @@ if (uni.restoreGlobal) {
|
|||||||
vue.createElementVNode("button", {
|
vue.createElementVNode("button", {
|
||||||
style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" },
|
style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" },
|
||||||
size: "mini",
|
size: "mini",
|
||||||
onClick: _cache[9] || (_cache[9] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
|
onClick: _cache[11] || (_cache[11] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
|
||||||
}, "送货架")
|
}, "送货架")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -4522,6 +4538,7 @@ if (uni.restoreGlobal) {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
placeholderText: "请先扫描工位码",
|
placeholderText: "请先扫描工位码",
|
||||||
|
isMatConditionFoucused: false,
|
||||||
matCodeCondition: "",
|
matCodeCondition: "",
|
||||||
//物料编码搜索条件
|
//物料编码搜索条件
|
||||||
//工位ID 工位码
|
//工位ID 工位码
|
||||||
@ -4546,27 +4563,38 @@ if (uni.restoreGlobal) {
|
|||||||
this.userName = getConfig("userName", "admin");
|
this.userName = getConfig("userName", "admin");
|
||||||
const self = this;
|
const self = this;
|
||||||
recive(function(res) {
|
recive(function(res) {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:232", "Success:" + res.data);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:235", "Success:" + res.data);
|
||||||
self.analysisScanCode(res.data);
|
self.analysisScanCode(res.data);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:236", "Error:", JSON.stringify(err));
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:239", "Error:", JSON.stringify(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleFocus() {
|
||||||
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:244", "foucus");
|
||||||
|
this.isMatConditionFoucused = true;
|
||||||
|
},
|
||||||
|
handleBlur() {
|
||||||
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:248", "bulur");
|
||||||
|
this.isMatConditionFoucused = false;
|
||||||
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:244", "扫码结果:", res.result);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:255", "扫码结果:", res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:248", "扫码失败:", err);
|
formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:259", "扫码失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//扫码获取工位信息
|
//扫码获取工位信息
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
|
if (this.isMatConditionFoucused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
||||||
this.locationCode = encodedString;
|
this.locationCode = encodedString;
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
@ -4626,7 +4654,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.clearLocation();
|
this.clearLocation();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:329", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:344", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4718,7 +4746,7 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:433", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:448", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4821,7 +4849,8 @@ if (uni.restoreGlobal) {
|
|||||||
style: { "font-size": "50rpx", "padding": "10rpx" },
|
style: { "font-size": "50rpx", "padding": "10rpx" },
|
||||||
placeholder: $data.placeholderText,
|
placeholder: $data.placeholderText,
|
||||||
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
|
||||||
onBlur: _cache[4] || (_cache[4] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
onFocus: _cache[4] || (_cache[4] = (...args) => $options.handleFocus && $options.handleFocus(...args)),
|
||||||
|
onBlur: _cache[5] || (_cache[5] = (...args) => $options.handleBlur && $options.handleBlur(...args))
|
||||||
}, null, 40, ["placeholder"]), [
|
}, null, 40, ["placeholder"]), [
|
||||||
[vue.vModelText, $data.matCodeCondition]
|
[vue.vModelText, $data.matCodeCondition]
|
||||||
])
|
])
|
||||||
@ -4829,7 +4858,7 @@ if (uni.restoreGlobal) {
|
|||||||
vue.createElementVNode("view", { style: { "flex": "3" } }),
|
vue.createElementVNode("view", { style: { "flex": "3" } }),
|
||||||
vue.createElementVNode("view", { style: { "flex": "30" } }, [
|
vue.createElementVNode("view", { style: { "flex": "30" } }, [
|
||||||
vue.createElementVNode("button", {
|
vue.createElementVNode("button", {
|
||||||
onClick: _cache[5] || (_cache[5] = ($event) => $options.queryMatList(true))
|
onClick: _cache[6] || (_cache[6] = ($event) => $options.queryMatList(true))
|
||||||
}, "查询")
|
}, "查询")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -4875,8 +4904,8 @@ if (uni.restoreGlobal) {
|
|||||||
vue.renderList($data.cardData, (item, index) => {
|
vue.renderList($data.cardData, (item, index) => {
|
||||||
return vue.openBlock(), vue.createElementBlock("view", {
|
return vue.openBlock(), vue.createElementBlock("view", {
|
||||||
key: index,
|
key: index,
|
||||||
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
||||||
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
||||||
onLongpress: ($event) => $options.longpress(item)
|
onLongpress: ($event) => $options.longpress(item)
|
||||||
}, [
|
}, [
|
||||||
vue.createVNode(_component_Card, {
|
vue.createVNode(_component_Card, {
|
||||||
|
Reference in New Issue
Block a user