import request from '@/utils/request'

// 获取拓展配置列表
export function getExpandList() {
  return request({
    url: '/system/manage/grade/expandList',
    method: 'get',
  })
}

//修改拓展配置列表
export function updateExpand(data) {
  return request({
    url: '/system/manage/grade/updateExpand',
    method: 'post',
    data
  })
}

//4-N配置列表
export function getbdBonusExpand() {
  return request({
    url: '/system/manage/bd-bonus-expand/list',
    method: 'get',
  })
}

//辅导分红列表
export function getcoachBonusList() {
  return request({
    url: '/system/manage/awards/coachBonusList',
    method: 'get',
  })
}

//考核类型下拉选
export function getAssessmentType() {
  return request({
    url: '/system/pub/enums/assessmentType',
    method: 'get',
  })
}


//修改辅导分红
export function updateCoachBonus(data) {
  return request({
    url: '/system/manage/awards/updateCoachBonus',
    method: 'post',
    data
  })
}

//获取环球积分、车奖积分列表
export function getintegralList() {
  return request({
    url: '/system/manage/awards/integralList',
    method: 'get',
  })
}

//修改环球积分
export function updategLobalIntegral(data) {
  return request({
    url: '/system/manage/awards/updategLobalIntegral',
    method: 'post',
    data
  })
}

//修改车奖积分
export function updategCarAwardPoints(data) {
  return request({
    url: '/system/manage/awards/updategCarAwardPoints',
    method: 'post',
    data
  })
}

//云代配置列表获取
export function getCloudList() {
  return request({
    url: '/system/manage/bd-bonus-cloud/list',
    method: 'get',
  })
}

//修改云代配置
export function updateCloud(data) {
  return request({
    url: '/system/manage/bd-bonus-cloud/save',
    method: 'post',
    data
  })
}

//服务补贴配置列表
export function getServiceList() {
  return request({
    url: '/system/manage/bonus-service/list',
    method: 'get',
  })
}

//修改服务补贴配置
export function updateService(data) {
  return request({
    url: '/system/manage/bonus-service/update',
    method: 'post',
    data
  })
}

//服务补贴类型枚举值
export function getServiceTypeList() {
  return request({
    url: '/system/pub/enums/get-service-type',
    method: 'get',
  })
}

//奖金扣项列表
export function getDeductList() {
  return request({
    url: '/system/manage/bonus-deduct/list',
    method: 'get',
  })
}

//奖金扣项修改
export function updateDeduct(data) {
  return request({
    url: '/system/manage/bonus-deduct/update',
    method: 'post',
    data
  })
}

//奖金扣项枚举查询
export function getDeductTypeList() {
  return request({
    url: '/system/pub/enums/get-bonus-deduct',
    method: 'get',
  })
}
// 奖金来源
export function bonusSource(data,data1) {
  return request({
    url: '/bonus/manage/bonus/query-bonus-source'+data1,
    method: 'post',
    data
  })
}

// 奖金计算
export function listPeriod(data,data1) {
  return request({
    url: '/bonus/manage/settle/list-period' + data1,
    method: 'post',
    data
  })
}
// 奖金明细
export function queryBonusDetail(data,data1) {
  return request({
    url: '/bonus/manage/bonus/query-bonus-detail' + data1,
    method: 'post',
    data
  })
}
// 奖金汇总
export function queryBonusTotal(data,data1) {
  return request({
    url: '/bonus/manage/bonus/query-bonus-total' + data1,
    method: 'post',
    data
  })
}

//获取直推配置列表
export function getdirectLoopList() {
  return request({
    url: '/system/manage/bd-bonus-direct-loop/list',
    method: 'get',
  })
}

//极差枚举类型列表1等级2奖衔
export function getrangeTypeList() {
  return request({
    url: '/system/pub/enums/range-type',
    method: 'get',
  })
}

//计算类型枚举值
export function getcellTypeList() {
  return request({
    url: '/system/pub/enums/cal-type',
    method: 'get',
  })
}

//取值类型枚举
export function getTakeValueTypeList() {
  return request({
    url: '/system/pub/enums/take-value-type',
    method: 'get',
  })
}


//保存修改直推配置
export function updateDirectLoop(data) {
  return request({
    url: '/system/manage/bd-bonus-direct-loop/save',
    method: 'post',
    data
  })
}

//奖项配置列表
export function getbonusList(params) {
  return request({
    url: '/system/manage/bd-bonus-items/list',
    method: 'get',
    params
  })
}

//删除奖项配置
export function deletebonusList(pkId) {
  return request({
    url: '/system/manage/bd-bonus-items/'+pkId,
    method: 'delete',
  })
}

//获取单条奖项配置列表
export function getOneBounsList(pkId) {
  return request({
    url: '/system/manage/bd-bonus-items/getOne/'+pkId,
    method: 'get',
  })
}

//生成奖项配置列表
export function scBonusList(data) {
  return request({
      url: '/system/manage/bd-bonus-items/generate',
      method: 'post',
      data
  })
}

//修改奖项配置列表
export function updateBonus(data) {
  return request({
      url: '/system/manage/bd-bonus-items/update',
      method: 'post',
      data
  })
}

//结算周期枚举列表
export function getsettlement(params) {
  return request({
    url: '/system/pub/enums/settlement-cycle',
    method: 'get',
    params
  })
}

//公布日期、发布日期、可提现日期 枚举
export function getPublishDate(params) {
  return request({
    url: '/system/pub/enums/publish-date',
    method: 'get',
    params
  })
}

//直推配置-获取代数列表
export function getAlgebra(params) {
  return request({
    url: '/system/pub/enums/algebra',
    method: 'get',
    params
  })
}


