From 56fab901b298857ff4985b7429ef843c9a9d1471 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期三, 28 八月 2024 16:20:02 +0800
Subject: [PATCH] 钢化模块打印功能,新增表格字段

---
 UI-Project/src/views/PurchaseReturn/purchaseStorage.vue |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
index 87f0c2f..bba4ca2 100644
--- a/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
+++ b/UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -11,7 +11,8 @@
 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)
@@ -41,7 +42,8 @@
   
     // 璁$畻鏂扮殑鐭╁舰  
     const newRects = data.overGlass[0].map(rect => {  
-      const scaleFactor =  1621.78/5190; 
+      const scaleFactor =  1390/5190; 
+      const scaleFactorY =  750/2800; 
       let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;
       let newX = rect.yCoordinate; 
       
@@ -54,15 +56,15 @@
       }
     if (rect.angle === 0) {  
     adjustedWidth = widtha * scaleFactor;  
-    adjustedHeight = heighta * 0.16;  
+    adjustedHeight = heighta * scaleFactorY;  
   } else {  
     adjustedWidth = heighta * scaleFactor;  
-    adjustedHeight = widtha * 0.16;  
+    adjustedHeight = widtha * scaleFactorY;  
   }  
   return {  
     ...rect, 
     xcoordinate: newX * scaleFactor, 
-    ycoordinate: rect.xCoordinate * 0.16,
+    ycoordinate: rect.xCoordinate * scaleFactorY,
     width: adjustedWidth,  
     height: adjustedHeight,  
     widtha: rect.width, 
@@ -107,7 +109,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 = () => {  
@@ -157,11 +165,11 @@
 <template>
   <div style="margin-top: 10px;">
 <div>
-    <el-card style="flex: 1;margin-left: 10px;margin-top: 10px;margin-right: 10px;height: 600px;" v-loading="loading">
+    <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="550px" width="1200px" style="background-color: #e9e9eb;">
+    <el-scrollbar height="750px" width="1400px" style="background-color: #e9e9eb;">
     <div  style="position: relative;">  
       <div  
       v-for="(rect, index) in adjustedRects"
@@ -184,7 +192,7 @@
     </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-button :disabled="!canSelectProject" type="warning" plain :icon="Delete" @click="handleDamage"  style="width: 140px;margin-left: 10px;">
           {{ $t('order.dilapidation') }}
         </el-button>
   </el-dialog> 

--
Gitblit v1.8.0