<template>
|
<div class="loan-info-box">
|
<x-header slot="header"
|
style="width:100%;height:46px;background-color: #ec6758"
|
title="账单详情"
|
:left-options="{backText: ''}">
|
<span class="slotRight_l" slot="right" @click="goAdvanceSettle">提前结清</span>
|
</x-header>
|
<div class="header_huankuan">
|
<div>应还款总额(元)</div>
|
<p>{{repayDetailObj.total|formatMoney}}</p>
|
</div>
|
<group class="mt_20">
|
<div class="info_queren ">
|
<h4>还款信息</h4>
|
<p @click="goRepayPlan">查看详情 <i class="iconfont icon-more-up"></i></p>
|
</div>
|
<ul class="list_shuju">
|
<li>
|
<span>应还款总额</span>
|
<span>{{repayDetailObj.total|formatMoney}}</span>
|
</li>
|
<li>
|
<span>应还总本金</span>
|
<span>{{repayDetailObj.principal|formatMoney}}</span>
|
</li>
|
<li>
|
<span>已还总本金</span>
|
<span>{{repayDetailObj.repayPrincipal|formatMoney}}</span>
|
</li>
|
<li>
|
<span>应还总利息</span>
|
<span>{{repayDetailObj.interest|formatMoney}}</span>
|
</li>
|
<li>
|
<span>已还总利息</span>
|
<span>{{repayDetailObj.repayInterest|formatMoney}}</span>
|
</li>
|
<li>
|
<span>应还总服务费</span>
|
<span>{{repayDetailObj.servicecharge|formatMoney}}</span>
|
</li>
|
<li>
|
<span>已还总服务费</span>
|
<span>{{repayDetailObj.repayServicecharge|formatMoney}}</span>
|
</li>
|
<li>
|
<span>应还总罚息</span>
|
<span>{{repayDetailObj.penalty|formatMoney}}</span>
|
</li>
|
<li>
|
<span>已还总罚息</span>
|
<span>{{repayDetailObj.repayPenalty|formatMoney}}</span>
|
</li>
|
<li>
|
<span>账单状态</span>
|
<span>{{repayDetailObj.loanStatusValue}}</span>
|
</li>
|
<li>
|
<span>账单协议</span>
|
<span>《包银协议1》、《包银协议2》、《包银协议3》</span>
|
</li>
|
</ul>
|
</group>
|
<div style="height: 20px"></div>
|
<box gap="0 15px">
|
<x-button type="primary" @click.native="goActiveRepayMent">主动还款</x-button>
|
</box>
|
<div style="height: 20px"></div>
|
</div>
|
</template>
|
|
<script>
|
import {XHeader, Group, XButton, Box} from 'vux';
|
import SysApi from '../../../api/api';
|
import validate from '../../../tool/validator';
|
import statusCodeManage from '../../../api/statusCodeManage';
|
|
export default {
|
name: 'loanDetails',
|
components: {XHeader, Group, XButton, Box},
|
data() {
|
return {
|
isLastStep: false, // 是否是最后一步
|
activePageItem: 0, // 激活当前页
|
pageList: [], // 一共有几页
|
repayDetailObj: {}// 账单详情数据
|
};
|
},
|
filters: {
|
// 金额格式化
|
formatMoney(val) {
|
return validate.formatMoney(val || 0) + '元'
|
}
|
},
|
methods: {
|
goBackPage() {
|
// 如果是第一步的话,那么返回到上一个页面
|
if (this.activePageItem <= 1) {
|
this.$router.back();
|
} else {
|
// 不是的话,那么显示上一步
|
this.activePageItem--;
|
this.isLastStep = this.pageList.length === this.activePageItem;
|
}
|
},
|
//点击【查看详情】跳转到还款计划
|
goRepayPlan() {
|
this.$router.push({path: '/bnd/repayMent/repayPlan', query: {loanId: this.repayDetailObj.loanId}})
|
},
|
//跳转到提前结清
|
goAdvanceSettle() {
|
this.$router.push({path: '/bnd/repayMent/advanceSettle', query: {loanId: this.repayDetailObj.loanId}})
|
},
|
//跳转到主动还款
|
goActiveRepayMent() {
|
sessionStorage.repayPlanList = JSON.stringify(this.repayDetailObj.repayPlanList)
|
this.$router.push({path: '/bnd/repayMent/activeRepayment', query: {loanId: this.repayDetailObj.loanId}})
|
},
|
// 借款账单详情
|
repayDetail() {
|
SysApi.repayDetail({prodId: sessionStorage.prodId, loanId: this.$route.query.loanId}).then(
|
res => {
|
this.repayDetailObj = res.body
|
}, err => {
|
statusCodeManage.showTipOfStatusCode(err)
|
})
|
}
|
},
|
activated() {
|
this.repayDetail()
|
}
|
};
|
</script>
|
|
<style lang="less">
|
@import "../../../style/mixin.less";
|
|
.loan-info-box {
|
background-color: @color-background-default;
|
.vux-header {
|
.color-linear-gradient(@color-primary-light, @color-primary, 90deg);
|
.vux-header-left {
|
.left-arrow:before {
|
border: solid 1px @color-white;
|
border-width: 2px 0 0 2px;
|
}
|
}
|
}
|
}
|
|
.loan-info-box .weui-btn_primary {
|
.color-linear-gradient(@color-primary-light, @color-primary, 90deg);
|
}
|
|
.loan-info-box .weui-btn_primary:not(.weui-btn_disabled):active {
|
color: rgba(255, 255, 255, 0.6);
|
background-color: rgb(241, 95, 79);;
|
}
|
|
.info_queren {
|
position: relative;
|
height: 3.5rem;
|
padding: 0 1rem;
|
border-bottom: 1px solid @color-divider-regular;
|
h4 {
|
font-size: @font-size-primary;
|
font-weight: normal;
|
line-height: 3.5rem;
|
}
|
p {
|
position: absolute;
|
top: 1rem;
|
right: 1rem;
|
vertical-align: middle;
|
font-size: @font-size-medium;
|
color: @color-primary;
|
}
|
img {
|
width: 1.2rem;
|
padding-right: 0.5rem;
|
vertical-align: middle;
|
position: relative;
|
top: -0.1rem;
|
}
|
}
|
|
.list_shuju {
|
padding: 1rem;
|
li {
|
padding-bottom: 0.5rem;
|
}
|
span {
|
display: table-cell !important;
|
}
|
span:first-child {
|
color: @color-text-secondary;
|
width: 9rem;
|
font-size: @font-size-base;
|
}
|
span:last-child {
|
color: @color-text-third;
|
font-size: @font-size-medium;
|
}
|
}
|
|
.xieyi {
|
text-align: center;
|
padding-bottom: 1.25rem;
|
input {
|
vertical-align: middle;
|
}
|
span {
|
display: inline-block;
|
color: @color-primary;
|
}
|
}
|
|
.slotRight_l {
|
color: @color-white;;
|
font-size: @font-size-medium;
|
position: relative;
|
top: -0.1rem;
|
}
|
|
.mt_20 {
|
margin-top: 0.5rem;
|
}
|
|
.header_huankuan {
|
text-align: center;
|
font-size: @font-size-base;
|
background-color: @color-white;
|
padding: 1.2rem 0;
|
p {
|
font-size: 45Px;
|
color: @color-primary;
|
}
|
}
|
|
.iconfont {
|
font-size: @font-size-small;
|
}
|
|
.weui-btn:after {
|
border: none !important;
|
}
|
|
.weui-btn {
|
font-size: @font-size-primary !important;
|
}
|
|
.weui-btn {
|
font-size: @font-size-primary !important;
|
}
|
</style>
|