/* 采购报名 */
import request from '@/assets/js/utils/request'

// 继续邀请
export function addSupplier(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseInvitationController/addSupplier',
    method: 'post',
    data
  })
}

// 获取邀请函信息
export function getInvitataion(invitataionItemId) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseInvitationController/getInvitataion/' + invitataionItemId,
    method: 'get'
  })
}

// 获取某个项目下发送给供应商的邀请函列表
export function getInvitationList(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseInvitationController/getInvitationList',
    method: 'post',
    data
  })
}

// 获取供应商列表(此项目没有发送邀请函的供应商列表)
export function getSupplyerList(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseInvitationController/getSupplyerList',
    method: 'post',
    data
  })
}

// 供应商接受或拒绝邀请函
export function supplierAcceptInvitation(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseInvitationController/supplierAcceptInvitation',
    method: 'post',
    data
  })
}

// 审核报名信息
export function auditSignup(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/auditSignup',
    method: 'post',
    data
  })
}

// 批量审核报名信息
export function batchAuditSignup(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/batchAuditSignup',
    method: 'post',
    data
  })
}

// 导出报名审核列表
export const exportSignupAuditList = '/bidprocurement/signup/tBPurchaseSignupController/exportSignupAuditList/'

// 已参与项目
export function getDonePurchaseMainList(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/getDonePurchaseMainList',
    method: 'post',
    data
  })
}

// 可参与项目
export function getPurchaseMainList(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/getPurchaseMainList',
    method: 'post',
    data
  })
}

// 获取报名信息
export function getSignup(signId) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/getSignup/' + signId,
    method: 'get'
  })
}

// 获取报名审核列表
export function getSignupAuditList(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/getSignupAuditList',
    method: 'post',
    data
  })
}

// 通过项目id获取报名信息
export function getSignupByPurchaseId(purchaseId) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/getSignupByPurchaseId/' + purchaseId,
    method: 'get'
  })
}

// 撤销报名
export function revokeSignup(purchaseId) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/revokeSignup/' + purchaseId,
    method: 'get'
  })
}

// 报名保存
export function saveSignup(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/saveSignup',
    method: 'post',
    data
  })
}

// 报名补录
export function signupRecord(data) {
  return request({
    url: '/bidprocurement/signup/tBPurchaseSignupController/signupRecord',
    method: 'post',
    data
  })
}
