提交 1ed0c6b0 编写于 作者: donghuawangliang0612's avatar donghuawangliang0612

贷款试算修改

上级 98531150
......@@ -100,7 +100,7 @@
<div class="d-flex" style="margin-top: 6%;margin-left: 5%;margin-bottom: 6%">存入金额(元)<van-field v-model="test.depositAmt" placeholder="请输入" style="width: 50%;margin-top: -4%;margin-left: auto" input-align="right"></van-field></div> -->
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field :value="test.yearRate" label="年利率(%)" input-align="right" placeholder="请输入 " >
<van-field v-model="test.yearRate" label="年利率(%)" input-align="right" placeholder="请输入 " >
</van-field>
......@@ -109,7 +109,7 @@
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field :value="test.yearRate" label="存入金额(元)" input-align="right" placeholder="请输入 " />
<van-field v-model="test.depositAmt" label="存入金额(元)" input-align="right" placeholder="请输入 " />
</van-col>
</van-row>
......@@ -126,14 +126,14 @@
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field :value="test2.loanAmt" label="贷款金额(元)" input-align="right" placeholder="请输入 " />
<van-field v-model="test2.loanAmt" label="贷款金额(元)" input-align="right" placeholder="请输入 " />
</van-col>
</van-row>
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field :value="test2.loanTime" label="贷款期限(月)" input-align="right" placeholder="请输入 " />
<van-field v-model="test2.loanTime" label="贷款期限(月)" input-align="right" placeholder="请输入 " />
</van-col>
</van-row>
......@@ -141,7 +141,7 @@
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field :value="test2.loanTime" label="贷款利率(%)" input-align="right" placeholder="请输入 " />
<van-field v-model="test2.loanRate" label="贷款利率(%)" input-align="right" placeholder="请输入 " />
</van-col>
</van-row>
......@@ -158,7 +158,7 @@
<van-row type="flex" class="layoutName">
<van-col span="24">
<van-field style="color: red;" is-link readonly :value="choiceValue" label="还款方式" input-align="right" placeholder="请选择还款方式" @click="showChoices = true"/>
<van-field style="color: red;" is-link readonly :value="test2.repayType" label="还款方式" input-align="right" placeholder="请选择还款方式" @click="showChoices = true"/>
<van-popup v-model="showChoices" round position="bottom">
<van-picker
show-toolbar
......@@ -255,13 +255,13 @@ export default class DepositInterestTrial extends Vue{
"利随本清",
"等额本金",
"等额本息",
"按月结息(到期一次性还本)",
"按季结息(到期一次性还本)",
"按月结息(到期一次性还本)",
"按年结息(到期一次性还本)",
];
onConfirmChoices(choiceValue: string) {
this.choiceValue = choiceValue;
this.test2.repayType = choiceValue;
this.showChoices = false;
}
// timeTypes: any[] = [
......@@ -343,7 +343,10 @@ export default class DepositInterestTrial extends Vue{
countA() {
let result = 0;
result = parseInt(this.test.depositAmt)*parseInt(this.test.yearRate)/100*parseInt(this.test.time=="一年"?"1":this.test.time=="两年"?"2":"3");
if(){
console.log("@@@@"+this.test.depositAmt)
if(this.test.depositAmt==""||this.test.yearRate==""||this.test.time==""){
alert("请输入数据");
}else{
this.$router.push({
name: "CountResultB",
params: {
......@@ -355,27 +358,28 @@ export default class DepositInterestTrial extends Vue{
result: result.toString(),
}
})
}else{
alert("请输入数据");
}
}
countB() {
let result = 0;
result = parseInt(this.test2.loanAmt)*parseInt(this.test2.loanRate)/100*parseInt(this.test2.loanTime)/12;
console.log()
this.$router.push({
name: "CountResult",
params: {
routeName: "aaa",
loanAmt: this.test2.loanAmt,
loanTime: this.test2.loanTime,
planMonthRepay: this.test2.planMonthRepay,
loanRate: this.test2.loanRate,
loanType: this.test2.loanType,
repayType: this.test2.repayType,
result: result.toString(),
}
})
if(this.test2.loanAmt==""||this.test2.loanRate==""||this.test2.loanTime==""){
alert("请输入数据")
}else{
this.$router.push({
name: "CountResult",
params: {
routeName: "aaa",
loanAmt: this.test2.loanAmt,
loanTime: this.test2.loanTime,
planMonthRepay: this.test2.planMonthRepay,
loanRate: this.test2.loanRate,
loanType: this.test2.loanType,
repayType: this.test2.repayType,
result: result.toString(),
}
})
}
}
clearData() {
this.test = new Test();
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册