0首付-编辑

This commit is contained in:
老叶
2023-03-28 15:34:18 +08:00
parent 4372744ca2
commit ddc84a9551
3 changed files with 36 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const env = "d";
const env = "p";
const version = 1,
+18 -3
View File
@@ -77,7 +77,7 @@ Page({
packageList:[],//车辆选装包
options_ids:[],//选装包id数组
options_total:0,//选装包费用
if_zero_firstpay:0,//是否0首付
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -108,6 +108,7 @@ Page({
if_local_bill:res.data.if_local_bill==1?1:0,
brand_id:res.data.brand_id,
car_id:res.data.car_id,
if_zero_firstpay:res.data.if_zero_firstpay,
})
/*匹配车辆信息*/
@@ -501,7 +502,8 @@ Page({
title: '请输入期望交付时间',
icon: 'none'
})
}else if(!this.data.priceinfo.sdeposit||this.data.priceinfo.sdeposit == '' ){
}
else if(this.data.if_zero_firstpay!=1&&(!this.data.priceinfo.sdeposit||this.data.priceinfo.sdeposit == '')){
wx.showToast({
title: '请选择定金',
icon: 'none'
@@ -878,7 +880,9 @@ Page({
params['options_ids'] = that.data.options_ids;
}
params['price'] = that.data.priceinfo.price;
params['deposit'] = that.data.priceinfo.sdeposit;
if(that.data.if_zero_firstpay!=1){
params['deposit'] = that.data.priceinfo.sdeposit;
}
params['payway'] = that.data.paymentIndex==0?'1':'0';
params['delry_time'] = that.data.delry_time;
params['business_id'] = that.data.priceinfo.id;
@@ -889,6 +893,9 @@ Page({
if(that.data.priceinfo.show_local_bill){
params['if_local_bill'] = that.data.if_local_bill;
}
if(that.data.paymentIndex==1){
params['if_zero_firstpay'] = that.data.if_zero_firstpay;
}
let srv_arr = []
that.data.agencyList.forEach(item => {
@@ -1366,4 +1373,12 @@ Page({
})
},
//是否0首付
switchZeroFirstpay:function(e){
this.setData({
if_zero_firstpay:e.detail.value ? 1 :0,
'priceinfo.sdeposit':'',
})
},
})
+17 -3
View File
@@ -118,7 +118,11 @@
<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>
<block wx:if="{{info.price_book_status}}">
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit}}">
<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">0首付</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit&&if_zero_firstpay!=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;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
</view>
@@ -128,7 +132,13 @@
</view>
</block>
<block wx:else>
<view class="relative bbs-1-eb pl190 last-b-none" wx:if="{{priceinfo.deposit_list}}">
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{paymentIndex == 1}}">
<view class="absolute left-0 box-middle">0首付</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 pl190 last-b-none" wx:if="{{priceinfo.deposit_list&&paymentIndex != -1&&if_zero_firstpay!=1}}">
<view class="absolute left-0 box-middle font-28 color-333">定金<text class="color-f9394d">*</text></view>
<view class="pt30 pb30 text-right font-28 color-666">
<view class="fn-clear">
@@ -363,7 +373,11 @@
<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="{{priceinfo.sdeposit}}">
<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">0首付</view>
<view class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;">{{if_zero_firstpay==1?'是':'否'}}</view>
</view>
<view class="relative bbs-1-eb last-b-none pl180 font-28" wx:if="{{priceinfo.sdeposit&&if_zero_firstpay!=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;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
</view>