diff --git a/pages/order/edit/index2.js b/pages/order/edit/index2.js
index 419027a..b1f2477 100644
--- a/pages/order/edit/index2.js
+++ b/pages/order/edit/index2.js
@@ -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,
+ })
+ }
+ }
+ },
+
})
\ No newline at end of file
diff --git a/pages/order/edit/index2.wxml b/pages/order/edit/index2.wxml
index 0f220de..ebe0276 100644
--- a/pages/order/edit/index2.wxml
+++ b/pages/order/edit/index2.wxml
@@ -119,8 +119,8 @@
- 零首付
- {{if_zero_firstpay==1?'是':'否'}}
+ 首付类型
+ {{firstPayArr[firstPayIndex]}}
首付按揭金额
@@ -136,13 +136,17 @@
-
- 零首付
-
-
+
+ 首付类型
+
+
+ 请选择
+ {{firstPayArr[firstPayIndex]}}
+
+
-
+
首付按揭金额
@@ -384,8 +388,8 @@
{{priceinfo.price_coplus}}元
- 零首付
- {{if_zero_firstpay==1?'是':'否'}}
+ 首付类型
+ {{firstPayArr[firstPayIndex]}}
首付按揭金额
diff --git a/pages/order/register/index.js b/pages/order/register/index.js
index de505c4..d9a6fd5 100644
--- a/pages/order/register/index.js
+++ b/pages/order/register/index.js
@@ -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,
+ })
+ }
+ }
+ },
+
})
\ No newline at end of file
diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml
index 840785c..191d410 100644
--- a/pages/order/register/index.wxml
+++ b/pages/order/register/index.wxml
@@ -235,13 +235,23 @@
公司加价
{{priceinfo.price_coplus}}元
-
+
+ 首付类型
+
+
+ 请选择
+ {{firstPayArr[firstPayIndex]}}
+
+
+
+
+
+
首付按揭金额
@@ -510,8 +520,8 @@
{{priceinfo.price_coplus}}元
- 零首付
- {{if_zero_firstpay==1?'是':'否'}}
+ 首付类型
+ {{firstPayArr[firstPayIndex]}}
首付按揭金额