loan.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 :task-list="list" @onCalculate="onCalculate"></LoanItem>
  17. </EnScroll>
  18. <Tab :tab-index="2"></Tab>
  19. <uni-popup ref="popup" type="bottom" @touchmove.stop.prevent="moveHandle">
  20. <view class="page-env-160 sys-background-fff r-20">
  21. <view class="row-justify-sb center p-lr30 p-t30">
  22. <view class="wh-25"></view>
  23. <text class="size-30 sys-weight-600">核算年利率</text>
  24. <image class="wh-25" src="/page_task/static/img/task-details/close.png" mode="aspectFill"
  25. @click="onClose">
  26. </image>
  27. </view>
  28. <view class="p-30 size-28 m-b50">
  29. <view class="">
  30. <text>当前年利率</text><text class="sys-weight-600 color-FF730E m-l10">23.7%</text>
  31. </view>
  32. <view class="row-justify-sb center r-10 sys-from-background-color p-30 m-t30">
  33. <input class="flex" type="text" placeholder="请输入新年利率" />
  34. <text class="text-color-12">%</text>
  35. </view>
  36. </view>
  37. <EnButton text="确认核算" @onSubmit=""></EnButton>
  38. </view>
  39. </uni-popup>
  40. </view>
  41. <EnButton :is_both="1" leftText="利率对比" rightText="完善贷后" @onLeftSubmit="onRateCompare" @onSubmit="onPerfectRate">
  42. </EnButton>
  43. </view>
  44. </template>
  45. <script>
  46. // 任务列表
  47. import LoanItem from "@/common/task/loan-item.vue";
  48. import {
  49. getLoanList
  50. } from "@/api/task";
  51. import tools from "@/service/tools";
  52. export default {
  53. components: {
  54. LoanItem
  55. },
  56. data() {
  57. return {
  58. current: 0,
  59. tabsList: [{
  60. name: '全部',
  61. disabled: false
  62. }, {
  63. name: '已完成(6)',
  64. dot_color: 'red',
  65. is_dot: true,
  66. disabled: false
  67. }, {
  68. name: '未完成(6)',
  69. dot_color: '#000',
  70. is_dot: true,
  71. disabled: false
  72. }],
  73. searchText: "",
  74. fromData: {
  75. status: 0,
  76. interest_rate: '', //利率区间 数组或者字符串,连接
  77. residue_num: '', //剩余期数
  78. product_name: '', //产品名称
  79. phone: '', //电话号码
  80. name: '', //客户名称
  81. productId: '', //产品ID
  82. page: 1,
  83. },
  84. total: 0,
  85. list: [],
  86. }
  87. },
  88. watch: {
  89. },
  90. mounted() {
  91. this.getList()
  92. },
  93. methods: {
  94. getList() {
  95. getLoanList(this.fromData).then((res) => {
  96. if (res.code === 1) {
  97. this.list = [...this.list, ...res.data.items]
  98. this.total = res.data.total
  99. } else {
  100. tools.error(res.msg)
  101. }
  102. })
  103. },
  104. tabsChange(index) {
  105. this.current = index;
  106. },
  107. // 下拉刷新
  108. onRefresh() {
  109. uni.showLoading({
  110. title: '数据加载中'
  111. })
  112. setTimeout(() => {
  113. uni.showToast({
  114. title: '加载完成',
  115. icon: 'none'
  116. })
  117. this.$refs.scroll.onEndPulling()
  118. }, 1000)
  119. console.log("下拉刷新");
  120. },
  121. // 滚动到底部
  122. onScrollBottom() {
  123. uni.showLoading({
  124. title: '数据加载中'
  125. })
  126. setTimeout(() => {
  127. uni.showToast({
  128. title: '加载完成',
  129. icon: 'none'
  130. })
  131. }, 1000)
  132. console.log("到底部了");
  133. },
  134. onRateCompare() {
  135. uni.navigateTo({
  136. url: "/pages/loan/module/rate_compare"
  137. })
  138. },
  139. onPerfectRate() {
  140. uni.navigateTo({
  141. url: "/pages/loan/module/perfect_rate"
  142. })
  143. },
  144. onCalculate() {
  145. this.$refs.popup.open('bottom')
  146. },
  147. onClose() {
  148. this.$refs.popup.close('bottom')
  149. },
  150. moveHandle() {
  151. return false
  152. }
  153. },
  154. }
  155. </script>
  156. <style lang="scss" scoped>
  157. // .page-box{
  158. // height: 100vh;
  159. // background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-bg.png?imageMogr2/quality/20");
  160. // background-repeat: no-repeat;
  161. // background-size: 100% auto;
  162. // display: flex;
  163. // flex-direction: column;
  164. // .top-data{
  165. // flex: 1;
  166. // overflow: hidden;
  167. // .top-row{
  168. // height: 680rpx;
  169. // }
  170. // }
  171. // .bottom-data{
  172. // }
  173. // }
  174. </style>