From fcb87424f8f9fc58163227684ecee36a99ba0c3d Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 22 十月 2025 14:31:25 +0800
Subject: [PATCH] fix: bug

---
 src/views/FlexJobManage/FlexJobManage.vue |   48 +++++++++++++++++++++++++++++-------------------
 1 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index 907e336..54b7d12 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -139,6 +139,7 @@
 import SignDialog from './components/SignDialog.vue';
 import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee';
 import { ModelValueType } from 'element-plus';
+import _ from 'lodash';
 
 defineOptions({
   name: 'FlexJobManageList',
@@ -513,28 +514,37 @@
   }
 }
 
-function handleEnterpriseBatchSign() {
-  const selectionRows = getSelectionRows();
-  if (selectionRows) {
-    const hasSigned = selectionRows?.some(
-      (x) =>
-        !(
-          x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
-          x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
-        )
-    );
-    if (hasSigned) {
-      Message.warnMessage('鍕鹃�変汉鍛樹腑鍖呭惈宸蹭紒涓氱绾︺�佹湭褰曠敤浜哄憳鎴栨湭绛剧害瀹屾垚浜哄憳');
-      return;
+const handleEnterpriseBatchSign = _.debounce(
+  () => {
+    const selectionRows = getSelectionRows();
+    if (selectionRows) {
+      const hasSigned = selectionRows?.some(
+        (x) =>
+          !(
+            x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
+            x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
+          )
+      );
+      if (hasSigned) {
+        Message.warnMessage('鍕鹃�変汉鍛樹腑鍖呭惈宸蹭紒涓氱绾︺�佹湭褰曠敤浜哄憳鎴栨湭绛剧害瀹屾垚浜哄憳');
+        return;
+      }
+      const ids = selectionRows.map((x) => x.id);
+      handleBatchEnterpriseSign(ids);
     }
-    const ids = selectionRows.map((x) => x.id);
-    handleBatchEnterpriseSign(ids);
-  }
-}
+  },
+  1000,
+  { leading: true, trailing: false }
+);
 
 async function handleBatchEnterpriseSign(ids: string[]) {
   try {
-    let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids });
+    let res = await enterpriseEmployeeServices.batchEnterpriseSignContract(
+      { ids: ids },
+      {
+        showLoading: !state.loading,
+      }
+    );
     if (res) {
       Message.successMessage('鎿嶄綔鎴愬姛');
       getList(paginationState.pageIndex);
@@ -547,7 +557,7 @@
               name: '濮撳悕',
               contactPhoneNumber: '鎵嬫満鍙�',
               identity: '韬唤璇佸彿',
-              errorMessage: '閿欒淇℃伅',
+              errorMessages: '閿欒淇℃伅',
             },
           });
         });

--
Gitblit v1.9.1