...
|
...
|
@@ -35,9 +35,24 @@ use think\Db; |
|
|
class AdminEquipmentController extends AdminBaseController{
|
|
|
|
|
|
public function index(){
|
|
|
|
|
|
|
|
|
|
|
|
$param=$this->request->param();
|
|
|
dump($param);
|
|
|
$where=array();
|
|
|
if (!empty($param['name'])){
|
|
|
$where['name']=['like','%'.$param['name'].'%'];
|
|
|
}
|
|
|
if (!empty($param['hospital'])){
|
|
|
$where['hospital']=$param['hospital'];
|
|
|
}
|
|
|
if (!empty($param['note'])){
|
|
|
$where['note']=['like','%'.$param['note'].'%'];
|
|
|
}
|
|
|
if (!empty($param['start_number'])&&!empty($param['end_number'])){
|
|
|
$where['serial_number']=['between',[$param['start_number'],$param['end_number']]];
|
|
|
}
|
|
|
if (!empty($param['start_time'])&&!empty($param['end_time'])){
|
|
|
$where['create_time']=['between',[strtotime($param['start_time']),strtotime($param['end_time'])]];
|
|
|
}
|
|
|
$Equipment=new EquipmentModel();
|
|
|
$data=$Equipment->paginate(10);
|
|
|
$this->assign('data',$data);
|
...
|
...
|
|