Commit 76b016d6 by kyle

还款方式改为按钮,组件显示问题修改

parent adbd83a0
......@@ -214,7 +214,6 @@
data(){
return{
dataLists:null,
loanType:1,
dialogIsShow:false,//弹窗显示与隐藏
isDisplace:false,
isLoanSelected:false,
......@@ -270,8 +269,8 @@
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)
},
......
......@@ -24,7 +24,7 @@
</view>
<!-- 商业贷款 -->
<view class="commercialLoans" v-if="loanType==1|| loanType==3">
<view class="commercialLoans" v-if="loanType=='1'|| loanType=='3'">
<h5 v-if="!isReadonly">商业贷款</h5>
<ul>
<li v-for="item of commercialLoansParams" :key="item.id">
......@@ -33,8 +33,10 @@
<input class="uni-input" type="{{item.type}}" v-model="item.value" placeholder="请输入" :disabled="isReadonly"/>
<span>{{item.unit}}</span>
</div>
<div v-else-if="item.type==='select'" style="width:30%">
<uni-data-select v-model="item.value" :localdata="repaymentMethodLists" :disable="isReadonly"></uni-data-select>
<div v-else-if="item.type==='select'" style="width:55%">
<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>
</view>
</div>
</li>
</ul>
......@@ -53,17 +55,18 @@
emits:['getData'],
data(){
return{
slectedMethod:1,
accumulationFundParams:[
{id:'00',text:'公积金贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'公积金还款方式',value:null,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'},
{id:'02',text:'公积金剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'公积金年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
],
commercialLoansParams:[
{id:'00',text:'商业贷款余额',value:null,type:'digit',unit:'元',alias:'oldHouseLoanBalance'},
{id:'01',text:'商业还款方式',value:null,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'},
{id:'02',text:'商业贷款剩余月份',value:null,type:'number',unit:'月',alias:'oldHouseRepaymentMonth'},
{id:'03',text:'商业贷款年利率',value:null,type:'digit',unit:'%',alias:'oldInterestRate'},
],
loanTypeLists:[
{id:'00',text:'商业贷款',value:1},
......@@ -100,17 +103,17 @@
},
mounted(){
if(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) != '{}'){
this.commercialLoansParams = JSON.parse(JSON.stringify(this.b))[0]._object;
}
if(this.accumulationFundParams){
this.loanType = 1;
}else if(this.commercialLoansParams){
if(!(this.accumulationFundParams.findIndex(item=>item.value==null || item.value == '') >= 0) && !(this.commercialLoansParams.findIndex(item=>item.value==null || item.value == '') >= 0)){
this.loanType = 3;
}else if(!(this.accumulationFundParams.findIndex(item=>item.value==null || item.value == '') >= 0)){
this.loanType = 2;
}else{
this.loanType = 3;
this.loanType = 1;
}
},
methods:{
......@@ -318,6 +321,37 @@
span{
padding-left: 10rpx;
}
.btn_wrapper{
display: flex;
width: 100%;
.min-btn{
position: relative;
flex: 1;
width: 0;
margin-left: 10rpx;
line-height: 1.8;
font-size: 26rpx;
border-radius: 6rpx;
border: 1px solid #CEB07D;
&.actived{
color: #6B4000;
}
&.actived::after{
display: block;
content: "";
position: absolute;
left: 80%;
top: 20%;
width: 0;
height: 0;
border: 40rpx solid #fed9a1;
border-top-color: transparent;
border-left-color: transparent;
}
}
}
}
}
}
......
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