import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils'
/*
* 公告通用接口
* */
//  查询公告条数 (一条时返回公告id和公告状态)
export function queryTenderBulletinNumByTenderId(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/queryTenderBulletinNumByTenderId',
    method: 'post',
    data
  })
}
//  项目经理-公告已制作标段
export function listMarkedBulletinPackage(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinPack/listMarkedBulletinPackage?bulletinId=' + bulletinId,
    method: 'post'
  })
}

/*
* 招标公告列表
* */
//  项目经理-获取项目下招标公告列表
export function listTenderBulletinByTenderIdPages(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/listTenderBulletinByTenderIdPages',
    method: 'post',
    data
  })
}
//  项目经理-招标公告列表
export function listTenderBulletinPages(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/listTenderBulletinPages',
    method: 'post',
    data
  })
}
//  项目经理-招标公告发布列表
export function listTenderBulletinPublishPages(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/listTenderBulletinPublishPages',
    method: 'post',
    data
  })
}
//  项目经理-获取项目下招标公告列表
export function removeBulletinByBulletinId(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/removeBulletinByBulletinId?bulletinId=' + bulletinId,
    method: 'post'
  })
}
//  项目经理-获取打开招标管家的url
export function getOpenToolsUrl(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/getOpenToolsUrl?bulletinId=' + bulletinId,
    method: 'post'
  })
}
//  项目经理-制作公告
export function makeTenderingBulletin(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/makeTenderingBulletin?bulletinId=' + bulletinId,
    method: 'post'
  })
}
//  项目经理-招标公告-阶段时间规则
export function queryTenderBulletinStageTimeRuleInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageTimeRule/queryTenderStageTimeRuleInfo?bizId=' + bizId,
    method: 'post'
  })
}
/*
* 招标公告-招标条件
* */
// 项目经理-获取招标公告基本信息
export function queryBaseTenderBulletinInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/queryBaseTenderBulletinInfo',
    method: 'post',
    data
  })
}

// web端确认公告上传完成
export function webConfirmBulletinComplete(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/bulletin/tenderBulletin/webConfirmBulletinComplete',
    method: 'post',
    data
  })
}
// 项目经理-保存招标公告基本信息
export function saveBaseTenderBulletinInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/saveBaseTenderBulletinInfo',
    method: 'post',
    data
  })
}
// 保存公告内容
export function saveBulletinContent(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/saveBulletinContent',
    method: 'post',
    data
  })
}
// 完成提交公告
export function submitTenderBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/submitTenderBulletin',
    method: 'post',
    data
  })
}

// 推送公告到门户
export function uploadCms(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/uploadCms?bulletinId=' + bulletinId,
    method: 'post'
  })
}
/*
* 招标公告-项目概况与招标范围
* */

//  招标公告-获取本次招标标段字典信息
export function getBulletinPublishMethodInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/getBulletinPublishMethodInitInfo',
    method: 'post'
  })
}

// 项目经理-公告未制作标段
export function listUnmarkedBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinPack/listUnmarkedBulletinPackage',
    method: 'post',
    data
  })
}
// 项目经理-获取项目概况和招标范围内容
export function queryTenderBulletinExpandInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/queryTenderBulletinExpandInfo',
    method: 'post',
    data
  })
}

// 项目经理-保存项目概况和招标范围内容
export function saveTenderBulletinExpandInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/saveTenderBulletinExpandInfo',
    method: 'post',
    data
  })
}
/*
* 招标公告-招标文件的获取
* */

// 项目经理-招标文件获取-获取标书费相关字典信息
export function getTenderDocumentInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderDocumentPrice/getTenderDocumentInitInfo',
    method: 'post'
  })
}

