money.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="center">
  3. <empty v-if="list.length === 0"></empty>
  4. <view v-for="(item, index) in list" :key="index" class="order-item">
  5. <view class="i-top b-b">
  6. <text class="time">{{ item.order_id }}</text>
  7. </view>
  8. <view class="main">
  9. <view class="main-item flex">
  10. <view class="main-left">充值用户</view>
  11. <view class="main-right">{{ item.nickname }}</view>
  12. </view>
  13. <view class="main-item flex">
  14. <view class="main-left">充值金额</view>
  15. <view class="main-right">{{ item.price }}</view>
  16. </view>
  17. <view class="main-item flex">
  18. <view class="main-left">充值时间</view>
  19. <view class="main-right">{{ item.pay_time }}</view>
  20. </view>
  21. <view class="main-item flex" v-if="item.integral != 0">
  22. <view class="main-left">积分抵扣</view>
  23. <view class="main-right">{{ item.integral }}</view>
  24. </view>
  25. <view class="main-item flex" v-if="item.barter_integral != 0">
  26. <view class="main-left">钱抵扣</view>
  27. <view class="main-right">{{ item.barter_integral }}</view>
  28. </view>
  29. </view>
  30. <view class="price-box">
  31. <text class="price">{{ item.price }}</text>
  32. 实付款
  33. <text class="price">{{ item.pay_price }}</text>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import { getTime } from '@/utils/rocessor.js';
  40. import { order } from '@/api/shop.js';
  41. import empty from '@/components/empty';
  42. export default {
  43. components: {
  44. empty
  45. },
  46. data() {
  47. return {
  48. list: [],
  49. id: ''
  50. };
  51. },
  52. onLoad(opt) {
  53. this.id = opt.id;
  54. this.loadData();
  55. },
  56. methods: {
  57. loadData() {
  58. order({ store_id: this.id, page: 1, limit: 1000 }).then(({ data }) => {
  59. data.forEach(e => {
  60. e.pay_time = getTime(e.pay_time);
  61. });
  62. this.list = data;
  63. });
  64. }
  65. }
  66. };
  67. </script>
  68. <style lang="scss">
  69. page,
  70. .center {
  71. background: #eee;
  72. height: 100%;
  73. }
  74. .order-item {
  75. display: flex;
  76. flex-direction: column;
  77. background: #fff;
  78. padding: 0 20rpx;
  79. margin: 16rpx auto 0;
  80. width: 690rpx;
  81. border-radius: 20rpx;
  82. .i-top {
  83. display: flex;
  84. align-items: center;
  85. height: 80rpx;
  86. padding-right: 30rpx;
  87. font-size: $font-base;
  88. color: $font-color-dark;
  89. position: relative;
  90. .time {
  91. flex: 1;
  92. }
  93. .state {
  94. color: $base-color;
  95. }
  96. .del-btn {
  97. padding: 10rpx 0 10rpx 36rpx;
  98. font-size: $font-lg;
  99. color: $font-color-light;
  100. position: relative;
  101. &:after {
  102. content: '';
  103. width: 0;
  104. height: 30rpx;
  105. border-left: 1px solid $border-color-dark;
  106. position: absolute;
  107. left: 20rpx;
  108. top: 50%;
  109. transform: translateY(-50%);
  110. }
  111. }
  112. }
  113. .main {
  114. margin: 20rpx 0;
  115. border-bottom: 1px solid #f6f7f9;
  116. font-size: $font-sm + 4rpx;
  117. color: $font-color-light;
  118. .main-item {
  119. padding: 10rpx 0;
  120. }
  121. }
  122. .price-box {
  123. display: flex;
  124. justify-content: flex-end;
  125. align-items: baseline;
  126. padding: 20rpx 30rpx;
  127. font-size: $font-sm + 2rpx;
  128. color: $font-color-light;
  129. .num {
  130. margin: 0 8rpx;
  131. color: $font-color-dark;
  132. }
  133. .price {
  134. font-size: $font-lg;
  135. color: $font-color-dark;
  136. &:before {
  137. content: '¥';
  138. font-size: $font-sm;
  139. margin: 0 2rpx 0 8rpx;
  140. }
  141. }
  142. }
  143. }
  144. </style>