Commit f4e67f95 authored by hujun's avatar hujun

总监列表搜索

parent 9e6ad70c
...@@ -184,17 +184,14 @@ class Broker extends Basic ...@@ -184,17 +184,14 @@ class Broker extends Basic
$data['msg'] = ''; $data['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$search = $this->params['search'];
$agents = new AAgents(); $agents = new AAgents();
$field = 'id,name,create_time,phone,district_id'; $field = 'id,name,create_time,phone,district_id';
$where['level'] = 40; $where = '';
$where['status'] = 0; $where .= 'level=40 AND status=0';
if (isset($this->params['name'])) { if ($search != NULL) {
$where['name'] = ['LIKE',$this->params['name'].'%']; $where .= " AND (phone like '{$search}%' or name like '{$search}%')";
}
if (isset($this->params['phone'])) {
$where['phone'] = ['LIKE',$this->params['phone'].'%'];
} }
$data['list'] = $agents->getListDistrict($pageNo, $pageSize, 'id DESC', $field, $where); $data['list'] = $agents->getListDistrict($pageNo, $pageSize, 'id DESC', $field, $where);
......
...@@ -142,6 +142,7 @@ public function saveList(){ ...@@ -142,6 +142,7 @@ public function saveList(){
$district_where['status'] = 0; $district_where['status'] = 0;
$store_where['status'] = 0; $store_where['status'] = 0;
$result = array();
foreach ($data as $k=>$v){ foreach ($data as $k=>$v){
$result[$k] = $v; $result[$k] = $v;
if (isset($v->district_id)) { if (isset($v->district_id)) {
......
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