From 746102d4bf481d6940f60d51453d0ac1d7c21549 Mon Sep 17 00:00:00 2001
From: tuqin <tuqin@tuqin.cn>
Date: 星期一, 02 十一月 2026 14:15:36 +0800
Subject: [PATCH] fix(bpm/hrm): 修复流程发起人搜索、流程管理员默认超管;核算新增批量删除

---
 src/views/hrm/salary/calculation/index.vue |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/src/views/hrm/salary/calculation/index.vue b/src/views/hrm/salary/calculation/index.vue
index ae28b78..ac47e68 100644
--- a/src/views/hrm/salary/calculation/index.vue
+++ b/src/views/hrm/salary/calculation/index.vue
@@ -17,6 +17,7 @@
   calculateSalary,
   confirmSalary,
   deleteSalaryCalculation,
+  deleteSalaryCalculationBatch,
   exportSalaryCalculation,
   getSalaryCalculationPage,
   previewSalaryCalculation,
@@ -189,6 +190,37 @@
   const ids = records.map((r) => r.id!);
   await confirmSalary(ids);
   message.success('纭鎴愬姛');
+  handleRefresh();
+}
+
+/** 鎵归噺鍒犻櫎閫変腑鐨勬牳绠楄褰曪紙涓嶉檺鍒剁姸鎬侊紝鍕鹃�夊嵆鍒狅級 */
+async function handleBatchDelete() {
+  const records = gridApi.grid.getCheckboxRecords() as HrmSalaryCalculationApi.SalaryCalculation[];
+  if (records.length === 0) {
+    message.warning('璇烽�夋嫨瑕佸垹闄ょ殑鏍哥畻璁板綍');
+    return;
+  }
+  const ids = records.map((r) => r.id!).filter(Boolean);
+  if (ids.length === 0) {
+    message.warning('閫変腑鐨勮褰曠己灏� ID锛岃鍒锋柊鍚庨噸璇�');
+    return;
+  }
+  const confirmed = await new Promise<boolean>((resolve) => {
+    Modal.confirm({
+      title: '纭鎵归噺鍒犻櫎',
+      content: `纭畾鍒犻櫎閫変腑鐨� ${ids.length} 鏉℃牳绠楄褰曞悧锛熷垹闄ゅ悗闇�閲嶆柊鏍哥畻锛屼笖涓嶅彲鎭㈠銆俙,
+      okText: '纭畾鍒犻櫎',
+      okType: 'danger',
+      cancelText: '鍙栨秷',
+      onOk: () => resolve(true),
+      onCancel: () => resolve(false),
+    });
+  });
+  if (!confirmed) {
+    return;
+  }
+  const count = await deleteSalaryCalculationBatch(ids);
+  message.success(`宸插垹闄� ${count ?? ids.length} 鏉℃牳绠楄褰昤);
   handleRefresh();
 }
 
@@ -611,6 +643,12 @@
               onClick: handleBatchSave,
             },
             {
+              label: '鎵归噺鍒犻櫎',
+              danger: true,
+              auth: ['hrm:salary-calculation:delete'],
+              onClick: handleBatchDelete,
+            },
+            {
               label: '淇濆瓨淇敼',
               type: 'primary',
               auth: ['hrm:salary-calculation:calculate'],

--
Gitblit v1.9.3