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

//  项目经理-确定中标人-查看候选中标人
export function getCandidateWinningBidder(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/bidCalibration/tBcalibration/getCandidateWinningBidder',
    method: 'post',
    data
  })
}
//  项目经理-确定中标人-查看中标人
export function getWinningBidder(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/bidCalibration/tBcalibration/getWinningBidder',
    method: 'post',
    data
  })
}
//  项目经理-确定中标人-获取重新确定中标人是否可以显示状态 00:不显示 01:显示
export function getResetWinningResultIsCanShowStatus(params) {
  return request({
    url: '/bidprocurement/bidding-calibration/bidCalibration/tBcalibration/getResetWinningResultIsCanShowStatus',
    method: 'post',
    params
  })
}

//  项目经理-确定中标人-存储中标人
export function saveWinningBidder(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/bidCalibration/tBcalibration/saveWinningBidder',
    method: 'post',
    data
  })
}
/* ========================信用管理API接口==========================*/
//  获取奖惩信息列表
export function getRewardPunishmentList(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/rewardPunishmentManagement/getRewardPunishmentList',
    method: 'post',
    data
  })
}
//  获取奖惩信息通过id
export function getRewardPunishmentListById(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/rewardPunishmentManagement/getRewardPunishmentListById?id=' + id,
    method: 'post'
  })
}
//  新增奖惩信息
export function addRewardPunishment(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/rewardPunishmentManagement/addRewardPunishment',
    method: 'post',
    data
  })
}
//  更新奖惩信息
export function updateRewardPunishment(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/rewardPunishmentManagement/updateRewardPunishment',
    method: 'post',
    data
  })
}
//  删除奖惩信息
export function removeRewardPunishment(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/rewardPunishmentManagement/removeRewardPunishment/' + id,
    method: 'post'
  })
}
/* ========================绩效管理API接口==========================*/
//  获取绩效信息列表
export function getAllPerformanceManagement(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/performanceManagement/getAllPerformanceManagement',
    method: 'post',
    data
  })
}
//  获取绩效信息列表通过id
export function getAllPerformanceManagementById(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/performanceManagement/getAllPerformanceManagementById?id=' + id,
    method: 'post'
  })
}
//  新增绩效信息
export function addPerformanceManagement(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/performanceManagement/addPerformanceManagement',
    method: 'post',
    data
  })
}
//  更新绩效信息
export function updatePerformanceManagement(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/performanceManagement/updatePerformanceManagement',
    method: 'post',
    data
  })
}
//  删除绩效信息
export function removePerformanceManagement(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/performanceManagement/removePerformanceManagement/' + id,
    method: 'post'
  })
}
/* ========================履约管理API接口==========================*/
//  获取履约信息列表
export function getAllBidderHonour(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/bidderHonour/getAllBidderHonour',
    method: 'post',
    data
  })
}
//  新增履约信息
export function addBidderHonour(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/bidderHonour/addBidderHonour',
    method: 'post',
    data
  })
}
//  新增履约信息通过id
export function getAllBidderHonourById(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/bidderHonour/getAllBidderHonourById?id=' + id,
    method: 'post'
  })
}
//  更新履约信息
export function updateBidderHonour(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/bidderHonour/updateBidderHonour',
    method: 'post',
    data
  })
}
//  删除履约信息
export function removeBidderHonour(id) {
  return request({
    url: '/bidprocurement/bidding-calibration/jcrz/bidderHonour/removeBidderHonour/' + id,
    method: 'post'
  })
}
/* ========================候选人公示==========================*/
//  项目经理-确定中标人-重新确定中标人
export function resetWinningResult(data) {
  return request({
    url: '/bidprocurement/bidding-calibration/bidCalibration/tBcalibration/resetWinningResult',
    method: 'post',
    data
  })
}
/* ========================候选人公示==========================*/
//  获取候选人公示未制作标段
export function listUnmarkedCandidateBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/listUnmarkedCandidateBulletinPackage',
    method: 'post',
    data
  })
}
//  获取已制作候选人公示列表信息
export function getCandidateBulletinMadeList(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getCandidateBulletinMadeList' + createURL(data),
    method: 'post'
  })
}
//  制作/修改候选人公示<点击按钮>
export function saveCandidateBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/saveCandidateBulletinPackage',
    method: 'post',
    data
  })
}
// 候选人公示 web端确认公告上传完成
export function webConfirmCandidateBulletinComplete(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/bidding-candidatebulletin/candidatebulletin/webConfirmCandidateBulletinComplete',
    method: 'post',
    data
  })
}

// 中标结果公示 web端确认公告上传完成
export function webConfirmResultBulletinComplete(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/bidding-resultbulletin/resultbulletin/webConfirmResultBulletinComplete',
    method: 'post',
    data
  })
}

