1.PDA增加厂内物料查询的功能

2.PDA增加自动校验版本、自动升级功能
This commit is contained in:
hehaibing-1996
2025-03-20 18:21:05 +08:00
parent e6a7ad94d7
commit aaf9352414
8 changed files with 1065 additions and 72 deletions

View File

@ -75,6 +75,13 @@
{
"navigationBarTitleText" : "智慧物流系统-任务管理"
}
},
{
"path" : "pages/allBindQuery/allBindQuery",
"style" :
{
"navigationBarTitleText" : "智慧物流系统-厂内物料查询"
}
}
],
"globalStyle": {

View File

@ -0,0 +1,408 @@
<template>
<view class="bg-image">
<view class="diy-flex-row">
<view style="flex: 3">
<!-- 占位 -->
</view>
<view style="flex: 80;margin: 5rpx;">
<view class="diy-flex-row">
<view class="rightImageContainer" @click="cameraScanCode" style="flex: 12;padding-top: 20rpx;">
<image style="width: 60rpx;height: 60rpx" src="/static/scan.png" />
</view>
<view class="uni-input-wrapper" style="flex: 60;">
<input id="inputMatCode" class="uni-input" style="font-size: 50rpx; padding: 10rpx;"
:placeholder="placeholderText" v-model="matCodeCondition"></input>
</view>
<view style="flex: 3;">
</view>
<view style="flex: 30;">
<button @click="queryMatList">查询</button>
</view>
</view>
</view>
<view style="flex: 2">
<!-- 占位 -->
</view>
</view>
<view class="diy-flex-column" style="margin-top: 5rpx;">
<view class="diy-flex-inforow">
<view style="width: 10rpx;"></view>
<view style="width: 275rpx;">记录数:[{{recordCount}}]</view>
<view style="width: 10rpx;"></view>
<!-- <view style="width: 455rpx;">货架码:{{shelfCode}}</view> -->
</view>
</view>
<view class="diy-flex-column" style="margin-top: 5rpx;">
<scroll-view class="scroll-view" scroll-y="true">
<view v-for="(item, index) in cardData" :key="index" @touchstart="cardTouchStart"
@touchmove="cardTouchMove" @longpress="longpress(item)">
<Card :item="item" :currentIndex="index" :cardData="cardData" />
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import bindSelectMat from '@/pages/bindSelectMat/bindSelectMat.vue';
import {
recive
} from '../../src/libs/Broadcast.js';
import {
unregisterReceiver
} from '../../src/libs/Broadcast.js';
import {
getConfig
} from '@/config.js';
import {
saveConfig
} from '@/config.js';
import {
getServerIPAndPort
} from '@/config.js';
import Card from '@/components/Card.vue';
import {
ref,
nextTick
} from 'vue';
import uniPopup from '@/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup';
import {
getCurrentInstance
} from 'vue';
export default {
components: {
uniPopup,
Card
},
data() {
return {
locationId: null,
locationCode: '',
userName: '', //当前登录的用户名
recordCount: 0,
shelfId: null,
shelfCode: '',
placeholderText: '输入物料编码搜索',
matCodeCondition: '', //物料编码搜索条件
cardData: null,
//监控滑动的位置
touchStartX: 0,
touchStartY: 0,
isMove: false, //滑动标识 是否滑动
}
},
onShow: function() {
this.userName = getConfig('userName', 'admin');
const self = this; // 保存this的引用
recive(function(res) {
console.log("Success:" + res.data);
self.analysisScanCode(res.data);
}, function(err) {
console.log("Error:", JSON.stringify(err)); // 正确打印错误信息
});
},
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*\.\.\.$/, '');
this.matCodeCondition = encodedString;
//货架编码
const regex = /^[1-9]\d{5}$/;
if (regex.test(this.matCodeCondition)) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = '';
this.queryMatList();
return;
}
//地码
const regex1 = /^\d{6}XY\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = '';
this.queryMatList();
return;
}
const regex2 = /^\d{6}xy\d{6}$/;
if (regex2.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = '';
this.queryMatList();
return;
}
},
queryMatList: function() {
if (this.matCodeCondition != '' && this.matCodeCondition != null) {
const regex = /^[1-9]\d{5}$/;
if (regex.test(this.matCodeCondition)) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = '';
}
//地码
const regex1 = /^\d{6}XY\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = '';
}
const regex2 = /^\d{6}xy\d{6}$/;
if (regex2.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = '';
}
}
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: 'http://' + serverIPAndPort +
'/matDetailCurrenInfo/getMatDetailCurrentInfosWithOrder', // 请求的接口地址
method: 'POST', // 设置请求方式为 POST
data: {
"locationCode": this.locationCode,
"shelfCode": this.shelfCode,
"matCode": this.matCodeCondition,
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 600
},
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
//未查询到信息
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: '该货架不存在绑定的物料信息!',
icon: 'none',
duration: 3000
});
this.clear();
return;
}
//有物料信息
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
//获取成功后复位查询条件
this.shelfCode = '';
this.locationCode = '';
uni.showToast({
title: '获取成功!',
icon: 'none',
duration: 500
});
} else {
uni.showToast({
title: '获取失败:' + res.data.message,
icon: 'none',
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: '服务器返回错误状态码' + res.statusCode,
icon: 'none',
duration: 3000
});
this.clear();
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败:' + err.errMsg,
icon: 'none',
duration: 3000
});
this.clear();
},
complete: (event) => {
// 请求完成的回调函数(无论成功或失败都会调用)
console.log('请求完成', event);
}
});
},
//清空当前界面所有内容
clear: function() {
this.placeholderText = '请先扫描货架码';
this.cardData = null;
this.recordCount = 0;
},
//解决长按和滑动冲突的问题
cardTouchStart(e) {
this.isMove = false;
this.touchStartX = e.touches[0].clientX;
this.touchStartY = e.touches[0].clientY;
},
cardTouchMove(e) {
var deltaX = e.changedTouches[0].clientX - this.touchStartX;
var deltaY = e.changedTouches[0].clientY - this.touchStartY;
if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
this.isMove = true;
}
},
//长按
longpress(item) {
if (this.isMove == false) {
uni.showToast({
title: '此功能仅供查询\r\n无法修改数量',
icon: 'none',
duration: 2000
});
}
},
}
}
</script>
<style>
.uni-input-wrapper {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
flex-wrap: nowrap;
background-color: #FFFFFF;
}
.mini-btn {
margin-right: 10rpx;
}
.bg-image {
background-image: url('/static/background.png');
/* 背景图片路径 */
background-size: cover;
/* 背景图片覆盖整个元素 */
background-position: center;
/* 背景图片居中 */
height: 100%;
/* 视图高度设置为100% */
width: 100%;
/* 视图宽度设置为100% */
position: fixed;
/* 视图定位为固定 */
top: 0;
left: 0;
/* z-index: -1; */
}
.diy-flex-row {
display: flex;
flex-direction: row;
margin-top: 15rpx;
margin-bottom: 15rpx;
font-size: 50rpx;
}
.diy-flex-column {
display: flex;
flex-direction: column;
}
.diy-flex-inforow {
display: flex;
flex-direction: row;
font-size: 40rpx;
font-weight: 500;
margin-top: 8rpx;
margin-bottom: 8rpx;
}
.scroll-view {
height: 81vh;
}
.popup-content {
padding: 20px;
background-color: rgba(0, 0, 0, 1);
background-color: white;
z-index: 2;
border-radius: 20rpx;
}
.input-item {
margin-bottom: 5rpx;
display: flex;
align-items: center;
/* 让内部元素垂直居中 */
}
.input-item label {
display: inline-block;
}
.input-item input {
display: inline-block;
background: wheat;
width: 280rpx;
}
.button-group {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
}
.button-group button {
margin-top: 25rpx;
padding: 10rpx 10rpx;
border: none;
border-radius: 5px;
background-color: #007AFF;
color: #fff;
cursor: pointer;
}
</style>

