fixed
This commit is contained in:
+268
-231
@@ -2,14 +2,14 @@ import _ from '../../../commons/js/commons'
|
|||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
name:'',//名字
|
name: '', //名字
|
||||||
mobile:'',//手机号
|
mobile: '', //手机号
|
||||||
// brand_id:'',//品牌
|
// brand_id:'',//品牌
|
||||||
// car_id:'',//车系id
|
// car_id:'',//车系id
|
||||||
// v_id:'',//车辆版本id
|
// v_id:'',//车辆版本id
|
||||||
// color_id:'',//颜色id
|
// color_id:'',//颜色id
|
||||||
// b_s_id:'',//备选车型id
|
// b_s_id:'',//备选车型id
|
||||||
buy_time:'',//预计购车时间
|
buy_time: '', //预计购车时间
|
||||||
// brandIndex:-1,//车辆品牌索引
|
// brandIndex:-1,//车辆品牌索引
|
||||||
// modelIndex:-1,//车系车型索引
|
// modelIndex:-1,//车系车型索引
|
||||||
// spareIndex:-1,//备选车型索引
|
// spareIndex:-1,//备选车型索引
|
||||||
@@ -17,39 +17,41 @@ Page({
|
|||||||
// levelArray:[],//车辆版本列表
|
// levelArray:[],//车辆版本列表
|
||||||
// colorIndex:-1,//车身颜色索引
|
// colorIndex:-1,//车身颜色索引
|
||||||
// levelIndex:-1,//车辆版本索引
|
// levelIndex:-1,//车辆版本索引
|
||||||
timeArray:[],//预计购车时间列表
|
timeArray: [], //预计购车时间列表
|
||||||
timeIndex:-1,//预计购车时间索引
|
timeIndex: -1, //预计购车时间索引
|
||||||
submitFlag:false,
|
submitFlag: false,
|
||||||
|
|
||||||
status:0,//状态
|
status: 0, //状态
|
||||||
statuslist:[
|
statuslist: [
|
||||||
'未见客户',
|
'未见客户',
|
||||||
],
|
],
|
||||||
|
|
||||||
c_brands:[
|
c_brands: [
|
||||||
'综合','东风纳米','哪吒','零跑'
|
'综合', '东风纳米', '哪吒', '零跑'
|
||||||
],
|
],
|
||||||
|
|
||||||
c_brandArray:[
|
c_brandArray: [
|
||||||
{id:0, name:'综合'},
|
// {id:0, name:'综合'},
|
||||||
{id:1, name:'东风纳米'},
|
// {id:1, name:'东风纳米'},
|
||||||
{id:4, name:'哪吒'},
|
// {id:4, name:'哪吒'},
|
||||||
{id:5, name:'零跑'},
|
// {id:5, name:'零跑'},
|
||||||
],
|
],
|
||||||
|
|
||||||
of2_id:'',
|
of2_id: '',
|
||||||
of2Index:-1,
|
of2Index: -1,
|
||||||
|
|
||||||
cityIndex:-1,
|
provinceIndex: -1,
|
||||||
city_id:'',
|
province_id: '',
|
||||||
countyIndex:-1,
|
cityIndex: -1,
|
||||||
county_id:'',
|
city_id: '',
|
||||||
c_brandIndex:-1,
|
countyIndex: -1,
|
||||||
|
county_id: '',
|
||||||
|
c_brandIndex: -1,
|
||||||
|
|
||||||
isShowExist:false, //客户是否已存在
|
isShowExist: false, //客户是否已存在
|
||||||
wxgr:0,//是否添加个微
|
wxgr: 0, //是否添加个微
|
||||||
wxgrimg:'',//个微
|
wxgrimg: '', //个微
|
||||||
wxgrimg_url:'',//个微
|
wxgrimg_url: '', //个微
|
||||||
},
|
},
|
||||||
//生命周期函数--监听页面加载
|
//生命周期函数--监听页面加载
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
@@ -67,100 +69,100 @@ Page({
|
|||||||
//客户标签
|
//客户标签
|
||||||
this.getAppCustomersTag()
|
this.getAppCustomersTag()
|
||||||
|
|
||||||
if(this.data.status == 1){
|
if (this.data.status == 1) {
|
||||||
this.setData({
|
this.setData({
|
||||||
buy_time:3,
|
buy_time: 3,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取车型品牌
|
//获取车型品牌
|
||||||
getAppSeriesBrands(){
|
getAppSeriesBrands() {
|
||||||
_.apiQuery.getAppSeriesBrands().then(res => {
|
_.apiQuery.getAppSeriesBrands().then(res => {
|
||||||
if(res.data.list.length>0){
|
if (res.data.list.length > 0) {
|
||||||
let brandArray = []
|
let brandArray = []
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
brandArray.push(item.name)
|
brandArray.push(item.name)
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
brandArray:brandArray,
|
brandArray: brandArray,
|
||||||
brandList:res.data.list,
|
brandList: res.data.list,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取车系车型
|
//获取车系车型
|
||||||
getAppSeries(){
|
getAppSeries() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['brand_id'] = this.data.brand_id;
|
params['brand_id'] = this.data.brand_id;
|
||||||
_.apiQuery.getAppSeries(params).then(res => {
|
_.apiQuery.getAppSeries(params).then(res => {
|
||||||
if(res.data.list.length>0){
|
if (res.data.list.length > 0) {
|
||||||
let modelArray = []
|
let modelArray = []
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
modelArray.push(item.name)
|
modelArray.push(item.name)
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
modelArray:modelArray,
|
modelArray: modelArray,
|
||||||
modelList:res.data.list,
|
modelList: res.data.list,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取车辆版本
|
//获取车辆版本
|
||||||
getAppSeriesAttrslevel(){
|
getAppSeriesAttrslevel() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['id'] = this.data.car_id;
|
params['id'] = this.data.car_id;
|
||||||
params['type'] = 0;
|
params['type'] = 0;
|
||||||
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
||||||
if(res.data.total>0){
|
if (res.data.total > 0) {
|
||||||
let levelArray = []
|
let levelArray = []
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
levelArray.push(item.title)
|
levelArray.push(item.title)
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
levelArray:levelArray,
|
levelArray: levelArray,
|
||||||
levelList:res.data.list,
|
levelList: res.data.list,
|
||||||
levelIndex:-1,
|
levelIndex: -1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取车身颜色
|
//获取车身颜色
|
||||||
getAppSeriesAttrscolor(){
|
getAppSeriesAttrscolor() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['id'] = this.data.car_id;
|
params['id'] = this.data.car_id;
|
||||||
params['type'] = 1;
|
params['type'] = 1;
|
||||||
params['v_id'] = this.data.v_id;
|
params['v_id'] = this.data.v_id;
|
||||||
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
||||||
if(res.data.total>0){
|
if (res.data.total > 0) {
|
||||||
let colorArray = []
|
let colorArray = []
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
colorArray.push(item.title)
|
colorArray.push(item.title)
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
colorArray:colorArray,
|
colorArray: colorArray,
|
||||||
colorList:res.data.list,
|
colorList: res.data.list,
|
||||||
colorIndex:-1,
|
colorIndex: -1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取列表筛选条件-时间
|
//获取列表筛选条件-时间
|
||||||
getAppCustomersFilter(){
|
getAppCustomersFilter() {
|
||||||
_.apiQuery.getAppCustomersFilter().then(res => {
|
_.apiQuery.getAppCustomersFilter().then(res => {
|
||||||
let timeArray = []
|
let timeArray = []
|
||||||
res.data.buy_time.forEach(item => {
|
res.data.buy_time.forEach(item => {
|
||||||
timeArray.push(item.name)
|
timeArray.push(item.name)
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
timeArray:timeArray,
|
timeArray: timeArray,
|
||||||
timeList:res.data.buy_time,
|
timeList: res.data.buy_time,
|
||||||
timeIndex:-1,
|
timeIndex: -1,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -168,20 +170,20 @@ Page({
|
|||||||
//输入
|
//输入
|
||||||
inputTx(e) {
|
inputTx(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
submitFlag:false,
|
submitFlag: false,
|
||||||
[e.currentTarget.dataset.key]: e.detail.value
|
[e.currentTarget.dataset.key]: e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择状态
|
//选择状态
|
||||||
changeStatus(e) {
|
changeStatus(e) {
|
||||||
if(this.data.status != e.detail.value){
|
if (this.data.status != e.detail.value) {
|
||||||
this.setData({
|
this.setData({
|
||||||
of2_id:'',
|
of2_id: '',
|
||||||
of2Index:-1,
|
of2Index: -1,
|
||||||
of2Arr:[],
|
of2Arr: [],
|
||||||
status:e.detail.value,
|
status: e.detail.value,
|
||||||
buy_time:e.detail.value==1?'3':'',
|
buy_time: e.detail.value == 1 ? '3' : '',
|
||||||
})
|
})
|
||||||
this.getAppCustomersOffline_sources()
|
this.getAppCustomersOffline_sources()
|
||||||
}
|
}
|
||||||
@@ -189,23 +191,23 @@ Page({
|
|||||||
|
|
||||||
//选择品牌
|
//选择品牌
|
||||||
changeBrand(e) {
|
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({
|
this.setData({
|
||||||
brand_id:this.data.brandList[e.detail.value].id,
|
brand_id: this.data.brandList[e.detail.value].id,
|
||||||
brandIndex:e.detail.value,
|
brandIndex: e.detail.value,
|
||||||
car_id:'',//车系id
|
car_id: '', //车系id
|
||||||
v_id:'',//车辆版本id
|
v_id: '', //车辆版本id
|
||||||
color_id:'',//车身颜色id
|
color_id: '', //车身颜色id
|
||||||
incolor_id:'',//内饰颜色id
|
incolor_id: '', //内饰颜色id
|
||||||
b_s_id:'',//备选车型id
|
b_s_id: '', //备选车型id
|
||||||
modelIndex:-1,//车系车型索引
|
modelIndex: -1, //车系车型索引
|
||||||
spareIndex:-1,//备选车型索引
|
spareIndex: -1, //备选车型索引
|
||||||
colorArray:[],//车身颜色列表
|
colorArray: [], //车身颜色列表
|
||||||
levelArray:[],//车辆版本列表
|
levelArray: [], //车辆版本列表
|
||||||
interiorArray:[],//内饰颜色
|
interiorArray: [], //内饰颜色
|
||||||
colorIndex:-1,//车身颜色索引
|
colorIndex: -1, //车身颜色索引
|
||||||
levelIndex:-1,//车辆版本索引
|
levelIndex: -1, //车辆版本索引
|
||||||
interiorIndex:-1,//内饰颜色索引
|
interiorIndex: -1, //内饰颜色索引
|
||||||
})
|
})
|
||||||
this.getAppSeries()
|
this.getAppSeries()
|
||||||
}
|
}
|
||||||
@@ -213,21 +215,21 @@ Page({
|
|||||||
|
|
||||||
//选择车系
|
//选择车系
|
||||||
changeModel(e) {
|
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({
|
this.setData({
|
||||||
car_id:this.data.modelList[e.detail.value].id,
|
car_id: this.data.modelList[e.detail.value].id,
|
||||||
modelIndex:e.detail.value,
|
modelIndex: e.detail.value,
|
||||||
v_id:'',//车辆版本id
|
v_id: '', //车辆版本id
|
||||||
color_id:'',//车身颜色id
|
color_id: '', //车身颜色id
|
||||||
incolor_id:'',//内饰颜色id
|
incolor_id: '', //内饰颜色id
|
||||||
b_s_id:'',//备选车型id
|
b_s_id: '', //备选车型id
|
||||||
spareIndex:-1,//备选车型索引
|
spareIndex: -1, //备选车型索引
|
||||||
colorArray:[],//车身颜色列表
|
colorArray: [], //车身颜色列表
|
||||||
levelArray:[],//车辆版本列表
|
levelArray: [], //车辆版本列表
|
||||||
interiorArray:[],//内饰颜色
|
interiorArray: [], //内饰颜色
|
||||||
colorIndex:-1,//车身颜色索引
|
colorIndex: -1, //车身颜色索引
|
||||||
levelIndex:-1,//车辆版本索引
|
levelIndex: -1, //车辆版本索引
|
||||||
interiorIndex:-1,//内饰颜色索引
|
interiorIndex: -1, //内饰颜色索引
|
||||||
})
|
})
|
||||||
this.getAppSeriesAttrslevel()
|
this.getAppSeriesAttrslevel()
|
||||||
}
|
}
|
||||||
@@ -235,13 +237,13 @@ Page({
|
|||||||
|
|
||||||
//车辆版本
|
//车辆版本
|
||||||
changeLevel(e) {
|
changeLevel(e) {
|
||||||
if(this.data.levelIndex != e.detail.value && e.detail.value >= 0){
|
if (this.data.levelIndex != e.detail.value && e.detail.value >= 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
v_id:this.data.levelList[e.detail.value].id,
|
v_id: this.data.levelList[e.detail.value].id,
|
||||||
levelIndex:e.detail.value,
|
levelIndex: e.detail.value,
|
||||||
color_id:'',//车身颜色id
|
color_id: '', //车身颜色id
|
||||||
colorArray:[],//车身颜色列表
|
colorArray: [], //车身颜色列表
|
||||||
colorIndex:-1,//车身颜色索引
|
colorIndex: -1, //车身颜色索引
|
||||||
})
|
})
|
||||||
this.getAppSeriesAttrscolor()
|
this.getAppSeriesAttrscolor()
|
||||||
}
|
}
|
||||||
@@ -249,20 +251,20 @@ Page({
|
|||||||
|
|
||||||
//车身颜色
|
//车身颜色
|
||||||
changeColor(e) {
|
changeColor(e) {
|
||||||
if(this.data.colorIndex != e.detail.value && e.detail.value >= 0){
|
if (this.data.colorIndex != e.detail.value && e.detail.value >= 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
color_id:this.data.colorList[e.detail.value].id,
|
color_id: this.data.colorList[e.detail.value].id,
|
||||||
colorIndex:e.detail.value,
|
colorIndex: e.detail.value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//备选车型
|
//备选车型
|
||||||
changeSpare(e) {
|
changeSpare(e) {
|
||||||
if(this.data.spareIndex != e.detail.value && e.detail.value >= 0){
|
if (this.data.spareIndex != e.detail.value && e.detail.value >= 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
b_s_id:this.data.modelList[e.detail.value].id,
|
b_s_id: this.data.modelList[e.detail.value].id,
|
||||||
spareIndex:e.detail.value,
|
spareIndex: e.detail.value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -270,51 +272,50 @@ Page({
|
|||||||
//预计购车时间
|
//预计购车时间
|
||||||
changeTime(e) {
|
changeTime(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
buy_time:this.data.timeList[e.detail.value].id,
|
buy_time: this.data.timeList[e.detail.value].id,
|
||||||
timeIndex:e.detail.value,
|
timeIndex: e.detail.value,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//新建客户
|
//新建客户
|
||||||
postAppCustomers() {
|
postAppCustomers() {
|
||||||
let that = this
|
let that = this
|
||||||
if (that.data.name == '' ) {
|
if (that.data.name == '') {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入客户姓名',
|
title: '请输入客户姓名',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} else if (!/^1[3456789]\d{9}$/.test(that.data.mobile)){
|
} else if (!/^1[3456789]\d{9}$/.test(that.data.mobile)) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入正确的手机号码',
|
title: '请输入正确的手机号码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
} else if (that.data.of2Arr.length > 0 && that.data.of2_id == '') {
|
||||||
|
|
||||||
else if (that.data.of2Arr.length>0&&that.data.of2_id == '' ) {
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择客户来源',
|
title: '请选择客户来源',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
} else if (that.data.province_id == '') {
|
||||||
else if (that.data.city_id == '' ) {
|
wx.showToast({
|
||||||
|
title: '请选择所在省份',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} else if (that.data.city_id == '') {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择所在城市',
|
title: '请选择所在城市',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
} else if (that.data.county_id == '') {
|
||||||
else if (that.data.county_id == '' ) {
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择所在地区',
|
title: '请选择所在地区',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
} else if (that.data.buy_time == '') {
|
||||||
else if (that.data.buy_time == '' ) {
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择预计购车时间',
|
title: '请选择预计购车时间',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
} else if (this.data.wxgr == 1 && this.data.wxgrimg == '') {
|
||||||
else if(this.data.wxgr==1&&this.data.wxgrimg==''){
|
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请上传个微截图',
|
title: '请上传个微截图',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -336,7 +337,7 @@ Page({
|
|||||||
// icon: 'none'
|
// icon: 'none'
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
else{
|
else {
|
||||||
that.setData({
|
that.setData({
|
||||||
submitFlag: true,
|
submitFlag: true,
|
||||||
})
|
})
|
||||||
@@ -351,16 +352,17 @@ Page({
|
|||||||
// if(this.data.b_s_id != ''){
|
// if(this.data.b_s_id != ''){
|
||||||
// params['b_s_id'] = this.data.b_s_id;
|
// params['b_s_id'] = this.data.b_s_id;
|
||||||
// }
|
// }
|
||||||
if(this.data.c_brandIndex != -1){
|
if (this.data.c_brandIndex != -1) {
|
||||||
params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].id;
|
params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].id;
|
||||||
}
|
}
|
||||||
if(this.data.of2_id != ''){
|
if (this.data.of2_id != '') {
|
||||||
params['of2_id'] = this.data.of2_id;
|
params['of2_id'] = this.data.of2_id;
|
||||||
}
|
}
|
||||||
params['wxgr'] = this.data.wxgr;
|
params['wxgr'] = this.data.wxgr;
|
||||||
if(this.data.wxgr==1){
|
if (this.data.wxgr == 1) {
|
||||||
params['wxgrimg'] = this.data.wxgrimg;
|
params['wxgrimg'] = this.data.wxgrimg;
|
||||||
}
|
}
|
||||||
|
params['province_id'] = this.data.province_id;
|
||||||
params['city_id'] = this.data.city_id;
|
params['city_id'] = this.data.city_id;
|
||||||
params['county_id'] = this.data.county_id;
|
params['county_id'] = this.data.county_id;
|
||||||
params['buy_time'] = this.data.buy_time;
|
params['buy_time'] = this.data.buy_time;
|
||||||
@@ -371,7 +373,7 @@ Page({
|
|||||||
let prevPage = null; //上一个页面
|
let prevPage = null; //上一个页面
|
||||||
if (pages.length >= 2) {
|
if (pages.length >= 2) {
|
||||||
prevPage = pages[pages.length - 2]; //上一个页面
|
prevPage = pages[pages.length - 2]; //上一个页面
|
||||||
if(prevPage.route == 'pages/customer/index'){
|
if (prevPage.route == 'pages/customer/index') {
|
||||||
prevPage.onPullDownRefresh()
|
prevPage.onPullDownRefresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -386,14 +388,14 @@ Page({
|
|||||||
success(res) {
|
success(res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
that.setData({
|
that.setData({
|
||||||
name:'',//名字
|
name: '', //名字
|
||||||
mobile:'',//手机号
|
mobile: '', //手机号
|
||||||
// brand_id:'',//品牌
|
// brand_id:'',//品牌
|
||||||
// car_id:'',//车系id
|
// car_id:'',//车系id
|
||||||
// v_id:'',//车辆版本id
|
// v_id:'',//车辆版本id
|
||||||
// color_id:'',//颜色id
|
// color_id:'',//颜色id
|
||||||
// b_s_id:'',//备选车型id
|
// b_s_id:'',//备选车型id
|
||||||
buy_time:'',//预计购车时间
|
buy_time: '', //预计购车时间
|
||||||
// brandIndex:-1,//车辆品牌索引
|
// brandIndex:-1,//车辆品牌索引
|
||||||
// modelIndex:-1,//车系车型索引
|
// modelIndex:-1,//车系车型索引
|
||||||
// spareIndex:-1,//备选车型索引
|
// spareIndex:-1,//备选车型索引
|
||||||
@@ -401,12 +403,12 @@ Page({
|
|||||||
// levelArray:[],//车辆版本列表
|
// levelArray:[],//车辆版本列表
|
||||||
// colorIndex:-1,//车身颜色索引
|
// colorIndex:-1,//车身颜色索引
|
||||||
// levelIndex:-1,//车辆版本索引
|
// levelIndex:-1,//车辆版本索引
|
||||||
timeIndex:-1,//预计购车时间索引
|
timeIndex: -1, //预计购车时间索引
|
||||||
submitFlag:false,
|
submitFlag: false,
|
||||||
|
|
||||||
of2_id:'',
|
of2_id: '',
|
||||||
of2Arr:[],
|
of2Arr: [],
|
||||||
of2Index:-1,
|
of2Index: -1,
|
||||||
})
|
})
|
||||||
that.getAppCustomersTag()
|
that.getAppCustomersTag()
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
@@ -417,11 +419,11 @@ Page({
|
|||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}).catch(res=>{
|
}).catch(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
submitFlag: false,
|
submitFlag: false,
|
||||||
})
|
})
|
||||||
if(res.data.id){
|
if (res.data.id) {
|
||||||
wx.hideToast();
|
wx.hideToast();
|
||||||
this.setData({
|
this.setData({
|
||||||
isShowExist: true,
|
isShowExist: true,
|
||||||
@@ -433,7 +435,7 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
//客户来源
|
//客户来源
|
||||||
getAppCustomersOffline_sources(){
|
getAppCustomersOffline_sources() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['status'] = this.data.status;
|
params['status'] = this.data.status;
|
||||||
_.apiQuery.getAppCustomersOffline_sources(params).then(res => {
|
_.apiQuery.getAppCustomersOffline_sources(params).then(res => {
|
||||||
@@ -442,38 +444,40 @@ Page({
|
|||||||
of2Arr.push(item['name'])
|
of2Arr.push(item['name'])
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
of2Arr:of2Arr,
|
of2Arr: of2Arr,
|
||||||
sources:res.data
|
sources: res.data
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//客户来源
|
//客户来源
|
||||||
changeOf1(e) {
|
changeOf1(e) {
|
||||||
if(this.data.of2Index!=e.detail.value){
|
if (this.data.of2Index != e.detail.value) {
|
||||||
this.setData({
|
this.setData({
|
||||||
of2_id:this.data.sources[e.detail.value].id,
|
of2_id: this.data.sources[e.detail.value].id,
|
||||||
of2Index:e.detail.value,
|
of2Index: e.detail.value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//客户标签
|
//客户标签
|
||||||
getAppCustomersTag(){
|
getAppCustomersTag() {
|
||||||
_.apiQuery.getAppCustomersTag().then(res => {
|
_.apiQuery.getAppCustomersTag().then(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
city_id:res.data.city_id,
|
province_id: res.data.province_id,
|
||||||
county_id:res.data.county_id,
|
city_id: res.data.city_id,
|
||||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
county_id: res.data.county_id,
|
||||||
|
taglList: res.data.tags && res.data.tags.length > 0 ? res.data.tags : [],
|
||||||
})
|
})
|
||||||
this.data.c_brandArray.forEach((item,index) => {
|
this.data.c_brandArray.forEach((item, index) => {
|
||||||
if(res.data.c_brand == item.id){
|
if (res.data.c_brand == item.id) {
|
||||||
this.setData({
|
this.setData({
|
||||||
c_brandIndex:index
|
c_brandIndex: index
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
//获取省份
|
||||||
|
this.getAppCityArea_province()
|
||||||
//获取城市
|
//获取城市
|
||||||
this.getAppCityArea_city()
|
this.getAppCityArea_city()
|
||||||
//获取地区
|
//获取地区
|
||||||
@@ -482,83 +486,116 @@ Page({
|
|||||||
},
|
},
|
||||||
|
|
||||||
//单选
|
//单选
|
||||||
radioPicker(e){
|
radioPicker(e) {
|
||||||
let taglList = this.data.taglList
|
let taglList = this.data.taglList
|
||||||
taglList[e.currentTarget.dataset.i].list.forEach(item => {
|
taglList[e.currentTarget.dataset.i].list.forEach(item => {
|
||||||
item.checked=false
|
item.checked = false
|
||||||
})
|
})
|
||||||
taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked=true
|
taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked = true
|
||||||
this.setData({
|
this.setData({
|
||||||
taglList,
|
taglList,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//多选
|
//多选
|
||||||
checkPicker(e){
|
checkPicker(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
['taglList['+e.currentTarget.dataset.i+'].list['+e.currentTarget.dataset.j+'].checked']:!this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
['taglList[' + e.currentTarget.dataset.i + '].list[' + e.currentTarget.dataset.j + '].checked']: !this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//获取省份
|
||||||
|
getAppCityArea_province() {
|
||||||
|
let params = {};
|
||||||
|
_.apiQuery.getAppCityArea(params).then(res => {
|
||||||
|
let provinceArr = []
|
||||||
|
let provinceIndex = -1
|
||||||
|
res.data.list.forEach((item, index) => {
|
||||||
|
provinceArr.push(item.name)
|
||||||
|
if (this.data.province_id == item.id) {
|
||||||
|
provinceIndex = index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
provinceIndex,
|
||||||
|
provinceArr,
|
||||||
|
province: res.data.list
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
//获取城市
|
//获取城市
|
||||||
getAppCityArea_city(){
|
getAppCityArea_city() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['type'] = 'city';
|
params['type'] = 'city';
|
||||||
|
params['pid'] = this.data.province_id;
|
||||||
_.apiQuery.getAppCityArea(params).then(res => {
|
_.apiQuery.getAppCityArea(params).then(res => {
|
||||||
let cityArr = []
|
let cityArr = []
|
||||||
let cityIndex = -1
|
let cityIndex = -1
|
||||||
res.data.list.forEach((item,index) => {
|
res.data.list.forEach((item, index) => {
|
||||||
cityArr.push(item.name)
|
cityArr.push(item.name)
|
||||||
if(this.data.city_id == item.id){
|
if (this.data.city_id == item.id) {
|
||||||
cityIndex = index
|
cityIndex = index
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
cityIndex,
|
cityIndex,
|
||||||
cityArr,
|
cityArr,
|
||||||
city:res.data.list
|
city: res.data.list
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取行政区
|
//获取行政区
|
||||||
getAppCityArea_county(){
|
getAppCityArea_county() {
|
||||||
let params = {};
|
let params = {};
|
||||||
params['pid'] = this.data.city_id;
|
params['pid'] = this.data.city_id;
|
||||||
params['type'] = 'county';
|
params['type'] = 'county';
|
||||||
_.apiQuery.getAppCityArea(params).then(res => {
|
_.apiQuery.getAppCityArea(params).then(res => {
|
||||||
let countyArr = []
|
let countyArr = []
|
||||||
let countyIndex = -1
|
let countyIndex = -1
|
||||||
res.data.list.forEach((item,index) => {
|
res.data.list.forEach((item, index) => {
|
||||||
countyArr.push(item.name)
|
countyArr.push(item.name)
|
||||||
if(this.data.county_id == item.id){
|
if (this.data.county_id == item.id) {
|
||||||
countyIndex = index
|
countyIndex = index
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.setData({
|
this.setData({
|
||||||
countyIndex,
|
countyIndex,
|
||||||
countyArr,
|
countyArr,
|
||||||
county:res.data.list
|
county: res.data.list
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择城市
|
//选择城市
|
||||||
changeCbrand(e) {
|
changeCbrand(e) {
|
||||||
if(this.data.c_brandIndex!=e.detail.value){
|
if (this.data.c_brandIndex != e.detail.value) {
|
||||||
this.setData({
|
this.setData({
|
||||||
c_brandIndex:e.detail.value,
|
c_brandIndex: e.detail.value,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//选择省份
|
||||||
|
changeProvince(e) {
|
||||||
|
if (this.data.provinceIndex != e.detail.value) {
|
||||||
|
this.setData({
|
||||||
|
provinceIndex: e.detail.value,
|
||||||
|
province_id: this.data.province[e.detail.value].id,
|
||||||
|
city_id: '',
|
||||||
|
cityIndex: -1,
|
||||||
|
|
||||||
|
countyIndex: -1,
|
||||||
|
county_id: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.getAppCityArea_city()
|
||||||
|
},
|
||||||
//选择城市
|
//选择城市
|
||||||
changeCity(e) {
|
changeCity(e) {
|
||||||
if(this.data.cityIndex!=e.detail.value){
|
if (this.data.cityIndex != e.detail.value) {
|
||||||
this.setData({
|
this.setData({
|
||||||
cityIndex:e.detail.value,
|
cityIndex: e.detail.value,
|
||||||
city_id:this.data.city[e.detail.value].id,
|
city_id: this.data.city[e.detail.value].id,
|
||||||
})
|
})
|
||||||
this.getAppCityArea_county()
|
this.getAppCityArea_county()
|
||||||
}
|
}
|
||||||
@@ -566,95 +603,95 @@ Page({
|
|||||||
|
|
||||||
//选择地区
|
//选择地区
|
||||||
changeCounty(e) {
|
changeCounty(e) {
|
||||||
if(this.data.countyIndex!=e.detail.value){
|
if (this.data.countyIndex != e.detail.value) {
|
||||||
this.setData({
|
this.setData({
|
||||||
countyIndex:e.detail.value,
|
countyIndex: e.detail.value,
|
||||||
county_id:this.data.county[e.detail.value].id,
|
county_id: this.data.county[e.detail.value].id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//查看存在客户信息
|
//查看存在客户信息
|
||||||
viewDetails(e){
|
viewDetails(e) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/customer/detail/index?id=' + this.data.exist.data.id
|
url: '/pages/customer/detail/index?id=' + this.data.exist.data.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//关闭客户已存在提示
|
//关闭客户已存在提示
|
||||||
colseExist(){
|
colseExist() {
|
||||||
this.setData({
|
this.setData({
|
||||||
isShowExist: false,
|
isShowExist: false,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//是否添加个微
|
//是否添加个微
|
||||||
switchWxgr:function(e){
|
switchWxgr: function (e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
wxgr:e.detail.value ? 1 :0
|
wxgr: e.detail.value ? 1 : 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//选择图片
|
//选择图片
|
||||||
chooseImg(e) {
|
chooseImg(e) {
|
||||||
let that = this
|
let that = this
|
||||||
|
|
||||||
//上传个微截图
|
//上传个微截图
|
||||||
if(e.currentTarget.dataset.type=='gw_img'){
|
if (e.currentTarget.dataset.type == 'gw_img') {
|
||||||
wx.chooseImage({
|
wx.chooseImage({
|
||||||
count: 1, // 默认9
|
count: 1, // 默认9
|
||||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||||
success(res) {
|
success(res) {
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '上传中',
|
title: '上传中',
|
||||||
})
|
})
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url:_.config.api.upImg,
|
url: _.config.api.upImg,
|
||||||
filePath:res.tempFilePaths[0],
|
filePath: res.tempFilePaths[0],
|
||||||
name: 'img',
|
name: 'img',
|
||||||
formData: {
|
formData: {
|
||||||
'app': 'liche'
|
'app': 'liche'
|
||||||
},
|
},
|
||||||
success: (resp) => {
|
success: (resp) => {
|
||||||
resp.data = JSON.parse(resp.data);
|
resp.data = JSON.parse(resp.data);
|
||||||
if (resp.data.code == 200) {
|
if (resp.data.code == 200) {
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
that.setData({
|
that.setData({
|
||||||
wxgrimg:resp.data.data.url,
|
wxgrimg: resp.data.data.url,
|
||||||
wxgrimg_url:resp.data.data.full_url,
|
wxgrimg_url: resp.data.data.full_url,
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
wx.hideLoading();
|
wx.hideLoading();
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '上传失败',
|
title: '上传失败',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: res => {
|
fail: res => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '文件选择失败',
|
title: '文件选择失败',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//查看图片
|
//查看图片
|
||||||
previewImage(e){
|
previewImage(e) {
|
||||||
if(e.currentTarget.dataset.type=='gw_img'){
|
if (e.currentTarget.dataset.type == 'gw_img') {
|
||||||
wx.previewImage({
|
wx.previewImage({
|
||||||
current:this.data.wxgrimg_url,
|
current: this.data.wxgrimg_url,
|
||||||
urls:[this.data.wxgrimg_url],
|
urls: [this.data.wxgrimg_url],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号" bindinput='inputTx' data-key="mobile" name='mobile' value='{{mobile}}' />
|
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号" bindinput='inputTx' data-key="mobile" name='mobile' value='{{mobile}}' />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!--
|
<!--
|
||||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||||
<view class="absolute left-0 box-middle font-28 color-333">品牌归属</view>
|
<view class="absolute left-0 box-middle font-28 color-333">品牌归属</view>
|
||||||
<view class="pt30 pb30 text-right font-28 color-666">
|
<view class="pt30 pb30 text-right font-28 color-666">
|
||||||
@@ -85,6 +85,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||||
|
<view class="absolute left-0 box-middle">所在省份</view>
|
||||||
|
<view class="pt30 pb30 text-right font-28 color-666">
|
||||||
|
<picker bindchange="changeProvince" value="{{provinceIndex}}" range="{{provinceArr}}">
|
||||||
|
<text class="color-ccc" wx:if="{{provinceIndex == -1}}">请选择</text>
|
||||||
|
<text wx:else>{{provinceArr[provinceIndex]}}</text>
|
||||||
|
<i class="iconfont ml5 icon-gengduo"></i>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||||
<view class="absolute left-0 box-middle">所在城市</view>
|
<view class="absolute left-0 box-middle">所在城市</view>
|
||||||
<view class="pt30 pb30 text-right font-28 color-666">
|
<view class="pt30 pb30 text-right font-28 color-666">
|
||||||
@@ -140,7 +150,7 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
<block wx:for='{{taglList}}' wx:for-item='list' wx:for-index='i' wx:key='i'>
|
||||||
<view class="relative mt30">
|
<view class="relative mt30">
|
||||||
<view class="font-28">
|
<view class="font-28">
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block wx:if="{{distTabId == 1}}">
|
<block wx:if="{{distTabId == 1}}">
|
||||||
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
<view class="mt20 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
||||||
<view class="fn-fl">销售顾问</view>
|
<view class="fn-fl">车管家</view>
|
||||||
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{employeeArray}}">
|
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{employeeArray}}">
|
||||||
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{employeeArray[employeeIndex]}}</text>
|
<text wx:else>{{employeeArray[employeeIndex]}}</text>
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ Page({
|
|||||||
of2Index: -1,
|
of2Index: -1,
|
||||||
c_brandIndex: -1,
|
c_brandIndex: -1,
|
||||||
|
|
||||||
|
provinceIndex: -1,
|
||||||
|
province_id: '',
|
||||||
cityIndex: -1,
|
cityIndex: -1,
|
||||||
city_id: '',
|
city_id: '',
|
||||||
countyIndex: -1,
|
countyIndex: -1,
|
||||||
@@ -395,6 +397,11 @@ Page({
|
|||||||
title: '请选择客户来源',
|
title: '请选择客户来源',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
} else if (that.data.province_id == '') {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请选择所在省份',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
} else if (that.data.city_id == '') {
|
} else if (that.data.city_id == '') {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择所在城市',
|
title: '请选择所在城市',
|
||||||
@@ -453,6 +460,7 @@ Page({
|
|||||||
if (that.data.cf_edit_status && that.data.of2_id != that.data.baseinfo.of_id.of2_id) {
|
if (that.data.cf_edit_status && that.data.of2_id != that.data.baseinfo.of_id.of2_id) {
|
||||||
params['of2_id'] = that.data.of2_id;
|
params['of2_id'] = that.data.of2_id;
|
||||||
}
|
}
|
||||||
|
params['province_id'] = that.data.province_id;
|
||||||
params['city_id'] = that.data.city_id;
|
params['city_id'] = that.data.city_id;
|
||||||
params['county_id'] = that.data.county_id;
|
params['county_id'] = that.data.county_id;
|
||||||
// if(that.data.car_id != that.data.baseinfo.car_id.value){
|
// if(that.data.car_id != that.data.baseinfo.car_id.value){
|
||||||
@@ -556,11 +564,13 @@ Page({
|
|||||||
params['id'] = this.data.id;
|
params['id'] = this.data.id;
|
||||||
_.apiQuery.getAppCustomersTag(params).then(res => {
|
_.apiQuery.getAppCustomersTag(params).then(res => {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
province_id: res.data.province_id,
|
||||||
city_id: res.data.city_id,
|
city_id: res.data.city_id,
|
||||||
county_id: res.data.county_id,
|
county_id: res.data.county_id,
|
||||||
taglList: res.data.tags && res.data.tags.length > 0 ? res.data.tags : [],
|
taglList: res.data.tags && res.data.tags.length > 0 ? res.data.tags : [],
|
||||||
})
|
})
|
||||||
|
//获取省份
|
||||||
|
this.getAppCityArea_province()
|
||||||
//获取城市
|
//获取城市
|
||||||
this.getAppCityArea_city()
|
this.getAppCityArea_city()
|
||||||
//获取地区
|
//获取地区
|
||||||
@@ -586,10 +596,31 @@ Page({
|
|||||||
['taglList[' + e.currentTarget.dataset.i + '].list[' + e.currentTarget.dataset.j + '].checked']: !this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
['taglList[' + e.currentTarget.dataset.i + '].list[' + e.currentTarget.dataset.j + '].checked']: !this.data.taglList[e.currentTarget.dataset.i].list[e.currentTarget.dataset.j].checked,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取省份
|
||||||
|
getAppCityArea_province() {
|
||||||
|
let params = {};
|
||||||
|
_.apiQuery.getAppCityArea(params).then(res => {
|
||||||
|
let provinceArr = []
|
||||||
|
let provinceIndex = -1
|
||||||
|
res.data.list.forEach((item, index) => {
|
||||||
|
provinceArr.push(item.name)
|
||||||
|
console.log(this.data.province_id)
|
||||||
|
if (this.data.province_id == item.id) {
|
||||||
|
provinceIndex = index
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.setData({
|
||||||
|
provinceIndex,
|
||||||
|
provinceArr,
|
||||||
|
province: res.data.list
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//获取城市
|
//获取城市
|
||||||
getAppCityArea_city() {
|
getAppCityArea_city() {
|
||||||
let params = {};
|
let params = {};
|
||||||
|
params['pid'] = this.data.province_id;
|
||||||
params['type'] = 'city';
|
params['type'] = 'city';
|
||||||
_.apiQuery.getAppCityArea(params).then(res => {
|
_.apiQuery.getAppCityArea(params).then(res => {
|
||||||
let cityArr = []
|
let cityArr = []
|
||||||
@@ -629,7 +660,21 @@ Page({
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//选择省份
|
||||||
|
changeProvince(e) {
|
||||||
|
if (this.data.provinceIndex != e.detail.value) {
|
||||||
|
this.setData({
|
||||||
|
provinceIndex: e.detail.value,
|
||||||
|
province_id: this.data.province[e.detail.value].id,
|
||||||
|
city_id: '',
|
||||||
|
cityIndex: -1,
|
||||||
|
|
||||||
|
countyIndex: -1,
|
||||||
|
county_id: '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.getAppCityArea_city()
|
||||||
|
},
|
||||||
//选择城市
|
//选择城市
|
||||||
changeCity(e) {
|
changeCity(e) {
|
||||||
if (this.data.cityIndex != e.detail.value) {
|
if (this.data.cityIndex != e.detail.value) {
|
||||||
|
|||||||
@@ -84,6 +84,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||||
|
<view class="absolute left-0 box-middle">所在省份</view>
|
||||||
|
<view class="pt30 pb30 text-right font-28 color-666">
|
||||||
|
<picker bindchange="changeProvince" value="{{provinceIndex}}" range="{{provinceArr}}">
|
||||||
|
<text class="color-ccc" wx:if="{{provinceIndex == -1}}">请选择</text>
|
||||||
|
<text wx:else>{{provinceArr[provinceIndex]}}</text>
|
||||||
|
<i class="iconfont ml5 icon-gengduo"></i>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||||
<view class="absolute left-0 box-middle">所在城市</view>
|
<view class="absolute left-0 box-middle">所在城市</view>
|
||||||
<view class="pt30 pb30 text-right font-28 color-666">
|
<view class="pt30 pb30 text-right font-28 color-666">
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||||
<view class="mt25 fn-clear font-28">
|
<view class="mt25 fn-clear font-28">
|
||||||
<view class="fn-fl color-333">{{key}}</view>
|
<view class="fn-fl color-333">{{key}}</view>
|
||||||
<block wx:if="{{key=='销售顾问'}}">
|
<block wx:if="{{key=='车管家'}}">
|
||||||
<view class="fn-fr wp60 text-nowrap text-right">
|
<view class="fn-fr wp60 text-nowrap text-right">
|
||||||
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
||||||
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||||
<view class="mt25 fn-clear font-28">
|
<view class="mt25 fn-clear font-28">
|
||||||
<view class="fn-fl color-333">{{key}}</view>
|
<view class="fn-fl color-333">{{key}}</view>
|
||||||
<block wx:if="{{key=='销售顾问'}}">
|
<block wx:if="{{key=='车管家'}}">
|
||||||
<view class="fn-fr wp60 text-nowrap text-right">
|
<view class="fn-fr wp60 text-nowrap text-right">
|
||||||
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
||||||
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{staffArray.length>0&&userInfo.group_id>1}}">
|
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{staffArray.length>0&&userInfo.group_id>1}}">
|
||||||
<view class="absolute left-0 box-middle">销售顾问</view>
|
<view class="absolute left-0 box-middle">车管家</view>
|
||||||
<view class="pt25 pb25 text-right font-28 color-666">
|
<view class="pt25 pb25 text-right font-28 color-666">
|
||||||
<picker bindchange="changeStaff" value="{{staffIndex}}" range="{{staffArray}}">
|
<picker bindchange="changeStaff" value="{{staffIndex}}" range="{{staffArray}}">
|
||||||
<text class="color-ccc" wx:if="{{staffIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{staffIndex == -1}}">请选择</text>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<block wx:if="{{distTabId == 1}}">
|
<block wx:if="{{distTabId == 1}}">
|
||||||
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
||||||
<view class="fn-fl">销售顾问</view>
|
<view class="fn-fl">车管家</view>
|
||||||
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
||||||
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
<block wx:for="{{item.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||||
<view class="mt25 fn-clear font-28">
|
<view class="mt25 fn-clear font-28">
|
||||||
<view class="fn-fl color-333">{{key}}</view>
|
<view class="fn-fl color-333">{{key}}</view>
|
||||||
<block wx:if="{{key=='销售顾问'}}">
|
<block wx:if="{{key=='车管家'}}">
|
||||||
<view class="fn-fr wp60 text-nowrap text-right">
|
<view class="fn-fr wp60 text-nowrap text-right">
|
||||||
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
<text class="text-middle color-666" wx:if="{{value}}">{{value}}</text>
|
||||||
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
<text class="text-middle color-f9394d" wx:else>待分配</text>
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
||||||
<view class="font-22">销售顾问</view>
|
<view class="font-22">车管家</view>
|
||||||
<view class="fn-clear">
|
<view class="fn-clear">
|
||||||
<block wx:for="{{staffobj}}" wx:key='index'>
|
<block wx:for="{{staffobj}}" wx:key='index'>
|
||||||
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
|
<view class="inline-block space-nowrap mt20 mr20 pt15 pb15 pl30 pr30 font-22 ulib-r10 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
-->
|
-->
|
||||||
<block wx:if="{{distTabId == 1}}">
|
<block wx:if="{{distTabId == 1}}">
|
||||||
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
||||||
<view class="fn-fl">销售顾问</view>
|
<view class="fn-fl">车管家</view>
|
||||||
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
||||||
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ Page({
|
|||||||
})
|
})
|
||||||
} else if(this.data.adviserIndex == -1){
|
} else if(this.data.adviserIndex == -1){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择销售顾问',
|
title: '请选择车管家',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view class="pl30 pr30">
|
<view class="pl30 pr30">
|
||||||
<view class="mt20 relative">
|
<view class="mt20 relative">
|
||||||
<view class="font-32">用户信息</view>
|
<view class="font-32">用户信息</view>
|
||||||
<view class="absolute right-0 box-middle font-22 color-666">销售顾问:<text class="color-36afa2">{{info.admin_name}}</text></view>
|
<view class="absolute right-0 box-middle font-22 color-666">车管家:<text class="color-36afa2">{{info.admin_name}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt20 pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
|
<view class="mt20 pl40 pr40 pt10 pb10 relative ulib-r10 box-shadow-000-10-10 overflowhidden">
|
||||||
<view class="pt30 pb30 font-28">
|
<view class="pt30 pb30 font-28">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="pl30 pr30">
|
<view class="pl30 pr30">
|
||||||
<view class="mt20 relative">
|
<view class="mt20 relative">
|
||||||
<view class="font-22 color-666">销售顾问:<text class="color-36afa2">{{info.admin_name}}</text></view>
|
<view class="font-22 color-666">车管家:<text class="color-36afa2">{{info.admin_name}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt20 fn-clear">
|
<view class="mt20 fn-clear">
|
||||||
<view class="fn-fl pt10 font-32">购车主体信息</view>
|
<view class="fn-fl pt10 font-32">购车主体信息</view>
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ Page({
|
|||||||
let that = this
|
let that = this
|
||||||
if (that.data.employeeIndex == -1 ) {
|
if (that.data.employeeIndex == -1 ) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择销售顾问',
|
title: '请选择车管家',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,7 +138,7 @@
|
|||||||
<view slot="content">
|
<view slot="content">
|
||||||
<view class="inner30">
|
<view class="inner30">
|
||||||
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
||||||
<view class="fn-fl">销售顾问</view>
|
<view class="fn-fl">车管家</view>
|
||||||
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
||||||
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ Page({
|
|||||||
let that = this
|
let that = this
|
||||||
if (that.data.employeeIndex == -1 ) {
|
if (that.data.employeeIndex == -1 ) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请选择销售顾问',
|
title: '请选择车管家',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
<view class="relative bbs-1-eb pt25 pb25 last-b-none">
|
||||||
<view class="font-22">销售顾问</view>
|
<view class="font-22">车管家</view>
|
||||||
<view class="fn-clear">
|
<view class="fn-clear">
|
||||||
<block wx:for="{{staffobj}}" wx:key='index'>
|
<block wx:for="{{staffobj}}" wx:key='index'>
|
||||||
<view class="inline-block radio-btn mt20 mr15 pt15 pb15 pl20 pr20 ulib-r10 font-28 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
|
<view class="inline-block radio-btn mt20 mr15 pt15 pb15 pl20 pr20 ulib-r10 font-28 {{item.checked?'bg-333 color-fff':'bg-f8'}}" bindtap="checkPicker" data-index="{{index}}">
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
<view slot="content">
|
<view slot="content">
|
||||||
<view class="inner30">
|
<view class="inner30">
|
||||||
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
<view class="mt20 ml10 mr10 bds-2-eb inner20 font-28 color-666 fn-clear ulib-r10">
|
||||||
<view class="fn-fl">销售顾问</view>
|
<view class="fn-fl">车管家</view>
|
||||||
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
<picker class="fn-fr wp60 text-right" bindchange="changeEmployee" value="{{employeeIndex}}" range="{{staffArray}}">
|
||||||
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
<text class="color-ccc" wx:if="{{employeeIndex == -1}}">请选择</text>
|
||||||
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
<text wx:else>{{staffArray[employeeIndex]}}</text>
|
||||||
|
|||||||
@@ -222,7 +222,7 @@
|
|||||||
<view class="mt10 pt20 pb20 bg-e3f5f3 font-36 text-center ulib-r10">信息预览</view>
|
<view class="mt10 pt20 pb20 bg-e3f5f3 font-36 text-center ulib-r10">信息预览</view>
|
||||||
<view class="mt20 relative">
|
<view class="mt20 relative">
|
||||||
<view class="font-32">用户信息</view>
|
<view class="font-32">用户信息</view>
|
||||||
<view class="absolute right-0 box-middle font-22 color-666">销售顾问:<text class="color-36afa2">{{userInfo.uname}}</text></view>
|
<view class="absolute right-0 box-middle font-22 color-666">车管家:<text class="color-36afa2">{{userInfo.uname}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
<view class="relative bbs-1-eb last-b-none pl180 font-28">
|
||||||
<view class="absolute left-0 box-middle">客户手机号码</view>
|
<view class="absolute left-0 box-middle">客户手机号码</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user