From c407e091ff0320625ef2566a4bea362c697200c9 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期六, 29 六月 2024 22:09:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 UI-Project/src/views/Returns/returns.vue |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index cff32bf..42dd369 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -323,8 +323,8 @@
       const uniqueThicknesses = new Set(response.data.map(item => item.thickness));  
   
       selectOptions.value = Array.from(uniqueWidths).map(width => ({ 
-      value: width, // 鍋囪杩欐槸浣犳兂瑕佷綔涓簐alue鐨勫睘鎬�  
-      label: width, // 鍋囪杩欐槸浣犳兂瑕佹樉绀虹殑label  
+      value: width, 
+      label: width, 
     }));  
       selectOptionsa.value = Array.from(uniqueHeights).map(height => ({ 
       value: height, 
@@ -504,14 +504,13 @@
     ElMessage.error(t('basicData.updatanull'));  
     return; // 濡傛灉 id 涓虹┖锛屽垯涓嶆墽琛屽悗缁搷浣�  
   }  
-  
   const newState = row.state === 100 ? 0 : 100;  
-  
   try {  
     // 鍙戦�佽姹傚埌鍚庣鏇存柊鐘舵��  
     const response = await request.post('/loadGlass/up-patten-usage/updateGlassState', { id: row.id, state: newState });  
     if (response.code === 200) {  
       ElMessage.success(response.message);  
+      row.state = newState;  
     } else {  
       ElMessage.error(response.message);  
     }  
@@ -520,7 +519,6 @@
     ElMessage.error(t('basicData.glassnull'));   
   }  
 };  
-
 const wsUrl = `ws://${WebSocketHost}:${host}/api/loadGlass/api/talk/loadGlass`;
 const ws = new WebSocket(wsUrl);  
 ws.onopen = () => {  

--
Gitblit v1.8.0