import { axios } from '@/utils/request'

//  开单退货单报表
export const salesReportReturnBillList = (params) => {
  const url = `/report/salesReturnBillReport/returnBillQueryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  开单退货单报表  合计
export const salesReportReturnBillCount = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/returnBillQuerySum',
    data: params,
    method: 'post'
  })
}
//  开单退货报表
export const salesReportReturnList = (params) => {
  const url = `/report/salesReturnBillReport/returnQueryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  开单退货报表  合计
export const salesReportReturnCount = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/returnQuerySum',
    data: params,
    method: 'post'
  })
}
//  实售退货报表
export const salesReportReturnRebateList = (params) => {
  const url = `/report/salesReturnBillReport/returnRebateQueryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  实售退货报表  合计
export const salesReportReturnRebateCount = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/returnRebateQuerySum',
    data: params,
    method: 'post'
  })
}
//  销售退货单报表
export const reportSalesReturnList = (params) => {
  const url = `/report/reportSalesReturn/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售退货单报表  合计
export const reportSalesReturnCount = (params) => {
  return axios({
    url: '/report/reportSalesReturn/queryCount',
    data: params,
    method: 'post'
  })
}
//  销售退货明细报表
export const reportSalesReturnDetailList = (params) => {
  const url = `/report/reportSalesReturn/detail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售退货明细报表  合计
export const reportSalesReturnDetailCount = (params) => {
  return axios({
    url: '/report/reportSalesReturn/detail/queryCount',
    data: params,
    method: 'post'
  })
}
//  销售退货明细报表 导出
export const reportSalesReturnDetailExport = (params) => {
  return axios({
    url: '/report/reportSalesReturn/detail/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  总部差价明细报表
export const headRebateDetailReportList = (params) => {
  const url = `/report/headRebateDetailReport/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  总部差价明细报表  合计
export const headRebateDetailReportCount = (params) => {
  return axios({
    url: '/report/headRebateDetailReport/querySum',
    data: params,
    method: 'post'
  })
}
// 总部差价明细报表导出
export const headRebateDetailReportExport = (params) => {
  return axios({
    url: '/report/headRebateDetailReport/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  差价明细报表
export const reportRebateReportList = (params) => {
  const url = `/report/reportRebate/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  差价明细报表  合计
export const reportRebateCount = (params) => {
  return axios({
    url: '/report/reportRebate/queryCount',
    data: params,
    method: 'post'
  })
}
//  差价明细报表 导出
export const reportRebateExport = (params) => {
  return axios({
    url: '/report/reportRebate/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 销售退货单 导出
export const salesReturnsExport = (params) => {
  return axios({
    url: '/report/reportSalesReturn/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 销售退货明细 导出
export const salesReturnDetailExport = (params) => {
  return axios({
    url: '/report/reportRebate/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 开单销售单 导出
export const salesSlipExport = (params) => {
  return axios({
    url: '/report/salesBillReport/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 开单退货单 导出
export const returnSlipExport = (params) => {
  return axios({
    url: 'report/salesReturnBillReport/returnBillExportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 开单销售 导出
export const salesAmountExport = (params) => {
  return axios({
    url: '/report/salesBillReport/queryGroupByBuyerExportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 实售销售 导出
export const actualSalesExport = (params) => {
  return axios({
    url: '/report/salesBillReport/totalRealExportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 开单退货 导出
export const billingReturnExport = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/returnExportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 实售退货 导出
export const salesReturnExport = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/returnRebateExportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  销售明细（开单统计）报表
export const reportSalesBillDetailList = (params) => {
  const url = `/report/salesBillReport/detail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售明细（开单统计）报表  合计
export const reportSalesBillDetailCount = (params) => {
  return axios({
    url: '/report/salesBillReport/detail/queryCount',
    data: params,
    method: 'post'
  })
}
// 销售明细（开单统计）报表 导出
export const reportSalesBillDetailExport = (params) => {
  return axios({
    url: '/report/salesBillReport/detail/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  销售（开单统计）报表
export const reportSalesBillList = (params) => {
  const url = `/report/reportSales/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售（开单统计）报表  合计
export const reportSalesBillCount = (params) => {
  return axios({
    url: '/report/reportSales/queryCount',
    data: params,
    method: 'post'
  })
}
// 销售（开单统计）报表 导出
export const reportSalesBillExport = (params) => {
  return axios({
    url: '/report/reportSales/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  入库单报表
export const reportStockPutList = (params) => {
  const url = `/report/reportStockPut/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  入库单报表  合计
export const reportStockPutCount = (params) => {
  return axios({
    url: '/report/reportStockPut/queryCount',
    data: params,
    method: 'post'
  })
}
// 入库单报表 导出
export const reportStockPutExport = (params) => {
  return axios({
    url: '/report/reportStockPut/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  入库单明细报表
export const reportStockPutDetailList = (params) => {
  const url = `/report/reportStockPut/detail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  入库单明细报表  合计
export const reportStockPutDetailCount = (params) => {
  return axios({
    url: '/report/reportStockPut/detail/queryCount',
    data: params,
    method: 'post'
  })
}
// 入库单明细报表 导出
export const reportStockPutDetailExport = (params) => {
  return axios({
    url: '/report/reportStockPut/detail/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  销售交单报表
export const reportDispatchReportList = (params) => {
  const url = `/report/dispatchReport/xsjd/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  销售交单报表  合计
export const reportDispatchReportCount = (params) => {
  return axios({
    url: '/report/dispatchReport/xsjd/total',
    data: params,
    method: 'post'
  })
}
// 销售交单报表 导出
export const reportDispatchReportExport = (params) => {
  return axios({
    url: '/report/dispatchReport/xsjd/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  调拨交单报表
export const reportAllocateDbjdReportList = (params) => {
  const url = `/report/allocateReport/dbjd/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  调拨交单报表  合计
export const reportAllocateDbjdReportCount = (params) => {
  return axios({
    url: '/report/allocateReport/dbjd/queryCount',
    data: params,
    method: 'post'
  })
}
// 调拨交单报表 导出
export const reportAllocateDbjdReportExport = (params) => {
  return axios({
    url: '/report/allocateReport/dbjd/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  退货交单报表
export const reportSalesReturnThjdReportList = (params) => {
  const url = `/report/salesReturnBillReport/thjd/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  退货交单报表  合计
export const reportSalesReturnThjdReportCount = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/thjd/querySum',
    data: params,
    method: 'post'
  })
}
// 退货交单报表 导出
export const reportSalesReturnThjdReportExport = (params) => {
  return axios({
    url: '/report/salesReturnBillReport/thjd/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 全国各省类销售明细报表
export const realReportSalesByProvince = (params) => {
  return axios({
    url: '/report/realReportSales/queryListByProvince',
    data: params,
    method: 'post'
  })
}
// 导出
export const realReportSalesByProvinceExport = (params) => {
  return axios({
    url: '/report/realReportSales/exportByProvince',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 全国各区类销售明细报表
export const realReportSalesBySubArea = (params) => {
  return axios({
    url: '/report/realReportSales/queryListBySubArea',
    data: params,
    method: 'post'
  })
}
// 导出
export const realReportSalesBySubAreaExport = (params) => {
  return axios({
    url: '/report/realReportSales/exportBySubArea',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 调拨退货单报表
export const allocateReturnReportQueryPage = (params) => {
  const url = `/report/allocateReturnReport/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 查询调拨退货统计信息
export const allocateReturnReportQueryCount = (params) => {
  const url = `/report/allocateReturnReport/queryCount`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 导出
export const allocateReturnReportExport = (params) => {
  return axios({
    url: '/report/allocateReturnReport/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 分页查询调拨退货明细报表
export const allocateReturnReportDetailQueryPage = (params) => {
  const url = `/report/allocateReturnReport/detail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 查询调拨退货明细统计信息
export const allocateReturnReportDetailQueryCount = (params) => {
  const url = `/report/allocateReturnReport/detail/queryCount`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 导出
export const allocateReturnReportDetailExport = (params) => {
  return axios({
    url: '/report/allocateReturnReport/detail/exportExcel',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 费用统计按承担方分页
export const expenseCollectReportQueryPageByTarget = (params) => {
  const url = `/report/expenseCollectReport/queryPageByTarget/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 费用统计按承担方汇总合计
export const expenseCollectReportQueryCountByTarget = (params) => {
  const url = `/report/expenseCollectReport/queryCountByTarget`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 导出费用统计按承担方
export const expenseCollectReportExportByTarget = (params) => {
  return axios({
    url: '/report/expenseCollectReport/exportByTarget',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}

// 费用统计按品类分页
export const expenseCollectReportQueryPageByProductType = (params) => {
  const url = `/report/expenseCollectReport/queryPageByProductType/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 费用统计按品类汇总合计
export const expenseCollectReportQueryCountByProductType = (params) => {
  const url = `/report/expenseCollectReport/queryCountByProductType`
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 导出费用统计按品类
export const expenseCollectReportExportByProductType = (params) => {
  return axios({
    url: '/report/expenseCollectReport/exportByProductType',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}