list.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <view class="page">
  3. <view class="list" v-if="refundOrder&&refundOrder.length>0">
  4. <view class="list_item" v-for="(item, index) in refundOrder" :key="index">
  5. <view class="ht">
  6. 服务单号:{{item.refund_no}}
  7. </view>
  8. <view class="list_g_d" v-for="(son, sonIndex) in item.order_detail" :key="sonIndex">
  9. <view class="content">
  10. <view class="pic">
  11. <u-image width="160rpx" height="160rpx" radius="20rpx" :src="son.goods_cover"></u-image>
  12. </view>
  13. <view class="info">
  14. <view class="title">{{ son.goods_title }}</view>
  15. <view class="desc">
  16. <u-tag :text="son.goods_sku" size="mini" type="info" />
  17. <text>x{{ son.goods_nums }}</text>
  18. <!-- <view class="nums">
  19. <text>数量:</text>
  20. </view> -->
  21. <!-- <text class="price">申请金额:¥{{ son.total_amount }}</text> -->
  22. </view>
  23. </view>
  24. </view>
  25. <!-- <view class="operate_son">
  26. <u-button v-if="son.sub_status == 31" class="oparbtn" type="primary" size="mini" shape="circle" @click.stop="afterSalesDetail(son)">去填写单号</u-button>
  27. <u-button v-else class="oparbtn" size="mini" shape="circle" @click.stop="afterSalesDetail(son)">售后详情</u-button>
  28. </view> -->
  29. </view>
  30. <view class="saleAfter_status">
  31. <text v-if="item.status == 10">等待审核</text>
  32. <text v-if="item.status == 21">审核通过,正在退款中</text>
  33. <text class="color_blue" v-if="item.status == 211">退款成功</text>
  34. <text class="price_color" v-if="item.status == 22">审核失败</text>
  35. <text v-if="item.status == 31">审核通过,请填写退货快递单号</text>
  36. <text class="price_color" v-if="item.status == 32">退货退款,审核未通过</text>
  37. <text v-if="item.status == 33">等待卖家收货确认</text>
  38. <text v-if="item.status == 34">卖家已确认收货,正在退款中</text>
  39. <text class="color_blue" v-if="item.status == 344">退款成功</text>
  40. </view>
  41. <view class="operate">
  42. <view class="paystyle">
  43. 申请金额:{{item.refundFee}}
  44. </view>
  45. <!-- <view class="" v-if="item.status==10">
  46. 等待客服审核
  47. </view>
  48. <view class="" v-if="item.status == 21">
  49. 退款已退回原账户
  50. </view>
  51. <view class="paystyle" v-if="['22','32'].includes(item.status)">
  52. 审核失败
  53. </view> -->
  54. <u-button v-if="item.status == 31" class="oparbtn" type="primary" size="mini" shape="circle" @click.stop="afterSalesDetail(item.id)">去填写单号</u-button>
  55. <u-button v-else class="oparbtn" size="mini" shape="circle" @click.stop="afterSalesDetail(item.id)">售后详情</u-button>
  56. <!-- <u-button class="oparbtn" v-if="['22','32'].includes(item.status)" type="primary" size="small" shape="circle" @click.stop="applyAfterSales(item.order_id)">重新申请</u-button>
  57. <u-button class="oparbtn" v-if="item.status==30" type="primary" size="small" shape="circle" @click.stop="applyAfterSales(item.order_id)">重新申请</u-button> -->
  58. </view>
  59. </view>
  60. </view>
  61. <NoData height="60vh" type="order" v-if="finish&&refundOrder.length==0"></NoData>
  62. <!-- <u-loadmore v-else :status="finish?'nomore':loading?'loading':'loadmore'" :load-text="loadText" margin-top="30" /> -->
  63. <LoadMore v-else :loadtype="{finish,loading}"></LoadMore>
  64. </view>
  65. </template>
  66. <script>
  67. // 组件
  68. import { orderOperate } from '@/pages-mall/mixins/order-operate.js';
  69. const app = getApp();
  70. var _self;
  71. export default {
  72. mixins: [orderOperate],
  73. data() {
  74. return {
  75. page:1,
  76. loading:false,
  77. finish:false,
  78. loadText: {
  79. loadmore: '轻轻上拉',
  80. loading: ' ',
  81. nomore: '没有更多了'
  82. },
  83. refundOrder:[],//售后订单
  84. };
  85. },
  86. onLoad(ops) {
  87. _self = this;
  88. },
  89. onShow() {
  90. _self.getRefundOrderList();
  91. },
  92. onPullDownRefresh(){
  93. // uni.stopPullDownRefresh();
  94. this.page=1;
  95. this.finish=false;
  96. this.refundOrder=[];
  97. this.getData();
  98. },
  99. onReachBottom(){
  100. console.log('滚动到底部')
  101. this.getData();
  102. },
  103. methods: {
  104. // 刷新页面
  105. refreshData(){
  106. uni.startPullDownRefresh();
  107. },
  108. // 更新数据
  109. getData(){
  110. this.getRefundOrderList();
  111. },
  112. // 退款售后
  113. getRefundOrderList(){
  114. if(this.finish){
  115. return false;
  116. }
  117. this.loading = true;
  118. this.$u.api.getRefundOrderListAjax({
  119. page:this.page,
  120. }).then(({code,data})=>{
  121. uni.stopPullDownRefresh();
  122. this.loading = false;
  123. if(code==1){
  124. if(data.last_page<=data.current_page){
  125. this.finish = true;
  126. }
  127. if(data.current_page==1){
  128. this.refundOrder = data.data;
  129. }else{
  130. this.refundOrder=this.refundOrder.concat(data.data);
  131. }
  132. }else{
  133. this.finish = true;
  134. }
  135. this.page = data.current_page+1;
  136. }).catch(()=>{
  137. uni.stopPullDownRefresh();
  138. this.loading = false;
  139. this.finish = true;
  140. })
  141. },
  142. }
  143. };
  144. </script>
  145. <style lang="scss" scoped>
  146. .pagecon{
  147. padding-bottom: 30rpx;
  148. }
  149. .list {
  150. padding:30rpx 30rpx;
  151. box-sizing: border-box;
  152. &_item{
  153. background-color: #ffffff;
  154. border-radius: 16rpx;
  155. box-shadow: 0px 2px 8px 0px rgba(27, 25, 86, 0.06);
  156. margin-bottom: 20rpx;
  157. .ht{
  158. height: 80rpx;
  159. display: flex;
  160. align-items: center;
  161. color: $app-theme-text-gray-color;
  162. border-bottom: 1rpx solid $app-theme-border-color;
  163. padding: 0 30rpx;
  164. }
  165. .paystyle{
  166. // font-weight: bold;
  167. margin-right: 20rpx;
  168. color: $app-theme-text-money-color;
  169. }
  170. }
  171. }
  172. .list_g_d{
  173. margin: 20rpx;
  174. .content{
  175. display: flex;
  176. align-content: space-between;
  177. .pic {
  178. margin-right: 24rpx;
  179. }
  180. .info {
  181. flex: 1;
  182. .title {
  183. width: 100%;
  184. line-height: 1.2em;
  185. // height: 2.4em;
  186. display: -webkit-box;
  187. overflow: hidden;
  188. -webkit-line-clamp: 2;
  189. -webkit-box-orient: vertical;
  190. font-size: 28rpx;
  191. font-weight: 400;
  192. color: $app-theme-text-black-color;
  193. }
  194. .desc {
  195. display: flex;
  196. justify-content: space-between;
  197. align-items: flex-end;
  198. margin-top: 10rpx;
  199. }
  200. .price {
  201. color: $app-theme-text-money-color;
  202. }
  203. }
  204. }
  205. }
  206. .saleAfter_status{
  207. color: $app-theme-points-yellow-color;
  208. margin: 10rpx 30rpx;
  209. text-align: right;
  210. }
  211. .operate{
  212. display: flex;
  213. justify-content: flex-end;
  214. align-items: center;
  215. padding: 0 30rpx;
  216. height: 80rpx;
  217. border-top: 1rpx solid $app-theme-border-color;
  218. .oparbtn{
  219. margin-left: 20rpx;
  220. }
  221. }
  222. .operate_son {
  223. text-align: right;
  224. }
  225. </style>