From 5dbd5f73288a1dd739de5d2383678e19ba2aece9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 02 九月 2026 15:00:01 +0800
Subject: [PATCH] feat(hrm): 添加员工合同导入功能
---
src/api/hrm/employee/contract/index.ts | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/api/hrm/employee/contract/index.ts b/src/api/hrm/employee/contract/index.ts
index 38f1d73..a252c3e 100644
--- a/src/api/hrm/employee/contract/index.ts
+++ b/src/api/hrm/employee/contract/index.ts
@@ -85,6 +85,16 @@
terminateDate: string;
terminateReason: string;
}
+
+ /** 鍚堝悓瀵煎叆缁撴灉 */
+ export interface ImportResult {
+ /** 鏂板鎴愬姛鐨勫憳宸ュ悕鏁扮粍 */
+ createNames?: string[];
+ /** 瑕嗙洊鏇存柊鎴愬姛鐨勫憳宸ュ悕鏁扮粍 */
+ updateNames?: string[];
+ /** 瀵煎叆澶辫触闆嗗悎锛宬ey 涓哄憳宸ュ悕锛寁alue 涓哄け璐ュ師鍥� */
+ failureNames?: Record<string, string>;
+ }
}
/** 鑾峰彇鍛樺伐鍚堝悓鍒嗛〉鍒楄〃 */
@@ -128,3 +138,19 @@
export function getExpiringContractCount() {
return requestClient.get<number>('/hrm/employee-contract/expiring-count');
}
+
+/** 涓嬭浇鍛樺伐鍚堝悓瀵煎叆妯℃澘 */
+export function importEmployeeContractTemplate() {
+ return requestClient.download('/hrm/employee-contract/import-template');
+}
+
+/** 瀵煎叆鍛樺伐鍚堝悓 */
+export function importEmployeeContract(
+ file: File,
+ updateSupport: boolean,
+) {
+ return requestClient.upload<HrmEmployeeContractApi.ImportResult>(
+ '/hrm/employee-contract/import',
+ { file, updateSupport },
+ );
+}
--
Gitblit v1.9.3