Commit 05722799 by Chao Sun

Merge branch 'master' of http://139.224.139.2:9091/Sweet/sfp-program into master

parents 9a5f214c df7b34b6
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<view class="content"> <view class="content">
<view class="left"> <view class="left">
<view class="realizable">可实现的</view> <view class="realizable">可实现的</view>
<view>终值{{numberConverter(houseItem.fvPriceRealization)}}</view> <view>{{housePurchaseInfo.nyear}}年后{{numberConverter(houseItem.fvPriceRealization)}}</view>
<!-- <view class="now"> <!-- <view class="now">
现值:{{numberConverter(houseItem.pvPriceRealization)}} 现值:{{numberConverter(houseItem.pvPriceRealization)}}
</view> --> </view> -->
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<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>终值{{numberConverter(houseItem.fvPriceDesired)}}</view> <view>{{housePurchaseInfo.nyear}}年后{{numberConverter(houseItem.fvPriceDesired)}}</view>
<!-- <view class="now"> <!-- <view class="now">
现值:{{numberConverter(houseItem.pvPriceDesired)}} 现值:{{numberConverter(houseItem.pvPriceDesired)}}
</view> --> </view> -->
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<!--旧房贷款余额组件--> <!--旧房贷款余额组件-->
<loanBalance v-if="isLoanSelected" :a="accumulationFundParams" :b="commercialLoansParams" :loanType="1" @getData="getData"></loanBalance> <loanBalance v-if="isLoanSelected" :a="accumulationFundParams" :b="commercialLoansParams" :loanType="1" @getData="getData"></loanBalance>
<!--规划参数组件--> <!--规划参数组件-->
<planningParameters v-if="paramsSelected" :cityInfo="cityInfo" @getData="getPlanParams"></planningParameters> <planningParameters v-if="paramsSelected" :cityInfo="cityInfo" :planningParams="planningParams" @getData="getPlanParams"></planningParameters>
</view> </view>
</view> </view>
</template> </template>
...@@ -223,6 +223,7 @@ ...@@ -223,6 +223,7 @@
export default{ export default{
data(){ data(){
return{ return{
isNeedOfficialAccountQrcode:true,
tipsPrice:null, tipsPrice:null,
tipsTotalPrice:null, tipsTotalPrice:null,
cityInfo:{}, cityInfo:{},
...@@ -444,9 +445,9 @@ ...@@ -444,9 +445,9 @@
...this.planningParams, ...this.planningParams,
interestRate:this.housePurchaseInfo.interestRate / 100, interestRate:this.housePurchaseInfo.interestRate / 100,
houseLoanOldList:this.houseLoanOldList, houseLoanOldList:this.houseLoanOldList,
// businessNo: uni.getStorageSync('businessNo'), businessNo: uni.getStorageSync('businessNo'),
businessNo:'businessNo20220829000000001', calcuteType:0,
calcuteType:0 decimal:4
} }
api.housePurchasePlanAnalysis(param).then((res)=>{ api.housePurchasePlanAnalysis(param).then((res)=>{
if(res['success']){ if(res['success']){
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</template> </template>
<script> <script>
import { ref,toRefs } from "vue"; import { ref,toRefs,reactive } from "vue";
export default{ export default{
props: ['isReadonly','loanType','a','b'], props: ['isReadonly','loanType','a','b'],
emits:['getData'], emits:['getData'],
...@@ -94,21 +94,24 @@ ...@@ -94,21 +94,24 @@
}, },
setup(props,content) { setup(props,content) {
console.log('子组件拿到值了',props); console.log('子组件拿到值了',props);
const a = toRefs(props.a); const a = reactive({value:props.a});
const b = toRefs(props.b); const b = reactive({value:props.b});
const loanType = ref(props.loanType); const loanType = ref(props.loanType);
const isReadonly = ref(props.isReadonly); const isReadonly = ref(props.isReadonly);
const sendData = (e) =>{ const sendData = (e) =>{
content.emit('getData',e); content.emit('getData',e);
} }
console.log(a);
console.log(b)
return {loanType,sendData,a,b,isReadonly} return {loanType,sendData,a,b,isReadonly}
}, },
mounted(){ mounted(){
if(JSON.stringify(this.a) != '{}' && JSON.stringify(this.a) != '[]'){ console.log(JSON.stringify(this.a.value))
this.accumulationFundParams = JSON.parse(JSON.stringify(this.a))[0]._object; if(JSON.stringify(this.a.value) != '{}' && JSON.stringify(this.a.value) != '[]'){
this.accumulationFundParams = this.a.value
} }
if(JSON.stringify(this.b) != '{}' && JSON.stringify(this.b) != '[]'){ if(JSON.stringify(this.b.value) != '{}' && JSON.stringify(this.b.value) != '[]'){
this.commercialLoansParams = JSON.parse(JSON.stringify(this.b))[0]._object; this.commercialLoansParams = this.b.value;
} }
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)){
this.loanType = 3; this.loanType = 3;
......
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
</template> </template>
<script> <script>
import {toRefs} from "vue";
import api from '../../api/api'; import api from '../../api/api';
import common from '../../common/common' import common from '../../common/common'
export default{ export default{
props:['cityInfo'], props:['cityInfo','planningParams'],
emits:['getData'], emits:['getData'],
data(){ data(){
return { return {
...@@ -55,11 +56,12 @@ ...@@ -55,11 +56,12 @@
}, },
setup(props,content){ setup(props,content){
const cityInfo = props.cityInfo ? props.cityInfo : null; const cityInfo = props.cityInfo ? toRefs(props.cityInfo) : null;
const planningParams = props.planningParams ? toRefs(props.planningParams) : null;
const sendData = (e) =>{ const sendData = (e) =>{
content.emit('getData',e); content.emit('getData',e);
} }
return {sendData,cityInfo} return {sendData,cityInfo,planningParams}
}, },
methods:{ methods:{
onchange(e) { onchange(e) {
...@@ -108,9 +110,19 @@ ...@@ -108,9 +110,19 @@
}, },
mounted() { mounted() {
this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists)); this.editParamLists = JSON.parse(JSON.stringify(this.paramsLists));
if(!(JSON.stringify(this.planningParams) == '{}')){
const result = this.planningParams;
this.editParamLists.map(item=>{
// 首付款不需要换算
if(item.alias !== 'downPaymentMin'){
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