import request from '@/config/axios'

// 获取提成结算参数
export const getCommissionParams = async () => {
  return await request.get({ url: '/admin-api/oa/percentage/get-percentage-param' })
}

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

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

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

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

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

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

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