import request from '@/utils/request'

//查询成长规则列表
export function getGrouthRuleList() {
  return request({
    url: '/customer/setting/getGrouthRuleList',
    method: 'get',
  })
}

//新增成长规则
export function addGrouthRule(data) {
  return request({
    url: '/customer/setting/addGrouthRule',
    method: 'post',
    data: data
  })
}
//编辑成长规则
export function editGrouthRule(data) {
  return request({
    url: '/customer/setting/editGrouthRule',
    method: 'post',
    data: data
  })
}

//删除成长规则
export function delGrouthRule(id) {
  return request({
    url: '/customer/setting/delGrouthRule?id=' + id,
    method: 'delete'
  })
}



// 查询客户优惠等级设置列表
export function listSetting(query) {
  return request({
    url: '/customer/setting/list',
    method: 'get',
    params: query
  })
}
export function getSettingDT(query) {
  return request({
    url: '/customer/setting/onely',
    method: 'get'
  })
}

// 查询客户优惠等级设置详细
export function getSetting(id) {
  return request({
    url: '/customer/setting/' + id,
    method: 'get'
  })
}

// 新增客户优惠等级设置
export function addSetting(data) {
  return request({
    url: '/customer/setting',
    method: 'post',
    data: data
  })
}

// 修改客户优惠等级设置
export function updateSetting(data) {
  return request({
    url: '/customer/setting',
    method: 'put',
    data: data
  })
}

// 删除客户优惠等级设置
export function delSetting(id) {
  return request({
    url: '/customer/setting/' + id,
    method: 'delete'
  })
}

// 导出客户优惠等级设置
export function exportSetting(query) {
  return request({
    url: '/customer/setting/export',
    method: 'get',
    params: query
  })
}
