import request from '@/utils/request'

// 查询假期剩余列表
export function listSurplus(query) {
  return request({
    url: '/clocking/surplus/list',
    method: 'get',
    params: query
  })
}

// 查询假期剩余详细
export function getSurplus(id) {
  return request({
    url: '/clocking/surplus/' + id,
    method: 'get'
  })
}

// 新增假期剩余
export function addSurplus(data) {
  return request({
    url: '/clocking/surplus',
    method: 'post',
    data: data
  })
}

// 修改假期剩余
export function updateSurplus(data) {
  return request({
    url: '/clocking/surplus',
    method: 'put',
    data: data
  })
}

// 删除假期剩余
export function delSurplus(id) {
  return request({
    url: '/clocking/surplus/' + id,
    method: 'delete'
  })
}

// 导出假期剩余
export function exportSurplus(query) {
  return request({
    url: '/clocking/surplus/export',
    method: 'get',
    params: query
  })
}