<!--
 * @Author: wangliang
 * @date 20220727
-->
<template>
  <div>
    <div class="rarle">
      <div style="width:100%;height: calc(35vh);background: linear-gradient(90deg, #76befa 0%, #3672f1 99%);">
        <tatle-bar :tatle="titleName" :tatleflag="titleflag" >
        </tatle-bar>
      </div>
      <div class="card">
        <div style="margin-top: 4%;text-align: center"><span style="color: #9e9e9e">贷款利息试算金额</span></div>
        <div style="margin-top: 4%;text-align: center;z-index: 1"><span style="color: #FFA121;font-size: 36px;font-family: '思源黑体 Bold', '思源黑体 Regular', '思源黑体';
    font-weight: 700;
    font-style: normal;">¥{{result}}</span></div>
        <div style="margin-top: 4%;text-align: center"><span style="color: #FFA121">{{result}}</span></div>
        <div class="d-flex" style="margin-top: 6%;margin-left: 5%;width: 90%"><span>贷款金额(元)</span><span style="margin-left: auto">{{loanAmt}}</span></div>
        <div class="d-flex" style="margin-top: 6%;margin-left: 5%;width: 90%"><span>贷款期限(月)</span><span style="margin-left: auto">{{loanTime}}</span></div>
        <div class="d-flex" style="margin-top: 6%;margin-left: 5%;margin-bottom: 6%;width: 90%"><span>贷款利率(%)</span><span style="margin-left: auto">{{loanRate}}</span></div>
        <div class="d-flex" style="margin-top: -2%;margin-left: 5%;margin-bottom: 6%;width: 90%"><span>计划月还款(元)</span><span style="margin-left: auto">{{result/loanTime}}</span></div>
<!--        <div class="d-flex" style="margin-top: -2%;margin-left: 5%;margin-bottom: 6%;width: 90%"><span>贷款种类</span><span style="margin-left: auto">一般经营贷款</span></div>-->
        <div class="d-flex" style="margin-top: -2%;margin-left: 5%;margin-bottom: 6%;width: 90%"><span>还款方式</span><span style="margin-left: auto">{{choice}}</span></div>
        <div  style="margin-top: 17%;height: 20%;position: absolute;width: 100%;align-self: center;z-index: 0">
          <van-divider  v-for="count in 12" :key="count" style="background-color: #c6c8ca;margin-top: -11px;margin-left: 10%;height: 0.5px;width: 80%;"/>
        </div>
      </div>
      <van-button style="width: 90%;margin-left: 5%;background-color: #1890ff;position: absolute;margin-top: 86%;height: 6%;border-radius: 5px;" type="primary">确定</van-button>
      <van-button style="width: 90%;margin-left: 5%;position: absolute;margin-top: 102%;height: 6%;border-radius: 5px;border-color: #1890ff" @click="returnCount"><span style="color: #1890ff">重新计算</span></van-button>
    </div>
  </div>
</template>

<script lang="ts">
import {Component, Prop, Vue} from "vue-property-decorator";
@Component({
  name: "CountResult",
})
export default class CountResult extends Vue{
  choice="";
  result="";
  loanAmt="";
  loanRate="";
  loanTime="";
  titleName="试算结果";
  titleflag=true;
  mounted() {
    this.result = this.$route.params.result;
    this.loanAmt = this.$route.params.loanAmt;
    this.loanRate = this.$route.params.loanRate;
    this.loanTime = this.$route.params.loanTime;
    this.choice = this.$route.params.choice;
  }
  returnCount() {
    this.$router.push({
      name: "DepositInterestTrial",
    });
  }
}
</script>

<style scoped lang="scss">
.card{
  position: absolute;
  background-color: #ffffff;
  width: 90%;
  margin-left: 5%;
  margin-top: -30%;
  border-radius: 10px;
}
</style>
