From ddc84a9551f34ede599da4b01656fc35dd6260dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Tue, 28 Mar 2023 15:34:18 +0800 Subject: [PATCH] =?UTF-8?q?0=E9=A6=96=E4=BB=98-=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/js/config.js | 2 +- pages/order/edit/index2.js | 21 ++++++++++++++++++--- pages/order/edit/index2.wxml | 20 +++++++++++++++++--- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/commons/js/config.js b/commons/js/config.js index c3523a4..2048682 100644 --- a/commons/js/config.js +++ b/commons/js/config.js @@ -1,4 +1,4 @@ -const env = "d"; +const env = "p"; const version = 1, diff --git a/pages/order/edit/index2.js b/pages/order/edit/index2.js index 221e1e9..c6d7476 100644 --- a/pages/order/edit/index2.js +++ b/pages/order/edit/index2.js @@ -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':'', + }) + }, + }) \ No newline at end of file diff --git a/pages/order/edit/index2.wxml b/pages/order/edit/index2.wxml index 5387f47..c6cebed 100644 --- a/pages/order/edit/index2.wxml +++ b/pages/order/edit/index2.wxml @@ -118,7 +118,11 @@ {{priceinfo.price_coplus}} - + + 0首付 + {{if_zero_firstpay==1?'是':'否'}} + + 定金 {{priceinfo.sdeposit}} @@ -128,7 +132,13 @@ - + + 0首付 + + + + + 定金* @@ -363,7 +373,11 @@ 公司加价 {{priceinfo.price_coplus}} - + + 0首付 + {{if_zero_firstpay==1?'是':'否'}} + + 定金 {{priceinfo.sdeposit}}