View File

@ -36,9 +36,15 @@
plain="true">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
</view>
<view style="margin-top:70rpx;margin-bottom: 20rpx;text-align: center;">
<view>{{serverIPAndPort}}</view>
<view >V1.1</view>
<view>{{version}}</view>
</view>
<view style="margin-top:20rpx;margin-bottom: 20rpx;text-align: center;" v-if="showProgressBar">
<progress :percent="downloadProgress" show-info stroke-width="10" />
</view>
</view>
@ -65,6 +71,7 @@
saveConfig
} from '@/config.js';
export default {
data() {
return {
@ -73,10 +80,73 @@
userName: '',
passWord: '',
serverIPAndPort: '',
version: 'V1.3',
downloadProgress: 0, // 下载进度
showProgressBar: false, // 控制进度条是否显示
}
},
onShow: function() {
this.serverIPAndPort = getServerIPAndPort();
if(this.showProgressBar)
{
return;
}
//获取最新版的APP接口
uni.request({
url: 'http://' + this.serverIPAndPort + '/fileDownload/getLatestAppVersion', // 请求的接口地址
method: 'GET ', // 设置请求方式为 POST
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
if (this.version != res.data.data.version)
uni.showModal({
title: '版本更新',
content: `发现新版本 ${res.data.data.version},是否立即更新?`,
success: (res1) => {
if (res1.confirm) {
var downloadUrl = 'http://' + this.serverIPAndPort +
'/fileDownload/downloadApp?fileName=' + res.data
.data.appName;
// 用户点击了确定,开始下载
this.downloadApk(downloadUrl);
} else if (res.cancel) {
// 用户点击了取消
console.log('用户取消了更新');
}
}
});
// uni.showToast({
// title: '获取到版本号' + res.data.data.version + '\r\n' + '当前版本' + this.version,
// icon: 'none',
// duration: 2000
// });
//拼凑下载地址
} else {
}
} else {
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败:' + '请检查网络连接',
icon: 'none',
duration: 2000
});
},
complete: (event) => {
}
});
},
onLoad: function() {
//加载上一次的用户名
@ -88,6 +158,74 @@
unregisterReceiver()
},
methods: {
//下载APK文件
downloadApk(url) {
const task = uni.downloadFile({
url: url,
success: (res) => {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
this.installApk(tempFilePath);
} else {
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
},
fail: (err) => {
console.error('下载APK失败', err);
uni.showToast({
title: '下载失败',
icon: 'none'
});
}
});
this.showProgressBar = true;
// 监听下载进度
task.onProgressUpdate((res) => {
console.log('下载进度', res.progress);
// 更新下载进度
this.downloadProgress = res.progress;
});
},
//安装APK文件
installApk(filePath) {
if (uni.getSystemInfoSync().platform === 'android') {
console.log(plus);
if (plus) {
uni.showToast({
title: '当前平台不支持安装!',
icon: 'none'
});
}
console.log(plus);
console.log(plus);
plus.runtime.install(filePath, {}, (e) => {
if (e.code === 0) {
// 安装成功
uni.showToast({
title: '安装成功',
icon: 'success'
});
// 可以在这里退出应用或跳转到其他页面
} else {
// 安装失败
uni.showToast({
title: '安装失败:' + e.message,
icon: 'none'
});
}
});
} else {
uni.showToast({
title: '当前平台不支持直接安装APK',
icon: 'none'
});
}
},
login() {
var serverIPAndPort = getServerIPAndPort();
console.log('http://' + serverIPAndPort + '/user/userLogin');

View File

@ -78,7 +78,12 @@
</view>
</view>
<view class="uni-flex uni-column" style="flex: 5;">
<view hover-class="navigator-hover" @click="handleNavigatorTap('厂内物料查询')">
<view class="uni-flex uni-row" style="-webkit-justify-content: center;justify-content: center;">
<image class="function-image" src="/static/allBindQuery.png" />
</view>
<view class="function-text">厂内物料查询</view>
</view>
</view>
<view class="uni-flex uni-column" style="flex: 5;">
@ -133,6 +138,9 @@
case '货架位置绑定解绑':
url = '../shelfLocationBindUnbind/shelfLocationBindUnbind';
break;
case '厂内物料查询':
url = '../allBindQuery/allBindQuery';
break;
default:
url = ''; // 默认情况,确保有一个有效的处理
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -2,7 +2,7 @@
;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"智慧物流系统-移动端","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"智慧物流","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.45","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定选择物料","type":"default"},"isNVue":false}},{"path":"pages/queryBindList/queryBindList","meta":{"navigationBar":{"titleText":"智慧物流系统-绑定查询","type":"default"},"isNVue":false}},{"path":"pages/stockTaking/stockTaking","meta":{"navigationBar":{"titleText":"智慧物流系统-库存盘点","type":"default"},"isNVue":false}},{"path":"pages/shelfLocationBindUnbind/shelfLocationBindUnbind","meta":{"navigationBar":{"titleText":"智慧物流系统-货架位置绑定解绑","type":"default"},"isNVue":false}},{"path":"pages/productionLineCallIn/productionLineCallIn","meta":{"navigationBar":{"titleText":"智慧物流系统-产线呼叫","type":"default"},"isNVue":false}},{"path":"pages/productionLineCallOut/productionLineCallOut","meta":{"navigationBar":{"titleText":"智慧物流系统-货架送回","type":"default"},"isNVue":false}},{"path":"pages/agvTasks/agvTasks","meta":{"navigationBar":{"titleText":"智慧物流系统-任务管理","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"智慧物流系统-登录","type":"default"},"isNVue":false}},{"path":"pages/config/config","meta":{"navigationBar":{"titleText":"智慧物流系统-用户配置","type":"default"},"isNVue":false}},{"path":"pages/main/main","meta":{"navigationBar":{"titleText":"智慧物流系统-主页","type":"default"},"isNVue":false}},{"path":"pages/bind/bind","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定","type":"default"},"isNVue":false}},{"path":"pages/bindSelectMat/bindSelectMat","meta":{"navigationBar":{"titleText":"智慧物流系统-物料绑定选择物料","type":"default"},"isNVue":false}},{"path":"pages/queryBindList/queryBindList","meta":{"navigationBar":{"titleText":"智慧物流系统-绑定查询","type":"default"},"isNVue":false}},{"path":"pages/stockTaking/stockTaking","meta":{"navigationBar":{"titleText":"智慧物流系统-库存盘点","type":"default"},"isNVue":false}},{"path":"pages/shelfLocationBindUnbind/shelfLocationBindUnbind","meta":{"navigationBar":{"titleText":"智慧物流系统-货架位置绑定解绑","type":"default"},"isNVue":false}},{"path":"pages/productionLineCallIn/productionLineCallIn","meta":{"navigationBar":{"titleText":"智慧物流系统-产线呼叫","type":"default"},"isNVue":false}},{"path":"pages/productionLineCallOut/productionLineCallOut","meta":{"navigationBar":{"titleText":"智慧物流系统-货架送回","type":"default"},"isNVue":false}},{"path":"pages/agvTasks/agvTasks","meta":{"navigationBar":{"titleText":"智慧物流系统-任务管理","type":"default"},"isNVue":false}},{"path":"pages/allBindQuery/allBindQuery","meta":{"navigationBar":{"titleText":"智慧物流系统-厂内物料查询","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[];//styles
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});

View File

@ -159,18 +159,64 @@ if (uni.restoreGlobal) {
}
return target;
};
const _sfc_main$h = {
const _sfc_main$i = {
data() {
return {
title: "登录",
showPassword: true,
userName: "",
passWord: "",
serverIPAndPort: ""
serverIPAndPort: "",
version: "V1.3",
downloadProgress: 0,
// 下载进度
showProgressBar: false
// 控制进度条是否显示
};
},
onShow: function() {
this.serverIPAndPort = getServerIPAndPort();
if (this.showProgressBar) {
return;
}
uni.request({
url: "http://" + this.serverIPAndPort + "/fileDownload/getLatestAppVersion",
// 请求的接口地址
method: "GET ",
// 设置请求方式为 POST
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
if (this.version != res.data.data.version)
uni.showModal({
title: "版本更新",
content: `发现新版本 ${res.data.data.version},是否立即更新?`,
success: (res1) => {
if (res1.confirm) {
var downloadUrl = "http://" + this.serverIPAndPort + "/fileDownload/downloadApp?fileName=" + res.data.data.appName;
this.downloadApk(downloadUrl);
} else if (res.cancel) {
formatAppLog("log", "at pages/index/index.vue:120", "用户取消了更新");
}
}
});
}
}
},
fail: (err) => {
uni.showToast({
title: "请求失败:请检查网络连接",
icon: "none",
duration: 2e3
});
},
complete: (event) => {
}
});
},
onLoad: function() {
this.userName = getConfig("userName", "admin");
@ -180,9 +226,70 @@ if (uni.restoreGlobal) {
unregisterReceiver();
},
methods: {
//下载APK文件
downloadApk(url) {
const task = uni.downloadFile({
url,
success: (res) => {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
this.installApk(tempFilePath);
} else {
uni.showToast({
title: "下载失败",
icon: "none"
});
}
},
fail: (err) => {
formatAppLog("error", "at pages/index/index.vue:177", "下载APK失败", err);
uni.showToast({
title: "下载失败",
icon: "none"
});
}
});
this.showProgressBar = true;
task.onProgressUpdate((res) => {
formatAppLog("log", "at pages/index/index.vue:187", "下载进度", res.progress);
this.downloadProgress = res.progress;
});
},
//安装APK文件
installApk(filePath) {
if (uni.getSystemInfoSync().platform === "android") {
formatAppLog("log", "at pages/index/index.vue:195", plus);
if (plus) {
uni.showToast({
title: "当前平台不支持安装!",
icon: "none"
});
}
formatAppLog("log", "at pages/index/index.vue:203", plus);
formatAppLog("log", "at pages/index/index.vue:204", plus);
plus.runtime.install(filePath, {}, (e) => {
if (e.code === 0) {
uni.showToast({
title: "安装成功",
icon: "success"
});
} else {
uni.showToast({
title: "安装失败:" + e.message,
icon: "none"
});
}
});
} else {
uni.showToast({
title: "当前平台不支持直接安装APK",
icon: "none"
});
}
},
login() {
var serverIPAndPort = getServerIPAndPort();
formatAppLog("log", "at pages/index/index.vue:93", "http://" + serverIPAndPort + "/user/userLogin");
formatAppLog("log", "at pages/index/index.vue:231", "http://" + serverIPAndPort + "/user/userLogin");
uni.request({
url: "http://" + serverIPAndPort + "/user/userLogin",
// 请求的接口地址
@ -207,7 +314,7 @@ if (uni.restoreGlobal) {
});
saveConfig("userName", this.userName);
saveConfig("passWord", this.passWord);
formatAppLog("log", "at pages/index/index.vue:119", res.data.data.getRoles[0].authNames);
formatAppLog("log", "at pages/index/index.vue:257", res.data.data.getRoles[0].authNames);
saveConfig("roleName", res.data.data.getRoles[0].authNames);
uni.redirectTo({
url: "/pages/main/main"
@ -231,13 +338,13 @@ if (uni.restoreGlobal) {
});
},
complete: (event) => {
formatAppLog("log", "at pages/index/index.vue:148", "请求完成", event);
formatAppLog("log", "at pages/index/index.vue:286", "请求完成", event);
}
});
}
}
};
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("navigator", {
url: "../config/config",
@ -320,12 +427,28 @@ if (uni.restoreGlobal) {
1
/* TEXT */
),
vue.createElementVNode("view", null, "V1.1")
])
vue.createElementVNode(
"view",
null,
vue.toDisplayString($data.version),
1
/* TEXT */
)
]),
$data.showProgressBar ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
style: { "margin-top": "20rpx", "margin-bottom": "20rpx", "text-align": "center" }
}, [
vue.createElementVNode("progress", {
percent: $data.downloadProgress,
"show-info": "",
"stroke-width": "10"
}, null, 8, ["percent"])
])) : vue.createCommentVNode("v-if", true)
]);
}
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/index/index.vue"]]);
const _sfc_main$g = {
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/index/index.vue"]]);
const _sfc_main$h = {
data() {
return {
serverIP: "",
@ -347,7 +470,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("label", null, "服务器IP:"),
@ -384,7 +507,7 @@ if (uni.restoreGlobal) {
}, "保存配置")
]);
}
const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/config/config.vue"]]);
const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/config/config.vue"]]);
const _imports_0$1 = "/static/logOut.png";
const _imports_1 = "/static/bind.png";
const _imports_2 = "/static/bindQuery.png";
@ -393,7 +516,8 @@ if (uni.restoreGlobal) {
const _imports_5 = "/static/callOut.png";
const _imports_6 = "/static/task.png";
const _imports_7 = "/static/shelfLocation.png";
const _sfc_main$f = {
const _imports_8 = "/static/allBindQuery.png";
const _sfc_main$g = {
data() {
return {
hasPermission: true
@ -403,8 +527,8 @@ if (uni.restoreGlobal) {
handleNavigatorTap: function(pageName) {
var roleName = getConfig("roleName", "");
var requiredRole = "PDA" + pageName;
formatAppLog("log", "at pages/main/main.vue:107", "roleName:", roleName);
formatAppLog("log", "at pages/main/main.vue:108", "requiredRole:", requiredRole);
formatAppLog("log", "at pages/main/main.vue:112", "roleName:", roleName);
formatAppLog("log", "at pages/main/main.vue:113", "requiredRole:", requiredRole);
this.hasPermission = roleName.includes(requiredRole);
let url = "";
switch (pageName) {
@ -429,6 +553,9 @@ if (uni.restoreGlobal) {
case "货架位置绑定解绑":
url = "../shelfLocationBindUnbind/shelfLocationBindUnbind";
break;
case "厂内物料查询":
url = "../allBindQuery/allBindQuery";
break;
default:
url = "";
}
@ -446,7 +573,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("navigator", {
@ -615,7 +742,23 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", {
class: "uni-flex uni-column",
style: { "flex": "5" }
}),
}, [
vue.createElementVNode("view", {
"hover-class": "navigator-hover",
onClick: _cache[7] || (_cache[7] = ($event) => $options.handleNavigatorTap("厂内物料查询"))
}, [
vue.createElementVNode("view", {
class: "uni-flex uni-row",
style: { "-webkit-justify-content": "center", "justify-content": "center" }
}, [
vue.createElementVNode("image", {
class: "function-image",
src: _imports_8
})
]),
vue.createElementVNode("view", { class: "function-text" }, "厂内物料查询")
])
]),
vue.createElementVNode("view", {
class: "uni-flex uni-column",
style: { "flex": "5" }
@ -624,8 +767,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/main/main.vue"]]);
const _sfc_main$e = {
const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/main/main.vue"]]);
const _sfc_main$f = {
data() {
return {
visible: false,
@ -734,7 +877,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
return $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
class: "popup-container"
@ -772,9 +915,9 @@ if (uni.restoreGlobal) {
}, "关    闭")
])) : vue.createCommentVNode("v-if", true);
}
const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-68e7b952"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-68e7b952"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
const _imports_0 = "/static/scan.png";
const _sfc_main$d = {
const _sfc_main$e = {
components: {
bindSelectMat: PagesBindSelectMatBindSelectMat
},
@ -1257,7 +1400,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
const _component_bindSelectMat = vue.resolveComponent("bindSelectMat");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createVNode(_component_bindSelectMat, {
@ -1520,7 +1663,7 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/bind/bind.vue"]]);
const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/bind/bind.vue"]]);
class MPAnimation {
constructor(options, _this) {
this.options = options;
@ -1631,7 +1774,7 @@ if (uni.restoreGlobal) {
clearTimeout(_this.timer);
return new MPAnimation(option, _this);
}
const _sfc_main$c = {
const _sfc_main$d = {
name: "uniTransition",
emits: ["click", "change"],
props: {
@ -1878,7 +2021,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
key: 0,
ref: "ani",
@ -1890,8 +2033,8 @@ if (uni.restoreGlobal) {
vue.renderSlot(_ctx.$slots, "default")
], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
}
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
const _sfc_main$b = {
const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
const _sfc_main$c = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@ -2219,7 +2362,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@ -2279,8 +2422,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
const _sfc_main$a = {
const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-4dd3c44b"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
const _sfc_main$b = {
__name: "Card",
props: {
item: {
@ -2304,7 +2447,7 @@ if (uni.restoreGlobal) {
return __returned__;
}
};
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
vue.createElementVNode("view", { class: "card-header" }, [
vue.createElementVNode("view", { class: "content-combined" }, [
@ -2424,8 +2567,8 @@ if (uni.restoreGlobal) {
])
]);
}
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-29c414df"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/Card.vue"]]);
const _sfc_main$9 = {
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-29c414df"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/Card.vue"]]);
const _sfc_main$a = {
name: "uniPopup",
components: {},
emits: ["change", "maskClick"],
@ -2778,7 +2921,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
"view",
@ -2838,8 +2981,8 @@ if (uni.restoreGlobal) {
/* CLASS */
)) : vue.createCommentVNode("v-if", true);
}
const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-7db519c7"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
const _sfc_main$8 = {
const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-7db519c7"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
const _sfc_main$9 = {
components: {
uniPopup,
Card
@ -3236,7 +3379,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
@ -3433,8 +3576,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
const _sfc_main$7 = {
const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
const _sfc_main$8 = {
__name: "StocktakingCard",
props: {
item: {
@ -3458,7 +3601,7 @@ if (uni.restoreGlobal) {
return __returned__;
}
};
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", null, [
vue.createElementVNode("view", { class: "card-header" }, [
vue.createElementVNode("view", { class: "content-combined" }, [
@ -3591,8 +3734,8 @@ if (uni.restoreGlobal) {
])
]);
}
const StocktakingCard = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-e2c0cdac"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/StocktakingCard.vue"]]);
const _sfc_main$6 = {
const StocktakingCard = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-e2c0cdac"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/StocktakingCard.vue"]]);
const _sfc_main$7 = {
components: {
uniPopup,
StocktakingCard
@ -3864,7 +4007,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_StocktakingCard = vue.resolveComponent("StocktakingCard");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
@ -4066,8 +4209,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesStockTakingStockTaking = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/stockTaking/stockTaking.vue"]]);
const _sfc_main$5 = {
const PagesStockTakingStockTaking = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/stockTaking/stockTaking.vue"]]);
const _sfc_main$6 = {
data() {
return {
//初始化
@ -4367,7 +4510,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", { style: { "flex": "3" } }, [
@ -4503,8 +4646,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesShelfLocationBindUnbindShelfLocationBindUnbind = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue"]]);
const _sfc_main$4 = {
const PagesShelfLocationBindUnbindShelfLocationBindUnbind = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue"]]);
const _sfc_main$5 = {
components: {
uniPopup,
Card
@ -4855,7 +4998,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
@ -4993,8 +5136,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesProductionLineCallInProductionLineCallIn = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/productionLineCallIn/productionLineCallIn.vue"]]);
const _sfc_main$3 = {
const PagesProductionLineCallInProductionLineCallIn = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/productionLineCallIn/productionLineCallIn.vue"]]);
const _sfc_main$4 = {
components: {
uniPopup,
Card
@ -5438,7 +5581,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_Card = vue.resolveComponent("Card");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
@ -5682,8 +5825,8 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesProductionLineCallOutProductionLineCallOut = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue"]]);
const _sfc_main$2 = {
const PagesProductionLineCallOutProductionLineCallOut = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue"]]);
const _sfc_main$3 = {
__name: "TaskCard",
props: {
item: {
@ -5707,7 +5850,7 @@ if (uni.restoreGlobal) {
return __returned__;
}
};
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
vue.createElementVNode("view", { class: "card-header" }, [
vue.createElementVNode("view", { class: "content-combined" }, [
@ -5825,8 +5968,8 @@ if (uni.restoreGlobal) {
])
]);
}
const TaskCard = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-e5e76912"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/TaskCard.vue"]]);
const _sfc_main$1 = {
const TaskCard = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-e5e76912"], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/components/TaskCard.vue"]]);
const _sfc_main$2 = {
components: {
uniPopup,
TaskCard
@ -6120,7 +6263,7 @@ if (uni.restoreGlobal) {
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
const _component_TaskCard = vue.resolveComponent("TaskCard");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
@ -6324,7 +6467,295 @@ if (uni.restoreGlobal) {
])
]);
}
const PagesAgvTasksAgvTasks = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/agvTasks/agvTasks.vue"]]);
const PagesAgvTasksAgvTasks = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/agvTasks/agvTasks.vue"]]);
const _sfc_main$1 = {
components: {
uniPopup,
Card
},
data() {
return {
locationId: null,
locationCode: "",
userName: "",
//当前登录的用户名
recordCount: 0,
shelfId: null,
shelfCode: "",
placeholderText: "输入物料编码搜索",
matCodeCondition: "",
//物料编码搜索条件
cardData: null,
//监控滑动的位置
touchStartX: 0,
touchStartY: 0,
isMove: false
//滑动标识 是否滑动
};
},
onShow: function() {
this.userName = getConfig("userName", "admin");
const self = this;
recive(function(res) {
formatAppLog("log", "at pages/allBindQuery/allBindQuery.vue:121", "Success:" + res.data);
self.analysisScanCode(res.data);
}, function(err) {
formatAppLog("log", "at pages/allBindQuery/allBindQuery.vue:124", "Error:", JSON.stringify(err));
});
},
methods: {
//摄像头扫码
cameraScanCode() {
uni.scanCode({
success: (res) => {
formatAppLog("log", "at pages/allBindQuery/allBindQuery.vue:132", "扫码结果:", res.result);
this.analysisScanCode(res.result);
},
fail: (err) => {
formatAppLog("error", "at pages/allBindQuery/allBindQuery.vue:136", "扫码失败:", err);
}
});
},
//扫码枪扫码
analysisScanCode: function(encodedString) {
encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
this.matCodeCondition = encodedString;
const regex = /^[1-9]\d{5}$/;
if (regex.test(this.matCodeCondition)) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = "";
this.queryMatList();
return;
}
const regex1 = /^\d{6}XY\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = "";
this.queryMatList();
return;
}
const regex2 = /^\d{6}xy\d{6}$/;
if (regex2.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = "";
this.queryMatList();
return;
}
},
queryMatList: function() {
if (this.matCodeCondition != "" && this.matCodeCondition != null) {
const regex = /^[1-9]\d{5}$/;
if (regex.test(this.matCodeCondition)) {
this.shelfCode = this.matCodeCondition;
this.matCodeCondition = "";
}
const regex1 = /^\d{6}XY\d{6}$/;
if (regex1.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition;
this.matCodeCondition = "";
}
const regex2 = /^\d{6}xy\d{6}$/;
if (regex2.test(this.matCodeCondition)) {
this.locationCode = this.matCodeCondition.toUpperCase();
this.matCodeCondition = "";
}
}
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfosWithOrder",
// 请求的接口地址
method: "POST",
// 设置请求方式为 POST
data: {
"locationCode": this.locationCode,
"shelfCode": this.shelfCode,
"matCode": this.matCodeCondition,
"userName": this.userName,
"deviceType": "PDA",
"pageNumber": 1,
"pageSize": 600
},
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
if (res.data.data == null || res.data.data.count == 0) {
uni.showToast({
title: "该货架不存在绑定的物料信息!",
icon: "none",
duration: 3e3
});
this.clear();
return;
}
this.cardData = res.data.data.lists;
this.recordCount = res.data.data.count;
this.shelfCode = "";
this.locationCode = "";
uni.showToast({
title: "获取成功!",
icon: "none",
duration: 500
});
} else {
uni.showToast({
title: "获取失败:" + res.data.message,
icon: "none",
duration: 3500
});
this.clear();
}
} else {
uni.showToast({
title: "服务器返回错误状态码" + res.statusCode,
icon: "none",
duration: 3e3
});
this.clear();
}
},
fail: (err) => {
uni.showToast({
title: "请求失败:" + err.errMsg,
icon: "none",
duration: 3e3
});
this.clear();
},
complete: (event) => {
formatAppLog("log", "at pages/allBindQuery/allBindQuery.vue:269", "请求完成", event);
}
});
},
//清空当前界面所有内容
clear: function() {
this.placeholderText = "请先扫描货架码";
this.cardData = null;
this.recordCount = 0;
},
//解决长按和滑动冲突的问题
cardTouchStart(e) {
this.isMove = false;
this.touchStartX = e.touches[0].clientX;
this.touchStartY = e.touches[0].clientY;
},
cardTouchMove(e) {
var deltaX = e.changedTouches[0].clientX - this.touchStartX;
var deltaY = e.changedTouches[0].clientY - this.touchStartY;
if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
this.isMove = true;
}
},
//长按
longpress(item) {
if (this.isMove == false) {
uni.showToast({
title: "此功能仅供查询\r\n无法修改数量",
icon: "none",
duration: 2e3
});
}
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
const _component_Card = vue.resolveComponent("Card");
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", { style: { "flex": "3" } }, [
vue.createCommentVNode(" 占位 ")
]),
vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
vue.createElementVNode("view", { class: "diy-flex-row" }, [
vue.createElementVNode("view", {
class: "rightImageContainer",
onClick: _cache[0] || (_cache[0] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
style: { "flex": "12", "padding-top": "20rpx" }
}, [
vue.createElementVNode("image", {
style: { "width": "60rpx", "height": "60rpx" },
src: _imports_0
})
]),
vue.createElementVNode("view", {
class: "uni-input-wrapper",
style: { "flex": "60" }
}, [
vue.withDirectives(vue.createElementVNode("input", {
id: "inputMatCode",
class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event)
}, null, 8, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition]
])
]),
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))
}, "查询")
])
])
]),
vue.createElementVNode("view", { style: { "flex": "2" } }, [
vue.createCommentVNode(" 占位 ")
])
]),
vue.createElementVNode("view", {
class: "diy-flex-column",
style: { "margin-top": "5rpx" }
}, [
vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
vue.createElementVNode("view", { style: { "width": "10rpx" } }),
vue.createElementVNode(
"view",
{ style: { "width": "275rpx" } },
"记录数:[" + vue.toDisplayString($data.recordCount) + "]",
1
/* TEXT */
),
vue.createElementVNode("view", { style: { "width": "10rpx" } }),
vue.createCommentVNode(' <view style="width: 455rpx;">货架码:{{shelfCode}}</view> ')
])
]),
vue.createElementVNode("view", {
class: "diy-flex-column",
style: { "margin-top": "5rpx" }
}, [
vue.createElementVNode("scroll-view", {
class: "scroll-view",
"scroll-y": "true"
}, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", {
key: index,
onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[4] || (_cache[4] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item)
}, [
vue.createVNode(_component_Card, {
item,
currentIndex: index,
cardData: $data.cardData
}, null, 8, ["item", "currentIndex", "cardData"])
], 40, ["onLongpress"]);
}),
128
/* KEYED_FRAGMENT */
))
])
])
]);
}
const PagesAllBindQueryAllBindQuery = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/pages/allBindQuery/allBindQuery.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
__definePage("pages/config/config", PagesConfigConfig);
__definePage("pages/main/main", PagesMainMain);
@ -6336,6 +6767,7 @@ if (uni.restoreGlobal) {
__definePage("pages/productionLineCallIn/productionLineCallIn", PagesProductionLineCallInProductionLineCallIn);
__definePage("pages/productionLineCallOut/productionLineCallOut", PagesProductionLineCallOutProductionLineCallOut);
__definePage("pages/agvTasks/agvTasks", PagesAgvTasksAgvTasks);
__definePage("pages/allBindQuery/allBindQuery", PagesAllBindQueryAllBindQuery);
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");
@ -6347,7 +6779,7 @@ if (uni.restoreGlobal) {
formatAppLog("log", "at App.vue:10", "App Hide");
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/代码/赛特制冷WCS/PDA/PDA/App.vue"]]);
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:/代码/赛特制冷WCS/wcs/PDA/PDA/App.vue"]]);
function createApp() {
const app = vue.createVueApp(App);
return {

File diff suppressed because one or more lines are too long