From f85cf9207de09390297e1c50b2f3558be9e15aa4 Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 15 Oct 2021 10:08:03 +0800 Subject: [PATCH] admin_customer_1015 --- admin/controllers/receiver/Customer.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/admin/controllers/receiver/Customer.php b/admin/controllers/receiver/Customer.php index 938c5846..754ba625 100644 --- a/admin/controllers/receiver/Customer.php +++ b/admin/controllers/receiver/Customer.php @@ -37,10 +37,6 @@ class Customer extends HD_Controller $status_arr = $this->customers_model->get_status(); unset($status_arr['-1']); $params = $this->input->get(); - !$params['city_id'] && $params['city_id'] = ''; - !$params['county_id'] && $params['county_id'] = ''; - !$params['city_id'] && $params['city_id'] = ''; - !$params['county_id'] && $params['county_id'] = ''; !$params['biz_id'] && $params['biz_id'] = ''; !$params['cf_title'] && $params['cf_title'] = ''; !$params['qdjl_id'] && $params['qdjl_id'] = ''; @@ -73,6 +69,7 @@ class Customer extends HD_Controller $str_ids = ''; if ($params['biz_id_admin']) {//指定店铺所有销售员 $where_lcb['biz_id'] = $params['biz_id_admin']; + $str_ids = $params['biz_id_admin']; } else { //指定城市的所有销售员 $where_biz = array(); @@ -94,6 +91,10 @@ class Customer extends HD_Controller } //获取目标销售员列表 if ($where_lcb) { + $params['city_id_admin'] && $where['city_id'] = $params['city_id_admin']; + $params['county_id_admin'] && $where['county_id'] = $params['county_id_admin']; + $params['biz_id_admin'] && $where['biz_id'] = $params['biz_id_admin']; + $where_lcb['status>-1'] = null; $rows_lcb = $this->app_licheb_users_model->select($where_lcb, 'id desc', 0, 0, 'id'); if ($rows_lcb) { @@ -101,9 +102,7 @@ class Customer extends HD_Controller $str_ids = $str_ids . ',0'; $where["admin_id in({$str_ids})"] = null; } else { - if ($str_ids) { - $where['admin_id'] = 0; - } else { + if (!$str_ids) { $where['admin_id'] = -1; } }