import request from '@/config/axios'

// 创建
export const createPlan = (data) => {
  return request.post({ url: '/admin-api/oa/attendance-setting/create', data, isSubmitForm: true })
}

// 修改
export const updatePlan = (data) => {
  return request.put({ url: '/admin-api/oa/attendance-setting/update', data })
}

//  修改状态
export const updatePlanStatus = (data) => {
  return request.put({ url: '/admin-api/oa/attendance-setting/status/update', data })
}

// 分页
export const getPlanPage = (params) => {
  return request.get({ url: '/admin-api/oa/attendance-setting/page', params })
}

// 列表
export const getPlanSimpleList = (params) => {
  return request.get({ url: '/admin-api/oa/attendance-setting/simple-list', params })
}

// 详情
export const getPlanDetail = (id) => {
  return request.get({ url: '/admin-api/oa/attendance-setting/get', params: { id } })
}

// 删除
export const deletePlan = (id) => {
  return request.delete({ url: '/admin-api/oa/attendance-setting/delete', params: { id } })
}
