Commit d9343011 authored by hujun's avatar hujun

财务审核列表增加分佣方姓名搜索

parent 26a0c849
...@@ -65,7 +65,7 @@ class Finance extends Basic ...@@ -65,7 +65,7 @@ class Finance extends Basic
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$check_status = $this->params['check_status']; $check_status = $this->params['check_status'];
$fields = 'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address, $fields = 'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address,
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number,a.is_open'; a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number,a.is_open,a.agent_id';
$where['a.father_id'] = 0; $where['a.father_id'] = 0;
// $where['c.is_del'] = 0; // $where['c.is_del'] = 0;
$where['a.status'] = 11; $where['a.status'] = 11;
...@@ -116,6 +116,11 @@ class Finance extends Basic ...@@ -116,6 +116,11 @@ class Finance extends Basic
$where['f.name'] = ['LIKE', '%'.$this->params['agent_name'].'%']; $where['f.name'] = ['LIKE', '%'.$this->params['agent_name'].'%'];
} }
//分佣方姓名
if (!empty($this->params['partial_name'])) {
$where['e.name'] = ['LIKE', '%'.$this->params['partial_name'].'%'];
}
switch ($check_status) { switch ($check_status) {
case 2 : case 2 :
//成交报告列表-第二级审核 //成交报告列表-第二级审核
......
...@@ -359,6 +359,7 @@ class OBargainModel extends Model ...@@ -359,6 +359,7 @@ class OBargainModel extends Model
->join('o_order c', 'a.order_id = c.id', 'left') ->join('o_order c', 'a.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left') ->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents f', 'b.report_agent_id=f.id','left') ->join('a_agents f', 'b.report_agent_id=f.id','left')
->join('a_agents e', 'a.agent_id=e.id','left')
->where($params) ->where($params)
->having('count(e.order_id) = 1') ->having('count(e.order_id) = 1')
->order($order_) ->order($order_)
...@@ -372,6 +373,7 @@ class OBargainModel extends Model ...@@ -372,6 +373,7 @@ class OBargainModel extends Model
->join('o_order c', 'a.order_id = c.id', 'left') ->join('o_order c', 'a.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left') ->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents f', 'b.report_agent_id=f.id','left') ->join('a_agents f', 'b.report_agent_id=f.id','left')
->join('a_agents e', 'a.agent_id=e.id','left')
->where($params) ->where($params)
->group('a.id') ->group('a.id')
->order($order_) ->order($order_)
...@@ -419,6 +421,7 @@ class OBargainModel extends Model ...@@ -419,6 +421,7 @@ class OBargainModel extends Model
->join('o_order c', 'a.order_id = c.id', 'left') ->join('o_order c', 'a.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left') ->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents f', 'b.report_agent_id=f.id','left') ->join('a_agents f', 'b.report_agent_id=f.id','left')
->join('a_agents e', 'a.agent_id=e.id','left')
->where($params) ->where($params)
->having('count(e.order_id) = 1') ->having('count(e.order_id) = 1')
->group('e.order_id') ->group('e.order_id')
...@@ -429,6 +432,7 @@ class OBargainModel extends Model ...@@ -429,6 +432,7 @@ class OBargainModel extends Model
->join('o_order c', 'a.order_id = c.id', 'left') ->join('o_order c', 'a.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left') ->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents f', 'b.report_agent_id=f.id','left') ->join('a_agents f', 'b.report_agent_id=f.id','left')
->join('a_agents e', 'a.agent_id=e.id','left')
->where($params) ->where($params)
->group('a.id') ->group('a.id')
->count(); ->count();
......
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