From 43d86830f4696c3ba2250a961d26377e1ff6cc32 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 17 十二月 2025 10:39:43 +0800
Subject: [PATCH] 1、 查询是否除膜优化

---
 UI-Project/src/views/hollow/hollowequipmenthree.vue |   47 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/UI-Project/src/views/hollow/hollowequipmenthree.vue b/UI-Project/src/views/hollow/hollowequipmenthree.vue
index f6d3d9c..cb8eb99 100644
--- a/UI-Project/src/views/hollow/hollowequipmenthree.vue
+++ b/UI-Project/src/views/hollow/hollowequipmenthree.vue
@@ -8,9 +8,9 @@
         <el-button id="searchButton" type="primary" @click="handlezhiban">
           {{ $t('hellow.createtask') }}
         </el-button>
-        <el-button type="primary" @click="selectproject">
+        <!-- <el-button type="primary" @click="selectproject">
           {{ $t('hellow.reviewproject') }}
-        </el-button>
+        </el-button> -->
     <el-button style="margin-left: 10px;" id="searchButton" type="primary" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
     <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda">
           {{ $t('hellow.starttask') }}
@@ -322,7 +322,7 @@
     </div>
     <template #footer>
       <div id="dialog-footer">
-        <el-button type="primary" @click="finisha">
+        <el-button type="primary" @click="finisha" :disabled="isSubmitting">
           {{ $t('reportWork.sure') }}
         </el-button>
         <el-button @click="dialogFormVisiblec = false">{{ $t('reportWork.cancel') }}</el-button>
@@ -554,6 +554,7 @@
 const blindc = ref(false)
 const mulan = ref(false)
 const isLoading = ref(true)
+const isSubmitting = ref(false)
 const activeTab = ref('')
 const tabList = ref([])
 const internalInstance = getCurrentInstance()
@@ -615,7 +616,7 @@
   }
 ]
 let socket = null;
-const socketUrl = `ws://${WebSocketHost}:${host}/api/hollowGlass/api/talk/HollowGlassThree`;
+const socketUrl = `ws://${window.ipConfig.serverUrl}/api/hollowGlass/api/talk/HollowGlassThree`;
 const currentPage = ref(parseInt(window.localStorage.getItem('currentPage')) || 1);
 watch(() => currentPage.value, (newVal) => {
   window.localStorage.setItem('currentPage', newVal);
@@ -625,14 +626,20 @@
   currentPage.value = newPage;
 };
 const handleMessage = (data) => {
+  if (data.queueInfo[0] != null) {
   const rawData = data.queueInfo[0]
   const formattedData = Object.entries(rawData).map(([key, data]) => ({  
     title: key,  
     tableDataa: Array.isArray(data) ? data : [data]  
   }));  
   tabList.value = formattedData;  
+}else{
+      tabList.value = [];
+  }
   if (tabList.value.length > 0) {  
-    activeTab.value = tabList.value[0].title;  
+    activeTab.value = tabList.value[0].title;
+  }else {
+      activeTab.value = '';
   }
   internalInstance.ctx.$forceUpdate();  
   try {
@@ -755,6 +762,7 @@
 const handletake = (row) => {
   window.localStorage.setItem('flowCardId', row.flowCardId)
   dialogFormVisiblec.value = true;
+  isSubmitting.value = false
   fetchmulan()
 };
 // 寮哄埗鍑虹墖
@@ -790,6 +798,9 @@
 function nestedTableRowClassName(parentRow, row) {
   if (parentRow.isThroughSlot == true) {
     return 'row-red-background';
+  }
+  if (row.row?.sumCount !== undefined && row.row?.pairCount !== undefined && row.row.sumCount !== row.row.pairCount) {
+    return 'sum-equal-pair-row' // 杩斿洖鑷畾涔夌被鍚�
   }
   return '';
 }
@@ -1070,6 +1081,10 @@
     ElMessage.error(t('hellow.cpairQuantity'))
     return
   }
+  if (isSubmitting.value) {
+    return
+  }
+  isSubmitting.value = true
     try {
       var url="/hollowGlass/hollowGlassOutRelationInfo/receiveTask?cell="+ 932 + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantity.value+ "&formulaId=" + -1;
       const response = await request.post(url)
@@ -1079,9 +1094,13 @@
       cell.value = '';
       formulaName.value = '';
       totalPairQuantity.value = '';
+      isSubmitting.value = true
     } else {
+      ElMessage.error(response.message);
+      isSubmitting.value = true
         }
       } catch (error) {
+      ElMessage.error(response.message);
       }
     }
 // 寮哄埗鍑虹墖
@@ -1128,7 +1147,9 @@
 const blinde = ref(false)
 const labelPrint = ref(false);
 const handleBinde = (flowCard) => {
-  const summary = flowCard.reduce((map, item) => {
+  const summary = flowCard
+        .filter(item => item.isPair !== 0) 
+        .reduce((map, item) => {
         const key = `${item.hollowSequence}`;
         if (!map[key]) {
           map[key] = {
@@ -1213,16 +1234,9 @@
 .custom-page-buttons {
   display: flex;
   gap: 10px;
-  margin-top: 20px;
-}
-
-.custom-page-buttons {
-  display: flex;
-  gap: 10px;
   margin: 20px 0;
   flex-wrap: wrap;
 }
- 
 .page-btn {
   padding: 8px 16px;
   min-width: 40px;
@@ -1232,11 +1246,9 @@
   cursor: pointer;
   transition: all 0.3s;
 }
- 
 .page-btn:hover {
   background: #e6f1ff;
 }
- 
 .page-btn.active-page {
   background: #409eff;
   color: white;
@@ -1250,4 +1262,9 @@
 .el-loading-mask {
   z-index: 2000 !important;
 }
+/* 鏍稿績3锛氭坊鍔犺鍙樿壊鏍峰紡锛岄�氳繃:deep绌块�弒coped */
+:deep(.sum-equal-pair-row) {
+  background-color: #fdf2e8 !important; /* 娴呮搴曡壊锛屽彲鑷淇敼 */
+  color: #e64340 !important; /* 鏂囧瓧鑹诧紝鍙�� */
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0