import request from '@/utils/request'

const baseUrl = import.meta.env.VITE_APP_BASE_API
// 查询客户名称列表
export function listCompany(query) {
  return request({
    url: baseUrl + '/business/company/list',
    method: 'get',
    params: query
  })
}

// 查询客户名称详细
export function getCompany(id) {
  return request({
    url: baseUrl + '/business/company/' + id,
    method: 'get'
  })
}

// 新增客户名称
export function addCompany(data) {
  return request({
    url: baseUrl + '/business/company',
    method: 'post',
    data: data
  })
}

// 修改客户名称
export function updateCompany(data) {
  return request({
    url: baseUrl + '/business/company',
    method: 'put',
    data: data
  })
}

// 删除客户名称
export function delCompany(id) {
  return request({
    url: baseUrl + '/business/company/' + id,
    method: 'delete'
  })
}
