refund.ts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * 申请退款
  3. */
  4. export function applyRefund(params: Record<string, any>) {
  5. return request.post(`mall/refund/apply`, params, { showSuccessMessage: true })
  6. }
  7. /**
  8. * 修改退款申请
  9. */
  10. export function editRefund(params: Record<string, any>) {
  11. return request.put(`mall/refund/${ params.order_refund_no }`, params, { showSuccessMessage: true })
  12. }
  13. /**
  14. * 申请退款退货物流
  15. */
  16. export function refundDelivery(params: Record<string, any>) {
  17. return request.post(`mall/refund/delivery/${ params.order_refund_no }`, params, { showSuccessMessage: true })
  18. }
  19. /**
  20. * 修改退款申请物流
  21. */
  22. export function editRefundDelivery(params: Record<string, any>) {
  23. return request.put(`mall/refund/delivery/${ params.order_refund_no }`, params, { showSuccessMessage: true })
  24. }
  25. /**
  26. * 获取退款原因
  27. */
  28. export function getRefundReason() {
  29. return request.get('mall/refund/reason')
  30. }
  31. /**
  32. * 获取退款列表
  33. */
  34. export function getRefundList(params: Record<string, any>) {
  35. return request.get('mall/order/refund', params)
  36. }
  37. /**
  38. * 获取退款详情
  39. */
  40. export function getRefundDetail(orderRefundNo: string) {
  41. return request.get(`mall/order/refund/${ orderRefundNo }`)
  42. }
  43. /**
  44. * 获取退款金额
  45. */
  46. export function getRefundMoney(params: Record<string, any>) {
  47. return request.get(`mall/refund/refund_data`,params)
  48. }
  49. /**
  50. * 编辑退款金额
  51. */
  52. export function getRefundMoneyAgain(params: Record<string, any>) {
  53. return request.get(`mall/refund/refund_data_by_no`,params)
  54. }
  55. /**
  56. * 取消维权
  57. */
  58. export function closeRefund(orderRefundNo: string) {
  59. return request.put(`mall/refund/close/${ orderRefundNo }`, {}, { showSuccessMessage: true })
  60. }