import request from '@/utils/request'

// 场次统计分页查询
export const performTimeCount = (query) => {
  return request({
    url: '/merchant/merchantPerformTime/performTimeSaleAnalyse',
    method: 'get',
    params: query
  })
}

//  场次统计导出
export function downTimeCountListXls(params) {
  return request({
    url: '/merchant/merchantPerformTime/performTimeSaleAnalyseExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 渠道订单销售统计
export const channelOrderCount = (query) => {
  return request({
    url: '/order/financeReport/channelSaleOrderCount',
    method: 'get',
    params: query
  })
}
// 渠道订单销售统计导出
export function downChannelOrderListXls(params) {
  return request({
    url: '/order/financeReport/exportChannelSaleOrderCount',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 分销商订单统计
export const distributorOrderCount = (query) => {
  return request({
    url: '/member/marketPersons/withdrawStat',
    method: 'get',
    params: query
  })
}
// 渠道订单销售统计导出
export function downDistributorOrderListXls(params) {
  return request({
    url: '/member/marketPersons/withdrawStatExcel',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 产品销售统计
export const productOrderCount = (query) => {
  return request({
    url: '/order/orderInfo/statisList',
    method: 'get',
    params: query
  })
}
// 渠道订单销售统计导出
export function downProductOrderListXls(params) {
  return request({
    url: '/order/orderInfo/statisExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 团队订单销售统计
export const teamOrderCount = (query) => {
  return request({
    url: '/order/orderInfo/statisTeamList',
    method: 'get',
    params: query
  })
}
// 渠道订单销售统计导出
export function downTeamOrderListXls(params) {
  return request({
    url: '/order/orderInfo/statisTeamExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 日报表
export const dayReportCount = (query) => {
  return request({
    url: '/order/operationReport/dayReportCount',
    method: 'get',
    params: query
  })
}
// 日报表统计导出
export function downDayReportCount(params) {
  return request({
    url: '/order/operationReport/dayReportCountExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 分销明细
export const marketPersonSaleCount = (query) => {
  return request({
    url: '/order/operationReport/marketPersonSaleCount',
    method: 'get',
    params: query
  })
}
// 分销明细导出
export function downMarketPersonSaleCount(params) {
  return request({
    url: '/order/operationReport/marketPersonSaleCountExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}

// 团队明细
export const marketTeamSaleCount = (query) => {
  return request({
    url: '/order/operationReport/marketTeamSaleCount',
    method: 'get',
    params: query
  })
}
// 团队明细导出
export function downMarketTeamSaleCount(params) {
  return request({
    url: '/order/operationReport/marketTeamSaleCountExport',
    method: 'get',
    responseType: 'blob',
    params
  });
}


