<!--
 * @Author: wangliang
 * @date 20220727
-->
<template>
  <div>
    <div class="rarle">
      <div style="width:100%;height: calc(25vh);background: linear-gradient(#0B54E0 50px , #ffffff);">
        <tatle-bar :tatle="titleName" :tatleflag="titleflag" style="background: #0B54E0" >
        </tatle-bar>
      </div>
      <div class="card">
        <div style="margin-top: 4%; margin-left: 20px"><span style="color: #9e9e9e">所得利息(元)</span></div>
        <div style="margin-top: 0px; margin-left: 20px"><span style="color: #FFA121;font-size: 24px;font-family: '思源黑体 Bold', '思源黑体 Regular', '思源黑体';
    font-weight: 700;
    font-style: normal;">{{countResult}}</span></div>
        <div style="margin-top: 4%; margin-left: 20px"><span style="color: #9e9e9e">本息合计(元)</span></div>
        <div style="margin-top: 0px; margin-left: 20px"><span style="color: #FFA121;font-size: 24px;font-family: '思源黑体 Bold', '思源黑体 Regular', '思源黑体';
    font-weight: 700;
    font-style: normal;">{{result}}</span></div>
      </div>



      <div style="margin-top: 125px; margin-left: 30px; margin-right: 30px">
        <van-row>
          <van-col span="12" style="color: #999999">储蓄方式</van-col>
          <van-col span="12" style="text-align: right">{{saveType}}</van-col>
        </van-row>
      </div>
      <div style="margin-top: 20px; margin-left: 30px; margin-right: 30px">
        <van-row>
          <van-col span="12" style="color: #999999">存款类型</van-col>
          <van-col span="12" style="text-align: right">{{timeType}}</van-col>
        </van-row>
      </div>
      <div style="margin-top: 20px; margin-left: 30px; margin-right: 30px">
        <van-row>
          <van-col span="12" style="color: #999999">期限</van-col>
          <van-col span="12" style="text-align: right">{{time}}</van-col>
        </van-row>
      </div>
      <div style="margin-top: 20px; margin-left: 30px; margin-right: 30px">
        <van-row>
          <van-col span="12" style="color: #999999">年利率(%)</van-col>
          <van-col span="12" style="text-align: right">{{yearRate}}</van-col>
        </van-row>
      </div>
      <div style="margin-top: 20px; margin-left: 30px; margin-right: 30px">
        <van-row>
          <van-col span="12" style="color: #999999">存入金额(元)</van-col>
          <van-col span="12" style="text-align: right">{{depositAmt}}</van-col>
        </van-row>
      </div>

       <van-button style="width: 90%;margin-left: 5%;margin-top:30px;background-color: #3672F1;border-radius: 5px;border:0px;" 
          type="primary" @click="returnCount">确定</van-button>
         <van-button style="width: 90%;margin-left: 5%;margin-top:20px;border-radius: 5px;border-color: #3672F1"
         @click="returnCount"><span style="color: #3672F1">重新计算</span></van-button>
    </div>
  </div>
</template>

<script lang="ts">
import {Component, Prop, Vue} from "vue-property-decorator";
@Component({
  name: "CountResultB",
})
export default class CountResultB extends Vue{
  result="0";
  countResult="100";
  saveType="";
  timeType="";
  time="";
  yearRate="";
  depositAmt= "";
  titleName="试算结果";
  titleflag=true;
  returnCount() {
    this.$router.push({
      name: "DepositInterestTrial",
    });
  }
  mounted() {
    this.saveType = this.$route.params.saveType;
    this.timeType = this.$route.params.timeType;
    this.time = this.$route.params.time=="1"?"一年":this.$route.params.time=="2"?"两年":"三年";
    this.yearRate = this.$route.params.yearRate;
    this.depositAmt = this.$route.params.depositAmt;
    this.countResult = this.$route.params.result;
    this.result = (parseInt(this.$route.params.result)+parseInt(this.depositAmt)).toString();
  }
}
</script>

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