diff --git a/commons/js/config.js b/commons/js/config.js
index 783a387..3b99ad4 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -27,7 +27,6 @@ api = {
appUser: "app/user", //用户信息
appSms: "app/sms", //获取验证码
appUserTel: "app/user/tel", //获取用户手机号
- appSeriesCars: "app/series/cars", //获取车型库
appSeriesAttrs: "app/series/attrs", //获取车型属性
appCustomersTabs: "app/customers/tabs", //获取tab
appCustomers: "app/customers", //获取客户列表 /新建客户 /修改状态和到店次数、试驾次数 /获取客户详情
@@ -52,6 +51,7 @@ api = {
appSeriesBrands: "app/series/brands", //获取车型品牌
appSeries: "app/series", //获取车系车型
+ appSeriesCars: "app/series/cars", //获取车型库
appUserTel: "app/user/tel", //编辑拨打电话
@@ -144,7 +144,7 @@ api = {
appCityOncard: 'app/city/oncard', //获取上牌城市
appFinanceNums: 'app/finance/nums', //获取金融分期期数
- appCusorderV2Customer: 'app/cusorderV2/customer', //获取客户订单
+ appCusorderCustomer: 'app/cusorder/customer', //获取客户订单
appCustomersVisit_tabs: 'app/customers/visit_tabs', //回访待跟进tab
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index b128031..c6c0d2d 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -840,9 +840,9 @@ apiQuery.getAppFinanceNums = function (params) {
}
//获取客户订单
-apiQuery.getAppCusorderV2Customer = function (params) {
+apiQuery.getAppCusorderCustomer = function (params) {
return new Promise(function (resolve, reject) {
- HttpRequest(false, Config.api.appCusorderV2Customer, 2, params, "GET", resolve, reject)
+ HttpRequest(false, Config.api.appCusorderCustomer, 2, params, "GET", resolve, reject)
})
}
diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js
index 5051b0d..3dc3e13 100644
--- a/pages/customer/detail/index.js
+++ b/pages/customer/detail/index.js
@@ -218,7 +218,7 @@ Page({
}
if(res.data.status==2){
- this.getAppCusorderV2Customer()
+ this.getAppCusorderCustomer()
}
@@ -256,10 +256,10 @@ Page({
},
//获取客户订单
- getAppCusorderV2Customer(){
+ getAppCusorderCustomer(){
let params = {};
params['customer_id'] = this.data.id;
- _.apiQuery.getAppCusorderV2Customer(params).then(res=>{
+ _.apiQuery.getAppCusorderCustomer(params).then(res=>{
this.setData({
order:res.data.list,
})
diff --git a/pages/mine/index.js b/pages/mine/index.js
index 190b5dd..b73ece4 100644
--- a/pages/mine/index.js
+++ b/pages/mine/index.js
@@ -43,16 +43,6 @@ Page({
title:'签到码',
url:'/pages/signup/code',
},
- {
- icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-sucai2.png',
- title:'status',
- url:'/pages/signup/status',
- },
- {
- icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-sucai2.png',
- title:'index',
- url:'/pages/signup/index',
- },
{
icon:'https://qs.haodian.cn/wechat_app/lichebao/mine/icon-sezhi2.png',
title:'账户设置',
diff --git a/pages/order/detail/index2.js b/pages/order/detail/index2.js
index 2f65e48..ee88cbd 100644
--- a/pages/order/detail/index2.js
+++ b/pages/order/detail/index2.js
@@ -70,7 +70,7 @@ Page({
getAppCusorderV2(){
let params = {};
params['id'] = this.data.id;
- _.apiQuery.getAppCusorderV2(params).then(res=>{
+ _.apiQuery.getAppCusorderDetails(params).then(res=>{
this.setData({
info:res.data,
})
@@ -769,22 +769,6 @@ Page({
urls:[this.data.imgInfo.imgs.accident_img.img],
})
}
- // else if(e.currentTarget.dataset.type=='ins_img'){
- // let img = []
- // if(this.data.imgInfo.imgs.insurance_img.img){
- // img.push(this.data.imgInfo.imgs.insurance_img.img)
- // }
- // if(this.data.imgInfo.imgs.business_img.img){
- // img.push(this.data.imgInfo.imgs.business_img.img)
- // }
- // this.data.imgInfo.imgs.ins_img.forEach(item => {
- // img.push(item.img)
- // })
- // wx.previewImage({
- // current:this.data.imgInfo.imgs.insurance_img.img,
- // urls:img,
- // })
- // }
else if(e.currentTarget.dataset.type=='other_img'){
let img = []
this.data.imgInfo.imgs.other_img.forEach(item => {
@@ -845,93 +829,6 @@ Page({
}
},
- //随车资料
- changeMaterial(e) {
- let carInfoList = this.data.carInfoList
- let values = e.detail.value
- carInfoList.forEach(item1 => {
- item1.checked = false
- values.forEach(item2 => {
- if(item1.title == item2){
- item1.checked = true
- }
- })
- })
-
- this.setData({
- ckcarInfo:e.detail.value,
- carInfoList,
- })
- },
-
- //随车工具
- changeTool(e) {
- let carToolList = this.data.carToolList
- let values = e.detail.value
- carToolList.forEach(item1 => {
- item1.checked = false
- values.forEach(item2 => {
- if(item1.title == item2){
- item1.checked = true
- }
- })
- })
-
- this.setData({
- ckcarTool:e.detail.value,
- carToolList,
- })
- },
-
- //显示隐藏合格证
- optShowCK(){
- this.setData({
- isShowCK:!this.data.isShowCK,
- })
- },
-
- //显示隐藏合格证
- optShowBill(){
- this.setData({
- isShowBill:!this.data.isShowBill,
- })
- },
-
- //删除订单
- putAppCusorderV2Status(){
- let that = this
- wx.showModal({
- title: '确定删除订单?',
- content: '',
- confirmColor: "#36afa2",
- success(resW) {
- if (resW.confirm) {
- let params = {};
- params['id'] = that.data.id;
- _.apiQuery.putAppCusorderV2Status(params).then(res => {
- //刷新列表页
- let pages = getCurrentPages();
- pages.forEach(item => {
- if(item.route == 'pages/order/index2'){
- item.onPullDownRefresh()
- }
- })
- wx.showToast({
- title: '删除成功',
- icon: 'success',
- duration: 2000
- })
- setTimeout(function () {
- wx.navigateBack({
- delta: 1
- })
- }, 500)
- })
- }
- }
- })
- },
-
//20240526 确认弹窗
bindShowConfirm(){
this.setData({
diff --git a/pages/order/detail/index2.wxml b/pages/order/detail/index2.wxml
index fccedd5..912097b 100644
--- a/pages/order/detail/index2.wxml
+++ b/pages/order/detail/index2.wxml
@@ -10,56 +10,19 @@
-
- 客户姓名
- {{info.name}}
-
客户手机号
{{info.mobile}}
+
+ {{info.main_type==0?"客户姓名":"企业名称"}}
+ {{info.name}}
+
- 客户身份证
+ {{info.main_type==0?"客户身份证":"企业信用代码"}}
{{info.cardid}}
-
- {{info.main_type==0?'车主信息':'企业信息'}}
-
-
-
-
-
-
- 车主姓名
- {{info.owner_name}}
-
-
- 车主手机号
- {{info.owner_mobile}}
-
-
- 车主身份证
- {{info.owner_cardid}}
-
-
- 车主地址
- {{info.address}}
-
-
-
-
- 企业名称
- {{info.company}}
-
-
- 企业信用代号
- {{info.credit}}
-
-
-
- 上牌城市
- {{c_city_name}}
-
+
订单信息
@@ -98,7 +61,7 @@
{{key}}
- {{value}}
+ {{value}}
@@ -111,10 +74,6 @@
-
- 特别约定
- {{info.sa}}
-
已付意向金{{info.inten_money}}元
@@ -128,7 +87,9 @@
-
+
+
+
@@ -136,9 +97,9 @@
发票
- {{info.bill_img?'更新':'上传'}}
-
-
+ {{info.bill_img?'更新':'上传'}}
+
+
@@ -367,7 +328,7 @@
身份证
-
+
@@ -392,7 +353,7 @@
行驶证
-
+
@@ -439,7 +400,7 @@
添加企微
-
+
@@ -472,86 +433,18 @@
-
-
-
-
-
-
- 随车资料
-
-
-
-
-
-
-
-
-
- 随车工具
-
-
-
-
-
-
-
-
-
- 补充说明
-
-
-
-
-
-
-
-
-
- 随车资料
-
-
- {{item}}
-
-
-
-
- 随车工具
-
-
- {{item}}
-
-
-
-
- 补充说明
- {{info.ckcar_data.remark}}
-
-
-
+
-
-
-
-
+
+
-
-
-
+
邀请客户扫码
@@ -561,24 +454,24 @@
-
+
-
-
+
+
-
+
-
-
+
+
温馨提示
是否提交信息至汽车之家AHOH系统?
@@ -586,5 +479,5 @@
-
+
\ No newline at end of file
diff --git a/pages/order/edit/index2.js b/pages/order/edit/index2.js
index 614d437..3de71fc 100644
--- a/pages/order/edit/index2.js
+++ b/pages/order/edit/index2.js
@@ -2,85 +2,64 @@ import _ from '../../../commons/js/commons'
const app = getApp()
Page({
data: {
- tab:[
- {
- title:'车辆信息',
- step:2,
+ tab: [{
+ title: '车辆信息',
+ step: 2,
},
{
- title:'其他信息',
- step:3,
+ title: '其他信息',
+ step: 3,
},
],
- step:2,
- name:'',//姓名
- mobile:'',//手机号
- address:'',//地址
- cardid:'',//身份证
- customerIndex:-1,
- customer: [],//客户列表
+ step: 2,
+ name: '', //姓名
+ mobile: '', //手机号
+ address: '', //地址
+ cardid: '', //身份证
+ customerIndex: -1,
+ customer: [], //客户列表
pageNo: 1,
noData: false,
end: false,
load: true,
loading: false,
- isShowSelectCustomer:false,
+ isShowSelectCustomer: false,
- brand_id:'',//品牌
- brandIndex:-1,//车辆品牌索引
- car_id:'',//车系id
- modelIndex:-1,//车系车型索引
+ brand_id: '', //品牌
+ brandIndex: -1, //车辆品牌索引
+ series_id: '', //车系id
+ modelIndex: -1, //车系车型索引
- v_id:'',//车辆版本id
- color_id:'',//车身颜色id
- incolor_id:'',//内饰颜色id
- b_s_id:'',//备选车型id
-
- spareIndex:-1,//备选车型索引
- colorArray:[],//车身颜色列表
- levelArray:[],//车辆版本列表
- interiorArray:[],//内饰颜色
- colorIndex:-1,//车身颜色索引
- levelIndex:-1,//车辆版本索引
- interiorIndex:-1,//内饰颜色索引
- priceinfo:'',//车辆价格
- delry_time:'',//期望交付时间
- submitFlag:false,
+ car_id: '', //车辆版本id
+ carIndex: -1,
- paymentIndex:-1,//付款方式
- payment:['全款', '按揭',],
- mainIndex:-1,//购车主体
- main:['个人', '公司',],
+ delry_time: '', //期望交付时间
+ submitFlag: false,
- isPreview:false,//是否预览
- isShowcheck:false,//是否显示预览核对弹框
+ paymentIndex: -1, //付款方式
+ payment: ['全款', '按揭', ],
+ mainIndex: -1, //购车主体
+ main: ['个人', '公司', ],
+
+ isPreview: false, //是否预览
+ isShowcheck: false, //是否显示预览核对弹框
checkCount: 2,
checktext: '3s',
- isShowRemarks:false,//意向金备注
- srv_total:0,//代办费用
- agencyList:[],//代办数组
- fine_total:0,//精品费用
- //if_fine:false,//精品尊享包
-
- fines:[],//精品赠送
-
- business_type:0,//0未执行到商务政策 1商务政策执行中 2商务政策成功 3商务政策失败
-
- sa:'',//特别约定
-
- if_local_bill:0,//本地开具发票
-
- fineArr:[],//精品选装
- finedIndex:-1,//精品选装索引
-
- packageList:[],//车辆选装包
- options_ids:[],//选装包id数组
- options_total:0,//选装包费用
- if_zero_firstpay:0,//是否零首付
- price_loan0:'',//首付按揭金额
- firstPayArr:['现金','0首付','按揭',],//首付类型
- firstPayIndex:0,//首付类型
+ if_zero_firstpay: 0, //是否零首付
+ firstPayArr: ['现金', '0首付', '按揭', ], //首付类型
+ firstPayIndex: 0, //首付类型
+ is_get_brand: 0, //是否店内上牌
+ is_get_insure: 0, //是否店内投保
+ color: '', //车身体颜色
+ in_color: '', //内饰颜色
+ loan_amount: '', //贷款额度
+ loan_periods: '', //贷款期数
+ monthly_payment: '', //月供
+ register_amount: '', //上牌费
+ confirm_amount: '', //定⾦
+ discount_amount: '', //⻋身优惠
+ business_type: 0,
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -90,174 +69,99 @@ Page({
})
}
- this.getAppCusorderV2()
+ this.getAppCusorder()
this.getAppSeriesBrands()
this.getUserInfo()
- this.getAppFine()
-
},
//获取订单详情
- getAppCusorderV2(){
+ getAppCusorder() {
let params = {};
params['id'] = this.data.id;
- _.apiQuery.getAppCusorderV2(params).then(res=>{
+ _.apiQuery.getAppCusorderDetails(params).then(res => {
this.setData({
- info:res.data,
- delry_time:res.data.delry_time?res.data.delry_time:'',
- sa:res.data.sa?res.data.sa:'',
- //if_fine:res.data.if_fine==1?true:false,
- 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,
- price_loan0:res.data.price_loan0,
+ info: res.data,
+ color: res.data.color,
+ in_color: res.data.in_color,
+ brand_id: res.data.brand_id,
+ series_id: res.data.series_id,
+ car_id: res.data.car_id,
+ if_zero_firstpay: res.data.if_zero_firstpay,
+ delry_time: res.data.delry_time,
+ loan_amount: res.data.money_json.loan_amount, //贷款额度
+ loan_periods: res.data.money_json.loan_periods, //贷款期数
+ monthly_payment: res.data.money_json.monthly_payment, //月供
+ register_amount: res.data.money_json.register_amount, //上牌费
+ confirm_amount: res.data.money_json.confirm_amount, //定⾦
+ discount_amount: res.data.money_json.discount_amount, //⻋身优惠
+ is_get_brand: parseInt(res.data.if_num),
+ is_get_insure: parseInt(res.data.if_insure),
})
-
+ console.log(this.data.discount_amount)
/*匹配车辆信息*/
//匹配品牌
- if(!!res.data.brand_id){
+ if (!!res.data.brand_id) {
_.apiQuery.getAppSeriesBrands().then(res1 => {
- if(res1.data.list.length>0){
+ if (res1.data.list.length > 0) {
let brandArray = []
- res1.data.list.forEach((item,index) => {
- if(item.id == res.data.brand_id){
+ res1.data.list.forEach((item, index) => {
+ if (item.id == res.data.brand_id) {
this.setData({
- brandIndex:index,
+ brandIndex: index,
})
}
brandArray.push(item.name)
})
this.setData({
- brand_id:res.data.brand_id,
- brandArray:brandArray,
- brandList:res1.data.list,
+ brand_id: res.data.brand_id,
+ brandArray: brandArray,
+ brandList: res1.data.list,
})
- //匹配车型
- if(!!res.data.car_id){
+ //匹配车系
+ if (!!res.data.series_id) {
let modeparams = {};
modeparams['brand_id'] = res.data.brand_id;
_.apiQuery.getAppSeries(modeparams).then(res2 => {
- if(res2.data.list.length>0){
+ if (res2.data.list.length > 0) {
let modelArray = []
- res2.data.list.forEach((item,index) => {
- if(item.id == res.data.car_id){
+ res2.data.list.forEach((item, index) => {
+ if (item.id == res.data.series_id) {
this.setData({
- modelIndex:index,
+ modelIndex: index,
})
}
modelArray.push(item.name)
})
this.setData({
- car_id:res.data.car_id,
- modelArray:modelArray,
- modelList:res2.data.list,
+ series_id: res.data.series_id,
+ modelArray: modelArray,
+ modelList: res2.data.list,
+ })
+ }
+ });
+ }
+ //匹配车型
+ if (!!res.data.car_id) {
+ let modeparams = {};
+ modeparams['series_id'] = res.data.series_id;
+ _.apiQuery.getAppSeriesCars(modeparams).then(res2 => {
+ if (res2.data.list.length > 0) {
+ let carArray = []
+ res2.data.list.forEach((item, index) => {
+ if (item.id == res.data.car_id) {
+ this.setData({
+ carIndex: index,
+ })
+ }
+ carArray.push(item.name)
+ })
+ this.setData({
+ car_id: res.data.car_id,
+ carArray: carArray,
+ carList: res2.data.list,
})
-
- //匹配车辆版本
- if(!!res.data.v_id){
- let levelparams = {};
- levelparams['id'] = res.data.car_id;
- levelparams['type'] = 0;
- _.apiQuery.getAppSeriesAttrs(levelparams).then(res3 => {
- if(res3.data.total>0){
- let levelArray = []
- res3.data.list.forEach((item,index) => {
- if(item.id == res.data.v_id){
- this.setData({
- levelIndex:index,
- })
- }
- levelArray.push(item.title)
- })
- this.setData({
- v_id:res.data.v_id,
- levelArray:levelArray,
- levelList:res3.data.list,
- })
-
- //匹配车身颜色
- if(!!res.data.color_id){
- let colorparams = {};
- colorparams['id'] = res.data.car_id;
- colorparams['v_id'] = res.data.v_id;
- colorparams['type'] = 1;
- _.apiQuery.getAppSeriesAttrs(colorparams).then(res4 => {
- if(res4.data.total>0){
- let colorArray = []
- res4.data.list.forEach((item,index) => {
- if(item.id == res.data.color_id){
- this.setData({
- colorIndex:index,
- })
- }
- colorArray.push(item.title)
- })
- this.setData({
- color_id:res.data.color_id,
- colorArray:colorArray,
- colorList:res4.data.list,
- })
-
- //匹配车身颜色
- if(!!res.data.incolor_id){
- let interiorparams = {};
- interiorparams['id'] = res.data.car_id;
- interiorparams['v_id'] = res.data.v_id;
- interiorparams['color_id'] = res.data.color_id;
- interiorparams['type'] = 2;
- _.apiQuery.getAppSeriesAttrs(interiorparams).then(res5 => {
- if(res5.data.total>0){
- let interiorArray = []
- res5.data.list.forEach((item,index) => {
- if(item.id == res.data.incolor_id){
- this.setData({
- interiorIndex:index,
- })
- }
- interiorArray.push(item.title)
- })
- this.setData({
- incolor_id:res.data.incolor_id,
- interiorArray:interiorArray,
- interiorList:res5.data.list,
- })
-
- //获取车辆价格
- this.setData({
- business_type:1,
- })
- let priceparams = {};
- priceparams['main_type'] = res.data.main_type;
- priceparams['car_id'] = res.data.car_id;
- priceparams['v_id'] = res.data.v_id;
- priceparams['color_id'] = res.data.color_id;
- priceparams['incolor_id'] = res.data.incolor_id;
- priceparams['oid'] = this.data.id;
- _.apiQuery.getAppBusiness(priceparams).then(res10 => {
- this.setData({
- business_type:2,
- priceinfo:res10.data,
- 'priceinfo.sdeposit':res.data.deposit?res.data.deposit:'',
- 'priceinfo.sdisc_money':res.data.disc_money?res.data.disc_money:'',
- //'priceinfo.sdisc_fine_money':res.data.disc_fine_money?res.data.disc_fine_money:'',
- })
- }).catch(res => {
- this.setData({
- business_type:3,
- })
- });
- }
- });
- }
- }
- });
- }
- }
- });
- }
}
});
}
@@ -268,283 +172,149 @@ Page({
/*匹配其他信息*/
//匹配付款方式
- if(res.data.payway==0||res.data.payway==1){
+ if (res.data.payway == 0 || res.data.payway == 1) {
let paymentIndex = -1
- if(res.data.payway==0){
+ if (res.data.payway == 0) {
paymentIndex = 1
- }else if(res.data.payway==1){
+ } else if (res.data.payway == 1) {
paymentIndex = 0
}
this.setData({
- paymentIndex:paymentIndex,
+ paymentIndex: paymentIndex,
})
- if(paymentIndex == 1){
- if(res.data.if_zero_firstpay==1){
- if(res.data.price_loan0>0){
+ if (paymentIndex == 1) {
+ if (res.data.if_zero_firstpay == 1) {
+ if (res.data.price_loan0 > 0) {
this.setData({
- firstPayIndex:2,
+ firstPayIndex: 2,
})
- }else{
+ } else {
this.setData({
- firstPayIndex:1,
+ firstPayIndex: 1,
})
}
- }else{
+ } else {
this.setData({
- firstPayIndex:0,
+ firstPayIndex: 0,
})
}
}
-
- }
-
- //匹配代办
- if(res.data.srv_arr&&res.data.srv_arr.length>0){
- let agencyparams = {};
- agencyparams['payway'] = res.data.payway;
- agencyparams['cus_id'] = res.data.cus_id;
- agencyparams['car_id'] = res.data.car_id;
- agencyparams['v_id'] = res.data.v_id;
- agencyparams['page'] = 1;
- agencyparams['size'] = 100;
- agencyparams['id'] = this.data.id;
- _.apiQuery.getAppServices(agencyparams).then(res7 => {
-
- let agencyList =res7.data.list
- let values = res.data.srv_arr
- let srv_total = 0
- agencyList.forEach(item1 => {
- item1.sprice = item1.price
- item1.checked = false
- values.forEach(item2 => {
- if(item1.id == item2.id){
- item1.checked = true
- item1.sprice = item2.price
- if(parseFloat(item2.price)>0){
- srv_total = srv_total + parseFloat(item2.price)
- }
- }
- })
- })
-
- this.setData({
- agencyList,
- srv_total,
- })
-
- });
-
- }else if(res.data.payway&&res.data.car_id&&res.data.v_id){
- let agencyparams = {};
- agencyparams['payway'] = res.data.payway;
- agencyparams['cus_id'] = res.data.cus_id;
- agencyparams['car_id'] = res.data.car_id;
- agencyparams['v_id'] = res.data.v_id;
- agencyparams['page'] = 1;
- agencyparams['size'] = 100;
- agencyparams['id'] = this.data.id;
- _.apiQuery.getAppServices(agencyparams).then(res9 => {
- let agencyList = res9.data.list
- agencyList.forEach(item => {
- item.sprice = item.price
- })
- this.setData({
- agencyList,
- })
- });
- }
-
- //匹配精品赠送
- if(res.data.fines&&res.data.fines.length>0){
- let fine_total = 0
- res.data.fines.forEach(item => {
- if(parseFloat(item.price)>0){
- fine_total = fine_total + parseFloat(item.price)
- }
- })
- this.setData({
- fines:res.data.fines,
- fine_total,
- })
- }
- /*end匹配精品赠送*/
-
- //匹配车辆选装包
- if(res.data.option_ids&&res.data.option_ids.length>0){
- let optionparams = {};
- optionparams['id'] = res.data.car_id;
- _.apiQuery.getAppOptions(optionparams).then(res11 => {
- if(res11.data.list.length>0){
- let packageList = res11.data.list
- let options_ids = res.data.option_ids
- let options_total = 0
- packageList.forEach(itemA => {
- itemA.checked = false
- options_ids.forEach(itemB => {
- if(itemA.id === itemB){
- itemA.checked = true
- if(parseFloat(itemA.price)>0){
- options_total = options_total + parseFloat(itemA.price)
- }
- }
- })
- })
- this.setData({
- packageList,
- options_ids,
- options_total,
- })
- }
- });
- }else{
- //获取车辆选装包
- this.getAppOptions()
}
})
},
//修改步骤
- optstep(e){
+ optstep(e) {
this.setData({
- step:e.currentTarget.dataset.step,
+ step: e.currentTarget.dataset.step,
})
},
//下一步
- nextstep(){
+ nextstep() {
switch (this.data.step) {
case 1:
this.setData({
- mobile:this.trimAll(this.data.mobile),
- cardid:this.trimAll(this.data.cardid),
- owner_mobile:this.trimAll(this.data.owner_mobile),
- owner_cardid:this.trimAll(this.data.owner_cardid),
+ mobile: this.trimAll(this.data.mobile),
+ cardid: this.trimAll(this.data.cardid),
+ owner_mobile: this.trimAll(this.data.owner_mobile),
+ owner_cardid: this.trimAll(this.data.owner_cardid),
})
- if (this.data.customerIndex == -1 ) {
+ if (this.data.customerIndex == -1) {
wx.showToast({
title: '请选择客户',
icon: 'none'
})
- }else if (this.data.name == '' ) {
+ } else if (this.data.name == '') {
wx.showToast({
title: '请输入客户姓名',
icon: 'none'
})
- }else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)){
+ } else if (!/^1[3456789]\d{9}$/.test(this.data.mobile)) {
wx.showToast({
title: '请输入客户手机号',
icon: 'none'
})
- }
- else if(this.data.main_type == 0&&(this.data.cardid == ''|| !/^\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.cardid))){
+ } else if (this.data.main_type == 0 && (this.data.cardid == '' || !/^\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.cardid))) {
wx.showToast({
title: '请填写正确客户身份证',
icon: 'none'
})
- }
- else if(this.data.address == ''){
- wx.showToast({
- title: '请填写联系地址',
- icon: 'none'
- })
- }
- else if(this.data.main_type == 0&&this.data.owner_name == ''){
- wx.showToast({
- title: '请填写车主姓名',
- icon: 'none'
- })
- }
- else if(this.data.main_type == 0&&!/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){
+ } else if (this.data.main_type == 0 && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)) {
wx.showToast({
title: '请填写车主手机号',
icon: 'none'
})
- }
- else if(this.data.main_type == 0&&(this.data.owner_cardid == ''|| !/^\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.owner_cardid))){
+ } else if (this.data.main_type == 0 && (this.data.owner_cardid == '' || !/^\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.owner_cardid))) {
wx.showToast({
title: '请填写正确车主身份证',
icon: 'none'
})
- }
- else if(this.data.main_type == 1&&this.data.company == ''){
+ } else if (this.data.main_type == 1 && this.data.company == '') {
wx.showToast({
title: '请填写企业名称',
icon: 'none'
})
- }
- else if(this.data.main_type == 1&&this.data.credit == ''){
+ } else if (this.data.main_type == 1 && this.data.credit == '') {
wx.showToast({
title: '请填写企业信用代码',
icon: 'none'
})
- }
- else{
+ } else {
this.setData({
- step:2,
+ step: 2,
})
}
break;
case 2:
- if(this.data.car_id == '' ){
+ if (this.data.series_id == '') {
wx.showToast({
title: '请选择车系车型',
icon: 'none'
})
- }else if(this.data.v_id == '' ){
+ } else if (this.data.car_id == '') {
wx.showToast({
title: '请选择车辆版本',
icon: 'none'
})
- }else if(this.data.color_id == '' ){
- wx.showToast({
- title: '请选择车身颜色',
- icon: 'none'
- })
- }else if(this.data.incolor_id == '' ){
- wx.showToast({
- title: '请选择内饰颜色',
- icon: 'none'
- })
- }else{
+ } else {
this.setData({
- step:3,
+ step: 3,
})
}
break;
case 3:
- if(this.data.paymentIndex == -1 ){
+ if (this.data.paymentIndex == -1) {
wx.showToast({
title: '请选择付款方式',
icon: 'none'
})
- }
- else if(this.data.delry_time == ''){
+ } else if (this.data.delry_time == '') {
wx.showToast({
title: '请输入期望交付时间',
icon: 'none'
})
- }
- else if(this.data.if_zero_firstpay!=1&&(!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'
})
- }else{
+ } else {
let that = this
that.setData({
isPreview: true,
- isFill:true,
+ isFill: true,
})
wx.pageScrollTo({
scrollTop: 0
})
-
+
that.setData({
- isShowcheck:true,
- checkCount:2,
+ isShowcheck: true,
+ checkCount: 2,
checktext: 3 + 's'
})
let interval = setInterval(res => {
@@ -561,7 +331,7 @@ Page({
})
}
}, 1000)
-
+
}
break;
@@ -569,145 +339,83 @@ Page({
},
//获取用户信息
- getUserInfo(){
+ getUserInfo() {
_.apiQuery.getUserInfo().then(res => {
this.setData({
userInfo: res,
})
-
- if(res.biz_name == '测试门店'){
- this.setData({
- address:'福建狸车科技测试门店',//地址
- cardid:'350000202101010000',//身份证
- })
- }
-
});
},
-
-
+
+
//获取车型品牌
- getAppSeriesBrands(){
+ getAppSeriesBrands() {
_.apiQuery.getAppSeriesBrands().then(res => {
- if(res.data.list.length>0){
+ if (res.data.list.length > 0) {
let brandArray = []
res.data.list.forEach(item => {
brandArray.push(item.name)
})
this.setData({
- brandArray:brandArray,
- brandList:res.data.list,
+ brandArray: brandArray,
+ brandList: res.data.list,
})
}
});
},
//获取车系车型
- getAppSeries(){
+ getAppSeries() {
let params = {};
params['brand_id'] = this.data.brand_id;
_.apiQuery.getAppSeries(params).then(res => {
- if(res.data.list.length>0){
+ if (res.data.list.length > 0) {
let modelArray = []
res.data.list.forEach(item => {
modelArray.push(item.name)
})
this.setData({
- modelArray:modelArray,
- modelList:res.data.list,
+ modelArray: modelArray,
+ modelList: res.data.list,
})
}
});
+ this.getAppCusorder
},
//获取车辆版本
- getAppSeriesAttrslevel(){
+ getAppSeriesCarlevel() {
let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 0;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
- if(res.data.total>0){
- let levelArray = []
+ params['series_id'] = this.data.series_id;
+ _.apiQuery.getAppSeriesCars(params).then(res => {
+ if (res.data.total > 0) {
+ let carArray = []
res.data.list.forEach(item => {
- levelArray.push(item.title)
+ carArray.push(item.name)
})
this.setData({
- levelArray:levelArray,
- levelList:res.data.list,
- levelIndex:-1,
+ carArray: carArray,
+ carList: res.data.list,
+ carIndex: -1,
})
}
});
},
- //获取车身颜色
- getAppSeriesAttrscolor(){
- let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 1;
- params['v_id'] = this.data.v_id;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
- if(res.data.total>0){
- let colorArray = []
- res.data.list.forEach(item => {
- colorArray.push(item.title)
- })
- this.setData({
- colorArray:colorArray,
- colorList:res.data.list,
- colorIndex:-1,
- })
- }
- });
- },
-
- //获取车型内饰颜色
- getAppSeriesAttrsinterior(){
- let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 2;
- params['v_id'] = this.data.v_id;
- params['color_id'] = this.data.color_id;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
- if(res.data.total>0){
- let interiorArray = []
- res.data.list.forEach(item => {
- interiorArray.push(item.title)
- })
- this.setData({
- interiorArray:interiorArray,
- interiorList:res.data.list,
- interiorIndex:-1,
- })
- }
- });
- },
//选择品牌
changeBrand(e) {
- if(this.data.brandIndex != e.detail.value && e.detail.value >= 0){
+ if (this.data.brandIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- brand_id:this.data.brandList[e.detail.value].id,
- brandIndex:e.detail.value,
- car_id:'',//车系id
- packageList:[],//车辆选装包
- options_ids:[],//选装包id数组
- options_total:0,//选装包费用
- v_id:'',//车辆版本id
- color_id:'',//车身颜色id
- incolor_id:'',//内饰颜色id
- b_s_id:'',//备选车型id
- modelIndex:-1,//车系车型索引
- spareIndex:-1,//备选车型索引
- colorArray:[],//车身颜色列表
- levelArray:[],//车辆版本列表
- interiorArray:[],//内饰颜色
- colorIndex:-1,//车身颜色索引
- levelIndex:-1,//车辆版本索引
- interiorIndex:-1,//内饰颜色索引
- priceinfo:'',
- business_type:0,
+ brand_id: this.data.brandList[e.detail.value].id,
+ brandIndex: e.detail.value,
+ series_id: '', //车系id
+ car_id: '', //车系id
+ modelIndex: -1, //车系车型索引
+ levelArray: [], //车辆版本列表
+ levelIndex: -1, //车辆版本索引
+ business_type: 0,
})
this.getAppSeries()
}
@@ -715,87 +423,37 @@ Page({
//选择车系
changeModel(e) {
- if(this.data.modelIndex != e.detail.value && e.detail.value >= 0){
+ if (this.data.modelIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- car_id:this.data.modelList[e.detail.value].id,
- modelIndex:e.detail.value,
- v_id:'',//车辆版本id
- color_id:'',//车身颜色id
- incolor_id:'',//内饰颜色id
- b_s_id:'',//备选车型id
- spareIndex:-1,//备选车型索引
- colorArray:[],//车身颜色列表
- levelArray:[],//车辆版本列表
- interiorArray:[],//内饰颜色
- colorIndex:-1,//车身颜色索引
- levelIndex:-1,//车辆版本索引
- interiorIndex:-1,//内饰颜色索引
- priceinfo:'',
- business_type:0,
- options_ids:[],//选装包id数组
- options_total:0,//选装包费用
+ car_id: this.data.modelList[e.detail.value].id,
+ modelIndex: e.detail.value,
+ car_id: '', //车辆版本id
+ carArray: [], //车辆版本列表
+ business_type: 0,
})
- this.getAppSeriesAttrslevel()
- //获取车辆选装包
- this.getAppOptions()
+ this.getAppSeriesCarlevel()
}
},
//车辆版本
- changeLevel(e) {
- if(this.data.levelIndex != e.detail.value && e.detail.value >= 0){
+ changeCar(e) {
+ if (this.data.levelIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- v_id:this.data.levelList[e.detail.value].id,
- levelIndex:e.detail.value,
- color_id:'',//车身颜色id
- incolor_id:'',//内饰颜色id
- colorArray:[],//车身颜色列表
- interiorArray:[],//内饰颜色
- colorIndex:-1,//车身颜色索引
- interiorIndex:-1,//内饰颜色索引
- priceinfo:'',
- business_type:0,
+ car_id: this.data.carList[e.detail.value].id,
+ carIndex: e.detail.value,
+ business_type: 0,
})
- this.getAppSeriesAttrscolor()
- }
- },
-
- //车身颜色
- changeColor(e) {
- if(this.data.colorIndex != e.detail.value && e.detail.value >= 0){
- this.setData({
- color_id:this.data.colorList[e.detail.value].id,
- colorIndex:e.detail.value,
- incolor_id:'',//内饰颜色id
- interiorArray:[],//内饰颜色
- interiorIndex:-1,//内饰颜色索引
- priceinfo:'',
- business_type:0,
- })
- this.getAppSeriesAttrsinterior()
- }
- },
-
- //内饰颜色
- changeInterior(e) {
- if(this.data.interiorIndex != e.detail.value && e.detail.value >= 0){
- this.setData({
- incolor_id:this.data.interiorList[e.detail.value].id,
- interiorIndex:e.detail.value,
- business_type:0,
- })
- this.getAppBusiness()
}
},
//付款方式
changePayment(e) {
- if(this.data.paymentIndex != e.detail.value && e.detail.value >= 0){
+ if (this.data.paymentIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- paymentIndex:e.detail.value,
- price_loan0:'',
- if_zero_firstpay:0,
- firstPayIndex:0,
+ paymentIndex: e.detail.value,
+ price_loan0: '',
+ if_zero_firstpay: 0,
+ firstPayIndex: 0,
})
//代办列表
this.getAppServices()
@@ -805,78 +463,12 @@ Page({
//购车主体
changeMain(e) {
this.setData({
- mainIndex:e.detail.value,
+ mainIndex: e.detail.value,
})
},
- //获取车辆价格
- getAppBusiness(){
- if(this.data.car_id != ''&&this.data.v_id != ''&&this.data.color_id != ''&&this.data.incolor_id != ''){
- this.setData({
- business_type:1,
- })
- let params = {};
- params['main_type'] = this.data.info.main_type;
- params['car_id'] = this.data.car_id;
- params['v_id'] = this.data.v_id;
- params['color_id'] = this.data.color_id;
- params['incolor_id'] = this.data.incolor_id;
- params['oid'] = this.data.id;
- _.apiQuery.getAppBusiness(params).then(res => {
- this.setData({
- business_type:2,
- priceinfo:res.data,
- })
- if(this.data.info.deposit){
- this.setData({
- 'priceinfo.sdeposit':this.data.info.deposit,
- })
- }
- }).catch(res => {
- this.setData({
- business_type:3,
- })
- });
- }
- },
-
- //获取代办服务列表
- getAppServices(){
- if(this.data.paymentIndex != -1&&this.data.car_id != ''&&this.data.v_id != ''){
- let params = {};
- params['payway'] = this.data.paymentIndex==0?'1':'0';
- params['cus_id'] = this.data.info.cus_id;
- params['car_id'] = this.data.car_id;
- params['v_id'] = this.data.v_id;
- params['page'] = 1;
- params['size'] = 100;
- params['id'] = this.data.id;
- _.apiQuery.getAppServices(params).then(res => {
-
- let agencyList = res.data.list
- let srv_total = 0
- agencyList.forEach(item => {
- item.sprice = item.price
- if(this.data.userInfo.biz_type==1){
- if(item.id==1||item.id==2){
- item.checked = true
- if(parseFloat(item.price)>0){
- srv_total = srv_total + parseFloat(item.price)
- }
- }
- }
- })
- this.setData({
- agencyList,
- srv_total,
- })
-
- });
- }
- },
-
//建卡时间
- delryTime(e){
+ delryTime(e) {
this.setData({
delry_time: e.detail.value,
})
@@ -891,7 +483,7 @@ Page({
let fines = []
that.data.fines.forEach(item => {
- if(item.txt!=''){
+ if (item.txt != '') {
fines.push(item)
}
});
@@ -900,43 +492,39 @@ Page({
params['id'] = that.data.id;
params['car_id'] = that.data.car_id;
params['v_id'] = that.data.v_id;
- params['color_id'] = that.data.color_id;
- params['incolor_id'] = that.data.incolor_id;
- if(that.data.options_ids.length>0){
- params['options_ids'] = that.data.options_ids;
- }
+
params['price'] = that.data.priceinfo.price;
- if(that.data.if_zero_firstpay!=1){
+ 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['business_id'] = that.data.priceinfo.id;
- params['disc_money'] = that.data.priceinfo.sdisc_money?that.data.priceinfo.sdisc_money:0;
+ params['disc_money'] = that.data.priceinfo.sdisc_money ? that.data.priceinfo.sdisc_money : 0;
params['sa'] = that.data.sa;
- if(that.data.priceinfo.show_local_bill){
+ if (that.data.priceinfo.show_local_bill) {
params['if_local_bill'] = that.data.if_local_bill;
}
- if(that.data.paymentIndex==1){
+ if (that.data.paymentIndex == 1) {
params['if_zero_firstpay'] = that.data.if_zero_firstpay;
}
- if(that.data.price_loan0 > 0){
+ if (that.data.price_loan0 > 0) {
params['price_loan0'] = that.data.price_loan0;
}
let srv_arr = []
that.data.agencyList.forEach(item => {
- if(item.checked){
+ if (item.checked) {
srv_arr.push({
- id:item.id,
- key:item.key,
- price:item.sprice,
+ id: item.id,
+ key: item.key,
+ price: item.sprice,
})
}
})
params['srv_arr'] = srv_arr;
-
+
params['fines'] = fines;
//精品优惠金额
// if(that.data.priceinfo.fine_money){
@@ -952,7 +540,7 @@ Page({
let prevPage = null; //上一个页面
if (pages.length >= 2) {
prevPage = pages[pages.length - 2]; //上一个页面
- if(prevPage.route == 'pages/order/index'){
+ if (prevPage.route == 'pages/order/index') {
prevPage.onPullDownRefresh()
}
}
@@ -962,24 +550,24 @@ Page({
content: '',
confirmText: "查看详情",
confirmColor: "#36afa2",
- showCancel:false,
+ showCancel: false,
success() {
wx.redirectTo({
url: '/pages/order/detail/index2?id=' + that.data.id
})
}
})
- }).catch(res=>{
+ }).catch(res => {
that.setData({
submitFlag: false,
})
});
},
- //显示隐藏预览
- optPreview(e) {
+ //显示隐藏预览
+ optPreview(e) {
this.setData({
- isPreview:!this.data.isPreview,
+ isPreview: !this.data.isPreview,
})
wx.pageScrollTo({
scrollTop: 0
@@ -987,16 +575,16 @@ Page({
},
//显示隐藏预览提示
- optShowcheck(){
+ optShowcheck() {
this.setData({
- isShowcheck:!this.data.isShowcheck,
+ isShowcheck: !this.data.isShowcheck,
})
},
//显示隐藏意向金备注
- optShowRemarks(){
+ optShowRemarks() {
this.setData({
- isShowRemarks:!this.data.isShowRemarks,
+ isShowRemarks: !this.data.isShowRemarks,
})
},
@@ -1008,28 +596,28 @@ Page({
},
//选择客户
- radioPicker(e){
- if(e.currentTarget.dataset.index != this.data.customerIndex){
+ radioPicker(e) {
+ if (e.currentTarget.dataset.index != this.data.customerIndex) {
this.setData({
isSubmiting: false,
- customerIndex:e.currentTarget.dataset.index,
- name:this.data.customer[e.currentTarget.dataset.index].name,
- mobile:this.data.customer[e.currentTarget.dataset.index].complete_mobile,
+ customerIndex: e.currentTarget.dataset.index,
+ name: this.data.customer[e.currentTarget.dataset.index].name,
+ mobile: this.data.customer[e.currentTarget.dataset.index].complete_mobile,
})
}
},
//显示选择客户
- showSelectCustomer(){
+ showSelectCustomer() {
this.setData({
- isShowSelectCustomer:true,
+ isShowSelectCustomer: true,
})
},
//确认选择客户
- hideSelectCustomer(){
+ hideSelectCustomer() {
this.setData({
- isShowSelectCustomer:false,
+ isShowSelectCustomer: false,
})
},
@@ -1041,10 +629,10 @@ Page({
agencyList.forEach(item1 => {
item1.checked = false
values.forEach(item2 => {
- if(item1.id == item2){
+ if (item1.id == item2) {
item1.checked = true
- if(parseFloat(item1.sprice)>0){
- srv_total = srv_total + parseFloat(item1.sprice)
+ if (parseFloat(item1.sprice) > 0) {
+ srv_total = srv_total + parseFloat(item1.sprice)
}
}
})
@@ -1057,39 +645,39 @@ Page({
},
//精品尊享版
- changeFineBag(){
+ changeFineBag() {
this.setData({
- if_fine:!this.data.if_fine,
- 'priceinfo.sdisc_fine_money':'',
+ if_fine: !this.data.if_fine,
+ 'priceinfo.sdisc_fine_money': '',
})
},
//添加精品
- addFine(){
+ addFine() {
this.data.fines.push({
- txt:'',
- price:'',
+ txt: '',
+ price: '',
})
this.setData({
- fines:this.data.fines,
+ fines: this.data.fines,
})
},
//添加精品
- inputFines(e){
- if(e.currentTarget.dataset.type=='txt'){
+ inputFines(e) {
+ if (e.currentTarget.dataset.type == 'txt') {
this.setData({
- ['fines['+e.currentTarget.dataset.index+'].txt']:e.detail.value,
+ ['fines[' + e.currentTarget.dataset.index + '].txt']: e.detail.value,
})
}
- if(e.currentTarget.dataset.type=='price'){
+ if (e.currentTarget.dataset.type == 'price') {
this.setData({
- ['fines['+e.currentTarget.dataset.index+'].price']:Number(e.detail.value),
+ ['fines[' + e.currentTarget.dataset.index + '].price']: Number(e.detail.value),
})
let fine_total = 0
this.data.fines.forEach(item => {
- if(parseFloat(item.price)>0){
- fine_total = fine_total + parseFloat(item.price)
+ if (parseFloat(item.price) > 0) {
+ fine_total = fine_total + parseFloat(item.price)
}
})
this.setData({
@@ -1099,14 +687,14 @@ Page({
},
//快截输入代办价格
- fillAgency(e){
+ fillAgency(e) {
this.setData({
- ['agencyList['+e.currentTarget.dataset.index+'].sprice']:parseFloat(e.currentTarget.dataset.sprice),
+ ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: parseFloat(e.currentTarget.dataset.sprice),
})
let srv_total = 0
this.data.agencyList.forEach(item => {
- if(item.checked&&parseFloat(item.sprice)>0){
- srv_total = srv_total + parseFloat(item.sprice)
+ if (item.checked && parseFloat(item.sprice) > 0) {
+ srv_total = srv_total + parseFloat(item.sprice)
}
})
this.setData({
@@ -1115,14 +703,14 @@ Page({
},
//修改代办金额
- inputAgency(e){
+ inputAgency(e) {
this.setData({
- ['agencyList['+e.currentTarget.dataset.index+'].sprice']:parseFloat(e.detail.value),
+ ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: parseFloat(e.detail.value),
})
let srv_total = 0
this.data.agencyList.forEach(item => {
- if(item.checked&&parseFloat(item.sprice)>0){
- srv_total = srv_total + parseFloat(item.sprice)
+ if (item.checked && parseFloat(item.sprice) > 0) {
+ srv_total = srv_total + parseFloat(item.sprice)
}
})
this.setData({
@@ -1131,19 +719,19 @@ Page({
},
//判断修改代办金额
- inputBlurAgency(e){
- if(!this.data.agencyList[e.currentTarget.dataset.index].sprice||this.data.agencyList[e.currentTarget.dataset.index].price>parseFloat(this.data.agencyList[e.currentTarget.dataset.index].sprice)){
+ inputBlurAgency(e) {
+ if (!this.data.agencyList[e.currentTarget.dataset.index].sprice || this.data.agencyList[e.currentTarget.dataset.index].price > parseFloat(this.data.agencyList[e.currentTarget.dataset.index].sprice)) {
wx.showToast({
title: '代办费设置过低',
icon: 'none'
})
this.setData({
- ['agencyList['+e.currentTarget.dataset.index+'].sprice']:this.data.agencyList[e.currentTarget.dataset.index].price,
+ ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: this.data.agencyList[e.currentTarget.dataset.index].price,
})
let srv_total = 0
this.data.agencyList.forEach(item => {
- if(item.checked&&parseFloat(item.sprice)>0){
- srv_total = srv_total + parseFloat(item.sprice)
+ if (item.checked && parseFloat(item.sprice) > 0) {
+ srv_total = srv_total + parseFloat(item.sprice)
}
})
this.setData({
@@ -1153,270 +741,131 @@ Page({
},
//选择定金
- fillDeposit(e){
+ fillDeposit(e) {
this.setData({
- 'priceinfo.sdeposit':parseFloat(e.currentTarget.dataset.deposit),
+ 'priceinfo.sdeposit': parseFloat(e.currentTarget.dataset.deposit),
})
},
//修改定金
- inputDeposit(e){
+ inputDeposit(e) {
this.setData({
- 'priceinfo.sdeposit':parseFloat(e.detail.value),
+ 'priceinfo.sdeposit': parseFloat(e.detail.value),
})
},
//判断修改定金是否小于限制
- inputBlurDeposit(e){
- if(!this.data.priceinfo.sdeposit||this.data.priceinfo.deposit>parseFloat(this.data.priceinfo.sdeposit)){
+ inputBlurDeposit(e) {
+ if (!this.data.priceinfo.sdeposit || this.data.priceinfo.deposit > parseFloat(this.data.priceinfo.sdeposit)) {
wx.showToast({
title: '定金设置过低',
icon: 'none'
})
this.setData({
- 'priceinfo.sdeposit':this.data.priceinfo.deposit,
+ 'priceinfo.sdeposit': this.data.priceinfo.deposit,
})
}
},
//选择车身优惠
- fillDisc_money(e){
+ fillDisc_money(e) {
this.setData({
- 'priceinfo.sdisc_money':parseFloat(e.currentTarget.dataset.disc_money),
+ 'priceinfo.sdisc_money': parseFloat(e.currentTarget.dataset.disc_money),
})
},
//修改车身优惠
- inputDisc_money(e){
+ inputDisc_money(e) {
this.setData({
- 'priceinfo.sdisc_money':parseFloat(e.detail.value),
+ 'priceinfo.sdisc_money': parseFloat(e.detail.value),
})
},
//判断修改车身优惠是否小于限制
- inputBlurDisc_money(e){
- if(this.data.priceinfo.dis_money {
- let fineList = res.data.list
- let fineArr = []
- fineList.forEach(item => {
- fineArr.push(item.title)
- item.price=''
- })
- fineArr.push('其他')
- this.setData({
- fineArr,
- fineList,
- })
- });
- },
-
- //添加精品选装
- changeFine(e) {
- if(this.data.fineArr[e.detail.value]=='其他'){
- this.data.fines.push({
- txt:'',
- price:'',
- })
- this.setData({
- finedIndex:-1,
- fines:this.data.fines,
- })
- }else{
- let fid = this.data.fineList[e.detail.value].id
- let isadd = false
- this.data.fines.forEach(item => {
- if(item.id == fid){
- isadd = true
- }
- })
- if(isadd){
- wx.showToast({
- title: '您已添加过了',
- icon: 'none',
- duration: 2000
- })
- }else{
- this.data.fineList.forEach(item => {
- if(item.id == fid){
- this.data.fines.push({
- id:item.id,
- txt:item.title,
- price:'',
- })
- this.setData({
- finedIndex:-1,
- fines:this.data.fines,
- })
- }
- })
- }
- }
-
- },
-
- //删除精品选装
- delFine(e){
- let that = this
- wx.showModal({
- title: '确定删除吗?',
- content: '',
- confirmText: "确定删除",
- confirmColor: "#36afa2",
- cancelText: "取消",
- cancelColor: "#666",
- success(res) {
- if (res.confirm) {
- let fines = that.data.fines
- fines.splice(e.currentTarget.dataset.index, 1)
- that.setData({
- fines,
- })
- let fine_total = 0
- that.data.fines.forEach(item => {
- if(parseFloat(item.price)>0){
- fine_total = fine_total + parseFloat(item.price)
- }
- })
- that.setData({
- fine_total,
- })
- }
- }
+ if_local_bill: e.detail.value ? 1 : 0
})
},
//页面相关事件处理函数--监听用户下拉动作
- onPullDownRefresh(){
+ onPullDownRefresh() {
this.getAppCusorderV2()
},
//去除空格
- trimAll(ele){
- if(typeof ele === 'string'){
- return ele.split(' ').join('');
- }else{
- console.error(`${typeof ele} is not the expected type, but the string type is expected`)
+ trimAll(ele) {
+ if (typeof ele === 'string') {
+ return ele.split(' ').join('');
+ } else {
+ console.error(`${typeof ele} is not the expected type, but the string type is expected`)
}
},
- //获取车辆选装包
- getAppOptions(){
- let params = {};
- params['id'] = this.data.car_id;
- _.apiQuery.getAppOptions(params).then(res => {
- if(res.data.list.length>0){
- let packageList = res.data.list
- packageList.forEach(item => {
- item.checked = false
- })
- this.setData({
- packageList,
- })
- }
- });
- },
-
- //选择车辆选装包
- choosePackage(e) {
- let packageList = this.data.packageList
- let options_ids = e.detail.value
- let options_total = 0
- packageList.forEach(itemA => {
- itemA.checked = false
- options_ids.forEach(itemB => {
- if(itemA.id === itemB){
- itemA.checked = true
- if(parseFloat(itemA.price)>0){
- options_total = options_total + parseFloat(itemA.price)
- }
- }
- })
- })
-
- this.setData({
- packageList,
- options_ids,
- options_total,
- })
- },
//选择首付类型
changeFirstPay(e) {
- if(this.data.firstPayIndex != e.detail.value && e.detail.value >= 0){
+ if (this.data.firstPayIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- firstPayIndex:e.detail.value,
- price_loan0:'',
- 'priceinfo.sdeposit':'',
+ firstPayIndex: e.detail.value,
+ price_loan0: '',
+ 'priceinfo.sdeposit': '',
})
- if(this.data.firstPayArr[this.data.firstPayIndex]=='0首付'||this.data.firstPayArr[this.data.firstPayIndex]=='按揭'){
+ if (this.data.firstPayArr[this.data.firstPayIndex] == '0首付' || this.data.firstPayArr[this.data.firstPayIndex] == '按揭') {
this.setData({
- if_zero_firstpay:1,
+ if_zero_firstpay: 1,
})
- }
- else{
+ } else {
this.setData({
- if_zero_firstpay:0,
+ if_zero_firstpay: 0,
})
}
}
diff --git a/pages/order/edit/index2.wxml b/pages/order/edit/index2.wxml
index 1f806ac..d20fdee 100644
--- a/pages/order/edit/index2.wxml
+++ b/pages/order/edit/index2.wxml
@@ -35,57 +35,25 @@
车辆版本*
-
- 请选择
- {{levelArray[levelIndex]}}
+
+ 请选择
+ {{carArray[carIndex]}}
-
- 车身颜色*
-
-
- 请选择
- {{colorArray[colorIndex]}}
-
-
-
+
+ 车身颜色
+
-
- 内饰颜色*
-
-
- 请选择
- {{interiorArray[interiorIndex]}}
-
-
-
+
+ 内饰颜色
+
-
-
-
- 选装
-
-
-
-
-
-
-
-
+
付款方式*
@@ -95,10 +63,6 @@
-
- 付款方式
- {{payment[paymentIndex]}}
-
期望交付时间*
@@ -109,234 +73,68 @@
-
- 平台售价
- {{priceinfo.price}}元
-
-
- 颜色加价
- {{priceinfo.price_color}}元
-
-
- 公司加价
- {{priceinfo.price_coplus}}元
-
-
-
- 首付类型
- {{firstPayArr[firstPayIndex]}}
-
-
- 首付按揭金额
- {{price_loan0}}
-
-
-
-
- 首付类型
-
-
- 请选择
- {{firstPayArr[firstPayIndex]}}
-
-
-
-
-
- 首付按揭金额
-
-
-
-
-
-
-
-
- 定金
- {{priceinfo.sdeposit}}元
-
-
- 最终售价
- {{options_total+priceinfo.price+priceinfo.price_color+priceinfo.price_coplus-(priceinfo.sdisc_money>0?priceinfo.sdisc_money:0)}}元
-
-
-
-
- 定金*
+
+ 首付类型
-
-
-
- {{item}}
-
-
-
-
-
-
-
-
-
- 优惠
- {{priceinfo.sdisc_money}}元
-
-
-
-
- 车身优惠
-
-
-
-
- {{item}}
-
-
-
-
-
-
-
-
-
-
-
-
- 委托代办
- {{srv_total}}元
-
-
-
- {{item.title}}
-
- {{item.sprice}}元
- {{item.text}}
-
-
-
-
- 精品选装
- {{fine_total}}元
-
-
-
- {{item.txt}}
-
- {{item.price}}元
-
-
-
-
-
-
-
-
- 委托代办
-
- 总计:{{srv_total}}元
-
-
-
-
-
-
-
-
-
- {{price_list}}
-
-
-
- {{item.text}}
-
-
-
-
-
-
-
- 精品选装
-
- 总计:{{fine_total}}元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加
+
+ 请选择
+ {{firstPayArr[firstPayIndex]}}
+
-
-
-
-
-
-
- {{item.txt}}
-
-
-
+
+
+ 贷款额度
+
+
-
+
+
+ 贷款期数
+
+
+
+
+
+ ⽉供
+
+
+
+
-
-
-
- 特别约定
- {{sa}}
-
-
- 特别约定
-
-
-
-
- 需开具本地发票
+
+ 是否店内上牌
-
+
+
+
+
+ 是否店内投保
+
+
+
+
+
+ 上牌费
+
+
+
+
+
+ 定⾦
+
+
+
+
+
+ ⻋身优惠
+
+
-
@@ -364,7 +162,7 @@
车辆版本
{{levelArray[levelIndex]}}
-
+
车身颜色
{{colorArray[colorIndex]}}
@@ -490,8 +288,8 @@
-
- 选择客户
+
+ 选择客户
@@ -506,12 +304,12 @@
确定
-
+
-
-
+
+
请确认填写信息准确无误!
-
+
{{checktext}}
-
+
-
-
+
+
意向金:旨在客户尚未明确购车决策时(车型、付款方式等),在不需要签订合同的情况下,收取订车费用锁定客户
知道了
-
+
\ No newline at end of file
diff --git a/pages/order/editBuyer/index.js b/pages/order/editBuyer/index.js
index aa176e6..e19de95 100644
--- a/pages/order/editBuyer/index.js
+++ b/pages/order/editBuyer/index.js
@@ -24,7 +24,7 @@ Page({
getAppCusorderV2(){
let params = {};
params['id'] = this.data.id;
- _.apiQuery.getAppCusorderV2(params).then(res=>{
+ _.apiQuery.getAppCusorderDetails(params).then(res=>{
this.setData({
name:res.data.name?res.data.name:'',
mobile:res.data.mobile?res.data.mobile:'',
diff --git a/pages/order/index.js b/pages/order/index.js
index 9d0f318..c703aab 100644
--- a/pages/order/index.js
+++ b/pages/order/index.js
@@ -42,7 +42,7 @@ Page({
[key]: options[key]
})
}
- this.getAppCusorderV2Tabs()
+ this.getAppCusorderTabs()
//销售顾问
this.getAppUserAdmins()
@@ -53,15 +53,15 @@ Page({
},
//订单-tab
- getAppCusorderV2Tabs() {
- _.apiQuery.getAppCusorderV2Tabs().then(res => {
+ getAppCusorderTabs() {
+ _.apiQuery.getAppCusorderTabs().then(res => {
this.setData({
filters:res.data.filters,
tab:res.data.tabs,
key:this.data.key==''?res.data.tabs[0].key:this.data.key,
})
- this.getAppCusorderV2List()
+ this.getAppCusorderList()
wx.stopPullDownRefresh()
});
@@ -86,7 +86,7 @@ Page({
},
//获取订单列表
- getAppCusorderV2List() {
+ getAppCusorderList() {
this.setData({
load: false,
loading: true,
@@ -129,7 +129,7 @@ Page({
if(this.data.v_id!=''){
params['v_id'] = this.data.v_id;
}
- _.apiQuery.getAppCusorderV2List(params).then(res => {
+ _.apiQuery.getAppCusorderList(params).then(res => {
this.setData({
flag: this.data.flag - 1
})
@@ -183,7 +183,7 @@ Page({
loading: false,
flag: this.data.flag + 1
})
- this.getAppCusorderV2List()
+ this.getAppCusorderList()
},
//输入
@@ -464,7 +464,7 @@ Page({
loading: false,
flag: this.data.flag + 1
})
- this.getAppCusorderV2List()
+ this.getAppCusorderList()
},
//页面上拉触底事件的处理函数
@@ -473,7 +473,7 @@ Page({
this.setData({
flag: this.data.flag + 1
})
- this.getAppCusorderV2List()
+ this.getAppCusorderList()
},
})
\ No newline at end of file
diff --git a/pages/order/index.wxml b/pages/order/index.wxml
index 29f5cd1..d081369 100644
--- a/pages/order/index.wxml
+++ b/pages/order/index.wxml
@@ -13,7 +13,7 @@
-
@@ -53,117 +53,42 @@
-
-
-
-
- {{item.name}}({{item.mobile}})
-
-
-
- 车主姓名
- {{item.owner_name}}
-
-
- 车主电话
- {{item.owner_mobile}}
-
-
- 企业名称
- {{item.company}}
-
-
-
-
-
-
-
-
- {{key}}
-
-
- {{pin.value}}
- 移交
-
-
-
-
-
- {{lable.value}}
-
-
-
- {{pin.value}}
- {{pin.value}}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{key}}
-
-
- {{pin.value}}
- 移交
-
-
-
-
-
- {{lable.value}}
-
-
-
- {{pin.value}}
- {{pin.value}}
-
-
-
-
-
-
-
- 注:{{item.remark}}
+
+ {{item.status_name}}
+
+ {{item.name}}({{item.mobile}})
+
-
-
-
- {{item.status_name}}
-
- {{item.name}}({{item.mobile}})
-
-
+
+
+
-
-
+
{{key}}
- {{value}}
+ {{pin.value}}
移交
- {{value}}
+
+
+
+ {{lable.value}}
+
+
+
+ {{pin.value}}
+ {{pin.value}}
+
+
+
-
- 注:{{item.remark}}
-
-
-
+
+ 注:{{item.remark}}
+
@@ -269,8 +194,8 @@
-
-
+
+
销售顾问
@@ -284,5 +209,5 @@
-
+
\ No newline at end of file
diff --git a/pages/order/register/index.js b/pages/order/register/index.js
index ff949dc..e99a81a 100644
--- a/pages/order/register/index.js
+++ b/pages/order/register/index.js
@@ -18,32 +18,17 @@ Page({
step: 1,
name: '', //姓名
mobile: '', //手机号
- cardid: '', //身份证
- address: '', //地址
- owner_name: '', //车主姓名
- owner_mobile: '', //车主手机号
- owner_cardid: '', //车主身份证
- company: '', //企业名称
- credit: '', //企业信用代码
+ cardid: '350802198901150000', //身份证
brand_id: '', //品牌
- car_id: '', //车系id
- v_id: '', //车辆版本id
- color_id: '', //车身颜色id
- incolor_id: '', //内饰颜色id
- b_s_id: '', //备选车型id
- buy_time: '', //预计购车时间
+ series_id: '', //车系id
+ car_id: '', //车辆版本id
brandIndex: -1, //车辆品牌索引
modelIndex: -1, //车系车型索引
spareIndex: -1, //备选车型索引
colorArray: [], //车身颜色列表
- levelArray: [], //车辆版本列表
- interiorArray: [], //内饰颜色
- colorIndex: -1, //车身颜色索引
- levelIndex: -1, //车辆版本索引
- interiorIndex: -1, //内饰颜色索引
- priceinfo: '', //车辆价格
+ carArray: [], //车辆版本列表
+ carIndex: -1, //车辆版本索引
delry_time: '', //期望交付时间
- inten_money: '', //意向金
submitFlag: false,
paymentIndex: -1, //付款方式
@@ -64,47 +49,23 @@ Page({
isShowcheck: false, //是否显示预览核对弹框
checkCount: 2,
checktext: '3s',
- srv_total: 0, //代办费用
- agencyList: [], //代办数组
- fine_total: 0, //精品费用
isShowSuccess: false, //是否显示成功提示
isShowContract: false, //是否显示生成合同
- //if_fine:false,//精品尊享包
-
- fines: [], //精品赠送
-
- business_type: 0, //0未执行到商务政策 1商务政策执行中 2商务政策成功 3商务政策失败
-
- isShowIntenMoney: false, //是否显示意向金弹框
- isShowAddress: false, //是否显示地址弹框
- //region: ['福建省', '', ''],
- c_city_id: '',
- oncardArray: [], //上牌城市
- oncardIndex: -1, //上牌城市索引
-
- sa: '', //特别约定
-
- if_local_bill: 0, //本地开具发票
-
- customer_cardidpic: '', //客户身份证正面照
- owner_cardidpic: '', //车主身份证正面照
-
- fineArr: [], //精品选装
- finedIndex: -1, //精品选装索引
-
- addressFocus: false,
- customer_address: '',
- packageList: [], //车辆选装包
- options_ids: [], //选装包id数组
- options_total: 0, //选装包费用
if_zero_firstpay: 0, //是否零首付
- price_loan0: '', //首付按揭金额
firstPayArr: ['现金', '0首付', '按揭', ], //首付类型
firstPayIndex: 0, //首付类型
- is_get_brand: false, //20240526是否店内上牌
- is_get_insure: false, //20240526是否店内投保
+ is_get_brand: 0, //20240526是否店内上牌
+ is_get_insure: 0, //20240526是否店内投保
+ color: '', //车身体颜色
+ in_color: '', //内饰颜色
+ loan_amount: '', //贷款额度
+ loan_periods: '', //贷款期数
+ monthly_payment: '', //月供
+ register_amount: '', //上牌费
+ confirm_amount: '', //定⾦
+ discount_amount: '', //⻋身优惠
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -137,8 +98,6 @@ Page({
this.setData({
mobile: this.trimAll(this.data.mobile),
cardid: this.trimAll(this.data.cardid),
- owner_mobile: this.trimAll(this.data.owner_mobile),
- owner_cardid: this.trimAll(this.data.owner_cardid),
})
if (this.data.name == '') {
wx.showToast({
@@ -150,37 +109,12 @@ Page({
title: '请输入客户手机号',
icon: 'none'
})
- } else if (this.data.cardid == '' || !/^\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.cardid)) {
+ } else if (this.data.main_type == 0 && (this.data.cardid == '' || !/^\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.cardid))) {
wx.showToast({
title: '请填写正确客户身份证',
icon: 'none'
})
- }
- // else if(this.data.main_type == 0&&this.data.owner_name == ''){
- // wx.showToast({
- // title: '请填写车主姓名',
- // icon: 'none'
- // })
- // }
- // else if(this.data.main_type == 0&&this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)){
- // wx.showToast({
- // title: '请填写车主手机号',
- // icon: 'none'
- // })
- // }
- // else if(this.data.main_type == 0&&(this.data.owner_cardid == ''|| !/^\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.owner_cardid))){
- // wx.showToast({
- // title: '请填写正确车主身份证',
- // icon: 'none'
- // })
- // }
- // else if(this.data.main_type == 0&&(this.data.address == '')){
- // wx.showToast({
- // title: '请填写车主地址',
- // icon: 'none'
- // })
- // }
- else if (this.data.main_type == 1 && this.data.company == '') {
+ } else if (this.data.main_type == 1 && this.data.company == '') {
wx.showToast({
title: '请填写企业名称',
icon: 'none'
@@ -190,40 +124,23 @@ Page({
title: '请填写企业信用代码',
icon: 'none'
})
- }
- // else if(this.data.c_city_id == ''){
- // wx.showToast({
- // title: '请选择上牌城市',
- // icon: 'none'
- // })
- // }
- else {
+ } else {
this.setData({
step: 2,
})
}
break;
case 2:
- if (this.data.car_id == '') {
+ if (this.data.series_id == '') {
wx.showToast({
title: '请选择车系车型',
icon: 'none'
})
- } else if (this.data.v_id == '') {
+ } else if (this.data.car_id == '') {
wx.showToast({
title: '请选择车辆版本',
icon: 'none'
})
- // }else if(this.data.color_id == '' ){
- // wx.showToast({
- // title: '请选择车身颜色',
- // icon: 'none'
- // })
- // }else if(this.data.incolor_id == '' ){
- // wx.showToast({
- // title: '请选择内饰颜色',
- // icon: 'none'
- // })
} else {
this.setData({
step: 3,
@@ -236,20 +153,12 @@ Page({
title: '请选择付款方式',
icon: 'none'
})
- }
- // else if(this.data.delry_time == ''){
- // wx.showToast({
- // title: '请输入期望交付时间',
- // icon: 'none'
- // })
- // }
- else if (this.data.if_zero_firstpay != 1 && (!this.data.priceinfo.sdeposit || this.data.priceinfo.sdeposit == '')) {
+ } else if (this.data.delry_time == '') {
wx.showToast({
- title: '请设置定金',
+ title: '请选择交付时间',
icon: 'none'
})
} else {
-
let that = this
that.setData({
isPreview: true,
@@ -278,7 +187,6 @@ Page({
})
}
}, 1000)
-
}
break;
@@ -291,23 +199,6 @@ Page({
this.setData({
userInfo: res,
})
-
- if (res.biz_type != 1) {
- this.setData({
- fines: [{
- "id": "-1",
- "txt": "服务费",
- "price": ""
- }], //身份证
- })
- }
-
- if (res.biz_name == '测试门店') {
- this.setData({
- cardid: '350000202101010000', //身份证
- })
- }
-
});
},
@@ -345,64 +236,20 @@ Page({
});
},
- //获取车辆版本
- getAppSeriesAttrslevel() {
+ //获取车辆
+ getAppSeriesCars() {
let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 0;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
+ params['series_id'] = this.data.series_id;
+ _.apiQuery.getAppSeriesCars(params).then(res => {
if (res.data.total > 0) {
- let levelArray = []
+ let carArray = []
res.data.list.forEach(item => {
- levelArray.push(item.title)
+ carArray.push(item.name)
})
this.setData({
- levelArray: levelArray,
- levelList: res.data.list,
- levelIndex: -1,
- })
- }
- });
- },
-
- //获取车身颜色
- getAppSeriesAttrscolor() {
- let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 1;
- params['v_id'] = this.data.v_id;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
- if (res.data.total > 0) {
- let colorArray = []
- res.data.list.forEach(item => {
- colorArray.push(item.title)
- })
- this.setData({
- colorArray: colorArray,
- colorList: res.data.list,
- colorIndex: -1,
- })
- }
- });
- },
-
- //获取车型内饰颜色
- getAppSeriesAttrsinterior() {
- let params = {};
- params['id'] = this.data.car_id;
- params['type'] = 2;
- params['v_id'] = this.data.v_id;
- params['color_id'] = this.data.color_id;
- _.apiQuery.getAppSeriesAttrs(params).then(res => {
- if (res.data.total > 0) {
- let interiorArray = []
- res.data.list.forEach(item => {
- interiorArray.push(item.title)
- })
- this.setData({
- interiorArray: interiorArray,
- interiorList: res.data.list,
- interiorIndex: -1,
+ carArray: carArray,
+ carList: res.data.list,
+ carIndex: -1,
})
}
});
@@ -414,23 +261,10 @@ Page({
this.setData({
brand_id: this.data.brandList[e.detail.value].id,
brandIndex: e.detail.value,
- car_id: '', //车系id
- packageList: [], //车辆选装包
- options_ids: [], //选装包id数组
- options_total: 0, //选装包费用
- v_id: '', //车辆版本id
- color_id: '', //车身颜色id
- incolor_id: '', //内饰颜色id
- b_s_id: '', //备选车型id
+ series_id: '', //车系id
+ car_id: '',
modelIndex: -1, //车系车型索引
- spareIndex: -1, //备选车型索引
- colorArray: [], //车身颜色列表
- levelArray: [], //车辆版本列表
- interiorArray: [], //内饰颜色
- colorIndex: -1, //车身颜色索引
- levelIndex: -1, //车辆版本索引
- interiorIndex: -1, //内饰颜色索引
- priceinfo: '',
+ carIndex: -1, //车辆版本索引
business_type: 0,
})
this.getAppSeries()
@@ -441,74 +275,22 @@ Page({
changeModel(e) {
if (this.data.modelIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- car_id: this.data.modelList[e.detail.value].id,
+ series_id: this.data.modelList[e.detail.value].id,
modelIndex: e.detail.value,
- v_id: '', //车辆版本id
- color_id: '', //车身颜色id
- incolor_id: '', //内饰颜色id
- b_s_id: '', //备选车型id
- spareIndex: -1, //备选车型索引
- colorArray: [], //车身颜色列表
- levelArray: [], //车辆版本列表
- interiorArray: [], //内饰颜色
- colorIndex: -1, //车身颜色索引
- levelIndex: -1, //车辆版本索引
- interiorIndex: -1, //内饰颜色索引
- priceinfo: '',
- business_type: 0,
- options_ids: [], //选装包id数组
- options_total: 0, //选装包费用
+ car_id: '',
+ carIndex: -1, //车辆版本索引
})
- this.getAppSeriesAttrslevel()
- //获取车辆选装包
- this.getAppOptions()
+ this.getAppSeriesCars()
}
},
//车辆版本
- changeLevel(e) {
- if (this.data.levelIndex != e.detail.value && e.detail.value >= 0) {
+ changeCar(e) {
+ if (this.data.carIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
- v_id: this.data.levelList[e.detail.value].id,
- levelIndex: e.detail.value,
- color_id: '', //车身颜色id
- incolor_id: '', //内饰颜色id
- colorArray: [], //车身颜色列表
- interiorArray: [], //内饰颜色
- colorIndex: -1, //车身颜色索引
- interiorIndex: -1, //内饰颜色索引
- priceinfo: '',
- business_type: 0,
+ car_id: this.data.carList[e.detail.value].id,
+ carIndex: e.detail.value,
})
- this.getAppSeriesAttrscolor()
- }
- },
-
- //车身颜色
- changeColor(e) {
- if (this.data.colorIndex != e.detail.value && e.detail.value >= 0) {
- this.setData({
- color_id: this.data.colorList[e.detail.value].id,
- colorIndex: e.detail.value,
- incolor_id: '', //内饰颜色id
- interiorArray: [], //内饰颜色
- interiorIndex: -1, //内饰颜色索引
- priceinfo: '',
- business_type: 0,
- })
- this.getAppSeriesAttrsinterior()
- }
- },
-
- //内饰颜色
- changeInterior(e) {
- if (this.data.interiorIndex != e.detail.value && e.detail.value >= 0) {
- this.setData({
- incolor_id: this.data.interiorList[e.detail.value].id,
- interiorIndex: e.detail.value,
- business_type: 0,
- })
- this.getAppBusiness()
}
},
@@ -517,87 +299,19 @@ Page({
if (this.data.paymentIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
paymentIndex: e.detail.value,
- price_loan0: '',
if_zero_firstpay: 0,
firstPayIndex: 0,
})
- //代办列表
- this.getAppServices()
}
},
//购车主体
changeMain(e) {
this.setData({
- main_type: e.detail.value,
- owner_name: '',
- owner_mobile: '',
- owner_cardid: '',
- company: '',
- credit: '',
- address: '',
+ main_type: e.detail.value
})
},
- //获取车辆价格
- getAppBusiness() {
- if (this.data.car_id != '' && this.data.v_id != '' && this.data.color_id != '' && this.data.incolor_id != '') {
- this.setData({
- business_type: 1,
- })
- let params = {};
- params['main_type'] = this.data.main_type;
- params['car_id'] = this.data.car_id;
- params['v_id'] = this.data.v_id;
- params['color_id'] = this.data.color_id;
- params['incolor_id'] = this.data.incolor_id;
- _.apiQuery.getAppBusiness(params).then(res => {
- this.setData({
- business_type: 2,
- priceinfo: res.data,
- })
- }).catch(res => {
- this.setData({
- business_type: 3,
- })
- });
- }
- },
-
- //获取代办服务列表
- getAppServices() {
- if (this.data.paymentIndex != -1 && this.data.car_id != '' && this.data.v_id != '') {
- let params = {};
- params['payway'] = this.data.paymentIndex == 0 ? '1' : '0';
- params['cus_id'] = this.data.cus_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 => {
-
- let agencyList = res.data.list
- let srv_total = 0
- agencyList.forEach(item => {
- item.sprice = item.price
- if (this.data.userInfo.biz_type == 1) {
- if (item.id == 1 || item.id == 2) {
- item.checked = true
- if (parseFloat(item.price) > 0) {
- srv_total = srv_total + parseFloat(item.price)
- }
- }
- }
- })
- this.setData({
- agencyList,
- srv_total,
- })
-
- });
- }
- },
-
//建卡时间
delryTime(e) {
this.setData({
@@ -605,16 +319,6 @@ Page({
})
},
- //一件同步购车人信息
- synchroCustomer(e) {
- this.setData({
- owner_name: this.data.name,
- owner_mobile: this.data.mobile,
- owner_cardid: this.data.cardid,
- owner_cardidpic: this.data.customer_cardidpic,
- address: this.data.customer_address ? this.data.customer_address : this.data.address,
- })
- },
//新建订单
postAppCusorderV2() {
@@ -623,99 +327,37 @@ Page({
submitFlag: true,
})
- let fines = []
- that.data.fines.forEach(item => {
- if (item.txt != '') {
- fines.push(item)
- }
- });
-
let params = {};
params['main_type'] = that.data.main_type;
params['cus_id'] = that.data.cus_id;
params['name'] = that.data.name;
- if (that.data.mobile == that.data.org_mobile) {
- params['mobile'] = that.data.complete_mobile;
- } else {
- params['mobile'] = that.data.mobile;
- }
- params['c_city_id'] = that.data.c_city_id;
- if (that.data.address != '') {
- //params['pro'] = that.data.region;
- params['address'] = that.data.address;
- }
params['cardid'] = that.data.cardid;
+ params['brand_id'] = that.data.brand_id;
+ params['series_id'] = that.data.series_id;
params['car_id'] = that.data.car_id;
- params['v_id'] = that.data.v_id;
- params['color_id'] = that.data.color_id;
- params['incolor_id'] = that.data.incolor_id;
- if (that.data.options_ids.length > 0) {
- params['options_ids'] = that.data.options_ids;
+ if (this.data.color) {
+ params['color'] = this.data.color;
}
- params['price'] = that.data.priceinfo.price;
- if (that.data.if_zero_firstpay != 1) {
- params['deposit'] = that.data.priceinfo.sdeposit;
+ if (this.data.in_color) {
+ params['in_color'] = this.data.in_color;
}
params['payway'] = that.data.paymentIndex == 0 ? '1' : '0';
params['delry_time'] = that.data.delry_time;
- params['business_id'] = that.data.priceinfo.id;
- if (that.data.owner_name != '') {
- params['owner_name'] = that.data.owner_name;
- }
- if (that.data.owner_mobile != '') {
- if (that.data.owner_mobile == that.data.org_mobile) {
- params['owner_mobile'] = that.data.complete_mobile;
- } else {
- params['owner_mobile'] = that.data.owner_mobile;
- }
- }
- if (that.data.owner_cardid != '') {
- params['owner_cardid'] = that.data.owner_cardid;
- }
- if (that.data.company != '') {
- params['company'] = that.data.company;
- }
- if (that.data.credit != '') {
- params['credit'] = that.data.credit;
- }
- if (!!that.data.priceinfo.sdisc_money && that.data.priceinfo.sdisc_money != '') {
- params['disc_money'] = that.data.priceinfo.sdisc_money;
- }
- if (that.data.sa != '') {
- params['sa'] = that.data.sa;
- }
- if (that.data.priceinfo.show_local_bill) {
- params['if_local_bill'] = that.data.if_local_bill;
- }
- let srv_arr = []
- that.data.agencyList.forEach(item => {
- if (item.checked) {
- srv_arr.push({
- id: item.id,
- key: item.key,
- price: item.sprice,
- })
- }
- })
- if (srv_arr.length > 0) {
- params['srv_arr'] = srv_arr;
- }
- if (fines.length > 0) {
- params['fines'] = fines;
- }
- // if(that.data.priceinfo.fine_money){
- // params['if_fine'] = that.data.if_fine?'1':'0';
- // if(that.data.if_fine&&that.data.priceinfo.sdisc_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;
+ params['downpayment_type'] = that.data.if_zero_firstpay;
}
- if (that.data.price_loan0 > 0) {
- params['price_loan0'] = that.data.price_loan0;
+ params['loan_amount'] = that.data.loan_amount;
+ params['loan_periods'] = that.data.loan_periods;
+ params['monthly_payment'] = that.data.monthly_payment;
+ params['if_num'] = that.data.is_get_brand;
+ params['if_insure'] = that.data.is_get_insure;
+ if (that.data.is_get_brand) {
+ params['register_amount'] = that.data.register_amount;
}
- _.apiQuery.postAppCusorderV2(params).then(res => {
+ params['confirm_amount'] = that.data.confirm_amount;
+ params['discount_amount'] = that.data.discount_amount;
+ console.log(params)
+ _.apiQuery.postAppCusorder(params).then(res => {
//刷新列表页
let pages = getCurrentPages();
@@ -777,191 +419,12 @@ Page({
})
},
- //点击收取意向金
- createV2Inten() {
- this.setData({
- mobile: this.trimAll(this.data.mobile),
- cardid: this.trimAll(this.data.cardid),
- owner_mobile: this.trimAll(this.data.owner_mobile),
- owner_cardid: this.trimAll(this.data.owner_cardid),
- })
- if (this.data.name == '') {
- wx.showToast({
- title: '请输入客户姓名',
- icon: 'none'
- })
- } else if (this.data.mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.mobile)) {
- wx.showToast({
- title: '请输入客户手机号',
- icon: 'none'
- })
- } else if (this.data.cardid == '' || !/^\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.cardid)) {
- wx.showToast({
- title: '请填写正确客户身份证',
- icon: 'none'
- })
- } else if (this.data.main_type == 0 && this.data.owner_name == '') {
- wx.showToast({
- title: '请填写车主姓名',
- icon: 'none'
- })
- } else if (this.data.main_type == 0 && this.data.owner_mobile != this.data.org_mobile && !/^1[3456789]\d{9}$/.test(this.data.owner_mobile)) {
- wx.showToast({
- title: '请填写车主手机号',
- icon: 'none'
- })
- } else if (this.data.main_type == 0 && (this.data.owner_cardid == '' || !/^\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.owner_cardid))) {
- wx.showToast({
- title: '请填写正确车主身份证',
- icon: 'none'
- })
- }
- // else if(this.data.main_type == 0&&this.data.address == ''){
- // wx.showToast({
- // title: '请填写车主地址',
- // icon: 'none'
- // })
- // }
- else if (this.data.main_type == 1 && this.data.company == '') {
- wx.showToast({
- title: '请填写企业名称',
- icon: 'none'
- })
- } else if (this.data.main_type == 1 && this.data.credit == '') {
- wx.showToast({
- title: '请填写企业信用代码',
- icon: 'none'
- })
- } else if (this.data.c_city_id == '') {
- wx.showToast({
- title: '请选择上牌城市',
- icon: 'none'
- })
- } else {
- this.setData({
- isShowIntenMoney: true,
- })
- }
- },
//显示隐藏意向金弹框
optIntenMoney() {
this.setData({
isShowIntenMoney: !this.data.isShowIntenMoney,
})
},
- //收取意向金新建订单
- postAppCusorderV2Inten() {
- if (this.data.inten_money == '') {
- wx.showToast({
- title: '请输入意向金',
- icon: 'none'
- })
- } else {
- let that = this
- wx.showModal({
- title: '确定创建订单,收取意向金?',
- content: '',
- confirmColor: "#36afa2",
- success(resW) {
- if (resW.confirm) {
- that.setData({
- submitFlag: true,
- })
- let params = {};
- params['main_type'] = that.data.main_type;
- params['cus_id'] = that.data.cus_id;
- params['name'] = that.data.name;
- if (that.data.mobile == that.data.org_mobile) {
- params['mobile'] = that.data.complete_mobile;
- } else {
- params['mobile'] = that.data.mobile;
- }
- params['inten_money'] = that.data.inten_money;
- params['c_city_id'] = that.data.c_city_id;
- if (that.data.address != '') {
- //params['pro'] = that.data.region;
- params['address'] = that.data.address;
- }
- params['cardid'] = that.data.cardid;
- if (that.data.owner_name != '') {
- params['owner_name'] = that.data.owner_name;
- }
- if (that.data.owner_mobile != '') {
- if (that.data.owner_mobile == that.data.org_mobile) {
- params['owner_mobile'] = that.data.complete_mobile;
- } else {
- params['owner_mobile'] = that.data.owner_mobile;
- }
- }
- if (that.data.owner_cardid != '') {
- params['owner_cardid'] = that.data.owner_cardid;
- }
- if (that.data.company != '') {
- params['company'] = that.data.company;
- }
- if (that.data.credit != '') {
- params['credit'] = that.data.credit;
- }
- _.apiQuery.postAppCusorderV2Inten(params).then(res => {
-
- //刷新列表页
- let pages = getCurrentPages();
- let prevPage = null; //上一个页面
- if (pages.length >= 2) {
- prevPage = pages[pages.length - 2]; //上一个页面
- if (prevPage.route == 'pages/order/index') {
- prevPage.onPullDownRefresh()
- }
- }
-
- that.setData({
- isShowIntenMoney: false, //关闭意向金弹框
- isShowSuccess: true, //是否显示成功提示
- details: res.data,
- })
-
- if (that.data.owner_cardidpic != '') {
- let oparams = {};
- oparams['id'] = res.data.id;
- oparams['cardida'] = that.data.owner_cardidpic;
- _.apiQuery.putAppCusorderdata(oparams).then(res2 => {
-
- })
- }
-
- }).catch(res => {
- that.setData({
- submitFlag: false,
- })
- });
- }
- }
- })
- }
- },
-
- //委托代办
- 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
- if (parseFloat(item1.sprice) > 0) {
- srv_total = srv_total + parseFloat(item1.sprice)
- }
- }
- })
- })
-
- this.setData({
- agencyList,
- srv_total,
- })
- },
//精品尊享版
changeFineBag() {
@@ -978,14 +441,6 @@ Page({
})
},
- //修改步骤
- optShowContract(e) {
- this.setData({
- isShowSuccess: false,
- isShowContract: !this.data.isShowContract,
- })
- },
-
//修改成功
optShowSuccess(e) {
this.setData({
@@ -993,183 +448,6 @@ Page({
})
},
- //添加精品
- addFine() {
- this.data.fines.push({
- txt: '',
- price: '',
- })
- this.setData({
- fines: this.data.fines,
- })
- },
-
- //添加精品
- inputFines(e) {
- if (e.currentTarget.dataset.type == 'txt') {
- this.setData({
- ['fines[' + e.currentTarget.dataset.index + '].txt']: e.detail.value,
- })
- }
- if (e.currentTarget.dataset.type == 'price') {
- this.setData({
- ['fines[' + e.currentTarget.dataset.index + '].price']: Number(e.detail.value),
- })
- let fine_total = 0
- this.data.fines.forEach(item => {
- if (parseFloat(item.price) > 0) {
- fine_total = fine_total + parseFloat(item.price)
- }
- })
- this.setData({
- fine_total,
- })
- }
- },
-
- //快截输入代办价格
- fillAgency(e) {
- this.setData({
- ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: parseFloat(e.currentTarget.dataset.sprice),
- })
- let srv_total = 0
- this.data.agencyList.forEach(item => {
- if (item.checked && parseFloat(item.sprice) > 0) {
- srv_total = srv_total + parseFloat(item.sprice)
- }
- })
- this.setData({
- srv_total,
- })
- },
-
- //修改代办金额
- inputAgency(e) {
- this.setData({
- ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: parseFloat(e.detail.value),
- })
- let srv_total = 0
- this.data.agencyList.forEach(item => {
- if (item.checked && parseFloat(item.sprice) > 0) {
- srv_total = srv_total + parseFloat(item.sprice)
- }
- })
- this.setData({
- srv_total,
- })
- },
-
- //判断修改代办金额
- inputBlurAgency(e) {
- if (!this.data.agencyList[e.currentTarget.dataset.index].sprice || this.data.agencyList[e.currentTarget.dataset.index].price > parseFloat(this.data.agencyList[e.currentTarget.dataset.index].sprice)) {
- wx.showToast({
- title: '代办费设置过低',
- icon: 'none'
- })
- this.setData({
- ['agencyList[' + e.currentTarget.dataset.index + '].sprice']: this.data.agencyList[e.currentTarget.dataset.index].price,
- })
- let srv_total = 0
- this.data.agencyList.forEach(item => {
- if (item.checked && parseFloat(item.sprice) > 0) {
- srv_total = srv_total + parseFloat(item.sprice)
- }
- })
- this.setData({
- srv_total,
- })
- }
- },
-
- //选择定金
- fillDeposit(e) {
- this.setData({
- 'priceinfo.sdeposit': parseFloat(e.currentTarget.dataset.deposit),
- })
- },
-
- //修改定金
- inputDeposit(e) {
- this.setData({
- 'priceinfo.sdeposit': parseFloat(e.detail.value),
- })
- },
-
- //判断修改定金是否小于限制
- inputBlurDeposit(e) {
- if (!this.data.priceinfo.sdeposit || this.data.priceinfo.deposit > parseFloat(this.data.priceinfo.sdeposit)) {
- wx.showToast({
- title: '定金设置过低',
- icon: 'none'
- })
- this.setData({
- 'priceinfo.sdeposit': this.data.priceinfo.deposit,
- })
- }
- },
-
- //选择车身优惠
- fillDisc_money(e) {
- this.setData({
- 'priceinfo.sdisc_money': parseFloat(e.currentTarget.dataset.disc_money),
- })
- },
-
- //修改车身优惠
- inputDisc_money(e) {
- this.setData({
- 'priceinfo.sdisc_money': parseFloat(e.detail.value),
- })
- },
-
- //判断修改车身优惠是否小于限制
- inputBlurDisc_money(e) {
- if (this.data.priceinfo.dis_money < parseFloat(this.data.priceinfo.sdisc_money)) {
- wx.showToast({
- title: '车身优惠设置过高',
- icon: 'none'
- })
- this.setData({
- 'priceinfo.sdisc_money': this.data.priceinfo.dis_money,
- })
- } else if (!this.data.priceinfo.sdisc_money) {
- this.setData({
- 'priceinfo.sdisc_money': '',
- })
- }
- },
-
- //选择精品优惠
- fillDisc_fine_money(e) {
- this.setData({
- 'priceinfo.sdisc_fine_money': parseFloat(e.currentTarget.dataset.disc_fine_money),
- })
- },
-
- //修改精品优惠
- inputDisc_fine_money(e) {
- this.setData({
- 'priceinfo.sdisc_fine_money': parseFloat(e.detail.value),
- })
- },
-
- //判断修改精品优惠是否小于限制
- inputBlurDisc_fine_money(e) {
- if (this.data.priceinfo.dis_fine_money < parseFloat(this.data.priceinfo.sdisc_fine_money)) {
- wx.showToast({
- title: '精品优惠设置过高',
- icon: 'none'
- })
- this.setData({
- 'priceinfo.sdisc_fine_money': this.data.priceinfo.dis_fine_money,
- })
- } else if (!this.data.priceinfo.sdisc_fine_money) {
- this.setData({
- 'priceinfo.sdisc_fine_money': '',
- })
- }
- },
-
//推送链接
pushLink(e) {
if (e.currentTarget.dataset.url) {
@@ -1177,37 +455,6 @@ Page({
}
},
- //选择城市
- // bindRegionChange(e) {
- // this.setData({
- // region: e.detail.value
- // })
- // },
-
- //显示隐藏修改地址
- optAddress() {
- this.setData({
- isShowAddress: !this.data.isShowAddress,
- })
- },
-
- //选择上牌城市
- changeOncard(e) {
- if (this.data.oncardIndex != e.detail.value && e.detail.value >= 0) {
- this.setData({
- c_city_id: this.data.oncardList[e.detail.value].city_id,
- oncardIndex: e.detail.value,
- })
- }
- },
-
- //需开具本地发票
- switchAddrDef: function (e) {
- this.setData({
- if_local_bill: e.detail.value ? 1 : 0
- })
- },
-
//选择图片
chooseImg(e) {
let that = this
@@ -1237,57 +484,7 @@ Page({
wx.hideLoading();
that.setData({
cardid: res2.data.IdNum,
- name: res2.data.Name,
- customer_address: res2.data.Address,
- customer_cardidpic: resp.data.data.url,
- })
- })
- }
- },
- fail: res => {
- wx.hideLoading();
- }
- })
- },
- fail: res => {
- wx.showToast({
- title: '文件选择失败',
- icon: 'none',
- duration: 2000
- })
- }
- })
- }
-
- //上传身份证正面-车主身份证
- if (e.currentTarget.dataset.type == 'owner') {
- wx.chooseImage({
- count: 1, // 默认9
- sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
- success(res) {
- wx.showLoading({
- title: '识别中',
- })
- wx.uploadFile({
- url: _.config.api.upImg,
- filePath: res.tempFilePaths[0],
- name: 'img',
- formData: {
- 'app': 'liche'
- },
- success: (resp) => {
- resp.data = JSON.parse(resp.data);
- if (resp.data.code == 200) {
- let params = {};
- params['img'] = resp.data.data.url;
- _.apiQuery.getAppIdcardInfo(params).then(res2 => {
- wx.hideLoading();
- that.setData({
- owner_cardid: res2.data.IdNum,
- owner_name: res2.data.Name,
- address: res2.data.Address,
- owner_cardidpic: resp.data.data.url,
+ name: res2.data.Name
})
})
}
@@ -1317,91 +514,26 @@ Page({
}
},
- focusAddress() {
- this.setData({
- addressFocus: true,
- })
- },
- blurAddress() {
- this.setData({
- addressFocus: false,
- })
- },
-
- //获取车辆选装包
- getAppOptions() {
- let params = {};
- params['id'] = this.data.car_id;
- _.apiQuery.getAppOptions(params).then(res => {
- if (res.data.list.length > 0) {
- let packageList = res.data.list
- packageList.forEach(item => {
- item.checked = false
- })
- this.setData({
- packageList,
- })
- }
- });
- },
-
- //选择车辆选装包
- choosePackage(e) {
- let packageList = this.data.packageList
- let options_ids = e.detail.value
- let options_total = 0
- packageList.forEach(itemA => {
- itemA.checked = false
- options_ids.forEach(itemB => {
- if (itemA.id === itemB) {
- itemA.checked = true
- if (parseFloat(itemA.price) > 0) {
- options_total = options_total + parseFloat(itemA.price)
- }
- }
- })
- })
-
- this.setData({
- packageList,
- options_ids,
- options_total,
- })
- },
-
//选择首付类型
changeFirstPay(e) {
if (this.data.firstPayIndex != e.detail.value && e.detail.value >= 0) {
this.setData({
firstPayIndex: e.detail.value,
- price_loan0: '',
- 'priceinfo.sdeposit': '',
})
- 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,
- })
- }
}
},
//20240526是否店内上牌
changeIsGetBrand(e) {
- console.log('是否店内上牌', e.detail.value)
this.setData({
- is_get_brand: e.detail.value
+ is_get_brand: e.detail.value ? 1 : 0
})
},
//20240526是否店内投保
changeIsGetInsure(e) {
- console.log('是否店内投保', e.detail.value)
this.setData({
- is_get_insure: e.detail.value
+ is_get_insure: e.detail.value ? 1 : 0
})
}
})
\ No newline at end of file
diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml
index 4aaa286..0b49504 100644
--- a/pages/order/register/index.wxml
+++ b/pages/order/register/index.wxml
@@ -20,7 +20,7 @@
@@ -31,99 +31,44 @@
客户手机号码*
-
+
-
- 客户身份证*
-
-
+
+
+ 客户身份证*
+
+
+
+
-
-
-
- 客户姓名*
-
-
+
+ 客户姓名*
+
+
+
-
+
+
+
+ 企业名称*
+
+
+
+
+
+ 企业信用代码*
+
+
+
+
+
-
-
- 车主信息
-
-
-
-
-
-
- 车主手机号码*
-
-
-
-
-
- 车主身份证*
-
-
-
-
-
-
- 车主姓名*
-
-
-
-
-
-
- 上牌城市*
-
-
- 请选择
- {{oncardArray[oncardIndex]}}
-
-
-
-
-
-
-
- 企业信息
-
-
- 企业名称*
-
-
-
-
-
- 企业信用代码*
-
-
-
-
-
- 上牌城市*
-
-
- 请选择
- {{oncardArray[oncardIndex]}}
-
-
-
-
-
-
-
+
《理车用户注册协议》
和
《理车用户隐私政策》
@@ -153,55 +98,22 @@
车辆版本*
-
- 请选择
- {{levelArray[levelIndex]}}
+
+ 请选择
+ {{carArray[carIndex]}}
-
- 车身颜色
-
-
- 请选择
- {{colorArray[colorIndex]}}
-
-
-
+
+ 车身颜色
+
-
- 内饰颜色
-
-
- 请选择
- {{interiorArray[interiorIndex]}}
-
-
-
+
+ 内饰颜色
+
-
-
-
- 选装
-
-
-
-
-
-
-
-
付款方式*
@@ -214,7 +126,7 @@
- 期望交付时间
+ 期望交付时间*
请选择
@@ -223,180 +135,70 @@
-
-
- 颜色加价
- {{priceinfo.price_color}}元
-
-
- 公司加价
- {{priceinfo.price_coplus}}元
-
-
- 首付类型
-
-
- 请选择
- {{firstPayArr[firstPayIndex]}}
-
-
-
-
-
- 首付按揭金额
-
-
-
-
-
- 定金*
-
-
-
-
- {{item}}
-
-
-
-
-
-
-
- 车身优惠
-
-
-
-
- {{item}}
-
-
-
-
-
-
-
-
-
-
- 委托代办
-
- 总计:{{srv_total}}元
-
-
-
-
-
-
-
-
-
- {{price_list}}
-
-
-
- {{item.text}}
-
-
-
-
-
-
-
- 精品选装
-
- 总计:{{fine_total}}元
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加
+
+
+ 首付类型
+
+
+ 请选择
+ {{firstPayArr[firstPayIndex]}}
+
-
-
-
-
- {{item.txt}}
-
-
-
-
-
-
-
- 特别约定
-
-
-
-
-
-
- 是否店内上牌
-
-
-
+
+ 贷款额度
+
+
-
-
- 是否店内投保
-
-
-
+
+ 贷款期数
+
+
+
+
+
+ ⽉供
+
+
-
-
- 需开具本地发票
+
+ 是否店内上牌
-
+
+
+
+
+ 是否店内投保
+
+
+
+
+
+ 上牌费
+
+
+
+
+
+ 定⾦
+
+
+
+
+
+ ⻋身优惠
+
+
-
-
-
-
@@ -411,24 +213,6 @@
-
-
@@ -437,56 +221,18 @@
用户信息
销售顾问:{{userInfo.uname}}
-
- 客户姓名
- {{name}}
-
客户手机号码
{{mobile}}
+
+ {{main_type==0?'客户姓名':'企业名称'}}
+ {{name}}
+
- 客户身份证
+ {{main_type==0?'客户身份证':'企业信用代码'}}
{{cardid}}
-
- 车主姓名
-
- {{owner_name}}
-
-
-
- 车主手机号码
-
- {{owner_mobile}}
-
-
-
- 车主身份证
-
- {{owner_cardid}}
-
-
-
-
- 企业名称
-
- {{company}}
-
-
-
- 企业信用代码
-
- {{credit}}
-
-
-
- 上牌城市
- {{oncardArray[oncardIndex]}}
-
车辆信息
车辆品牌
@@ -498,30 +244,16 @@
车辆版本
- {{levelArray[levelIndex]}}
+ {{carArray[carIndex]}}
-
+
车身颜色
- {{colorArray[colorIndex]}}
+ {{color}}
-
+
内饰颜色
- {{interiorArray[interiorIndex]}}
+ {{in_color}}
-
-
- 选装
- {{options_total}}元
-
-
-
- {{item.title}}
-
- {{item.price}}元
-
-
-
-
其他信息
付款方式
@@ -531,105 +263,55 @@
期望交付时间
{{delry_time}}
-
-
- 颜色加价
- {{priceinfo.price_color}}元
+
+
+ 首付类型
+ {{firstPayArr[firstPayIndex]}}
+
+
+ 贷款额度
+ {{loan_amount}}元
+
+
+ 贷款期数
+ {{loan_periods}}
+
+
+ 月供
+ {{monthly_payment}}元
+
+
+
+
+ 是否店内上牌
+ {{is_get_brand?'是':'否'}}
+
-
- 公司加价
- {{priceinfo.price_coplus}}元
+
+
+ 是否店内投保
+ {{is_get_insure?'是':'否'}}
+
-
- 首付类型
- {{firstPayArr[firstPayIndex]}}
+
+ 上牌费
+ {{register_amount}}元
-
- 首付按揭金额
- {{price_loan0}}
-
-
+
定金
- {{priceinfo.sdeposit}}元
+ {{confirm_amount}}元
-
-
- 优惠
- {{priceinfo.sdisc_money}}元
+
+ 车身优惠
+ {{discount_amount}}元
-
-
-
- 委托代办
- {{srv_total}}元
+
-
-
-
- 是否店内上牌
- 是
-
-
-
-
- 是否店内投保
- 是
-
-
-
-
+ -->
+
@@ -638,92 +320,33 @@
-
-
-
-
+
+
请确认填写信息准确无误!
-
+
{{checktext}}
-
+
- 邀请客户扫码支付
-
-
+ 订单登记成功!
+
+ 请及时上传
+ 订单合同
+ 付款凭证
+ 客户身份证
+ 《买贵必赔权益书》
-
-
-
-
-
-
-
- 扫码生成合同
-
-
-
- 客户合同未生成时可让客户扫码生成
-
-
-
-
-
-
-
-
-
-
-
- 请输入意向金
-
-
-
- 意向金:旨在客户尚未明确购车决策时(车型、付款方式等),在不需要签订合同的情况下,收取订车费用锁定客户
-
-
-
- 取消
-
-
- 确认
-
-
-
-
-
-
-
-
- 请填写车主地址信息
-
-
- {{region[0]}}
- -
- {{region[1]}}
- 选择城市
- -
- {{region[2]}}
- 选择地区
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file