cash_detail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <!-- 提现明细 -->
  3. <view class="IncomeDetails">
  4. <view class="navbar">
  5. <view v-for="(item, index) in tabData" :key="index" class="nav-item" :class="{ current: tabIndex === index }" @click="tabChange(index)">
  6. {{ item.title }}
  7. <view class="current-line"></view>
  8. </view>
  9. </view>
  10. <scroll-view class="income-ul" @scrolltolower="scrollBootom" scroll-y="true" style="height:100%">
  11. <view class="income-li clearfix" @click="goPage('/pagesT/NewPartner/cash_info?id=' + item.id)" v-for="(item, index) in listData" :key="index">
  12. <view class="float_left income-label">
  13. <view class="income-label-text">提现到{{item.bank_type}}</view>
  14. <view class="income-time">{{ $_utils.formatDate(item.time) }}</view>
  15. </view>
  16. <view class="float_right">
  17. <view class="income-money">
  18. <text style="margin-left: 6upx;">{{ item.money }}</text>
  19. </view>
  20. <view class="status-text">
  21. {{ item.status === 1 ? '打款成功' : item.status === -1 ? '审核驳回' : item.status === 0 ? '处理中' : '' }}
  22. </view>
  23. </view>
  24. </view>
  25. <u-loadmore margin-top="20" v-if="listData.length" :status="loading_status" />
  26. </scroll-view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. isLoding: false,
  34. loading_status: 'loadmore',
  35. tabData:[
  36. {title:"全部",status:"all"},
  37. {title:"处理中",status:"wait"},
  38. {title:"已打款",status:"ok"},
  39. {title:"已驳回",status:"no"},
  40. ],
  41. tabIndex:0,
  42. listData:[],
  43. page: 1,
  44. pageSize: 10,
  45. };
  46. },
  47. onLoad() {
  48. },
  49. onShow() {
  50. this.getData();
  51. },
  52. methods: {
  53. scrollBootom() {
  54. if (this.pageTotal / this.pageSize > this.page) {
  55. this.page += 1;
  56. this.getData();
  57. }
  58. },
  59. tabChange(index) {
  60. this.tabIndex = index;
  61. this.page = 1;
  62. this.getData();
  63. },
  64. getData(){
  65. var that = this;
  66. let post={page: this.page,pageSize: this.pageSize,status:this.tabData[this.tabIndex].status}
  67. this.load_status = 'loading';
  68. this.$u.api.getPartnerCashApplyList(post).then(res=>{
  69. uni.stopPullDownRefresh();
  70. console.log(res);
  71. if (that.page === 1) {
  72. that.listData = res.data.data;
  73. } else {
  74. that.listData = that.listData.concat(res.data.data);
  75. }
  76. that.total = res.data.total;
  77. that.load_status = that.$_utils.loadStatus(that.page, that.pageSize, that.total);
  78. }).catch(err=>{
  79. uni.stopPullDownRefresh();
  80. that.load_status = 'nomore';
  81. })
  82. },
  83. }
  84. };
  85. </script>
  86. <style lang="scss">
  87. .income-ul {
  88. .income-li {
  89. background-color: #FFFFFF;
  90. padding: 20upx;
  91. border-bottom: 1upx solid #f5f5f5;
  92. .income-label {
  93. .income-time {
  94. font-size: 24upx;
  95. color: #999;
  96. padding-top: 10upx;
  97. }
  98. }
  99. .float_right {
  100. text-align: right;
  101. .income-money {
  102. color: #333;
  103. font-size: 32upx;
  104. font-weight: bold;
  105. }
  106. .status-text {
  107. font-size: 24upx;
  108. padding-top: 10upx;
  109. color: #fd463e;
  110. }
  111. }
  112. }
  113. }
  114. .navbar {
  115. display: flex;
  116. height: 88upx;
  117. background: #fff;
  118. position: relative;
  119. z-index: 10;
  120. border-bottom: 1upx solid #eee;
  121. .nav-item {
  122. flex: 1;
  123. display: flex;
  124. justify-content: center;
  125. align-items: center;
  126. height: 100%;
  127. font-size: 28upx;
  128. color: #666666;
  129. position: relative;
  130. font-weight: 300;
  131. &.current {
  132. font-weight: 500;
  133. font-size: 32upx;
  134. color: #fd463e;
  135. .current-line {
  136. content: '';
  137. position: absolute;
  138. left: 50%;
  139. bottom: 10upx;
  140. transform: translateX(-50%);
  141. width: 40upx;
  142. height: 6upx;
  143. background: #fd463e;
  144. border-radius: 6upx;
  145. }
  146. }
  147. }
  148. }
  149. </style>