diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index 4cf13289..f410f717 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -107,6 +107,7 @@ class Customer extends HD_Controller $show_info['wxqyAry'] = $wxqyAry; $show_info['wxgrAry'] = $wxgrAry; $show_info['csbizidAry'] = $this->customers_model->csbizidAry(); + $show_info['cbrandAry'] = $this->customers_model->cbrandAry(); $this->data['show_info'] = $show_info; $this->data['lists'] = $lists; $this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count); @@ -392,6 +393,7 @@ class Customer extends HD_Controller !$params['cf_title'] && $params['cf_title'] = ''; !$params['qdjl_id'] && $params['qdjl_id'] = ''; !$params['level'] && $params['level'] = ''; + !is_numeric($params['c_brand']) && $params['c_brand'] = ''; !$params['of_id'] && $params['of_id'] = ''; !$params['of2_id'] && $params['of2_id'] = ''; !$params['city_id'] && $params['city_id'] = ''; @@ -421,6 +423,9 @@ class Customer extends HD_Controller if ($params['level']) { $where['level'] = $params['level']; } + if (is_numeric($params['c_brand'])) { + $where['c_brand'] = $params['c_brand']; + } if ($params['of_id']) { $where['of_id'] = $params['of_id']; } @@ -607,10 +612,11 @@ class Customer extends HD_Controller 'name' => $row['name'], 'level' => $row['level'], 'mobile' => $mobile_sub, + 'c_brand' => $this->customers_model->cbrandAry($row['c_brand']), 'of_title' => $of_title, 'wxqy_name' => $this->customers_model->wxqyAry($row['wxqy']), 'wxgr_name' => $this->customers_model->wxgrAry($row['wxgr']), - 'wx_name' => '企微:' . $this->customers_model->wxqyAry($row['wxqy']) . '; 个微:' . $this->customers_model->wxgrAry($row['wxgr']), + 'wx_name' => '企微' . $this->customers_model->wxqyAry($row['wxqy']) . '; 个微' . $this->customers_model->wxgrAry($row['wxgr']), 'cf_user' => $cf_user, 'to_send' => $to_send, 'c_time' => date('Y-m-d H:i:s', $row['c_time']), @@ -946,7 +952,7 @@ class Customer extends HD_Controller "dt_time" => "到店时间", "order_time" => "下单时间", "cont_time" => "最后联系时间", - #"of_title" => "来源", + "c_brand" => "品牌归属", "of_title_1" => "来源1", "of_title_2" => "来源2", "biz_name" => "归属门店", @@ -961,7 +967,7 @@ class Customer extends HD_Controller $status_arr = $this->customers_model->get_status(); unset($status_arr['-1']); if ($count) { - $fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name"; + $fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, c_brand, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name"; $rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds); foreach ($rows as $key => $val) { $of_title = ''; @@ -987,7 +993,7 @@ class Customer extends HD_Controller 'dt_time' => $val['dt_time'], 'order_time' => $val['order_time'], 'cont_time' => $val['cont_time'], - 'of_title' => $of_title, + 'c_brand' => $this->customers_model->cbrandAry($val['c_brand'] ), 'of_title_1' => $of_title_1, 'of_title_2' => $of_title_2, 'biz_name' => $val['biz_name'], diff --git a/admin/views/receiver/customer/get.php b/admin/views/receiver/customer/get.php index 84ccb2c2..35b24c4b 100644 --- a/admin/views/receiver/customer/get.php +++ b/admin/views/receiver/customer/get.php @@ -58,16 +58,17 @@
Directory access is forbidden.
- - -