import request from '@/utils/request'

// 创建客户佣金详情
export function createCustomerCommissionInfo(data) {
  return request({
    url: '/ecw/customer-commission-info/create',
    method: 'post',
    data: data
  })
}

// 更新客户佣金详情
export function updateCustomerCommissionInfo(data) {
  return request({
    url: '/ecw/customer-commission-info/update',
    method: 'put',
    data: data
  })
}

// 删除客户佣金详情
export function deleteCustomerCommissionInfo(id) {
  return request({
    url: '/ecw/customer-commission-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得客户佣金详情
export function getCustomerCommissionInfo(id) {
  return request({
    url: '/ecw/customer-commission-info/get?id=' + id,
    method: 'get'
  })
}

// 获得客户佣金详情分页
export function getCustomerCommissionInfoPage(query) {
  return request({
    url: '/ecw/customer-commission-info/page',
    method: 'get',
    params: query
  })
}

// 导出客户佣金详情 Excel
export function exportCustomerCommissionInfoExcel(query) {
  return request({
    url: '/ecw/customer-commission-info/export-excel',
    method: 'get',
    query: query,
    responseType: 'blob'
  })
}
//商品类型列表
export function itemTypeListApi(query){
  return request({
    url:'/ecw/product-attr/list',
    method:'get',
    query:query
  })
}
//
export  function customerDropDownList(query){
  return request({
    url:'/ecw/customer/select',
    method:'get',
    query,
  })
}
//商品
export function commodityList(){
  return request({
    url:'/ecw/product/list',
    method:'get',

  })
}
export function createCommission(query){
  return request({
    url:'/ecw/customer-commission/create',
    method:'post',
    data:query
  })
}
