admin_customer_1026
This commit is contained in:
@@ -40,12 +40,13 @@ class Customer extends HD_Controller
|
||||
!$params['biz_id'] && $params['biz_id'] = '';
|
||||
!$params['cf_title'] && $params['cf_title'] = '';
|
||||
!$params['qdjl_id'] && $params['qdjl_id'] = '';
|
||||
!$params['level'] && $params['level'] = '';
|
||||
$page = $params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = $params['size'] = $params['size'] ? intval($params['size']) : 20;
|
||||
|
||||
$where = array('status>=0' => null);
|
||||
if($_SESSION['admin_info']['biz_id']){
|
||||
$biz_ids = implode(',',$_SESSION['admin_info']['biz_id']);
|
||||
if ($_SESSION['admin_info']['biz_id']) {
|
||||
$biz_ids = implode(',', $_SESSION['admin_info']['biz_id']);
|
||||
$where["biz_id in ($biz_ids)"] = null;
|
||||
}
|
||||
if (false == strpos($_SERVER['HTTP_HOST'], 'dev')) {//dev时不限制
|
||||
@@ -54,6 +55,9 @@ class Customer extends HD_Controller
|
||||
if ($params['title']) {
|
||||
$where["{$params['search_tp']} like '%{$params['title']}%'"] = null;
|
||||
}
|
||||
if ($params['level']) {
|
||||
$where['level'] = $params['level'];
|
||||
}
|
||||
!$params['search_tp'] && $params['search_tp'] = 'mobile';
|
||||
strlen($params['status']) && $where["status"] = $params['status'];
|
||||
$params['cf_title'] && $where['cf_title'] = $params['cf_title'];
|
||||
@@ -160,7 +164,7 @@ class Customer extends HD_Controller
|
||||
$count = $this->customers_model->count($where);
|
||||
$lists = [];
|
||||
if ($count) {
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,cf_id';
|
||||
$fileds = 'id,name,mobile,cf_title,cont_time,admin_id,status,biz_id,cf_id,level';
|
||||
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
|
||||
//获取来源
|
||||
$cf_id_arr = array_unique(array_column($rows, 'cf_id'));
|
||||
@@ -182,6 +186,7 @@ class Customer extends HD_Controller
|
||||
'name' => $val['name'],
|
||||
'mobile' => $val['mobile'],
|
||||
'mobile_sub' => $mobile_sub,
|
||||
'level' => $val['level'],
|
||||
'cf_title' => $val['cf_title'],
|
||||
'cf_name' => isset($cf_rows[$val['cf_id']]) ? $cf_rows[$val['cf_id']][0]['title'] : '',
|
||||
'status_name' => $status_arr[$val['status']],
|
||||
@@ -193,7 +198,8 @@ class Customer extends HD_Controller
|
||||
}
|
||||
//渠道经理
|
||||
$qdjl_lists = $this->app_licheb_users_model->select(array('group_id' => 4, 'status' => 1, 'biz_id<>' => '0'), 'id desc', 0, 0, 'id,uname as name');
|
||||
|
||||
$show_info['levelAry'] = $this->customers_model->get_sdata('level');
|
||||
$this->data['show_info'] = $show_info;
|
||||
$this->data['lists'] = $lists;
|
||||
$this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count);
|
||||
$this->data['searchTpAry'] = $this->searchTpAry;
|
||||
|
||||
@@ -106,6 +106,15 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">用户等级:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="level" v-model="params.level">
|
||||
<option value=''>请选择</option>
|
||||
<option :value="v" v-for="(v,i) in show_info.levelAry">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<? foreach ($searchTimeAry as $key => $value) { ?>
|
||||
<div id="show-<?= $key ?>" style="display:<?= $params[$key] ? 'block' : 'none' ?>">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
@@ -150,12 +159,13 @@
|
||||
<th width="3%">ID</th>
|
||||
<th width="5%"><span>客户姓名</span></th>
|
||||
<th width="5%"><span>客户电话</span></th>
|
||||
<th width="8%"><span>来源类型</span></th>
|
||||
<th width="5%"><span>客户等级</span></th>
|
||||
<th width="6%"><span>来源类型</span></th>
|
||||
<th width="8%"><span>客户来源</span></th>
|
||||
<th width="7%"><span>所属门店</span></th>
|
||||
<th width="8%"><span>状态</span></th>
|
||||
<th width="4%"><span>销售员</span></th>
|
||||
<th width="7%"><span>最后联系时间</span></th>
|
||||
<th width="8%"><span>所属门店</span></th>
|
||||
<th width="5%"><span>状态</span></th>
|
||||
<th width="5%"><span>销售员</span></th>
|
||||
<th width="6%"><span>最后联系时间</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -164,6 +174,7 @@
|
||||
<td>{{v.id}}</td>
|
||||
<td>{{v.name}}</td>
|
||||
<td>{{v.mobile_sub}}</td>
|
||||
<td>{{v.level}}</td>
|
||||
<td>{{v.cf_title}}</td>
|
||||
<td>{{v.cf_name}}</td>
|
||||
<td>{{v.biz_name}}</td>
|
||||
@@ -172,7 +183,7 @@
|
||||
<td>{{v.cont_time}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<td colspan="10">
|
||||
<div class="row">
|
||||
<div class="col-md-4 align-l">
|
||||
</div>
|
||||
@@ -257,6 +268,7 @@
|
||||
cfroms: [],
|
||||
cfroms2: [],
|
||||
admins: {cityAry: [], countyAry: [], bizAry: [], list: []},
|
||||
show_info: {levelAry: []},
|
||||
},
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
@@ -264,6 +276,7 @@
|
||||
vm.searchTpAry = <?=json_encode($searchTpAry)?>;
|
||||
vm.lists = <?=json_encode($lists)?>;
|
||||
vm.qdjl_lists = <?=json_encode($qdjl_lists)?>;
|
||||
vm.show_info = <?=json_encode($show_info)?>;
|
||||
this.getCfroms();
|
||||
vm.init_citys();
|
||||
},
|
||||
|
||||
@@ -48,7 +48,7 @@ class Licheb extends HD_Controller
|
||||
$c_id = $redis->get($redisVisit);
|
||||
!$c_id && $c_id = 0;
|
||||
$log = array();
|
||||
$where = array('id >' => $c_id, 'status in(0,1)' => null, 'admin_id >' => 0
|
||||
$where = array('id >' => $c_id, 'status in(0,1)' => null, 'admin_id >' => 0, 'level <>' => 'D'
|
||||
, 'c_time >=' => strtotime('2021-10-25 00:00:00'), 'c_time <' => strtotime($day . ' 00:00:00'));
|
||||
$res_c = $this->mdCustomers->select($where, 'id asc', 1, $size, 'id,level');
|
||||
if (!$res_c) {
|
||||
@@ -138,7 +138,7 @@ class Licheb extends HD_Controller
|
||||
$c_id = $redis->get($redisVisit);
|
||||
!$c_id && $c_id = 0;
|
||||
$log = array();
|
||||
$where = array('id >' => $c_id, 'status in(0,1)' => null, 'admin_id >' => 0
|
||||
$where = array('id >' => $c_id, 'status in(0,1)' => null, 'admin_id >' => 0, 'level <>' => 'D'
|
||||
, 'c_time >=' => strtotime('2021-10-25 00:00:00'), 'c_time <' => strtotime($day . ' 00:00:00'));
|
||||
$res_c = $this->mdCustomers->select($where, 'id asc', 1, $size, 'id,level');
|
||||
if (!$res_c) {
|
||||
|
||||
Reference in New Issue
Block a user