import request from '@/utils/request'

// 创建车辆信息
export function createCarMain(data) {
  return request({
    url: '/base/carMain/create',
    method: 'post',
    data: data
  })
}

// 更新车辆信息
export function updateCarMain(data) {
  return request({
    url: '/base/carMain/update',
    method: 'put',
    data: data
  })
}

//车辆打标签
export function setLabelList(data) {
  return request({
    url: '/base/carMain/setLabel',
    method: 'post',
    data: data
  })
}

// 删除车辆信息
export function deleteCarMain(id) {
  return request({
    url: '/base/carMain/delete?id=' + id,
    method: 'delete'
  })
}

// 获得车辆信息
export function getCarMain(id) {
  return request({
    url: '/base/carMain/get?id=' + id,
    method: 'get'
  })
}

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

// 获得车辆信息分页
export function getCarMainPage(params) {
  return request({
    url: '/base/carMain/page',
    method: 'get',
    params
  })
}

// 获得车辆信息分页
export function remindCarMainPage(params) {
  return request({
    url: '/base/carMain/remindCarMainPage',
    method: 'get',
    params
  })
}

// 获得车辆信息分页
export function compute(data) {
  return request({
    url: '/base/carMain/compute',
    method: 'post',
    data: data
  })
}
// 导出车辆信息 Excel
export function exportCarMainExcel(params) {
  return request({
    url: '/base/carMain/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}


