diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index e63fe225..e96013fb 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -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; diff --git a/admin/views/receiver/customer/lists.php b/admin/views/receiver/customer/lists.php index 2d701c04..38be556f 100644 --- a/admin/views/receiver/customer/lists.php +++ b/admin/views/receiver/customer/lists.php @@ -106,6 +106,15 @@ +