loan.vue 3.1 KB

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