Commit 205245a3 by kyle

问题修改

parent 9a9a52d8
......@@ -97,11 +97,14 @@
</view>
</view>
<view class="inputItem">
<text>年预备还房贷资金总额:</text>
<view>
<view>年末预备投入房产资金:</view>
<view style="font-size: 26rpx;color: red;letter-spacing: 1px;">(从测算当年开始投入)</view>
</view>
<view class="inputContent">
<input class="uni-input" type="digit" placeholder="请输入"
v-model="housePurchaseInfo.repaymentSpecial"
/><label for="">万元</label>
/><label for="">万元/年</label>
</view>
</view>
</view>
......@@ -147,18 +150,21 @@
测算结果及建议
</view>
</view>
<view id="myEcharts" style="height: 500rpx;"></view>
<view style="text-align: center;margin-bottom: 30rpx;color: #c3c1c1;font-size: 22rpx;">
<view id="myEcharts" style="height: 430rpx;"></view>
<view style="text-align: center;color: #c3c1c1;font-size: 22rpx;">
差额 = 可实现的 - 你想要的
</view>
<view style="background: rgba(36,255,0,3%);padding: 6rpx 10rpx;border-radius: 12rpx;">
<view v-show="resultInfos.code == 'A001' || resultInfos.code =='A002'">
1.如您想实现{{resultInfos.nyear}}年后在{{resultInfos.provinceName}}-{{resultInfos.cityName}}地区购买{{resultInfos.preOrderSize}}㎡的房产,那么您还需要提高首付款到{{numberConverter(resultInfos.pvDownPayment)}}元,或您需提高每年预备还房贷资金总额到{{numberConverter(resultInfos.houseSpecialPurpose)}}元。
1.如您想实现<strong>{{resultInfos.nyear}}</strong>年后在<strong>{{resultInfos.provinceName}}-{{resultInfos.cityName}}</strong>地区购买<strong>{{resultInfos.preOrderSize}}</strong>㎡的房产,那么您还需要提高首付款到<strong>{{(resultInfos.pvDownPayment/10000).toFixed(2)}}</strong>万元,或您需提高每年预备还房贷资金总额到<strong>{{(resultInfos.houseSpecialPurpose/10000).toFixed(2)}}</strong>元。
</view>
<view style="margin-top: 10rpx;">
{{resultInfos.code == 'A001' || resultInfos.code =='A002'?'2':'1'}}.
根据您的已备首付款和每年预备还房贷资金总额,您在{{resultInfos.nyear}}年后可实现购买房屋单价为{{numberConverter(tipsPrice)}}元/㎡,总价为{{numberConverter(tipsTotalPrice)}}元的房产。
根据您的已备首付款和每年预备还房贷资金总额,您在<strong>{{resultInfos.nyear}}</strong>年后可实现购买房屋单价为<strong>{{(tipsPrice/10000).toFixed(2)}}</strong>万元/㎡,总价为<strong>{{(tipsTotalPrice/10000).toFixed(2)}}</strong>元的房产。
</view>
</view>
</view>
<view class="line" v-for="houseItem in housePurchasePrices">
<view class="line_title">{{getResultTitle(houseItem.priceType)}}
<img src="../../static/images/can.png" alt="" v-show="houseItem.fvDifference <= 0">
......@@ -167,7 +173,7 @@
<view class="content">
<view class="left">
<view class="realizable">可实现的</view>
<view>{{housePurchaseInfo.nyear}}年后:{{numberConverter(houseItem.fvPriceRealization)}}</view>
<view>{{housePurchaseInfo.nyear}}年后:{{(houseItem.fvPriceRealization/10000).toFixed(2)}}</view>
<!-- <view class="now">
现值:{{numberConverter(houseItem.pvPriceRealization)}}
</view> -->
......@@ -175,18 +181,18 @@
<img src="../../static/images/vs.png" alt="">
<view class="right">
<view class="realizable">你想要的</view>
<view>{{housePurchaseInfo.nyear}}年后:{{numberConverter(houseItem.fvPriceDesired)}}</view>
<view>{{housePurchaseInfo.nyear}}年后:{{(houseItem.fvPriceDesired/10000).toFixed(2)}}</view>
<!-- <view class="now">
现值:{{numberConverter(houseItem.pvPriceDesired)}}
</view> -->
</view>
</view>
<view class="line_bottom" v-show="houseItem.fvDifference <= 0">
<text style="font-size: 36rpx;">恭喜您</text>!经过测算,您的{{getResultTitle(houseItem.priceType)}}已超出目标值{{numberConverter(Math.abs(houseItem.fvDifference))}}元,{{resultInfos.nyear}}年后可以达成您的目标.
<strong style="font-size: 36rpx;">恭喜您</strong>!经过测算,您的{{getResultTitle(houseItem.priceType)}}已超出目标值{{Math.abs(houseItem.fvDifference/10000).toFixed(2)}}元,{{resultInfos.nyear}}年后可以达成您的目标.
</view>
<view class="line_bottom fail" v-show="houseItem.fvDifference > 0">
<text style="font-size: 36rpx;">很遗憾!</text>
经过测算,距离实现您的{{getResultTitle(houseItem.priceType)}}目标还差{{numberConverter(Math.abs(houseItem.fvDifference))}}元。您可以参考我们给出的建议进行调整。
<strong style="font-size: 36rpx;">很遗憾!</strong>
经过测算,距离实现您的{{getResultTitle(houseItem.priceType)}}目标还差{{Math.abs(houseItem.fvDifference/10000).toFixed(2)}}元。您可以参考我们给出的建议进行调整。
</view>
</view>
</view>
......@@ -435,8 +441,7 @@
downPaymentMin: 30,
houseDepreciationRate: 0.02,
housePriceGrowthRate: 0.0625,
incomeRate: 0.03,
interestRate: 0.049,
incomeRate: 0,
tnvestmentRate: 0.0374
}
const param = {
......@@ -524,7 +529,7 @@
}
api.queryCommercialHousingPrice(this.cityInfo).then(res=>{
if(res['success']){
this.planningParams.housePriceGrowthRate = res['data']['priceInfo']['rateB'] / 100;
this.planningParams.housePriceGrowthRate=res['data']['priceInfo']['rateB'] / 100;
}
})
},
......@@ -654,6 +659,7 @@
align-items: center;
width: 48%;
box-shadow: 0 1px 1px #969696;
padding-bottom: 20rpx;
view {
margin: 10rpx;
}
......
......@@ -2,7 +2,8 @@
<div class="paramsContainer">
<h5>规划参数<span>(点击参数值即可修改参数)</span></h5>
<ul>
<li v-for="item in editParamLists" :key="item.id">
<template v-for="item in editParamLists">
<li :key="item.id" v-if="item.isShow">
<div class="paramName">{{item.name}}</div>
<div class="paramValue">
<input class="uni-input" type="digit" min='1' maxlength="17" placeholder="" v-model.trim="item.value"/>
......@@ -16,6 +17,7 @@
</div>
</div>
</li>
</template>
</ul>
<div class="optionContent">
<div class="confirm"><span @click="confirmParams()">确定</span></div>
......@@ -35,13 +37,12 @@
return {
cityId:null,
paramsLists:[
{id:'01',name:'房价增长率',value:6.25,type:'data-picker',remark:'',alias:'housePriceGrowthRate' },
{id:'02',name:'房屋折旧率',value:2,type:'number',remark:'',alias:'houseDepreciationRate'},
{id:'03',name:'首付款最低成数',value:30,type:'number',remark:'',alias:'downPaymentMin'},
{id:'04',name:'贷款年利率',value:4.9,type:'number',remark:'',alias:'interestRate'},
{id:'05',name:'资产投资回报率',value:3.74,type:'number',remark:'',alias:'tnvestmentRate'},
{id:'06',name:'收入增长率',value:3,type:'number',remark:'国家统计局2022年第二季度数据显示全国居民人均可支配收入增长率为3.0%',alias:'incomeRate'},
{id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate'}
{id:'01',name:'房价增长率',value:6.25,type:'data-picker',remark:'',alias:'housePriceGrowthRate',isShow:true },
{id:'02',name:'房屋折旧率',value:2,type:'number',remark:'',alias:'houseDepreciationRate',isShow:true},
{id:'03',name:'首付款最低成数',value:30,type:'number',remark:'',alias:'downPaymentMin',isShow:true},
{id:'05',name:'资产投资回报率',value:3.74,type:'number',remark:'',alias:'tnvestmentRate',isShow:true},
{id:'06',name:'收入增长率',value:0,type:'number',remark:'此处设定值,那么年预备还房贷资金总额将会按照收入增长率投入',alias:'incomeRate',isShow:false},
{id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate',isShow:true}
],
editParamLists:[],
provinceList:[],
......@@ -56,7 +57,8 @@
},
setup(props,content){
const cityInfo = props.cityInfo ? props.cityInfo : null;
const planningParams = props.planningParams ? toRefs(props.planningParams) : null;
const planningParams = props.planningParams ? props.planningParams : null;
console.log('=====',planningParams)
const sendData = (e) =>{
content.emit('getData',e);
}
......@@ -89,7 +91,6 @@
housePriceGrowthRate:(this.editParamLists.filter(item=>item.alias==='housePriceGrowthRate')[0].value / 100).toFixed(4),//房价增长率
houseDepreciationRate:(this.editParamLists.filter(item=>item.alias==='houseDepreciationRate')[0].value / 100).toFixed(4),//房屋折旧率
downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位)
interestRate:(this.editParamLists.filter(item=>item.alias==='interestRate')[0].value / 100).toFixed(4), //贷款年利率
tnvestmentRate:(this.editParamLists.filter(item=>item.alias==='tnvestmentRate')[0].value / 100).toFixed(4),//投资回报率
incomeRate:(this.editParamLists.filter(item=>item.alias==='incomeRate')[0].value / 100).toFixed(4),//收入增长率
acceptableLossRate:(this.editParamLists.filter(item=>item.alias==='acceptableLossRate')[0].value / 100).toFixed(4),//可接受本金损失率
......@@ -109,11 +110,15 @@
this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists));
if(!(JSON.stringify(this.planningParams) == '{}')){
const result = this.planningParams;
console.log(result);
console.log(this.editParamLists);
this.editParamLists.map(item=>{
// 首付款不需要换算
if(item.alias !== 'downPaymentMin'){
if(result[item.alias] && result[item.alias].value){
item.value = result[item.alias].value * 100
}
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment