import request from '@/utils/request'

// 创建客户管理
export function createCustomerMain(data) {
  return request({
    url: '/base/custom/create',
    method: 'post',
    data: data
  })
}

export function bindCustomerCar(data) {
  return request({
    url: '/base/custom/bindCustomerCar',
    method: 'post',
    data: data
  })
}

export function setLabelList(data) {
  return request({
    url: '/base/custom/setLabel',
    method: 'post',
    data: data
  })
}

// 更新客户管理
export function updateCustomerMain(data) {
  return request({
    url: '/base/custom/update',
    method: 'put',
    data: data
  })
}

// 删除客户管理
export function deleteCustomerMain(id) {
  return request({
    url: '/base/custom/delete?id=' + id,
    method: 'delete'
  })
}

// 获得客户管理
export function getCustomerMain(id) {
  return request({
    url: '/base/custom/get?id=' + id,
    method: 'get'
  })
}


export function getCustomerMainPage(params) {
  return request({
    url: '/base/custom/page',
    method: 'get',
    params
  })
}
// 导出客户管理 Excel
export function exportCustomerMainExcel(params) {
  return request({
    url: '/base/custom/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
