From 557c2b3c50027c2eb6fb9f7e562fc2c7b2b38203 Mon Sep 17 00:00:00 2001
From: quxin <592870522@qq.com>
Date: 星期五, 04 九月 2026 11:37:17 +0800
Subject: [PATCH] 修复: 生产领料后的退料应该是选择领料的记录,不是选择库存的记录(同时库存数据需要根据领料退料变动,比如库存100,领用80,然后领用80中退料30,库存应由原来的20变成50)

---
 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