addList.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="content">
  3. <view class="" style="height: 1rpx;"></view>
  4. <empty v-if="loaded === true && list.length === 0"></empty>
  5. <view v-for="(item, index) in list" :key="index" class="order-item flex">
  6. <view class="title-box flex_item">
  7. <view class="title-avatar">
  8. <image src="../../static/icon/jl-na.png"></image>
  9. </view>
  10. <view class="list-tpl">
  11. <view class="title clamp">
  12. <!-- <view class="title-name clamp"></view>-->
  13. {{ item.name }}
  14. </view>
  15. <view class="time">
  16. <text>{{item.finish_time}}</text>
  17. </view>
  18. </view>
  19. <view class="list-right">
  20. <view class="je">
  21. 业绩金额:{{item.number || '0'}}
  22. </view>
  23. <view class="">
  24. {{item.status == 0?'进行中': (item.status == 1?'待核销':(item.status == 2?'已核销':'失败'))}}
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <uni-load-more :status="loadingType"></uni-load-more>
  30. </view>
  31. </template>
  32. <script>
  33. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  34. import empty from '@/components/empty';
  35. import {getActionList,getAddList} from '@/api/index.js'
  36. export default {
  37. components: {
  38. uniLoadMore,
  39. empty
  40. },
  41. data() {
  42. return {
  43. page: 1,
  44. limit: 10,
  45. loadingType: 'more',
  46. loaded: false,
  47. list: []
  48. }
  49. },
  50. onLoad(opt) {
  51. },
  52. onShow() {
  53. this.getList()
  54. },
  55. onReachBottom() {
  56. },
  57. onReady() {
  58. },
  59. methods: {
  60. getList() {
  61. let that = this
  62. getAddList({
  63. page: that.page,
  64. limit: that.limit
  65. }).then(res => {
  66. that.list = res.data
  67. if(res.data.length == that.limit) {
  68. that.loadingType = 'more'
  69. }else {
  70. that.loadingType = 'noMore'
  71. }
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss">
  78. .order-item {
  79. padding: 20rpx 30rpx;
  80. line-height: 1.5;
  81. background-color: #fff;
  82. .title-box {
  83. width: 100%;
  84. .title-avatar {
  85. flex-shrink: 0;
  86. width: 54rpx;
  87. height: 54rpx;
  88. margin-right: 25rpx;
  89. border-radius: 100%;
  90. image {
  91. width: 100%;
  92. height: 100%;
  93. border-radius: 100%;
  94. }
  95. }
  96. .list-right {
  97. text-align: right;
  98. flex-shrink: 0;
  99. font-size: 22rpx;
  100. font-weight: 400;
  101. color: #999999;
  102. .je {
  103. font-size: 28rpx;
  104. font-weight: bold;
  105. color: #FF4C4C;
  106. }
  107. }
  108. .list-tpl {
  109. // width: 85%;
  110. flex-grow: 1;
  111. .title {
  112. display: flex;
  113. justify-content: flex-start;
  114. font-size: $font-lg;
  115. color: $font-color-base;
  116. overflow: hidden; //超出的文本隐藏
  117. text-overflow: ellipsis; //溢出用省略号显示
  118. white-space: nowrap;
  119. line-height: 1;
  120. text-align: center;
  121. flex-grow: 1;
  122. .title-name {
  123. max-width: 40%;
  124. }
  125. .dl {
  126. margin-left: 10rpx;
  127. width: 93rpx;
  128. height: 32rpx;
  129. border-radius: 16rpx;
  130. image {
  131. width: 93rpx;
  132. height: 32rpx;
  133. border-radius: 16rpx;
  134. }
  135. }
  136. .class {
  137. display: inline-block;
  138. margin-left: 10rpx;
  139. padding: 6rpx;
  140. text-align: center;
  141. border: 1px solid #2e58ff;
  142. border-radius: 16rpx;
  143. font-size: 20rpx;
  144. font-family: PingFang SC;
  145. font-weight: 500;
  146. color: #2e58ff;
  147. }
  148. }
  149. .time {
  150. font-size: $font-lg;
  151. color: $font-color-light;
  152. }
  153. }
  154. }
  155. .money {
  156. flex-shrink: 0;
  157. width: 50%;
  158. text-align: right;
  159. color: #db1935;
  160. font-size: $font-lg;
  161. }
  162. }
  163. </style>