import request from "@/util/oaRequest"

// 请假单
export function listLeaveReq(query) {
  return request({
    url: '/hrm/leave/req/list',
    method: 'get',
    params: query
  })
}

export function getLeaveReq(bizId) {
  return request({
    url: `/hrm/leave/req/${bizId}`,
    method: 'get'
  })
}

export function addLeaveReq(data) {
  return request({
    url: '/hrm/leave/req',
    method: 'post',
    data
  })
}

export function editLeaveReq(data) {
  return request({
    url: '/hrm/leave/req',
    method: 'put',
    data
  })
}

export function delLeaveReq(bizIds) {
  return request({
    url: `/hrm/leave/req/${bizIds}`,
    method: 'delete'
  })
}

export function allLeaveReq(query) {
  return request({
    url: '/hrm/leave/req/all',
    method: 'get',
    params: query
  })
}
