| | |
| | | key: string; |
| | | name: string; |
| | | } |
| | | |
| | | /** 导入结果 */ |
| | | export interface ImportResult { |
| | | /** 创建成功的记录(手机号 + 日期) */ |
| | | createNames?: string[]; |
| | | /** 导入失败集合,key 为「第N行」,value 为失败原因 */ |
| | | failureNames?: Record<string, string>; |
| | | } |
| | | } |
| | | |
| | | /** 查询请假申请分页列表 */ |
| | |
| | | return requestClient.get<HrmLeaveApi.ApproveProcess[]>( |
| | | '/hrm/leave/approve-process-definition-list', |
| | | ); |
| | | } |
| | | |
| | | /** 下载请假申请导入模板 */ |
| | | export function importLeaveTemplate() { |
| | | return requestClient.download('/hrm/leave/get-import-template'); |
| | | } |
| | | |
| | | /** 批量导入请假申请(生成草稿) */ |
| | | export function importLeave(file: File) { |
| | | return requestClient.upload<HrmLeaveApi.ImportResult>('/hrm/leave/import', { |
| | | file, |
| | | }); |
| | | } |