变更客户状态
This commit is contained in:
@@ -10,4 +10,8 @@
|
||||
.btn-999::after{border:none;}
|
||||
.btn-999-hover{background:#a7a6a6;}
|
||||
.btn-999[disabled]{background:#999 !important;border:none !important;}
|
||||
.btn-no-border{border:none;}
|
||||
.btn-no-border::after{border:none;}
|
||||
.btn-no-border[disabled]{background:#ddd !important;border:none;color:#bbb;}
|
||||
.btn-no-bg{background:none;}
|
||||
.btn-inset-shadow{box-shadow:inset 0rpx 0rpx 10rpx 5rpx rgba(0, 0, 0, .2);}
|
||||
Vendored
+11
-3
File diff suppressed because one or more lines are too long
@@ -27,8 +27,11 @@ api = {
|
||||
appSeriesCars: "app/series/cars", //获取车型库
|
||||
appSeriesAttrs: "app/series/attrs", //获取车型属性
|
||||
appCustomersTabs: "app/customers/tabs", //获取tab
|
||||
appCustomers: "app/customers", //获取客户列表
|
||||
appCustomers: "app/customers", //获取客户列表 /新建客户 /修改状态和到店次数、试驾次数 /获取客户详情
|
||||
appCustomersFilter: "app/customers/filter", //获取列表筛选条件
|
||||
appSmsCustomer: "app/sms/customer", //发短信
|
||||
appCustomerlogs: "app/customerlogs", //获取日志
|
||||
appCustomerData: "app/customers/data", //获取客户详细信息
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ apiQuery.getAppCustomersTabs = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//获取客户列表
|
||||
//获取客户列表 /获取客户详情
|
||||
apiQuery.getAppCustomers = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomers, 2, params, "GET", resolve, reject)
|
||||
@@ -131,4 +131,39 @@ apiQuery.getAppCustomersFilter = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//新建客户
|
||||
apiQuery.postAppCustomers = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCustomers, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//修改状态和到店次数、试驾次数
|
||||
apiQuery.putAppCustomers = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appCustomers, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//发短信
|
||||
apiQuery.postAppSmsCustomer = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appSmsCustomer, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取日志
|
||||
apiQuery.getAppCustomerlogs = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomerlogs, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//获取客户详细信息
|
||||
apiQuery.getAppCustomerData = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appCustomerData, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
+182
-17
@@ -1,56 +1,213 @@
|
||||
// pages/customer/addCard/index.js
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
c_time:'',
|
||||
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,//车型级别索引
|
||||
submitFlag:false,
|
||||
},
|
||||
//生命周期函数--监听页面加载
|
||||
onLoad: function (options) {
|
||||
|
||||
this.getAppSeriesCars()
|
||||
},
|
||||
|
||||
//获取车型库
|
||||
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,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//获取车型属性 /颜色 /车型级别
|
||||
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,
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
submitFlag:false,
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
putaddStaff() {
|
||||
//选择车型
|
||||
changeModel(e) {
|
||||
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()
|
||||
}
|
||||
},
|
||||
|
||||
//车型级别
|
||||
changeLevel(e) {
|
||||
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,
|
||||
})
|
||||
},
|
||||
|
||||
//车型颜色
|
||||
changeColor(e) {
|
||||
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,
|
||||
})
|
||||
},
|
||||
|
||||
//备选车型
|
||||
changeSpare(e) {
|
||||
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,
|
||||
})
|
||||
},
|
||||
|
||||
//预计购车时间
|
||||
buyDate(e){
|
||||
this.setData({
|
||||
buy_time: e.detail.value,
|
||||
})
|
||||
},
|
||||
|
||||
//新建客户
|
||||
postAppCustomers() {
|
||||
let that = this
|
||||
if (that.data.uname == '' ) {
|
||||
if (that.data.name == '' ) {
|
||||
wx.showToast({
|
||||
title: '请输入员工姓名',
|
||||
title: '请输入客户姓名',
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (!/^1[3456789]\d{9}$/.test(that.data.mobile)){
|
||||
wx.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
title: '请输入客户手机号',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.car_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择品牌车型',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.v_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择车型级别',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(that.data.color_id == '' ){
|
||||
wx.showToast({
|
||||
title: '请选择车型颜色',
|
||||
icon: 'none'
|
||||
})
|
||||
} else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['uname'] = that.data.uname;
|
||||
params['name'] = that.data.name;
|
||||
params['mobile'] = that.data.mobile;
|
||||
params['role'] = that.data.role?1:0;
|
||||
_.apiQuery.putDxtEmployeesInfo(params).then(res => {
|
||||
params['car_id'] = that.data.car_id;
|
||||
params['v_id'] = that.data.v_id;
|
||||
params['color_id'] = that.data.color_id;
|
||||
if(this.data.b_s_id != ''){
|
||||
params['b_s_id'] = this.data.b_s_id;
|
||||
}
|
||||
if(this.data.buy_time != ''){
|
||||
params['buy_time'] = this.data.buy_time;
|
||||
}
|
||||
_.apiQuery.postAppCustomers(params).then(res => {
|
||||
wx.showModal({
|
||||
title: '添加成功',
|
||||
title: '创建成功',
|
||||
content: '',
|
||||
confirmText: "继续添加",
|
||||
confirmColor: "#1282e1",
|
||||
confirmText: "继续创建",
|
||||
confirmColor: "#36afa2",
|
||||
cancelText: "返回",
|
||||
cancelColor: "#000000",
|
||||
cancelColor: "#666",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
that.setData({
|
||||
uname:'',
|
||||
name:'',
|
||||
mobile:'',
|
||||
role:false,
|
||||
car_id:'',
|
||||
v_id:'',
|
||||
color_id:'',
|
||||
b_s_id:'',
|
||||
buy_time:'',
|
||||
modelIndex:-1,
|
||||
spareIndex:-1,
|
||||
colorIndex:-1,
|
||||
levelIndex:-1,
|
||||
submitFlag:false,
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
@@ -58,6 +215,14 @@ Page({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = null; //上一个页面
|
||||
if (pages.length >= 2) {
|
||||
prevPage = pages[pages.length - 2]; //上一个页面
|
||||
prevPage.onPullDownRefresh()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}).catch(res=>{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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="uname" name='uname' value='{{uname}}' />
|
||||
<input class="wp100 height-100 text-right font-28" placeholder-class="color-ccc" type="text" placeholder="请输入客户姓名" bindinput='inputTx' data-key="name" name='name' value='{{name}}' />
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb last-b-none pl140 font-28">
|
||||
@@ -14,51 +14,51 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">品牌</view>
|
||||
<view class="absolute left-0 box-middle font-28">品牌车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<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">车型</view>
|
||||
<view class="absolute left-0 box-middle font-28">车型级别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<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">颜色</view>
|
||||
<view class="absolute left-0 box-middle font-28">车型颜色</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<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">备选车型</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<i class="iconfont ml10 icon-gengduo"></i>
|
||||
<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 pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">预计购车时间</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker mode="date" value="{{c_time}}" bindchange="bindStartDateChange">
|
||||
<text class="color-ccc" wx:if="{{c_time == ''}}">请选择</text>
|
||||
<text wx:else>{{c_time}}</text>
|
||||
<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>
|
||||
</view>
|
||||
@@ -66,7 +66,7 @@
|
||||
</view>
|
||||
|
||||
<view class="mt60 pl60 pr60">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putaddStaff">确认建卡</button>
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="postAppCustomers">确认建卡</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
+223
-52
@@ -1,3 +1,5 @@
|
||||
import _ from '../../../commons/js/commons'
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
tabid:1,
|
||||
@@ -6,70 +8,181 @@ Page({
|
||||
{"id":1,"title":"跟进记录"},
|
||||
{"id":2,"title":"智能标签"}
|
||||
],
|
||||
statusid:0,
|
||||
status:[
|
||||
{
|
||||
"id":0,
|
||||
"title":"未见潜客",
|
||||
check:true,
|
||||
},
|
||||
{
|
||||
"id":1,
|
||||
"title":"到店潜客",
|
||||
check:false,
|
||||
},
|
||||
{
|
||||
"id":2,
|
||||
"title":"订单客户",
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"title":"战败客户",
|
||||
},
|
||||
],
|
||||
isShowSelectStatus:false,
|
||||
step:[
|
||||
{
|
||||
id:0,
|
||||
time:'2020.6.18 21:00',
|
||||
content:'通过XX海报加入客户',
|
||||
},
|
||||
{
|
||||
id:1,
|
||||
time:'2020.6.18 21:00',
|
||||
content:'店员 康康 交易完成 获得佣金 370元',
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
time:'2020.6.18 21:00',
|
||||
content:'变更状态为已处理短信+1(16)',
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
time:'2020.6.18 21:00',
|
||||
content:'店长 jimmy 获取佣金130元 ',
|
||||
},
|
||||
],
|
||||
logslist: [],//日志列表
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
statistics:[],//统计数据
|
||||
isShowMessage:false,//是否显示短信弹窗
|
||||
a_num:'',//到店次数
|
||||
t_num:'',//试驾次数
|
||||
statuskey:-10,//状态值
|
||||
stateList:[],//状态数组
|
||||
isShowSelectStatus:false,//是否变更状态弹窗
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomerData()
|
||||
this.getAppCustomerlogs()
|
||||
this.getAppCustomersTabs()
|
||||
|
||||
},
|
||||
onshow() {
|
||||
|
||||
},
|
||||
|
||||
//获取客户详情
|
||||
getAppCustomers(){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
detailinfo:res.data,
|
||||
//statuskey:res.data.status,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//获取客户详细信息
|
||||
getAppCustomerData(){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomerData(params).then(res=>{
|
||||
this.setData({
|
||||
baseinfo:res.data.baseinfo
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//获取日志
|
||||
getAppCustomerlogs(){
|
||||
this.setData({
|
||||
load: false,
|
||||
loading: true,
|
||||
})
|
||||
let params = {};
|
||||
params['page'] = this.data.pageNo;
|
||||
params['size'] = 10;
|
||||
params['id'] = this.data.id;
|
||||
_.apiQuery.getAppCustomerlogs(params).then(res => {
|
||||
this.setData({
|
||||
statistics:res.data.statistics?res.data.statistics:this.data.statistics,
|
||||
pageNo: this.data.pageNo + 1,
|
||||
logslist: this.data.logslist.concat(res.data.list),
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
if (res.data.total == 0) {
|
||||
this.setData({
|
||||
noData: true
|
||||
})
|
||||
} else if (this.data.logslist.length == res.data.total) {
|
||||
this.setData({
|
||||
end: true
|
||||
})
|
||||
}
|
||||
wx.stopPullDownRefresh()
|
||||
});
|
||||
},
|
||||
|
||||
//切换tab
|
||||
changeTab(e){
|
||||
this.setData({
|
||||
tabid: this.data.tab[e.currentTarget.dataset.index].id,
|
||||
})
|
||||
//this.searchSubmit()
|
||||
},
|
||||
|
||||
//单选
|
||||
radioPicker(e){
|
||||
if(e.currentTarget.dataset.id != this.data.statusid){
|
||||
//显示短信弹框
|
||||
showMessage(e){
|
||||
this.setData({
|
||||
isShowMessage:true,
|
||||
content:'',
|
||||
})
|
||||
},
|
||||
|
||||
//关闭短信弹框
|
||||
hideMessage(e){
|
||||
this.setData({
|
||||
isShowMessage:false,
|
||||
})
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//发短信
|
||||
postAppSmsCustomer(){
|
||||
if (this.data.submitFlag) return;
|
||||
if (this.data.content == '') {
|
||||
wx.showToast({
|
||||
title: '请填写短信内容',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
isSubmiting: false,
|
||||
statusid:e.currentTarget.dataset.id,
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
params['content'] = this.data.content;
|
||||
_.apiQuery.postAppSmsCustomer(params).then(res=>{
|
||||
this.setData({
|
||||
isShowMessage:false,
|
||||
submitFlag:false,
|
||||
content:'',
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
this.onPullDownRefresh()
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//状态
|
||||
getAppCustomersTabs() {
|
||||
_.apiQuery.getAppCustomersTabs().then(res => {
|
||||
this.setData({
|
||||
stateList:res.data,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//选择状态
|
||||
radioPicker(e){
|
||||
if(e.currentTarget.dataset.key != this.data.statuskey){
|
||||
this.setData({
|
||||
statuskey:e.currentTarget.dataset.key,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//到店试驾
|
||||
checkPicker(e){
|
||||
if(e.currentTarget.dataset.pointer == 'daodian'){
|
||||
this.setData({
|
||||
a_num:this.data.a_num == 1?'':1,
|
||||
})
|
||||
}
|
||||
if(e.currentTarget.dataset.pointer == 'shijia'){
|
||||
this.setData({
|
||||
t_num:this.data.t_num == 1?'':1,
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -77,15 +190,73 @@ Page({
|
||||
//显示变更状态
|
||||
showSelectStatus(){
|
||||
this.setData({
|
||||
a_num:'',//到店次数
|
||||
t_num:'',//试驾次数
|
||||
statuskey:-10,//状态值
|
||||
isShowSelectStatus:true,
|
||||
})
|
||||
},
|
||||
|
||||
//确认变更状态
|
||||
hideSelectStatus(){
|
||||
//取消变更状态
|
||||
cancelSelectStatus(){
|
||||
this.setData({
|
||||
isShowSelectStatus:false,
|
||||
})
|
||||
},
|
||||
|
||||
//修改状态和到店次数、试驾次数
|
||||
putAppCustomers(e){
|
||||
let params = {};
|
||||
params['id'] = this.data.id;
|
||||
if(this.data.statuskey != -10){
|
||||
params['status'] = this.data.statuskey;
|
||||
}
|
||||
if(this.data.t_num != ''){
|
||||
params['t_num'] = this.data.t_num;
|
||||
}
|
||||
if(this.data.a_num != ''){
|
||||
params['a_num'] = this.data.a_num;
|
||||
}
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
isShowSelectStatus:false,
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
this.onPullDownRefresh()
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e){
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
logslist: [],
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
})
|
||||
this.getAppCustomers()
|
||||
this.getAppCustomerData()
|
||||
this.getAppCustomerlogs()
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.getAppCustomerlogs()
|
||||
},
|
||||
|
||||
})
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"navigationBarTitleText": "客户详情",
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,46 +1,39 @@
|
||||
<view class="container">
|
||||
<view class="inner40">
|
||||
<view class="inner40 pb0">
|
||||
<view class="inner40 relative ulib-r10 box-shadow-000-10-10 mb30 overflowhidden">
|
||||
<view class="absolute top-0 left-0 width-25 mt40 pt5 pb5 bg-36afa2 line-height-13 font-22 color-fff">潜客</view>
|
||||
<view class="absolute top-0 left-0 width-25 mt40 pt5 pb5 bg-36afa2 line-height-13 font-22 color-fff">{{detailinfo.tip}}</view>
|
||||
<view class="relative pr180">
|
||||
<view class="font-32">
|
||||
<text>林先生</text>
|
||||
<text>(*382)</text>
|
||||
<text class="iconfont icon-xingxing ml10"></text>
|
||||
<text>{{detailinfo.name}}</text>
|
||||
<text>({{detailinfo.mobile}})</text>
|
||||
<text class="iconfont icon-xingxing ml10 {{detailinfo.is_top==1?'color-f9394d':'color-ccc'}}" catchtap="optTop" data-index="{{index}}"></text>
|
||||
</view>
|
||||
<view class="text-nowrap">
|
||||
<text class="inline-block mr10 pt5 pb5 pl10 pr10 bg-666 font-18 color-fff ulib-r750">H级客户</text>
|
||||
<text class="inline-block mr10 pt5 pb5 pl10 pr10 bg-666 font-18 color-fff ulib-r750">H级客户</text>
|
||||
<text class="inline-block mr10 pt5 pb5 pl10 pr10 bg-666 font-18 color-fff ulib-r750">H级客户</text>
|
||||
<text class="inline-block mr10 pt5 pb5 pl10 pr10 bg-666 font-18 color-fff ulib-r750">H级客户</text>
|
||||
...
|
||||
<block wx:for="{{detailinfo.tags}}" wx:for-index='i' wx:for-item='tag' wx:key='i'>
|
||||
<text class="inline-block mr10 pt5 pb5 pl10 pr10 bg-666 font-18 color-fff ulib-r750" wx:if="{{i<4}}">{{tag}}</text>
|
||||
</block>
|
||||
<block wx:if="{{detailinfo.tags.length>4}}">
|
||||
...
|
||||
</block>
|
||||
</view>
|
||||
<view class="absolute right-0 box-middle">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{info.id}}">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff mr30 ulib-r750" catchtap="showMessage" data-id="{{detailinfo.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-liuyan"></i>
|
||||
</view>
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="{{info.call_type == 'xz'?'callXz':'call'}}" data-id="{{info.id}}" data-type="{{info.type}}">
|
||||
<view class="inline-block relative img-55x55 bg-333 font-28 color-fff ulib-r750" catchtap="call" data-id="{{detailinfo.id}}">
|
||||
<i class="absolute box-center-middle iconfont icon-dianhua"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="fn-fl">品牌车型</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">东风EX1</view>
|
||||
</view>
|
||||
<view class=mt25 fn-clear font-28">
|
||||
<view class="fn-fl">品牌车型</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">东风EX1</view>
|
||||
</view>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="fn-fl">品牌车型</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">东风EX1</view>
|
||||
</view>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="fn-fl">品牌车型</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">东风EX1</view>
|
||||
</view>
|
||||
<block wx:for="{{detailinfo.other_data}}" wx:for-index='key' wx:for-item='value' wx:key='i'>
|
||||
<view class="mt25 fn-clear font-28">
|
||||
<view class="fn-fl">{{key}}</view>
|
||||
<view class="fn-fr wp60 text-nowrap text-right color-666">{{value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pl30 pr30">
|
||||
<view class="fn-flex font-32 color-666 text-center">
|
||||
<block wx:for='{{tab}}' wx:key='list'>
|
||||
<view class="fn-flex-item pl20 pr20 tabmenu2 {{tabid == item.id?'active color-36afa2':''}}" data-index="{{index}}" bindtap="changeTab">
|
||||
@@ -48,69 +41,49 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt30 pb150" wx:if="{{tabid == tab[0].id}}">
|
||||
<view class="font-22">
|
||||
<view class="mt30 pl10 pr10 pb150" wx:if="{{tabid == tab[0].id}}">
|
||||
<!-- <view class="font-22">
|
||||
<i class="iconfont icon-fenqi mr10"></i>
|
||||
<text>分期信息</text>
|
||||
</view>
|
||||
<view class="mt10">
|
||||
<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">
|
||||
哈哈哈
|
||||
</view>
|
||||
</view>
|
||||
<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">
|
||||
153*****7676
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">性别</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
男
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 pb150" wx:elif="{{tabid == tab[1].id}}">
|
||||
<view class="fn-flex text-center">
|
||||
<view class="fn-flex-item mr15 pt20 pb20 bg-f3f6fc ulib-r10">
|
||||
<view class="font-32">6</view>
|
||||
<view class="font-22">去电</view>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 mr15 pt20 pb20 bg-fffaeb ulib-r10">
|
||||
<view class="font-32">6</view>
|
||||
<view class="font-22">短信</view>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 mr15 pt20 pb20 bg-f1f9f8 ulib-r10">
|
||||
<view class="font-32">6</view>
|
||||
<view class="font-22">到店</view>
|
||||
</view>
|
||||
<view class="fn-flex-item ml15 pt20 pb20 bg-fff6f8 ulib-r10">
|
||||
<view class="font-32">6</view>
|
||||
<view class="font-22">试驾</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt40 font-22">
|
||||
<i class="iconfont icon-genzong mr10"></i>
|
||||
<text>用户跟踪</text>
|
||||
</view>
|
||||
<view class="orderDtail-log mt30 relative" wx:if="{{step.length>0}}">
|
||||
<block wx:for="{{step}}" wx:key="index">
|
||||
<view class="orderDtail-log-item pl40 relative">
|
||||
<view class="orderDtail-log-content">
|
||||
<view class="font-22 color-999">{{item.time}}</view>
|
||||
<view class="font-28 text-break">{{item.content}}</view>
|
||||
</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 != step.length}}"></i>
|
||||
<text class="absolute orderDtail-log-dot"></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">{{key}}</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">{{value}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 pb150" wx:elif="{{tabid == tab[2].id}}">
|
||||
<view class="mt30 pb150" wx:elif="{{tabid == tab[1].id}}">
|
||||
<view class="fn-flex text-center">
|
||||
<block wx:for="{{statistics}}" wx:key='index'>
|
||||
<view class="fn-flex-item ml15 mr15 pt20 pb20 bg-f3f6fc ulib-r10" style="background-color:{{item.color}}">
|
||||
<view class="font-32">{{item.val}}</view>
|
||||
<view class="font-22">{{item.name}}</view>
|
||||
</view>
|
||||
</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>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 pl5 pr5 pb150" wx:elif="{{tabid == tab[2].id}}">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -121,21 +94,49 @@
|
||||
|
||||
</view>
|
||||
|
||||
<lcb-msg isShow="{{isShowMessage}}">
|
||||
<view slot="content">
|
||||
<view class="inner40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="content" name='content' value='{{content}}' />
|
||||
</view>
|
||||
<view class="fn-flex bts-1-eb text-center font-32 color-666">
|
||||
<view class="fn-flex-item pt25 pb25" bindtap="hideMessage">取消</view>
|
||||
<view class="fn-flex-item bls-1-eb pt25 pb25 color-36afa2" disabled="{{!submitFlag}}" bindtap="postAppSmsCustomer">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
|
||||
<lcb-msg isShow="{{isShowSelectStatus}}">
|
||||
<view slot="content">
|
||||
<view class="mt50 font-36 text-center">修改状态</view>
|
||||
<scroll-view class="pb50" scroll-y="true" style="max-height:600rpx;">
|
||||
<view class="pl40 pr40 mt20 font-32">
|
||||
<block wx:for="{{status}}" wx:key='index'>
|
||||
<view class="relative mt20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-id="{{item.id}}">
|
||||
<text>{{item.title}}</text>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{statusid == item.id?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan'}}"></i>
|
||||
<view class="mt50 font-36 text-center">变更状态</view>
|
||||
<scroll-view class="pb50" scroll-y="true" style="max-height:600rpx;width:620rpx">
|
||||
<view class="mt20 pl20 pr15 font-28 fn-clear">
|
||||
<block wx:for="{{stateList}}" wx:key='index'>
|
||||
<view wx:if="{{item.key<detailinfo.status}}" class="fn-fl wp45 relative mt20 ml20 inner30 bg-f6 ulib-r10 opacity-50">
|
||||
<text>{{item.name}}</text>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont icon-danxuan_xuanzhong color-36afa2"></i>
|
||||
</view>
|
||||
<view wx:else class="fn-fl wp45 relative mt20 ml20 inner30 bg-f6 ulib-r10" bindtap="radioPicker" data-key="{{item.key}}">
|
||||
<text>{{item.name}}</text>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{statuskey == item.key?'icon-danxuan_xuanzhong color-36afa2':'icon-danxuan color-999'}}"></i>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="mt40 bts-1-eb ml40 mr40"></view>
|
||||
<view class="mt20 pl20 pr15 font-28 fn-clear">
|
||||
<view class="fn-fl wp45 relative mt20 ml20 inner30 bg-f6 ulib-r10" bindtap="checkPicker" data-pointer="daodian">
|
||||
<text>到店 +1次</text>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{a_num == 1?'icon-fuxuansel color-36afa2':'icon-fuxuankuang color-999'}}"></i>
|
||||
</view>
|
||||
<view class="fn-fl wp45 relative mt20 ml20 inner30 bg-f6 ulib-r10" bindtap="checkPicker" data-pointer="shijia">
|
||||
<text>试驾 +1次</text>
|
||||
<i class="absolute right-0 box-middle mr30 iconfont {{t_num == 1?'icon-fuxuansel color-36afa2':'icon-fuxuankuang color-999'}}"></i>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="bts-1-eb text-center font-32 color-666">
|
||||
<view class="pt25 pb25 color-36afa2" bindtap="hideSelectStatus">确定</view>
|
||||
<view class="fn-flex pl60 pr60 pb50 text-center font-32 color-666">
|
||||
<button bindtap="cancelSelectStatus" class="fn-flex-item mr20 bds-2-36afa2 btn-no-bg wp100 font-28 color-36afa2 ulib-r750" hover-class="btn-36afa2-hover">取消</button>
|
||||
<button bindtap="putAppCustomers" class="fn-flex-item ml20 btn-36afa2 wp100 font-28 color-fff ulib-r750" hover-class="btn-36afa2-hover">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
@@ -45,4 +45,9 @@
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.orderDtail-log .orderDtail-log-content{
|
||||
position:relative;
|
||||
top:-20rpx;
|
||||
}
|
||||
+85
-38
@@ -3,29 +3,25 @@ import popularData from '../../commons/js/lib/popularData';
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
key:'',
|
||||
list: [],
|
||||
key:'',//tab状态值
|
||||
list: [],//客户列表
|
||||
pageNo: 1,
|
||||
noData: false,
|
||||
end: false,
|
||||
load: true,
|
||||
loading: false,
|
||||
flag:1,
|
||||
s_time:'',
|
||||
e_time:'',
|
||||
if_driver:'',
|
||||
level:'',
|
||||
s_id:'',
|
||||
v_id:'',
|
||||
cfrom:'',
|
||||
o_type:'',
|
||||
|
||||
|
||||
isShowMessage:false,
|
||||
isShowfilter:true,
|
||||
|
||||
timeSlotIndex:-1,
|
||||
timeSlot:[
|
||||
s_time:'',//开始时间
|
||||
e_time:'',//结束时间
|
||||
if_driver:'',//是否试驾
|
||||
level:'',//客户顶级
|
||||
s_id:'',//车型id
|
||||
v_id:'',//车型级别id
|
||||
cfrom:'',//客户来源
|
||||
o_type:'',//排序类型
|
||||
isShowfilter:false,//是否显示筛查
|
||||
timeSlotIndex:-1,//常用时间索引
|
||||
timeSlot:[//常用时间数组
|
||||
{
|
||||
title:'今天',
|
||||
},
|
||||
@@ -39,8 +35,8 @@ Page({
|
||||
title:'近三十天',
|
||||
},
|
||||
],
|
||||
testDriveIndex:-1,
|
||||
testDrive:[
|
||||
testDriveIndex:-1,//是否试驾索引
|
||||
testDrive:[//是否试驾数组
|
||||
{
|
||||
title:'全部',
|
||||
},
|
||||
@@ -51,13 +47,14 @@ Page({
|
||||
title:'否',
|
||||
},
|
||||
],
|
||||
|
||||
sortList:['建卡日期','最近联系','特别关注',],
|
||||
sortListIndex:0,
|
||||
|
||||
levelIndex:-1,
|
||||
modelIndex:-1,
|
||||
cfromlndex:-1,
|
||||
sortList:['建卡日期','最近联系','特别关注',],//排序数组
|
||||
sortListIndex:0,//排序索引
|
||||
levelIndex:-1,//意向等级索引
|
||||
modelIndex:-1,//品牌车型索引
|
||||
cfromIndex:-1,//客户来源索引
|
||||
isShowMessage:false,//是否显示短信弹窗
|
||||
content:'',//短信内容
|
||||
isRefresh:false,//判断返回是否需要刷新
|
||||
},
|
||||
onLoad(options) {
|
||||
for (let key in options) {
|
||||
@@ -68,7 +65,6 @@ Page({
|
||||
this.getAppCustomersTabs()
|
||||
this.getAppCustomersFilter()
|
||||
this.getAppSeriesCars()
|
||||
|
||||
},
|
||||
|
||||
onShow(){
|
||||
@@ -89,6 +85,14 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//切换tab
|
||||
changeTab(e){
|
||||
this.setData({
|
||||
key: this.data.tab[e.currentTarget.dataset.index].key,
|
||||
})
|
||||
this.searchSubmit()
|
||||
},
|
||||
|
||||
//获取列表筛选条件
|
||||
getAppCustomersFilter(){
|
||||
_.apiQuery.getAppCustomersFilter().then(res => {
|
||||
@@ -174,6 +178,19 @@ Page({
|
||||
});
|
||||
},
|
||||
|
||||
//置顶操作
|
||||
optTop(e){
|
||||
let params = {};
|
||||
params['id'] = this.data.list[e.currentTarget.dataset.index].id;
|
||||
params['is_top'] = this.data.list[e.currentTarget.dataset.index].is_top==1?0:1;
|
||||
_.apiQuery.putAppCustomers(params).then(res=>{
|
||||
this.setData({
|
||||
['list['+e.currentTarget.dataset.index+'].is_top']:this.data.list[e.currentTarget.dataset.index].is_top==1?0:1,
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
//候取常用时间段
|
||||
getDateLater(){
|
||||
popularData.getDateLater(0,0).then(res => {
|
||||
this.setData({
|
||||
@@ -197,14 +214,6 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//切换tab
|
||||
changeTab(e){
|
||||
this.setData({
|
||||
key: this.data.tab[e.currentTarget.dataset.index].key,
|
||||
})
|
||||
this.searchSubmit()
|
||||
},
|
||||
|
||||
//拨打客户电话Yx
|
||||
call(e) {
|
||||
let params = {};
|
||||
@@ -411,7 +420,7 @@ Page({
|
||||
testDriveIndex:-1,
|
||||
levelIndex:-1,
|
||||
modelIndex:-1,
|
||||
cfromlndex:-1,
|
||||
cfromIndex:-1,
|
||||
})
|
||||
},
|
||||
|
||||
@@ -420,6 +429,7 @@ Page({
|
||||
this.setData({
|
||||
messageId:e.currentTarget.dataset.id,
|
||||
isShowMessage:true,
|
||||
content:'',
|
||||
})
|
||||
},
|
||||
|
||||
@@ -430,6 +440,43 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//输入
|
||||
inputTx(e) {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
[e.currentTarget.dataset.key]: e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//发短信
|
||||
postAppSmsCustomer(){
|
||||
if (this.data.submitFlag) return;
|
||||
if (this.data.content == '') {
|
||||
wx.showToast({
|
||||
title: '请填写短信内容',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['id'] = this.data.messageId;
|
||||
params['content'] = this.data.content;
|
||||
_.apiQuery.postAppSmsCustomer(params).then(res=>{
|
||||
this.setData({
|
||||
isShowMessage:false,
|
||||
submitFlag:false,
|
||||
content:'',
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e){
|
||||
if(e.currentTarget.dataset.url){
|
||||
@@ -438,7 +485,7 @@ Page({
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
onPullDownRefresh(){
|
||||
this.setData({
|
||||
list: [],
|
||||
pageNo: 1,
|
||||
@@ -452,7 +499,7 @@ Page({
|
||||
},
|
||||
|
||||
//页面上拉触底事件的处理函数
|
||||
onReachBottom: function () {
|
||||
onReachBottom(){
|
||||
if (this.data.noData || this.data.end||!this.data.load) return;
|
||||
this.setData({
|
||||
flag: this.data.flag + 1
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<view class="font-32">
|
||||
<text>{{item.name}}</text>
|
||||
<text>({{item.mobile}})</text>
|
||||
<text class="iconfont icon-xingxing ml10 {{item.is_top==1?'color-f9394d':'color-ccc'}}"></text>
|
||||
<text class="iconfont icon-xingxing ml10 {{item.is_top==1?'color-f9394d':'color-ccc'}}" catchtap="optTop" data-index="{{index}}"></text>
|
||||
</view>
|
||||
<view class="text-nowrap">
|
||||
<block wx:for="{{item.tags}}" wx:for-index='i' wx:for-item='tag' wx:key='i'>
|
||||
@@ -80,11 +80,11 @@
|
||||
<lcb-msg isShow="{{isShowMessage}}">
|
||||
<view slot="content">
|
||||
<view class="inner40">
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="uname" name='uname' value='{{uname}}' />
|
||||
<textarea class="wp100 inner20 bds-1-eb font-28 ulib-r10" placeholder-class="color-ccc" maxlength='100' placeholder="请输入短信内容" bindinput='inputTx' data-key="content" name='content' value='{{content}}' />
|
||||
</view>
|
||||
<view class="fn-flex bts-1-eb text-center font-32 color-666">
|
||||
<view class="fn-flex-item pt25 pb25" bindtap="hideMessage">取消</view>
|
||||
<view class="fn-flex-item bls-1-eb pt25 pb25 color-36afa2" bindtap="hideMessage">确定</view>
|
||||
<view class="fn-flex-item bls-1-eb pt25 pb25 color-36afa2" disabled="{{!submitFlag}}" bindtap="postAppSmsCustomer">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</lcb-msg>
|
||||
@@ -155,9 +155,9 @@
|
||||
<view class="relative bbs-1-eb pl190 last-b-none">
|
||||
<view class="absolute left-0 box-middle font-28">客户来源</view>
|
||||
<view class="pt30 pb30 text-right font-28 color-666">
|
||||
<picker bindchange="changeCfrom" value="{{cfromlndex}}" range="{{filter.cfrom}}">
|
||||
<text class="color-ccc" wx:if="{{cfromlndex == -1}}">请选择</text>
|
||||
<text wx:else>{{filter.cfrom[cfromlndex]}}</text>
|
||||
<picker bindchange="changeCfrom" value="{{cfromIndex}}" range="{{filter.cfrom}}">
|
||||
<text class="color-ccc" wx:if="{{cfromIndex == -1}}">请选择</text>
|
||||
<text wx:else>{{filter.cfrom[cfromIndex]}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user