Commit a0248945 authored by hujun's avatar hujun

判断

parent d30aa4bb
......@@ -2887,7 +2887,7 @@ class Finance extends Basic
*/
public function adjustment() {
if (!$this->request->isAjax()) {
// return view("adjustment");
return view("adjustment");
}
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
......@@ -2943,9 +2943,9 @@ class Finance extends Basic
}
//商铺地址
if (!empty($this->params['internal_address'])) {
if (!empty($this->params['address'])) {
$m_house = new GHouses();
$id = $m_house->getList(1, 20, 'id desc', 'id',['internal_address'=>['like', '%' . $this->params['internal_address'] . '%']]);
$id = $m_house->getList(1, 20, 'id desc', 'id',['internal_address'=>['like', '%' . $this->params['address'] . '%']]);
// $where['d.internal_address'] = ['like', '%' . $this->params['internal_address'] . '%'];
foreach ($id as $v) {
......@@ -2977,8 +2977,14 @@ class Finance extends Basic
}
//提交人姓名
if (!empty($this->params['agent_name'])) {
$where['a.agent_name'] = ['like', '%' . $this->params['agent_name'] . '%'];
if (!empty($this->params['name'])) {
$where['a.name'] = ['like', '%' . $this->params['name'] . '%'];
$is_show = 1;
}
//提交人手机号
if (!empty($this->params['phone'])) {
$where['a.phone'] = ['like', '%' . $this->params['phone'] . '%'];
$is_show = 1;
}
......@@ -3008,6 +3014,10 @@ class Finance extends Basic
$where['a.id'] = $this->params['id'];
}
if (!empty($this->params['march_id'])) {
$where['c.id'] = $this->params['march_id'];
}
$field = 'a.create_time,a.id,c.id as march_id,a.paylog_id,a.money,b.income_time,a.type,a.new_paylog_id,a.operation_id,b.order_id';
$list = $m_paylog->getAdjustmentListLimit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
......
......@@ -116,7 +116,7 @@ class OPayLogAdjustment extends BaseModel{
->alias("a")
->join("o_paylog b", "a.paylog_id = b.id", "left")
->join("o_march_in c", "b.order_id = c.id", "left")
->join("a_agents d", "b.agent_id = d.id", "left")
->join("a_agents d", "a.operation_id = d.id", "left")
->join("o_order e", "b.order_id = e.id")
->limit($pageSize)
->page($pageNo)
......@@ -133,7 +133,7 @@ class OPayLogAdjustment extends BaseModel{
return $this->db_->alias('a')
->join("o_paylog b", "a.paylog_id = b.id", "left")
->join("o_march_in c", "b.order_id = c.id", "left")
->join("a_agents d", "b.agent_id = d.id", "left")
->join("a_agents d", "a.operation_id = d.id", "left")
->join("o_order e", "b.order_id = e.id")
->where($params)
->count('a.id');
......@@ -149,7 +149,7 @@ class OPayLogAdjustment extends BaseModel{
return $this->db_->alias('a')
->join("o_paylog b", "a.paylog_id = b.id", "left")
->join("o_march_in c", "b.order_id = c.id", "left")
->join("a_agents d", "b.agent_id = d.id", "left")
->join("a_agents d", "a.operation_id = d.id", "left")
->join("o_order e", "b.order_id = e.id")
->where($params)
->sum('a.money');
......
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