import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils'
/*
* 邀请函通用接口
* */
//  查询邀请函条数 (一条时返回邀请函id和邀请状态)
export function queryTenderInvitationNumByTenderId(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryTenderInvitationNumByTenderId',
    method: 'post',
    data
  })
}

//  项目经理-邀请函已制作标段
export function listMarkedInvitationPackage(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationPack/listMarkedInvitationPackage?invitationId=' + invitationId,
    method: 'post'
  })
}
//  项目经理--邀请名单--邀请已制作标段
export function listInvitationSupplierRoster(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationPack/listInvitationSupplierRoster?invitationId=' + invitationId,
    method: 'post'
  })
}

// 项目经理-邀请函未制作标段
export function listUnmarkedInvitationPackage(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationPack/listUnmarkedInvitationPackage',
    method: 'post',
    data
  })
}

//  项目经理-获取项目下邀请函列表
export function listTenderInvitationByTenderIdPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listTenderInvitationByTenderIdPages',
    method: 'post',
    data
  })
}
//  项目经理-删除项目下邀请函列表
export function removeInvitationIByInvitationId(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/removeInvitationIByInvitationId?invitationId=' + invitationId,
    method: 'post'
  })
}
// 项目经理-邀请函列表
export function listTenderInvitationPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listTenderInvitationPages',
    method: 'post',
    data
  })
}

//  项目经理-邀请函待发布列表
export function listTenderInvitationPublishPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listTenderInvitationPublishPages',
    method: 'post',
    data
  })
}

//  项目经理-制作邀请函
export function makeTenderingInvitation(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/makeTenderingInvitation?invitationId=' + invitationId,
    method: 'post'
  })
}
//  项目经理-邀请函-阶段时间规则
export function queryTenderInvitationStageTimeRuleInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryTenderStageTimeRuleInfo?bizId=' + bizId,
    method: 'post'
  })
}
/*
* 邀请函-招标条件
* */
// 项目经理-获取邀请函基本信息
export function queryBaseTenderInvitationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryBaseTenderInvitationInfo',
    method: 'post',
    data
  })
}

// web端确认公告上传完成
export function webConfirmInvitationComplete(data) {
  return request({
    url: '/bidprocurement/bidding-biddingProject/invitation/tenderInvitation/webConfirmInvitationComplete',
    method: 'post',
    data
  })
}
// 项目经理-保存邀请函基本信息
export function saveBaseTenderInvitationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveBaseTenderInvitationInfo',
    method: 'post',
    data
  })
}
// 保存邀请函内容
export function saveInvitationContent(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveInvitationContent',
    method: 'post',
    data
  })
}
// 完成提交邀请函
export function submitTenderInvitation(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/submitTenderInvitation',
    method: 'post',
    data
  })
}

// 推送邀请函到门户
export function uploadCms(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/uploadCms?invitationId=' + invitationId,
    method: 'post'
  })
}
// 邀请函明细
export function getTenderInvitationDetailed(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getTenderInvitationDetailed?invitationId=' + invitationId,
    method: 'post'
  })
}
/*
* 邀请函-项目概况与招标范围
* */

//  邀请函-获取本次招标标段字典信息
export function getInvitationPublishMethodInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/getInvitationPublishMethodInitInfo',
    method: 'post'
  })
}

// 项目经理-邀请函未制作标段
export function listUnmarkedBulletinPackage(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderBulletinPack/listUnmarkedBulletinPackage',
    method: 'post',
    data
  })
}
// 项目经理-获取项目概况和招标范围内容
export function queryTenderInvitationExpandInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/queryTenderInvitationExpandInfo',
    method: 'post',
    data
  })
}

// 项目经理-保存项目概况和招标范围内容
export function saveTenderInvitationExpandInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/saveTenderInvitationExpandInfo',
    method: 'post',
    data
  })
}
/*
* 邀请函-招标文件的获取
* */

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

