withdrawRecord.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <view>
  3. <u-navbar title="提现记录"></u-navbar>
  4. <view class="detailed">
  5. <view style="text-align: center;margin-top: 100px" v-if="!list.length">
  6. <img src="@/assets/img/blankpage.png">
  7. <view>没有提现记录</view>
  8. </view>
  9. <view class="detailed-list"
  10. :key="index"
  11. v-for="(item ,index) in list" >
  12. <view class="detailed-time" v-if="item.show">
  13. <p>{{item.showtime}}</p>
  14. <p>共提现 {{showMap.get(item.showtime)}}</p>
  15. </view>
  16. <view class="detailed-item">
  17. <view class="detailed-item-name">
  18. <view class="u-flex">
  19. <h4>提现</h4>
  20. <span v-if="item.status==1" class="success">(提现成功)</span>
  21. <span v-if="item.status==0" class="error" >(待转账)</span>
  22. <span v-if="item.status==2" >(已驳回)</span>
  23. </view>
  24. <p>{{item.createTime}}</p>
  25. </view>
  26. <view class="detailed-item-num">
  27. <h2>{{item.applicationAmount}}</h2>
  28. </view>
  29. </view>
  30. </view>
  31. <u-divider v-if="list.length&&list.length == recordsTotal" color="#B6BDC3" style="margin-top:20px;" bg-color="#f4f0f0">已经到底了</u-divider>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. import * as API from '@/apis/finance.js'
  37. export default {
  38. data() {
  39. return {
  40. pageIndex: 1,
  41. recordsTotal: 0,
  42. list: [],
  43. form: {
  44. name: '',
  45. intro: '',
  46. },
  47. showMap:null,
  48. }
  49. },
  50. onReady() {
  51. this.getList()
  52. },
  53. onReachBottom() {
  54. if (this.list.length < this.recordsTotal) {
  55. this.myLoadmore();
  56. }
  57. },
  58. methods: {
  59. getList() {
  60. uni.showLoading({
  61. title: "加载中",
  62. mask: true,
  63. })
  64. API.withdrawRecord({
  65. pageIndex:this.pageIndex
  66. }).then((res) => {
  67. this.list = [
  68. ...this.list,
  69. ...res.data.data
  70. ];
  71. var showMap=new Map()
  72. this.list.forEach(item=>{
  73. var ktime=item.createTime.split(" ")[0]
  74. if(showMap.has(ktime)){
  75. item.show=false;
  76. var m=showMap.get(ktime)*100+item.applicationAmount*100;
  77. showMap.set(ktime,m/100)
  78. }else{
  79. showMap.set(ktime,item.applicationAmount)
  80. item.show=true;
  81. item.showtime=ktime;
  82. }
  83. })
  84. this.showMap=showMap;
  85. this.recordsTotal = res.data.recordsTotal
  86. uni.hideLoading()
  87. }).catch(error => {
  88. uni.showToast({
  89. title: error
  90. })
  91. })
  92. },
  93. }
  94. }
  95. </script>
  96. <style>
  97. page{
  98. background-color: #F7F7F7;
  99. }
  100. </style>
  101. <style lang="scss" scoped>
  102. .detailed-time{
  103. display: flex;
  104. justify-content: space-between;
  105. align-items: center;
  106. padding: 10px 20px;
  107. p{
  108. color:#666;
  109. }
  110. }
  111. .detailed-item{
  112. background-color: #fff;
  113. display: flex;
  114. justify-content: space-between;
  115. padding: 10px 20px;
  116. border-bottom: 1px solid #ededed;
  117. .detailed-item-name{
  118. h4{
  119. font-weight: normal;
  120. }
  121. p{
  122. font-size: 12px;
  123. margin-top: 4px;
  124. color:#A2A9B5;
  125. }
  126. span{
  127. margin-left: 10px;
  128. }
  129. .success{color:#27b148}
  130. .error{color:#FF6200;}
  131. }
  132. .detailed-item-num{
  133. display: flex;
  134. align-items: center;
  135. h2{
  136. margin-right: 4px;
  137. }
  138. }
  139. }
  140. </style>