diff --git a/app.wxss b/app.wxss
index b4175af..f1af58a 100644
--- a/app.wxss
+++ b/app.wxss
@@ -1,2 +1,5 @@
/**app.wxss**/
-@import "commons/css/common.wxss";
\ No newline at end of file
+@import "commons/css/common.wxss";
+page{
+ background-color:#fff;
+}
\ No newline at end of file
diff --git a/commons/js/config.js b/commons/js/config.js
index d9b7e97..db2d9e3 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -34,7 +34,7 @@ api = {
appSmsCusorder: "app/sms/cusorder", //订单发短信
appCustomerlogs: "app/customerlogs", //获取日志
appCustomerData: "app/customers/data", //获取客户详细信息
- appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式
+ appCusorder: "app/cusorder", //新建订单 /获取订单列表 /获取订单详情 /修改付款方式 /修改委托协议
appCusorderTabs: "app/cusorder/tabs", //获取tab
appEmployees: "app/employees", //获取客户详细信息 /获取店员列表 /更新店员信息 /删除店员
appLoan: "app/loan", //获取贷款产品信息 /创建贷款信息 /修改贷款信息
@@ -45,7 +45,7 @@ api = {
appXz: "app/xz", //获取虚拟电话
appCustomerlogs: "app/customerlogs", //新增日志
appCustomerData: "app/customers/data", //修改客户基本信息
-
+ appServicesPackage: "app/services/package", //获取代办包
}
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index 4d5fde6..8ff66b4 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -201,7 +201,7 @@ apiQuery.postAppCusorder = function (params) {
})
}
-//修改付款方式
+//修改付款方式 /修改委托协议
apiQuery.putAppCusorder = function (params) {
return new Promise(function (resolve, reject) {
HttpRequest(true, Config.api.appCusorder, 2, params, "PUT", resolve, reject)
@@ -320,4 +320,11 @@ apiQuery.putAppCustomerData = function (params) {
})
}
+//获取代办包
+apiQuery.getAppServicesPackage = function (params) {
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appServicesPackage, 2, params, "GET", resolve, reject)
+ })
+}
+
export default apiQuery;
\ No newline at end of file
diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js
index 6b88465..e610b69 100644
--- a/pages/order/detail/index.js
+++ b/pages/order/detail/index.js
@@ -15,6 +15,7 @@ Page({
},
],
isShowSelectContract:false,
+ isShowSelectEntrust:false,
banksIndex:-1,//分期银行
yearsIndex:-1,//分期年限
money:'',//贷款金额
@@ -40,6 +41,7 @@ Page({
this.getAppCusorderDetails()
this.getUserInfo()
+ this.getAppServicesPackage()
},
onShow: function () {
@@ -63,6 +65,7 @@ Page({
this.setData({
info:res.data,
payway:res.data.payway,
+ pack_id:res.data.pack_id,
})
this.getAppLoan()
@@ -107,6 +110,18 @@ Page({
})
},
+ //获取代办包
+ getAppServicesPackage(){
+ let params = {};
+ params['page'] = 1;
+ params['size'] = 100;
+ _.apiQuery.getAppServicesPackage(params).then(res => {
+ this.setData({
+ packList:res.data.list,
+ })
+ });
+ },
+
//显示短信弹框
showMessage(e){
this.setData({
@@ -161,10 +176,18 @@ Page({
//单选
radioPicker(e){
- if(e.currentTarget.dataset.id != this.data.payway){
- this.setData({
- payway:e.currentTarget.dataset.id,
- })
+ if(e.currentTarget.dataset.type == 'payway'){
+ if(e.currentTarget.dataset.id != this.data.payway){
+ this.setData({
+ payway:e.currentTarget.dataset.id,
+ })
+ }
+ }else if(e.currentTarget.dataset.type == 'pack'){
+ if(e.currentTarget.dataset.id != this.data.pack_id){
+ this.setData({
+ pack_id:e.currentTarget.dataset.id,
+ })
+ }
}
},
@@ -189,8 +212,15 @@ Page({
})
},
+ //显示选择委托
+ optSelectEntrust(){
+ this.setData({
+ isShowSelectEntrust:!this.data.isShowSelectEntrust,
+ })
+ },
+
//修改付款方式
- putAppCusorder(){
+ putAppCusorderPay(){
if(this.data.payway == this.data.info.payway){
this.setData({
isShowSelectContract:false,
@@ -212,6 +242,29 @@ Page({
}
},
+ //修改委托协议
+ putAppCusorderPack(){
+ if(this.data.pack_id == this.data.info.pack_id){
+ this.setData({
+ isShowSelectEntrust:false,
+ })
+ }else{
+ let params = {};
+ params['id'] = this.data.id;
+ params['pack_id'] = this.data.pack_id;
+ _.apiQuery.putAppCusorder(params).then(res => {
+ this.getAppCusorderDetails()
+ this.setData({
+ isShowSelectEntrust:false,
+ })
+ }).catch(res=>{
+ this.setData({
+ isShowSelectEntrust:false,
+ })
+ });
+ }
+ },
+
//创建贷款信息
postAppLoan() {
let that = this
diff --git a/pages/order/detail/index.wxml b/pages/order/detail/index.wxml
index a64322b..c528765 100644
--- a/pages/order/detail/index.wxml
+++ b/pages/order/detail/index.wxml
@@ -22,7 +22,7 @@
{{key}}
- {{value}}{{key == '车辆合同售价格' || key == '定金'?'元':'' }}
+ {{value}}{{key == '车辆合同售价格' || key == '定金'?'元':'' }}
@@ -31,8 +31,8 @@
合同信息
邀请签名
-
-
+
+
整车销售合同
@@ -41,8 +41,14 @@
-
- 委托服务协议
+
+ 委托服务协议
+
+
+
+ 修订委托
+
+
@@ -144,7 +150,7 @@
-
+
{{item.title}}
@@ -153,7 +159,27 @@
-
+
+
+
+
+
+
+
+ 修订委托
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
diff --git a/pages/order/register/index.js b/pages/order/register/index.js
index 7804451..586aedf 100644
--- a/pages/order/register/index.js
+++ b/pages/order/register/index.js
@@ -13,6 +13,8 @@ Page({
colorArray:[],//车型颜色列表
levelArray:[],//车型级别列表
interiorArray:[],//内饰颜色
+ packArray:[],//代办包
+ packIndex:-1,//代办包索引
colorIndex:-1,//车型颜色索引
levelIndex:-1,//车型级别索引
interiorIndex:-1,//内饰颜色索引
@@ -27,11 +29,14 @@ Page({
loading: false,
isShowSelectCustomer:false,
- paymentIndex:-1,
+ paymentIndex:-1,//付款方式
payment:['全款', '分期',],
-
- // agencyIndex:-1,
- // agency:['需要', '不需要',],
+ mainIndex:-1,//购车主体
+ main:['个人', '公司',],
+ entrustIndex:-1,//是否委托
+ entrust:['是','否',],
+ entrust_name:'',//委托人姓名
+ entrust_idcard:'',//委托人身份证
},
//生命周期函数--监听页面加载
@@ -44,6 +49,7 @@ Page({
this.getAppCustomersList()
this.getAppSeriesCars()
+ this.getAppServicesPackage()
this.getUserInfo()
},
@@ -158,6 +164,25 @@ Page({
});
},
+ //获取代办包
+ getAppServicesPackage(){
+ let params = {};
+ params['page'] = 1;
+ params['size'] = 100;
+ _.apiQuery.getAppServicesPackage(params).then(res => {
+ if(res.data.list.length>0){
+ let packArray = []
+ res.data.list.forEach(item => {
+ packArray.push(item.title)
+ })
+ this.setData({
+ packArray:packArray,
+ packList:res.data.list,
+ })
+ }
+ });
+ },
+
//选择车型
changeModel(e) {
let car_id = ''
@@ -209,6 +234,18 @@ Page({
})
},
+ //代办包
+ changePack(e) {
+ let pack_id = ''
+ if(e.detail.value >= 0){
+ pack_id = this.data.packList[e.detail.value].id
+ }
+ this.setData({
+ pack_id:pack_id,
+ packIndex:e.detail.value,
+ })
+ },
+
//付款方式
changePayment(e) {
this.setData({
@@ -216,10 +253,19 @@ Page({
})
},
- //代办车牌
- changeAgency(e) {
+ //购车主体
+ changeMain(e) {
this.setData({
- agencyIndex:e.detail.value,
+ mainIndex:e.detail.value,
+ })
+ },
+
+ //是否委托
+ changeEntrust(e) {
+ this.setData({
+ entrustIndex:e.detail.value,
+ entrust_name:'',
+ entrust_idcard:'',
})
},
@@ -256,14 +302,32 @@ Page({
title: '请选择付款方式',
icon: 'none'
})
- }
- // else if(that.data.agencyIndex == -1 ){
- // wx.showToast({
- // title: '请选择是否代办车牌',
- // icon: 'none'
- // })
- // }
- else{
+ }else if(that.data.packIndex == -1 ){
+ wx.showToast({
+ title: '请选择代办包',
+ icon: 'none'
+ })
+ }else if(that.data.mainIndex == -1 ){
+ wx.showToast({
+ title: '请选择购车主体',
+ icon: 'none'
+ })
+ }else if(that.data.entrustIndex == -1 ){
+ wx.showToast({
+ title: '请选择是否委托',
+ icon: 'none'
+ })
+ }else if(that.data.entrustIndex == 0 && that.data.entrust_name == ''){
+ wx.showToast({
+ title: '请填写委托人姓名',
+ icon: 'none'
+ })
+ }else if(that.data.entrustIndex == 0 && (that.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(that.data.entrust_idcard))){
+ wx.showToast({
+ title: '请填写正确委托人身份证',
+ icon: 'none'
+ })
+ }else{
that.setData({
submitFlag: true,
})
@@ -276,7 +340,15 @@ Page({
params['price'] = that.data.levelList[that.data.levelIndex].price;
params['deposit'] = that.data.levelList[that.data.levelIndex].deposit;
params['payway'] = that.data.paymentIndex==0?'1':'0';
- // params['if_cnum'] = that.data.agencyIndex==0?'1':'0';
+ params['pack_id'] = that.data.pack_id;
+ params['main_type'] = that.data.mainIndex==0?'0':'1';
+ params['ifentrust'] = that.data.entrustIndex==0?'1':'0';
+ if(this.data.entrust_name != ''){
+ params['entrust_name'] = this.data.entrust_name;
+ }
+ if(this.data.entrust_idcard != ''){
+ params['entrust_idcard'] = this.data.entrust_idcard;
+ }
_.apiQuery.postAppCusorder(params).then(res => {
//刷新列表页
@@ -309,6 +381,13 @@ Page({
}
},
+ //输入
+ inputTx(e) {
+ this.setData({
+ [e.currentTarget.dataset.key]: e.detail.value
+ })
+ },
+
//选择客户
radioPicker(e){
if(e.currentTarget.dataset.index != this.data.customerIndex){
diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml
index fb37dc8..858c7d3 100644
--- a/pages/order/register/index.wxml
+++ b/pages/order/register/index.wxml
@@ -75,16 +75,50 @@
-
+
+
+ 购车主体
+
+
+ 请选择
+ {{main[mainIndex]}}
+
+
+
+
+
+ 是否委托
+
+
+ 请选择
+ {{entrust[entrustIndex]}}
+
+
+
+
+
+
+ 委托人姓名
+
+
+
+
+
+ 委托人身份证
+
+
+
+
+