首付按揭
This commit is contained in:
@@ -79,6 +79,8 @@ Page({
|
||||
options_total:0,//选装包费用
|
||||
if_zero_firstpay:0,//是否零首付
|
||||
price_loan0:'',//首付按揭金额
|
||||
firstPayArr:['现金','0首付','按揭',],//首付类型
|
||||
firstPayIndex:0,//首付类型
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -266,7 +268,8 @@ Page({
|
||||
|
||||
/*匹配其他信息*/
|
||||
//匹配付款方式
|
||||
if(!!res.data.payway){
|
||||
if(res.data.payway==0||res.data.payway==1){
|
||||
console.log(434343)
|
||||
let paymentIndex = -1
|
||||
if(res.data.payway==0){
|
||||
paymentIndex = 1
|
||||
@@ -276,6 +279,25 @@ Page({
|
||||
this.setData({
|
||||
paymentIndex:paymentIndex,
|
||||
})
|
||||
|
||||
if(paymentIndex == 1){
|
||||
if(res.data.if_zero_firstpay==1){
|
||||
if(res.data.price_loan0>0){
|
||||
this.setData({
|
||||
firstPayIndex:2,
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
firstPayIndex:1,
|
||||
})
|
||||
}
|
||||
}else{
|
||||
this.setData({
|
||||
firstPayIndex:0,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//匹配代办
|
||||
@@ -773,6 +795,8 @@ Page({
|
||||
this.setData({
|
||||
paymentIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
if_zero_firstpay:0,
|
||||
firstPayIndex:0,
|
||||
})
|
||||
//代办列表
|
||||
this.getAppServices()
|
||||
@@ -1384,7 +1408,29 @@ Page({
|
||||
if_zero_firstpay:e.detail.value ? 1 :0,
|
||||
'priceinfo.sdeposit':'',
|
||||
price_loan0:'',
|
||||
if_zero_firstpay:0,
|
||||
firstPayIndex:0,
|
||||
})
|
||||
},
|
||||
|
||||
//选择首付类型
|
||||
changeFirstPay(e) {
|
||||
if(this.data.firstPayIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
firstPayIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
})
|
||||
if(this.data.firstPayArr[this.data.firstPayIndex]=='0首付'||this.data.firstPayArr[this.data.firstPayIndex]=='按揭'){
|
||||
this.setData({
|
||||
if_zero_firstpay:1,
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.setData({
|
||||
if_zero_firstpay:0,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -119,8 +119,8 @@
|
||||
</view>
|
||||
<block wx:if="{{info.price_book_status}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
<view class="absolute left-0 box-middle color-333">首付类型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{firstPayArr[firstPayIndex]}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
@@ -136,13 +136,17 @@
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle">零首付</view>
|
||||
<view class="relative pt30 pb30 text-right">
|
||||
<switch checked="{{if_zero_firstpay==1}}" bindchange="switchZeroFirstpay" type="switch" color='#36afa2' style="zoom:0.8" />
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">首付类型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeFirstPay" value="{{firstPayIndex}}" range="{{firstPayArr}}">
|
||||
<text class="color-ccc" wx:if="{{firstPayIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{firstPayArr[firstPayIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1}}">
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1&&firstPayArr[firstPayIndex]=='按揭'}}">
|
||||
<view class="absolute left-0 box-middle">首付按揭金额</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入首付按揭金额" model:value='{{price_loan0}}' always-embed='{{true}}' />
|
||||
@@ -384,8 +388,8 @@
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
<view class="absolute left-0 box-middle color-333">首付类型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{firstPayArr[firstPayIndex]}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
|
||||
@@ -103,6 +103,8 @@ Page({
|
||||
options_total:0,//选装包费用
|
||||
if_zero_firstpay:0,//是否零首付
|
||||
price_loan0:'',//首付按揭金额
|
||||
firstPayArr:['现金','0首付','按揭',],//首付类型
|
||||
firstPayIndex:0,//首付类型
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -528,6 +530,8 @@ Page({
|
||||
this.setData({
|
||||
paymentIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
if_zero_firstpay:0,
|
||||
firstPayIndex:0,
|
||||
})
|
||||
//代办列表
|
||||
this.getAppServices()
|
||||
@@ -1488,7 +1492,29 @@ Page({
|
||||
if_zero_firstpay:e.detail.value ? 1 :0,
|
||||
'priceinfo.sdeposit':'',
|
||||
price_loan0:'',
|
||||
if_zero_firstpay:0,
|
||||
firstPayIndex:0,
|
||||
})
|
||||
},
|
||||
|
||||
//选择首付类型
|
||||
changeFirstPay(e) {
|
||||
if(this.data.firstPayIndex != e.detail.value && e.detail.value >= 0){
|
||||
this.setData({
|
||||
firstPayIndex:e.detail.value,
|
||||
price_loan0:'',
|
||||
})
|
||||
if(this.data.firstPayArr[this.data.firstPayIndex]=='0首付'||this.data.firstPayArr[this.data.firstPayIndex]=='按揭'){
|
||||
this.setData({
|
||||
if_zero_firstpay:1,
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.setData({
|
||||
if_zero_firstpay:0,
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -235,13 +235,23 @@
|
||||
<view class="absolute left-0 box-middle color-333">公司加价</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">首付类型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeFirstPay" value="{{firstPayIndex}}" range="{{firstPayArr}}">
|
||||
<text class="color-ccc" wx:if="{{firstPayIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{firstPayArr[firstPayIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle">零首付</view>
|
||||
<view class="relative pt30 pb30 text-right">
|
||||
<switch checked="{{if_zero_firstpay==1}}" bindchange="switchZeroFirstpay" type="switch" color='#36afa2' style="zoom:0.8" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1}}">
|
||||
</view> -->
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{if_zero_firstpay==1&&firstPayArr[firstPayIndex]=='按揭'}}">
|
||||
<view class="absolute left-0 box-middle">首付按揭金额</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="digit" placeholder="请输入首付按揭金额" model:value='{{price_loan0}}' always-embed='{{true}}' />
|
||||
@@ -510,8 +520,8 @@
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
|
||||
<view class="absolute left-0 box-middle color-333">零首付</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
|
||||
<view class="absolute left-0 box-middle color-333">首付类型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{firstPayArr[firstPayIndex]}}</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{price_loan0>0}}">
|
||||
<view class="absolute left-0 box-middle color-333">首付按揭金额</view>
|
||||
|
||||
Reference in New Issue
Block a user