| | |
| | | phone?: string; |
| | | email?: string; |
| | | idCard?: string; |
| | | nation?: string; |
| | | marriageStatus?: string; |
| | | age?: number; |
| | | education?: string; |
| | | politicalStatus?: string; |
| | | hireDate?: string; |
| | | regularDate?: string; |
| | | leaveDate?: string; |
| | |
| | | deptName?: string; |
| | | postName?: string; |
| | | } |
| | | |
| | | /** 员工导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的员工名数组 */ |
| | | createNames?: string[]; |
| | | /** 更新成功的员工名数组 */ |
| | | updateNames?: string[]; |
| | | /** 导入失败集合,key 为员工名,value 为失败原因 */ |
| | | failureNames?: Record<string, string>; |
| | | } |
| | | } |
| | | |
| | | /** 查询员工分页列表 */ |
| | |
| | | return requestClient.download('/hrm/employee/export-excel', { params }); |
| | | } |
| | | |
| | | /** 下载员工导入模板 */ |
| | | export function importEmployeeTemplate() { |
| | | return requestClient.download('/hrm/employee/import-template'); |
| | | } |
| | | |
| | | /** 导入员工 */ |
| | | export function importEmployee(file: File, updateSupport: boolean) { |
| | | return requestClient.upload<HrmEmployeeApi.ImportResult>( |
| | | '/hrm/employee/import', |
| | | { file, updateSupport }, |
| | | ); |
| | | } |
| | | |
| | | /** 删除教育经历 */ |
| | | export function deleteEducation(id: number) { |
| | | return requestClient.delete(`/hrm/employee/education/delete?id=${id}`); |