ReturnOrder.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="order-ul" :class="['qn-page-' + theme]">
  3. <view class="order-li" v-for="(item, index) in order_list" :key="index">
  4. <view class="shop-view">
  5. <text class="ibonfont ibonmendian"></text>
  6. {{ item.shopName }}
  7. </view>
  8. <view class="goods-view clearfix">
  9. <view class="float_left goods-img"><image :src="item.images[0]" mode="aspectFill"></image></view>
  10. <view class="float_right goods-info">
  11. <view class="ellipsis goods-name">{{ item.goodsName }}</view>
  12. <view class="sku">{{ item.unitName || '' }} {{ item.skuName || '' }}</view>
  13. <view class="return-money clearfix">
  14. <text class="float_left primary-color">¥{{ $_utils.formatNub(item.returnUnitPrice) }}</text>
  15. <text class="float_right">x {{ $_utils.formatNub(item.goodsNum) }}</text>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="return-status">
  20. {{ item.auditStatus === 2 ? '退货成功' : item.auditStatus === 1 ? '正在审核中' : '已驳回' }}
  21. <block v-if="item.auditStatus !== 3">
  22. ,退款
  23. <text style="font-weight: bold;">¥{{ $_utils.formatNub(item.returnTotalPrice) }}</text>
  24. </block>
  25. <block v-else>
  26. ,原因:{{item.auditFailReason}}
  27. </block>
  28. </view>
  29. </view>
  30. <!-- 空白页 -->
  31. <Aempty text="暂无数据" src="https://onlineimg.qianniao.vip/list.png" v-if="order_list.length === 0"></Aempty>
  32. <u-loadmore v-else :status="load_status" />
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. order_list: [],
  40. page: 1,
  41. pageSize: 10,
  42. total: 0,
  43. load_status: 'nomore'
  44. };
  45. },
  46. onShow() {
  47. this.getAllOrderReturn();
  48. },
  49. onPullDownRefresh() {
  50. this.page = 1;
  51. this.getAllOrderReturn();
  52. },
  53. onReachBottom() {
  54. if (this.total / this.pageSize > this.page) {
  55. this.page += 1;
  56. this.getAllOrderReturn();
  57. }
  58. },
  59. methods: {
  60. getAllOrderReturn() {
  61. this.load_status = 'loading';
  62. this.$u.api
  63. .getAllOrderReturn({
  64. page: this.page,
  65. pageSize: this.pageSize
  66. })
  67. .then(res => {
  68. uni.stopPullDownRefresh();
  69. if (this.page === 1) {
  70. this.order_list = res.data;
  71. } else {
  72. this.order_list = this.order_list.concat(res.data);
  73. }
  74. this.total = res.pageTotal;
  75. this.load_status = this.$_utils.loadStatus(this.page, this.pageSize, this.total);
  76. })
  77. .catch(res => {
  78. uni.stopPullDownRefresh();
  79. this.load_status = 'nomore';
  80. });
  81. }
  82. }
  83. };
  84. </script>
  85. <style lang="scss" scoped>
  86. .order-ul {
  87. .order-li {
  88. width: 700rpx;
  89. margin: 20rpx auto;
  90. padding: 0 20rpx 30rpx;
  91. background-color: #ffffff;
  92. border-radius: 16rpx;
  93. .shop-view {
  94. line-height: 70rpx;
  95. .ibonfont {
  96. font-size: 32rpx;
  97. margin-right: 10rpx;
  98. color: #cacaca;
  99. }
  100. }
  101. .goods-view {
  102. .goods-img {
  103. margin-right: 20rpx;
  104. image {
  105. width: 120rpx;
  106. height: 120rpx;
  107. border-radius: 10rpx;
  108. }
  109. }
  110. .goods-info {
  111. width: 518rpx;
  112. .sku {
  113. font-size: 24rpx;
  114. color: #999999;
  115. margin: 10rpx 0;
  116. }
  117. .return-money {
  118. font-size: 24rpx;
  119. }
  120. }
  121. }
  122. .return-status {
  123. line-height: 36rpx;
  124. background-color: #f6f7f9;
  125. margin-top: 20rpx;
  126. border-radius: 10rpx;
  127. padding: 24rpx 30rpx;
  128. font-size: 26rpx;
  129. }
  130. }
  131. }
  132. </style>