returndetail.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <template>
  2. <view v-if="isrefash">
  3. <view class="cart-list">
  4. <view style="padding: 0 36upx;line-height: 70upx;border-bottom: 14upx solid #F5F5F5;">
  5. <span v-if="detail.status == 1">待处理</span>
  6. <span v-if="detail.status == 2">已退款 </span>
  7. <span v-if="detail.status == 3">退款失败</span>
  8. </view>
  9. <view style="padding: 30upx 36upx 15upx 36upx;border-bottom: 1px solid #F5F5F5;">
  10. <image :src="pictureUrl+'/uploads/home/store/'+store.store_id+'/'+store.store_avatar" style="border-radius: 50%;
  11. width: 50upx;height: 50upx;vertical-align: middle;"></image>
  12. <span style="padding-left: 16upx;">{{store.store_name}}</span>
  13. </view>
  14. <view>
  15. <van-card
  16. title-class="changewidth"
  17. price-class ="priceClass"
  18. :price="detail.goods_price"
  19. :desc="detail.descire"
  20. :title="detail.desarray"
  21. :thumb="pictureUrl + '/uploads/home/store/goods/'+detail.goods_image.substr(0, detail.goods_image.indexOf('\_')) + '/' + detail.goods_image"
  22. >
  23. </van-card>
  24. </view>
  25. <view class="topTip">
  26. <view style="font-size: 28upx;">合计:{{detail.goods_price}}</view>
  27. </view>
  28. <view style="padding: 15upx 36upx;">订单编号:<text class="orderCode">{{detail.order_sn}}</text></view>
  29. <view style="padding: 15upx 36upx;">快递单号:<text class="orderCode">{{detail.goods_price}}</text></view>
  30. <view class="adressbottom">
  31. <view>申请时间: <text style="font-weight: bold;" class="time">{{detail.create_time}}</text></view>
  32. <view>原因: <text style="font-weight: bold;" class="time">{{detail.refund_remark}}</text></view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import TextArea from '@/component/textarea.vue'
  39. import uploadImage from '@/component/uploadImage.vue'
  40. export default {
  41. components: {
  42. TextArea,
  43. uploadImage
  44. },
  45. data() {
  46. return {
  47. id: 0,
  48. isrefash: false,
  49. detail: null,
  50. store: null,
  51. store_id: 1,
  52. pictureUrl: this.pictureUrl,
  53. }
  54. },
  55. onLoad(e) {
  56. console.log(this.detail);
  57. this.id = e.id;
  58. this.submitRemin();
  59. },
  60. methods: {
  61. submitRemin() {
  62. this.request({
  63. url: '/v3/order/refund_info',
  64. method: 'get',
  65. data: {
  66. id: this.id
  67. },
  68. success: (res) => {
  69. let { data } = res.data;
  70. let arr = data.goods_name.split(' ');
  71. data.desarray = arr[0];
  72. data.descire = data.goods_name.replace(arr[0], '');
  73. this.detail = data;
  74. this.store_id = data.store_id;
  75. this.getstore();
  76. }
  77. })
  78. },
  79. getstore() {
  80. this.request({
  81. url: '/v1/store/info',
  82. method: 'post',
  83. data: {
  84. store_id: this.store_id
  85. },
  86. success: (res) => {
  87. let { data } = res.data;
  88. this.store = data;
  89. this.isrefash = true;
  90. }
  91. })
  92. },
  93. }
  94. }
  95. </script>
  96. <style lang="scss">
  97. .topTip {
  98. display: flex;
  99. align-items: center;
  100. justify-content: flex-start;
  101. padding: 20upx 36upx;
  102. }
  103. .van-card {
  104. background-color: #fff!important;
  105. }
  106. .adressbottom {
  107. padding: 0 36upx;
  108. color: #606266;
  109. border-top: 16upx solid #F5F5F5;
  110. padding-bottom: 32upx;
  111. margin-bottom: 100upx;
  112. view {
  113. padding: 32upx 0 0 0;
  114. }
  115. .time {
  116. padding-left: 16upx;
  117. }
  118. }
  119. </style>