|
@@ -35,9 +35,24 @@ use think\Db; |
|
@@ -35,9 +35,24 @@ use think\Db; |
35
|
class AdminEquipmentController extends AdminBaseController{
|
35
|
class AdminEquipmentController extends AdminBaseController{
|
36
|
|
36
|
|
37
|
public function index(){
|
37
|
public function index(){
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
38
|
+ $param=$this->request->param();
|
|
|
39
|
+ dump($param);
|
|
|
40
|
+ $where=array();
|
|
|
41
|
+ if (!empty($param['name'])){
|
|
|
42
|
+ $where['name']=['like','%'.$param['name'].'%'];
|
|
|
43
|
+ }
|
|
|
44
|
+ if (!empty($param['hospital'])){
|
|
|
45
|
+ $where['hospital']=$param['hospital'];
|
|
|
46
|
+ }
|
|
|
47
|
+ if (!empty($param['note'])){
|
|
|
48
|
+ $where['note']=['like','%'.$param['note'].'%'];
|
|
|
49
|
+ }
|
|
|
50
|
+ if (!empty($param['start_number'])&&!empty($param['end_number'])){
|
|
|
51
|
+ $where['serial_number']=['between',[$param['start_number'],$param['end_number']]];
|
|
|
52
|
+ }
|
|
|
53
|
+ if (!empty($param['start_time'])&&!empty($param['end_time'])){
|
|
|
54
|
+ $where['create_time']=['between',[strtotime($param['start_time']),strtotime($param['end_time'])]];
|
|
|
55
|
+ }
|
41
|
$Equipment=new EquipmentModel();
|
56
|
$Equipment=new EquipmentModel();
|
42
|
$data=$Equipment->paginate(10);
|
57
|
$data=$Equipment->paginate(10);
|
43
|
$this->assign('data',$data);
|
58
|
$this->assign('data',$data);
|