customers add wxgr about
This commit is contained in:
@@ -50,8 +50,9 @@ class Customer extends HD_Controller
|
||||
$lists = [];
|
||||
$offlineSources = $this->customers_model->offlineSources();
|
||||
$wxqyAry = $this->customers_model->wxqyAry();
|
||||
$wxgrAry = $this->customers_model->wxgrAry();
|
||||
if ($count) {
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,cs_biz_id,level,of_id,of2_id,wxqy';
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,cs_biz_id,level,of_id,of2_id,wxqy,wxgr';
|
||||
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
|
||||
//获取销售员
|
||||
$admin_id_arr = array_unique(array_column($rows, 'admin_id'));
|
||||
@@ -81,6 +82,7 @@ class Customer extends HD_Controller
|
||||
'of2_id' => $val['of2_id'],
|
||||
'status_name' => $status_arr[$val['status']],
|
||||
'wxqy_name' => $wxqyAry[$val['wxqy']],
|
||||
'wxgr_name' => $wxgrAry[$val['wxgr']],
|
||||
'to_send' => $this->customers_model->csbizidAry($val['cs_biz_id'] ? $val['cs_biz_id'] : 0),
|
||||
'admin_name' => isset($admin_rows[$val['admin_id']]) ? $admin_rows[$val['admin_id']][0]['uname'] : '',
|
||||
'biz_name' => isset($biz_rows[$val['biz_id']]) ? $biz_rows[$val['biz_id']][0]['biz_name'] : '',
|
||||
@@ -96,6 +98,7 @@ class Customer extends HD_Controller
|
||||
#$show_info['offlineSourcesAry'] = $offlineSources;
|
||||
$show_info['offlineSourcesAry'] = $this->customers_model->offlineSources_search();
|
||||
$show_info['wxqyAry'] = $wxqyAry;
|
||||
$show_info['wxgrAry'] = $wxgrAry;
|
||||
$show_info['csbizidAry'] = $this->customers_model->csbizidAry();
|
||||
$this->data['show_info'] = $show_info;
|
||||
$this->data['lists'] = $lists;
|
||||
@@ -152,6 +155,11 @@ class Customer extends HD_Controller
|
||||
} else {
|
||||
$params['wxqy'] = '';
|
||||
}
|
||||
if (strlen($params['wxgr'])) {
|
||||
$where["wxgr"] = $params['wxgr'];
|
||||
} else {
|
||||
$params['wxgr'] = '';
|
||||
}
|
||||
!$params['search_tp'] && $params['search_tp'] = 'mobile';
|
||||
strlen($params['status']) && $where["status"] = $params['status'];
|
||||
if ($params['qdjl_id']) {
|
||||
@@ -325,6 +333,8 @@ class Customer extends HD_Controller
|
||||
'mobile' => $mobile_sub,
|
||||
'of_title' => $of_title,
|
||||
'wxqy_name' => $this->customers_model->wxqyAry($row['wxqy']),
|
||||
'wxgr_name' => $this->customers_model->wxgrAry($row['wxgr']),
|
||||
'wx_name' => '企微:'.$this->customers_model->wxqyAry($row['wxqy']).'; 个微:'.$this->customers_model->wxgrAry($row['wxgr']),
|
||||
'cf_user' => $cf_user,
|
||||
'to_send' => $to_send,
|
||||
'c_time' => date('Y-m-d H:i:s', $row['c_time']),
|
||||
@@ -575,7 +585,7 @@ class Customer extends HD_Controller
|
||||
$status_arr = $this->customers_model->get_status();
|
||||
unset($status_arr['-1']);
|
||||
if ($count) {
|
||||
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id";
|
||||
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr";
|
||||
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
|
||||
foreach ($rows as $key => $val) {
|
||||
$of_title = '';
|
||||
@@ -603,6 +613,8 @@ class Customer extends HD_Controller
|
||||
'of_title_2' => $of_title_2,
|
||||
'biz_name' => $val['biz_name'],
|
||||
'admin_name' => $val['admin_name'],
|
||||
'wxqy_name' => $this->customers_model->wxqyAry($val['wxqy']),
|
||||
'wxgr_name' => $this->customers_model->wxgrAry($val['wxgr']),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -621,6 +633,8 @@ class Customer extends HD_Controller
|
||||
"of_title_2" => "来源2",
|
||||
"biz_name" => "归属门店",
|
||||
"admin_name" => "归属顾问",
|
||||
"wxqy_name" => "企微好友",
|
||||
"wxgr_name" => "加个微",
|
||||
];
|
||||
$fileName = '客户列表';
|
||||
array_unshift($data, $indexs);
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="table-td"><span class="mr5">客户来源:</span>{{info.of_title}}</td>
|
||||
<td class="table-td"><span class="mr5">企微好友:</span>{{info.wxqy_name}}</td>
|
||||
<td class="table-td"><span class="mr5">微信好友:</span>{{info.wx_name}}</td>
|
||||
<td class="table-td"><span class="mr5">客户等级:</span>{{info.level}}</td>
|
||||
</tr>
|
||||
<tr v-if="info.to_send || info.cf_user">
|
||||
|
||||
@@ -59,6 +59,15 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w80">加个微:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="wxgr" v-model="params.wxgr">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.wxgrAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w80">是否改派:</label>
|
||||
<div class="am-para-inline w100">
|
||||
@@ -182,6 +191,7 @@
|
||||
<th width="5%"><span>是否改派</span></th>
|
||||
<th width="5%"><span>销售员</span></th>
|
||||
<th width="5%"><span>企微好友</span></th>
|
||||
<th width="5%"><span>加个微</span></th>
|
||||
<th width="6%"><span>最后联系时间</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -198,10 +208,11 @@
|
||||
<td>{{v.to_send}}</td>
|
||||
<td>{{v.admin_name}}</td>
|
||||
<td>{{v.wxqy_name}}</td>
|
||||
<td>{{v.wxgr_name}}</td>
|
||||
<td>{{v.cont_time}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<td colspan="12">
|
||||
<div class="row">
|
||||
<div class="col-md-4 align-l">
|
||||
</div>
|
||||
@@ -325,7 +336,7 @@
|
||||
lists: [],
|
||||
qdjl_lists: [],
|
||||
admins: {cityAry: [], countyAry: [], bizAry: [], list: []},
|
||||
show_info: {levelAry: [], offlineSourcesAry: [], wxqyAry: [], csbizidAry: [], tags: []},
|
||||
show_info: {levelAry: [], offlineSourcesAry: [], wxqyAry: [], wxgrAry: [], csbizidAry: [], tags: []},
|
||||
of2Ary: [],
|
||||
bizTypeAry: [],
|
||||
export_button: 0,
|
||||
|
||||
@@ -79,7 +79,8 @@ class Customers extends Wxapp
|
||||
'is_weChat' => $row['wxqy'] == 1 ? true : false,
|
||||
'generate_order' => $this->myuid == $row['admin_id'] ? true : false,
|
||||
'level' => $row['level'],
|
||||
'tags' => $tags
|
||||
'tags' => $tags,
|
||||
'wxgr' => $row['wxgr'],
|
||||
];
|
||||
return $data;
|
||||
} else {
|
||||
@@ -365,6 +366,7 @@ class Customers extends Wxapp
|
||||
$status = $this->input_param('status');
|
||||
$t_num = $this->input_param('t_num');
|
||||
$a_num = $this->input_param('a_num');
|
||||
$wxgr = $this->input_param('wxgr');
|
||||
$is_top = $this->input_param('is_top');
|
||||
$defeat_reason = $this->input_param('defeat_reason');//申请战败内容
|
||||
$level = $this->input_param('level');//客户等级
|
||||
@@ -426,6 +428,7 @@ class Customers extends Wxapp
|
||||
}
|
||||
$a_num && $up_data['a_num = a_num+1'] = null;
|
||||
$t_num && $up_data['t_num = t_num+1'] = null;
|
||||
$wxgr && $up_data['wxgr'] = 1;
|
||||
$visit_time && $up_data['visit_time'] = $visit_time;
|
||||
if ($level && $level != $row['level']) {
|
||||
$up_data['level'] = $level;//更改客户等级
|
||||
@@ -455,6 +458,9 @@ class Customers extends Wxapp
|
||||
if ($t_num) {//试驾
|
||||
$this->customers_entity->add_log($id, $uid, $uname, '客户试驾', 5);
|
||||
}
|
||||
if ($wxgr){
|
||||
$this->customers_entity->add_log($id, $uid, $uname, '加个微', 10);
|
||||
}
|
||||
if ($log_0) {//小记
|
||||
$this->customers_entity->add_log($id, $uid, $uname, $log_0, 0);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Receiver_customer_oplogs_model extends HD_Model
|
||||
public function typeAry($id = '')
|
||||
{
|
||||
$arr = [0 => '小记', 1 => '发短信', 2 => '拨打号码', 3 => '创建', 4 => '到店', 5 => '试驾', 6 => '订单', 7 => '战败'
|
||||
, 8 => '企微跟进', 9 => '系统'];
|
||||
, 8 => '企微跟进', 9 => '系统', 10 => '加个微'];
|
||||
if (strlen($id)) {
|
||||
return $arr[$id];
|
||||
} else {
|
||||
|
||||
@@ -123,6 +123,21 @@ class Receiver_customers_model extends HD_Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:个微好友状态
|
||||
* @param string $id
|
||||
* @return array|mixed
|
||||
*/
|
||||
public function wxgrAry($id = '')
|
||||
{
|
||||
$arr = [0 => '未加', 1 => '已添加'];
|
||||
if (strlen($id)) {
|
||||
return $arr[$id];
|
||||
} else {
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes:好友类型
|
||||
* Created on: 2022/5/26 10:00
|
||||
|
||||
Reference in New Issue
Block a user