2026-09-04 37ddf55c782ea3d128e7755a60f5e09f8e9cba09
src/api/hrm/leave/index.ts
@@ -7,8 +7,8 @@
  /** 请假申请 */
  export interface Leave {
    id?: number;
    employeeId?: number;
    employeeName?: string;
    userId?: number;
    userName?: string;
    deptName?: string;
    leaveType?: number;
    startTime?: string;
@@ -21,6 +21,12 @@
    processInstanceId?: string;
    remark?: string;
    createTime?: string;
  }
  /** 审批流程 */
  export interface ApproveProcess {
    key: string;
    name: string;
  }
}
@@ -53,8 +59,10 @@
}
/** 提交请假申请(发起审批) */
export function submitLeave(id: number) {
  return requestClient.post(`/hrm/leave/submit?id=${id}`);
export function submitLeave(id: number, processDefinitionKey: string) {
  return requestClient.post('/hrm/leave/submit', null, {
    params: { id, processDefinitionKey },
  });
}
/** 撤销请假申请 */
@@ -64,5 +72,7 @@
/** 获取可用流程定义列表 */
export function getLeaveApproveProcessDefinitionList() {
  return requestClient.get<any[]>('/hrm/leave/approve-process-definition-list');
  return requestClient.get<HrmLeaveApi.ApproveProcess[]>(
    '/hrm/leave/approve-process-definition-list',
  );
}