| | |
| | | terminateDate: string; |
| | | terminateReason: string; |
| | | } |
| | | |
| | | /** 合同导入结果 */ |
| | | export interface ImportResult { |
| | | /** 新增成功的员工名数组 */ |
| | | createNames?: string[]; |
| | | /** 覆盖更新成功的员工名数组 */ |
| | | updateNames?: string[]; |
| | | /** 导入失败集合,key 为员工名,value 为失败原因 */ |
| | | failureNames?: Record<string, string>; |
| | | } |
| | | } |
| | | |
| | | /** 获取员工合同分页列表 */ |
| | |
| | | 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 }, |
| | | ); |
| | | } |