20240606
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<view class="footer text-center">
|
||||
<!--
|
||||
<view>
|
||||
<text class="support-tx">Powered by</text>
|
||||
<!-- <image class='inline-block img-30x30' mode='aspectFit' src='https://qs.haodian.cn/wechat_app/common/lc-logo-gray.png?v=220223'></image> -->
|
||||
<image class='inline-block img-30x30' mode='aspectFit' src='https://qs.haodian.cn/wechat_app/common/lc-logo-gray.png?v=220223'></image>
|
||||
<text class="support-tx">狸车</text>
|
||||
</view>
|
||||
-->
|
||||
</view>
|
||||
@@ -67,13 +67,13 @@ Page({
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
this.getAppCustomersDefeats()
|
||||
this.getAppCluesList()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.getAppCustomersDefeats()
|
||||
this.getAppCluesList()
|
||||
},
|
||||
|
||||
})
|
||||
+211
-209
@@ -2,8 +2,8 @@ import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
name:'',//名字
|
||||
mobile:'',//手机号
|
||||
name: '', //名字
|
||||
mobile: '', //手机号
|
||||
// brand_id:'',//品牌
|
||||
// car_id:'',//车系id
|
||||
// v_id:'',//车辆版本id
|
||||
@@ -15,32 +15,34 @@ Page({
|
||||
// colorIndex:-1,//车身颜色索引
|
||||
// levelIndex:-1,//车辆版本索引
|
||||
|
||||
c_brands:[
|
||||
'综合','东风纳米','哪吒','零跑'
|
||||
],
|
||||
// c_brands:[
|
||||
// '综合','东风纳米','哪吒','零跑'
|
||||
// ],
|
||||
|
||||
c_brandArray:[
|
||||
{id:0, name:'综合'},
|
||||
{id:1, name:'东风纳米'},
|
||||
{id:4, name:'哪吒'},
|
||||
{id:5, name:'零跑'},
|
||||
],
|
||||
|
||||
submitFlag:false,
|
||||
// c_brandArray:[
|
||||
// {id:0, name:'综合'},
|
||||
// {id:1, name:'东风纳米'},
|
||||
// {id:4, name:'哪吒'},
|
||||
// {id:5, name:'零跑'},
|
||||
// ],
|
||||
|
||||
submitFlag: false,
|
||||
|
||||
// of_id:'',
|
||||
of2_id:'',
|
||||
of2_id: '',
|
||||
// of1Index:-1,
|
||||
of2Index:-1,
|
||||
c_brandIndex:-1,
|
||||
of2Index: -1,
|
||||
c_brandIndex: -1,
|
||||
|
||||
cityIndex:-1,
|
||||
city_id:'',
|
||||
countyIndex:-1,
|
||||
county_id:'',
|
||||
wxgr:0,//是否添加个微
|
||||
wxgrimg:'',//个微
|
||||
wxgrimg_url:'',//个微
|
||||
cityIndex: -1,
|
||||
city_id: '',
|
||||
countyIndex: -1,
|
||||
county_id: '',
|
||||
wxgr: 0, //是否添加个微
|
||||
wxgrimg: '', //个微
|
||||
wxgrimg_url: '', //个微
|
||||
cf_title: '',
|
||||
cf_edit_status: false,
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
@@ -54,59 +56,62 @@ Page({
|
||||
},
|
||||
|
||||
//获取客户详细信息
|
||||
getAppCustomerData(){
|
||||
getAppCustomerData() {
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomerData(params).then(res=>{
|
||||
_.apiQuery.getAppCustomerData(params).then(res => {
|
||||
this.setData({
|
||||
baseinfo:res.data.baseinfo,
|
||||
name:res.data.baseinfo.name.value?res.data.baseinfo.name.value:'',
|
||||
mobile:res.data.baseinfo.mobile.value?res.data.baseinfo.mobile.value:'',
|
||||
baseinfo: res.data.baseinfo,
|
||||
name: res.data.baseinfo.name.value ? res.data.baseinfo.name.value : '',
|
||||
mobile: res.data.baseinfo.mobile.value ? res.data.baseinfo.mobile.value : '',
|
||||
// of_id:res.data.baseinfo.of_id.of_id?res.data.baseinfo.of_id.of_id:'',
|
||||
of2_id:res.data.baseinfo.of_id.of2_id?res.data.baseinfo.of_id.of2_id:'',
|
||||
wxgr:res.data.baseinfo.wxgr,
|
||||
wxgrimg:res.data.baseinfo.wxgrimg,
|
||||
wxgrimg_url:res.data.baseinfo.wxgrimg_url,
|
||||
of2_id: res.data.baseinfo.of_id.of2_id ? res.data.baseinfo.of_id.of2_id : '',
|
||||
cf_title: res.data.baseinfo.of_id.value ? res.data.baseinfo.of_id.value : '',
|
||||
cf_edit_status: res.data.baseinfo.of_id.edit_status,
|
||||
wxgr: res.data.baseinfo.wxgr,
|
||||
wxgrimg: res.data.baseinfo.wxgrimg,
|
||||
wxgrimg_url: res.data.baseinfo.wxgrimg_url,
|
||||
})
|
||||
|
||||
this.data.c_brandArray.forEach((item,index) => {
|
||||
if(res.data.baseinfo.c_brand == item.id){
|
||||
this.setData({
|
||||
c_brandIndex:index
|
||||
})
|
||||
}
|
||||
})
|
||||
// this.data.c_brandArray.forEach((item,index) => {
|
||||
// if(res.data.baseinfo.c_brand == item.id){
|
||||
// this.setData({
|
||||
// c_brandIndex:index
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
|
||||
//编辑基础信息使用
|
||||
//获取车型品牌
|
||||
//this.getAppSeriesBrands()
|
||||
//匹配车系车型
|
||||
//this.getAppSeriesedit()
|
||||
this.getAppCustomersOffline_sources()
|
||||
|
||||
if (this.data.cf_edit_status) {
|
||||
this.getAppCustomersOffline_sources()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取车型品牌
|
||||
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,
|
||||
brandIndex:-1,
|
||||
brandArray: brandArray,
|
||||
brandList: res.data.list,
|
||||
brandIndex: -1,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.brand_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.brand_id.value){
|
||||
if (this.data.baseinfo.brand_id.value != '') {
|
||||
res.data.list.forEach((item, index) => {
|
||||
if (item.id == this.data.baseinfo.brand_id.value) {
|
||||
this.setData({
|
||||
brand_id:this.data.baseinfo.brand_id.value,
|
||||
brandIndex:index,
|
||||
brand_id: this.data.baseinfo.brand_id.value,
|
||||
brandIndex: index,
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -117,27 +122,27 @@ Page({
|
||||
},
|
||||
|
||||
//匹配车系车型
|
||||
getAppSeriesedit(){
|
||||
getAppSeriesedit() {
|
||||
let params = {};
|
||||
params['brand_id'] = this.data.baseinfo.brand_id.value;
|
||||
_.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,
|
||||
modelIndex:-1,
|
||||
modelArray: modelArray,
|
||||
modelList: res.data.list,
|
||||
modelIndex: -1,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.car_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.car_id.value){
|
||||
if (this.data.baseinfo.car_id.value != '') {
|
||||
res.data.list.forEach((item, index) => {
|
||||
if (item.id == this.data.baseinfo.car_id.value) {
|
||||
this.setData({
|
||||
car_id:this.data.baseinfo.car_id.value,
|
||||
modelIndex:index,
|
||||
car_id: this.data.baseinfo.car_id.value,
|
||||
modelIndex: index,
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -152,47 +157,47 @@ Page({
|
||||
},
|
||||
|
||||
//编辑品牌时车系车型
|
||||
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,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车辆版本 ---编辑匹配信息
|
||||
getAppSeriesAttrsleveledit(){
|
||||
getAppSeriesAttrsleveledit() {
|
||||
|
||||
let params = {};
|
||||
params['id'] = this.data.modelList[this.data.modelIndex].id;
|
||||
params['type'] = 0;
|
||||
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
||||
if(res.data.total>0){
|
||||
if (res.data.total > 0) {
|
||||
let levelArray = []
|
||||
res.data.list.forEach(item => {
|
||||
levelArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
levelArray:levelArray,
|
||||
levelList:res.data.list,
|
||||
levelIndex:-1,
|
||||
levelArray: levelArray,
|
||||
levelList: res.data.list,
|
||||
levelIndex: -1,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.v_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.v_id.value){
|
||||
if (this.data.baseinfo.v_id.value != '') {
|
||||
res.data.list.forEach((item, index) => {
|
||||
if (item.id == this.data.baseinfo.v_id.value) {
|
||||
this.setData({
|
||||
v_id:this.data.baseinfo.v_id.value,
|
||||
levelIndex:index,
|
||||
v_id: this.data.baseinfo.v_id.value,
|
||||
levelIndex: index,
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -205,29 +210,29 @@ Page({
|
||||
},
|
||||
|
||||
//获取车身颜色 ---编辑匹配信息
|
||||
getAppSeriesAttrscoloredit(){
|
||||
getAppSeriesAttrscoloredit() {
|
||||
let params = {};
|
||||
params['id'] = this.data.modelList[this.data.modelIndex].id;
|
||||
params['type'] = 1;
|
||||
params['v_id'] = this.data.v_id;
|
||||
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
||||
if(res.data.total>0){
|
||||
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,
|
||||
colorArray: colorArray,
|
||||
colorList: res.data.list,
|
||||
colorIndex: -1,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.color_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.color_id.value){
|
||||
if (this.data.baseinfo.color_id.value != '') {
|
||||
res.data.list.forEach((item, index) => {
|
||||
if (item.id == this.data.baseinfo.color_id.value) {
|
||||
this.setData({
|
||||
color_id:this.data.baseinfo.color_id.value,
|
||||
colorIndex:index,
|
||||
color_id: this.data.baseinfo.color_id.value,
|
||||
colorIndex: index,
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -236,44 +241,44 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
//获取车辆版本
|
||||
getAppSeriesAttrslevel(){
|
||||
getAppSeriesAttrslevel() {
|
||||
let params = {};
|
||||
params['id'] = this.data.car_id;
|
||||
params['type'] = 0;
|
||||
_.apiQuery.getAppSeriesAttrs(params).then(res => {
|
||||
if(res.data.total>0){
|
||||
if (res.data.total > 0) {
|
||||
let levelArray = []
|
||||
res.data.list.forEach(item => {
|
||||
levelArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
levelArray:levelArray,
|
||||
levelList:res.data.list,
|
||||
levelIndex:-1,
|
||||
levelArray: levelArray,
|
||||
levelList: res.data.list,
|
||||
levelIndex: -1,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车身颜色
|
||||
getAppSeriesAttrscolor(){
|
||||
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){
|
||||
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,
|
||||
colorArray: colorArray,
|
||||
colorList: res.data.list,
|
||||
colorIndex: -1,
|
||||
})
|
||||
}
|
||||
});
|
||||
@@ -282,38 +287,38 @@ Page({
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
submitFlag:false,
|
||||
submitFlag: false,
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//选择城市
|
||||
changeCbrand(e) {
|
||||
if(this.data.c_brandIndex!=e.detail.value){
|
||||
if (this.data.c_brandIndex != e.detail.value) {
|
||||
this.setData({
|
||||
c_brandIndex:e.detail.value,
|
||||
c_brandIndex: e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//选择品牌
|
||||
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
|
||||
v_id:'',//车辆版本id
|
||||
color_id:'',//车身颜色id
|
||||
incolor_id:'',//内饰颜色id
|
||||
modelIndex:-1,//车系车型索引
|
||||
colorArray:[],//车身颜色列表
|
||||
levelArray:[],//车辆版本列表
|
||||
interiorArray:[],//内饰颜色
|
||||
colorIndex:-1,//车身颜色索引
|
||||
levelIndex:-1,//车辆版本索引
|
||||
interiorIndex:-1,//内饰颜色索引
|
||||
priceinfo:'',
|
||||
brand_id: this.data.brandList[e.detail.value].id,
|
||||
brandIndex: e.detail.value,
|
||||
car_id: '', //车系id
|
||||
v_id: '', //车辆版本id
|
||||
color_id: '', //车身颜色id
|
||||
incolor_id: '', //内饰颜色id
|
||||
modelIndex: -1, //车系车型索引
|
||||
colorArray: [], //车身颜色列表
|
||||
levelArray: [], //车辆版本列表
|
||||
interiorArray: [], //内饰颜色
|
||||
colorIndex: -1, //车身颜色索引
|
||||
levelIndex: -1, //车辆版本索引
|
||||
interiorIndex: -1, //内饰颜色索引
|
||||
priceinfo: '',
|
||||
})
|
||||
this.getAppSeries()
|
||||
}
|
||||
@@ -321,20 +326,20 @@ 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
|
||||
colorArray:[],//车身颜色列表
|
||||
levelArray:[],//车辆版本列表
|
||||
interiorArray:[],//内饰颜色
|
||||
colorIndex:-1,//车身颜色索引
|
||||
levelIndex:-1,//车辆版本索引
|
||||
interiorIndex:-1,//内饰颜色索引
|
||||
priceinfo:'',
|
||||
car_id: this.data.modelList[e.detail.value].id,
|
||||
modelIndex: e.detail.value,
|
||||
v_id: '', //车辆版本id
|
||||
color_id: '', //车身颜色id
|
||||
incolor_id: '', //内饰颜色id
|
||||
colorArray: [], //车身颜色列表
|
||||
levelArray: [], //车辆版本列表
|
||||
interiorArray: [], //内饰颜色
|
||||
colorIndex: -1, //车身颜色索引
|
||||
levelIndex: -1, //车辆版本索引
|
||||
interiorIndex: -1, //内饰颜色索引
|
||||
priceinfo: '',
|
||||
})
|
||||
this.getAppSeriesAttrslevel()
|
||||
}
|
||||
@@ -342,13 +347,13 @@ Page({
|
||||
|
||||
//车辆版本
|
||||
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({
|
||||
v_id:this.data.levelList[e.detail.value].id,
|
||||
levelIndex:e.detail.value,
|
||||
color_id:'',//车身颜色id
|
||||
colorArray:[],//车身颜色列表
|
||||
colorIndex:-1,//车身颜色索引
|
||||
v_id: this.data.levelList[e.detail.value].id,
|
||||
levelIndex: e.detail.value,
|
||||
color_id: '', //车身颜色id
|
||||
colorArray: [], //车身颜色列表
|
||||
colorIndex: -1, //车身颜色索引
|
||||
})
|
||||
this.getAppSeriesAttrscolor()
|
||||
}
|
||||
@@ -356,10 +361,10 @@ Page({
|
||||
|
||||
//车身颜色
|
||||
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({
|
||||
color_id:this.data.colorList[e.detail.value].id,
|
||||
colorIndex:e.detail.value,
|
||||
color_id: this.data.colorList[e.detail.value].id,
|
||||
colorIndex: e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -368,42 +373,39 @@ Page({
|
||||
putAppCustomerData() {
|
||||
|
||||
let that = this
|
||||
if (that.data.name == '' ) {
|
||||
if (that.data.name == '') {
|
||||
wx.showToast({
|
||||
title: '请输入客户姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (that.data.mobile != that.data.baseinfo.mobile.value&&!/^1[3456789]\d{9}$/.test(that.data.mobile)){
|
||||
} else if (that.data.mobile != that.data.baseinfo.mobile.value && !/^1[3456789]\d{9}$/.test(that.data.mobile)) {
|
||||
wx.showToast({
|
||||
title: '请输入正确的手机号码',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.c_brandArray.length>0&&that.data.c_brandIndex == -1 ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户品牌归属',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.sources.length>0&&that.data.of2_id == '' ) {
|
||||
// else if (that.data.c_brandArray.length>0&&that.data.c_brandIndex == -1 ) {
|
||||
// wx.showToast({
|
||||
// title: '请选择客户品牌归属',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
else if (that.data.cf_edit_status && that.data.sources.length > 0 && that.data.of2_id == '') {
|
||||
wx.showToast({
|
||||
title: '请选择客户来源',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.city_id == '' ) {
|
||||
} else if (that.data.city_id == '') {
|
||||
wx.showToast({
|
||||
title: '请选择所在城市',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if (that.data.county_id == '' ) {
|
||||
} else if (that.data.county_id == '') {
|
||||
wx.showToast({
|
||||
title: '请选择所在地区',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else if(this.data.wxgr==1&&this.data.wxgrimg==''){
|
||||
} else if (this.data.wxgr == 1 && this.data.wxgrimg == '') {
|
||||
wx.showToast({
|
||||
title: '请上传个微截图',
|
||||
icon: 'none'
|
||||
@@ -431,24 +433,24 @@ Page({
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
else{
|
||||
else {
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
|
||||
|
||||
let params = {};
|
||||
params['cus_id'] = that.data.id;
|
||||
params['tag'] = that.data.taglList;
|
||||
if(that.data.name != that.data.baseinfo.name.value){
|
||||
if (that.data.name != that.data.baseinfo.name.value) {
|
||||
params['name'] = that.data.name;
|
||||
}
|
||||
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
||||
if (that.data.mobile != that.data.baseinfo.mobile.value) {
|
||||
params['mobile'] = that.data.mobile;
|
||||
}
|
||||
if(this.data.c_brandIndex != -1){
|
||||
params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].id;
|
||||
}
|
||||
if(that.data.of2_id != that.data.baseinfo.of_id.of2_id){
|
||||
// if(this.data.c_brandIndex != -1){
|
||||
// params['c_brand'] = this.data.c_brandArray[this.data.c_brandIndex].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['city_id'] = that.data.city_id;
|
||||
@@ -463,7 +465,7 @@ Page({
|
||||
// params['color_id'] = that.data.color_id;
|
||||
// }
|
||||
params['wxgr'] = this.data.wxgr;
|
||||
if(this.data.wxgr==1){
|
||||
if (this.data.wxgr == 1) {
|
||||
params['wxgrimg'] = this.data.wxgrimg;
|
||||
}
|
||||
_.apiQuery.putAppCustomerData(params).then(res => {
|
||||
@@ -474,11 +476,11 @@ Page({
|
||||
let prevPage2 = null; //上上一个页面
|
||||
if (pages.length >= 2) {
|
||||
prevPage1 = pages[pages.length - 2]; //上一个页面
|
||||
if(prevPage1.route == 'pages/customer/detail/index'){
|
||||
if (prevPage1.route == 'pages/customer/detail/index') {
|
||||
prevPage1.onPullDownRefresh()
|
||||
}
|
||||
prevPage2 = pages[pages.length - 3]; //上一个页面
|
||||
if(prevPage2.route == 'pages/customer/index'){
|
||||
if (prevPage2.route == 'pages/customer/index') {
|
||||
prevPage2.onPullDownRefresh()
|
||||
}
|
||||
}
|
||||
@@ -506,8 +508,8 @@ Page({
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
|
||||
}).catch(res => {
|
||||
that.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
@@ -516,7 +518,7 @@ Page({
|
||||
},
|
||||
|
||||
//客户来源
|
||||
getAppCustomersOffline_sources(){
|
||||
getAppCustomersOffline_sources() {
|
||||
_.apiQuery.getAppCustomersOffline_sources().then(res => {
|
||||
let of2Arr = []
|
||||
res.data.forEach(item => {
|
||||
@@ -524,13 +526,13 @@ Page({
|
||||
})
|
||||
this.setData({
|
||||
of2Arr,
|
||||
sources:res.data
|
||||
sources: res.data
|
||||
})
|
||||
if(this.data.of2_id != ''){
|
||||
res.data.forEach((item,index) => {
|
||||
if(item.id == this.data.of2_id){
|
||||
if (this.data.of2_id != '') {
|
||||
res.data.forEach((item, index) => {
|
||||
if (item.id == this.data.of2_id) {
|
||||
this.setData({
|
||||
of2Index:index,
|
||||
of2Index: index,
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -540,23 +542,23 @@ Page({
|
||||
|
||||
//客户来源
|
||||
changeOf2(e) {
|
||||
if(this.data.of2Index!=e.detail.value){
|
||||
if (this.data.of2Index != e.detail.value) {
|
||||
this.setData({
|
||||
of2_id:this.data.sources[e.detail.value].id,
|
||||
of2Index:e.detail.value,
|
||||
of2_id: this.data.sources[e.detail.value].id,
|
||||
of2Index: e.detail.value,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//客户标签
|
||||
getAppCustomersTag(){
|
||||
getAppCustomersTag() {
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomersTag(params).then(res => {
|
||||
this.setData({
|
||||
city_id:res.data.city_id,
|
||||
county_id:res.data.county_id,
|
||||
taglList:res.data.tags&&res.data.tags.length>0?res.data.tags:[],
|
||||
city_id: res.data.city_id,
|
||||
county_id: res.data.county_id,
|
||||
taglList: res.data.tags && res.data.tags.length > 0 ? res.data.tags : [],
|
||||
})
|
||||
|
||||
//获取城市
|
||||
@@ -567,73 +569,73 @@ Page({
|
||||
},
|
||||
|
||||
//单选
|
||||
radioPicker(e){
|
||||
radioPicker(e) {
|
||||
let taglList = this.data.taglList
|
||||
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({
|
||||
taglList,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//多选
|
||||
checkPicker(e){
|
||||
checkPicker(e) {
|
||||
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_city(){
|
||||
getAppCityArea_city() {
|
||||
let params = {};
|
||||
params['type'] = 'city';
|
||||
_.apiQuery.getAppCityArea(params).then(res => {
|
||||
let cityArr = []
|
||||
let cityIndex = -1
|
||||
res.data.list.forEach((item,index) => {
|
||||
res.data.list.forEach((item, index) => {
|
||||
cityArr.push(item.name)
|
||||
if(this.data.city_id == item.id){
|
||||
if (this.data.city_id == item.id) {
|
||||
cityIndex = index
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
cityIndex,
|
||||
cityArr,
|
||||
city:res.data.list
|
||||
city: res.data.list
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//获取行政区
|
||||
getAppCityArea_county(){
|
||||
getAppCityArea_county() {
|
||||
let params = {};
|
||||
params['pid'] = this.data.city_id;
|
||||
params['type'] = 'county';
|
||||
_.apiQuery.getAppCityArea(params).then(res => {
|
||||
let countyArr = []
|
||||
let countyIndex = -1
|
||||
res.data.list.forEach((item,index) => {
|
||||
res.data.list.forEach((item, index) => {
|
||||
countyArr.push(item.name)
|
||||
if(this.data.county_id == item.id){
|
||||
if (this.data.county_id == item.id) {
|
||||
countyIndex = index
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
countyIndex,
|
||||
countyArr,
|
||||
county:res.data.list
|
||||
county: res.data.list
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//选择城市
|
||||
changeCity(e) {
|
||||
if(this.data.cityIndex!=e.detail.value){
|
||||
if (this.data.cityIndex != e.detail.value) {
|
||||
this.setData({
|
||||
cityIndex:e.detail.value,
|
||||
city_id:this.data.city[e.detail.value].id,
|
||||
cityIndex: e.detail.value,
|
||||
city_id: this.data.city[e.detail.value].id,
|
||||
})
|
||||
this.getAppCityArea_county()
|
||||
}
|
||||
@@ -641,18 +643,18 @@ Page({
|
||||
|
||||
//选择地区
|
||||
changeCounty(e) {
|
||||
if(this.data.countyIndex!=e.detail.value){
|
||||
if (this.data.countyIndex != e.detail.value) {
|
||||
this.setData({
|
||||
countyIndex:e.detail.value,
|
||||
county_id:this.data.county[e.detail.value].id,
|
||||
countyIndex: e.detail.value,
|
||||
county_id: this.data.county[e.detail.value].id,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//是否添加个微
|
||||
switchWxgr:function(e){
|
||||
switchWxgr: function (e) {
|
||||
this.setData({
|
||||
wxgr:e.detail.value ? 1 :0
|
||||
wxgr: e.detail.value ? 1 : 0
|
||||
})
|
||||
},
|
||||
|
||||
@@ -661,7 +663,7 @@ Page({
|
||||
let that = this
|
||||
|
||||
//上传个微截图
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
if (e.currentTarget.dataset.type == 'gw_img') {
|
||||
wx.chooseImage({
|
||||
count: 1, // 默认9
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
@@ -671,8 +673,8 @@ Page({
|
||||
title: '上传中',
|
||||
})
|
||||
wx.uploadFile({
|
||||
url:_.config.api.upImg,
|
||||
filePath:res.tempFilePaths[0],
|
||||
url: _.config.api.upImg,
|
||||
filePath: res.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
@@ -682,10 +684,10 @@ Page({
|
||||
if (resp.data.code == 200) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
wxgrimg:resp.data.data.url,
|
||||
wxgrimg_url:resp.data.data.full_url,
|
||||
wxgrimg: resp.data.data.url,
|
||||
wxgrimg_url: resp.data.data.full_url,
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
wx.hideLoading();
|
||||
wx.showToast({
|
||||
title: '上传失败',
|
||||
@@ -709,11 +711,11 @@ Page({
|
||||
},
|
||||
|
||||
//查看图片
|
||||
previewImage(e){
|
||||
if(e.currentTarget.dataset.type=='gw_img'){
|
||||
previewImage(e) {
|
||||
if (e.currentTarget.dataset.type == 'gw_img') {
|
||||
wx.previewImage({
|
||||
current:this.data.wxgrimg_url,
|
||||
urls:[this.data.wxgrimg_url],
|
||||
current: this.data.wxgrimg_url,
|
||||
urls: [this.data.wxgrimg_url],
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</picker>
|
||||
</view>
|
||||
</view> -->
|
||||
<block wx:if="{{sources.length>0}}">
|
||||
<block wx:if="{{sources.length>0 && cf_edit_status}}">
|
||||
<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">
|
||||
@@ -76,6 +76,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28" wx:if="{{cf_title}}">
|
||||
<view class="absolute left-0 box-middle">客户来源</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
{{cf_title}}
|
||||
</view>
|
||||
</view>
|
||||
</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">
|
||||
|
||||
@@ -529,9 +529,9 @@ Page({
|
||||
this.getAppUserCal()
|
||||
this.getAppStatisticsHcust()
|
||||
//this.getAppStatisticsHorder()
|
||||
this.getAppTransferRemind()
|
||||
this.getAppInventoryRemind()
|
||||
this.getAppGoodsRemind()
|
||||
// this.getAppTransferRemind()
|
||||
// this.getAppInventoryRemind()
|
||||
// this.getAppGoodsRemind()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
{{userInfo.group_name}}
|
||||
</view>
|
||||
<view class="pb40 mt30 text-center font-32 color-666">
|
||||
<button bindtap="putAppResetgroupid" data-key="{{item.group_id}}" class="inline-block wp80 btn-36afa2 pt5 pb5 font-28 color-fff ulib-r750" wx:for='{{userInfo.group_name_arr}}' wx:key='index' wx:if="{{item.group_id != userInfo.group_id}}">
|
||||
<button bindtap="putAppResetgroupid" data-key="{{item.group_id}}" class="inline-block btn-36afa2 pt5 pb5 font-28 color-fff ulib-r750" wx:for='{{userInfo.group_name_arr}}' wx:key='index' wx:if="{{item.group_id != userInfo.group_id}}">
|
||||
{{item.geoup_name}}
|
||||
</button>
|
||||
</view>
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
|
||||
</view>
|
||||
|
||||
<view class="fixed left-0 right-0 bottom-0 pt20 pl30 pr30 pb40 bg-000-op80 fn-flex" style="z-index:999" wx:if="{{userInfo.group_id!=4 && info.status<3}}">
|
||||
<view class="fixed left-0 right-0 bottom-0 pt20 pl30 pr30 pb40 bg-000-op80 fn-flex" style="z-index:999" wx:if="{{userInfo.group_id==4 && info.status<3}}">
|
||||
<button bindtap="bindShowConfirm" class="fn-flex-item ml20 mr20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">{{info.bt_cn}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -18,7 +18,7 @@ Page({
|
||||
step: 1,
|
||||
name: '', //姓名
|
||||
mobile: '', //手机号
|
||||
cardid: '350802198901150000', //身份证
|
||||
cardid: '', //身份证
|
||||
brand_id: '', //品牌
|
||||
series_id: '', //车系id
|
||||
car_id: '', //车辆版本id
|
||||
|
||||
Reference in New Issue
Block a user