import request from '@/utils/request'
// 查询我的客户
export function listMyCustomer(query) {
  return request({
    url: '/system/CustBaseInfo/list',
    method: 'get',
    params: query
  })
}
export function getCustomerList(query) {
  return request({
    url: '/system/custBaseInfo/list',
    method: 'post',
    data: query
  })
}
// 查询地图信息
export function getCustAddressList(query) {
  return request({
    url: '/system/custBaseInfo/selectAddress',
    method: 'post',
    data: query
  })
}
// 查询业务指标
export function getPerIndcList(query) {
  return request({
    url: '/system/custBaseInfo/searchList',
    method: 'get',
    params: query
  })
}

// 添加走访
export function addAppointCustCamp(query) {
  return request({
    url: '/system/custBaseInfo/appointCustCamp',
    method: 'post',
    params: query
  })
}

//行政网格
export function getGegionList(query) {
  return request({
    url: '/my/customer/grid/select/region',
    method: 'get',
    params: query
  })
}
//自定义地图网格
export function getDrawList(query) {
  return request({
    url: '/my/customer/grid/select/draw',
    method: 'get',
    params: query
  })
}
//自建名单网格
export function getVirtualList(query) {
  return request({
    url: '/my/customer/grid/select/virtual',
    method: 'get',
    params: query
  })
}

// 查询我的客户绩效
export function gridCmpcCustBaseInfoList(query) {
  return request({
    url: '/grid/cmpm/custBaseInfo/list',
    method: 'post',
    data: query
  })
}

// 查询莲都特色客户标签
export function getTagSearch(query) {
  return request({
    url: '/csv/tag/search',
    method: 'get',
    params: query
  })
}

// 导入莲都特色客户标签
export function uploadTag(data) {
  return request({
    url: '/csv/tag/upload',
    method: 'post',
    data: data,
    isUpload: true
  })
}

export function importBusinessCustLevelAsync(data) {
  return request({
    url: '/system/custBaseInfo/importBusinessCustLevelAsync',
    method: 'post',
    data,
    isUpload: true
  })
}

export function getBusinessCustLevelImportStatus(taskId) {
  return request({
    url: `/system/custBaseInfo/importBusinessCustLevelStatus/${taskId}`,
    method: 'get'
  })
}
