import request from '@/utils/request'

// 查询企业列表
export function listCompany(query) {
  return request({
    url: '/company/company/list',
    method: 'get',
    params: query
  })
}

export function allList(query) {
  return request({
    url: '/company/company/allList',
    method: 'get',
    params: query
  })
}
// 查询企业详细
export function getCompany(companyId) {
  return request({
    url: '/company/company/' + companyId,
    method: 'get'
  })
}

// 新增企业
export function addCompany(data) {
  return request({
    url: '/company/company',
    method: 'post',
    data: data
  })
}
export function resetPwd(companyId) {
  return request({
    url: '/company/company/resetPwd/'+companyId,
    method: 'post'
  })
}



// 修改企业
export function updateCompany(data) {
  return request({
    url: '/company/company',
    method: 'put',
    data: data
  })
}

// 删除企业
export function delCompany(companyId) {
  return request({
    url: '/company/company/' + companyId,
    method: 'delete'
  })
}

// 导出企业
export function exportCompany(query) {
  return request({
    url: '/company/company/export',
    method: 'get',
    params: query
  })
}

export function getCompanyList() {
  return request({
    url: '/company/company/getCompanyList',
    method: 'get'
  })
}
export function recharge(data) {
  return request({
    url: '/company/company/recharge',
    method: 'post',
    data: data
  })
}
export function deduct(data) {
  return request({
    url: '/company/company/deduct',
    method: 'post',
    data: data
  })
}



// 查询企业列表
export function crmDayCountlist(query) {
  return request({
    url: '/company/company/crmDayCountlist',
    method: 'get',
    params: query
  })
}

//查询区域
export function getCitysArea(query) {
  return request({
    url: '/his/city/getCitysArea',
    method: 'get',
    params: query
  })
}

// 批量修改公司显示状态
export function batchUpdateCompanyLiveShow(data) {
  return request({
    url: '/company/company/batchUpdateLiveShow',
    method: 'post',
    data: data
  })
}

// 查询企业列表
export function liveShowList(query) {
  return request({
    url: '/company/company/liveShowList',
    method: 'get',
    params: query
  })
}

