progressDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!-- 售后进度详情 -->
  2. <template>
  3. <view class="container">
  4. <view class="gap"></view>
  5. <view class="progress_content">
  6. <view class="progress_content_item" v-for="(item,index1) in returnLogList" :key="index1">
  7. <view class="progress_date_wrap">
  8. <view class="progress_date">{{formatDate(item.createTime)}}</view>
  9. <view class="progress_time">{{formatTime(item.createTime)}}</view>
  10. </view>
  11. <view class="circle_icon_wrap">
  12. <image :src="imgUrl + '/order-detail/sel.png'" mode="" class="circle_active" v-if="index1 == 0"></image>
  13. <view class="circle_icon" v-else></view>
  14. <view class="progress_line"></view>
  15. </view>
  16. <view class="progress_text" :class="{progress_text_active:index1 == 0}" v-html="item.content"></view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import {
  23. mapState
  24. } from 'vuex';
  25. export default {
  26. data(){
  27. return {
  28. after_sale_bg:getApp().globalData.imgUrl+'order/after_sale_bg.png',
  29. to_right:getApp().globalData.imgUrl+'order/right.png',
  30. icon:getApp().globalData.imgUrl+'order/icon.png',
  31. concatUrl:getApp().globalData.imgUrl+'order/concat.png',
  32. phoneUrl:getApp().globalData.imgUrl+'order/phone.png',
  33. afsSn:'', // 售后单号
  34. state:'' ,// 退换货状态
  35. returnLogList:[],
  36. imgUrl: getApp().globalData.imgUrl,
  37. }
  38. },
  39. computed: {
  40. ...mapState(['userInfo'])
  41. },
  42. onLoad(option){
  43. this.afsSn = option.afsSn
  44. this.state = option.state
  45. this.loadData()
  46. },
  47. methods:{
  48. // 售后详情
  49. loadData(){
  50. let param = {}
  51. if(this.state == 2){ //换货详情
  52. param.url = 'v1/front/member/afterSale/replacementDetail'
  53. }else{ // 仅退款、退货退款
  54. param.url = 'v3/business/front/after/sale/detail'
  55. }
  56. param.method = 'GET';
  57. param.data = {};
  58. param.data.afsSn = this.afsSn;
  59. this.$request(param).then(res => {
  60. if (res.state == 200) {
  61. this.returnLogList = res.data.returnLogList.reverse();
  62. } else {
  63. this.$api.msg(res.msg);
  64. }
  65. }).catch((e) => {
  66. //异常处理
  67. })
  68. },
  69. // 日期时间格式化
  70. formatDate(val){
  71. let date = val.split(' ')[0]
  72. let date1 = date.split('-')[1]
  73. let date2 = date.split('-')[2]
  74. return date1+'-'+date2
  75. },
  76. formatTime(val){
  77. let time = val.split(' ')[1]
  78. return time.split(':')[0]+':'+time.split(':')[1]
  79. },
  80. }
  81. }
  82. </script>
  83. <style lang="scss">
  84. .container{
  85. width: 750rpx;
  86. margin: 0 auto;
  87. .gap{
  88. width:100%;
  89. height:20rpx;
  90. background-color:#F8F8F8;
  91. }
  92. .progress_content{
  93. margin-top:20rpx;
  94. background-color: #fff;
  95. .progress_content_item{
  96. display:flex;
  97. align-items: flex-start;
  98. padding-left:30rpx;
  99. .progress_date_wrap{
  100. margin-right:10rpx;
  101. display:flex;
  102. flex-direction: column;
  103. align-items: flex-end;
  104. white-space: nowrap;
  105. .progress_date{
  106. font-weight: 600;
  107. font-size:28rpx;
  108. color:#949494;
  109. }
  110. .progress_time{
  111. font-size:22rpx;
  112. color:#949494;
  113. }
  114. }
  115. .circle_icon_wrap{
  116. width:40rpx;
  117. display: flex;
  118. flex-direction: column;
  119. align-items: center;
  120. margin-right:37rpx;
  121. .circle_icon{
  122. width: 24rpx;
  123. height: 24rpx;
  124. background: #FFFFFF;
  125. border: 2rpx solid #FC1C1C;
  126. border-radius: 50%;
  127. margin-left:6rpx;
  128. margin-right:10rpx;
  129. }
  130. .circle_active{
  131. width: 40rpx;
  132. height: 40rpx;
  133. }
  134. .progress_line{
  135. width:1rpx;
  136. height:76rpx;
  137. background:#DDDDDD;
  138. }
  139. }
  140. .progress_text{
  141. white-space: pre-wrap;
  142. font-size:26rpx;
  143. color:#999999;
  144. font-weight: 600;
  145. }
  146. .progress_text_active{
  147. font-size: 28rpx;
  148. font-family: PingFang SC;
  149. font-weight: 500;
  150. color: #333333;
  151. line-height: 32rpx;
  152. }
  153. }
  154. }
  155. .progress_content>view:last-child .progress_line{
  156. display: none;
  157. }
  158. }
  159. .big_price{
  160. font-size:34rpx;
  161. }
  162. .small_price{
  163. font-size:24rpx;
  164. }
  165. </style>