IncomeDetails.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <template>
  2. <!-- 提现明细 -->
  3. <view class="IncomeDetails">
  4. <view class="navbar">
  5. <view v-for="(item, index) in tab_list" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(item, index)">
  6. {{ item.name }}
  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/Distribution/Application?id=' + item.id)" v-for="(item, index) in withdrawals_list" :key="index">
  12. <view class="float_left income-label">
  13. <view class="income-label-text">提现到{{ item.type === 1 ? '微信钱包' : item.type === 2 ? '支付宝' : item.type === 3 ? '银行卡' : '' }}</view>
  14. <view class="income-time">{{ $_utils.formatDate(item.createTime) }}</view>
  15. </view>
  16. <view class="float_right">
  17. <view class="income-money">
  18. +
  19. <text style="margin-left: 6upx;">{{ item.money }}</text>
  20. </view>
  21. <view class="status-text">
  22. {{ item.auditStatus === 1 ? '待审核' : item.auditStatus === 2 ? '打款成功' : item.auditStatus === 3 ? '无效' : item.auditStatus === 4 ? '待打款' : '' }}
  23. </view>
  24. </view>
  25. </view>
  26. <u-loadmore margin-top="20" v-if="withdrawals_list.length" :status="loading_status" />
  27. </scroll-view>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. data() {
  33. return {
  34. tabCurrentIndex: 0,
  35. isLoding: false,
  36. loading_status: 'loadmore',
  37. // 1待审核 4待打款 2打款成功 3失效
  38. tab_list: [
  39. {
  40. name: '全部',
  41. value: 0
  42. },
  43. {
  44. name: '待审核',
  45. value: 1
  46. },
  47. {
  48. name: '待打款',
  49. value: 4
  50. },
  51. {
  52. name: '已打款',
  53. value: 2
  54. },
  55. {
  56. name: '无效',
  57. value: 3
  58. }
  59. ],
  60. page: 1,
  61. pageSize: 10,
  62. auditStatus: 0,
  63. withdrawals_list: []
  64. };
  65. },
  66. onLoad() {
  67. this.text_set = this.$store.state.distributionTextSet;
  68. if (this.text_set.commission_r) {
  69. uni.setNavigationBarTitle({
  70. title: (this.text_set.withdrawal || '提现') + '明细'
  71. });
  72. }
  73. },
  74. onShow() {
  75. this.CommissionWithdrawalsGetAll();
  76. },
  77. methods: {
  78. scrollBootom() {
  79. if (this.pageTotal / this.pageSize > this.page) {
  80. this.page += 1;
  81. this.CommissionWithdrawalsGetAll();
  82. }
  83. },
  84. tabClick(row, index) {
  85. this.auditStatus = row.value;
  86. this.tabCurrentIndex = index;
  87. this.page = 1;
  88. this.CommissionWithdrawalsGetAll();
  89. },
  90. async CommissionWithdrawalsGetAll() {
  91. this.loading_status = 'loading';
  92. let params = {
  93. page: this.page,
  94. pageSize: this.pageSize,
  95. auditStatus: this.auditStatus
  96. };
  97. this.$u.api.CommissionWithdrawalsGetAll({
  98. ...params
  99. }).then(data=>{
  100. if (this.page === 1) {
  101. this.withdrawals_list = data.data
  102. } else {
  103. this.withdrawals_list = this.withdrawals_list.concat(data.data);
  104. }
  105. this.pageTotal = data.pageTotal;
  106. this.loading_status = this.$_utils.loadStatus(this.page, this.pageSize, this.pageTotal);
  107. });
  108. }
  109. }
  110. };
  111. </script>
  112. <style lang="scss">
  113. .income-ul {
  114. .income-li {
  115. background-color: #FFFFFF;
  116. padding: 20upx;
  117. border-bottom: 1upx solid #f5f5f5;
  118. .income-label {
  119. .income-time {
  120. font-size: 24upx;
  121. color: #999;
  122. padding-top: 10upx;
  123. }
  124. }
  125. .float_right {
  126. text-align: right;
  127. .income-money {
  128. color: #333;
  129. font-size: 32upx;
  130. font-weight: bold;
  131. }
  132. .status-text {
  133. font-size: 24upx;
  134. padding-top: 10upx;
  135. color: #fd463e;
  136. }
  137. }
  138. }
  139. }
  140. .navbar {
  141. display: flex;
  142. height: 88upx;
  143. background: #fff;
  144. position: relative;
  145. z-index: 10;
  146. border-bottom: 1upx solid #eee;
  147. .nav-item {
  148. flex: 1;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. height: 100%;
  153. font-size: 28upx;
  154. color: #666666;
  155. position: relative;
  156. font-weight: 300;
  157. &.current {
  158. font-weight: 500;
  159. font-size: 32upx;
  160. color: #fd463e;
  161. .current-line {
  162. content: '';
  163. position: absolute;
  164. left: 50%;
  165. bottom: 10upx;
  166. transform: translateX(-50%);
  167. width: 40upx;
  168. height: 6upx;
  169. background: #fd463e;
  170. border-radius: 6upx;
  171. }
  172. }
  173. }
  174. }
  175. </style>