|
@@ -1,73 +1,74 @@
|
|
|
<template>
|
|
|
- <el-scrollbar>
|
|
|
+ <el-scrollbar v-loading="isLoading">
|
|
|
<div class="grid-container">
|
|
|
<div
|
|
|
v-for="(box, index) in merterielBoxes"
|
|
|
:key="index"
|
|
|
class="suit-box"
|
|
|
- @click="testClick(index)"
|
|
|
+ @click="getSuitDetail(box)"
|
|
|
>
|
|
|
- <div class="suit-title">{{ box.title }}短发的</div>
|
|
|
- <div class="suit-desc">{{ box.desc }}对待</div>
|
|
|
+ <div class="suit-title">{{ box.vehicleName }}</div>
|
|
|
+ <div class="suit-desc">{{ box.vehicleCode }}</div>
|
|
|
+ <div class="suit-desc">{{ box.updated }}</div>
|
|
|
<svg-icon class="svgStyle" icon-class="jiaobiao" size="25" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
- <CallHistory ref="callHistoryRef" />
|
|
|
+ <el-button class="call-btn" round type="primary" @click="toCall"
|
|
|
+ >叫料
|
|
|
+ </el-button>
|
|
|
+
|
|
|
<MarterielBoxDetail ref="materielBoxDetailRef" />
|
|
|
- <ChangeCount ref="changeCountRef" description="双面胶黑色" title="叫料数量" />
|
|
|
- <ConfirmMessage ref="confirmMessageRef" />
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import CallHistory from "@/views/pro-operation/call-materiel/components/call-history.vue";
|
|
|
import MarterielBoxDetail from "@/views/pro-operation/call-materiel/components/materiel-box-detail.vue";
|
|
|
-import ChangeCount from "@/components/CommonDialogs/ChangeCount.vue";
|
|
|
-import ConfirmMessage from "@/components/CommonDialogs/ConfirmMessage.vue";
|
|
|
-
|
|
|
-const merterielBoxes = ref<any>([
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
- {},
|
|
|
-]);
|
|
|
-
|
|
|
-// =========叫料历史
|
|
|
-const callHistoryRef = ref<InstanceType<typeof CallHistory>>();
|
|
|
+
|
|
|
+import { boxSuitDetailByBoxId, boxSuitList } from "@/api/process/callMateriel";
|
|
|
+import { useProcessStore } from "@/store/modules/processView";
|
|
|
+
|
|
|
+const processStore = useProcessStore();
|
|
|
+const merterielBoxes = ref<any[]>([]);
|
|
|
+
|
|
|
+const isLoading = ref(false);
|
|
|
+
|
|
|
+const getList = () => {
|
|
|
+ isLoading.value = true;
|
|
|
+ boxSuitList({
|
|
|
+ operationId: processStore.odersData.operationId,
|
|
|
+ workOrderCode: processStore.odersData.workOrderCode,
|
|
|
+ isFull: true,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ merterielBoxes.value = res.data;
|
|
|
+ merterielBoxes.value = res.data;
|
|
|
+ merterielBoxes.value = res.data;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ isLoading.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getList();
|
|
|
+});
|
|
|
|
|
|
// =========料箱详情
|
|
|
+const detailList = ref<any[]>([]);
|
|
|
const materielBoxDetailRef = ref<InstanceType<typeof MarterielBoxDetail>>();
|
|
|
-// =========叫料数量
|
|
|
-const changeCountRef = ref<InstanceType<typeof ChangeCount>>();
|
|
|
-
|
|
|
-// =========确认弹窗
|
|
|
-const confirmMessageRef = ref<InstanceType<typeof ConfirmMessage>>();
|
|
|
-
|
|
|
-const testClick = (index: number) => {
|
|
|
- callHistoryRef.value?.showDrawer(index);
|
|
|
- materielBoxDetailRef.value?.showDialog("", () => {});
|
|
|
- changeCountRef.value?.showDialog(12, (value: number) => {
|
|
|
- console.log(value);
|
|
|
- });
|
|
|
- confirmMessageRef.value?.showDialog(
|
|
|
- "工位上料提示",
|
|
|
- "料箱:LX1321312已到达缓存位,是否立即工位上料?",
|
|
|
- "工位上料",
|
|
|
- () => {}
|
|
|
- );
|
|
|
+const getSuitDetail = (box: any) => {
|
|
|
+ isLoading.value = true;
|
|
|
+ boxSuitDetailByBoxId({ vehicleOperationId: box.id })
|
|
|
+ .then((res) => {
|
|
|
+ detailList.value = res.data;
|
|
|
+ materielBoxDetailRef.value?.showDialog(box, detailList.value, () => {});
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ isLoading.value = false;
|
|
|
+ });
|
|
|
};
|
|
|
+
|
|
|
+const toCall = () => {};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -113,4 +114,13 @@ const testClick = (index: number) => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.call-btn {
|
|
|
+ position: fixed;
|
|
|
+ top: 80px;
|
|
|
+ left: 650px;
|
|
|
+ height: 80px;
|
|
|
+ width: 200px;
|
|
|
+ font-size: 24px;
|
|
|
+}
|
|
|
</style>
|