userslog_608

This commit is contained in:
dengbw
2022-06-08 14:36:49 +08:00
committed by lccsw
parent ff4b878ed9
commit 97a68a3763
2 changed files with 17 additions and 14 deletions
+13 -12
View File
@@ -209,24 +209,25 @@ class Userslog extends HD_Controller
$str_ids = implode(',', $biz_ids);
$map_biz = $this->mdBiz->map('id', 'biz_name,type', ["id in ({$str_ids})" => null]);
}
$typeAry = $this->mdBiz->type_ary();
foreach ($res as $v) {
$uname = $biz_name = $biz_type = '';
$uname = $biz_name = '';
$map_sale[$v['sales_id']] && $uname = $map_sale[$v['sales_id']];
$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, 't_follows' => $v['t_follows']
$follows = $v['t_follows'] + $v['h_follows'] + $v['w_follows'];
$temp = ['uname' => $uname, 'biz_name' => $biz_name, 'follows' => $follows, 't_follows' => $v['t_follows']
, 'h_follows' => $v['h_follows'], 'w_follows' => $v['w_follows'], 't_day' => $v['t_day']];
$lists[] = $temp;
}
}
if ($params['size'] != 10000) {
$sum = $this->mdCustomerVisitSales->sum('t_follows', $where);
$menus[] = ['title' => "待跟进数", 'value' => intval($sum['t_follows']), 'tag' => '个'];
$sum = $this->mdCustomerVisitSales->sum('h_follows', $where);
$menus[] = ['title' => "已跟进数", 'value' => intval($sum['h_follows']), 'tag' => '个'];
$sum = $this->mdCustomerVisitSales->sum('w_follows', $where);
$menus[] = ['title' => "逾期未跟进数", 'value' => intval($sum['w_follows']), 'tag' => '个'];
$sum_h = $this->mdCustomerVisitSales->sum('h_follows', $where);
$sum_t = $this->mdCustomerVisitSales->sum('t_follows', $where);
$sum_w = $this->mdCustomerVisitSales->sum('w_follows', $where);
$sum = $sum_h['h_follows'] + $sum_t['t_follows'] + $sum_w['w_follows'];
$menus[] = ['title' => "计划跟进数", 'value' => intval($sum), 'tag' => '个'];
$menus[] = ['title' => "跟进数", 'value' => intval($sum_h['h_follows']), 'tag' => '个'];
$menus[] = ['title' => "新增未跟进数", 'value' => intval($sum_t['t_follows']), 'tag' => '个'];
$menus[] = ['title' => "逾期未跟进数", 'value' => intval($sum_w['w_follows']), 'tag' => '个'];
$data['menus'] = $menus;
}
$data['pager'] = array('count' => ceil($total / $params['size']), 'curr' => $params['page'], 'totle' => $total);
@@ -265,8 +266,8 @@ class Userslog extends HD_Controller
$data = $indexs = array();
if ($params['tab'] == 2) {
$res = $this->visitSelect($params);
$indexs = ['biz_name' => '门店', 'uname' => '顾问', 't_follows' => '跟进数', 'h_follows' => '已跟进数'
, 'w_follows' => '逾期未跟进数', 't_day' => '日期'];
$indexs = ['biz_name' => '门店', 'uname' => '顾问', 'follows' => '计划跟进数', 'h_follows' => '已跟进数'
, 't_follows' => '今日新增未跟进数', 'w_follows' => '逾期未跟进数', 't_day' => '日期'];
} else {
$res = $this->dataSelect($params);
$offlineSources = $this->mdCustomers->offlineSources();
@@ -102,8 +102,9 @@
<tr>
<th width="17%"><span>门店</span></th>
<th width="10%"><span>顾问</span></th>
<th width="10%"><span>跟进数</span></th>
<th width="10%"><span>计划跟进数</span></th>
<th width="10%"><span>已跟进数</span></th>
<th width="10%"><span>今日新增未跟进数</span></th>
<th width="10%"><span>逾期未跟进数</span></th>
<th width="10%"><span>日期</span></th>
</tr>
@@ -114,8 +115,9 @@
<tr>
<td><?= $v['biz_name'] ?></td>
<td><?= $v['uname'] ?></td>
<td><?= $v['t_follows'] ?></td>
<td><?= $v['follows'] ?></td>
<td><?= $v['h_follows'] ?></td>
<td><?= $v['t_follows'] ?></td>
<td><?= $v['w_follows'] ?></td>
<td><?= $v['t_day'] ?></td>
</tr>