import request from '@/utils/request'

// 查询经销商列表
export function clueInfoList(data) {
  return request({
    url: '/sfa/customerClue/clueInfoList',
    method: 'post',
    data: data
  })
}
export function noDeptClueInfoList(data) {
  return request({
    url: '/sfa/customerClue/noDeptClueInfoList',
    method: 'post',
    data: data
  })
}
export function getClueInfo(query) {
  return request({
    url: '/sfa/customerClue/getClueInfo',
    method: 'get',
    params: query
  })
}
export function getCustomerClueAnswerById(query) {
  return request({
    url: '/sfa/customerClue/getCustomerClueAnswerById',
    method: 'get',
    params: query
  })
}
export function updateDept(query) {
  return request({
    url: '/sfa/customerClue/updateDept',
    method: 'get',
    params: query
  })
}
// 查询经销商详细
export function getCustomerClue(chainId) {
  return request({
    url: '/sfa/customerClue/' + chainId,
    method: 'get'
  })
}

// 新增经销商
export function addCustomerClue(data) {
  return request({
    url: '/sfa/customerClue/add',
    method: 'post',
    data: data
  })
}

// 修改经销商
export function updateCustomerClue(data) {
  return request({
    url: '/sfa/customerClue/edit',
    method: 'POST',
    data: data
  })
}

// 删除经销商
export function delChains(chainId) {
  return request({
    url: '/sfa/chains/' + chainId,
    method: 'delete'
  })
}
