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 v-if="isrefash">
  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. this.getlist();
  60. },
  61. methods: {
  62. submitRemin() {
  63. this.request({
  64. url: '/v3/order/refund_info',
  65. method: 'get',
  66. data: {
  67. id: this.id
  68. },
  69. success: (res) => {
  70. let { data } = res.data;
  71. let arr = data.goods_name.split(' ');
  72. data.desarray = arr[0];
  73. data.descire = data.goods_name.replace(arr[0], '');
  74. this.detail = data;
  75. this.store_id = data.store_id;
  76. this.getstore();
  77. }
  78. })
  79. },
  80. getstore() {
  81. this.request({
  82. url: '/v1/store/info',
  83. method: 'post',
  84. data: {
  85. store_id: this.store_id
  86. },
  87. success: (res) => {
  88. let { data } = res.data;
  89. this.store = data;
  90. this.isrefash = true;
  91. }
  92. })
  93. },
  94. }
  95. }
  96. </script>
  97. <style lang="scss">
  98. .topTip {
  99. display: flex;
  100. align-items: center;
  101. justify-content: flex-start;
  102. padding: 20upx 36upx;
  103. }
  104. .van-card {
  105. background-color: #fff!important;
  106. }
  107. .adressbottom {
  108. padding: 0 36upx;
  109. color: #606266;
  110. border-top: 16upx solid #F5F5F5;
  111. padding-bottom: 32upx;
  112. margin-bottom: 100upx;
  113. view {
  114. padding: 32upx 0 0 0;
  115. }
  116. .time {
  117. padding-left: 16upx;
  118. }
  119. }
  120. </style>