1.用户体验优化 请求时增加遮罩层
2.增加权限
This commit is contained in:
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<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 style="flex: 3">
|
||||
<!-- 占位 -->
|
||||
@ -123,6 +128,8 @@
|
||||
sendBackEmptyButtons: null,
|
||||
|
||||
userName: '', //当前登录的用户名
|
||||
|
||||
isLoading: false, //是否正在请求中那个状态
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
@ -295,6 +302,8 @@
|
||||
|
||||
this.userName = getConfig('userName', '');
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
|
||||
this.isLoading = true;
|
||||
uni.request({
|
||||
url: 'http://' + serverIPAndPort + '/pdaMatBind/bindSendBackShelf', // 请求的接口地址
|
||||
method: 'POST', // 设置请求方式为 POST
|
||||
@ -348,8 +357,7 @@
|
||||
});
|
||||
},
|
||||
complete: (event) => {
|
||||
// 请求完成的回调函数(无论成功或失败都会调用)
|
||||
console.log('请求完成', event);
|
||||
this.isLoading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -364,8 +372,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(this.shelfId != null && this.shelfId != 0)
|
||||
{
|
||||
if (this.shelfId != null && this.shelfId != 0) {
|
||||
uni.showToast({
|
||||
title: '当前工位已有货架!请货架送走后再次扫工位码进行操作!',
|
||||
icon: 'none',
|
||||
@ -373,7 +380,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (this.selectedShelfTypeIndex == 0) {
|
||||
uni.showToast({
|
||||
title: '请选择需要呼叫的货架类型!',
|
||||
@ -386,6 +393,8 @@
|
||||
saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
|
||||
this.userName = getConfig('userName', '');
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
|
||||
this.isLoading = true;
|
||||
uni.request({
|
||||
url: 'http://' + serverIPAndPort + '/pdaMatBind/callEmptyShelf', // 请求的接口地址
|
||||
method: 'POST', // 设置请求方式为 POST
|
||||
@ -394,8 +403,8 @@
|
||||
"locationCode": this.currentLocationCode,
|
||||
'needShelfTypeId': this.shelfTypeOptions[this.selectedShelfTypeIndex].id,
|
||||
'needShelfTypeName': this.shelfTypeOptions[this.selectedShelfTypeIndex].shelfTypeName,
|
||||
'needLocationAreaId':item.id,
|
||||
'needLocationAreaName':item.locationAreaName,
|
||||
'needLocationAreaId': item.id,
|
||||
'needLocationAreaName': item.locationAreaName,
|
||||
"userName": this.userName,
|
||||
"deviceType": "PDA"
|
||||
},
|
||||
@ -440,6 +449,7 @@
|
||||
complete: (event) => {
|
||||
// 请求完成的回调函数(无论成功或失败都会调用)
|
||||
console.log('请求完成', event);
|
||||
this.isLoading = false;
|
||||
}
|
||||
});
|
||||
|
||||
@ -449,6 +459,28 @@
|
||||
</script>
|
||||
|
||||
<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 {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
|
@ -6801,8 +6801,10 @@ if (uni.restoreGlobal) {
|
||||
selectedShelfTypeIndex: 0,
|
||||
//选择的货架类型索引
|
||||
sendBackEmptyButtons: null,
|
||||
userName: ""
|
||||
userName: "",
|
||||
//当前登录的用户名
|
||||
isLoading: false
|
||||
//是否正在请求中那个状态
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
@ -6811,16 +6813,16 @@ if (uni.restoreGlobal) {
|
||||
recive(function(res) {
|
||||
self.analysisScanCode(res.data, true);
|
||||
}, 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: {
|
||||
handleFocus() {
|
||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:141", "foucus");
|
||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:148", "foucus");
|
||||
this.isMatConditionFoucused = true;
|
||||
},
|
||||
handleBlur() {
|
||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:145", "bulur");
|
||||
formatAppLog("log", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:152", "bulur");
|
||||
this.isMatConditionFoucused = false;
|
||||
},
|
||||
//选择货架类型
|
||||
@ -6834,13 +6836,13 @@ if (uni.restoreGlobal) {
|
||||
this.analysisScanCode(res.result);
|
||||
},
|
||||
fail: (err) => {
|
||||
formatAppLog("error", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:159", "扫码失败:", err);
|
||||
formatAppLog("error", "at pages/shelfLocationCallSendBack/shelfLocationCallSendBack.vue:166", "扫码失败:", err);
|
||||
}
|
||||
});
|
||||
},
|
||||
//扫码枪扫码
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
@ -6927,7 +6929,7 @@ if (uni.restoreGlobal) {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
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) {
|
||||
uni.showToast({
|
||||
title: "当前工位无货架!无法送货架!",
|
||||
@ -6956,6 +6958,7 @@ if (uni.restoreGlobal) {
|
||||
}
|
||||
this.userName = getConfig("userName", "");
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
this.isLoading = true;
|
||||
uni.request({
|
||||
url: "http://" + serverIPAndPort + "/pdaMatBind/bindSendBackShelf",
|
||||
// 请求的接口地址
|
||||
@ -7007,7 +7010,7 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
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);
|
||||
this.userName = getConfig("userName", "");
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
this.isLoading = true;
|
||||
uni.request({
|
||||
url: "http://" + serverIPAndPort + "/pdaMatBind/callEmptyShelf",
|
||||
// 请求的接口地址
|
||||
@ -7091,7 +7095,8 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
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) {
|
||||
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", { style: { "flex": "3" } }, [
|
||||
vue.createCommentVNode(" 占位 ")
|
||||
|
@ -31,6 +31,8 @@ namespace 智慧物流软件系统
|
||||
PDA库存盘点 = 16000,
|
||||
PDA任务管理 = 17000,
|
||||
PDA货架位置绑定解绑 = 18000,
|
||||
PDA厂内物料查询 = 19000,
|
||||
PDA货架库区 = 20000,
|
||||
}
|
||||
|
||||
public class EnumTreeAttribute : Attribute
|
||||
|
Reference in New Issue
Block a user