Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfp-program
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sweet Zhang
sfp-program
Commits
3c2ec528
Commit
3c2ec528
authored
Oct 26, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化购房能力测算
parent
e82a8299
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
11 deletions
+46
-11
environments/environment.ts
+1
-1
index.html
+2
-2
pages/childEdu/childEdu.vue
+9
-2
pages/housePurchase/housePurchase.vue
+34
-6
static/images/happy.png
+0
-0
static/images/sad.png
+0
-0
No files found.
environments/environment.ts
View file @
3c2ec528
...
...
@@ -19,7 +19,7 @@ const config = {
stage
,
prod
}
let
env
=
'
dev
'
;
let
env
=
'
stage
'
;
// if (process.env.NODE_ENV === 'development') {
// env = 'dev';
// }else if (process.env.NODE_ENV === 'production') {
...
...
index.html
View file @
3c2ec528
...
...
@@ -17,7 +17,7 @@
<div
id=
"app"
>
<!--app-html-->
</div>
<script
type=
"module"
src=
"/main.js"
></script>
<!-- 移动端调试 -->
<script
type=
"text/javascript"
src=
"//cdn.jsdelivr.net/npm/eruda"
></script>
<script>
eruda
.
init
();
</script>
<
!-- <
script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
-->
</body>
</html>
pages/childEdu/childEdu.vue
View file @
3c2ec528
...
...
@@ -392,9 +392,13 @@
return
flated
;
},
educationEstimate
(){
this
.
flatEduGradeLists
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
objFlat
(
this
.
schoolingLists
)))
this
.
flatEduGradeLists
.
map
((
val
,
idx
)
=>
{
val
[
'educationNo'
]
=
idx
+
1
;
});
// 数据校验
if
(
this
.
eduPlanParam
.
age
&&
this
.
eduPlanParam
.
age
>
50
){
common
.
errorDialog
(
2
,
'子女教育规划一般年龄不会超过40岁'
);
if
(
this
.
eduPlanParam
.
age
&&
(
this
.
eduPlanParam
.
age
>
40
||
this
.
eduPlanParam
.
age
<
0
)
){
common
.
errorDialog
(
2
,
'子女教育规划一般年龄不会
小于0且不
超过40岁'
);
return
false
;
}
else
if
(
this
.
haveAcceptEduFlag
&&
!
this
.
eduPlanParam
.
maxGrade
){
common
.
errorDialog
(
1
,
'为了精准测算,请选择小孩的最高学历'
);
...
...
@@ -408,6 +412,9 @@
}
else
if
(
this
.
getEducationNo
(
this
.
eduPlanParam
.
startPlan
)
>=
this
.
getEducationNo
(
this
.
eduPlanParam
.
endPlan
)){
common
.
errorDialog
(
1
,
'您的规划起始阶段应小于结束阶段'
);
return
false
;
}
else
if
(
this
.
haveAcceptEduFlag
&&
this
.
eduPlanParam
.
maxGrade
>
this
.
eduPlanParam
.
startPlan
){
common
.
errorDialog
(
2
,
'规划开始阶段应大于或等于最高学历'
);
return
false
;
}
else
if
((
!
this
.
eduPlanParam
.
initEducationFund
&&
this
.
eduPlanParam
.
initEducationFund
!=
0
)
||
this
.
eduPlanParam
.
initEducationFund
<
0
){
common
.
errorDialog
(
1
,
'请输入目前您已备教育资金总额'
);
return
false
;
...
...
pages/housePurchase/housePurchase.vue
View file @
3c2ec528
...
...
@@ -96,10 +96,10 @@
/><label
for=
""
>
万元
</label>
</view>
</view>
<view
class=
"inputItem"
>
<view
class=
"inputItem"
style=
"position: relative;"
>
<view>
<view>
年末预备
投入房产资金:
</view>
<view
style=
"
font-size: 26rpx;color: red;letter-spacing: 1px;"
>
(从测算当年开始投入
)
</view>
<view>
每年
投入房产资金:
</view>
<view
style=
"
position: absolute;left: 0;bottom: -1px;font-size: 24rpx;color: red;letter-spacing: 1px;"
>
(从今年末开始投入,用于首付和按揭
)
</view>
</view>
<view
class=
"inputContent"
>
<input
class=
"uni-input"
type=
"digit"
placeholder=
"请输入"
...
...
@@ -164,17 +164,37 @@
<view
style=
"text-align: center;color: #c3c1c1;font-size: 22rpx;"
>
差额 = 可实现的 - 你想要的
</view>
<view
class=
"resultSummaryContent"
>
<view
v-if=
"resultInfos.code == 'B001' || resultInfos.code =='B002'"
style=
"display: flex;align-items: center;"
>
<view
style=
"margin-right: 8rpx;"
>
<img
src=
"../../static/images/happy.png"
alt=
""
srcset=
""
>
</view>
<view>
<view>
恭喜您!
</view>
<view>
您实现买房自由了哦~
</view>
</view>
</view>
<view
v-if=
"resultInfos.code == 'A001' || resultInfos.code =='A002'"
style=
"display: flex;align-items: center;"
>
<view
style=
"margin-right: 8rpx;"
>
<img
src=
"../../static/images/sad.png"
alt=
""
srcset=
""
>
</view>
<view>
<view>
很遗憾!
</view>
<view>
您还不能实现目标,请继续加油哦~
</view>
</view>
</view>
</view>
<view
style=
"background: rgba(36,255,0,3%);padding: 6rpx 10rpx;border-radius: 12rpx;line-height: 1.5;"
>
<view
v-if=
"resultInfos.code == 'A001' || resultInfos.code =='A002'"
style=
"display: flex;"
>
<text
class=
"seriesNo"
>
1
</text>
<view>
如您想实现
<strong>
{{
resultInfos
.
nyear
}}
</strong>
年后在
<strong>
{{
resultInfos
.
provinceName
}}
-
{{
resultInfos
.
cityName
}}
</strong>
地区购买
<strong>
{{
resultInfos
.
preOrderSize
}}
</strong>
㎡的房产,那么您还需要提高首付款到
<strong>
{{
formatFloat
(
resultInfos
.
pvDownPayment
/
10000
,
2
,
1
)
}}
</strong>
万元,或您需提高
年末预备
投入房产资金到
<strong>
{{
formatFloat
(
resultInfos
.
pvDownPayment
/
10000
,
2
,
1
)
}}
</strong>
万元,或您需提高
每年
投入房产资金到
<strong>
{{
formatFloat
(
resultInfos
.
houseSpecialPurpose
/
10000
)
}}
</strong>
万元。
</view>
</view>
<view
style=
"margin-top: 10rpx;display: flex;"
>
<text
class=
"seriesNo"
>
{{
resultInfos
.
code
==
'A001'
||
resultInfos
.
code
==
'A002'
?
'2'
:
'1'
}}
</text>
<view>
根据您的已备首付款和
预备
投入房产资金测算,您在
<strong>
{{
resultInfos
.
nyear
}}
</strong>
年后最高可实现购买房屋单价为
<strong>
{{
formatFloat
(
tipsPrice
/
10000
)
}}
</strong>
万元/㎡,总价为
<strong>
{{
formatFloat
(
tipsTotalPrice
/
10000
)
}}
</strong>
万元的房产。
</view>
<view>
根据您的已备首付款和
每年
投入房产资金测算,您在
<strong>
{{
resultInfos
.
nyear
}}
</strong>
年后最高可实现购买房屋单价为
<strong>
{{
formatFloat
(
tipsPrice
/
10000
)
}}
</strong>
万元/㎡,总价为
<strong>
{{
formatFloat
(
tipsTotalPrice
/
10000
)
}}
</strong>
万元的房产。
</view>
</view>
</view>
...
...
@@ -517,7 +537,7 @@
return
false
;
}
if
(
!
this
.
housePurchaseInfo
.
repaymentSpecial
){
common
.
errorDialog
(
1
,
'请填写
年末预备
投入房产资金'
)
common
.
errorDialog
(
1
,
'请填写
每年
投入房产资金'
)
return
false
;
}
// 规划参数默认值
...
...
@@ -717,6 +737,14 @@
text-align
:
center
;
}
.result_wrapper
{
.resultSummaryContent{
background
:
#FFDBD4
;
border-radius
:
3px
;
padding
:
8px
20px
;
box-shadow
:
3px
1px
4px
0
rgb
(
0
0
0
/
25%
);
margin
:
20px
0
;
font-size
:
18px
;
}
.seriesNo
{
width
:
0
;
height
:
40
rpx
;
...
...
static/images/happy.png
0 → 100644
View file @
3c2ec528
1.65 KB
static/images/sad.png
0 → 100644
View file @
3c2ec528
1.89 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment