import request from '@/assets/js/utils/request'
/* =============================================标书费管理API=================================================*/
// 获取所有收费文件的购买情况-项目经理
export function queryAllChargingFileList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryAllChargingFileList',
    method: 'post',
    data
  })
}
// 项目经理(文件购买记录页面)-导出收款记录
export function exportPeyeeRecord(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/exportPeyeeRecord',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 标书费-获取标书购买信息列表
export function queryDocfeeListPages(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryDocfeeListPages',
    method: 'post',
    data
  })
}

// 项目经理-发起退款申请
export function applyBackPrice(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyAuditController/applyBackPrice?feeDocId=' + feeDocId,
    method: 'post'
  })
}

// 项目经理-退款申请新增/保存
export function saveOrUpdateBackApplyInfo(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyAuditController/saveOrUpdateBackApplyInfo',
    method: 'post',
    data
  })
}
// 项目经理-提交退款审批
export function submitBackApply(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyAuditController/submitBackApply',
    method: 'post',
    data
  })
}

// 项目经理-根据标书费id查看退款详情
export function queryBackPriceDetail(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyAuditController/queryBackPriceDetail?feeDocId=' + feeDocId,
    method: 'post'
  })
}
// 退票页面-红冲接口
export function refundRedDashed(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyController/refundRedDashed?feeDocId=' + feeDocId,
    method: 'post'
  })
}
// 导出退款列表
export function exportPassAuditOutMoneyList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyController/exportPassAuditOutMoneyList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 标书费开票管理-开票记录列表
export function queryInvoiceList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryInvoiceList',
    method: 'post',
    data
  })
}
// 标书费开票管理-开票费用统计数据
export function queryInvoiceStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryInvoiceStatistics',
    method: 'post',
    data
  })
}

// 标书费开票管理-批量电子开票
export function electronicBllingByFeeDocId(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/electronicBllingByFeeDocId',
    method: 'post',
    data
  })
}
// 标书费开票管理-标书费开票导出/标书费开票邮寄信息导出
export function exportInvoiceList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/exportInvoiceList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 标书费开票管理-标书费开票上传/标书费开票邮寄信息上传
export const savefeeDocInfoByExcel = '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/savefeeDocInfoByExcel'
// 财预部标书费开票员-标书费退款开票列表
export function queryPassAuditOutMoneyList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyController/queryPassAuditOutMoneyList',
    method: 'post',
    data
  })
}
// 标书费开票管理-开票费用统计数据
export function updatefeeDocInfo(params) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/updatefeeDocInfo',
    method: 'post',
    params
  })
}

// 财预部标书费开票员-退款费用统计数据
export function queryBackFeeStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyController/queryBackFeeStatistics',
    method: 'post',
    data
  })
}
// 财预部-根据标书费id查看详情信息
export function queryFeeDocInfoById(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryFeeDocInfoById?feeDocId=' + feeDocId,
    method: 'post'
  })
}
/* ====================财预部-标书费收款记账======================*/
// 财预部-标书费收款记账列表
export function queryTallyListPages(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryTallyListPages',
    method: 'post',
    data
  })
}
// 财务部-记账金额统计
export function queryTallyStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryTallyStatistics',
    method: 'post',
    data
  })
}
// 财预部-导出标书费收款记账列表
export function exportTallyList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/exportTallyList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 财务部-批量记账
export function doBatchcTally(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/doBatchcTally',
    method: 'post',
    data
  })
}

// 财务部-查看记账详情
export function queryTallyInfoById(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocController/queryTallyInfoById?feeDocId=' + feeDocId,
    method: 'post'
  })
}

// 根据标书费id查看退款详情
export function queryBackPriceDetailByFeeDocId(feeDocId) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderFeeDocOutMoneyController/queryBackPriceDetailByFeeDocId?feeDocId=' + feeDocId,
    method: 'post'
  })
}

/* =========================供应商支付标书费订单审核API接口==========================*/
// 项目运维-标书支付凭证待审核列表
export function waitAuditDocfeeList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderSupplierPayDocOrderAudit/waitAuditDocfeeList',
    method: 'post',
    data
  })
}

// 订单详情
export function getOrderDetail(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderSupplierPayDocOrder/getOrderDetail',
    method: 'post',
    data
  })
}

// 运维人员-审批标书费上传凭证
export function auditDocfee(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/docfee/tenderSupplierPayDocOrderAudit/auditDocfee',
    method: 'post',
    params: {
      ...data
    }
  })
}
