临时提交
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="bg-image">
|
||||
<bindSelectMat ref="proup" @close="handlePopupClose" @selected="bindSelectedMat" />
|
||||
<bindSelectMat type="dialog" ref="proup" @close="handlePopupClose" @selected="bindSelectedMat" />
|
||||
|
||||
<view class="diy-flex-row">
|
||||
<view style="flex: 3">
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
<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" @blur="queryMatList"></input>
|
||||
:placeholder="placeholderText" v-model="matCodeCondition" ></input>
|
||||
</view>
|
||||
|
||||
<view style="flex: 3;">
|
||||
@ -136,6 +136,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -435,6 +436,7 @@
|
||||
} else {
|
||||
this.clearMatInfo();
|
||||
saveConfig('matCodeCondition', this.matCodeCondition);
|
||||
|
||||
this.$refs.proup.show();
|
||||
}
|
||||
},
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<view class="popup-container" v-if="visible">
|
||||
<view class="popup-content">
|
||||
<scroll-view class="scroll-view" scroll-y="true">
|
||||
<!-- <uni-list-item v-for="(item, index) in matBaseInfoList" :key="index" :title="item.matCode"
|
||||
:note="item.matName" :rightText="item.matSpec" @click="onItemClick(item)"></uni-list-item>
|
||||
-->
|
||||
<view v-for="(item, index) in matBaseInfoList" :key="index" class="list-item" @click="onItemClick(item)">
|
||||
{{ item.matCode }} - {{ item.matName }} - {{ item.matSpec }}
|
||||
</view>
|
||||
<scroll-view :scroll-top="scrollTop" direction="vertical" class="scroll-Y" scroll-with-animation="true"
|
||||
@scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" @scrollend="end"
|
||||
:show-scrollbar="showScrollbar">
|
||||
<view v-for="(item, index) in matBaseInfoList" :key="index" class="list-item"
|
||||
@click="onItemClick(item)">
|
||||
{{ item.matCode }} - {{ item.matName }}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<button @click="handleClose">关闭</button>
|
||||
<button style="background-color: darkred;color: white;" @click="handleClose">关 闭</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -35,14 +35,19 @@
|
||||
matCodeCondition: '',
|
||||
userName: '',
|
||||
matBaseInfoList: [], // 用于存储物料数据的数组
|
||||
scrollTop: 0,
|
||||
showScrollbar: true
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.visible = true;
|
||||
this.matCodeCondition = getConfig('matCodeCondition', '');
|
||||
console.log('scroll - view height:', this.matCodeCondition);
|
||||
|
||||
this.userName = getConfig('userName', '');
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
|
||||
//获取列表
|
||||
uni.request({
|
||||
url: 'http://' + serverIPAndPort + '/matBaseInfo/getMatBaseInfo', // 请求的接口地址
|
||||
@ -67,24 +72,25 @@
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data.lists != null && res.data.data.lists.length > 0) {
|
||||
this.matBaseInfoList = res.data.data.lists;
|
||||
console.log('matBaseInfoList:', this.matBaseInfoList);
|
||||
} else {
|
||||
this.visible = false;
|
||||
this.matBaseInfoList = null;
|
||||
uni.showToast({
|
||||
title: '根据查询条件未查询到物料!',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
this.visible = false;
|
||||
this.matBaseInfoList = null;
|
||||
uni.showToast({
|
||||
title: '查询物料失败:' + res.data.message,
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '查询物料失败:服务器返回错误状态码' + res.statusCode,
|
||||
@ -106,7 +112,6 @@
|
||||
console.log('请求完成', event);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
handleClose() {
|
||||
this.visible = false;
|
||||
@ -114,7 +119,19 @@
|
||||
},
|
||||
onItemClick(item) {
|
||||
this.visible = false;
|
||||
this.$emit('selected',item);
|
||||
this.$emit('selected', item);
|
||||
},
|
||||
upper() {
|
||||
console.log('scrolltoupper');
|
||||
},
|
||||
lower() {
|
||||
console.log('scrolltolower');
|
||||
},
|
||||
scroll() {
|
||||
console.log('scroll');
|
||||
},
|
||||
end() {
|
||||
console.log('scrollend');
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -122,14 +139,16 @@
|
||||
|
||||
<style scoped>
|
||||
.list-item {
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-size: 35rpx;
|
||||
}
|
||||
|
||||
|
||||
.popup-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
max-height: calc(100vh - 300rpx);
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
@ -138,16 +157,17 @@
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
/* 使用transform来居中 */
|
||||
width: 650rpx;
|
||||
max-height: 750rpx;
|
||||
background-color: rgba(0, 0, 0, 1);
|
||||
max-height: calc(100vh - 300rpx);
|
||||
background-color: white;
|
||||
z-index: 2;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.scroll-view {
|
||||
max-width: 700rpx;
|
||||
/* 设置滚动区域的高度 */
|
||||
.scroll-Y {
|
||||
border-radius: 5rpx;
|
||||
height: calc(100vh - 600rpx);
|
||||
z-index: 4;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
@ -581,14 +581,17 @@ if (uni.restoreGlobal) {
|
||||
visible: false,
|
||||
matCodeCondition: "",
|
||||
userName: "",
|
||||
matBaseInfoList: []
|
||||
matBaseInfoList: [],
|
||||
// 用于存储物料数据的数组
|
||||
scrollTop: 0,
|
||||
showScrollbar: true
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
this.visible = true;
|
||||
this.matCodeCondition = getConfig("matCodeCondition", "");
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:46", "scroll - view height:", this.matCodeCondition);
|
||||
this.userName = getConfig("userName", "");
|
||||
var serverIPAndPort = getServerIPAndPort();
|
||||
uni.request({
|
||||
@ -615,20 +618,23 @@ if (uni.restoreGlobal) {
|
||||
if (res.data.code == 200) {
|
||||
if (res.data.data.lists != null && res.data.data.lists.length > 0) {
|
||||
this.matBaseInfoList = res.data.data.lists;
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:75", "matBaseInfoList:", this.matBaseInfoList);
|
||||
} else {
|
||||
this.visible = false;
|
||||
this.matBaseInfoList = null;
|
||||
uni.showToast({
|
||||
title: "根据查询条件未查询到物料!",
|
||||
icon: "none",
|
||||
duration: 1500
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.visible = false;
|
||||
this.matBaseInfoList = null;
|
||||
uni.showToast({
|
||||
title: "查询物料失败:" + res.data.message,
|
||||
icon: "none",
|
||||
duration: 1500
|
||||
duration: 2e3
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@ -647,7 +653,7 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
complete: (event) => {
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:106", "请求完成", event);
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:112", "请求完成", event);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -658,6 +664,18 @@ if (uni.restoreGlobal) {
|
||||
onItemClick(item) {
|
||||
this.visible = false;
|
||||
this.$emit("selected", item);
|
||||
},
|
||||
upper() {
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:125", "scrolltoupper");
|
||||
},
|
||||
lower() {
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:128", "scrolltolower");
|
||||
},
|
||||
scroll() {
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:131", "scroll");
|
||||
},
|
||||
end() {
|
||||
formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:134", "scrollend");
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -668,10 +686,16 @@ if (uni.restoreGlobal) {
|
||||
}, [
|
||||
vue.createElementVNode("view", { class: "popup-content" }, [
|
||||
vue.createElementVNode("scroll-view", {
|
||||
class: "scroll-view",
|
||||
"scroll-y": "true"
|
||||
"scroll-top": $data.scrollTop,
|
||||
direction: "vertical",
|
||||
class: "scroll-Y",
|
||||
"scroll-with-animation": "true",
|
||||
onScrolltoupper: _cache[0] || (_cache[0] = (...args) => $options.upper && $options.upper(...args)),
|
||||
onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.lower && $options.lower(...args)),
|
||||
onScroll: _cache[2] || (_cache[2] = (...args) => $options.scroll && $options.scroll(...args)),
|
||||
onScrollend: _cache[3] || (_cache[3] = (...args) => $options.end && $options.end(...args)),
|
||||
"show-scrollbar": $data.showScrollbar
|
||||
}, [
|
||||
vue.createCommentVNode(' <uni-list-item v-for="(item, index) in matBaseInfoList" :key="index" :title="item.matCode"\r\n :note="item.matName" :rightText="item.matSpec" @click="onItemClick(item)"></uni-list-item>\r\n '),
|
||||
(vue.openBlock(true), vue.createElementBlock(
|
||||
vue.Fragment,
|
||||
null,
|
||||
@ -680,15 +704,16 @@ if (uni.restoreGlobal) {
|
||||
key: index,
|
||||
class: "list-item",
|
||||
onClick: ($event) => $options.onItemClick(item)
|
||||
}, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName) + " - " + vue.toDisplayString(item.matSpec), 9, ["onClick"]);
|
||||
}, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName), 9, ["onClick"]);
|
||||
}),
|
||||
128
|
||||
/* KEYED_FRAGMENT */
|
||||
))
|
||||
]),
|
||||
], 40, ["scroll-top", "show-scrollbar"]),
|
||||
vue.createElementVNode("button", {
|
||||
onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClose && $options.handleClose(...args))
|
||||
}, "关闭")
|
||||
style: { "background-color": "darkred", "color": "white" },
|
||||
onClick: _cache[4] || (_cache[4] = (...args) => $options.handleClose && $options.handleClose(...args))
|
||||
}, "关 闭")
|
||||
])
|
||||
])) : vue.createCommentVNode("v-if", true);
|
||||
}
|
||||
@ -738,10 +763,10 @@ if (uni.restoreGlobal) {
|
||||
this.userName = getConfig("userName", "admin");
|
||||
const self = this;
|
||||
recive(function(res) {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:210", "Success:" + res.data);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:211", "Success:" + res.data);
|
||||
self.analysisScanCode(res.data);
|
||||
}, function(err) {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:213", "Error:", JSON.stringify(err));
|
||||
formatAppLog("log", "at pages/bind/bind.vue:214", "Error:", JSON.stringify(err));
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@ -749,11 +774,11 @@ if (uni.restoreGlobal) {
|
||||
cameraScanCode() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:221", "扫码结果:", res.result);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:222", "扫码结果:", res.result);
|
||||
this.analysisScanCode(res.result);
|
||||
},
|
||||
fail: (err) => {
|
||||
formatAppLog("error", "at pages/bind/bind.vue:225", "扫码失败:", err);
|
||||
formatAppLog("error", "at pages/bind/bind.vue:226", "扫码失败:", err);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -845,12 +870,12 @@ if (uni.restoreGlobal) {
|
||||
}
|
||||
},
|
||||
complete: (event) => {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:329", "请求完成", event);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:330", "请求完成", event);
|
||||
}
|
||||
});
|
||||
},
|
||||
bindSelectedMat: function(item) {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:335", "用户选择了项目:", item);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:336", "用户选择了项目:", item);
|
||||
this.matCode = item.matCode;
|
||||
this.matName = item.matName;
|
||||
this.matSpec = item.matSpec;
|
||||
@ -914,7 +939,7 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
complete: (event) => {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:403", "请求完成", event);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:404", "请求完成", event);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1019,7 +1044,7 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
complete: (event) => {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:516", "请求完成", event);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:518", "请求完成", event);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1110,7 +1135,7 @@ if (uni.restoreGlobal) {
|
||||
});
|
||||
},
|
||||
complete: (event) => {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:618", "请求完成", event);
|
||||
formatAppLog("log", "at pages/bind/bind.vue:620", "请求完成", event);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -1136,7 +1161,7 @@ if (uni.restoreGlobal) {
|
||||
this.matSpec = "";
|
||||
},
|
||||
handlePopupClose() {
|
||||
formatAppLog("log", "at pages/bind/bind.vue:648", "弹出层已关闭");
|
||||
formatAppLog("log", "at pages/bind/bind.vue:650", "弹出层已关闭");
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1144,6 +1169,7 @@ if (uni.restoreGlobal) {
|
||||
const _component_bindSelectMat = vue.resolveComponent("bindSelectMat");
|
||||
return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
|
||||
vue.createVNode(_component_bindSelectMat, {
|
||||
type: "dialog",
|
||||
ref: "proup",
|
||||
onClose: $options.handlePopupClose,
|
||||
onSelected: $options.bindSelectedMat
|
||||
@ -1173,16 +1199,15 @@ if (uni.restoreGlobal) {
|
||||
class: "uni-input",
|
||||
style: { "font-size": "50rpx", "padding": "10rpx" },
|
||||
placeholder: $data.placeholderText,
|
||||
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event),
|
||||
onBlur: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
||||
}, null, 40, ["placeholder"]), [
|
||||
"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[3] || (_cache[3] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
||||
onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
|
||||
}, "查询")
|
||||
])
|
||||
])
|
||||
@ -1207,7 +1232,7 @@ if (uni.restoreGlobal) {
|
||||
}, [
|
||||
vue.createElementVNode("picker", {
|
||||
range: $data.shelfTypeOptions,
|
||||
onChange: _cache[4] || (_cache[4] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
|
||||
onChange: _cache[3] || (_cache[3] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
|
||||
"range-key": "shelfTypeName",
|
||||
value: $data.selectedShelfTypeIndex,
|
||||
style: { "font-size": "35rpx" }
|
||||
@ -1230,7 +1255,7 @@ if (uni.restoreGlobal) {
|
||||
class: "mini-btn",
|
||||
type: "warn",
|
||||
size: "mini",
|
||||
onClick: _cache[5] || (_cache[5] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
|
||||
onClick: _cache[4] || (_cache[4] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
|
||||
}, "呼叫货架")
|
||||
])
|
||||
]),
|
||||
@ -1321,7 +1346,7 @@ if (uni.restoreGlobal) {
|
||||
class: "uni-input",
|
||||
style: { "font-size": "40rpx" },
|
||||
placeholder: "请输入物料数量",
|
||||
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.matQty = $event)
|
||||
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matQty = $event)
|
||||
},
|
||||
null,
|
||||
512
|
||||
@ -1332,7 +1357,7 @@ if (uni.restoreGlobal) {
|
||||
]),
|
||||
vue.createElementVNode("view", { style: { "flex": "40" } }, [
|
||||
vue.createElementVNode("button", {
|
||||
onClick: _cache[7] || (_cache[7] = (...args) => $options.bind && $options.bind(...args)),
|
||||
onClick: _cache[6] || (_cache[6] = (...args) => $options.bind && $options.bind(...args)),
|
||||
class: "mini-btn",
|
||||
style: { "margin-left": "10rpx" },
|
||||
type: "warn",
|
||||
@ -1349,7 +1374,7 @@ if (uni.restoreGlobal) {
|
||||
range: $data.shelfAreaOptions,
|
||||
"range-key": "locationAreaName",
|
||||
value: $data.selectedShelfAreaIndex,
|
||||
onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
||||
onChange: _cache[7] || (_cache[7] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
|
||||
style: { "font-size": "35rpx" }
|
||||
}, [
|
||||
vue.createElementVNode(
|
||||
@ -1364,7 +1389,7 @@ if (uni.restoreGlobal) {
|
||||
vue.createElementVNode("button", {
|
||||
style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" },
|
||||
size: "mini",
|
||||
onClick: _cache[9] || (_cache[9] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
|
||||
onClick: _cache[8] || (_cache[8] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
|
||||
}, "送货架")
|
||||
])
|
||||
])
|
||||
|
@ -94,7 +94,9 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
"apple": {},
|
||||
"apple": {
|
||||
"dSYMs": false
|
||||
},
|
||||
"plugins": {
|
||||
"audio": {
|
||||
"mp3": {
|
||||
|
Reference in New Issue
Block a user