import request from '@/assets/js/utils/request'
// import { createURL } from '@/assets/js/utils/index'
/*
 * ==================================================采购立项 start=============================================
 * */
//  查询采购项目基本信息
export function queryBaseProcurementProjectInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/queryBaseProcurementProjectInfo',
    method: 'post',
    data
  })
}
//  查询采购项目采购人基本信息
export function queryProcurementProjectBuysersInfo() {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectBuysers/queryProcurementProjectBuysersInfo',
    method: 'post'
  })
}
//  获取采购项目基本信息所有字典信息
export function queryProcurementProjectInitInfo() {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/queryProcurementProjectInitInfo',
    method: 'post'
  })
}
//  项目经理/采购人-查询项目编号是否重复
export function checkTenderNo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/checkTenderNo?tenderNo=' + data,
    method: 'get'
  })
}
//  修改和保存项目基本信息,返回值为项目id
export function saveBaseProcurementProjectInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/saveBaseProcurementProjectInfo',
    method: 'post',
    data
  })
}
//  项目经理/采购人-项目类型列表
export function listProcurementProjectClassificationPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectClassification/listProcurementProjectClassificationPages',
    method: 'post',
    data
  })
}
//  项目经理/采购人-项目管理列表
export function listProjectManagementPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/listProjectManagementPages',
    method: 'post',
    data
  })
}
//  督察员查看-项目管理列表
export function listProjectSupervisionPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/listProjectSupervisionPages',
    method: 'post',
    data
  })
}
//  项目经理/采购人-采购方式为招标的项目管理列表
export function listTenderManagementPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/listTenderManagementPages',
    method: 'post',
    data
  })
}
//  物资信息模板导入
export function importSubjectMatterInfoList(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/importSubjectMatterInfoList?tenderId=' + data,
    method: 'get'
  })
}
//  根据项目id获取物资信息列表(分页)
export function listSubjectMatterPagesByTenderId(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/listSubjectMatterPagesByTenderId',
    method: 'post',
    data
  })
}
//  保存调物料信息
export function saveSubjectMatterInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/saveSubjectMatterInfo',
    method: 'post',
    data
  })
}
//  单条删除物资信息
export function removeSubjectMatter(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/removeSubjectMatter?id=' + data,
    method: 'get'
  })
}
//  删除物资信息
export function removeSubjectMatterInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/removeSubjectMatterInfo',
    method: 'post',
    data
  })
}
//  采购项目保存物资信息
export function saveSubjectMatterInfoList(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/saveSubjectMatterInfoList',
    method: 'post',
    data
  })
}
//  下载物资信息模板
export function downloadTemplatet() {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/downloadTemplate',
    method: 'get',
    responseType: 'blob'
  })
}
//  获取采购项目规则所有字典信息
export function queryProcurementProjectRuleInitInfo() {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/queryProcurementProjectRuleInitInfo',
    method: 'post'
  })
}
//  获取项目规则
export function queryProcurementRuleRecord(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/queryProcurementRuleRecord',
    method: 'post',
    data
  })
}
//  保存项目规则
export function saveProcurementRuleRecord(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/saveProcurementRuleRecord',
    method: 'post',
    data
  })
}

// 项目经理人/采购人-删除项目
export function DeleteProject(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/removeProject',
    method: 'post',
    data
  })
}
// 采购公告 - 删除响应条件
export function deleteCondition(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementCondition/deleteConditionById?id=' + data,
    method: 'post',
    data
  })
}
// 单条取消采购计划
export function cancelPurchaseSubjectMatter(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/cancelPurchaseSubjectMatter',
    method: 'post',
    data
  })
}
// 获取采购项目响应条件所有字典信息
export function getReactionMessage() {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementCondition/queryProcurementProjectConditionInitInfo',
    method: 'post'
  })
}

// 修改采购单行项目税率
export function updateSubjectMatterListTax(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/updateSubjectMatterListTax',
    method: 'post',
    data
  })
}

/*
 * ==================================================采购立项 End=============================================
 * */
