Commit cda77153 by kyle

改样式,改bug

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