From c377d90fe2a01c2118f6c69c3c177f75be7c318b Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期五, 29 十一月 2024 15:20:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue | 70 ++++++++++++++++++++---------------
1 files changed, 40 insertions(+), 30 deletions(-)
diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index dc37809..f411b80 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -1,17 +1,15 @@
<script setup>
-import {Search} from "@element-plus/icons-vue";
-import {reactive} from "vue";
-import {useRouter} from "vue-router"
-import { ElMessage, ElMessageBox } from 'element-plus'
+import {onBeforeUnmount, onMounted, onUnmounted, ref} from "vue";
+import {ElMessage} from 'element-plus'
import request from "@/utils/request"
-
-import { ref, onMounted, onBeforeUnmount,onUnmounted } from 'vue';
-import { WebSocketHost ,host} from '@/utils/constants'
-import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
+import {host, WebSocketHost} from '@/utils/constants'
+import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService';
+
const adjustedRects = ref([]);
const currentGlassId = ref(null);
const currenttemperingFeedSequence = ref(null);
-
+const currentRect = ref(null);
+const canSelectProject = ref(true);
const dialogFormVisible = ref(true)
const dialogFormVisiblea = ref(false)
const blind = ref(false)
@@ -108,7 +106,13 @@
}
currentGlassId.value = rect.glassId;
currenttemperingFeedSequence.value = rect.temperingFeedSequence;
- blind.value = true;
+ blind.value = true;
+ currentRect.value = rect;
+ if (currentRect.value.state == 8) {
+ canSelectProject.value = false;
+ } else if (currentRect.value.state !== 8) {
+ canSelectProject.value = true;
+ }
}
const handleDialogClose = () => {
@@ -154,19 +158,24 @@
closeWebSocket();
});
</script>
-
+
<template>
- <div style="margin-top: 10px;">
-<div>
- <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;" v-loading="loading">
- <!-- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> -->
- <div v-if="adjustedRects.length > 0">
- <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{ adjustedRects[0].temperingLayoutId }}</div>
- <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
- <div style="position: relative;">
- <div
- v-for="(rect, index) in adjustedRects"
- :key="index"
+ <div style="height: 500px;">
+ <div style="margin-top: 10px;">
+ <div>
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 800px;"
+ v-loading="loading">
+ <!-- <el-card style="margin-left: 10px;margin-top: 10px;margin-right: 10px;" v-loading="loading"> -->
+ <div v-if="adjustedRects.length > 0">
+ <div style="text-align: center;">鐐夊彿锛歿{ adjustedRects[0].engineerId }}-{{
+ adjustedRects[0].temperingLayoutId
+ }}
+ </div>
+ <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
+ <div style="position: relative;">
+ <div
+ v-for="(rect, index) in adjustedRects"
+ :key="index"
@click="showDialog(rect)"
class="rect"
:style="{ position: 'absolute', top: `${rect.ycoordinate}px`, left: `${rect.xcoordinate}px`,
@@ -180,17 +189,18 @@
</div>
</div>
</div>
- </el-scrollbar>
- </div>
- </el-card>
- </div>
- <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
- <el-button type="warning" plain :icon="Delete" @click="handleDamage" style="width: 140px;margin-left: 10px;">
+ </el-scrollbar>
+ </div>
+ </el-card>
+ </div>
+ <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose">
+ <el-button :disabled="!canSelectProject" type="warning" plain :icon="Delete" @click="handleDamage"
+ style="width: 140px;margin-left: 10px;">
{{ $t('order.dilapidation') }}
</el-button>
- </el-dialog>
+ </el-dialog>
+ </div>
</div>
-
</template>
<style scoped>
--
Gitblit v1.8.0