| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <template>
- <view class="flex-common-css page-box task-bg">
- <Nav title=" " :back="false" :is_fixed="true" :justify="'left'" :color="'#fff'">
- <view class="p-20">
- <IndexPersonal ref="memberObj" ></IndexPersonal>
- <IndexColumn ref="columnObj"></IndexColumn>
- </view>
- </Nav>
- <view class="common-view-css common-view-box flex-direction" ref="commonView" id="commonView">
- <LoanItem @onCalculate="onCalculate" :commonHeight='commonHeight'></LoanItem>
- </view>
- <Tab class="tabView" :tab-index="0"></Tab>
- </view>
- </template>
- <script>
- // 任务列表
- import LoanItem from "@/common/task/loan-item.vue";
- import {
- getLoanList
- } from "@/api/task";
- import tools from "@/service/tools";
- import loanItem from "@/common/task/loan-item.vue";
- import EnSelect from "@/components/en-utils/en-select/en-select.vue";
- import ClientType from "@/pages/loan/components/clientType.vue";
- // 个人信息
- import IndexColumn from "@/pages/index/module/index_column.vue"
- // 顶部栏目
- import IndexPersonal from "@/pages/index/module/index_personal.vue"
- export default {
- components: {
- ClientType,
- EnSelect,
- LoanItem,
- IndexColumn,
- IndexPersonal
- },
- data() {
- return {
- current: 0,
- tabsList: [{
- name: '全部',
- disabled: false
- }, {
- name: '未完成(0)',
- dot_color: 'red',
- is_dot: false,
- disabled: false
- }, {
- name: '已完成',
- dot_color: 'red',
- is_dot: false,
- disabled: false
- }],
- searchText: "",
- fromData: {
- status: 0,
- interest_rate: '', //利率区间 数组或者字符串,连接
- residue_num: '', //剩余期数
- product_name: '', //产品名称
- phone: '', //电话号码
- selectStr: '', //电话号码
- name: '', //客户名称
- productId: '', //产品ID
- page: 1,
- },
- total: 0,
- list: [],
- loanItem: {
- interest_rate: 0,
- id: 0,
- new_rate: '',
- client_id: '',
- },
- commonHeight: ''
- }
- },
- watch: {},
- onShow() {
- this.getList()
- },
- onLoad() {},
- mounted() {
- this.commonViewHeight()
- },
- methods: {
- commonViewHeight() {
- this.$nextTick(() => {
- let tabView = ''
- uni.createSelectorQuery().select('.tabView').boundingClientRect(data => {
- // this.commonHeight = data.height;
- tabView = data.height
- }).exec()
- uni.createSelectorQuery().select('.common-view-box').boundingClientRect(data => {
- console.log(data.height,tabView,'1111111');
- this.commonHeight = data.height - tabView;
- console.log(this.commonHeight,'1111111');
- }).exec()
- });
- },
- // setMemberData(memberData) {
- // this.memberData = memberData
- // this.$refs.columnObj.updateMemberData()
- // },
- startList() {
- this.fromData.status = this.current
- this.total = 999;
- this.list = [];
- this.page = 1;
- this.isAjax = false;
- this.getList();
- },
- setSearch(text) {
- this.fromData.selectStr = text
- this.startList()
- },
- getList() {
- console.log(this.list, '1111111111');
- // getLoanList(this.fromData).then((res) => {
- // if (res.code === 1) {
- // this.list = [...this.list, ...res.data.items]
- // this.total = res.data.total
- // this.tabsList[1].name = '未完成(' + res.data.noNum + ')'
- // this.tabsList[1].is_dot = res.data.noNum > 0;
- // } else {
- // tools.error(res.msg)
- // }
- // })
- },
- tabsChange(index) {
- this.current = index;
- // this.startList()
- },
- // 下拉刷新
- onRefresh() {
- setTimeout(() => {
- this.$refs.scroll.onEndPulling()
- }, 200)
- console.log("下拉刷新");
- },
- // 滚动到底部
- onScrollBottom() {
- uni.showLoading({
- title: '数据加载中'
- })
- setTimeout(() => {
- uni.showToast({
- title: '加载完成',
- icon: 'none'
- })
- }, 1000)
- console.log("到底部了");
- },
- setComputation() {
- uni.navigateTo({
- url: "/pages/loan/module/rate_compare?loanId=" + this.loanItem.id +
- '&interestRate=' + this.loanItem.interest_rate +
- '&newInterestRate=' + this.loanItem.new_rate
- })
- },
- onPerfectRate() {
- uni.navigateTo({
- url: "/pages/loan/module/perfect_rate"
- })
- },
- onCalculate(data) {
- this.loanItem.id = data.item.id
- if (data.type === 1) {
- this.loanItem.interest_rate = data.item.interest_rate
- this.$refs.popup.open('bottom')
- } else {
- this.loanItem.client_id = data.item.client_id
- this.$refs.clientPopup.open('bottom')
- }
- },
- onClose() {
- this.$refs.popup.close('bottom')
- this.$refs.clientPopup.close('bottom')
- },
- moveHandle() {
- return false
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- // .page-box{
- // height: 100vh;
- // background-image: url("https://wealfavor-1257406827.cos.ap-beijing.myqcloud.com/new-xcx/index/index-bg.png?imageMogr2/quality/20");
- // background-repeat: no-repeat;
- // background-size: 100% auto;
- // display: flex;
- // flex-direction: column;
- // .top-data{
- // flex: 1;
- // overflow: hidden;
- // .top-row{
- // height: 680rpx;
- // }
- // }
- // .bottom-data{
- // }
- // }
- </style>
|