计算
@@ -62,19 +70,56 @@ import {Test} from "@/views/DepositInterestTrial/Test";
})
export default class DepositInterestTrial extends Vue{
choices: string[] = ["利随本清","等额本金","等额本息"];
- choice = "";
+ loanTypes: any[] = [
+ {
+ value : "有抵押",
+ label : "有抵押",
+ },{
+ value : "无抵押",
+ label : "无抵押",
+ }
+ ];
+ saveTypes: any[] = [
+ {
+ value : "定期",
+ label : "定期",
+ },{
+ value : "非定期",
+ label : "非定期",
+ }
+ ];
+ timeTypes: any[] = [
+ {
+ value : "定存整取",
+ label : "定存整取",
+ },{
+ value : "零存整取",
+ label : "零存整取",
+ },{
+ value : "整存整取",
+ label : "整存整取",
+ }
+ ];
+ times: any[] = [
+ {
+ value : "1",
+ label : "一年",
+ },{
+ value : "2",
+ label : "两年",
+ },{
+ value : "3",
+ label : "三年",
+ }
+ ];
test2: any = {
loanAmt: "",
loanTime: "",
+ planMonthRepay : "",
loanRate: "",
+ loanType: undefined,
+ repayType: "",
};
- // value1 = 0;
- // option1 = [
- // { text: '请选择还款方式', value: 0 },
- // { text: '利随本清', value: 1 },
- // { text: '等额本金', value: 2 },
- // { text: '等额本息', value: 3 },
- // ]
test: Test = new Test();//测试数据
flag:boolean=true;
flagA=true;
@@ -95,37 +140,32 @@ export default class DepositInterestTrial extends Vue{
}
countA() {
let result = 0;
- let yearA = parseInt(this.test.putDate.substring(0,4));
- let yearB = parseInt(this.test.getDate.substring(0,4));
- let monthA = parseInt(this.test.putDate.substring(4,6));
- let monthB = parseInt(this.test.getDate.substring(4,6));
- let dayA = parseInt(this.test.putDate.substring(6));
- let dayB = parseInt(this.test.getDate.substring(6));
- result = parseInt(this.test.depositAmt)+ parseInt(this.test.depositAmt)*parseInt(this.test.depositRate)*((yearB-yearA)*365+(monthB-monthA)*30+(dayB-dayA))/36500;
- console.log(result);
+ result = parseInt(this.test.depositAmt)*parseInt(this.test.yearRate)/100*parseInt(this.test.time?this.test.time:"0");
this.$router.push({
name: "CountResultB",
params: {
- countResult: result.toString(),
+ saveType: this.test.saveType || "0",
+ timeType: this.test.timeType || "0",
+ time: this.test.time || "0",
+ yearRate: this.test.yearRate,
depositAmt: this.test.depositAmt,
- depositTime: (((yearB-yearA)*365+(monthB-monthA)*30+(dayB-dayA))/30).toString(),
- depositRate: this.test.depositRate,
+ result: result.toString(),
}
})
}
countB() {
let result = 0;
- result = parseInt(this.test2.loanAmt)+parseInt(this.test2.loanAmt)*parseInt(this.test2.loanRate)*parseInt(this.test2.loanTime)/100;
- console.log(result);
- console.log("**********"+JSON.stringify(this.choice));
+ result = parseInt(this.test2.loanAmt)*parseInt(this.test2.loanRate)/100*parseInt(this.test2.loanTime)/12;
this.$router.push({
name: "CountResult",
params: {
- result: result.toString(),
loanAmt: this.test2.loanAmt,
- loanRate: this.test2.loanRate,
loanTime: this.test2.loanTime,
- choice: this.choice,
+ planMonthRepay: this.test2.planMonthRepay,
+ loanRate: this.test2.loanRate,
+ loanType: this.test2.loanType,
+ repayType: this.test2.repayType,
+ result: result.toString(),
}
})
}
@@ -133,7 +173,12 @@ export default class DepositInterestTrial extends Vue{
this.test = new Test();
}
handleChoiceChange(value:any) {
- this.choice = value;
+ this.test2.repayType = value;
+ }
+ toDepositRate() {
+ this.$router.push({
+ name: "DepositRate"
+ });
}
}
diff --git a/src/views/DepositInterestTrial/DepositRate.vue b/src/views/DepositInterestTrial/DepositRate.vue
new file mode 100644
index 0000000000000000000000000000000000000000..92e323340e14f7b14e70ceb1c221ac238eaf8d06
--- /dev/null
+++ b/src/views/DepositInterestTrial/DepositRate.vue
@@ -0,0 +1,107 @@
+/**
+* @Author wangliang
+* @date 20220825
+*/
+
+
+
+
+
+
+
+ 项目
+ 年利率(%)
+
+
+
+ 一、城乡居民及单位存款
+
+
+
+ (一) 活期
+ 0.3
+
+
+
+
+ (一) 定期
+
+
+
+
+ 1.整存整取
+
+
+
+
+ 三个月
+ 1.35
+
+
+
+
+ 半年
+ 1.55
+
+
+
+
+ 一年
+ 1.75
+
+
+
+
+ 两年
+ 2.25
+
+
+
+
+ 三年
+ 2.75
+
+
+
+
+ 五年
+ 2.75
+
+
+
+ 2.零存整取、整存零取、存本取息
+
+
+
+ 一年
+ 1.35
+
+
+
+
+ 三年
+ 1.55
+
+
+
+
+ 五年
+ 1.55
+
+
+
+
+
+
+
+
diff --git a/src/views/DepositInterestTrial/RepayPlan.vue b/src/views/DepositInterestTrial/RepayPlan.vue
new file mode 100644
index 0000000000000000000000000000000000000000..5246759c9cb81a73cfbcfedac0d39f6491bcfd6d
--- /dev/null
+++ b/src/views/DepositInterestTrial/RepayPlan.vue
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/DepositInterestTrial/Test.ts b/src/views/DepositInterestTrial/Test.ts
index d170bb979b41dd976f9263d022819cd3bee519cf..8b6ea4b565b42fa323fce6230b0f39da98f57be7 100644
--- a/src/views/DepositInterestTrial/Test.ts
+++ b/src/views/DepositInterestTrial/Test.ts
@@ -1,19 +1,28 @@
export class Test {
- depositAmt: string;
- depositRate: string;
+ depositAmt: string; //存款金额
+ yearRate: string;
putDate: string;
getDate: string;
+ saveType: string | undefined;
+ timeType: string | undefined;
+ time: string | undefined;
constructor(
options: {
depositAmt?: string;
- depositRate?: string;
+ yearRate?: string;
putDate?: string;
getDate?: string;
+ saveType?: string | undefined;
+ timeType?: string | undefined;
+ time?: string | undefined;
} = {}
) {
this.depositAmt = options.depositAmt || "";
- this.depositRate = options.depositRate || "";
+ this.yearRate = options.yearRate || "";
this.putDate = options.putDate || "";
this.getDate = options.getDate || "";
+ this.saveType = options.saveType;
+ this.timeType = options.timeType;
+ this.time = options.time;
}
}
diff --git a/src/views/MyView/MyPage.vue b/src/views/MyView/MyPage.vue
index 14c592cf6009c89685244f3fa6b408eb4d176778..7edc9d09c39d6f93544116a8b897cdb89750dd5c 100644
--- a/src/views/MyView/MyPage.vue
+++ b/src/views/MyView/MyPage.vue
@@ -12,6 +12,18 @@