From 8c353484f1a556fea00ae605d33326f7d24fd30a Mon Sep 17 00:00:00 2001 From: dengbw Date: Tue, 5 Jul 2022 17:42:29 +0800 Subject: [PATCH] Customers_705_2 --- admin/controllers/app/licheb/Userslog.php | 29 ++++++++++++++--------- admin/views/app/licheb/userslog/lists.php | 8 +++++-- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/admin/controllers/app/licheb/Userslog.php b/admin/controllers/app/licheb/Userslog.php index 07d95632..d18778c3 100644 --- a/admin/controllers/app/licheb/Userslog.php +++ b/admin/controllers/app/licheb/Userslog.php @@ -105,8 +105,9 @@ class Userslog extends HD_Controller $map_biz[$v['biz_id']]['biz_name'] && $biz_name = $map_biz[$v['biz_id']]['biz_name']; $map_biz[$v['biz_id']]['type'] && $biz_type = $typeAry[$map_biz[$v['biz_id']]['type']]; $temp = ['uname' => $uname, 'biz_type' => $biz_type, 'biz_name' => $biz_name, 'defeats' => $v['defeats'] - , 'c_num' => $v['c_num'], 'a_num' => $v['a_num'], 't_num' => $v['t_num'], 'orders' => $v['orders'], 'bills' => $v['bills'] - , 'follows' => $v['follows'], 'qy_adds' => $v['qy_adds'], 'qy_dels' => $v['qy_dels'], 'log_date' => $v['log_date']]; + , 'c_num' => $v['c_num'], 'a_num' => $v['a_num'], 't_num' => $v['t_num'], 'orders' => $v['orders'] + , 'bills' => $v['bills'], 'follows' => $v['follows'], 'reassigns' => $v['reassigns'], 'receives' => $v['receives'] + , 'qy_adds' => $v['qy_adds'], 'qy_dels' => $v['qy_dels'], 'log_date' => $v['log_date']]; $customer_json = $v['customer_json'] ? json_decode($v['customer_json'], true) : []; foreach ($offlineSources as $key1 => $value1) { $nums = intval($v['customer_' . $key1]); @@ -118,16 +119,16 @@ class Userslog extends HD_Controller } if ($nums) { $customers += $nums; - if ($params['size'] != 10000) { - if ($customers_info) { - $customers_info = $customers_info . '+' . $value1['name'] . '(' . $nums . ')'; - } else { - $customers_info = $value1['name'] . '(' . $nums . ')'; - } - } +// if ($params['size'] != 10000) { +// if ($customers_info) { +// $customers_info = $customers_info . '+' . $value1['name'] . '(' . $nums . ')'; +// } else { +// $customers_info = $value1['name'] . '(' . $nums . ')'; +// } +// } } } - $customers_info && $customers = $customers . '=' . $customers_info; + //$customers_info && $customers = $customers . '=' . $customers_info; $temp['customers'] = $customers; $lists[] = $temp; } @@ -137,7 +138,7 @@ class Userslog extends HD_Controller $menus[] = ['title' => "客户数", 'value' => intval($sum['customers']), 'tag' => '人']; $sum_c = $this->mdUsersLog->sum('c_num', $where); $sum = $this->mdUsersLog->sum('a_num', $where); - $menus[] = ['title' => "进店人数/进店次数", 'value' => intval($sum_c['c_num']) . '人 / ' . intval($sum['a_num']), 'tag' => '人次']; + $menus[] = ['title' => "进店人数/次数", 'value' => intval($sum_c['c_num']) . '人 / ' . intval($sum['a_num']), 'tag' => '次']; $sum = $this->mdUsersLog->sum('t_num', $where); $menus[] = ['title' => "试驾数", 'value' => intval($sum['t_num']), 'tag' => '次']; $sum = $this->mdUsersLog->sum('follows', $where); @@ -148,6 +149,10 @@ class Userslog extends HD_Controller $menus[] = ['title' => "战败数", 'value' => intval($sum['defeats']), 'tag' => '个']; $sum = $this->mdUsersLog->sum('bills', $where); $menus[] = ['title' => "开票数", 'value' => intval($sum['bills']), 'tag' => '个']; + $sum = $this->mdUsersLog->sum('reassigns', $where); + $menus[] = ['title' => "改派数", 'value' => intval($sum['reassigns']), 'tag' => '个']; + $sum = $this->mdUsersLog->sum('receives', $where); + $menus[] = ['title' => "接收数", 'value' => intval($sum['receives']), 'tag' => '个']; $sum = $this->mdUsersLog->sum('qy_adds', $where); $menus[] = ['title' => "新增企微", 'value' => intval($sum['qy_adds']), 'tag' => '人']; $sum = $this->mdUsersLog->sum('qy_dels', $where); @@ -285,6 +290,8 @@ class Userslog extends HD_Controller $indexs['orders'] = '订单数'; $indexs['defeats'] = '战败数'; $indexs['bills'] = '开票数'; + $indexs['reassigns'] = '改派数'; + $indexs['receives'] = '接收数'; $indexs['qy_adds'] = '新增企微'; $indexs['qy_dels'] = '删除企微'; $indexs['log_date'] = '日期'; diff --git a/admin/views/app/licheb/userslog/lists.php b/admin/views/app/licheb/userslog/lists.php index b7b36d8a..0f1911d7 100644 --- a/admin/views/app/licheb/userslog/lists.php +++ b/admin/views/app/licheb/userslog/lists.php @@ -102,13 +102,15 @@ 门店 顾问 - 客户数 - 进店人数/进店次数 + 客户数 + 进店人数/次数 试驾数 跟进数 订单数 战败数 开票数 + 改派数 + 接收数 新增企微 删除企微 日期 @@ -127,6 +129,8 @@ + +