PDA端增加调用摄像头扫码

This commit is contained in:
hehaibing-1996
2025-02-26 15:45:53 +08:00
parent 4fb027bc9b
commit 1788149145
8 changed files with 273 additions and 73 deletions

View File

@ -40,7 +40,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -302,6 +302,20 @@
this.selectedtaskStatusIndex = e.detail.value;
this.analysisScanCode();
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码枪扫码
analysisScanCode: function() {
//获取任务
var serverIPAndPort = getServerIPAndPort();

View File

@ -8,7 +8,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -214,6 +214,20 @@
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');

View File

@ -20,7 +20,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -237,6 +237,19 @@
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码获取工位信息
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)

View File

@ -31,7 +31,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -339,7 +339,7 @@
//货架送回区域是否选择
if (shelfAreaOptions[selectedShelfAreaIndex].locationAreaName = '请先扫货架码') {
uni.showToast({
title: '该位置未绑定货架区域,请确认!',
title: '请选择货架送回区域!',
icon: 'none',
duration: 1500
});
@ -420,6 +420,20 @@
}
});
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');

View File

@ -35,7 +35,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -346,6 +346,20 @@
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');

View File

@ -6,7 +6,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -130,6 +130,23 @@
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
if (this.shelfId == 0) {
this.analysisScanCode(res.result);
} else {
this.saveScanedShelfCode(res.result);
}
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
@ -375,7 +392,7 @@
//清空当前界面所有内容
clear: function() {
this.placeholderText = '请先扫描';
this.placeholderText = '请先扫描货架码';
this.shelfCodeCondition = '';
this.shelfId = 0;

View File

@ -35,7 +35,7 @@
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" style="flex: 12;padding-top: 20rpx;">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
@ -295,6 +295,20 @@
cardClass: function(item) {
return item.stocktakingQty == -1 ? 'cardNoStocktaking' : 'cardYesStocktaking';
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
console.log('扫码结果:', res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
console.error('扫码失败:', err);
// 处理扫码失败的情况
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
// 去除末尾的逗号和"..."(如果有的话)
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');

View File

@ -745,6 +745,19 @@ if (uni.restoreGlobal) {
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/bind/bind.vue:221", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/bind/bind.vue:225", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.locationCode = encodedString;
@ -829,12 +842,12 @@ if (uni.restoreGlobal) {
}
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:311", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:325", "请求完成", event);
}
});
},
bindSelectedMat: function(item) {
formatAppLog("log", "at pages/bind/bind.vue:317", "用户选择了项目:", item);
formatAppLog("log", "at pages/bind/bind.vue:331", "用户选择了项目:", item);
this.matCode = item.matCode;
this.matName = item.matName;
this.matSpec = item.matSpec;
@ -898,7 +911,7 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:385", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:399", "请求完成", event);
}
});
},
@ -1003,7 +1016,7 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:498", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:512", "请求完成", event);
}
});
},
@ -1094,7 +1107,7 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/bind/bind.vue:600", "请求完成", event);
formatAppLog("log", "at pages/bind/bind.vue:614", "请求完成", event);
}
});
},
@ -1120,7 +1133,7 @@ if (uni.restoreGlobal) {
this.matSpec = "";
},
handlePopupClose() {
formatAppLog("log", "at pages/bind/bind.vue:630", "弹出层已关闭");
formatAppLog("log", "at pages/bind/bind.vue:644", "弹出层已关闭");
}
}
};
@ -1140,6 +1153,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[0] || (_cache[0] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -1156,8 +1170,8 @@ if (uni.restoreGlobal) {
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))
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
@ -1165,7 +1179,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
onClick: _cache[3] || (_cache[3] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, "查询")
])
])
@ -1190,7 +1204,7 @@ if (uni.restoreGlobal) {
}, [
vue.createElementVNode("picker", {
range: $data.shelfTypeOptions,
onChange: _cache[3] || (_cache[3] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
onChange: _cache[4] || (_cache[4] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
"range-key": "shelfTypeName",
value: $data.selectedShelfTypeIndex,
style: { "font-size": "35rpx" }
@ -1213,7 +1227,7 @@ if (uni.restoreGlobal) {
class: "mini-btn",
type: "warn",
size: "mini",
onClick: _cache[4] || (_cache[4] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
onClick: _cache[5] || (_cache[5] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
}, "呼叫货架")
])
]),
@ -1304,7 +1318,7 @@ if (uni.restoreGlobal) {
class: "uni-input",
style: { "font-size": "40rpx" },
placeholder: "请输入物料数量",
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matQty = $event)
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.matQty = $event)
},
null,
512
@ -1315,7 +1329,7 @@ if (uni.restoreGlobal) {
]),
vue.createElementVNode("view", { style: { "flex": "40" } }, [
vue.createElementVNode("button", {
onClick: _cache[6] || (_cache[6] = (...args) => $options.bind && $options.bind(...args)),
onClick: _cache[7] || (_cache[7] = (...args) => $options.bind && $options.bind(...args)),
class: "mini-btn",
style: { "margin-left": "10rpx" },
type: "warn",
@ -1332,7 +1346,7 @@ if (uni.restoreGlobal) {
range: $data.shelfAreaOptions,
"range-key": "locationAreaName",
value: $data.selectedShelfAreaIndex,
onChange: _cache[7] || (_cache[7] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
style: { "font-size": "35rpx" }
}, [
vue.createElementVNode(
@ -1347,7 +1361,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("button", {
style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" },
size: "mini",
onClick: _cache[8] || (_cache[8] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
onClick: _cache[9] || (_cache[9] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
}, "送货架")
])
])
@ -2858,6 +2872,19 @@ if (uni.restoreGlobal) {
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:353", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/queryBindList/queryBindList.vue:357", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.shelfCode = encodedString;
@ -2923,7 +2950,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:437", "请求完成", event);
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:451", "请求完成", event);
}
});
},
@ -2998,7 +3025,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:522", "请求完成", event);
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:536", "请求完成", event);
}
});
},
@ -3127,6 +3154,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[4] || (_cache[4] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -3143,8 +3171,8 @@ if (uni.restoreGlobal) {
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[5] || (_cache[5] = (...args) => $options.queryMatList && $options.queryMatList(...args))
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
@ -3152,7 +3180,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
onClick: _cache[7] || (_cache[7] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, "查询")
])
])
@ -3198,8 +3226,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onTouchstart: _cache[8] || (_cache[8] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[9] || (_cache[9] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_Card, {
@ -3505,6 +3533,19 @@ if (uni.restoreGlobal) {
cardClass: function(item) {
return item.stocktakingQty == -1 ? "cardNoStocktaking" : "cardYesStocktaking";
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:302", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/stockTaking/stockTaking.vue:306", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.shelfCode = encodedString;
@ -3569,7 +3610,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:371", "请求完成", event);
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:385", "请求完成", event);
}
});
},
@ -3702,6 +3743,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[3] || (_cache[3] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -3718,8 +3760,8 @@ if (uni.restoreGlobal) {
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) => _ctx.queryMatList && _ctx.queryMatList(...args))
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
@ -3727,7 +3769,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[5] || (_cache[5] = ($event) => $options.analysisScanCode(this.shelfCode))
onClick: _cache[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
}, "查询")
])
])
@ -3773,8 +3815,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_StocktakingCard, {
@ -3826,6 +3868,22 @@ if (uni.restoreGlobal) {
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:137", "扫码结果:", res.result);
if (this.shelfId == 0) {
this.analysisScanCode(res.result);
} else {
this.saveScanedShelfCode(res.result);
}
},
fail: (err) => {
formatAppLog("error", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:145", "扫码失败:", err);
}
});
},
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.shelfCodeCondition = encodedString;
@ -3886,7 +3944,7 @@ if (uni.restoreGlobal) {
}
},
fail: (err) => {
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:201", err.errMsg);
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:218", err.errMsg);
uni.showToast({
title: "请求失败" + err.errMsg,
icon: "none",
@ -3895,7 +3953,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:212", "请求完成", event);
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:229", "请求完成", event);
}
});
},
@ -3972,7 +4030,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:297", "请求完成", event);
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:314", "请求完成", event);
}
});
},
@ -4038,13 +4096,13 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:371", "请求完成", event);
formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:388", "请求完成", event);
}
});
},
//清空当前界面所有内容
clear: function() {
this.placeholderText = "请先扫描";
this.placeholderText = "请先扫描货架码";
this.shelfCodeCondition = "";
this.shelfId = 0;
this.shelfCode = "";
@ -4067,6 +4125,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[0] || (_cache[0] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -4083,8 +4142,8 @@ if (uni.restoreGlobal) {
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.shelfCodeCondition = $event),
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.shelfCodeCondition = $event),
onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.shelfCodeCondition]
])
@ -4092,7 +4151,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[2] || (_cache[2] = (...args) => $options.clear && $options.clear(...args))
onClick: _cache[3] || (_cache[3] = (...args) => $options.clear && $options.clear(...args))
}, "清空")
])
])
@ -4180,12 +4239,12 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "40", "text-align": "center" } }, [
vue.createElementVNode("button", {
style: { "margin": "50rpx", "font-size": "40rpx" },
onClick: _cache[3] || (_cache[3] = (...args) => $options.bind && $options.bind(...args)),
onClick: _cache[4] || (_cache[4] = (...args) => $options.bind && $options.bind(...args)),
size: "mini"
}, "绑  定"),
vue.createElementVNode("button", {
style: { "margin": "50rpx", "font-size": "40rpx", "background-color": "red" },
onClick: _cache[4] || (_cache[4] = (...args) => $options.unbind && $options.unbind(...args)),
onClick: _cache[5] || (_cache[5] = (...args) => $options.unbind && $options.unbind(...args)),
size: "mini"
}, "解  绑")
])
@ -4315,6 +4374,18 @@ if (uni.restoreGlobal) {
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:244", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:248", "扫码失败:", err);
}
});
},
//扫码获取工位信息
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
@ -4376,7 +4447,7 @@ if (uni.restoreGlobal) {
this.clearLocation();
},
complete: (event) => {
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:316", "请求完成", event);
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:329", "请求完成", event);
}
});
},
@ -4468,7 +4539,7 @@ if (uni.restoreGlobal) {
}
},
complete: (event) => {
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:420", "请求完成", event);
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:433", "请求完成", event);
}
});
},
@ -4553,6 +4624,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[2] || (_cache[2] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -4569,8 +4641,8 @@ if (uni.restoreGlobal) {
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[3] || (_cache[3] = (...args) => $options.queryMatList && $options.queryMatList(...args))
"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]
])
@ -4578,7 +4650,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[4] || (_cache[4] = ($event) => $options.queryMatList(true))
onClick: _cache[5] || (_cache[5] = ($event) => $options.queryMatList(true))
}, "查询")
])
])
@ -4624,8 +4696,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[5] || (_cache[5] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[6] || (_cache[6] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_Card, {
@ -4829,7 +4901,7 @@ if (uni.restoreGlobal) {
}
if (shelfAreaOptions[selectedShelfAreaIndex].locationAreaName = "请先扫货架码") {
uni.showToast({
title: "该位置未绑定货架区域,请确认!",
title: "请选择货架送回区域!",
icon: "none",
duration: 1500
});
@ -4898,6 +4970,19 @@ if (uni.restoreGlobal) {
}
});
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:427", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/productionLineCallOut/productionLineCallOut.vue:431", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.shelfCode = encodedString;
@ -4960,7 +5045,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:498", "请求完成", event);
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:512", "请求完成", event);
}
});
},
@ -5035,7 +5120,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:581", "请求完成", event);
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:595", "请求完成", event);
}
});
},
@ -5158,6 +5243,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[3] || (_cache[3] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -5174,8 +5260,8 @@ if (uni.restoreGlobal) {
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) => _ctx.queryMatList && _ctx.queryMatList(...args))
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
@ -5183,7 +5269,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[5] || (_cache[5] = ($event) => $options.analysisScanCode(this.shelfCode))
onClick: _cache[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
}, "查询")
])
])
@ -5229,8 +5315,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_Card, {
@ -5256,7 +5342,7 @@ if (uni.restoreGlobal) {
range: $data.shelfAreaOptions,
"range-key": "locationAreaName",
value: $data.selectedShelfAreaIndex,
onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
onChange: _cache[9] || (_cache[9] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
style: { "font-size": "35rpx" }
}, [
vue.createElementVNode(
@ -5278,7 +5364,7 @@ if (uni.restoreGlobal) {
range: $data.shelfTypeOptions,
"range-key": "text",
value: $data.selectedShelfTypeIndex,
onChange: _cache[9] || (_cache[9] = (...args) => $options.onShelfTypeChange && $options.onShelfTypeChange(...args)),
onChange: _cache[10] || (_cache[10] = (...args) => $options.onShelfTypeChange && $options.onShelfTypeChange(...args)),
style: { "font-size": "35rpx", "width": "200rpx" }
}, [
vue.createElementVNode(
@ -5293,7 +5379,7 @@ if (uni.restoreGlobal) {
vue.createCommentVNode(" 货架送回按钮 "),
vue.createElementVNode("button", {
style: { "width": "200rpx", "margin": "2rpx", "background": "green", "color": "white" },
onClick: _cache[10] || (_cache[10] = (...args) => $options.sendBackShelf && $options.sendBackShelf(...args))
onClick: _cache[11] || (_cache[11] = (...args) => $options.sendBackShelf && $options.sendBackShelf(...args))
}, "货架送回")
])
]);
@ -5586,6 +5672,19 @@ if (uni.restoreGlobal) {
this.selectedtaskStatusIndex = e.detail.value;
this.analysisScanCode();
},
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/agvTasks/agvTasks.vue:309", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/agvTasks/agvTasks.vue:313", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function() {
var serverIPAndPort = getServerIPAndPort();
uni.request({
@ -5644,7 +5743,7 @@ if (uni.restoreGlobal) {
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/agvTasks/agvTasks.vue:372", "请求完成", event);
formatAppLog("log", "at pages/agvTasks/agvTasks.vue:386", "请求完成", event);
}
});
},
@ -5683,7 +5782,7 @@ if (uni.restoreGlobal) {
return;
},
complete: (event) => {
formatAppLog("log", "at pages/agvTasks/agvTasks.vue:420", "请求完成", event);
formatAppLog("log", "at pages/agvTasks/agvTasks.vue:434", "请求完成", event);
}
});
},
@ -5810,6 +5909,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[2] || (_cache[2] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
@ -5826,8 +5926,8 @@ if (uni.restoreGlobal) {
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[3] || (_cache[3] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[4] || (_cache[4] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
}, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
@ -5835,7 +5935,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", {
onClick: _cache[4] || (_cache[4] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
onClick: _cache[5] || (_cache[5] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
}, "查询")
])
])
@ -5866,7 +5966,7 @@ if (uni.restoreGlobal) {
}, [
vue.createElementVNode("picker", {
range: $data.taskStatusOptions,
onChange: _cache[5] || (_cache[5] = (...args) => $options.onTaskStatusChange && $options.onTaskStatusChange(...args)),
onChange: _cache[6] || (_cache[6] = (...args) => $options.onTaskStatusChange && $options.onTaskStatusChange(...args)),
"range-key": "taskStatusName",
value: $data.selectedtaskStatusIndex
}, [
@ -5899,8 +5999,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_TaskCard, {