Commit cda77153 by kyle

改样式,改bug

parent 205245a3
...@@ -154,13 +154,14 @@ ...@@ -154,13 +154,14 @@
<view style="text-align: center;color: #c3c1c1;font-size: 22rpx;"> <view style="text-align: center;color: #c3c1c1;font-size: 22rpx;">
差额 = 可实现的 - 你想要的 差额 = 可实现的 - 你想要的
</view> </view>
<view style="background: rgba(36,255,0,3%);padding: 6rpx 10rpx;border-radius: 12rpx;"> <view style="background: rgba(36,255,0,3%);padding: 6rpx 10rpx;border-radius: 12rpx;line-height: 1.5;">
<view v-show="resultInfos.code == 'A001' || resultInfos.code =='A002'"> <view v-show="resultInfos.code == 'A001' || resultInfos.code =='A002'" style="display: flex;">
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>万元。 <text class="seriesNo">1</text>
<view>如您想实现<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> </view>
<view style="margin-top: 10rpx;"> <view style="margin-top: 10rpx;display: flex;">
{{resultInfos.code == 'A001' || resultInfos.code =='A002'?'2':'1'}}. <text class="seriesNo">{{resultInfos.code == 'A001' || resultInfos.code =='A002'?'2':'1'}}</text>
根据您的已备首付款和每年预备还房贷资金总额,您在<strong>{{resultInfos.nyear}}</strong>年后可实现购买房屋单价为<strong>{{(tipsPrice/10000).toFixed(2)}}</strong>万元/㎡,总价为<strong>{{(tipsTotalPrice/10000).toFixed(2)}}</strong>万元的房产。 <view>根据您的已备首付款和预备投入房产资金测算,您在<strong>{{resultInfos.nyear}}</strong>年后最高可实现购买房屋单价为<strong>{{(tipsPrice/10000).toFixed(2)}}</strong>万元/㎡,总价为<strong>{{(tipsTotalPrice/10000).toFixed(2)}}</strong>万元的房产。</view>
</view> </view>
</view> </view>
...@@ -188,7 +189,7 @@ ...@@ -188,7 +189,7 @@
</view> </view>
</view> </view>
<view class="line_bottom" v-show="houseItem.fvDifference <= 0"> <view class="line_bottom" v-show="houseItem.fvDifference <= 0">
<strong style="font-size: 36rpx;">恭喜您</strong>!经过测算,您的{{getResultTitle(houseItem.priceType)}}已超出目标值{{Math.abs(houseItem.fvDifference/10000).toFixed(2)}}万元,{{resultInfos.nyear}}年后可以达成您的目标. <strong style="font-size: 36rpx;">恭喜您</strong>!经过测算,您的{{getResultTitle(houseItem.priceType)}}已超出目标值{{Math.abs((houseItem.fvPriceRealization/10000).toFixed(2)-(houseItem.fvPriceDesired/10000).toFixed(2)).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">
<strong style="font-size: 36rpx;">很遗憾!</strong> <strong style="font-size: 36rpx;">很遗憾!</strong>
...@@ -298,14 +299,19 @@ ...@@ -298,14 +299,19 @@
}else{ }else{
this.cityInfo['area'] = '3' this.cityInfo['area'] = '3'
} }
this.planningParams = {
...this.planningParams,
downPaymentMin: this.housePurchaseInfo.downPaymentMin
}
}, },
getFollowData(e){ getFollowData(e){
this.isNeedOfficialAccountQrcode= ref(e); this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e);
}, },
getPlanParams(e){ getPlanParams(e){
console.log('规划参数子组件传过来的====',e) console.log('规划参数子组件传过来的====',e)
this.planningParams = e; this.planningParams = e;
this.housePurchaseInfo.downPaymentMin = this.planningParams['downPaymentMin'];
this.housePurchaseInfo.cityId = this.planningParams['cityId']
// 从规划参数弹窗获取数据 // 从规划参数弹窗获取数据
this.closeBtn() this.closeBtn()
}, },
...@@ -317,21 +323,21 @@ ...@@ -317,21 +323,21 @@
this.accumulationFundParams = this.dataLists.a; this.accumulationFundParams = this.dataLists.a;
this.commercialLoansParams = this.dataLists.b; this.commercialLoansParams = this.dataLists.b;
this.dialogIsShow = false; this.dialogIsShow = false;
console.log('父组件拿到值了',e); // console.log('父组件拿到公积金贷款的值了',this.accumulationFundParams);
console.log('父组件拿到公积金贷款的值了',this.accumulationFundParams); // console.log('父组件拿到商业贷款值了',this.commercialLoansParams);
console.log('父组件拿到商业贷款值了',this.commercialLoansParams);
this.houseLoanOldList = this.dataLists.c; this.houseLoanOldList = this.dataLists.c;
console.log(this.houseLoanOldList) // console.log(this.houseLoanOldList)
}, },
onchange(e) { onchange(e) {
const value = e.detail.value; const value = e.detail.value;
this.queryCommercialHousingPrice();
}, },
onnodeclick(node) { onnodeclick(node) {
this.cityInfo = { this.cityInfo = {
cityId: node.value, cityId: node.parent_value ? node.value : null,
provinceId:node.parent_value ? node.parent_value : null, provinceId:node.parent_value ? node.parent_value : node.value,
} }
this.queryCommercialHousingPrice();
}, },
drawLine() { drawLine() {
this.downPaymentList = this.totalLoanList = []; this.downPaymentList = this.totalLoanList = [];
...@@ -365,22 +371,29 @@ ...@@ -365,22 +371,29 @@
series: [ series: [
{ {
name:'首付款', name:'首付款',
data: this.downPaymentList, data: this.downPaymentList.map(item=>(item/10000).toFixed(2)),
type: 'bar', type: 'bar',
stack: 'x' stack: 'x',
label:{
show:true,
position:'inside'
}
}, },
{ {
name:'总贷款金额', name:'总贷款金额',
data: this.totalLoanList, data: this.totalLoanList.map(item=>(item/10000).toFixed(2)),
type: 'bar', type: 'bar',
stack: 'x' stack: 'x',
label:{
show:true,
position:'top'
}
} }
] ]
}); });
}, },
provCityQry(){ provCityQry(){
api.provCityQry({insurerId:888}).then((res)=>{ api.provCityQry({insurerId:888}).then((res)=>{
console.log(res)
if(res['success']){ if(res['success']){
this.provinceList = common.action(res['data']['provinces']); this.provinceList = common.action(res['data']['provinces']);
} }
...@@ -465,7 +478,7 @@ ...@@ -465,7 +478,7 @@
})[0]['fvPriceRealization']; })[0]['fvPriceRealization'];
this.tipsTotalPrice = this.housePurchasePrices.filter((item)=>{ this.tipsTotalPrice = this.housePurchasePrices.filter((item)=>{
return item.priceType == 1; return item.priceType == 1;
})[0]['fvPriceDesired']; })[0]['fvPriceRealization'];
} }
setTimeout(()=>{this.drawLine()}); setTimeout(()=>{this.drawLine()});
}else{ }else{
...@@ -474,7 +487,6 @@ ...@@ -474,7 +487,6 @@
}) })
}, },
onchange(e) { onchange(e) {
console.log(e)
const value = e.detail.value; const value = e.detail.value;
if(value.length>0){ if(value.length>0){
this.housePurchaseInfo.provinceName = value[0]['text']; this.housePurchaseInfo.provinceName = value[0]['text'];
...@@ -495,6 +507,7 @@ ...@@ -495,6 +507,7 @@
this.isDisplace = !this.isDisplace; this.isDisplace = !this.isDisplace;
if(this.isDisplace){ if(this.isDisplace){
this.isLoanSelected = this.dialogIsShow = true; this.isLoanSelected = this.dialogIsShow = true;
this.paramsSelected = false;
}else{ }else{
this.dataLists = null; this.dataLists = null;
} }
...@@ -623,6 +636,19 @@ ...@@ -623,6 +636,19 @@
text-align: center; text-align: center;
} }
.result_wrapper{ .result_wrapper{
.seriesNo{
width: 0;
height: 40rpx;
border-radius: 50%;
background: #f07006;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
flex: 0 0 40rpx;
margin-right: 10rpx;
margin-top: 8rpx;
}
.line{ .line{
border-radius: 10rpx; border-radius: 10rpx;
box-shadow: 0 0 5px #969696; box-shadow: 0 0 5px #969696;
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
<uni-data-picker v-model="cityId" :localdata="provinceList" popup-title="请选择城市" @change="onchange" @nodeclick="onnodeclick"></uni-data-picker> <uni-data-picker v-model="cityId" :localdata="provinceList" popup-title="请选择城市" @change="onchange" @nodeclick="onnodeclick"></uni-data-picker>
</view> </view>
</div> </div>
<div v-if="item.remark">
<view>
<text style="font-size: 24rpx;color: #c0c4cc;">{{item.remark}}</text>
</view>
</div>
</div> </div>
</li> </li>
</template> </template>
...@@ -41,7 +46,7 @@ ...@@ -41,7 +46,7 @@
{id:'02',name:'房屋折旧率',value:2,type:'number',remark:'',alias:'houseDepreciationRate',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:'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:'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:'06',name:'投入资金增长率',value:0,type:'number',remark:'"年末预备投入房产资金"将会按照该设定值进行增长型测算',alias:'incomeRate',isShow:true},
{id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate',isShow:true} {id:'07',name:'可接受本金损失',value:10,type:'number',remark:'',alias:'acceptableLossRate',isShow:true}
], ],
editParamLists:[], editParamLists:[],
...@@ -57,8 +62,7 @@ ...@@ -57,8 +62,7 @@
}, },
setup(props,content){ setup(props,content){
const cityInfo = props.cityInfo ? props.cityInfo : null; const cityInfo = props.cityInfo ? props.cityInfo : null;
const planningParams = props.planningParams ? props.planningParams : null; const planningParams = props.planningParams ? toRefs(props.planningParams) : null;
console.log('=====',planningParams)
const sendData = (e) =>{ const sendData = (e) =>{
content.emit('getData',e); content.emit('getData',e);
} }
...@@ -93,7 +97,8 @@ ...@@ -93,7 +97,8 @@
downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位) downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位)
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),//可接受本金损失率,
cityId:this.cityInfo.cityId
} }
this.sendData(params) this.sendData(params)
}, },
...@@ -110,21 +115,22 @@ ...@@ -110,21 +115,22 @@
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(result[item.alias]){
if(item.alias !== 'downPaymentMin'){ item.value = result['downPaymentMin'].value;
if(result[item.alias] && result[item.alias].value){ console.log(item.value)
item.value = result[item.alias].value * 100 // 首付成数不需要换算
if(item.alias !== 'downPaymentMin'){
if(result[item.alias].value){
item.value = result[item.alias].value * 100
}
} }
} }
}) })
} }
this.provCityQry(); this.provCityQry();
this.cityId = this.cityInfo.cityId; this.cityId = this.cityInfo.cityId;
// this.queryCommercialHousingPrice() this.queryCommercialHousingPrice()
} }
} }
</script> </script>
......
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