gaoluyang
7 天以前 a1e9064bb4c0a41c9a1e389cdd0f0f9bab009309
src/api/hrm/leave/index.ts
@@ -28,6 +28,14 @@
    key: string;
    name: string;
  }
  /** 导入结果 */
  export interface ImportResult {
    /** 创建成功的记录(手机号 + 日期) */
    createNames?: string[];
    /** 导入失败集合,key 为「第N行」,value 为失败原因 */
    failureNames?: Record<string, string>;
  }
}
/** 查询请假申请分页列表 */
@@ -75,4 +83,16 @@
  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,
  });
}