import request from '@/config/axios'

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

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

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

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

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

// 详情
export const getSalaryDetail = (id) => {
  return request.get({
    url: '/admin-api/oa/user-salary/getByEmployeeId',
    params: { employeeId: id }
  })
}

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