import request from '@/assets/js/utils/request'
import { createURL } from '@/assets/js/utils'
/* 保证金api*/
// 获取保证金包组信息列表-项目经理
export function queryDepositPackinfoList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositPackinfoController/queryDepositPackinfoList',
    method: 'post',
    data
  })
}

// 获取包组下子账户列表-项目经理
export function queryDepositAccountList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/queryDepositAccountList',
    method: 'post',
    data
  })
}
// 获取保证金虚拟子账号详细信息
export function getBailfeeVirtualAccountInfo(accountId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/getBailfeeVirtualAccountInfo?accountId=' + accountId,
    method: 'post'
  })
}
// 获取账号交易信息
export function getVirtualAccountBills(accountId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/getVirtualAccountBills?accountId=' + accountId,
    method: 'post'
  })
}
// 申请保证金虚拟子账号
export function applyBailfeeVirtualAccount(accountId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/applyBailfeeVirtualAccount?accountId=' + accountId,
    method: 'post'
  })
}
// 获取账号交易信息详情列表（收款记录）
export function queryBillList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/queryBillList',
    method: 'post',
    data
  })
}

// 获取账号交易信息详情
export function getAccountBillInfo(billId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/getAccountBillInfo?billId=' + billId,
    method: 'post'
  })
}
// 确认收款信息
export function confirmBillStatus(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/confirmBillStatus' + createURL(data),
    method: 'post'
  })
}

// 查看保函信息-web端
export function getGuaranteeInfoList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositGuarantee/getGuaranteeInfoList',
    method: 'post',
    data
  })
}
// 添加保函信息-web端
export function addDepositGuaranteeInfo(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositGuarantee/addDepositGuaranteeInfo',
    method: 'post',
    data
  })
}
// 查看保函信息-web端
export function detailGuaranteeInfo(guaranteeId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositGuarantee/detailGuaranteeInfo?guaranteeId=' + guaranteeId,
    method: 'post'
  })
}

// 锁定投标人保证金账号
export function lockSupplierAccount(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositLockController/lockSupplierAccount',
    method: 'post',
    data
  })
}
// 锁定投标人保证金账号
export function unlockSupplierAccount(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositUnlockController/unlockSupplierAccount',
    method: 'post',
    data
  })
}

// 获取包组下可退款交易明细列表
export function queryPackRefundBillList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryPackRefundBillList',
    method: 'post',
    data
  })
}

// 变更保证金退款明细
export function changeDepositRefundDetail(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetailChange/changeDepositRefundDetail',
    method: 'post',
    data
  })
}

// 保证金退款申请
export function applyRefundDeposit(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/applyRefundDeposit',
    method: 'post',
    data
  })
}

// 退款金额统计
export function queryTotalRefundAmount(refundId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryTotalRefundAmount?refundId=' + refundId,
    method: 'post'
  })
}
// 审批通过或者驳回接口
export function auditPassOrReject(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/auditPassOrReject',
    method: 'post',
    data
  })
}

// 保证金退款信息列表
export function queryDepositRefundDetailList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryDepositRefundDetailList',
    method: 'post',
    data
  })
}
// 获取保证金退款明细变更信息列表
export function getDepositRefundDetailChangeList(refundDetailId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetailChange/getDepositRefundDetailChangeList?refundDetailId=' + refundDetailId,
    method: 'post'
  })
}

// 查看保证金退款详细信息
export function detailDepositRefundDetailInfo(refundDetailId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/detailDepositRefundDetailInfo?refundDetailId=' + refundDetailId,
    method: 'post'
  })
}

// 获取退款交易明细编辑信息
export function queryEditRefundBillInfo(refundDetailId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryEditRefundBillInfo?refundDetailId=' + refundDetailId,
    method: 'post'
  })
}

// 删除保证金退款明细
export function delDepositRefundDetailInfo(refundDetailId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/delDepositRefundDetailInfo?refundDetailId=' + refundDetailId,
    method: 'post'
  })
}
// 通过指定包组供应商获取唯一保证金虚拟子账号
export function getPackSupplierUniqueBailfeeAccountInfo(packId, supplierId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/getPackSupplierUniqueBailfeeAccountInfo?packId=' + packId + '&supplierId=' + supplierId,
    method: 'post'
  })
}
// 保证金退款审批主表列表
export function queryDepositRefundList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefund/queryDepositRefundList',
    method: 'post',
    data
  })
}

// 批量退款
export function batchRefundDetails(refundDetailIds) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/batchRefundDetails?refundDetailIds=' + refundDetailIds,
    method: 'post'
  })
}
// 待审核保证金列表
export function queryWaiteAuditDetailList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryWaiteAuditDetailList',
    method: 'post',
    data
  })
}

// 待审核保证金列表-供应商标段维度
export function queryWaiteAuditDetailInfoList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryWaiteAuditDetailInfoList',
    method: 'post',
    data
  })
}

// 驳回保证金退款明细
export function rejectDepositRefundDetail(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/rejectDepositRefundDetail',
    method: 'post',
    data
  })
}
// 打回保证金退款明细
export function repulseDepositRefundDetail(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/repulseDepositRefundDetail',
    method: 'post',
    data
  })
}
/* ========================保证金收款记账API接口========================*/
// 保证金收款记账列表
export function queryDepositBookkeepingInList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/queryDepositBookkeepingInList',
    method: 'post',
    data
  })
}
// 手工记账
export function manualDepositBookkeepingIn(bookkeepingInId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/manualDepositBookkeepingIn?bookkeepingInId=' + bookkeepingInId,
    method: 'post'
  })
}
// NC记账
export function ncDepositBookkeepingIn(bookkeepingInId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/ncDepositBookkeepingIn?bookkeepingInId=' + bookkeepingInId,
    method: 'post'
  })
}

// 查看保证金收款记账信息
export function detailDepositBookkeepingInInfo(bookkeepingInId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/detailDepositBookkeepingInInfo?bookkeepingInId=' + bookkeepingInId,
    method: 'post'
  })
}
// 保证金收款记账列表-费用统计数据
export function queryBookkeepingInStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/queryBookkeepingInStatistics',
    method: 'post',
    data
  })
}
/* ========================保证金退款记账API接口========================*/
// 保证金收款记账列表
export function queryDepositBookkeepingOutList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/queryDepositBookkeepingOutList',
    method: 'post',
    data
  })
}
// NC记账
export function ncDepositBookkeepingOut(BookkeepingOutId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/ncDepositBookkeepingOut?BookkeepingOutId=' + BookkeepingOutId,
    method: 'post'
  })
}
// 手工记账
export function manualDepositBookkeepingOut(BookkeepingOutId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/manualDepositBookkeepingOut?BookkeepingOutId=' + BookkeepingOutId,
    method: 'post'
  })
}
// 保证金退款记账列表-费用统计数据
export function queryBookkeepingOutStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/queryBookkeepingOutStatistics',
    method: 'post',
    data
  })
}
// 查看保证金收款记账信息
export function detailDepositBookkeepingOutInfo(BookkeepingOutId) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/detailDepositBookkeepingOutInfo?BookkeepingOutId=' + BookkeepingOutId,
    method: 'post'
  })
}

// 保证金退款申请列表-投标人退款
export function querySupplierOfDepositRefundList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/querySupplierOfDepositRefundList',
    method: 'post',
    data
  })
}

// 保存合同相关信息-保证金退款-投标人
export function queryTendererOfDepositRefundList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositAccountController/queryTendererOfDepositRefundList',
    method: 'post',
    data
  })
}

// 保证金退款审批主表列表-导出退款明细
export function queryDepositRefundListExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefund/queryDepositRefundListExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 导出保证金收款记账列表
export function exportDepositBookkeepingInList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingIn/exportDepositBookkeepingInList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 导出保证金退款记账列表
export function exportDepositBookkeepingOutList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositBookkeepingOut/exportDepositBookkeepingOutList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 保证金退款-导出退款记录
export function queryDepositRefundDetailListExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/queryDepositRefundDetailListExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
/*
  * 保证金凭证确认
*/
// 保证金凭证确认-列表
export function waitAuditBailFeeList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositGuarantee/waitAuditBailFeeList',
    method: 'post',
    data
  })
}

// 保证金凭证确认-列表
export function auditBailFeeInfo(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositGuarantee/auditBailFeeInfo',
    method: 'post',
    data
  })
}

// 导出【付款审批单】
export function exportAuditDetailList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/tenderFeeDepositRefundDetail/exportAuditDetailList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 保证金收款明细-列表
export function queryBillDetailList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/queryBillDetailList',
    method: 'post',
    data
  })
}

// 导出【收款明细】
export function exportBillDetailList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/bailfee/depositBillController/exportBillDetailList',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
