|
@@ -28,10 +28,16 @@ class Invoice extends Base{
|
|
|
if($param['invoice_type']!=='') $where[]=['invoice_type','=',$param['invoice_type']];
|
|
|
if($param['apply_id']!=='') $where[]=['apply_id','=',$param['apply_id']];
|
|
|
if($this->level!=1) {
|
|
|
- $whereOr[]=['apply_id','=', $this->uid];
|
|
|
- $whereOr[]=['status','=', 0];
|
|
|
+ if($param['supplierNo']!==''||$param['companyNo']!==''){
|
|
|
+ $whereOr[]=['apply_id','=', $this->uid];
|
|
|
+ if($param['status']!==''){
|
|
|
+ $whereOr[]=['status','=', $param['status']];
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- $list=$this->model->where($where)->whereOr($whereOr)->order('id desc')->paginate(['page'=>$param['page'],'list_rows'=>$param['size']]);
|
|
|
+ $list=$this->model->where($where)->whereOr(function($query)use($whereOr){
|
|
|
+ $query->where($whereOr);
|
|
|
+ })->order('id desc')->paginate(['page'=>$param['page'],'list_rows'=>$param['size']]);
|
|
|
return success('获取成功',['list'=>$list->items(),'count'=>$list->total()]);
|
|
|
}
|
|
|
|