import request, { postBlob, getBlob, handleImport } from '@/utils/request'

// 获取汇总列表
export function listPageV1(data) {
  return request({
    url: `/settlementOrder/list/pageLineSettlementV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

// 获取明细列表
export function listPageV2(data) {
  return request({
    url: `/settlementOrder/list/pageV2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//导出
export function pageExport2(data, name) {
  return postBlob({
    url: '/settlementOrder/pageExport',
    data,
    name
  })
}

//导出
export function pageExport1(data, name) {
  return postBlob({
    url: '/settlementOrder/pageLineSettlementExport',
    data,
    name
  })
}

// 详情
export function getDetail(params) {
  return request({
    url: `/settlementOrder/detail`,
    method: 'post',
    params
  })
}

// 退款
export function refund(params) {
  return request({
    url: `/settlementOrder/refund`,
    method: 'post',
    params
  })
}

// 结算
export function settleAccounts(params) {
  return request({
    url: `/settlementOrder/lineSettlement`,
    method: 'post',
    params
  })
}