Commit 798d0866 authored by hujun's avatar hujun

经纪人列表修改

parent db7c2f3a
......@@ -77,22 +77,25 @@ class Agent extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
//条件
$where = 'a.status in(0,1)';
$where = 'a.id != 1';
$search = $params['search'];
$where['a.status'] = ['IN',['0,1']];
$where['a.id'] = ['<>', 1];
if (!empty($search)) {
$where .= " and a.id='$search' or a.name like '%$search%' or a.phone like '%$search%' ";
$data['search'] = $search;
if (!empty($params['search'])) {
$where[] = ['EXP', "a.name like '%{$params['search']}%' OR a.name like '%{$params['search']}%'"];
}
if (!empty($params['groupname'])) {
$where .= " and g.title like '%{$params['groupname']}%' ";
$data['groupname'] = $params['groupname'];
if (!empty($params['group_name'])) {
$where['g.title'] = ['LIKE', "%{$params['group_name']}%"];
}
if (!empty($params['store_name'])) {
$where .= " and s.store_name like '%{$params['store_name']}%' ";
$data['store_name'] = $params['store_name'];
if (!empty($params['store_id'])) {
$where['a.store_id'] = $params['store_id'];
}
if (!empty($params['district_id'])) {
$where['a.district_id'] = $params['district_id'];
}
$field = "a.id,a.store_id,a.img,a.district_id,a.`level`,a.`name`,a.phone,a.`status`,a.inviter_id,a.create_time,
ifnull(s.store_name,'')store_name,ifnull(d.district_name,'')district_name,ifnull(g.title,'无')groupname";
$order = 'a.id DESC';
......
......@@ -62,8 +62,8 @@
<th>手机号</th>
<th>角色</th>
<!--2.2版本 -->
<th>评价次数</th>
<th>分数</th>
<!--<th>评价次数</th>-->
<!--<th>分数</th>-->
<th>操作</th>
</tr>
</thead>
......
......@@ -242,7 +242,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params.pageNo = agent.pageNo;
params.pageSize = agent.pageSize;
params.search = $("input[name='search']").val();
params.groupname = $("input[name='groupname']").val();
params.group_name = $("input[name='groupname']").val();
params.store_name = $("input[name='store_name']").val();
//后端加入两个字段搜索
params.district_id=$("#district_id").val();
......
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