import request from '@/utils/request'

// 获取销售列表
export function getSaleList(query) {
  return request({
    url: '/sale/saleClueInfoController/selectSaleClueInfoList',
    method: 'get',
    params: query
  })
}

// 销售线索上传
export function importSaleExcelOrCsv(query) {
  return request({
    url: '/sale/saleClueInfoController/importSaleExcelOrCsv',
    method: 'post',
    data: query
  })
}


// 分配销售列表
export function getSaleAllocationList(query) {
  return request({
    url: '/sale/saleClueInfoController/selectSaleClueInfoBySellers',
    method: 'get',
    params: query
  })
}

// 销售分配
export function saleClueDistribution(query) {
  return request({
    url: '/sale/saleClueInfoController/saleClueDistribution',
    method: 'post',
    params: query
  })
}

// 行业列表
export function getIndustryInfoList(query) {
  return request({
    url: '/system/industry/getIndustryInfoList',
    method: 'get',
    params: query
  })
}

// 销售列表
export function getUserByRoleName(query) {
  return request({
    url: '/system/user/getUserByRoleName',
    method: 'get',
    params: query
  })
}



// 销售线索-查询用户代办以及本周完成数量汇总
export function getTaskNumber(query) {
  return request({
    url: '/sale/saleClueInfoController/getTaskNumber',
    method: 'get',
    params: query
  })
}

// 销售线索任务列表查询
export function getSaleClueTaskList(query) {
  return request({
    url: '/sale/saleClueInfoController/selectSaleClueTaskList',
    method: 'get',
    params: query
  })
}


// 销售线索任务-回显线索详情
export function getSaleTaskInfoBySellerId(query) {
  return request({
    url: '/sale/saleClueInfoController/getSaleTaskInfoBySellerId',
    method: 'get',
    params: query
  })
}



// 销售线索任务-新增跟进
export function addInsertSaleTaskRecord(query) {
  return request({
    url: '/sale/saleClueInfoController/insertSaleTaskRecord',
    method: 'post',
    params: query
  })
}


// 转电销面销
export function saleClueToOffline(query) {
  return request({
    url: '/sale/saleClueInfoController/saleClueToOffline',
    method: 'post',
    params: query
  })
}


// 获取用户信息
export function getUserRoleByUserId(query) {
  return request({
    url: '/system/user/getUserRoleByUserId',
    method: 'get',
    params: query
  })
}

// 导入外呼
export function importRobotTelephone(query) {
  return request({
    url: '/sale/saleClueInfoController/importRobotTelephone',
    method: 'post',
    params: query
  })
}


// 导入外呼记录
export function getRobotTelephoneRecordList(query) {
  return request({
    url: '/sale/saleClueInfoController/getRobotTelephoneRecordList',
    method: 'get',
    params: query
  })
}


// 通话记录查询
export function getRobotTelephoneResultList(query) {
  return request({
    url: '/sale/saleClueInfoController/getRobotTelephoneResultList',
    method: 'get',
    params: query
  })
}