import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils'

// 项目经理根据申请id抽取结果详情
export function getExtractExpertResultDetailById(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertResultDetailById' +
        '?applyId=' +
        data.applyId,
    method: 'post',
    data
  })
}

// 管理员查询抽取申请详情页面专家列表下一页
export function adminGetExtractApplyResultDetailInfoExpertNextPage(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminGetExtractApplyResultDetailInfoExpertNextPage',
    method: 'post',
    data
  })
}
// 修改应答状态
export function editAttendStatus(resultId, isAttend) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/editAttendStatus?resultId=' +
        resultId +
        '&isAttend=' +
        isAttend,
    method: 'post'
  })
}
// 专家请假
export function editLeaveStatus(id) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/editLeaveStatus?resultId=' +
        id,
    method: 'post'
  })
}
// 抽取结果 评标专家请假
export function expertLeave(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/expertLeave' + createURL(data),
    method: 'get'
  })
}
// 招标方代表请假
export function biddingLeave(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/biddingLeave' + createURL(data),
    method: 'get'
  })
}
// 管理员导出抽取专家基本信息
export function adminExportExtractExpertBaseInfo(data) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminExportExtractExpertBaseInfo',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

// 管理员删除抽取申请相关信息
export function adminDeleteTBExpertExtractApplyInfobyid(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminDeleteTBExpertExtractApplyInfobyid',
    method: 'post',
    data
  })
}

// 管理员撤回抽取申请信息
export function withdrawTBExpertExtractApplyInfobyid(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertManageController/withdrawTBExpertExtractApplyInfobyid',
    method: 'post',
    data
  })
}

// 删除指定专家
export function deleteExpertByResultId(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/deleteExpertByResultId?id=' + data,
    method: 'post'
  })
}
// 根据项目id查询项目详情信息
export function queryProjectDetailById(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/tender/expertTenderProject/queryProjectDetailById?tenderId=' +
      data,
    method: 'post'
  })
}

// 手动保存或者更新项目相关信息
export function saveOrUpdateProject(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/tender/expertTenderProject/saveOrUpdateProject',
    method: 'post',
    data
  })
}

// 根据项目id删除项目详情信息
export function deleteProjectDetailById(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/tender/expertTenderProject/deleteTBExpertTenderInfobyid',
    method: 'post',
    data
  })
}

// 项目经理登录查询项目信息列表
export function queryAllTenderInfoByTenderManager(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/tender/expertTenderProject/queryAllTenderInfoByTenderManager',
    method: 'post',
    data
  })
}
// 获取已经存在的专家单位
export function getAlreadyExistExpertComName(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/info/exptExpertInfoController/getAlreadyExistExpertComName',
    method: 'post',
    data
  })
}

// 专家评标专业树
export function expertPurcatalogCategorySpecial(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/common/expertPurcatalogCategorySpecial/queryExpertSepcialLisByUserId?parentId=' +
      data,
    method: 'post'
  })
}
// 查询整个专业树结构(搜索专业用)
export function queryExpertSepcialTree(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/common/expertPurcatalogCategorySpecial/queryExpertSepcialTree',
    method: 'post',
    data
  })
}

// 申请人申请列表数据
export function getExtractExpertApplyListByCreateUser(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertApplyListByCreateUser',
    method: 'post',
    data
  })
}

// 添加指定专家
export function saveExpertByApplyId(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/saveExpertByApplyId',
    method: 'post',
    data
  })
}

// 选择专家列表
export function getExpertList(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExpertList',
    method: 'post',
    data
  })
}
// 根据申请id获取申请详情
export function getExtractExpertDetailById(id) {
  return request({
    url:
        '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractExpertDetailById' +
        '?id=' +
        id,
    method: 'post'
  })
}

// 获取抽取编号
export function getExtractApplyCode(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getExtractApplyCode',
    method: 'post',
    data
  })
}

// 管理员审核抽取申请信息
export function adminAuditExtractApply(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/adminAuditExtractApply',
    method: 'post',
    data
  })
}

// 保存专家请假信息
export function saveExpertLeave(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertLeave/saveExpertLeave',
    method: 'post',
    data
  })
}

// 管理员审核专家入库列表
export function getAuditExpertList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertManageController/getAuditExpertList',
    method: 'post',
    data
  })
}
// 管理员专家信息列表
export function getALLExpertListByManager(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/expertManageController/getALLExpertListByManager',
    method: 'post',
    data
  })
}
// 管理员审核退出申请信息
export function auditQuitApplyExpertInfo(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-expert/expertManage/tbexpertquitapply/auditQuitApplyExpertInfo',
    method: 'post',
    data
  })
}

