Commit 205245a3 by kyle

问题修改

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