attendanceUtil.js
2.0 KB
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
65
66
67
68
69
import * as fetch from './fetch'
import * as constants from '../redux/constants/Constants'
// 雇员添加考勤方案
export const employeeAddAttendanceWay = (values, options = {}) => {
const url = `/api/attendance/plan/binding`
return fetch.post(url, values, options)
}
// 删除考勤
export const deleteAttendanceWay = (id, options = {}) => {
const url = `/api/attendance/plan/${id}`
return fetch.del(url, options)
}
// 考勤设置 list
export const attendanceWayList = (params, options = {}) => {
const url = `/api/attendance/plans?${params}`
return fetch.get(url, options)
}
// 添加考勤方案
export const addAttendanceWay = (values, options = {}) => {
const url = `/api/attendance/plan`
return fetch.post(url, values, options)
}
// 编辑考勤方案
export const editAttendanceWay = (values, options = {}) => {
const url = `/api/attendance/plan/${values.id}`
return fetch.put(url, values, options)
}
// 查看考勤方案
export const attendanceWayDetaile = (id, options = {}) => {
const url = `/api/attendance/plan/${id}`
return fetch.get(url, options)
}
// 考勤记录 缺勤预警 list
export const attendanceRecordAbsent = (params, options = {}) => {
const url = `/api/attendance/absence?${params}`
return fetch.get(url, options)
}
// 考勤记录 编辑缺勤预警
export const editAttendanceAbsent = (values, id, options = {}) => {
const url = `/api/attendance/absence/${id}`
return fetch.put(url, values, options)
}
// 考勤记录 自动打卡记录 list
export const attendanceRecordClock = (params, options = {}) => {
const url = `/api/attendance/attendance?${params}`
return fetch.get(url, options)
}
//考勤————考勤统计 列表
export const getAttendanceStatistics = (params, options = {}) => {
const url = `/api/attendance/` + `${params}`
return fetch.get(url, options)
}
//考勤————考勤统计 导入
export const postAttendanceStatistics = (data, href, params, options = {}) => {
const url = `/api/attendance/attendances-${href}`
return fetch.post(url, data , options)
}