applyRefundDetails.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="refund-details">
  3. <u-navbar
  4. v-if="details.refundStatus === 0"
  5. :is-back="false"
  6. back-text=""
  7. title="申请退款"
  8. :background="{ backgroundColor: '#008CFF' }"
  9. title-color="#fff"
  10. back-icon-color="#fff"
  11. ></u-navbar>
  12. <u-navbar v-else back-text="" title="申请退款" :background="{ backgroundColor: '#008CFF' }" title-color="#fff" back-icon-color="#fff"></u-navbar>
  13. <view class="refund-details-list">
  14. <view class="refund-details-list-item">
  15. <view class="rdli-label">申请时间:</view>
  16. <view class="rdli-content">{{ details.applyTime }}</view>
  17. </view>
  18. <view class="refund-details-list-item">
  19. <view class="rdli-label">消费金额:</view>
  20. <view class="rdli-content"
  21. ><text class="rdli-font">{{ details.refundAmount }}</text
  22. >元</view
  23. >
  24. </view>
  25. <view class="refund-details-list-item">
  26. <view class="rdli-label">退款原因:</view>
  27. <view class="rdli-content">{{ details.refundReason }}</view>
  28. </view>
  29. <view class="refund-details-list-item" v-if="details.images && details.images.length > 0">
  30. <view class="rdli-label">图片:</view>
  31. <view class="rdli-content">
  32. <u-lazy-load class="image" v-for="(item, index) in details.images" :key="index" :image="item" img-mode="aspectFill"></u-lazy-load>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="apply-button" v-if="details.refundStatus === 0">
  37. <u-button type="primary" disabled>申请中</u-button>
  38. </view>
  39. <view class="apply-button" v-if="details.refundStatus === 0">
  40. <u-button type="primary" @click="jumpPage('pages/center/order/order')">返回列表页</u-button>
  41. </view>
  42. <view class="refund-details-status" v-if="details.refundStatus === 2">
  43. <view class="refund-details-status-item">
  44. <view>处理时间:</view>
  45. <view>{{ details.auditTime }}</view>
  46. </view>
  47. <view class="refund-details-status-item">
  48. <view>处理结果:</view>
  49. <view v-if="details.refundStatus === 1">已通过</view>
  50. <view v-if="details.refundStatus === 2">已驳回</view>
  51. </view>
  52. <view class="refund-details-status-item">
  53. <view>备注:</view>
  54. <view>{{ details.refuseReason }}</view>
  55. </view>
  56. </view>
  57. <u-toast ref="uToast" />
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. details: {}
  65. };
  66. },
  67. onLoad(page) {
  68. this.getOrderRefundDetails(page.orderId);
  69. },
  70. methods: {
  71. getOrderRefundDetails(orderId) {
  72. this.$u.api
  73. .getOrderRefundDetails({
  74. orderId: orderId
  75. })
  76. .then((res) => {
  77. if (res.code === 200) {
  78. this.details = res.data;
  79. } else {
  80. this.$refs.uToast.show({
  81. title: res.msg,
  82. type: 'error'
  83. });
  84. }
  85. })
  86. .catch((err) => {
  87. this.$refs.uToast.show({
  88. title: '操作失败',
  89. type: 'error'
  90. });
  91. });
  92. },
  93. jumpPage(url) {
  94. this.$u.route({
  95. url
  96. });
  97. }
  98. }
  99. };
  100. </script>
  101. <style lang="scss" scoped>
  102. @import './applyRefundDetails.scss';
  103. </style>