/* ==========================================供应商api start=====================================================*/
//  供应商-报名可参与列表
export function canParticipateInTheProjectPage(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/canParticipateInTheProjectPage',
    method: 'post',
    data
  })
}
//  供应商-报名正在参与列表
export function beingeInTheProjectPage(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/participatProcurementProjectPage',
    method: 'post',
    data
  })
}
//  供应商-采购单已完成项目列表
export function finishTheProjectPage(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/finishProcurementProjectPage',
    method: 'post',
    data
  })
}
//  -采购-进入项目驱动加载前调用获取项目信息
export function beingeTackInProjectDeatils(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/queryGoProcurementProjectByPackId?packId=' + data,
    method: 'post'
  })
}
// 采购人获取采购结果驱动时添加显示页面条件
export function distinguishBetween(packId) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/distinguishBetween?packId=' + packId,
    method: 'post'
  })
}
// 进入项目功能
export function queryGoProcurementProjectByPackId(packId) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/queryGoProcurementProjectByPackId?packId=' + packId,
    method: 'post'
  })
}
// 判断是否需要变更
export function judgeChange(packId) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/judgeChange?packId=' + packId,
    method: 'post'
  })
}
// 物料列表
export function listSubjectMatterByPackId(params) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementSubjectMatter/listSubjectMatterByPackId',
    method: 'post',
    params
  })
}
/* ==========================================供应商api End=====================================================*/

/* ====================================================采购立项响应条件api===========================================================*/
// 大唐查询响应条件信息
export function selectProcurementCondition(packId) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementCondition/selectProcurementCondition?packId=' + packId,
    method: 'post'
  })
}
// 删除响应主表信息
export function deleteConditionById(id) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementCondition/deleteConditionById?id=' + id,
    method: 'post'
  })
}
// 保存或修改响应条件主表信息(项目管理处使用)
export function saveOrUpdateCondition(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementCondition/saveOrUpdateCondition',
    method: 'post',
    data
  })
}
// 根据采购方式或者是项目类型删除公告/邀请函不必要保存数据
export function deleteBulletinOrInvitation(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/deleteBulletinOrInvitation',
    method: 'post',
    data
  })
}
/* ====================================================采购立项响应条件api End===========================================================*/

/* ====================================================采购项目管理 Start===========================================================*/
// 取消采购
export function cancelPurchase(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/cancelPurchase',
    method: 'post',
    data
  })
}
// 保存评审办法信息
export function saveReviewMethod(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProjectRule/saveReviewMethod',
    method: 'post',
    data
  })
}
// 发起二次询价
export function sendSecondTime(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/sendSecondTime',
    method: 'post',
    data
  })
}

/* ==================================================== 投标人提出问题 API接口 ===========================================================*/

// 采购人-投标人提出的问题列表
export function listClarificationQuestionPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationQuestion/listClarificationQuestionPages',
    method: 'post',
    data
  })
}

// 采购人-新增时获取澄清版本
export function getClarificationVesionNumber(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/getClarificationVesionNumber',
    method: 'post',
    data
  })
}

// 采购人-保存澄清(答疑)信息
export function saveAnwserClarificationInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/saveAnwserClarificationInfo',
    method: 'post',
    data
  })
}

// 查看
export function getEditQuestionInfo(params) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationQuestion/getEditQuestionInfo',
    method: 'post',
    params
  })
}

/* ==================================================== 采购方澄清 API接口 ===========================================================*/

// 采购人-投标人提出的问题列表
export function listClarificationPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/listClarificationPages',
    method: 'post',
    data
  })
}

// 保存澄清(补疑)信息
export function saveClarificationInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/saveClarificationInfo',
    method: 'post',
    data
  })
}

// 获取澄清编辑/查看信息
export function getEditClarificationInfo(params) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/getEditClarificationInfo',
    method: 'post',
    params
  })
}

// 采购人-查看回执机构列表
export function listClarificationReceipt(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationReceipt/listClarificationReceipt',
    method: 'post',
    data
  })
}

/* ==================================================== 标中澄清 API接口 ===========================================================*/

// 采购人-标中澄清列表
export function listBidClarificationPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarification/listBidClarificationPages',
    method: 'post',
    data
  })
}

// 查询已经报名的供应商信息
export function listSignUpSupplierList(params) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarification/listSignUpSupplierList',
    method: 'post',
    params
  })
}

