43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import request from '@/config/axios'
|
||
|
||
// 考勤班次 VO
|
||
export interface AttendShiftVO {
|
||
id: number // 主键
|
||
ruleId: number // 所属考勤规则
|
||
name: string // 班次名称
|
||
shiftType: number // 班次类型:1固定班次 2轮班制(三班倒)
|
||
restIncluded: boolean // 是否包含休息时段
|
||
}
|
||
|
||
// 考勤班次 API
|
||
export const AttendShiftApi = {
|
||
// 查询考勤班次分页
|
||
getAttendShiftPage: async (params: any) => {
|
||
return await request.get({ url: `/hrm/attend-shift/page`, params })
|
||
},
|
||
|
||
// 查询考勤班次详情
|
||
getAttendShift: async (id: number) => {
|
||
return await request.get({ url: `/hrm/attend-shift/get?id=` + id })
|
||
},
|
||
|
||
// 新增考勤班次
|
||
createAttendShift: async (data: AttendShiftVO) => {
|
||
return await request.post({ url: `/hrm/attend-shift/create`, data })
|
||
},
|
||
|
||
// 修改考勤班次
|
||
updateAttendShift: async (data: AttendShiftVO) => {
|
||
return await request.put({ url: `/hrm/attend-shift/update`, data })
|
||
},
|
||
|
||
// 删除考勤班次
|
||
deleteAttendShift: async (id: number) => {
|
||
return await request.delete({ url: `/hrm/attend-shift/delete?id=` + id })
|
||
},
|
||
|
||
// 导出考勤班次 Excel
|
||
exportAttendShift: async (params) => {
|
||
return await request.download({ url: `/hrm/attend-shift/export-excel`, params })
|
||
}
|
||
} |