import { useRequest } from '@/use/useHttp'

/**
 * 售后订单列表
 */
export const GetSaleOrderListApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder/list',
    method: 'get',
  })
}

/**
 * 申请售后订单
 */
export const ReturnApplyOrderApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder',
    method: 'post',
  })
}

/**
 * 取消退货/退款
 */
export const ReturnApplyOrderCancelApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder/cancel',
    method: 'post',
  })
}

/**
 * 售后订单详情
 */
export const SaleOrderOrderDetailApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder',
    method: 'get',
  })
}

/**
 * 物流上传
 */
export const ReturnApplyLogisticsApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder/upload',
    method: 'put',
  })
}

/**
 * 售后货物状况
 */
export const ReturnGoodsStatusApi = () => {
  return useRequest({
    url: '/v1/mall/enum/return/goodsStatus',
    method: 'get',
  })
}

/**
 * 售后退货原因
 */
export const ReturnReasonApi = () => {
  return useRequest({
    url: '/v1/mall/enum/returnOrder/returnReason',
    method: 'get',
  })
}

/**
 * 售后退货原因
 */
export const ReturnExplainApi = () => {
  return useRequest({
    url: '/v1/mall/enum/returnExplain',
    method: 'get',
  })
}

/**
 * 申请退款
 */
export const ApplyRefundApi = () => {
  return useRequest({
    url: '/v1/mall/returnApplyOrder',
    method: 'post',
  })
}

/**
 * 售后订单状态列表
 */
export const RefundOrderSatausApi = () => {
  return useRequest({
    url: '/v1/mall/enum/filterReturnStage',
    method: 'get',
  })
}

/**
 * 退款说明
 */
export const RefundExplainApi = () => {
  return useRequest({
    url: '/v1/mall/enum/refundExplain',
    method: 'get',
  })
}

/**
 * 售后记录
 */
export const ReturnRecordApi = () => {
  return useRequest({
    url: '/v1/mall/saleOrder/return',
    method: 'get',
  })
}