// 采购人-保存标中澄清信息
export function saveBidClarificationInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarification/saveBidClarificationInfo',
    method: 'post',
    data
  })
}

// 获取标中澄清编辑/查看信息
export function getEditBidClarificationInfo(params) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarification/getEditBidClarificationInfo',
    method: 'post',
    params
  })
}

// 标中澄清-查看回执机构列表
export function listBidClarificationReceipt(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarificationSupplier/listBidClarificationReceipt',
    method: 'post',
    data
  })
}

/* ==================================================== 供应商-澄清 ===========================================================*/
// 获取供应商提出的问题列表 - 异议列表
export function listClarificationQuestionOfSupplierPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationQuestion/listClarificationQuestionOfSupplierPages',
    method: 'post',
    data
  })
}
// 供应商-澄清列表
export function listClarificationOfSupplierPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarification/listClarificationOfSupplierPages',
    method: 'post',
    data
  })
}

// 供应商-标中澄清列表
export function listBidClarificationOfSupplierPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarification/listBidClarificationOfSupplierPages',
    method: 'post',
    data
  })
}

// 异议提出问题
export function saveQuestionInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationQuestion/saveQuestionInfo',
    method: 'post',
    data
  })
}

// 提交澄清回执信息
export function saveClarificationReceiptInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementClarificationReceipt/saveClarificationReceiptInfo',
    method: 'post',
    data
  })
}

// 供应商-标中澄清--提交标中澄清回执信息
export function saveBidClarificationReceiptInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementBidClarificationSupplier/saveBidClarificationReceiptInfo',
    method: 'post',
    data
  })
}
/* ====================================================督察员采购单列表 start===========================================================*/
//  督察员-项目管理列表
export function listProjectInspectorPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/listProjectInspectorPages',
    method: 'post',
    data
  })
}
/* ====================================================督察员采购单列表 end===========================================================*/
/* ====================================================采购单归档 start===========================================================*/
// 采购归档管理列表
export function listProcurementArchivePages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/queryProtProjectProcurementProjectArchiveInfo',
    method: 'post',
    data
  })
}
// 获取已归档/未归档项目数量
export function getProtprojectProcurementArchiveNum(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/getProtprojectProcurementArchiveNum',
    method: 'post',
    data
  })
}
// 采购单归档导出
export function outputArchiveList(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/outputArchiveList',
    method: 'post',
    responseType: 'blob',
    data
  })
}
/* ====================================================采购单归档 end===========================================================*/
/* ====================================合同管理========================================= */
// 合同签订获取关联项目列表
export function listProcurementProjectContractPages(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/listProcurementProjectContractPages',
    method: 'post',
    data
  })
}
/* ====================================================供应商反馈 start===========================================================*/
// 反馈人---获取可以提意见的采购项目列表
export function querySupplierProcurementProject(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/procurementProject/querySupplierProcurementProject',
    method: 'post',
    data
  })
}

// 反馈人---查询投诉建议信息列表
export function queryList(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/queryList',
    method: 'post',
    data
  })
}

// 反馈人---查询登录用户的企业信息
export function getComplaintsDepartInfoVo() {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/getComplaintsDepartInfoVo',
    method: 'get'
  })
}

// 反馈人---增加投诉建议
export function addComplaintsSuggestionsInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/addComplaintsSuggestionsInfo',
    method: 'post',
    data
  })
}

// 反馈人---删除投诉建议
export function delateComplaintsSuggestionsInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/delateComplaintsSuggestionsInfo',
    method: 'post',
    data
  })
}

// 反馈人/受理人---查看投诉建议
export function queryComplaintsSuggestionsInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/queryComplaintsSuggestionsInfo',
    method: 'post',
    data
  })
}

// 反馈人---修改投诉建议
export function updateComplaintsSuggestionsInfo(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/updateComplaintsSuggestionsInfo',
    method: 'post',
    data
  })
}

// 受理人---查询投诉建议列表
export function queryListByReplyUser(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/queryListByReplyUser',
    method: 'post',
    data
  })
}
// 【提出人】追加投诉建议，【回复人】回复
export function addComplaintsReply(data) {
  return request({
    url: '/bidprocurement/procurement-protproject/complaintsSuggestions/addComplaintsReply',
    method: 'post',
    data
  })
}
