This commit is contained in:
weiz 2024-05-29 10:36:37 +08:00
parent bf7877a3cf
commit fd83deb396

View File

@ -15,7 +15,7 @@
$params = $this->request->get(['type','page_no','page_size']);
$page_no = !empty($params['page_no']) ? $params['page_no'] : 1;
$page_size = !empty($params['page_size']) ? $params['page_size'] : 15;
if(empty($params['type']) || !in_array($params['type'],[1,2,3,4])){
if(empty($params['type']) || !in_array($params['type'],[1,2,3,4,5])){
return $this->fail("参数错误");
}
$where = [];
@ -31,6 +31,9 @@
if($params['type'] == 4){
$where[] = ['check_status','=',3];
}
if($params['type'] == 5){
$where[] = ['check_status','=',1];
}
$lists = Db::name('oa_approve')->field('id,type,flow_id,admin_id,check_admin_ids,check_status,create_time')->where('admin_id',$this->adminId)->where($where)
->page($page_no, $page_size)->order('id desc')->select()->each(function($data){
$admin = Admin::field('name,dept_id')->where('id',$data['admin_id'])->findOrEmpty();