// 项目经理-招标文件获取-获取标书费相关信息
export function queryTenderDocumentPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderDocumentPrice/queryTenderDocumentPriceInfo',
    method: 'post',
    data
  })
}
// 项目经理-招标文件获取-获取标书费相关信息
export function saveTenderDocumentPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderDocumentPrice/saveTenderDocumentPriceInfo',
    method: 'post',
    data
  })
}
/*
* 招标公告-资格要求
* */
// 项目经理-获取投标人资格要求标段列表
export function listQualificationPackage(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/listQualificationPackage?bulletinId=' + bulletinId,
    method: 'post'
  })
}
// 项目经理-资格要求获取字典信息
export function getTenderQualificationInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/getTenderQualificationInitInfo',
    method: 'post'
  })
}
// 项目经理-获取投标人资格要求信息列表
export function listBidderQualification(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/listBidderQualification',
    method: 'post',
    data
  })
}
// 项目经理-保存投标人资格要求信息
export function saveBidderQualificationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/saveBidderQualificationInfo',
    method: 'post',
    data
  })
}
// 项目经理-单条保存投标人资格要求信息
export function saveSingleBidderQualificationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/saveSingleBidderQualificationInfo',
    method: 'post',
    data
  })
}
// 项目经理-删除投标人资格要求信息
export function removeBidderQualificationByQualificationId(id) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/removeBidderQualificationByQualificationId?id=' + id,
    method: 'post'
  })
}
// 项目经理-复制投标人资格要求信息
export function copyBidderQualification(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualification/copyBidderQualification',
    method: 'post',
    data
  })
}
// 项目经理-获取投标人资格要求模板列表
export function listQuoteBidderQualificationTemplate(typeId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderQualificationTemplater/listQuoteBidderQualificationTemplate?typeId=' + typeId,
    method: 'post'
  })
}
/*
* 招标公告-投标文件的递交
* */
// 项目经理-获取投标文件递交字典初始化信息
export function getBidDocumentSubmitChannelInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/getBidDocumentSubmitChannelInitInfo',
    method: 'post'
  })
}
// 项目经理-获取投标文件递交信息
export function queryBidFileSubmitInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/queryBidFileSubmitInfo?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-获取投标文件递交信息
export function saveBidFileSubmitInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/saveBidFileSubmitInfo',
    method: 'post',
    data
  })
}
/*
* 招标公告-开标时间及地点
* */
// 项目经理-获取投标文件递交信息
export function getBulletinOpenInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/getBulletinOpenInitInfo',
    method: 'post'
  })
}
// 项目经理-查询投标文件递交途径
export function queryBidDocumentSubmitChannel(bizId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/queryBidDocumentSubmitChannel?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-获取开标时间地点数据
export function queryBulletinOpenInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/queryBulletinOpenInfo?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-保存开标时间地点数据
export function saveBulletinOpenInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageBizRule/saveBulletinOpenInfo',
    method: 'post',
    data
  })
}
/*
* 招标公告-其他
* */
// 项目经理-获取保证金字典初始化信息
export function getTenderBailPriceInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBailPrice/getTenderBailPriceInitInfo',
    method: 'post'
  })
}
// 项目经理-获取保证金相关信息
export function queryTenderBailPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBailPrice/queryTenderBailPriceInfo',
    method: 'post',
    data
  })
}
// 项目经理-保存保证金相关信息
export function saveTenderBailPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBailPrice/saveTenderBailPriceInfo',
    method: 'post',
    data
  })
}
/*
* 招标公告-监督部门
* */
// 项目经理-获取公告监督部门
export function queryBulletinMonitorDepName(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/queryBulletinMonitorDepName?bulletinId=' + bulletinId,
    method: 'post'
  })
}
// 项目经理-保存公告监督部门
export function saveBullecinMonitorDepName(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/saveBullecinMonitorDepName',
    method: 'post',
    data
  })
}
/*
* 招标公告-联系方式
* */
// 项目经理-获取联系方式
export function queryBulletinContactInformation(bulletinId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/queryBulletinContactInformation?bulletinId=' + bulletinId,
    method: 'post'
  })
}
// 项目经理-保存联系方式
export function saveBulletinContactInformation(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinExpand/saveBulletinContactInformation',
    method: 'post',
    data
  })
}
// 运维人员-获取审批公告列表
export function listWaitAuditTenderBulletinPages(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinAudit/listWaitAuditTenderBulletinPages',
    method: 'post',
    data
  })
}
// 运维人员-审批公告
export function auditBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletinAudit/auditBulletin' + createURL(data),
    method: 'post'
  })
}
// 公告项目详情
export function queryTenderBulletinData(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/queryTenderBulletinData',
    data: data,
    method: 'post'
  })
}

// 项目经理-获取某月开标列表
export function getCertainMonthOpeningList(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageTimeRule/getCertainMonthOpeningList',
    method: 'post',
    data
  })
}

// 运维人员-获取规则信息列表
export function listTenderStageRulePages(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageRuleExpand/listTenderStageRulePages',
    method: 'post',
    data
  })
}
// 根据阶段id获取阶段业务规则和时间规则及规则扩展信息
export function getTenderStageBizRuleAndTimeRuleByStageId(stageId) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageRuleExpand/getTenderStageBizRuleAndTimeRuleByStageId?stageId=' + stageId,
    method: 'post'
  })
}

// 运维人员-修改阶段规则基本信息
export function updateTenderStageRuleInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageRuleExpand/updateTenderStageRuleInfo',
    method: 'post',
    data
  })
}

// 投标人-获取可参与公告列表信息
export function getIndexSupplierAttendBulletinList(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/getIndexSupplierAttendBulletinList',
    method: 'post',
    data
  })
}

/* 简易版招标公告接口 */
// 项目经理-获取招标公告基本信息(简版)
export function queryBaseTenderBulletinSimpleInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/queryBaseTenderBulletinSimpleInfo',
    method: 'post',
    data
  })
}
// 获取招标公告所有初始化字典信息
export function getBulletinAllDictionariesInitInfo() {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/getBulletinAllDictionariesInitInfo',
    method: 'post'
  })
}
// 项目经理-保存招标公告基本信息
export function saveBaseTenderBulletinSimpleInfo(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderBulletin/saveBaseTenderBulletinSimpleInfo',
    method: 'post',
    data
  })
}
