import request from '@/utils/request'

// 级别配置-等级配置-获取等级配置列表
export function getGradeList(params) {
  return request({
    url: '/system/manage/grade/list',
    method: 'get',
    params
  })
}

// 级别配置-等级配置-获取直推范围列表-注册等级
export function getgradeRanglist(params) {
  return request({
    url: '/system/manage/grade/gradeRanglist',
    method: 'get',
    params
  })
}
// 证件类型
export function getCardType(params) {
  return request({
    url: '/system/pub/enums/get-card-type',
    method: 'get',
    params
  })
}
// 获取性别
export function getSex(params) {
  return request({
    url: '/system/pub/enums/get-sex',
    method: 'get',
    params
  })
}
// 获取单条等级配置
export function getOnelist(pkId) {
  return request({
    url: '/system/manage/grade/getOne/' + pkId,
    method: 'get'
  })
}

// 删除等级配置
export function deleteGrade(pkId) {
  return request({
    url: '/system/manage/grade/' + pkId,
    method: 'delete'
  })
}

// 统计类型列表
export function getStatistical(params) {
  return request({
    url: '/system/pub/enums/statistical-value',
    method: 'get',
    params
  })
}
// 注册权限列表
export function getRegistration(params) {
  return request({
    url: '/system/pub/enums/registration-authority',
    method: 'get',
    params
  })
}
// 真实奖衔下拉选择列表
export function getAwardsListChiose(params) {
  return request({
    url: '/system/manage/awards/awardsList',
    method: 'get',
    params
  })
}
// 获取讲师等级
export function lecturerList(params) {
  return request({
    url: '/system/pub/enums/lecturer',
    method: 'get',
    params
  })
}
// 添加等级配置
export function saveGrade(data) {
  return request({
    url: '/system/manage/grade/generate',
    method: 'post',
    data
  })
}

// 生成等级配置
// export function scGradeGenerate(data) {
//     return request({
//         url: '/system/manage/grade/generate',
//         method: 'post',
//         data
//     })
// }

// 修改单条等级配置
export function updateGrade(data) {
  return request({
    url: '/system/manage/grade/update',
    method: 'post',
    data
  })
}

// 级别配置-奖衔配置-获取奖衔配置列表
export function getAwardsList(params) {
  return request({
    url: '/system/manage/awards/list',
    method: 'get',
    params
  })
}

// 获取单条奖衔配置
export function getOneAwards(pkId) {
  return request({
    url: '/system/manage/awards/getOne/' + pkId,
    method: 'get'
  })
}

// 删除单条奖衔配置
export function deleteAwards(pkId) {
  return request({
    url: '/system/manage/awards/' + pkId,
    method: 'delete'
  })
}

// 添加奖衔配置
export function saveAwards(data) {
  return request({
    url: '/system/manage/awards/save',
    method: 'post',
    data
  })
}

// 生成奖衔配置
export function scGenerate(data) {
  return request({
    url: '/system/manage/awards/generate',
    method: 'post',
    data
  })
}

// 修改奖衔配置
export function updateAwards(data) {
  return request({
    url: '/system/manage/awards/update',
    method: 'post',
    data
  })
}

// 考核类型枚举列表下拉
export function getRelationList(params) {
  return request({
    url: '/system/pub/enums/relation-type',
    method: 'get',
    params
  })
}

// 级别配置-复购级差-获取复购级差列表
export function getRangeList(params) {
  return request({
    url: '/system/manage/range/list',
    method: 'get',
    params
  })
}

// 生成级差、添加
export function scRangeGenerate(data) {
  return request({
    url: '/system/manage/range/generate',
    method: 'post',
    data
  })
}

// 获取单条级差
export function getOneManage(pkId) {
  return request({
    url: '/system/manage/range/getOne/' + pkId,
    method: 'get'
  })
}

// 删除级差列表
export function deleteRange(pkId) {
  return request({
    url: '/system/manage/range/' + pkId,
    method: 'delete'
  })
}

// 修改级差配置
export function updateManage(data) {
  return request({
    url: '/system/manage/range/update',
    method: 'post',
    data
  })
}

// 等级启用禁用
export function updateStatusGrade(data) {
  return request({
    url: '/system/manage/grade/updateState',
    method: 'post',
    data
  })
}

// 奖衔启用禁用
export function updateStatusAwards(data) {
  return request({
    url: '/system/manage/awards/updateState',
    method: 'post',
    data
  })
}

// 等级属性-等级枚举
export function getGradeValueList(params) {
  return request({
    url: '/system/pub/enums/gradeList',
    method: 'get',
    params
  })
}

// 奖衔属性-奖衔枚举
export function getAwardsValueList(params) {
  return request({
    url: '/system/pub/enums/awardsList',
    method: 'get',
    params
  })
}

// 级差属性
export function getJcsxList(params) {
  return request({
    url: '/system/pub/enums/awardsAllList',
    method: 'get',
    params
  })
}
