Customers_705_2

This commit is contained in:
dengbw
2022-07-05 17:42:29 +08:00
committed by lccsw
parent 1a34582139
commit 8c353484f1
2 changed files with 24 additions and 13 deletions
+18 -11
View File
@@ -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'] = '日期';
+6 -2
View File
@@ -102,13 +102,15 @@
<tr>
<th width="17%"><span>门店</span></th>
<th width="10%"><span>顾问</span></th>
<th width="20%"><span>客户数</span></th>
<th width="13%"><span>进店人数/进店次数</span></th>
<th width="9%"><span>客户数</span></th>
<th width="12%"><span>进店人数/次数</span></th>
<th width="9%"><span>试驾数</span></th>
<th width="9%"><span>跟进数</span></th>
<th width="9%"><span>订单数</span></th>
<th width="9%"><span>战败数</span></th>
<th width="9%"><span>开票数</span></th>
<th width="9%"><span>改派数</span></th>
<th width="9%"><span>接收数</span></th>
<th width="9%"><span>新增企微</span></th>
<th width="9%"><span>删除企微</span></th>
<th width="10%"><span>日期</span></th>
@@ -127,6 +129,8 @@
<td><?= $v['orders'] ?></td>
<td><?= $v['defeats'] ?></td>
<td><?= $v['bills'] ?></td>
<td><?= $v['reassigns'] ?></td>
<td><?= $v['receives'] ?></td>
<td><?= $v['qy_adds'] ?></td>
<td><?= $v['qy_dels'] ?></td>
<td><?= $v['log_date'] ?></td>