memberRefund.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import { requestApi } from '../util/network'
  2. // 获取退款列表
  3. export const getRefundList =
  4. (params) =>
  5. requestApi(
  6. '/Memberrefund/get_refund_list',
  7. 'POST',
  8. {
  9. page: params.page,
  10. per_page: params.per_page
  11. },
  12. 'member'
  13. )
  14. // 获取单个退款信息
  15. export const getRefundInfo =
  16. (refundId) =>
  17. requestApi(
  18. '/Memberrefund/get_refund_info',
  19. 'POST',
  20. {
  21. refund_id: refundId
  22. },
  23. 'member'
  24. )
  25. // 新增全部退款
  26. export const addRefundAll =
  27. (orderId, buyerMessage, fileValue) =>
  28. requestApi(
  29. '/Memberrefund/refund_all_post',
  30. 'POST',
  31. {
  32. order_id: orderId,
  33. buyer_message: buyerMessage,
  34. refund_pic: fileValue
  35. },
  36. 'member'
  37. )
  38. // 新增部分退款
  39. export const addRefund =
  40. (refundType, orderId, orderGoodsId, refundAmount, goodsNum, reasonId, buyerMessage, fileValue) =>
  41. requestApi(
  42. '/Memberrefund/refund_post',
  43. 'POST',
  44. {
  45. refund_type: refundType,
  46. order_id: orderId,
  47. order_goods_id: orderGoodsId,
  48. refund_amount: refundAmount,
  49. goods_num: goodsNum,
  50. reason_id: reasonId,
  51. buyer_message: buyerMessage,
  52. refund_pic: fileValue
  53. },
  54. 'member'
  55. )
  56. // 上传退款凭证
  57. export const uploadRefundImage =
  58. (file) =>
  59. requestApi(
  60. '/Memberrefund/upload_pic',
  61. 'POST',
  62. file,
  63. 'member',
  64. true
  65. )
  66. // 获取公共信息
  67. export const getCommonData =
  68. (orderId, recId) =>
  69. requestApi(
  70. '/Memberrefund/refund_form',
  71. 'POST',
  72. {
  73. order_id: orderId,
  74. order_goods_id: recId
  75. },
  76. 'member'
  77. )