loan.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <view class="total-page page_env-20 page-box sys-list-background-color">
  3. <view class="task-bg">
  4. <Nav :title="'贷后管理'" :genre="1" :back="false" is_fixed></Nav>
  5. <view>
  6. <Search :placeholder="'贷款人姓名或电话'"></Search>
  7. <view class="page-box-bg-fff m-lr20 r-20">
  8. <z-tabs ref="tabs" :list="tabsList"
  9. :active-style="{color:'#10B261',fontWeight:'bold',fontSize:'30rpx'}"
  10. :bar-style="{background:'#10B261'}" :inactive-style="{fontWeight:'bold',fontSize:'28rpx'}"
  11. :current="current" :bar-animate-mode="'worm'" @change="tabsChange" />
  12. </view>
  13. </view>
  14. <EnScroll ref="scroll" :navHeight="100" is_tabHeight @onRefresh="onRefresh"
  15. @onScrollBottom="onScrollBottom">
  16. <LoanItem></LoanItem>
  17. </EnScroll>
  18. <Tab :tab-index="2"></Tab>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. // 任务列表
  24. import LoanItem from "@/common/task/loan-item.vue";
  25. import {
  26. getLoanList
  27. } from "@/api/task";
  28. import tools from "@/service/tools";
  29. export default {
  30. components: {
  31. LoanItem
  32. },
  33. data() {
  34. return {
  35. current: 0,
  36. tabsList: [{
  37. name: '全部',
  38. disabled: false
  39. }, {
  40. name: '已完成(6)',
  41. dot_color: 'red',
  42. is_dot: true,
  43. disabled: false
  44. }, {
  45. name: '未完成(6)',
  46. dot_color: '#000',
  47. is_dot: true,
  48. disabled: false
  49. }],
  50. searchText: "",
  51. fromData: {
  52. status: 0,
  53. interest_rate: '', //利率区间 数组或者字符串,连接
  54. residue_num: '', //剩余期数
  55. product_name: '', //产品名称
  56. phone: '', //电话号码
  57. name: '', //客户名称
  58. productId: '', //产品ID
  59. page: 1,
  60. },
  61. total: 0,
  62. list: [],
  63. }
  64. },
  65. watch: {
  66. },
  67. mounted() {
  68. this.getList()
  69. },
  70. methods: {
  71. getList() {
  72. getLoanList(this.fromData).then((res) => {
  73. if (res.code === 1) {
  74. this.list = [...this.list, ...res.data.items]
  75. this.total = res.data.total
  76. } else {
  77. tools.error(res.msg)
  78. }
  79. })
  80. },
  81. tabsChange(index) {
  82. this.current = index;
  83. },
  84. // 下拉刷新
  85. onRefresh() {
  86. uni.showLoading({
  87. title: '数据加载中'
  88. })
  89. setTimeout(() => {
  90. uni.showToast({
  91. title: '加载完成',
  92. icon: 'none'
  93. })
  94. this.$refs.scroll.onEndPulling()
  95. }, 1000)
  96. console.log("下拉刷新");
  97. },
  98. // 滚动到底部
  99. onScrollBottom() {
  100. uni.showLoading({
  101. title: '数据加载中'
  102. })
  103. setTimeout(() => {
  104. uni.showToast({
  105. title: '加载完成',
  106. icon: 'none'
  107. })
  108. }, 1000)
  109. console.log("到底部了");
  110. },
  111. },
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. // .page-box{
  116. // height: 100vh;
  117. // background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-bg.png?imageMogr2/quality/20");
  118. // background-repeat: no-repeat;
  119. // background-size: 100% auto;
  120. // display: flex;
  121. // flex-direction: column;
  122. // .top-data{
  123. // flex: 1;
  124. // overflow: hidden;
  125. // .top-row{
  126. // height: 680rpx;
  127. // }
  128. // }
  129. // .bottom-data{
  130. // }
  131. // }
  132. </style>