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

// 销售政策退订单-列表
export function refundRetailListV2(data) {
  return request({
    url: `/v2/refund/retail/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//销售政策退订单-导出
export function refundRetailListV2Export(data, name) {
  return postBlob({
    url: '/v2/refund/retail/list/export',
    method: 'post',
    data,
    name
  })
}

// 零售退订单-列表
export function refundOtherListV2(data) {
  return request({
    url: `/v2/refund/other/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//零售退订单-导出
export function refundOtherListV2Export(data, name) {
  return postBlob({
    url: '/v2/refund/other/list/export',
    method: 'post',
    data,
    name
  })
}

// 商用工程退订单-列表
export function refundTradeListV2(data) {
  return request({
    url: `/v2/refund/trade-e/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

//商用工程退订单-导出
export function refundTradeListV2Export(data, name) {
  return postBlob({
    url: '/v2/refund/trade-e/list/export',
    method: 'post',
    data,
    name
  })
}


// 退订单-详情
export function getRefundDetail(data) {
  return request({
    url: `/v2/refund/detail`,
    method: 'post',
    params: data
  })
}
