Commit 61ee8b32 authored by clone's avatar clone

bug

parent fa3c9174
...@@ -197,8 +197,17 @@ class Client extends Basic ...@@ -197,8 +197,17 @@ class Client extends Basic
and ( user_name like '%{$params['search']}%' or user_phone like '%{$params['search']}%' ) "; and ( user_name like '%{$params['search']}%' or user_phone like '%{$params['search']}%' ) ";
$data['search'] = $params['search']; $data['search'] = $params['search'];
} }
$list = $table->getAgentUserTb($pageNo, $pageSize, 'id desc', $field, $where);
$clientService = new ClientService();
foreach ($list as $k=>$v){
$is_show = $clientService->dialTotal($v["user_id"]);
if (!$is_show) {
unset($list[$k]);
}
}
$data['list'] = $table->getAgentUserTb($pageNo, $pageSize, 'id desc', $field, $where); $data['list'] = array_merge($list);
$total = $table->getMyUserCount($where); $total = $table->getMyUserCount($where);
$data['total'] = ceil($total / $pageSize); $data['total'] = ceil($total / $pageSize);
$data['page'] = $pageNo; $data['page'] = $pageNo;
...@@ -332,7 +341,7 @@ class Client extends Basic ...@@ -332,7 +341,7 @@ class Client extends Basic
$user_res = $UPhoneFollowPp->all_user_search($phone_or_name, $pagesize, $pagenum); $user_res = $UPhoneFollowPp->all_user_search($phone_or_name, $pagesize, $pagenum);
$total = $UPhoneFollowPp->all_user_search_count($phone_or_name); $total = $UPhoneFollowPp->all_user_search_count($phone_or_name);
} }
$clientService = new ClientService();
if ($search_type != '2') { if ($search_type != '2') {
//全部客户数据处理 //全部客户数据处理
foreach ($user_res as $k => $v) { foreach ($user_res as $k => $v) {
...@@ -341,10 +350,6 @@ class Client extends Basic ...@@ -341,10 +350,6 @@ class Client extends Basic
if ($user_id == $v['agent_id']) { if ($user_id == $v['agent_id']) {
$label[] = '我的'; $label[] = '我的';
} }
$is_show = $clientService->dialTotal($v["user_id"]);
if (!$is_show) {
unset($user_res[$k]);
}
//无效客户不显示标签 //无效客户不显示标签
if ($v['user_status'] != -1) { if ($v['user_status'] != -1) {
...@@ -367,7 +372,7 @@ class Client extends Basic ...@@ -367,7 +372,7 @@ class Client extends Basic
$total = intval($total / $pagesize) + (($total % $pagesize == 0) ? 0 : 1); $total = intval($total / $pagesize) + (($total % $pagesize == 0) ? 0 : 1);
$data['user_date'] = array_merge($user_res); $data['user_date'] = $user_res;
$data['pagenum'] = $pagenum; $data['pagenum'] = $pagenum;
$data['total'] = $total; $data['total'] = $total;
$data['search_type'] = $search_type; $data['search_type'] = $search_type;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment