import request from '@/assets/js/utils/request'
/* =============================================服务费管理API=================================================*/

/* ========================================中标服务费包组信息API接口=================================*/
// 获取中标服务费包组信息列表
export function queryWinServicePackinfoList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServicePackinfoController/queryWinServicePackinfoList',
    method: 'post',
    data
  })
}

// 查看中标服务费包组信息详情
export function detailWinServicePackinfo(params) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServicePackinfoController/detailWinServicePackinfo',
    method: 'post',
    params
  })
}
/* ========================================中标服务费开票信息API接口=================================*/
// 获取中标服务费开票信息列表
export function queryWinServiceList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceList',
    method: 'post',
    data
  })
}
// 保存中标服务费开票信息
export function saveTenderFeeWinService(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/saveTenderFeeWinService',
    method: 'post',
    data
  })
}
// 查看中标服务费开票信息
export function detailTenderFeeWinService(winServiceId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/detailTenderFeeWinService?winServiceId=' + winServiceId,
    method: 'post'
  })
}
// 删除中标服务费开票信息
export function delTenderFeeWinService(winServiceId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/delTenderFeeWinService?winServiceId=' + winServiceId,
    method: 'post'
  })
}
// 服务费退款开票列表
export function queryWinServiceOutInvoiceList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceOutInvoiceList',
    method: 'post',
    data
  })
}
// 服务费退款开票列表统计信息
export function queryWinServiceOutInvoiceStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceOutInvoiceStatistics',
    method: 'post',
    data
  })
}
// 服务费收费开票列表
export function queryWinServiceInvoiceList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceInvoiceList',
    method: 'post',
    data
  })
}
// 服务费收费开票列表统计信息
export function queryWinServiceInvoiceStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceInvoiceStatistics',
    method: 'post',
    data
  })
}
// 提交服务费申请时检查中标人中标是否欠款
export function checkSupplierOfFee(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/checkSupplierOfFee',
    method: 'post',
    data
  })
}
// 中标服务费开票
export function invoiceTenderFeeWinService(winServiceId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/invoiceTenderFeeWinService?winServiceId=' + winServiceId,
    method: 'post'
  })
}
// 中标服务费开票信息查看-开票员
export function detailTenderFeeWinServiceInvoiceInfo(winServiceId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/detailTenderFeeWinServiceInvoiceInfo?winServiceId=' + winServiceId,
    method: 'post'
  })
}
// 中标服务费红冲
export function checkTenderFeeWinService(winServiceId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/checkTenderFeeWinService?winServiceId=' + winServiceId,
    method: 'post'
  })
}

// 获取标段中标人信息列表
export function queryPackWinnerList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryPackWinnerList',
    method: 'post',
    data
  })
}
/* ========================================中标服务费退款信息API接口=================================*/
// 删除中标服务费退款信息
export function delTenderFeeWinServiceOut(outId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceOutController/delTenderFeeWinServiceOut?outId=' + outId,
    method: 'post'
  })
}
// 查看中标服务费退款信息
export function detailTenderFeeWinServiceOut(outId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceOutController/detailTenderFeeWinServiceOut?outId=' + outId,
    method: 'post'
  })
}
// 保存中标服务费退款信息
export function saveTenderFeeWinServiceOut(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceOutController/saveTenderFeeWinServiceOut',
    method: 'post',
    data
  })
}
/* ========================================中标服务费欠款信息API接口=================================*/
// 获取中标服务费欠款信息列表
export function queryWinServiceDebtList(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceDebtController/queryWinServiceDebtList',
    method: 'post',
    data
  })
}
// 获取中标服务费欠款统计信息
export function queryWinServiceDebtStatistics(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceDebtController/queryWinServiceDebtStatistics',
    method: 'post',
    data
  })
}

// 中标服务费欠款销账
export function cancleWinServiceDebt(winServiceDebtId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceDebtController/cancleWinServiceDebt?winServiceDebtId=' + winServiceDebtId,
    method: 'post'
  })
}

// 处理服务费开票邮寄地址Excel数据上传
export const saveMailAddressInfoByExcel = '/bidprocurement/bidding-docfee/servicefee/winServiceController/saveMailAddressInfoByExcel'

// 服务费收费开票列表 - 打印发票
export function printWinServiceInvoice(winServiceId, userId) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/printWinServiceInvoice?winServiceId=' + winServiceId + '&userId=' + userId,
    method: 'post'
  })
}

// 服务费收费开票列表 - 导出开票明细
export function queryWinServiceInvoiceListExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceInvoiceListExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
// 服务费收费开票列表 - 备注编辑接口
export function editWinserviceRenark(params) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/editWinserviceRenark',
    method: 'post',
    params
  })
}
// 服务费收费开票列表 - 服务费批量记账
export function batchBookkeepingTenderFeeWinService(params) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/batchBookkeepingTenderFeeWinService',
    method: 'post',
    params
  })
}

// 服务费收费开票列表 - 导出邮寄信息明细
export function queryMailAddressInfoExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryMailAddressInfoExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 获取中标服务费欠款信息列表-导出欠费记录
export function queryWinServiceDebtListExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceDebtController/queryWinServiceDebtListExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 服务费退款开票列表-导出退款记录
export function queryWinServiceOutInvoiceListExport(data) {
  return request({
    url: '/bidprocurement/bidding-docfee/servicefee/winServiceController/queryWinServiceOutInvoiceListExport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
