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

试算修改

上级 bcd6808a
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<van-row type="flex" class="layoutName"> <van-row type="flex" class="layoutName">
<van-col span="24"> <van-col span="24">
<van-field is-link readonly :value="this.typeValue" label="储蓄方式" input-align="right" placeholder="请选择储蓄方式" @click="showTypes = true" /> <!-- <van-field is-link readonly :value="this.typeValue" label="储蓄方式" input-align="right" placeholder="请选择储蓄方式" @click="showTypes = true" />-->
<van-field is-link readonly :value="test.saveType" label="储蓄方式" input-align="right" placeholder="请选择储蓄方式" @click="showTypes = true" />
<van-popup v-model="showTypes" round position="bottom"> <van-popup v-model="showTypes" round position="bottom">
<van-picker <van-picker
show-toolbar show-toolbar
...@@ -52,7 +53,8 @@ ...@@ -52,7 +53,8 @@
<van-row type="flex" class="layoutName"> <van-row type="flex" class="layoutName">
<van-col span="24"> <van-col span="24">
<van-field is-link readonly :value="timeTypeValue" label="定期类型" input-align="right" placeholder="请选择定期类型" @click="showTimeTypes = true"/> <!-- <van-field is-link readonly :value="timeTypeValue" label="定期类型" input-align="right" placeholder="请选择定期类型" @click="showTimeTypes = true"/>-->
<van-field is-link readonly :value="test.timeType" label="定期类型" input-align="right" placeholder="请选择定期类型" @click="showTimeTypes = true"/>
<van-popup v-model="showTimeTypes" round position="bottom"> <van-popup v-model="showTimeTypes" round position="bottom">
<van-picker <van-picker
show-toolbar show-toolbar
...@@ -75,7 +77,8 @@ ...@@ -75,7 +77,8 @@
<van-row type="flex" class="layoutName"> <van-row type="flex" class="layoutName">
<van-col span="24"> <van-col span="24">
<van-field is-link readonly :value="timeValue" label="期限" input-align="right" placeholder="请选择期限" @click="showTimes = true"/> <!-- <van-field is-link readonly :value="timeValue" label="期限" input-align="right" placeholder="请选择期限" @click="showTimes = true"/>-->
<van-field is-link readonly :value="test.time" label="期限" input-align="right" placeholder="请选择期限" @click="showTimes = true"/>
<van-popup v-model="showTimes" round position="bottom"> <van-popup v-model="showTimes" round position="bottom">
<van-picker <van-picker
show-toolbar show-toolbar
...@@ -176,7 +179,7 @@ export default class DepositInterestTrial extends Vue{ ...@@ -176,7 +179,7 @@ export default class DepositInterestTrial extends Vue{
]; ];
onConfirmTypes(typeValue: string) { onConfirmTypes(typeValue: string) {
this.typeValue = typeValue; this.test.saveType = typeValue;
this.showTypes = false; this.showTypes = false;
} }
// choices: any[] = [ // choices: any[] = [
...@@ -234,14 +237,11 @@ export default class DepositInterestTrial extends Vue{ ...@@ -234,14 +237,11 @@ export default class DepositInterestTrial extends Vue{
showTimeTypes:any=false; showTimeTypes:any=false;
timeTypes: any[] = [ timeTypes: any[] = [
"定存整取", "定存整取",
"定存整取",
"零存整取",
"零存整取", "零存整取",
"整存整取", "整存整取",
"整存整取",
]; ];
onConfirmTimeTypes(timeTypeValue: string) { onConfirmTimeTypes(timeTypeValue: string) {
this.timeTypeValue = timeTypeValue; this.test.timeType = timeTypeValue;
this.showTimeTypes = false; this.showTimeTypes = false;
} }
...@@ -268,7 +268,7 @@ export default class DepositInterestTrial extends Vue{ ...@@ -268,7 +268,7 @@ export default class DepositInterestTrial extends Vue{
onConfirmTimes(timeValue: string) { onConfirmTimes(timeValue: string) {
this.timeValue = timeValue; this.test.time = timeValue;
this.showTimes = false; this.showTimes = false;
} }
test2: any = { test2: any = {
...@@ -299,22 +299,27 @@ export default class DepositInterestTrial extends Vue{ ...@@ -299,22 +299,27 @@ 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?this.test.time:"0"); result = parseInt(this.test.depositAmt)*parseInt(this.test.yearRate)/100*parseInt(this.test.time=="一年"?"1":this.test.time=="两年"?"2":"3");
if(){
this.$router.push({ this.$router.push({
name: "CountResultB", name: "CountResultB",
params: { params: {
saveType: this.test.saveType || "0", saveType: this.test.saveType || "0",
timeType: this.test.timeType || "0", timeType: this.test.timeType || "0",
time: this.test.time || "0", time: this.test.time=="一年"?"1":this.test.time=="两年"?"2":"3",
yearRate: this.test.yearRate, yearRate: this.test.yearRate,
depositAmt: this.test.depositAmt, depositAmt: this.test.depositAmt,
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()
this.$router.push({ this.$router.push({
name: "CountResult", name: "CountResult",
params: { params: {
......
...@@ -149,7 +149,7 @@ export default class LoginView extends Vue { ...@@ -149,7 +149,7 @@ export default class LoginView extends Vue {
} }
//手机号 //手机号
verifyPhone(s:string) { verifyPhone(s:string) {
return /^1[3-9]\d{9}$/.test(s) // 返回true或false return /^(13[0-9]|14[01,4-9]|15[0-3,5-9]|16[5-7]|17[0135678]|18[0-9]|19[189])\d{8}$/.test(s) // 返回true或false
} }
//获取图形验证码 //获取图形验证码
_updatePicCode() { _updatePicCode() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册