diff --git a/commons/js/config.js b/commons/js/config.js
index eb1f2a8..32a04a1 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -81,6 +81,8 @@ api = {
appCustomersDefeats: 'app/customers/defeats', //战败客户列表 /战败/再战申请
+ appServices:'app/services', //获取代办服务列表
+
}
//远程图片存储地址
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index e39ac06..6df3554 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -530,4 +530,11 @@ apiQuery.putAppCusorder2 = function (params) {
})
}
+//获取代办服务列表
+apiQuery.getAppServices = function (params) {
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appServices, 2, params, "GET", resolve, reject)
+ })
+}
+
export default apiQuery;
\ No newline at end of file
diff --git a/pages/order/register/index.js b/pages/order/register/index.js
index 80f1110..44ea2b1 100644
--- a/pages/order/register/index.js
+++ b/pages/order/register/index.js
@@ -72,26 +72,12 @@ Page({
isShowcheck:false,//是否显示预览核对弹框
checkCount: 2,
checktext: '3s',
-
isShowRemarks:false,//意向金备注
- agencyList:[
- {
- id:1,
- title:'挂牌服务',
- check:true,
- },
- {
- id:2,
- title:'金融服务',
- check:false,
- },
- {
- id:3,
- title:'保险服务',
- check:false,
- },
- ],
+ disc_money:'',//优惠金额
+ srv_total:0,//代办费用
+ srv_ids:[],//代办数组
+ agencyList:[],
},
//生命周期函数--监听页面加载
@@ -144,7 +130,32 @@ Page({
title: '请输入客户地址',
icon: 'none'
})
- }else{
+ }
+ else if(this.data.entrustIndex == -1 ){
+ wx.showToast({
+ title: '请选择是否委托',
+ icon: 'none'
+ })
+ }
+ else if(this.data.entrustIndex == 0 && this.data.entrust_name == ''){
+ wx.showToast({
+ title: '请填写受托人姓名',
+ icon: 'none'
+ })
+ }
+ else if(this.data.entrustIndex == 0 && (this.data.entrust_idcard == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.entrust_idcard))){
+ wx.showToast({
+ title: '请填写正确受托人身份证',
+ icon: 'none'
+ })
+ }
+ else if(this.data.entrustIndex == 0 && !/^1[3456789]\d{9}$/.test(this.data.entrust_mobile)){
+ wx.showToast({
+ title: '请输入正确委托人手机号',
+ icon: 'none'
+ })
+ }
+ else{
this.setData({
step:2,
})
@@ -190,48 +201,30 @@ Page({
icon: 'none'
})
}
- else if(this.data.packIndex == -1 ){
+ else if(this.data.srv_ids.length == 0 && this.data.userInfo.biz_type != 3){
wx.showToast({
- title: '请选择代办包',
+ title: '请选择代办内容',
icon: 'none'
})
}
+ // else if(this.data.packIndex == -1 ){
+ // wx.showToast({
+ // title: '请选择代办包',
+ // icon: 'none'
+ // })
+ // }
// else if(this.data.mainIndex == -1 ){
// wx.showToast({
// title: '请选择购车主体',
// icon: 'none'
// })
// }
- else if(this.data.entrustIndex == -1 ){
- wx.showToast({
- title: '请选择是否委托',
- icon: 'none'
- })
- }
else if(this.data.delry_time == ''){
wx.showToast({
title: '请输入期望交付时间',
icon: 'none'
})
}
- else if(this.data.entrustIndex == 0 && this.data.entrust_name == ''){
- wx.showToast({
- title: '请填写受托人姓名',
- icon: 'none'
- })
- }
- else if(this.data.entrustIndex == 0 && (this.data.entrust_idcard == ''|| !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(this.data.entrust_idcard))){
- wx.showToast({
- title: '请填写正确受托人身份证',
- icon: 'none'
- })
- }
- else if(this.data.entrustIndex == 0 && !/^1[3456789]\d{9}$/.test(this.data.entrust_mobile)){
- wx.showToast({
- title: '请输入正确委托人手机号',
- icon: 'none'
- })
- }
else{
let that = this
@@ -498,6 +491,7 @@ Page({
priceinfo:'',
})
this.getAppSeriesAttrscolor()
+ this.getAppServices()
}
},
@@ -545,7 +539,7 @@ Page({
this.setData({
paymentIndex:e.detail.value,
})
- this.getAppServicesPackage()
+ //this.getAppServicesPackage()
if(e.detail.value==1){
this.getAppFinance()
}else{
@@ -556,6 +550,8 @@ Page({
financeIndex:-1,
})
}
+ //代办包
+ this.getAppServices()
}
},
@@ -606,6 +602,24 @@ Page({
}
},
+ //获取代办服务列表
+ getAppServices(){
+ if(this.data.paymentIndex != -1&&this.data.customerIndex != -1&&this.data.car_id != ''&&this.data.v_id != ''){
+ let params = {};
+ params['payway'] = this.data.car_id;
+ params['cus_id'] = this.data.customer[this.data.customerIndex].id;
+ params['car_id'] = this.data.car_id;
+ params['v_id'] = this.data.v_id;
+ params['page'] = 1;
+ params['size'] = 100;
+ _.apiQuery.getAppServices(params).then(res => {
+ this.setData({
+ agencyList:res.data.list,
+ })
+ });
+ }
+ },
+
//建卡时间
delryTime(e){
this.setData({
@@ -653,7 +667,7 @@ Page({
params['price'] = that.data.priceinfo.price;
params['deposit'] = that.data.priceinfo.deposit;
params['payway'] = that.data.paymentIndex==0?'1':'0';
- params['pack_id'] = that.data.pack_id;
+ //params['pack_id'] = that.data.pack_id;
//params['main_type'] = that.data.mainIndex==0?'0':'1';
params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
params['delry_time'] = that.data.delry_time;
@@ -672,6 +686,12 @@ Page({
if(this.data.inten_money != ''){
params['inten_money'] = this.data.inten_money;
}
+ if(this.data.disc_money != ''){
+ params['disc_money'] = this.data.disc_money;
+ }
+ if(this.data.srv_ids.length>0){
+ params['srv_ids'] = this.data.srv_ids;
+ }
_.apiQuery.postAppCusorder(params).then(res => {
//刷新列表页
@@ -897,4 +917,28 @@ Page({
})
},
+ //代办相关
+ changeAgency(e) {
+
+ let agencyList = this.data.agencyList
+ let values = e.detail.value
+ let srv_total = 0
+ agencyList.forEach(item1 => {
+ item1.checked = false
+ values.forEach(item2 => {
+ if(item1.id == item2){
+ item1.checked = true
+ srv_total = srv_total + item1.price
+ }
+ })
+ })
+
+ this.setData({
+ srv_ids:e.detail.value,
+ agencyList,
+ srv_total,
+ })
+ },
+
+
})
\ No newline at end of file
diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml
index baf428c..4735c79 100644
--- a/pages/order/register/index.wxml
+++ b/pages/order/register/index.wxml
@@ -170,7 +170,7 @@
-
+
期望交付时间*
@@ -190,20 +190,29 @@
+
+ 车身优惠
+
+
+ 元
+
+
代办相关
- 当前代办费用:2450元
+ 当前代办费用:{{srv_total}}元
-
-
-
- {{item.title}}
-
-
-
+
+
+
+
+
+
@@ -309,15 +318,26 @@
金融机构
{{financeArray[financeIndex]}}
-
+
期望交付时间
{{delry_time}}
-
+
+ 车身优惠
+ {{disc_money != ''?disc_money:'0'}}
+
+
+ 代办相关
+
+
+ {{item.title}}
+
+
+
diff --git a/pages/order/register/index.wxss b/pages/order/register/index.wxss
index fa87606..a7e8ebf 100644
--- a/pages/order/register/index.wxss
+++ b/pages/order/register/index.wxss
@@ -1 +1,19 @@
-/* pages/order/register/index.wxss */
\ No newline at end of file
+/*复选框外框样式*/
+checkbox .wx-checkbox-input {
+ width:30rpx;
+ height:30rpx;
+ border-color: #999;
+ background: #f6f6f6;
+}
+/* 选中后的 背景样式*/
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+ border-color: #36afa2;
+ background: #36afa2;
+}
+/*复选框选中后内部样式*/
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+ font-size:20rpx;
+ color:#fff;
+ transform:translate(-50%, -50%) scale(1);
+ -webkit-transform:translate(-50%, -50%) scale(1);
+}
\ No newline at end of file