1.用户体验优化 请求时增加遮罩层
2.增加权限
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="bg-image">
|
<view class="bg-image">
|
||||||
|
<!-- 屏蔽层 -->
|
||||||
|
<view v-if="isLoading" class="mask" :style="{ display: isLoading ? 'flex' : 'none' }">
|
||||||
|
<view class="loading-text">请求中...</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="diy-flex-row">
|
<view class="diy-flex-row">
|
||||||
<view style="flex: 3">
|
<view style="flex: 3">
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
@ -123,6 +128,8 @@
|
|||||||
sendBackEmptyButtons: null,
|
sendBackEmptyButtons: null,
|
||||||
|
|
||||||
userName: '', //当前登录的用户名
|
userName: '', //当前登录的用户名
|
||||||
|
|
||||||
|
isLoading: false, //是否正在请求中那个状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
@ -295,6 +302,8 @@
|
|||||||
|
|
||||||
this.userName = getConfig('userName', '');
|
this.userName = getConfig('userName', '');
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
|
|
||||||
|
this.isLoading = true;
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'http://' + serverIPAndPort + '/pdaMatBind/bindSendBackShelf', // 请求的接口地址
|
url: 'http://' + serverIPAndPort + '/pdaMatBind/bindSendBackShelf', // 请求的接口地址
|
||||||
method: 'POST', // 设置请求方式为 POST
|
method: 'POST', // 设置请求方式为 POST
|
||||||
@ -348,8 +357,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
// 请求完成的回调函数(无论成功或失败都会调用)
|
this.isLoading = false;
|
||||||
console.log('请求完成', event);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -364,8 +372,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this.shelfId != null && this.shelfId != 0)
|
if (this.shelfId != null && this.shelfId != 0) {
|
||||||
{
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '当前工位已有货架!请货架送走后再次扫工位码进行操作!',
|
title: '当前工位已有货架!请货架送走后再次扫工位码进行操作!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@ -373,7 +380,7 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.selectedShelfTypeIndex == 0) {
|
if (this.selectedShelfTypeIndex == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请选择需要呼叫的货架类型!',
|
title: '请选择需要呼叫的货架类型!',
|
||||||
@ -386,6 +393,8 @@
|
|||||||
saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
|
saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
|
||||||
this.userName = getConfig('userName', '');
|
this.userName = getConfig('userName', '');
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
|
|
||||||
|
this.isLoading = true;
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'http://' + serverIPAndPort + '/pdaMatBind/callEmptyShelf', // 请求的接口地址
|
url: 'http://' + serverIPAndPort + '/pdaMatBind/callEmptyShelf', // 请求的接口地址
|
||||||
method: 'POST', // 设置请求方式为 POST
|
method: 'POST', // 设置请求方式为 POST
|
||||||
@ -394,8 +403,8 @@
|
|||||||
"locationCode": this.currentLocationCode,
|
"locationCode": this.currentLocationCode,
|
||||||
'needShelfTypeId': this.shelfTypeOptions[this.selectedShelfTypeIndex].id,
|
'needShelfTypeId': this.shelfTypeOptions[this.selectedShelfTypeIndex].id,
|
||||||
'needShelfTypeName': this.shelfTypeOptions[this.selectedShelfTypeIndex].shelfTypeName,
|
'needShelfTypeName': this.shelfTypeOptions[this.selectedShelfTypeIndex].shelfTypeName,
|
||||||
'needLocationAreaId':item.id,
|
'needLocationAreaId': item.id,
|
||||||
'needLocationAreaName':item.locationAreaName,
|
'needLocationAreaName': item.locationAreaName,
|
||||||
"userName": this.userName,
|
"userName": this.userName,
|
||||||
"deviceType": "PDA"
|
"deviceType": "PDA"
|
||||||
},
|
},
|
||||||
@ -440,6 +449,7 @@
|
|||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
// 请求完成的回调函数(无论成功或失败都会调用)
|
// 请求完成的回调函数(无论成功或失败都会调用)
|
||||||
console.log('请求完成', event);
|
console.log('请求完成', event);
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -449,6 +459,28 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
/* 屏蔽层样式 */
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 999;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 加载文字样式 */
|
||||||
|
.loading-text {
|
||||||
|
color: white;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
.uni-input {
|
.uni-input {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
@ -6801,8 +6801,10 @@ if (uni.restoreGlobal) {
|
|||||||
selectedShelfTypeIndex: 0,
|
selectedShelfTypeIndex: 0,
|
||||||
//选择的货架类型索引
|
//选择的货架类型索引
|
||||||
sendBackEmptyButtons: null,
|
sendBackEmptyButtons: null,
|
||||||
userName: ""
|
userName: "",
|
||||||
//当前登录的用户名
|
//当前登录的用户名
|
||||||
|
isLoading: false
|
||||||
|
//是否正在请求中那个状态
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
@ -6811,16 +6813,16 @@ if (uni.restoreGlobal) {
|
|||||||
recive(function(res) {
|
recive(function(res) {
|
||||||
self.analysisScanCode(res.data, true);
|
self.analysisScanCode(res.data, true);
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:136", "Error:", JSON.stringify(err));
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:143", "Error:", JSON.stringify(err));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleFocus() {
|
handleFocus() {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:141", "foucus");
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:148", "foucus");
|
||||||
this.isMatConditionFoucused = true;
|
this.isMatConditionFoucused = true;
|
||||||
},
|
},
|
||||||
handleBlur() {
|
handleBlur() {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:145", "bulur");
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:152", "bulur");
|
||||||
this.isMatConditionFoucused = false;
|
this.isMatConditionFoucused = false;
|
||||||
},
|
},
|
||||||
//选择货架类型
|
//选择货架类型
|
||||||
@ -6834,13 +6836,13 @@ if (uni.restoreGlobal) {
|
|||||||
this.analysisScanCode(res.result);
|
this.analysisScanCode(res.result);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
formatAppLog("error", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:159", "扫码失败:", err);
|
formatAppLog("error", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:166", "扫码失败:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//扫码枪扫码
|
//扫码枪扫码
|
||||||
analysisScanCode: function(encodedString) {
|
analysisScanCode: function(encodedString) {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:165", this.isMatConditionFoucused);
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:172", this.isMatConditionFoucused);
|
||||||
if (this.isMatConditionFoucused) {
|
if (this.isMatConditionFoucused) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -6927,7 +6929,7 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:264", "请求完成", event);
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:271", "请求完成", event);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -6938,7 +6940,7 @@ if (uni.restoreGlobal) {
|
|||||||
},
|
},
|
||||||
//货架送回库区
|
//货架送回库区
|
||||||
sendBack: function(item) {
|
sendBack: function(item) {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:276", item);
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:283", item);
|
||||||
if (this.shelfId == null || this.shelfId == 0) {
|
if (this.shelfId == null || this.shelfId == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "当前工位无货架!无法送货架!",
|
title: "当前工位无货架!无法送货架!",
|
||||||
@ -6956,6 +6958,7 @@ if (uni.restoreGlobal) {
|
|||||||
}
|
}
|
||||||
this.userName = getConfig("userName", "");
|
this.userName = getConfig("userName", "");
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
|
this.isLoading = true;
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "http://" + serverIPAndPort + "/pdaMatBind/bindSendBackShelf",
|
url: "http://" + serverIPAndPort + "/pdaMatBind/bindSendBackShelf",
|
||||||
// 请求的接口地址
|
// 请求的接口地址
|
||||||
@ -7007,7 +7010,7 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:352", "请求完成", event);
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -7040,6 +7043,7 @@ if (uni.restoreGlobal) {
|
|||||||
saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
|
saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
|
||||||
this.userName = getConfig("userName", "");
|
this.userName = getConfig("userName", "");
|
||||||
var serverIPAndPort = getServerIPAndPort();
|
var serverIPAndPort = getServerIPAndPort();
|
||||||
|
this.isLoading = true;
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "http://" + serverIPAndPort + "/pdaMatBind/callEmptyShelf",
|
url: "http://" + serverIPAndPort + "/pdaMatBind/callEmptyShelf",
|
||||||
// 请求的接口地址
|
// 请求的接口地址
|
||||||
@ -7091,7 +7095,8 @@ if (uni.restoreGlobal) {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
complete: (event) => {
|
complete: (event) => {
|
||||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:442", "请求完成", event);
|
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:451", "请求完成", event);
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -7099,6 +7104,20 @@ if (uni.restoreGlobal) {
|
|||||||
};
|
};
|
||||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||||
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
|
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
|
||||||
|
vue.createCommentVNode(" 屏蔽层 "),
|
||||||
|
$data.isLoading ? (vue.openBlock(), vue.createElementBlock(
|
||||||
|
"view",
|
||||||
|
{
|
||||||
|
key: 0,
|
||||||
|
class: "mask",
|
||||||
|
style: vue.normalizeStyle({ display: $data.isLoading ? "flex" : "none" })
|
||||||
|
},
|
||||||
|
[
|
||||||
|
vue.createElementVNode("view", { class: "loading-text" }, "请求中...")
|
||||||
|
],
|
||||||
|
4
|
||||||
|
/* STYLE */
|
||||||
|
)) : vue.createCommentVNode("v-if", true),
|
||||||
vue.createElementVNode("view", { class: "diy-flex-row" }, [
|
vue.createElementVNode("view", { class: "diy-flex-row" }, [
|
||||||
vue.createElementVNode("view", { style: { "flex": "3" } }, [
|
vue.createElementVNode("view", { style: { "flex": "3" } }, [
|
||||||
vue.createCommentVNode(" 占位 ")
|
vue.createCommentVNode(" 占位 ")
|
||||||
|
@ -31,6 +31,8 @@ namespace 智慧物流软件系统
|
|||||||
PDA库存盘点 = 16000,
|
PDA库存盘点 = 16000,
|
||||||
PDA任务管理 = 17000,
|
PDA任务管理 = 17000,
|
||||||
PDA货架位置绑定解绑 = 18000,
|
PDA货架位置绑定解绑 = 18000,
|
||||||
|
PDA厂内物料查询 = 19000,
|
||||||
|
PDA货架库区 = 20000,
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EnumTreeAttribute : Attribute
|
public class EnumTreeAttribute : Attribute
|
||||||
|
Reference in New Issue
Block a user