refundDetail.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <view class="page">
  3. <RefundSuccessful
  4. v-if="refundDetail.goods[0].refund.status == 1"
  5. @checkMoney="checkMoney"
  6. :refundDetail="refundDetail"
  7. />
  8. <RefundInProgress
  9. v-if="refundDetail.goods[0].refund.status == 0"
  10. :refundDetail="refundDetail"
  11. />
  12. <RefusalToRefund
  13. v-if="
  14. refundDetail.goods[0].refund.status == 2 ||
  15. refundDetail.goods[0].refund.status == 3
  16. "
  17. :refundDetail="refundDetail"
  18. />
  19. <RefundInformation
  20. :goodsDetail="refundDetail.goods[0]"
  21. :refundDetail="refundDetail"
  22. />
  23. <MoneyDestination :show="show" @close="close" />
  24. <view class="footer" v-if="refundDetail.goods[0].refund.status != 1">
  25. <button class="btn" @click="platformIntervene">平台介入</button>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import RefundSuccessful from "./component/refundSuccessful.vue";
  31. import RefundInProgress from "./component/refundInProgress.vue";
  32. import RefusalToRefund from "./component/refusalToRefund.vue";
  33. import RefundInformation from "./component/refundInformation.vue";
  34. import MoneyDestination from "./component/moneyDestination.vue";
  35. export default {
  36. components: {
  37. RefundInformation,
  38. MoneyDestination,
  39. RefundSuccessful,
  40. RefundInProgress,
  41. RefusalToRefund,
  42. },
  43. data() {
  44. return {
  45. show: false,
  46. status: 1,
  47. orderRefundId: "",
  48. refundDetail: {},
  49. };
  50. },
  51. onLoad(options) {
  52. console.log(options);
  53. this.orderRefundId = options.orderId;
  54. this.getDetail();
  55. },
  56. methods: {
  57. checkMoney() {
  58. this.show = true;
  59. },
  60. close() {
  61. this.show = false;
  62. },
  63. //申请平台介入
  64. platformIntervene() {
  65. if (this.refundDetail.goods[0].refund.status != 3) {
  66. uni.$u.http
  67. .post(`/api/order_refund/platform_intervention`, {
  68. order_refund_id: this.refundDetail.goods[0].refund.id,
  69. })
  70. .then((res) => {
  71. uni.showToast({
  72. title: "已申请平台介入",
  73. icon: "none",
  74. });
  75. });
  76. } else {
  77. uni.showToast({
  78. title: "平台已介入",
  79. icon: "none",
  80. });
  81. }
  82. },
  83. //获取售后订单详情
  84. getDetail() {
  85. uni.$u.http
  86. .post(`/api/order/refund_read`, { order_refund_id: this.orderRefundId })
  87. .then((res) => {
  88. this.refundDetail = res;
  89. });
  90. },
  91. },
  92. created() {
  93. uni.setNavigationBarTitle({
  94. title: "退款详情",
  95. });
  96. },
  97. };
  98. </script>
  99. <style lang="scss" scoped>
  100. .page {
  101. padding: 20rpx 24rpx;
  102. position: relative;
  103. .footer {
  104. position: fixed;
  105. bottom: 0;
  106. padding: 20rpx 24rpx 60rpx;
  107. background-color: #fff;
  108. left: 0;
  109. width: 94%;
  110. display: flex;
  111. justify-content: flex-end;
  112. .btn {
  113. margin: 0;
  114. padding: 0;
  115. background-color: #fff;
  116. border: 2rpx solid #979797;
  117. color: #222222;
  118. border-radius: 44rpx;
  119. width: 188rpx;
  120. height: 78rpx;
  121. line-height: 78rpx;
  122. font-size: 28rpx;
  123. }
  124. }
  125. }
  126. </style>