//  根据id删除候选人的信息
export function removeCandidateBulletinAllById(id) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/removeCandidateBulletinAllById/' + id,
    method: 'post'
  })
}
//  根据id获取候选人公示表
export function getCandidateBulletinPDFById(id) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getCandidateBulletinPDFById/' + id,
    method: 'post'
  })
}
//  获取候选人发布公示列表信息
export function getPublishCandidateBulletinListPages(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getPublishCandidateBulletinListPages',
    method: 'post',
    data
  })
}

//  获取候选人公示列表信息
export function getCandidateBulletinMadeListPages(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getCandidateBulletinMadeListPages',
    method: 'post',
    data
  })
}

//  运维人员-候选人公示审核列表
export function listWaitAuditTenderCandidateBulletinPages(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/listWaitAuditTenderCandidateBulletinPages',
    method: 'post',
    data
  })
}
//  审核候选人公告
export function auditCandidateBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/auditBulletin' + createURL(data),
    method: 'post'
  })
}
// 推送公告到门户
export function uploadCandidateBulletinCms(candidateBulletinId) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/uploadCms?candidateBulletinId=' + candidateBulletinId,
    method: 'post'
  })
}
// 选择候选人公示模板
export function getCandidateBulletinContent(candidateBulletinId) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getCandidateBulletinContent?candidateBulletinId=' + candidateBulletinId,
    method: 'post'
  })
}
// 选择候选人公示模板
export function chooseCandidateBulletinTemplate(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/candidatebulletin/tenderCandidateBulletinTemplate/chooseCandidateBulletinTemplate',
    method: 'post',
    data
  })
}
// 保存候选人公示内容并生成pdf盖章
export function saveCandidateBulletinContent(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/saveCandidateBulletinContent',
    method: 'post',
    data
  })
}

// 保存候选人公示内容并生成pdf盖章
export function submitCandidateBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/submitCandidateBulletin',
    method: 'post',
    data
  })
}
// 获取候选人信息
export function getCandidateSupplierInfo(stageId) {
  return request({
    url: '/bidprocurement/bidding-candidatebulletin/bidding-candidatebulletin/candidatebulletin/getCandidateSupplierInfo?stageId=' + stageId,
    method: 'post'
  })
}
/* ========================结果公示==========================*/

// 获取结果公示未制作标段
export function listUnmarkedResultBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/listUnmarkedResultBulletinPackage',
    method: 'post',
    data
  })
}
//  获取结果公示已制作标段
export function getResultBulletinMadeList(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/getResultBulletinMadeList' + createURL(data),
    method: 'post'
  })
}
// 制作/修改结果公示<点击按钮>
export function saveResultBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/saveResultBulletinPackage',
    method: 'post',
    data
  })
}
// 根据id删除结果的信息
export function removeResultBulletinAllById(id) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/removeResultBulletinAllById/' + id,
    method: 'post'
  })
}

// 根据id查看结果公示信息
export function getResultBulletinPDFById(id) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/getResultBulletinPDFById/' + id,
    method: 'post'
  })
}
// 获取结果公示列表信息
export function getResultBulletinMadeListPages(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/getResultBulletinMadeListPages',
    method: 'post',
    data
  })
}

// 获取结果发布公示列表信息
export function getPublishResultBulletinListPages(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/getPublishResultBulletinListPages',
    method: 'post',
    data
  })
}

// 运维人员-获取审批结果公示列表
export function listWaitAuditTenderWinBidResultBulletinPages(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/listWaitAuditTenderWinBidResultBulletinPages',
    method: 'post',
    data
  })
}
// 审核结果公告
export function auditResultBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/auditBulletin' + createURL(data),
    method: 'post'
  })
}
// 推送公告到门户
export function uploadResultBulletinCms(winBidResultBulletinId) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/uploadCms?winBidResultBulletinId=' + winBidResultBulletinId,
    method: 'post'
  })
}
// 获取候选人公示内容
export function getResultBulletinContent(winBidResultBulletinId) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/getResultBulletinContent?winBidResultBulletinId=' + winBidResultBulletinId,
    method: 'post'
  })
}
// 择结果公示模板
export function chooseResultBulletinTemplate(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/resultbulletin/tenderWinBidResultBulletinTemplate/chooseResultBulletinTemplate',
    method: 'post',
    data
  })
}
// 保存结果公示内容并生成pdf盖章
export function saveResultBulletinContent(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/saveResultBulletinContent',
    method: 'post',
    data
  })
}
// 完成提交结果公示
export function submitResultBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-resultbulletin/bidding-resultbulletin/resultbulletin/submitResultBulletin',
    method: 'post',
    data
  })
}
/* ========================中标通知书==========================*/
// 查询中标通知书-投标人列表
export function queryResultNoticeList(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/queryResultNoticeList',
    method: 'post',
    data
  })
}

// 制作中标通知书
export function saveTenderNotice(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/saveTenderNotice',
    method: 'post',
    data
  })
}

