import request from '@/utils/request'

// 查询车辆录入列表
export function listVehicle(query) {
  return request({
    url: '/customerBusiness/vehicle/list',
    method: 'get',
    params: query,
    headers: {
      'enterprise-code': 'liu_45'
    }
  })
}

// 查询车辆录入详细
export function getVehicle(id) {
  return request({
    url: '/customerBusiness/vehicle/' + id,
    method: 'get',
    headers: {
      'enterprise-code': 'liu_45'
    }
  })
}

// 新增车辆录入
export function addVehicle(data) {
  return request({
    url: '/customerBusiness/vehicle',
    method: 'post',
    data: data,
    headers: {
      'enterprise-code': 'liu_45'
    }
  })
}

// 修改车辆录入
export function updateVehicle(data) {
  return request({
    url: '/customerBusiness/vehicle/'+data.id,
    method: 'put',
    data: data,
    headers: {
      'enterprise-code': 'liu_45'
    }
  })
}

// 删除车辆录入
export function delVehicle(id) {
  return request({
    url: '/customerBusiness/vehicle/' + id,
    method: 'delete',
    headers: {
      'enterprise-code': 'liu_45'
    }
  })
}

//查询车辆运营平台数据
export function getCar(id) {
  return request({
    url: '/netWorking/car/'+id,
    method: 'get',
  })
}

//修改车辆运营平台
export function updateCar(data) {
  return request({
    url: '/netWorking/car/'+data.id,
    method: 'put',
    data: data,
  })
}

//完善企业信息
export function updateEnterprise(data) {
  return request({
    url: '/netWorking/car/updateEnterprise/'+data.id,
    method: 'post',
    data: data,
  })
}
