|
@@ -24,7 +24,10 @@
|
|
|
placeholder="请扫描或输入物料编码"
|
|
|
@keyup.enter="handleScanCodeInput"
|
|
|
/>
|
|
|
- <div style="height: calc(100vh - 450px); margin-top: 15px">
|
|
|
+ <div
|
|
|
+ v-loading="map.get('getMaterialInfoByLabel')"
|
|
|
+ style="height: calc(100vh - 450px); margin-top: 15px"
|
|
|
+ >
|
|
|
<el-scrollbar>
|
|
|
<div class="list-container">
|
|
|
<div
|
|
@@ -107,12 +110,16 @@ import {
|
|
|
getDestinationList,
|
|
|
getMaterialInfoByLabel,
|
|
|
} from "@/api/process/materialFlow";
|
|
|
+import { useCommonStoreHook } from "@/store";
|
|
|
+
|
|
|
+const commonS = useCommonStoreHook();
|
|
|
+const map = commonS.loadingMap;
|
|
|
|
|
|
const currentBox = ref("");
|
|
|
const boxDetail = ref<any>({});
|
|
|
const enterBox = () => {
|
|
|
currentBox.value = currentBox.value.trim();
|
|
|
- getBoxDetailByLabel(currentBox.value).then((res) => {
|
|
|
+ getBoxDetailByLabel(currentBox.value).then((res: any) => {
|
|
|
boxDetail.value = res.data;
|
|
|
// materialList.value = res.data.materialList;
|
|
|
});
|
|
@@ -123,7 +130,7 @@ const scanCodeInput = ref("");
|
|
|
const materialList = ref<any[]>([]);
|
|
|
|
|
|
const handleScanCodeInput = () => {
|
|
|
- getMaterialInfoByLabel(scanCodeInput.value).then((res) => {
|
|
|
+ getMaterialInfoByLabel(scanCodeInput.value).then((res: any) => {
|
|
|
// 扫描之后要先查看数组中是否有这个物料,有的话就数量相加,没有的话就添加到数组中
|
|
|
let hasMaterial = false;
|
|
|
for (let i = 0; i < materialList.value.length; i++) {
|
|
@@ -168,7 +175,7 @@ const onEndBoxClick = (index: number, item: any) => {
|
|
|
|
|
|
onMounted(() => {
|
|
|
let wm = new WeakMap();
|
|
|
- getDestinationList(1).then((res) => {
|
|
|
+ getDestinationList(1).then((res: any) => {
|
|
|
destinationList.value = res.data;
|
|
|
});
|
|
|
});
|