客户信息修改
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
.img-140x140{width:140rpx;height:140rpx;box-sizing:border-box;}
|
||||
.img-160x160{width:160rpx;height:160rpx;box-sizing:border-box;}
|
||||
.img-208x170{width:208rpx;height:170rpx;box-sizing:border-box;}
|
||||
.img-250x150{width:250rpx;height:150rpx;box-sizing:border-box;}
|
||||
.img-250x250{width:250rpx;height:250rpx;box-sizing:border-box;}
|
||||
.img-250x445{width:250rpx;height:445rpx;box-sizing:border-box;}
|
||||
.img-750x250{width:750rpx;height:250rpx;box-sizing:border-box;}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
.ulib-rl10{border-top-left-radius:10rpx;border-bottom-left-radius:10rpx;}
|
||||
.ulib-rr10{border-top-right-radius:10rpx;border-bottom-right-radius:10rpx;}
|
||||
.ulib-rb10{border-bottom-left-radius:10rpx;border-bottom-right-radius:10rpx;}
|
||||
.ulib-rbl10{border-bottom-left-radius:10rpx;}
|
||||
.ulib-r10-bl{border-bottom-left-radius:10rpx;}
|
||||
.ulib-r10-tr-bl{border-top-right-radius:10rpx;border-bottom-left-radius:10rpx;}
|
||||
.ulib-r15{border-radius:15rpx;}
|
||||
|
||||
Vendored
+16
-4
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
const env = "p";
|
||||
const env = "d";
|
||||
|
||||
const version = 1,
|
||||
|
||||
@@ -43,6 +43,8 @@ api = {
|
||||
appCusorderCkcar: "app/cusorder/ckcar", //确认交付
|
||||
appCustomersAdmins: "app/customers/admins", //分配客户
|
||||
appXz: "app/xz", //获取虚拟电话
|
||||
appCustomerlogs: "app/customerlogs", //新增日志
|
||||
appCustomerData: "app/customers/data", //修改客户基本信息
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -306,4 +306,18 @@ apiQuery.getAppXz = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//新增日志
|
||||
apiQuery.postAppCustomerlogs = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCustomerlogs, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//修改客户基本信息
|
||||
apiQuery.putAppCustomerData = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomerData, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -15,6 +15,9 @@ Page({
|
||||
levelArray:[],//车型级别列表
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
cf_clues:'',//线索来源
|
||||
submitFlag:false,
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
@@ -25,6 +28,7 @@ Page({
|
||||
})
|
||||
}
|
||||
this.getAppSeriesCars()
|
||||
this.getAppCustomersFilter()
|
||||
},
|
||||
|
||||
//获取车型库
|
||||
@@ -80,6 +84,16 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//获取列表筛选条件-时间
|
||||
getAppCustomersFilter(){
|
||||
_.apiQuery.getAppCustomersFilter().then(res => {
|
||||
this.setData({
|
||||
timeArray:res.data.buy_time,
|
||||
timeIndex:-1,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
@@ -140,9 +154,10 @@ Page({
|
||||
},
|
||||
|
||||
//预计购车时间
|
||||
buyDate(e){
|
||||
changeTime(e) {
|
||||
this.setData({
|
||||
buy_time: e.detail.value,
|
||||
buy_time:this.data.timeArray[e.detail.value],
|
||||
timeIndex:e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
@@ -187,6 +202,9 @@ Page({
|
||||
if(this.data.b_s_id != ''){
|
||||
params['b_s_id'] = this.data.b_s_id;
|
||||
}
|
||||
if(this.data.cf_clues != ''){
|
||||
params['cf_clues'] = this.data.cf_clues;
|
||||
}
|
||||
if(this.data.buy_time != ''){
|
||||
params['buy_time'] = this.data.buy_time;
|
||||
}
|
||||
@@ -218,11 +236,13 @@ Page({
|
||||
v_id:'',
|
||||
color_id:'',
|
||||
b_s_id:'',
|
||||
cf_clues:'',
|
||||
buy_time:'',
|
||||
modelIndex:-1,
|
||||
spareIndex:-1,
|
||||
colorIndex:-1,
|
||||
levelIndex:-1,
|
||||
timeIndex:-1,
|
||||
submitFlag:false,
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</picker>
|
||||
</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="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeSpare" value="{{spareIndex}}" range="{{modelArray}}">
|
||||
@@ -52,14 +52,20 @@
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">线索来源</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入线索来源" bindinput='inputTx' data-key="cf_clues" name='cf_clues' value='{{cf_clues}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">预计购车时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{buy_time}}" bindchange="buyDate">
|
||||
<text class="color-ccc" wx:if="{{buy_time == ''}}">请选择</text>
|
||||
<text wx:else>{{buy_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<picker bindchange="changeTime" value="{{timeIndex}}" range="{{timeArray}}">
|
||||
<text class="color-ccc" wx:if="{{timeIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{timeArray[timeIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -4,6 +4,7 @@ const innerAudioContext = wx.createInnerAudioContext();
|
||||
let interval = null
|
||||
Page({
|
||||
data: {
|
||||
imgUrl:_.config.imgUrl,
|
||||
tabid:0,
|
||||
tab:[
|
||||
{"id":0,"title":"详细信息"},
|
||||
@@ -26,6 +27,27 @@ Page({
|
||||
currentIndex:'-1',//日志播放录音
|
||||
currentime:'',//日志播放录音
|
||||
play: false,//日志播放录音
|
||||
isShowNote:false,//新增日志弹窗
|
||||
note:'',//日志
|
||||
photos:[],
|
||||
/* 编辑 */
|
||||
name:'',//名字
|
||||
mobile:'',//手机号
|
||||
car_id:'',//车型id
|
||||
v_id:'',//车型级别id
|
||||
color_id:'',//颜色id
|
||||
b_s_id:'',//备选车型id
|
||||
buy_time:'',//预计购车时间
|
||||
modelIndex:-1,//品牌车型索引
|
||||
spareIndex:-1,//备选车型索引
|
||||
colorArray:[],//车型颜色列表
|
||||
levelArray:[],//车型级别列表
|
||||
colorIndex:-1,//车型颜色索引
|
||||
levelIndex:-1,//车型级别索引
|
||||
timeArray:[],//预计购车时间列表
|
||||
timeIndex:-1,//预计购车时间索引
|
||||
cf_clues:'',//线索来源
|
||||
submitFlag:false,
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -79,8 +101,16 @@ Page({
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomerData(params).then(res=>{
|
||||
this.setData({
|
||||
baseinfo:res.data.baseinfo
|
||||
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:'',
|
||||
cf_clues:res.data.baseinfo.cf_clues.value?res.data.baseinfo.cf_clues.value:'',
|
||||
})
|
||||
|
||||
//编辑基础信息使用
|
||||
this.getAppSeriesCars()
|
||||
this.getAppCustomersFilter()
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
@@ -320,6 +350,450 @@ Page({
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
//新增小记显示隐藏
|
||||
optShowNote(){
|
||||
this.setData({
|
||||
isShowNote:!this.data.isShowNote,
|
||||
note:'',
|
||||
photos:[],
|
||||
})
|
||||
},
|
||||
|
||||
//选择图片
|
||||
chooseImg() {
|
||||
let that = this
|
||||
wx.chooseImage({
|
||||
count: 2 - this.data.photos.length, // 默认6
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res1) {
|
||||
let currentLength = that.data.photos.length
|
||||
for (let i = 0; i < res1.tempFilePaths.length; i++) {
|
||||
//上传图片
|
||||
that.uploadImg(res1.tempFilePaths[i])
|
||||
}
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
title: '文件选择失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//上传图片
|
||||
uploadImg(img){
|
||||
let that = this
|
||||
setTimeout(function () {
|
||||
wx.showLoading({
|
||||
title: '图片上传中',
|
||||
})
|
||||
}, 500);
|
||||
wx.uploadFile({
|
||||
url: _.config.api.upImg,
|
||||
filePath: img,
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success(res) {
|
||||
setTimeout(function () {
|
||||
wx.hideLoading()
|
||||
}, 500);
|
||||
let imgdata = JSON.parse(res.data)
|
||||
let list = []
|
||||
list.push({
|
||||
img:imgdata.data.url,
|
||||
img_url:imgdata.data.full_url,
|
||||
})
|
||||
that.setData({
|
||||
photos: that.data.photos.concat(list),
|
||||
})
|
||||
},
|
||||
fail(res) {
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 编辑页面删除图片
|
||||
delPic(e){
|
||||
let photos = this.data.photos
|
||||
photos.splice(e.currentTarget.dataset.index, 1)
|
||||
this.setData({
|
||||
photos: photos,
|
||||
})
|
||||
},
|
||||
|
||||
//新增日志
|
||||
postAppCustomerlogs(){
|
||||
if(this.data.photos.length == 0 && this.data.note == ''){
|
||||
wx.showToast({
|
||||
title: '请添加',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let credentials = []
|
||||
let photos = this.data.photos
|
||||
photos.forEach(item => {
|
||||
credentials.push(item.img)
|
||||
})
|
||||
let params = {};
|
||||
params['cus_id'] = this.data.id;
|
||||
if(this.data.note != ''){
|
||||
params['content'] = this.data.note;
|
||||
}
|
||||
if(credentials.length>0){
|
||||
params['imgs'] = credentials;
|
||||
}
|
||||
_.apiQuery.postAppCustomerlogs(params).then(res => {
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.setData({
|
||||
isShowNote:false,
|
||||
submitFlag:false,
|
||||
})
|
||||
this.onPullDownRefresh()
|
||||
}).catch(res=>{
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/*************************** 编辑 **********************************/
|
||||
//获取车型库
|
||||
getAppSeriesCars(){
|
||||
_.apiQuery.getAppSeriesCars().then(res => {
|
||||
if(res.data.length>0){
|
||||
let modelArray = []
|
||||
res.data.forEach(item => {
|
||||
modelArray.push(item.title)
|
||||
})
|
||||
this.setData({
|
||||
modelArray:modelArray,
|
||||
modelList:res.data,
|
||||
modelIndex:-1,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.car_id.value != ''){
|
||||
res.data.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.car_id.value){
|
||||
this.setData({
|
||||
modelIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//匹配颜色 车型级别
|
||||
this.getAppSeriesAttrsedit()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车型属性 /颜色 /车型级别 ---编辑匹配信息
|
||||
getAppSeriesAttrsedit(){
|
||||
let params1 = {};
|
||||
params1['id'] = this.data.modelList[this.data.modelIndex].id;
|
||||
params1['type'] = 0;
|
||||
_.apiQuery.getAppSeriesAttrs(params1).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,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.color_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.color_id.value){
|
||||
this.setData({
|
||||
colorIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
let params2 = {};
|
||||
params2['id'] = this.data.modelList[this.data.modelIndex].id;
|
||||
params2['type'] = 1;
|
||||
_.apiQuery.getAppSeriesAttrs(params2).then(res => {
|
||||
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,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.v_id.value != ''){
|
||||
res.data.list.forEach((item,index) => {
|
||||
if(item.id == this.data.baseinfo.v_id.value){
|
||||
this.setData({
|
||||
levelIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车型属性 /颜色 /车型级别
|
||||
getAppSeriesAttrs(){
|
||||
let params1 = {};
|
||||
params1['id'] = this.data.car_id;
|
||||
params1['type'] = 0;
|
||||
_.apiQuery.getAppSeriesAttrs(params1).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,
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
let params2 = {};
|
||||
params2['id'] = this.data.car_id;
|
||||
params2['type'] = 1;
|
||||
_.apiQuery.getAppSeriesAttrs(params2).then(res => {
|
||||
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,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取列表筛选条件-时间
|
||||
getAppCustomersFilter(){
|
||||
_.apiQuery.getAppCustomersFilter().then(res => {
|
||||
|
||||
this.setData({
|
||||
timeArray:res.data.buy_time,
|
||||
})
|
||||
|
||||
if(this.data.baseinfo.buy_time.value != 0){
|
||||
res.data.buy_time.forEach((item,index) => {
|
||||
if(item == this.data.baseinfo.buy_time.value){
|
||||
this.setData({
|
||||
timeIndex:index,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
submitFlag:false,
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//选择车型
|
||||
changeModel(e) {
|
||||
if(this.data.modelIndex != e.detail.value){
|
||||
let car_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
car_id = this.data.modelList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
car_id:car_id,
|
||||
modelIndex:e.detail.value,
|
||||
})
|
||||
if(car_id != ''){
|
||||
this.getAppSeriesAttrs()
|
||||
}
|
||||
this.putAppCustomerData()
|
||||
}
|
||||
},
|
||||
|
||||
//车型级别
|
||||
changeLevel(e) {
|
||||
if(this.data.levelIndex != e.detail.value){
|
||||
let v_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
v_id = this.data.levelList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
v_id:v_id,
|
||||
levelIndex:e.detail.value,
|
||||
})
|
||||
this.putAppCustomerData()
|
||||
}
|
||||
},
|
||||
|
||||
//车型颜色
|
||||
changeColor(e) {
|
||||
if(this.data.colorIndex != e.detail.value){
|
||||
let color_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
color_id = this.data.colorList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
color_id:color_id,
|
||||
colorIndex:e.detail.value,
|
||||
})
|
||||
this.putAppCustomerData()
|
||||
}
|
||||
},
|
||||
|
||||
//备选车型
|
||||
changeSpare(e) {
|
||||
if(this.data.spareIndex != e.detail.value){
|
||||
let b_s_id = ''
|
||||
if(e.detail.value >= 0){
|
||||
b_s_id = this.data.modelList[e.detail.value].id
|
||||
}
|
||||
this.setData({
|
||||
b_s_id:b_s_id,
|
||||
spareIndex:e.detail.value,
|
||||
})
|
||||
this.putAppCustomerData()
|
||||
}
|
||||
},
|
||||
|
||||
//预计购车时间
|
||||
changeTime(e) {
|
||||
if(this.data.timeIndex != e.detail.value){
|
||||
this.setData({
|
||||
buy_time:this.data.timeArray[e.detail.value],
|
||||
timeIndex:e.detail.value,
|
||||
})
|
||||
this.putAppCustomerData()
|
||||
}
|
||||
},
|
||||
|
||||
//编辑客户
|
||||
putAppCustomerData() {
|
||||
|
||||
let that = this
|
||||
|
||||
if(!(that.data.name==that.data.baseinfo.name.value&&that.data.mobile==that.data.baseinfo.mobile.value&&that.data.cf_clues==that.data.baseinfo.cf_clues.value&&that.data.modelIndex==-1&&that.data.spareIndex==-1&&that.data.colorIndex==-1&&that.data.levelIndex==-1&&that.data.timeIndex==-1)){
|
||||
|
||||
let params = {};
|
||||
params['cus_id'] = that.data.id;
|
||||
if(that.data.name != that.data.baseinfo.name.value){
|
||||
if (that.data.name == '' ) {
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '请输入客户姓名',
|
||||
confirmText: "知道了",
|
||||
showCancel:false,
|
||||
success() {
|
||||
that.setData({
|
||||
name:that.data.baseinfo.name.value,
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}else{
|
||||
params['name'] = that.data.name;
|
||||
}
|
||||
}
|
||||
if(that.data.mobile != that.data.baseinfo.mobile.value){
|
||||
if(!/^1[3456789]\d{9}$/.test(that.data.mobile) || that.data.mobile.indexOf("*") != -1){
|
||||
wx.showModal({
|
||||
title: '',
|
||||
content: '请输入正确手机号',
|
||||
confirmText: "知道了",
|
||||
showCancel:false,
|
||||
success() {
|
||||
that.setData({
|
||||
mobile:that.data.baseinfo.mobile.value,
|
||||
})
|
||||
}
|
||||
})
|
||||
return
|
||||
}else{
|
||||
params['mobile'] = that.data.mobile;
|
||||
}
|
||||
}
|
||||
if(that.data.cf_clues != that.data.baseinfo.cf_clues.value){
|
||||
params['cf_clues'] = that.data.cf_clues;
|
||||
}
|
||||
if(that.data.modelIndex != -1&& that.data.car_id != ''){
|
||||
params['car_id'] = that.data.car_id;
|
||||
}
|
||||
if(that.data.levelIndex != -1&& that.data.v_id != ''){
|
||||
params['v_id'] = that.data.v_id;
|
||||
}
|
||||
if(that.data.colorIndex != -1&& that.data.color_id != ''){
|
||||
params['color_id'] = that.data.color_id;
|
||||
}
|
||||
if(that.data.spareIndex != -1&& that.data.b_s_id != ''){
|
||||
params['b_s_id'] = that.data.b_s_id;
|
||||
}
|
||||
if(that.data.timeIndex != -1&& that.data.buy_time != ''){
|
||||
params['buy_time'] = that.data.buy_time;
|
||||
}
|
||||
_.apiQuery.putAppCustomerData(params).then(res => {
|
||||
|
||||
that.onPullDownRefresh()
|
||||
|
||||
//刷新列表页
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = null; //上一个页面
|
||||
if (pages.length >= 2) {
|
||||
prevPage = pages[pages.length - 2]; //上一个页面
|
||||
if(prevPage.route == 'pages/customer/index'){
|
||||
prevPage.onPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
}).catch(res=>{
|
||||
setTimeout(function () {
|
||||
that.onPullDownRefresh()
|
||||
}, 2000)
|
||||
});;
|
||||
}
|
||||
},
|
||||
|
||||
/*************************** end 编辑 **********************************/
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
|
||||
@@ -41,18 +41,81 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt30 pl10 pr10 pb150" wx:if="{{tabid == tab[0].id}}">
|
||||
<view class="mt30 pl10 pr10 pb200" wx:if="{{tabid == tab[0].id}}">
|
||||
<!-- <view class="font-22">
|
||||
<i class="iconfont icon-fenqi mr10"></i>
|
||||
<text>分期信息</text>
|
||||
</view> -->
|
||||
<view>
|
||||
<block wx:for="{{baseinfo}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle color-333">{{key}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{value}}</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">客户姓名</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入客户姓名" bindinput='inputTx' bindblur='putAppCustomerData' bindconfirm='putAppCustomerData' data-key="name" name='name' value='{{name}}' />
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
<view class="absolute left-0 box-middle">手机号码</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="number" placeholder="请输入客户手机号" bindinput='inputTx' bindblur='putAppCustomerData' bindconfirm='putAppCustomerData' data-key="mobile" name='mobile' value='{{mobile}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">品牌车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeModel" value="{{modelIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{modelIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{modelArray[modelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeLevel" value="{{levelIndex}}" range="{{levelArray}}">
|
||||
<text class="color-ccc" wx:if="{{levelIndex == -1}}">{{colorArray.length == 0?'请先选择品牌车型':'请选择'}}</text>
|
||||
<text wx:else>{{levelArray[levelIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">车型颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeColor" value="{{colorIndex}}" range="{{colorArray}}">
|
||||
<text class="color-ccc" wx:if="{{colorIndex == -1}}">{{colorArray.length == 0?'请先选择品牌车型':'请选择'}}</text>
|
||||
<text wx:else>{{colorArray[colorIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">备选车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeSpare" value="{{spareIndex}}" range="{{modelArray}}">
|
||||
<text class="color-ccc" wx:if="{{spareIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{modelArray[spareIndex]}}</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="absolute left-0 box-middle">线索来源</view>
|
||||
<view>
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入线索来源" bindinput='inputTx' bindblur='putAppCustomerData' bindconfirm='putAppCustomerData' data-key="cf_clues" name='cf_clues' value='{{cf_clues}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28 color-333">预计购车时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeTime" value="{{timeIndex}}" range="{{timeArray}}">
|
||||
<text class="color-ccc" wx:if="{{timeIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{timeArray[timeIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 pb150" wx:elif="{{tabid == tab[1].id}}">
|
||||
@@ -65,27 +128,31 @@
|
||||
</block>
|
||||
</view>
|
||||
<view class="pl15 pr15">
|
||||
<view class="mt40 font-22">
|
||||
<i class="iconfont icon-genzong mr10"></i>
|
||||
<text>用户跟踪</text>
|
||||
</view>
|
||||
<view class="orderDtail-log mt40 relative" wx:if="{{logslist.length>0}}">
|
||||
<block wx:for="{{logslist}}" wx:key="index">
|
||||
<view class="orderDtail-log-item pl40 relative">
|
||||
<view class="orderDtail-log-content">
|
||||
<view class="font-22 color-999">{{item.c_time}}</view>
|
||||
<view class="font-28 text-break" style="min-height:50rpx;">{{item.content}}</view>
|
||||
<view bindtap="audioPlay" data-index="{{index}}" class="relative mt10 wp60 pt10 pb10 pl20 pr30 {{currentIndex == index?'bg-36afa2 color-fff':'bg-e3f5f3 color-36afa2'}} ulib-r750 ulib-rlt0" wx:if="{{!!item.record_url}}">
|
||||
<i class="iconfont mr10 icon-yinpin"></i>{{currentIndex == index?currentime:item.second}}”
|
||||
<view class="absolute right-0 box-middle mr20 font-20" wx:if="{{currentIndex == index}}">
|
||||
{{play?'播放中':'已暂停'}}
|
||||
<view class="relative mt40 overflowhidden">
|
||||
<view class="font-22 relative z-index-1">
|
||||
<i class="iconfont bg-fff icon-genzong mr10"></i>
|
||||
<text>用户跟踪</text>
|
||||
</view>
|
||||
<view class="orderDtail-log mt40 relative" wx:if="{{logslist.length>0}}">
|
||||
<block wx:for="{{logslist}}" wx:key="index">
|
||||
<view class="orderDtail-log-item pl40 relative">
|
||||
<view class="orderDtail-log-content">
|
||||
<view class="font-22 color-999">{{item.c_time}}</view>
|
||||
<view class="font-28 text-break" style="min-height:50rpx;">{{item.content}}</view>
|
||||
<view bindtap="audioPlay" data-index="{{index}}" class="relative mt10 wp60 pt10 pb10 pl20 pr30 {{currentIndex == index?'bg-36afa2 color-fff':'bg-e3f5f3 color-36afa2'}} ulib-r750 ulib-rlt0" wx:if="{{!!item.record_url}}">
|
||||
<i class="iconfont mr10 icon-yinpin"></i>{{currentIndex == index?currentime:item.second}}”
|
||||
<view class="absolute right-0 box-middle mr20 font-20" wx:if="{{currentIndex == index}}">
|
||||
{{play?'播放中':'已暂停'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<i class="absolute box-middle mt15 bg-fff line-height-11 font-22 color-999 iconfont icon-jiantou-up z-index-1" wx:if="{{index+1 != logslist.length}}"></i>
|
||||
<text class="absolute orderDtail-log-line2 z-index-0" wx:if="{{index != logslist.length-1}}"></text>
|
||||
<!-- <text class="absolute orderDtail-log-line z-index-0"></text> -->
|
||||
<text class="absolute orderDtail-log-dot z-index-1"></text>
|
||||
</view>
|
||||
<i class="absolute left-0 box-middle mt40 bg-fff line-height-11 font-22 color-999 iconfont icon-jiantou" wx:if="{{index+1 != logslist.length}}"></i>
|
||||
<text class="absolute orderDtail-log-dot"></text>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -98,8 +165,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff-op80 pl100 pr100 pt20 pb20">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" bindtap="showSelectStatus">变更状态</button>
|
||||
<view class="fixed left-0 bottom-0 right-0 bg-fff-op80 pl40 pr40 pt20 pb40 fn-flex">
|
||||
<button class="fn-flex-item bds-2-36afa2 bg-fff mr20 pt10 pb10 text-center font-32 color-36afa2 ulib-r750" bindtap="optShowNote"><i class="iconfont icon-xiaoji mr10"></i>小记</button>
|
||||
<button class="fn-flex-item btn-36afa2 ml20 pt10 pb10 text-center font-32 color-fff ulib-r750" bindtap="showSelectStatus">变更状态</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -116,6 +184,42 @@
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<lcb-msg isShow="{{isShowNote}}">
|
||||
<view slot="content">
|
||||
<view class="pt40 pl40 pr40">
|
||||
<view class="font-36 text-center">新增小记</view>
|
||||
<input class="bbs-1-eb font-32" placeholder-class="color-ccc" placeholder="请输入小记内容" bindinput='inputTx' data-key="note" name='note' style="height:90rpx;" value='{{note}}' />
|
||||
</view>
|
||||
<view class="mt30 pl25 pr25 pb40">
|
||||
<view class="fn-flex">
|
||||
<block wx:for='{{photos}}' wx:for-item='photos' wx:for-index="index" wx:key='photo'>
|
||||
<view class="fn-flex-item ml15 mr15 relative">
|
||||
<i class="absolute top-0 right-0 bg-ccc iconfont icon-shanchu inner10 font-26 color-fff ulib-rtr10 ulib-rbl10 z-index-1" bindtap="delPic" data-index="{{index}}" ></i>
|
||||
<image class='img-250x150 ulib-r10' src='{{photos.img_url}}' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:if="{{photos.length==0}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:elif="{{photos.length==1}}">
|
||||
<view class="fn-flex-item ml15 mr15 relative" bindtap="chooseImg">
|
||||
<image class='img-250x150 ulib-r10' src='{{imgUrl}}common/add-pic.jpg' mode='aspectFill'></image>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="optShowNote" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750">取消</button>
|
||||
<button disabled="{{submitFlag}}" bindtap="postAppCustomerlogs" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<lcb-msg isShow="{{isShowSelectStatus}}">
|
||||
<view slot="content">
|
||||
<view class="mt50 font-36 text-center">变更状态</view>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
.width-25{width:25rpx;}
|
||||
|
||||
.orderDtail-log::before{
|
||||
/* .orderDtail-log::before{
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
@@ -12,19 +12,50 @@
|
||||
background-color: #1a1a1a;
|
||||
width: 2rpx;
|
||||
left:10rpx;
|
||||
}
|
||||
} */
|
||||
/* .orderDtail-log-item::before{
|
||||
content:'';
|
||||
position:absolute;
|
||||
top:8rpx;
|
||||
background-color: #1a1a1a;
|
||||
width:2rpx;
|
||||
height:1000rpx;
|
||||
left:10rpx;
|
||||
} */
|
||||
.orderDtail-log-item{
|
||||
margin-top: 40rpx;
|
||||
padding-bottom: 40rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.orderDtail-log-item:first-child{
|
||||
margin-top: 0;
|
||||
}
|
||||
.orderDtail-log-line{
|
||||
top: 8rpx;
|
||||
left:16rpx;
|
||||
width:2rpx;
|
||||
height:2rpx;
|
||||
}
|
||||
.orderDtail-log-line::before{
|
||||
content:'';
|
||||
position:absolute;
|
||||
left:0;
|
||||
bottom:8rpx;
|
||||
background-color: #1a1a1a;
|
||||
width:2rpx;
|
||||
height:1000rpx;
|
||||
}
|
||||
.orderDtail-log-line2{
|
||||
top:8rpx;
|
||||
bottom:-8rpx;
|
||||
left:16rpx;
|
||||
width:2rpx;
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
.orderDtail-log-dot{
|
||||
top: 8rpx;
|
||||
left:0;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
left:6rpx;
|
||||
width: 23rpx;
|
||||
height: 23rpx;
|
||||
border-radius: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
@@ -50,4 +81,7 @@
|
||||
.orderDtail-log .orderDtail-log-content{
|
||||
position:relative;
|
||||
top:-20rpx;
|
||||
}
|
||||
.icon-jiantou-up{
|
||||
left:6rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user