withdraw-log.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <!-- 提现记录 -->
  2. <template>
  3. <!-- 记录卡片 -->
  4. <view>
  5. <view style="color: #000000;">
  6. <tn-nav-bar backgroundColor="#ffffff" :bottomShadow="false">提现记录</tn-nav-bar>
  7. <!-- <view :style="{height: tobheight+'px'}"></view> -->
  8. </view>
  9. <z-paging ref="paging" refresher-complete-delay="200" v-model="withdrawLog" @query="queryList">
  10. <view slot="top" class="z_tabs" :style="{marginTop: tobheight+'px'}"></view>
  11. <view class="wallet-log-box u-p-b-30">
  12. <view class="log-list" v-for="item in withdrawLog" :key="item.id">
  13. <view class="head u-flex u-col-center u-row-between">
  14. <view class="title">提现至{{ item.extract_type == 'wechat'?'微信零钱':'其他' }}</view>
  15. <view class="num">{{ item.extract_price }} 元</view>
  16. </view>
  17. <view class="status-box item u-flex u-col-center u-row-between">
  18. <view class="item-title">申请状态</view>
  19. <view class="status-text" :style="{ color: stausMap[item.status] }">
  20. {{ item.status == 0?'申请中':item.status == 1?'已通过并打款':'已拒绝'}}</view>
  21. </view>
  22. <view v-if="item.status == 2" class="time-box item u-flex u-col-center u-row-between">
  23. <text class="item-title">拒绝原因</text>
  24. <view class="time">{{ item.refuse_reason }}</view>
  25. </view>
  26. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  27. <text class="item-title">账户信息</text>
  28. <view class="time u-ellipsis-1">{{ item.apply_info | applyInfoFilter }}</view>
  29. </view> -->
  30. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  31. <text class="item-title">提现单号</text>
  32. <view class="time">{{ item.apply_sn }}</view>
  33. </view> -->
  34. <!-- <view class="time-box item u-flex u-col-center u-row-between">
  35. <text class="item-title">手续费</text>
  36. <view class="time">{{ item.charge_money }} 元</view>
  37. </view> -->
  38. <view class="time-box item u-flex u-col-center u-row-between">
  39. <text class="item-title">申请时间</text>
  40. <view class="time">{{ item.create_time }}</view>
  41. </view>
  42. </view>
  43. <!-- 更多 -->
  44. <!-- <u-loadmore v-show="!isEmpty" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" /> -->
  45. <!-- 空置页 -->
  46. <!-- <shopro-empty v-if="isEmpty" marginTop="300rpx" :image="$IMG_URL + '/imgs/empty/no_data.png'" tipText="暂无数据~"></shopro-empty> -->
  47. </view>
  48. </z-paging>
  49. <wike-loading-page :isLoading="isLoading"></wike-loading-page>
  50. </view>
  51. </template>
  52. <script>
  53. import {
  54. mapMutations,
  55. mapActions,
  56. mapState,
  57. mapGetters
  58. } from 'vuex';
  59. export default {
  60. data() {
  61. return {
  62. isLoading: true,
  63. tobheight: 45,
  64. platform: this.$platform.get(),
  65. withdrawLog: [
  66. // {apply_type_text:'微信零钱',money:100,status:1,status_text:'已到账',apply_info:'51455454',apply_sn:'651515',charge_money:'0.8',createtime:'1676428876'},{apply_type_text:'微信零钱',money:100,status:1,status_text:'已到账',apply_info:'51455454',apply_sn:'651515',charge_money:'0.8',createtime:'1676428876'}
  67. ],
  68. loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  69. currentPage: 1,
  70. lastPage: 1,
  71. isEmpty: false,
  72. stausMap: {
  73. 0: '#999',
  74. 1: '#EFAF41',
  75. 2: '#70C140',
  76. '-1': '#ED5B56'
  77. }
  78. };
  79. },
  80. computed: {
  81. ...mapGetters(['appInfo', 'isLogin', 'userInfo'])
  82. },
  83. filters: {
  84. applyInfoFilter: function(value) {
  85. if (!value) return '-';
  86. return Object.values(value).join(' | ');
  87. }
  88. },
  89. onLoad() {
  90. const that = this;
  91. if (this.platform == 'wxMiniProgram') {
  92. var menumtop = uni.getMenuButtonBoundingClientRect().top - uni.getSystemInfoSync().statusBarHeight
  93. var paddingtop = uni.getSystemInfoSync().statusBarHeight + menumtop
  94. this.tobheight = (menumtop + paddingtop + uni.getMenuButtonBoundingClientRect().height)
  95. }
  96. // this.getLog();
  97. },
  98. // 触底加载更多
  99. // onReachBottom() {
  100. // if (this.currentPage < this.lastPage) {
  101. // this.currentPage += 1;
  102. // this.getLog();
  103. // }
  104. // },
  105. methods: {
  106. queryList(pageNo, pageSize) {
  107. //这里的pageNo和pageSize会自动计算好,直接传给服务器即可
  108. const params = {
  109. page: pageNo,
  110. limit: pageSize,
  111. // level: this.level,
  112. };
  113. this.$http('commission.cashoutLog', params).then(res => {
  114. if (res.code == 0) {
  115. uni.setNavigationBarTitle({
  116. title: this.appInfo.site_name
  117. });
  118. this.$refs.paging.complete(res.data.data);
  119. this.isLoading = false;
  120. }
  121. });
  122. },
  123. // 确认提交表单
  124. getLog() {
  125. let that = this;
  126. that.loadStatus = 'loading';
  127. that.$http('commission.cashoutLog', {
  128. // page: that.currentPage
  129. }).then(res => {
  130. if (res.code === 0) {
  131. that.withdrawLog = [...that.withdrawLog, ...res.data.data];
  132. that.isEmpty = !that.withdrawLog.length;
  133. that.lastPage = res.data.last_page;
  134. that.loadStatus = that.currentPage < res.data.last_page ? 'loadmore' : 'nomore';
  135. }
  136. });
  137. }
  138. }
  139. };
  140. </script>
  141. <style lang="scss">
  142. // 记录卡片
  143. .log-list {
  144. min-height: 213rpx;
  145. background: #ffffff;
  146. margin-bottom: 10rpx;
  147. padding-bottom: 10rpx;
  148. .head {
  149. padding: 0 35rpx;
  150. height: 80rpx;
  151. border-bottom: 1rpx solid #eee;
  152. margin-bottom: 20rpx;
  153. .title {
  154. font-size: 28rpx;
  155. font-weight: 500;
  156. color: #333333;
  157. }
  158. .num {
  159. font-size: 28rpx;
  160. font-weight: 500;
  161. color: #7063d2;
  162. }
  163. }
  164. .item {
  165. padding: 0 30rpx 10rpx;
  166. .item-icon {
  167. color: #c0c0c0;
  168. font-size: 36rpx;
  169. margin-right: 8rpx;
  170. }
  171. .item-title {
  172. width: 180rpx;
  173. font-size: 24rpx;
  174. font-weight: 400;
  175. color: #c0c0c0;
  176. }
  177. .status-text {
  178. font-size: 24rpx;
  179. font-weight: 500;
  180. color: #05c3a1;
  181. }
  182. .time {
  183. font-size: 24rpx;
  184. font-weight: 400;
  185. color: #c0c0c0;
  186. }
  187. }
  188. }
  189. </style>