Commit 19c90a28 by HTML5-侯张振

修改 经纪人报表,列表里没有渠道,但是导出的excel表格有渠道

parent e678db22
......@@ -277,19 +277,19 @@ class Kpiadmin extends CI_Controller
//分销商查看自己的经纪人
$uid = $this->session->userdata('u_id');
$distributor = $this->distributor->get(array('manager_id' => $uid));
if ($distributor && $distributor['uniqid_id']) {
$where .= ' U.uniqid_id =' . $distributor['uniqid_id'];
}
$where = trim($where, ' and ');
$count = $this->customer->get_agents_page_count($where);
//获取所有的客户
$this->data['agents'] = array();
if($count >0){
$agents = $this->customer->get_agents_page($where, $page_no, self::PAGE_SIZE);
if ($agents)
{
foreach ($agents as $key => $agent) {
......@@ -586,13 +586,12 @@ class Kpiadmin extends CI_Controller
$temp['user_mobile'] = $item['user_mobile'];
$temp['building_title'] = iconv('utf-8', 'gbk', $item['building_title']);
$temp['customers'] = $item['customers'];
$temp['channel'] = iconv('utf-8', 'gbk', $item['channel_name']);
array_push($data, $temp);
}
}
//导出
$titles = '经纪人,联系电话,推荐项目名称,客户数,渠道';
$titles = '经纪人,联系电话,推荐项目名称,客户数';
$titles = iconv('utf-8', 'gbk', $titles);
$file = iconv('utf-8', 'gbk', '经纪人数据列表.xls');
$this->export->export_excel($file, $titles, $data);
......
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