Commit adbd83a0 by Chao Sun

计算接口

parent 97aef16c
...@@ -120,7 +120,7 @@ ...@@ -120,7 +120,7 @@
<view> <view>
规划参数 规划参数
</view> </view>
<view class="view" @click="paramsSelected=dialogIsShow=true"> <view class="view" @click="paramsSelected=dialogIsShow=true;isLoanSelected = false;">
查看 查看
</view> </view>
</view> </view>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</view> </view>
</form> </form>
<!--测算结果--> <!--测算结果-->
<view class="result_wrapper"> <view class="result_wrapper" v-show="resultFlag">
<view class="suggestInfo"> <view class="suggestInfo">
<view class="title"> <view class="title">
<view> <view>
...@@ -250,44 +250,8 @@ ...@@ -250,44 +250,8 @@
pvDownPayment:null, //提高已备首付款到 pvDownPayment:null, //提高已备首付款到
houseSpecialPurpose:null, //提高每年还贷专用款到 houseSpecialPurpose:null, //提高每年还贷专用款到
}, },
housePurchasePrices:[ housePurchasePrices:[],
{ resultFlag:false,
"priceType": "1",
"fvPriceRealization": 1922788.0,
"pvPriceRealization": 1744025.0,
"fvPriceDesired": 1102500.0,
"pvPriceDesired": 1000000.0,
"fvDifference": -820288.0,
"pvDifference": -744025.0
},
{
"priceType": "2",
"fvPriceRealization": 19228.0,
"pvPriceRealization": 17440.0,
"fvPriceDesired": 11025.0,
"pvPriceDesired": 10000.0,
"fvDifference": -8203.0,
"pvDifference": -7440.0
},
{
"priceType": "4",
"fvPriceRealization": 0.0,
"pvPriceRealization": -0.0,
"fvPriceDesired": -820288.0,
"pvPriceDesired": -758402.0,
"fvDifference": -820288.0,
"pvDifference": -758402.0
},
{
"priceType": "3",
"fvPriceRealization": 1922788.0,
"pvPriceRealization": 1777726.0,
"fvPriceDesired": 11025.0,
"pvPriceDesired": 10193.0,
"fvDifference": -1911763.0,
"pvDifference": -1767533.0
}
],
} }
}, },
components:{ components:{
...@@ -308,6 +272,8 @@ ...@@ -308,6 +272,8 @@
console.log('父组件拿到值了',e); console.log('父组件拿到值了',e);
console.log('父组件拿到值了',this.accumulationFundParams); console.log('父组件拿到值了',this.accumulationFundParams);
console.log('父组件拿到值了',this.commercialLoansParams); console.log('父组件拿到值了',this.commercialLoansParams);
this.houseLoanOldList = this.dataLists.c;
console.log(this.houseLoanOldList)
}, },
onchange(e) { onchange(e) {
const value = e.detail.value const value = e.detail.value
...@@ -416,14 +382,20 @@ ...@@ -416,14 +382,20 @@
} }
const param = { const param = {
...this.housePurchaseInfo, ...this.housePurchaseInfo,
houseLoanOldList:this.houseLoanOldList houseLoanOldList:this.houseLoanOldList,
// businessNo: uni.getStorageSync('businessNo'),
businessNo:'businessNo20220829000000001',
calcuteType:0
} }
// api.housePurchasePlanAnalysis().then((res)=>{ api.housePurchasePlanAnalysis(param).then((res)=>{
// if(res['success']){ if(res['success']){
// this.resultInfos = res['data']; this.resultFlag = true;
// this.housePurchasePrices = this.resultInfos['housePurchasePrices']; this.resultInfos = res['data'];
// } this.housePurchasePrices = res['data']['housePurchasePrices'];
// }) }else{
common.errorDialog(2,res['message'])
}
})
}, },
onchange(e) { onchange(e) {
console.log(e) console.log(e)
...@@ -441,14 +413,6 @@ ...@@ -441,14 +413,6 @@
closeBtn(){ closeBtn(){
this.isLoanSelected = this.paramsSelected = this.dialogIsShow = false; this.isLoanSelected = this.paramsSelected = this.dialogIsShow = false;
}, },
getChildLoanInfo(houseLoanOldList,commercialLoansParams,accumulationFundParams){
console.log(commercialLoansParams,accumulationFundParams)
this.commercialLoansParams = commercialLoansParams;
this.accumulationFundParams = accumulationFundParams;
//获取旧房贷款信息
console.log(houseLoanOldList)
this.houseLoanOldList = houseLoanOldList;
},
//打开房屋置换组件 //打开房屋置换组件
openLoan(){ openLoan(){
this.isDisplace = !this.isDisplace; this.isDisplace = !this.isDisplace;
......
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
houseLoanOldInfo.oldHouseRepaymentMonth= this.commercialLoansParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value; houseLoanOldInfo.oldHouseRepaymentMonth= this.commercialLoansParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value;
houseLoanOldInfo.oldInterestRate= this.commercialLoansParams.filter(item=>item.alias==='oldInterestRate').pop().value; houseLoanOldInfo.oldInterestRate= this.commercialLoansParams.filter(item=>item.alias==='oldInterestRate').pop().value;
houseLoanOldInfo.oldCalcuteType = this.commercialLoansParams.filter(item=>item.alias==='oldCalcuteType').pop().value; houseLoanOldInfo.oldCalcuteType = this.commercialLoansParams.filter(item=>item.alias==='oldCalcuteType').pop().value;
houseLoanOldInfo.oldHouseNo = 1;
this.houseLoanOldList = [houseLoanOldInfo]; this.houseLoanOldList = [houseLoanOldInfo];
}else if(this.loanType===2){ }else if(this.loanType===2){
// 公积金贷款 // 公积金贷款
...@@ -202,6 +203,7 @@ ...@@ -202,6 +203,7 @@
houseLoanOldInfo.oldHouseRepaymentMonth= this.accumulationFundParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value; houseLoanOldInfo.oldHouseRepaymentMonth= this.accumulationFundParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value;
houseLoanOldInfo.oldInterestRate= this.accumulationFundParams.filter(item=>item.alias==='oldInterestRate').pop().value; houseLoanOldInfo.oldInterestRate= this.accumulationFundParams.filter(item=>item.alias==='oldInterestRate').pop().value;
houseLoanOldInfo.oldCalcuteType = this.accumulationFundParams.filter(item=>item.alias==='oldCalcuteType').pop().value; houseLoanOldInfo.oldCalcuteType = this.accumulationFundParams.filter(item=>item.alias==='oldCalcuteType').pop().value;
houseLoanOldInfo.oldHouseNo = 1;
this.houseLoanOldList = [houseLoanOldInfo]; this.houseLoanOldList = [houseLoanOldInfo];
}else{ }else{
// 组合贷款 // 组合贷款
...@@ -250,11 +252,13 @@ ...@@ -250,11 +252,13 @@
houseLoanOldInfo.oldInterestRate= this.commercialLoansParams.filter(item=>item.alias==='oldInterestRate').pop().value; houseLoanOldInfo.oldInterestRate= this.commercialLoansParams.filter(item=>item.alias==='oldInterestRate').pop().value;
houseLoanOldInfo.oldCalcuteType = this.commercialLoansParams.filter(item=>item.alias==='oldCalcuteType').pop().value; houseLoanOldInfo.oldCalcuteType = this.commercialLoansParams.filter(item=>item.alias==='oldCalcuteType').pop().value;
houseLoanOldInfo.oldLoanType = 1; houseLoanOldInfo.oldLoanType = 1;
houseLoanOldInfo.oldHouseNo = 1;
houseLoanOldInfo1.oldHouseLoanBalance = this.accumulationFundParams.filter(item=>item.alias==='oldHouseLoanBalance').pop().value; houseLoanOldInfo1.oldHouseLoanBalance = this.accumulationFundParams.filter(item=>item.alias==='oldHouseLoanBalance').pop().value;
houseLoanOldInfo1.oldHouseRepaymentMonth= this.accumulationFundParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value; houseLoanOldInfo1.oldHouseRepaymentMonth= this.accumulationFundParams.filter(item=>item.alias==='oldHouseRepaymentMonth').pop().value;
houseLoanOldInfo1.oldInterestRate= this.accumulationFundParams.filter(item=>item.alias==='oldInterestRate').pop().value; houseLoanOldInfo1.oldInterestRate= this.accumulationFundParams.filter(item=>item.alias==='oldInterestRate').pop().value;
houseLoanOldInfo1.oldCalcuteType = this.accumulationFundParams.filter(item=>item.alias==='oldCalcuteType').pop().value; houseLoanOldInfo1.oldCalcuteType = this.accumulationFundParams.filter(item=>item.alias==='oldCalcuteType').pop().value;
houseLoanOldInfo1.oldLoanType = 2; houseLoanOldInfo1.oldLoanType = 2;
houseLoanOldInfo.oldHouseNo = 1;
this.houseLoanOldList = [houseLoanOldInfo,houseLoanOldInfo1]; this.houseLoanOldList = [houseLoanOldInfo,houseLoanOldInfo1];
} }
...@@ -262,7 +266,8 @@ ...@@ -262,7 +266,8 @@
// console.log(this.houseLoanOldList) // console.log(this.houseLoanOldList)
const ab = { const ab = {
a:this.accumulationFundParams, a:this.accumulationFundParams,
b:this.commercialLoansParams b:this.commercialLoansParams,
c:this.houseLoanOldList
} }
this.sendData(ab) this.sendData(ab)
}, },
......
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