// 获取中标通知书编辑页面数据
export function getEditResultNotice(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/getEditResultNotice',
    method: 'post',
    data
  })
}
// 获取结果通知书编辑页面数据
export function getResultNotice(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/getResultNotice',
    method: 'post',
    data
  })
}
// 获取通知书状态（用于发送按钮的显示）
export function getResultnoticeStatus(stageId) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/getResultnoticeStatus?stageId=' + stageId,
    method: 'post'
  })
}

// 保存通知书内容并生成pdf盖章
export function saveResultnoticeContent(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/saveResultnoticeContent',
    method: 'post',
    data
  })
}
// 获取待审核通知书列表(00：结果通知书 01：中标通知书)
export function getAuditResultNoticeList(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/getAuditResultNoticeList',
    method: 'post',
    data
  })
}
// 审核通知书
export function auditResultNotice(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/auditResultNotice',
    method: 'post',
    data
  })
}
// 选择中标通知书模板
export function chooseNoticeTemplate(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultnotice/tenderNoticeTemplate/chooseNoticeTemplate',
    method: 'post',
    data
  })
}
// 完成提交通知书
export function submitResultNotice(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/submitResultNotice',
    method: 'post',
    data
  })
}
// 定时查询中标通知书是否完成上传
export function queryBaseNoticeInfo(data) {
  return request({
    url: '/bidprocurement/bidding-resultnotice/resultNotice/queryBaseNoticeInfo',
    method: 'post',
    data
  })
}

// web端确认公告上传完成
export function webConfirmResultNoticeComplete(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/resultNotice/webConfirmResultNoticeComplete',
    method: 'post',
    data
  })
}
/* ========================确定资审结果API接口==========================*/
// 待确定资格预审结果
export function waitingDeterminePrequalificationResults(stageId) {
  return request({
    url: '/bidprocurement/bidding-qualresult/bidCalibration/tBqualresult/waitingDeterminePrequalificationResults?stageId=' + stageId,
    method: 'post'
  })
}
// 存储确定预审资格
export function saveDeterminePrequalificationResults(data, isOperation) {
  return request({
    url: '/bidprocurement/bidding-qualresult/bidCalibration/tBqualresult/saveDeterminePrequalificationResults?isOperation=' + isOperation,
    method: 'post',
    data
  })
}
// 查看确定资格预审结果
export function getDeterminePrequalificationResults(data) {
  return request({
    url: '/bidprocurement/bidding-qualresult/bidCalibration/tBqualresult/getDeterminePrequalificationResults',
    method: 'post',
    data
  })
}
/* ========================资审结果通知书API接口==========================*/
// 查询资审通知书-投标人列表
export function queryZsNoticePages(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/queryZsNoticePages',
    method: 'post',
    data
  })
}
// 获取通知书状态（用于发送按钮的显示）
export function getZsNoticeStatus(stageId) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/getZsNoticeStatus?stageId=' + stageId,
    method: 'post'
  })
}
// 保存通知书内容并生成pdf盖章
export function saveZsNoticeContent(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/saveZsNoticeContent',
    method: 'post',
    data
  })
}
// 完成提交资审通知书
export function submitResultZsNotice(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/submitResultZsNotice',
    method: 'post',
    data
  })
}
// 获取资审合格通知书数据
export function getEditZsNotice(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/getEditZsNotice',
    method: 'post',
    data
  })
}
// 获取资审结果通知书数据
export function getZsResultNotice(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/getZsResultNotice',
    method: 'post',
    data
  })
}
// 制作资审通知书数据
export function saveZsNotice(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/saveZsNotice',
    method: 'post',
    data
  })
}

// 获取待审核通知书列表(00：资审结果通知书 01：资审合格通知书)
export function getAuditZsNoticeList(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/getAuditZsNoticeList',
    method: 'post',
    data
  })
}
// 审核通知书
export function auditZsNotice(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/auditZsNotice',
    method: 'post',
    data
  })
}
// 选择资审通知书模板
export function choosezsnoticeTemplate(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/tenderZsNoticeTemplate/chooseNoticeTemplate',
    method: 'post',
    data
  })
}

// 根据物料id获取年度资格预审信息
export function getQualificationListByLogicsIds(data) {
  return request({
    url: '/bidprocurement/bidding-qualresult/bidCalibration/tBqualresult/getQualificationListByLogicsIds',
    method: 'post',
    data
  })
}

// 获取资审类型信息
export function queryQualificationCateoris() {
  return request({
    url: '/bidprocurement/bidding-qualresult/bidCalibration/tBqualresult/queryQualificationCateoris',
    method: 'post'
  })
}

// 定时查询资审通知书是否完成上传
export function queryBaseZsnoticeInfo(data) {
  return request({
    url: '/bidprocurement/bidding-zsnotice/zsnotice/queryBaseZsnoticeInfo',
    method: 'post',
    data
  })
}