// 抽取申请审核列表
export function getAuditExtractExpertApplyList(data) {
  return request({
    url:
      '/bidprocurement/expertscloud-extract/extract/expertExtractApply/getAuditExtractExpertApplyList',
    method: 'post',
    data
  })
}
// 查看抽取结果,专家补录,招标方补录
export function expertSupplement(data) {
  return request({
    url: '/bidprocurement/expertscloud-extract//extract/expertExtractApply/expertSupplement',
    method: 'post',
    data
  })
}

// 抽取申请审核列表
export function queryAllRepresentList(data) {
  return request({
    url:
      '/bidprocurement/common-user/user/tenderRepresentClient/queryAllRepresentList',
    method: 'post',
    data
  })
}

// 查询专家某个任职经历信息
export function queryTBExpertCareerById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertCareerController/queryTBExpertCareerById',
    method: 'post',
    data
  })
}
// 查询专家任职经历
export function getExpertCareerById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertCareerController/getExpertCareerById',
    method: 'post',
    data
  })
}
// 查询专家某个职称信息
export function queryTBExpertAvoidCompanyInfoById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertTitlesController/queryTBExpertAvoidCompanyInfoById',
    method: 'post',
    data
  })
}
// 查询专家职称信息
export function getExpertTitlesById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertTitlesController/getExpertTitlesById',
    method: 'post',
    data
  })
}
// 查询评标专业信息
export function getExpertEvaluationSpecialById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertEvaluationSpecialController/getExpertEvaluationSpecialById',
    method: 'post',
    data
  })
}
// 查询专家教育经历信息
export function getExpertEducationById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertEducationController/getExpertEducationById',
    method: 'post',
    data
  })
}
// 查询某個专家教育经历信息
export function queryTBExpertEducationInfoById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/expertEducationHistory/queryTBExpertEducationInfoById',
    method: 'post',
    data
  })
}
// 查询职业资格信息
export function getExpertCertificationById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertCertificationController/getExpertCertificationById',
    method: 'post',
    data
  })
}
// 查询某个职业资格
export function queryTBExpertCertificationById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertCertificationController/queryTBExpertCertificationById',
    method: 'post',
    data
  })
}
// 查询历史评标记录
export function getExpertEvaluationHistoryById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertSaveEvaluationHistoryControllrt/getExpertEvaluationHistoryById',
    method: 'post',
    data
  })
}
// 查询某个历史评标记录
export function queryTBExpertEvaluationHistoryById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertSaveEvaluationHistoryControllrt/queryTBExpertEvaluationHistoryById',
    method: 'post',
    data
  })
}
// 查询回避单位
export function queryAllTBExpertAvoidCompanyInfo(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertAvoidCompanyController/queryAllTBExpertAvoidCompanyInfo',
    method: 'post',
    data
  })
}
// 查询研究成果
export function getExpertAchievementById(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/info/exptExpertAchievementController/getExpertAchievementById',
    method: 'post',
    data
  })
}
// 管理员审核专家入库
export function auditExpertApply(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/expertManage/expertManageController/auditExpertApply',
    method: 'post',
    data
  })
}
// 管理员审核信息变更
export function auditExpertInfoChange(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/expertManage/expertManageController/auditExpertInfoChange',
    method: 'post',
    data
  })
}
// 管理员审核信息变更审核列表
export function getAuditExpertInfoChangeList(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/expertManage/expertManageController/getAuditExpertInfoChangeList',
    method: 'post',
    data
  })
}
// 管理员登录查询所有专家退出申请记录信息
export function AdminQueryAllExpertQuitInfo(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/expertManage/tbexpertquitapply/AdminQueryAllExpertQuitInfo',
    method: 'post',
    data
  })
}
// 专家请假列表
export function getExpertLeaveList(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/expertManage/expertLeave/getExpertLeaveList',
    method: 'post',
    data
  })
}
// 专家下载模板
export function downloadTemplate(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/register/ExpertBatchImportController/downloadTemplate',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 专家批量导入
export function importBatchExperts(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/register/ExpertBatchImportController/importBatchExperts',
    method: 'post',
    data
  })
}
// 获取当前专家审核记录列表list
export function getAllAuditOpinionsByExpertId(data) {
  return request({
    url: '/bidprocurement/expertscloud-expert/common/expertAuditOpinion/getAllAuditOpinionsByExpertId',
    method: 'post',
    data
  })
}
