This commit is contained in:
weiz 2024-05-31 09:15:05 +08:00
parent 7cba3350fd
commit 9ccbddb30c

View File

@ -682,6 +682,7 @@
}else{ }else{
$where[] = ['check_status','in','2,5,10']; $where[] = ['check_status','in','2,5,10'];
} }
$where[] = ['is_cash' => 0];
$lists = Db::name('oa_invoice')->field('id,type,invoice_title,invoice_subject,amount,invoice_type,check_status,admin_id,create_time,check_admin_ids,open_admin_id,open_time,code,delivery')->where($where) $lists = Db::name('oa_invoice')->field('id,type,invoice_title,invoice_subject,amount,invoice_type,check_status,admin_id,create_time,check_admin_ids,open_admin_id,open_time,code,delivery')->where($where)
->page($page_no, $page_size)->order('id desc')->select()->each(function($data){ ->page($page_no, $page_size)->order('id desc')->select()->each(function($data){
$admin = Admin::field('name,dept_id')->where('id',$data['admin_id'])->findOrEmpty(); $admin = Admin::field('name,dept_id')->where('id',$data['admin_id'])->findOrEmpty();
@ -704,7 +705,7 @@
$data['open_admin_name'] = Admin::where('id',$data['open_admin_id'])?->value('name'); $data['open_admin_name'] = Admin::where('id',$data['open_admin_id'])?->value('name');
return $data; return $data;
})->toArray(); })->toArray();
$count = Db::name('oa_invoice')->where($where)->where('admin_id',$this->adminId)->count(); $count = Db::name('oa_invoice')->where($where)->count();
return $this->success('成功', compact('count', 'lists', 'page_no', 'page_size')); return $this->success('成功', compact('count', 'lists', 'page_no', 'page_size'));
} }