// 项目经理-获取标书费相关信息
export function queryTenderDocumentPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryTenderDocumentPriceInfo',
    method: 'post',
    data
  })
}
// 项目经理-招标文件获取-获取标书费相关信息
export function saveTenderDocumentPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveTenderDocumentPriceInfo',
    method: 'post',
    data
  })
}
/*
* 邀请函-资格要求
* */
// 项目经理-获取投标人资格要求标段列表
export function listQualificationPackage(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listQualificationPackage?invitationId=' + invitationId,
    method: 'post'
  })
}
// 项目经理-资格要求获取字典信息
export function getTenderQualificationInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getTenderQualificationInitInfo',
    method: 'post'
  })
}
// 项目经理-获取投标人资格要求信息列表
export function listBidderQualification(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listBidderQualification',
    method: 'post',
    data
  })
}
// 项目经理-保存投标人资格要求信息
export function saveBidderQualificationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveBidderQualificationInfo',
    method: 'post',
    data
  })
}
// 项目经理-单条保存投标人资格要求信息
export function saveSingleBidderQualificationInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveSingleBidderQualificationInfo',
    method: 'post',
    data
  })
}
// 项目经理-删除投标人资格要求信息
export function removeBidderQualificationByQualificationId(id) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/removeBidderQualificationByQualificationId?id=' + id,
    method: 'post'
  })
}
// 项目经理-获取投标人资格要求模板列表
export function listQuoteBidderQualificationTemplate() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listQuoteBidderQualificationTemplate',
    method: 'post'
  })
}
/*
* 邀请函-投标文件的递交
* */
// 项目经理-获取投标文件递交字典初始化信息
export function getBidDocumentSubmitChannelInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getBidDocumentSubmitChannelInitInfo',
    method: 'post'
  })
}
// 项目经理-获取投标文件递交信息
export function queryBidFileSubmitInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryBidFileSubmitInfo?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-获取投标文件递交信息
export function saveBidFileSubmitInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveBidFileSubmitInfo',
    method: 'post',
    data
  })
}
/*
* 邀请函-开标时间及地点
* */
// 项目经理-获取投标文件递交信息
export function getInvitationOpenInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getInvitationOpenInitInfo',
    method: 'post'
  })
}
// 项目经理-查询投标文件递交途径
export function queryBidDocumentSubmitChannel(bizId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryBidDocumentSubmitChannel?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-获取开标时间地点数据
export function queryBulletinOpenInfo(bizId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryBulletinOpenInfo?bizId=' + bizId,
    method: 'post'
  })
}
// 项目经理-保存开标时间地点数据
export function saveInvitationOpenInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveInvitationOpenInfo',
    method: 'post',
    data
  })
}
/*
* 邀请函-其他
* */
// 项目经理-获取保证金字典初始化信息
export function getTenderBailPriceInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getTenderBailPriceInitInfo',
    method: 'post'
  })
}
// 项目经理-获取保证金相关信息
export function queryTenderBailPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryTenderBailPriceInfo',
    method: 'post',
    data
  })
}
// 项目经理-保存保证金相关信息
export function saveTenderBailPriceInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveTenderBailPriceInfo',
    method: 'post',
    data
  })
}
/*
* 邀请函-监督部门
* */
// 项目经理-获取公告监督部门
export function queryInvitationMonitorDepName(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/queryInvitationMonitorDepName?invitationId=' + invitationId,
    method: 'post'
  })
}
// 项目经理-保存公告监督部门
export function saveInvitationMonitorDepName(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/saveInvitationMonitorDepName',
    method: 'post',
    data
  })
}
/*
* 邀请函-联系方式
* */
// 项目经理-获取联系方式
export function queryInvitationContactInformation(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/queryInvitationContactInformation?invitationId=' + invitationId,
    method: 'post'
  })
}
// 项目经理-保存联系方式
export function saveBulletinContactInformation(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationExpand/saveBulletinContactInformation',
    method: 'post',
    data
  })
}

// 运维人员-获取邀请函审批列表
export function listWaitAuditTenderInvitationPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationAudit/listWaitAuditTenderInvitationPages',
    method: 'post',
    data
  })
}
// 运维人员-审批公告
export function auditInvitation(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationAudit/auditInvitation' + createURL(data),
    method: 'post'
  })
}
//  项目经理-邀请函-获取打开招标管家的url
export function getOpenToolsUrl(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation//invitation/tenderInvitation/getOpenToolsUrl?invitationId=' + invitationId,
    method: 'post'
  })
}
/*
* 邀请函-邀请函供应商
* */
// 供应商查看邀请函列表
export function listTenderInvitationSupplierPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/listTenderInvitationSupplierPages',
    method: 'post',
    data
  })
}
// 项目经理-保存邀请供应商
export function invitationSupplierSave(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/invitationSupplierSave',
    method: 'post',
    data
  })
}

// 项目经理--根据邀请函id 查询供应商明细明细
export function getAddTenderInvitationSupplierDetailed(invitationId) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/getAddTenderInvitationSupplierDetailed?invitationId=' + invitationId,
    method: 'post'
  })
}
// 项目经理-追加邀请供应商
export function invitationAppendSupplierSave(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/invitationAppendSupplierSave',
    method: 'post',
    data
  })
}
// 项目经理-邀请函列表
export function queryInvitationSupplierList(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/queryInvitationSupplierList' + createURL(data),
    method: 'post'
  })
}

// 复制投标人资格要求信息-邀请函模块
export function copyInvitationQualification(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/copyInvitationQualification',
    method: 'post',
    data
  })
}

// 项目经理-获取可以邀请的供应商信息
export function listCanInvitedSupplierPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/listCanInvitedSupplierPages',
    method: 'post',
    data
  })
}
// 供应商查看可参与 邀请函列表
export function listTenderAttendInvitationSupplierPages(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitationSupplier/listTenderAttendInvitationSupplierPages',
    method: 'post',
    data
  })
}

/* ****新版邀请公告接口******** */
// 获取邀请函所有初始化字典信息接口
export function getInvitationAllDictionariesInitInfo() {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/getInvitationAllDictionariesInitInfo',
    method: 'post'
  })
}
// 获取邀请函信息
export function queryBaseTenderInvitationSimpleInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/queryBaseTenderInvitationSimpleInfo',
    method: 'post',
    data
  })
}
// 保存邀请函信息
export function saveBaseTenderInvitationSimpleInfo(data) {
  return request({
    url: '/bidprocurement/bidding-invitation/invitation/tenderInvitation/saveBaseTenderInvitationSimpleInfo',
    method: 'post',
    data
  })
}
