import request from '@/utils/request'

// 查询跟进管理列表
export function listFollow(query) {
  return request({
    url: '/business/follow/list',
    method: 'get',
    params: query
  })
}

// 查询跟进管理详细
export function getFollow(followId) {
  return request({
    url: '/business/follow/' + followId,
    method: 'get'
  })
}

// 新增跟进记录
export function addFollow(data) {
  return request({
    url: '/business/follow',
    method: 'post',
    data: data
  })
}

// 修改跟进记录
export function updateFollow(data) {
  return request({
    url: '/business/follow',
    method: 'put',
    data: data
  })
}

// 删除跟进记录
export function deleteFollow(data) {
  return request({
    url: '/business/follow/delete',
    method: 'post',
    data:data
  })
}

// 导出跟进记录
export function exportFollow(query) {
  return request({
    url: '/business/follow/export',
    method: 'get',
    params: query
  })
}

// 查询业务相关跟进管理列表
export function selectFollowListByAccount(query) {
  return request({
    url: '/business/follow/listByAccount',
    method: 'get',
    params: query
  })
}

// 查询业务相关跟进管理列表
export function listByTypeAndBusinessId(query) {
  return request({
    url: '/business/follow/listByTypeAndBusinessId',
    method: 'get',
    params: query
  })
}

// 查询当前用户可见国家下拉
export function getCountryList() {
  return request({
    url: '/business/follow/countries',
    method: 'get'
  })
}
