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

贷款试算修改

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