import request from '@/utils/request';

//获取地区树
export function areaAll() {
  return request({
    url: '/area/all',
    method: 'get',
  });
}
//供应商总台账
export function customerAll(param) {
  return request({
    url: '/customer/all/searchList',
    data:param,
    method: 'POSt',
  });
}
//总台账导出
export function customerExport(param) {
  return request({
    url: '/customer/export',
    method: 'post',
    data:param,
    responseType: 'blob',
    timeout: 60000
  });
}
//专业类别选项列表
export function bizDictData() {
  return request({
    url: '/bizDictData/tree?type=0',
    method: 'get',
  });
}
//供应商管理分类列表
export function custmerInfolist(param) {
  return request({
    url: '/customerInfo/list',
    method: 'POST',
    data: param
  });
}

//供应商准入信息
export function custmerInfo(param) {
  return request({
    url: '/customer/info/'+param,
    method: 'get',
  });
}

//涉诉限用禁用名单名单
export function getSupplierLimitedList(param) {
  return request({
    url: '/fSupplierLimited/getSupplierLimitedList',
    params: param,
    method: 'get',
  });
}
//解除限用禁用名单名单
export function getSupplierUnlimitedList(param) {
  return request({
    url: '/fSupplierLimited/getSupplierUnlimitedList',
    params: param,
    method: 'get',
  });
}

// 添加挂靠风险记录
export function addRiskRecord(data) {
  return request({
    url: '/laborLeaderCustomerRisk/addRiskRecord',
    method: 'post',
    data: data
  })
}
// 查询挂靠风险列表
export function queryRiskList(param) {
  return request({
    url: '/laborLeaderCustomerRisk/queryRiskList',
    method: 'Get',
    params: param
  })
}
// 添加劳务队队长
export function addLaborLeader(data) {
  return request({
    url: '/customerInfo/addLaborLeader',
    method: 'post',
    data: data
  })
}
// 模糊查企业联想
export function companyList(data) {
  return request({
    url: '/enterprise/index',
    method: 'post',
    data: data
  })
}
// 校验劳务队长身份证号是否存在
export function getLborLeaderId(id) {
  return request({
    url: `/customerInfo/checkLaborLeaderIdExist/${id}`,
    method: 'get',
  })
}

// 导出供应商分类列表
export function exportCustomerList(data) {
  return request({
    url: '/customerInfo/exportCustomerList',
    method: 'post',
    data:data,
    responseType: 'blob',
    timeout: 60000
  })
}

