添加0首付
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const env = "p";
|
const env = "d";
|
||||||
|
|
||||||
const version = 1,
|
const version = 1,
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ Page({
|
|||||||
packageList:[],//车辆选装包
|
packageList:[],//车辆选装包
|
||||||
options_ids:[],//选装包id数组
|
options_ids:[],//选装包id数组
|
||||||
options_total:0,//选装包费用
|
options_total:0,//选装包费用
|
||||||
|
if_zero_firstpay:0,//是否0首付
|
||||||
},
|
},
|
||||||
//生命周期函数--监听页面加载
|
//生命周期函数--监听页面加载
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
@@ -244,7 +245,7 @@ Page({
|
|||||||
icon: 'none'
|
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({
|
wx.showToast({
|
||||||
title: '请设置定金',
|
title: '请设置定金',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -658,7 +659,9 @@ Page({
|
|||||||
params['options_ids'] = that.data.options_ids;
|
params['options_ids'] = that.data.options_ids;
|
||||||
}
|
}
|
||||||
params['price'] = that.data.priceinfo.price;
|
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['payway'] = that.data.paymentIndex==0?'1':'0';
|
||||||
params['delry_time'] = that.data.delry_time;
|
params['delry_time'] = that.data.delry_time;
|
||||||
params['business_id'] = that.data.priceinfo.id;
|
params['business_id'] = that.data.priceinfo.id;
|
||||||
@@ -712,6 +715,9 @@ Page({
|
|||||||
// params['disc_fine_money'] = that.data.priceinfo.sdisc_fine_money;
|
// params['disc_fine_money'] = that.data.priceinfo.sdisc_fine_money;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
if(that.data.paymentIndex==1){
|
||||||
|
params['if_zero_firstpay'] = that.data.if_zero_firstpay;
|
||||||
|
}
|
||||||
_.apiQuery.postAppCusorderV2(params).then(res => {
|
_.apiQuery.postAppCusorderV2(params).then(res => {
|
||||||
|
|
||||||
//刷新列表页
|
//刷新列表页
|
||||||
@@ -1471,4 +1477,12 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//是否0首付
|
||||||
|
switchZeroFirstpay:function(e){
|
||||||
|
this.setData({
|
||||||
|
if_zero_firstpay:e.detail.value ? 1 :0,
|
||||||
|
'priceinfo.sdeposit':'',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -235,7 +235,13 @@
|
|||||||
<view class="absolute left-0 box-middle color-333">公司加价</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;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</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>
|
||||||
<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="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="pt30 pb30 text-right font-28 color-666">
|
||||||
<view class="fn-clear">
|
<view class="fn-clear">
|
||||||
@@ -497,7 +503,11 @@
|
|||||||
<view class="absolute left-0 box-middle color-333">公司加价</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;"><text class="mr10 color-f9394d">{{priceinfo.price_coplus}}</text>元</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>
|
||||||
<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="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 class="pt30 pb30 text-right font-28 color-666" style="min-height:38rpx;"><text class="mr10 color-f9394d">{{priceinfo.sdeposit}}</text>元</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user