| | |
| | | /** 请假申请 */ |
| | | export interface Leave { |
| | | id?: number; |
| | | employeeId?: number; |
| | | employeeName?: string; |
| | | userId?: number; |
| | | userName?: string; |
| | | deptName?: string; |
| | | leaveType?: number; |
| | | startTime?: string; |
| | |
| | | processInstanceId?: string; |
| | | remark?: string; |
| | | createTime?: string; |
| | | } |
| | | |
| | | /** 审批流程 */ |
| | | export interface ApproveProcess { |
| | | key: string; |
| | | name: string; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** 提交请假申请(发起审批) */ |
| | | 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 }, |
| | | }); |
| | | } |
| | | |
| | | /** 撤销请假申请 */ |
| | |
| | | |
| | | /** 获取可用流程定义列表 */ |
| | | export function getLeaveApproveProcessDefinitionList() { |
| | | return requestClient.get<any[]>('/hrm/leave/approve-process-definition-list'); |
| | | return requestClient.get<HrmLeaveApi.ApproveProcess[]>( |
| | | '/hrm/leave/approve-process-definition-list', |
| | | ); |
| | | } |