From 1496904805dff921b79504ed29a71d297a84e674 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 21 十月 2025 11:14:07 +0800
Subject: [PATCH] 中空线-创建任务-领取任务确认按钮,前端限制避免多次调用接口

---
 UI-Project/src/views/hollow/hollowequipmenttwo.vue |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/UI-Project/src/views/hollow/hollowequipmenttwo.vue b/UI-Project/src/views/hollow/hollowequipmenttwo.vue
index d0650d1..4ecdb3e 100644
--- a/UI-Project/src/views/hollow/hollowequipmenttwo.vue
+++ b/UI-Project/src/views/hollow/hollowequipmenttwo.vue
@@ -323,7 +323,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>
@@ -523,6 +523,7 @@
 const blindb = ref(false)
 const blindc = ref(false)
 const mulan = ref(false)
+const isSubmitting = ref(false)
 const isLoading = ref(true)
 const activeTab = ref('')
 const tabList = ref([])
@@ -1078,6 +1079,10 @@
     ElMessage.error(t('hellow.phollowformula'))
     return
   }
+  if (isSubmitting.value) {
+    return
+  }
+  isSubmitting.value = true
   try {
     var url = "/hollowGlass/hollowGlassOutRelationInfo/receiveTask?cell=" + 931 + "&flowCardId=" + flowCardId + "&totalPairQuantity=" + totalPairQuantity.value + "&formulaId=" + id;
     const response = await request.post(url)
@@ -1087,9 +1092,15 @@
       cell.value = '';
       formulaName.value = '';
       totalPairQuantity.value = '';
+      isSubmitting.value = true
     } else {
+      ElMessage.error(response.message);
+      isSubmitting.value = true
     }
   } catch (error) {
+      ElMessage.error(response.message);
+  } finally {
+    isSubmitting.value = false
   }
 }
 

--
Gitblit v1.8.0