import request from '@/assets/js/utils/request'

//  变更公告列表
export function changeBulletinList(data) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/changeBulletinList',
    method: 'post',
    data
  })
}

//  添加变更公告
export function addChangeBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/addChangeBulletin',
    method: 'post',
    data
  })
}
//  添加变更公告
export function getOpenToolsUrl(changeBulletinId) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/getOpenToolsUrl?changeBulletinId=' + changeBulletinId,
    method: 'post'
  })
}

// 获取可变更的标段信息
export function getChangeBulletinPackInfoByTenderId(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/biddingProject/getChangeBulletinPackInfoByTenderId',
    method: 'post',
    data
  })
}

// 查看变更公告
export function getChangeBulletinInfo(changeBulletinId) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/getChangeBulletinInfo?changeBulletinId=' + changeBulletinId,
    method: 'post'
  })
}
// 变更公告发布列表
export function releaseChangeBulletinList(data) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/releaseChangeBulletinList',
    method: 'post',
    data
  })
}
// 变更待审核列表
export function waitAuditChangeBulletinList(data) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletinAudit/waitAuditChangeBulletinList',
    method: 'post',
    data
  })
}

// 变更公告审核
export function auditChangeBulletin(data) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletinAudit/auditChangeBulletin',
    method: 'post',
    data
  })
}

// 根据阶段id集合查询时间规则信息
export function selectStageTimeRuleInfoByStageId(data) {
  return request({
    url: '/bidprocurement/bidding-bidBulletin/bulletin/tenderStageTimeRule/selectStageTimeRuleInfoByStageId',
    method: 'post',
    data
  })
}

// 删除变更公告(逻辑删除)
export function deleteChangeBulletin(changeBulletinId) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/deleteChangeBulletin?changeBulletinId=' + changeBulletinId,
    method: 'post'
  })
}

// 变更公告发布
export function releaseChangeBulletin(changeBulletinId) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/releaseChangeBulletin?changeBulletinId=' + changeBulletinId,
    method: 'post'
  })
}

// 变更公告生成pdf
export function changeBulletinContentHtmlToPDF(changeBulletinId) {
  return request({
    url: '/bidprocurement/bidding-changebulletin/changebulletin/tenderChangeBulletin/changeBulletinContentHtmlToPDF?changeBulletinId=' + changeBulletinId,
    method: 'post'
  })
}

/* ==============================重新招标=========================*/
