<!--
 * @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%; 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: 50px; 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%;background-color: #1890ff;position: absolute;margin-top: 26%;height: 6%;border-radius: 5px;" type="primary" @click="returnCount">确定</van-button>
      <van-button style="width: 90%;margin-left: 5%;position: absolute;margin-top: 40%;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: "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">
.card{
  position: absolute;
  background-color: #ffffff;
  width: 90%;
  margin-left: 5%;
  margin-top: -30%;
  border-radius: 10px;
}
</style>
