WithdrawList.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
  2. <seller-base :show="false"><view style="position: absolute;top:0;right:0;left:0;bottom:0" class="scroll-view-wrapper div container">
  3. <view class="div common-header-wrap">
  4. <view class="status-holder"></view>
  5. <view :style="'height:'+navHeight+'px'"></view>
  6. <view class="common-header-holder"></view>
  7. <view class="common-header-fixed">
  8. <title-header />
  9. <uni-nav-bar title="保证金审核" class="common-header" left-icon="back" @clickLeft="goBack()">
  10. </uni-nav-bar>
  11. </view>
  12. </view>
  13. <view class="scroll-view div" style="position:relative">
  14. <scroll-view style="position: absolute;top:0;right:0;left:0;bottom:0" class="div mt-5" @scrolltolower="loadMore" scroll-y="true">
  15. <view class="div item mb-5" v-for="item in logList" :key="item.log_id">
  16. <view class="div mt-wrapper">
  17. <view class="div mt" v-if="item.store_avaliable_deposit !== '0.00'">
  18. <text class="h2">已缴保证金:{{item.store_avaliable_deposit}}</text>
  19. </view>
  20. <view class="div mt" v-if="item.store_freeze_deposit!== '0.00'">
  21. <text class="h2">审核保证金:{{item.store_freeze_deposit}}</text>
  22. </view>
  23. <view class="div mt" v-if="item.store_payable_deposit!== '0.00'">
  24. <text class="h2">应缴保证金:{{item.store_payable_deposit}}</text>
  25. </view>
  26. </view>
  27. <view class="div mc">
  28. {{item.storedepositlog_desc}}
  29. </view>
  30. <view class="div time"> {{ $moment.unix(item.storedepositlog_add_time).format('YYYY-MM-DD h:mm:ss') }}</view>
  31. </view>
  32. <empty-record v-if="logList && !logList.length"></empty-record>
  33. </scroll-view>
  34. </view>
  35. </view>
  36. </seller-base>
  37. </template>
  38. <script>
  39. import {getFontSize} from '@/util/common'
  40. import TitleHeader from '../../TitleHeader'
  41. import SellerBase from '../SellerBase'
  42. import EmptyRecord from '../../EmptyRecord'
  43. import { getSellerDepositWithdrawList } from '../../../api/sellerDeposit'
  44. export default {
  45. name: 'LogList',
  46. components:{
  47. TitleHeader,
  48. SellerBase,
  49. EmptyRecord
  50. },
  51. computed:{
  52. fontSize(){
  53. return getFontSize()
  54. },
  55. },
  56. data(){
  57. return {
  58. navHeight: 0,
  59. params: { 'page': 0, 'per_page': 10 },
  60. loading: false, // 是否加载更多
  61. isMore: true, // 是否有更多
  62. logList: false // 记录列表
  63. }
  64. },
  65. created () {
  66. this.loadMore()
  67. },
  68. mounted(){
  69. // #ifdef MP-WEIXIN
  70. this.navHeight = uni.getMenuButtonBoundingClientRect().height
  71. // #endif
  72. },
  73. methods:{
  74. goBack(){uni.navigateBack({delta:1})},
  75. getLogList (ispush) {
  76. uni.showLoading({ title: '加载中' })
  77. let params = this.params
  78. getSellerDepositWithdrawList(params).then(res => {
  79. uni.hideLoading()
  80. if (ispush && this.logList) {
  81. this.logList = this.logList.concat(res.result.log_list)
  82. } else {
  83. this.logList = res.result.log_list
  84. }
  85. if (res.result.hasmore) {
  86. this.isMore = true
  87. } else {
  88. this.isMore = false
  89. }
  90. })
  91. },
  92. loadMore () {
  93. this.loading = true
  94. this.params.page = ++this.params.page
  95. if (this.isMore) {
  96. this.loading = false
  97. this.getLogList(true)
  98. }
  99. }
  100. }
  101. }
  102. </script>
  103. <style scoped lang="scss">
  104. .scroll-view-wrapper{display: flex;flex-direction: column;}
  105. .scroll-view{flex:1}
  106. .item{padding:.5rem;background:#fff;}
  107. .item .mt-wrapper{display: flex}
  108. .item .mt{height:2rem;line-height:2rem;flex:1}
  109. .item .mt .h2{font-weight:bold;font-size:$subFontSize}
  110. .item .time{font-size:$fontSize;color:gray}
  111. .item .mc{padding-top:.5rem;line-height:1rem;font-size:$subFontSize;}
  112. </style>