Commit db5f4d68 by Chao Sun

二维码关注

parents b075f12b 0e335c28
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<script> <script>
export default{ export default{
data(){ data(){
return{}
}, },
name:'foot', name:'foot',
components:{ components:{
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<script> <script>
export default{ export default{
data(){ data(){
return{}
}, },
name:'head', name:'commonHead',
components:{ components:{
}, },
onLoad(){ onLoad(){
......
<template> <template>
<follow :redirectUrl="'/pages/housePurchase/housePurchase'" @getFollowData="getFollowData"></follow> <follow :redirectUrl="'sfp/pages/housePurchase/housePurchase'" @getFollowData="getFollowData"></follow>
<view class="wrapper" v-show="!isNeedOfficialAccountQrcode"> <view class="wrapper" v-show="!isNeedOfficialAccountQrcode">
<view class="banner"> <view class="banner">
<!--头部技术支持组件--> <!--头部技术支持组件-->
<head></head> <commonHead></commonHead>
<img src="../../static/images/banner.png" alt="banner" srcset=""> <img src="../../static/images/banner.png" alt="banner" srcset="">
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<text>新房贷款年利率:</text> <text>新房贷款年利率:</text>
<view class="inputContent"> <view class="inputContent">
<input class="uni-input" type="number" placeholder="请输入" <input class="uni-input" type="number" placeholder="请输入"
maxlength="3" v-model="housePurchaseInfo.interestRate" maxlength="4" v-model="housePurchaseInfo.interestRate"
/><label for="">%</label> /><label for="">%</label>
</view> </view>
</view> </view>
...@@ -107,9 +107,12 @@ ...@@ -107,9 +107,12 @@
<!--房屋置换--> <!--房屋置换-->
<view class="houseInfo"> <view class="houseInfo">
<view class="title"> <view class="title">
<view class="radioButton" :class="{'selected':isDisplace }" <view style="display: flex;">
@click="openLoan()"></view> <view class="radioButton" :class="{'selected':isDisplace }"
<text style="margin-left: 10rpx;">是否置换旧房</text> @click="openLoan()"></view>
<text style="margin-left: 10rpx;">是否置换旧房</text>
</view>
<view class="editParam" v-if="dataLists" @click="editParams()">修改参数</view>
</view> </view>
<view v-if="dataLists"> <view v-if="dataLists">
<loanBalance :isReadonly="true" :a="accumulationFundParams" :b="commercialLoansParams" @getData="getData"></loanBalance> <loanBalance :isReadonly="true" :a="accumulationFundParams" :b="commercialLoansParams" @getData="getData"></loanBalance>
...@@ -135,8 +138,8 @@ ...@@ -135,8 +138,8 @@
class="btn" @click="startCount()">开始计算</button> class="btn" @click="startCount()">开始计算</button>
</view> </view>
</form> </form>
<!--测算结果--> <!--测算结果-- v-show="resultFlag"-->
<view class="result_wrapper" v-show="resultFlag"> <view class="result_wrapper">
<view class="suggestInfo"> <view class="suggestInfo">
<view class="title"> <view class="title">
<view> <view>
...@@ -193,9 +196,9 @@ ...@@ -193,9 +196,9 @@
<svg t="1663922894848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2545" width="26" height="26"><path d="M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z" p-id="2546"></path></svg> <svg t="1663922894848" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2545" width="26" height="26"><path d="M557.311759 513.248864l265.280473-263.904314c12.54369-12.480043 12.607338-32.704421 0.127295-45.248112-12.512727-12.576374-32.704421-12.607338-45.248112-0.127295L512.127295 467.904421 249.088241 204.063755c-12.447359-12.480043-32.704421-12.54369-45.248112-0.063647-12.512727 12.480043-12.54369 32.735385-0.063647 45.280796l262.975407 263.775299-265.151458 263.744335c-12.54369 12.480043-12.607338 32.704421-0.127295 45.248112 6.239161 6.271845 14.463432 9.440452 22.687703 9.440452 8.160624 0 16.319527-3.103239 22.560409-9.311437l265.216826-263.807983 265.440452 266.240344c6.239161 6.271845 14.432469 9.407768 22.65674 9.407768 8.191587 0 16.352211-3.135923 22.591372-9.34412 12.512727-12.480043 12.54369-32.704421 0.063647-45.248112L557.311759 513.248864z" p-id="2546"></path></svg>
</div> </div>
<!--旧房贷款余额组件--> <!--旧房贷款余额组件-->
<loanBalance v-if="isLoanSelected" :loanType="1" @getData="getData"></loanBalance> <loanBalance v-if="isLoanSelected" :a="accumulationFundParams" :b="commercialLoansParams" :loanType="1" @getData="getData"></loanBalance>
<!--规划参数组件--> <!--规划参数组件-->
<planningParameters v-if="paramsSelected"></planningParameters> <planningParameters v-if="paramsSelected" @getData="getPlanParams"></planningParameters>
</view> </view>
</view> </view>
</template> </template>
...@@ -204,7 +207,7 @@ ...@@ -204,7 +207,7 @@
import {toRefs,ref} from "vue"; import {toRefs,ref} from "vue";
import loanBalance from './loanBalance.vue'; import loanBalance from './loanBalance.vue';
import planningParameters from './planningParameters.vue'; import planningParameters from './planningParameters.vue';
import head from '../header/header.vue'; import commonHead from '../header/header.vue';
import foot from '../footer/footer.vue'; import foot from '../footer/footer.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import api from '../../api/api'; import api from '../../api/api';
...@@ -215,6 +218,7 @@ ...@@ -215,6 +218,7 @@
export default{ export default{
data(){ data(){
return{ return{
isEditFlag:false,
dataLists:null, dataLists:null,
dialogIsShow:false,//弹窗显示与隐藏 dialogIsShow:false,//弹窗显示与隐藏
isDisplace:false, isDisplace:false,
...@@ -265,9 +269,9 @@ ...@@ -265,9 +269,9 @@
components:{ components:{
loanBalance, loanBalance,
planningParameters, planningParameters,
head,
foot, foot,
follow follow,
commonHead,
}, },
onLoad(){ onLoad(){
this.provCityQry(); this.provCityQry();
...@@ -277,6 +281,14 @@ ...@@ -277,6 +281,14 @@
this.isNeedOfficialAccountQrcode= ref(e); this.isNeedOfficialAccountQrcode= ref(e);
console.log('父组件拿到值了',e); console.log('父组件拿到值了',e);
}, },
getPlanParams(e){
console.log(e)
// 从规划参数弹窗获取数据
this.closeBtn()
},
editParams(){
this.dialogIsShow = this.isEditFlag = true;
},
getData(e){ getData(e){
this.dataLists = toRefs(e); this.dataLists = toRefs(e);
this.accumulationFundParams = this.dataLists.a; this.accumulationFundParams = this.dataLists.a;
...@@ -309,7 +321,7 @@ ...@@ -309,7 +321,7 @@
} }
this.myChart.setOption({ this.myChart.setOption({
legend: { legend: {
data: ['首付款', '总贷款金额'] data: ['首付款', '总贷款金额']
}, },
grid: { grid: {
left: '20%', // 调整这个属性 left: '20%', // 调整这个属性
...@@ -406,6 +418,7 @@ ...@@ -406,6 +418,7 @@
this.resultFlag = true; this.resultFlag = true;
this.resultInfos = res['data']; this.resultInfos = res['data'];
this.housePurchasePrices = res['data']['housePurchasePrices']; this.housePurchasePrices = res['data']['housePurchasePrices'];
this.drawLine()
}else{ }else{
common.errorDialog(2,res['message']) common.errorDialog(2,res['message'])
} }
...@@ -457,7 +470,15 @@ ...@@ -457,7 +470,15 @@
.wrapper{ .wrapper{
.houseInfo .title{ .houseInfo .title{
padding-left: 0; padding-left: 0;
justify-content: flex-start; justify-content: space-between;
.editParam{
font-size: 26rpx;
color: #666;
border: 1px solid #CEB07D;
padding: 4rpx 16rpx;
border-radius: 6rpx;
font-weight: normal;
}
} }
.houseInfo .title::before{ .houseInfo .title::before{
width: 0; width: 0;
...@@ -465,8 +486,8 @@ ...@@ -465,8 +486,8 @@
.inputItem { .inputItem {
.inputContent { .inputContent {
label{ label{
width: 200rpx;
text-align: right; text-align: right;
white-space: nowrap;
} }
} }
.btn_wrapper{ .btn_wrapper{
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</div> </div>
<div v-else-if="item.type==='select'" style="width:55%"> <div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper"> <view class="btn_wrapper">
<button class="min-btn" @click="slectedMethod1=listItem.value;item.value=listItem.value" :class="{actived:slectedMethod1 == listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button> <button class="min-btn" @click="item.value=listItem.value" :class="{actived:item.value==listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
</view> </view>
</div> </div>
</li> </li>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<div v-else-if="item.type==='select'" style="width:55%"> <div v-else-if="item.type==='select'" style="width:55%">
<view class="btn_wrapper"> <view class="btn_wrapper">
<button class="min-btn" @click="slectedMethod=listItem.value;item.value=listItem.value" :class="{actived:slectedMethod == listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button> <button class="min-btn" @click="item.value=listItem.value" :class="{actived:item.value==listItem.value}" type="default" plain="true" v-for="listItem of repaymentMethodLists">{{listItem.text}}</button>
</view> </view>
</div> </div>
</li> </li>
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
</view> </view>
</view> </view>
<view class="footer" v-if="!isReadonly"> <view class="footer" v-if="!isReadonly">
<view @click="save()">保存</view> <view @click="save()" class="save">保存</view>
<view @click="clear()" class="clear">清空</view>
</view> </view>
</div> </div>
</template> </template>
...@@ -57,17 +58,15 @@ ...@@ -57,17 +58,15 @@
emits:['getData'], emits:['getData'],
data(){ data(){
return{ return{
slectedMethod:1,
slectedMethod1:1,
accumulationFundParams:[ accumulationFundParams:[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'}, {id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'公积金还款方式',value:null,type:'select',unit:'',alias:'oldCalcuteType'}, {id:'01',text:'公积金还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'}, {id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'}, {id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
], ],
commercialLoansParams:[ commercialLoansParams:[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'}, {id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'商业还款方式',value:null,type:'select',unit:'',alias:'oldCalcuteType'}, {id:'01',text:'商业还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'}, {id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'}, {id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
], ],
...@@ -105,10 +104,10 @@ ...@@ -105,10 +104,10 @@
return {loanType,sendData,a,b,isReadonly} return {loanType,sendData,a,b,isReadonly}
}, },
mounted(){ mounted(){
if(JSON.stringify(this.a) != '{}'){ if(JSON.stringify(this.a) != '{}' && JSON.stringify(this.a) != '[]'){
this.accumulationFundParams = JSON.parse(JSON.stringify(this.a))[0]._object; this.accumulationFundParams = JSON.parse(JSON.stringify(this.a))[0]._object;
} }
if(JSON.stringify(this.b) != '{}'){ if(JSON.stringify(this.b) != '{}' && JSON.stringify(this.b) != '[]'){
this.commercialLoansParams = JSON.parse(JSON.stringify(this.b))[0]._object; this.commercialLoansParams = JSON.parse(JSON.stringify(this.b))[0]._object;
} }
if(!(this.accumulationFundParams.findIndex(item=>item.value==null || item.value == '') >= 0) && !(this.commercialLoansParams.findIndex(item=>item.value==null || item.value == '') >= 0)){ if(!(this.accumulationFundParams.findIndex(item=>item.value==null || item.value == '') >= 0) && !(this.commercialLoansParams.findIndex(item=>item.value==null || item.value == '') >= 0)){
...@@ -120,6 +119,20 @@ ...@@ -120,6 +119,20 @@
} }
}, },
methods:{ methods:{
clear(){
this.accumulationFundParams=[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'公积金还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
];
this.commercialLoansParams=[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'商业还款方式',value:1,type:'select',unit:'',alias:'oldCalcuteType'},
{id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
]
},
selectLoanType(e){ selectLoanType(e){
this.loanType = e; this.loanType = e;
}, },
...@@ -378,17 +391,29 @@ ...@@ -378,17 +391,29 @@
} }
} }
.footer{ .footer{
width: 300rpx; position: relative;
height: 80rpx;
background: linear-gradient(135deg, #CEB07D 0%, #FFDDA9 56%, #FED495 100%, #FED495 100%);
border-radius: 4px;
font-size: 36rpx;
color: #6B4000;
font-weight: 500;
margin: 20px auto; margin: 20px auto;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; .save{
width: 300rpx;
height: 80rpx;
background: linear-gradient(135deg, #CEB07D 0%, #FFDDA9 56%, #FED495 100%, #FED495 100%);
border-radius: 4px;
font-size: 36rpx;
color: #6B4000;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
}
.clear{
position: absolute;
right: 0;
bottom: 0;
border-bottom: 1px solid #000;
padding: 0 10rpx;
}
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import api from '../../api/api'; import api from '../../api/api';
import common from '../../common/common' import common from '../../common/common'
export default{ export default{
emits:['getData'],
data(){ data(){
return { return {
paramsLists:[ paramsLists:[
...@@ -52,6 +53,12 @@ ...@@ -52,6 +53,12 @@
onLoad(){ onLoad(){
}, },
setup(props,content){
const sendData = (e) =>{
content.emit('getData',e);
}
return {sendData}
},
methods:{ methods:{
onchange(e) { onchange(e) {
// const value = e.detail.value; // const value = e.detail.value;
...@@ -77,7 +84,16 @@ ...@@ -77,7 +84,16 @@
}) })
}, },
confirmParams(){ confirmParams(){
const params = {
housePriceGrowthRate:this.editParamLists.filter(item=>item.alias==='housePriceGrowthRate')[0].value,//房价增长率
houseDepreciationRate:this.editParamLists.filter(item=>item.alias==='houseDepreciationRate')[0].value,//房屋折旧率
downPaymentMin:this.editParamLists.filter(item=>item.alias==='downPaymentMin')[0].value,//首付款最低成数(百分位)
interestRate:this.editParamLists.filter(item=>item.alias==='interestRate')[0].value, //贷款年利率
tnvestmentRate:this.editParamLists.filter(item=>item.alias==='tnvestmentRate')[0].value,//投资回报率
incomeRate:this.editParamLists.filter(item=>item.alias==='incomeRate')[0].value,//收入增长率
acceptableLossRate:this.editParamLists.filter(item=>item.alias==='acceptableLossRate')[0].value,//可接受本金损失率
}
this.sendData(params)
}, },
// 获取房价增长率 // 获取房价增长率
queryCommercialHousingPrice(provinceId,cityId){ queryCommercialHousingPrice(provinceId,cityId){
......
...@@ -6,14 +6,14 @@ ...@@ -6,14 +6,14 @@
<img src="../../static/images/qrcodeBg_1.png" alt="" srcset=""> <img src="../../static/images/qrcodeBg_1.png" alt="" srcset="">
</view> </view>
</view> --> </view> -->
<follow :redirectUrl="'/pages/index/index'" @getFollowData="getFollowData"></follow> <follow :redirectUrl="'sfp/pages/index/index'" @getFollowData="getFollowData"></follow>
<!-- 已关注公众号用户 --> <!-- 已关注公众号用户 -->
<view class="content" v-show="!isNeedOfficialAccountQrcode"> <view class="content" v-show="!isNeedOfficialAccountQrcode">
<view class="banner"> <view class="banner">
<img src="/static/images/policyIrrBanner.png" alt="" srcset=""> <img src="/static/images/policyIrrBanner.png" alt="" srcset="">
<!-- 使用说明 --> <!-- 使用说明 -->
<text @click="instructionForUse()">使用说明</text> <text @click="instructionForUse()">使用说明</text>
<head></head> <commonHead></commonHead>
</view> </view>
<scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer"> <scroll-view scroll-y="true" class="formInfoContainer" id="formInfoContainer">
<view class="tabTitle"> <view class="tabTitle">
...@@ -206,9 +206,10 @@ ...@@ -206,9 +206,10 @@
import dataImport from "../dataImport/data-import.vue"; import dataImport from "../dataImport/data-import.vue";
import { inject } from "vue"; import { inject } from "vue";
import foot from '../footer/footer.vue'; import foot from '../footer/footer.vue';
import head from '../header/header.vue';
import follow from '../follow/follow.vue'; import follow from '../follow/follow.vue';
import { toRefs, ref } from 'vue'; import { toRefs, ref } from 'vue';
import commonHead from '../header/header.vue';
export default { export default {
...@@ -242,8 +243,8 @@ ...@@ -242,8 +243,8 @@
components:{ components:{
dataImport, dataImport,
foot, foot,
head, follow,
follow commonHead
}, },
onLoad() { onLoad() {
if(dataHandling.getQueryString('isBack') == 1){ if(dataHandling.getQueryString('isBack') == 1){
......
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