pda操作优化 支持手输货架编码和地码
This commit is contained in:
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<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" @focus="handleFocus"
|
:placeholder="placeholderText" v-model="matCodeCondition" @focus="handleFocus"
|
||||||
@blur="handleBlur"></input>
|
@blur="handleBlur"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -205,10 +205,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
||||||
placeholderText: '请先扫描工位码',
|
placeholderText: '请先扫描工位码',
|
||||||
isMatConditionFoucused : false,
|
isMatConditionFoucused: false,
|
||||||
matCodeCondition: '', //物料编码搜索条件
|
matCodeCondition: '', //物料编码搜索条件
|
||||||
//工位ID 工位码
|
//工位ID 工位码
|
||||||
locationId: 0,
|
locationId: 0,
|
||||||
@ -250,21 +248,20 @@
|
|||||||
},
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('扫码结果:', res.result);
|
console.log('扫码结果:', res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('扫码失败:', err);
|
console.error('扫码失败:', err);
|
||||||
// 处理扫码失败的情况
|
// 处理扫码失败的情况
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//扫码获取工位信息
|
//扫码获取工位信息
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
if(this.isMatConditionFoucused)
|
if (this.isMatConditionFoucused) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
@ -350,6 +347,23 @@
|
|||||||
|
|
||||||
//搜索获取物料信息
|
//搜索获取物料信息
|
||||||
queryMatList: function(isTip) {
|
queryMatList: function(isTip) {
|
||||||
|
//手输入工位码
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.locationCode == null || this.locationCode == '') {
|
if (this.locationCode == null || this.locationCode == '') {
|
||||||
if (isTip) {
|
if (isTip) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<view class="uni-input-wrapper" style="flex: 60;">
|
<view class="uni-input-wrapper" style="flex: 60;">
|
||||||
<input ref="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
<input ref="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
|
||||||
:placeholder="placeholderText" v-model="matCodeCondition" @blur="queryMatList"></input>
|
:placeholder="placeholderText" v-model="matCodeCondition"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="flex: 3;">
|
<view style="flex: 3;">
|
||||||
@ -444,6 +444,13 @@
|
|||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||||
this.shelfCode = encodedString;
|
this.shelfCode = encodedString;
|
||||||
|
|
||||||
|
//支持手动输入货架编码
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = '';
|
||||||
|
}
|
||||||
|
|
||||||
//获取当前货架和所在工位的信息
|
//获取当前货架和所在工位的信息
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
@ -562,7 +569,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '该货架不存在绑定的物料信息!',
|
title: '该货架不存在绑定的物料信息!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 2500
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -579,7 +586,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取失败:' + res.data.message,
|
title: '获取失败:' + res.data.message,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 3500
|
duration: 3800
|
||||||
});
|
});
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
@ -615,6 +622,7 @@
|
|||||||
this.placeholderText = '请先扫描货架码';
|
this.placeholderText = '请先扫描货架码';
|
||||||
this.cardData = null;
|
this.cardData = null;
|
||||||
this.recordCount = 0;
|
this.recordCount = 0;
|
||||||
|
this.shelfCode = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
//解决长按和滑动冲突的问题
|
//解决长按和滑动冲突的问题
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<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"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="flex: 3;">
|
<view style="flex: 3;">
|
||||||
@ -136,7 +136,7 @@
|
|||||||
matCode: '示例名称',
|
matCode: '示例名称',
|
||||||
matName: '这是一段示例描述',
|
matName: '这是一段示例描述',
|
||||||
matSpec: '',
|
matSpec: '',
|
||||||
matBatch:'',
|
matBatch: '',
|
||||||
matQty: 0,
|
matQty: 0,
|
||||||
};
|
};
|
||||||
const popup = ref(null);
|
const popup = ref(null);
|
||||||
@ -354,35 +354,21 @@
|
|||||||
methods: {
|
methods: {
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
console.log('扫码结果:', res.result);
|
console.log('扫码结果:', res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('扫码失败:', err);
|
console.error('扫码失败:', err);
|
||||||
// 处理扫码失败的情况
|
// 处理扫码失败的情况
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//扫码枪扫码
|
//扫码枪扫码
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||||
// // 分割字符串并转换为字节数组
|
|
||||||
// let byteStrings = encodedString.split(',');
|
|
||||||
// let byteArray = [];
|
|
||||||
// for (let byteString of byteStrings) {
|
|
||||||
// byteArray.push(parseInt(byteString, 10)); // 将字符串转换为十进制整数
|
|
||||||
// }
|
|
||||||
// // 将字节数组转换为UTF-8字符串
|
|
||||||
// // 注意:这里使用了一个简单的循环来构建字符串,因为String.fromCharCode.apply可能在大数据上性能不佳
|
|
||||||
// let originalString = '';
|
|
||||||
// for (let i = 0; i < byteArray.length; i++) {
|
|
||||||
// // 对于每个字节,使用fromCharCode转换为对应的字符
|
|
||||||
// // 注意:这里假设你的字节数组已经是正确的UTF-8编码,并且不需要额外的处理来组合多字节字符
|
|
||||||
// originalString += String.fromCharCode(byteArray[i]);
|
|
||||||
// }
|
|
||||||
this.shelfCode = encodedString;
|
this.shelfCode = encodedString;
|
||||||
//调用接口获取当前工位信息 当前工位是否有货架
|
//调用接口获取当前工位信息 当前工位是否有货架
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
@ -461,6 +447,11 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
queryMatList: function() {
|
queryMatList: function() {
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = '';
|
||||||
|
}
|
||||||
if (this.shelfCode == null || this.shelfCode == '') {
|
if (this.shelfCode == null || this.shelfCode == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先扫描货架码!',
|
title: '请先扫描货架码!',
|
||||||
@ -495,7 +486,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '该货架不存在绑定的物料信息!',
|
title: '该货架不存在绑定的物料信息!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 3000
|
||||||
});
|
});
|
||||||
this.clear();
|
this.clear();
|
||||||
return;
|
return;
|
||||||
@ -506,7 +497,7 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取成功!',
|
title: '获取成功!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 100
|
duration: 500
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<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"></input>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="flex: 3;">
|
<view style="flex: 3;">
|
||||||
@ -161,19 +161,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const saveData = () => {
|
const saveData = () => {
|
||||||
// console.log('fixedInfo.stocktakingQty' + fixedInfo.value.stocktakingQty);
|
|
||||||
// console.log('inputValue.value' + inputValue.value);
|
|
||||||
// console.log('fixedInfo.matQty' + fixedInfo.value.matQty);
|
|
||||||
|
|
||||||
// if (fixedInfo.value.stocktakingQty == -1 && inputValue.value == fixedInfo.value.matQty) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '本次修改未修改数量',
|
|
||||||
// icon: 'none',
|
|
||||||
// duration: 1500
|
|
||||||
// });
|
|
||||||
// hidePopup();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (fixedInfo.value.stocktakingQty != -1 && inputValue.value == fixedInfo.value.stocktakingQty) {
|
if (fixedInfo.value.stocktakingQty != -1 && inputValue.value == fixedInfo.value.stocktakingQty) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '本次修改未修改数量',
|
title: '本次修改未修改数量',
|
||||||
@ -319,6 +306,24 @@
|
|||||||
// 去除末尾的逗号和"..."(如果有的话)
|
// 去除末尾的逗号和"..."(如果有的话)
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, '');
|
||||||
this.shelfCode = encodedString;
|
this.shelfCode = encodedString;
|
||||||
|
|
||||||
|
//支持手动输入货架编码
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.shelfCode == null || this.shelfCode == '')
|
||||||
|
{
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先扫描货架码!',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2500
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//调用接口获取当前工位信息 当前工位是否有货架
|
//调用接口获取当前工位信息 当前工位是否有货架
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
uni.request({
|
uni.request({
|
||||||
|
119
PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
vendored
119
PDA/PDA/unpackage/dist/dev/app-plus/app-service.js
vendored
@ -3102,11 +3102,16 @@ if (uni.restoreGlobal) {
|
|||||||
this.clear();
|
this.clear();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:458", "请求完成", event);
|
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:444", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
queryMatList: function() {
|
queryMatList: function() {
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = "";
|
||||||
|
}
|
||||||
if (this.shelfCode == null || this.shelfCode == "") {
|
if (this.shelfCode == null || this.shelfCode == "") {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请先扫描货架码!",
|
title: "请先扫描货架码!",
|
||||||
@ -3140,7 +3145,7 @@ if (uni.restoreGlobal) {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "该货架不存在绑定的物料信息!",
|
title: "该货架不存在绑定的物料信息!",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 1500
|
duration: 3e3
|
||||||
});
|
});
|
||||||
this.clear();
|
this.clear();
|
||||||
return;
|
return;
|
||||||
@ -3150,7 +3155,7 @@ if (uni.restoreGlobal) {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "获取成功!",
|
title: "获取成功!",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 100
|
duration: 500
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -3178,7 +3183,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.clear();
|
this.clear();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:542", "请求完成", event);
|
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:533", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -3334,16 +3339,15 @@ 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[5] || (_cache[5] = ($event) => $data.matCodeCondition = $event),
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matCodeCondition = $event)
|
||||||
onBlur: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
}, null, 8, ["placeholder"]), [
|
||||||
}, 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[7] || (_cache[7] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
onClick: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
||||||
}, "查询")
|
}, "查询")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -3389,8 +3393,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[8] || (_cache[8] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
||||||
onTouchmove: _cache[9] || (_cache[9] = (...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, {
|
||||||
@ -3704,10 +3708,10 @@ 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/stockTaking/stockTaking.vue:291", "Success:" + res.data);
|
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:278", "Success:" + res.data);
|
||||||
self.analysisScanCode(res.data);
|
self.analysisScanCode(res.data);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:294", "Error:", JSON.stringify(err));
|
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:281", "Error:", JSON.stringify(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -3721,11 +3725,11 @@ if (uni.restoreGlobal) {
|
|||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:308", "扫码结果:", res.result);
|
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:295", "扫码结果:", res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/stockTaking/stockTaking.vue:312", "扫码失败:", err);
|
formatAppLog("error", "at pages/stockTaking/stockTaking.vue:299", "扫码失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -3733,6 +3737,19 @@ if (uni.restoreGlobal) {
|
|||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
||||||
this.shelfCode = encodedString;
|
this.shelfCode = encodedString;
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = "";
|
||||||
|
}
|
||||||
|
if (this.shelfCode == null || this.shelfCode == "") {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请先扫描货架码!",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2500
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "http://" + serverIPAndPort + "/pdaStocktaking/getStocktakingInfosByShelfCode",
|
url: "http://" + serverIPAndPort + "/pdaStocktaking/getStocktakingInfosByShelfCode",
|
||||||
@ -3794,7 +3811,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.clear();
|
this.clear();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:391", "请求完成", event);
|
formatAppLog("log", "at pages/stockTaking/stockTaking.vue:396", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -3954,16 +3971,15 @@ 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[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event)
|
||||||
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
|
}, null, 8, ["placeholder"]), [
|
||||||
}, 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[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
|
onClick: _cache[5] || (_cache[5] = ($event) => $options.analysisScanCode(this.shelfCode))
|
||||||
}, "查询")
|
}, "查询")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -4009,8 +4025,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[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
||||||
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
||||||
onLongpress: ($event) => $options.longpress(item)
|
onLongpress: ($event) => $options.longpress(item)
|
||||||
}, [
|
}, [
|
||||||
vue.createVNode(_component_StocktakingCard, {
|
vue.createVNode(_component_StocktakingCard, {
|
||||||
@ -4582,30 +4598,30 @@ 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:235", "Success:" + res.data);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:233", "Success:" + res.data);
|
||||||
self.analysisScanCode(res.data);
|
self.analysisScanCode(res.data);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:239", "Error:", JSON.stringify(err));
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:237", "Error:", JSON.stringify(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus() {
|
handleFocus() {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:244", "foucus");
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:242", "foucus");
|
||||||
this.isMatConditionFoucused = true;
|
this.isMatConditionFoucused = true;
|
||||||
},
|
},
|
||||||
handleBlur() {
|
handleBlur() {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:248", "bulur");
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:246", "bulur");
|
||||||
this.isMatConditionFoucused = false;
|
this.isMatConditionFoucused = false;
|
||||||
},
|
},
|
||||||
//摄像头扫码
|
//摄像头扫码
|
||||||
cameraScanCode() {
|
cameraScanCode() {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:255", "扫码结果:", res.result);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:253", "扫码结果:", res.result);
|
||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:259", "扫码失败:", err);
|
formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:257", "扫码失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -4673,12 +4689,26 @@ if (uni.restoreGlobal) {
|
|||||||
this.clearLocation();
|
this.clearLocation();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:344", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:341", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//搜索获取物料信息
|
//搜索获取物料信息
|
||||||
queryMatList: function(isTip) {
|
queryMatList: function(isTip) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
if (this.locationCode == null || this.locationCode == "") {
|
if (this.locationCode == null || this.locationCode == "") {
|
||||||
if (isTip) {
|
if (isTip) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -4765,7 +4795,7 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:448", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:462", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -5210,6 +5240,11 @@ if (uni.restoreGlobal) {
|
|||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
|
||||||
this.shelfCode = encodedString;
|
this.shelfCode = encodedString;
|
||||||
|
const regex = /^[1-9]\d{5}$/;
|
||||||
|
if (regex.test(this.matCodeCondition)) {
|
||||||
|
this.shelfCode = this.matCodeCondition;
|
||||||
|
this.matCodeCondition = "";
|
||||||
|
}
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "http://" + serverIPAndPort + "/pdaProductionLineCallOut/getShelfInfoForCallOut",
|
url: "http://" + serverIPAndPort + "/pdaProductionLineCallOut/getShelfInfoForCallOut",
|
||||||
@ -5274,7 +5309,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.clear();
|
this.clear();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:524", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:531", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -5312,7 +5347,7 @@ if (uni.restoreGlobal) {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "该货架不存在绑定的物料信息!",
|
title: "该货架不存在绑定的物料信息!",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 1500
|
duration: 2500
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -5327,7 +5362,7 @@ if (uni.restoreGlobal) {
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "获取失败:" + res.data.message,
|
title: "获取失败:" + res.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 3500
|
duration: 3800
|
||||||
});
|
});
|
||||||
this.clear();
|
this.clear();
|
||||||
}
|
}
|
||||||
@ -5349,7 +5384,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.clear();
|
this.clear();
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:607", "请求完成", event);
|
formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:614", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -5358,6 +5393,7 @@ if (uni.restoreGlobal) {
|
|||||||
this.placeholderText = "请先扫描货架码";
|
this.placeholderText = "请先扫描货架码";
|
||||||
this.cardData = null;
|
this.cardData = null;
|
||||||
this.recordCount = 0;
|
this.recordCount = 0;
|
||||||
|
this.shelfCode = "";
|
||||||
},
|
},
|
||||||
//解决长按和滑动冲突的问题
|
//解决长按和滑动冲突的问题
|
||||||
cardTouchStart(e) {
|
cardTouchStart(e) {
|
||||||
@ -5499,16 +5535,15 @@ 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[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event)
|
||||||
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
|
}, null, 8, ["placeholder"]), [
|
||||||
}, 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[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
|
onClick: _cache[5] || (_cache[5] = ($event) => $options.analysisScanCode(this.shelfCode))
|
||||||
}, "查询")
|
}, "查询")
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@ -5554,8 +5589,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[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
|
||||||
onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
|
||||||
onLongpress: ($event) => $options.longpress(item)
|
onLongpress: ($event) => $options.longpress(item)
|
||||||
}, [
|
}, [
|
||||||
vue.createVNode(_component_Card, {
|
vue.createVNode(_component_Card, {
|
||||||
@ -5582,7 +5617,7 @@ if (uni.restoreGlobal) {
|
|||||||
range: $data.shelfAreaOptions,
|
range: $data.shelfAreaOptions,
|
||||||
"range-key": "locationAreaName",
|
"range-key": "locationAreaName",
|
||||||
value: $data.selectedShelfAreaIndex,
|
value: $data.selectedShelfAreaIndex,
|
||||||
onChange: _cache[9] || (_cache[9] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
||||||
style: { "font-size": "35rpx" }
|
style: { "font-size": "35rpx" }
|
||||||
}, [
|
}, [
|
||||||
vue.createElementVNode(
|
vue.createElementVNode(
|
||||||
@ -5605,7 +5640,7 @@ if (uni.restoreGlobal) {
|
|||||||
range: $data.shelfTypeOptions,
|
range: $data.shelfTypeOptions,
|
||||||
"range-key": "text",
|
"range-key": "text",
|
||||||
value: $data.selectedShelfTypeIndex,
|
value: $data.selectedShelfTypeIndex,
|
||||||
onChange: _cache[10] || (_cache[10] = (...args) => $options.onShelfTypeChange && $options.onShelfTypeChange(...args)),
|
onChange: _cache[9] || (_cache[9] = (...args) => $options.onShelfTypeChange && $options.onShelfTypeChange(...args)),
|
||||||
style: { "font-size": "35rpx", "width": "200rpx", "font-weight": "" }
|
style: { "font-size": "35rpx", "width": "200rpx", "font-weight": "" }
|
||||||
}, [
|
}, [
|
||||||
vue.createElementVNode(
|
vue.createElementVNode(
|
||||||
@ -5620,7 +5655,7 @@ if (uni.restoreGlobal) {
|
|||||||
vue.createCommentVNode(" 货架送回按钮 "),
|
vue.createCommentVNode(" 货架送回按钮 "),
|
||||||
vue.createElementVNode("button", {
|
vue.createElementVNode("button", {
|
||||||
style: { "width": "200rpx", "margin": "2rpx", "background": "green", "color": "white" },
|
style: { "width": "200rpx", "margin": "2rpx", "background": "green", "color": "white" },
|
||||||
onClick: _cache[11] || (_cache[11] = (...args) => $options.sendBackShelf && $options.sendBackShelf(...args))
|
onClick: _cache[10] || (_cache[10] = (...args) => $options.sendBackShelf && $options.sendBackShelf(...args))
|
||||||
}, "货架送回")
|
}, "货架送回")
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
|
@ -154,13 +154,22 @@ namespace WCS.WebApi.Controllers
|
|||||||
if (shelfInfo.TransStatus == TransStatusEnum.运输中)
|
if (shelfInfo.TransStatus == TransStatusEnum.运输中)
|
||||||
{
|
{
|
||||||
shelfInfo.ShelfCode = shelfInfo.ShelfCode + "(运输中)";
|
shelfInfo.ShelfCode = shelfInfo.ShelfCode + "(运输中)";
|
||||||
|
return new ResponseCommon()
|
||||||
|
{
|
||||||
|
Code = 301,
|
||||||
|
Message = $"当前工位[{locationInfo.LocationCode}]\r\n已被货架[{shelfInfo.ShelfCode}]占用\r\n请等待AGV运输!",
|
||||||
|
Data = null,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return new ResponseCommon()
|
else
|
||||||
{
|
{
|
||||||
Code = 301,
|
return new ResponseCommon()
|
||||||
Message = $"当前工位[{locationInfo.LocationCode}]\r\n已被货架[{shelfInfo.ShelfCode}]占用\r\n请等待AGV运输!",
|
{
|
||||||
Data = null,
|
Code = 301,
|
||||||
};
|
Message = $"当前工位[{locationInfo.LocationCode}]\r\n已被货架[{shelfInfo.ShelfCode}]占用\r\n请尝试解绑地码上的货架!",
|
||||||
|
Data = null,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user