zhangwencui
2 天以前 a2002ba0e8aa2a0e4eee61b5205748d8f6e454fc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import type { PageParam, PageResult } from '#/packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace HrmAttendanceExceptionApi {
  /** 考勤异常申请 */
  export interface AttendanceException {
    id?: number;
    userId?: number;
    userName?: string;
    deptName?: string;
    date?: string;
    exceptionType?: number;
    exceptionTypeName?: string;
    reason?: string;
    fileUrl?: string;
    status?: number;
    processInstanceId?: string;
    remark?: string;
    createTime?: string;
  }
 
  /** 审批流程 */
  export interface ApproveProcess {
    key: string;
    name: string;
  }
}
 
/** 查询考勤异常申请分页列表 */
export function getAttendanceExceptionPage(params: PageParam) {
  return requestClient.get<PageResult<HrmAttendanceExceptionApi.AttendanceException>>(
    '/hrm/attendance/exception/page',
    { params },
  );
}
 
/** 查询考勤异常申请详情 */
export function getAttendanceException(id: number) {
  return requestClient.get<HrmAttendanceExceptionApi.AttendanceException>(
    `/hrm/attendance/exception/get?id=${id}`,
  );
}
 
/** 新增考勤异常申请 */
export function createAttendanceException(
  data: HrmAttendanceExceptionApi.AttendanceException,
) {
  return requestClient.post('/hrm/attendance/exception/create', data);
}
 
/** 提交考勤异常申请 */
export function submitAttendanceException(id: number, processDefinitionKey: string) {
  return requestClient.post('/hrm/attendance/exception/submit', null, {
    params: { id, processDefinitionKey },
  });
}
 
/** 获取考勤异常审批流程列表 */
export function getAttendanceExceptionApproveProcessList() {
  return requestClient.get<HrmAttendanceExceptionApi.ApproveProcess[]>(
    '/hrm/attendance/exception/approve-process-list',
  );
}