|
@@ -76,7 +76,19 @@ class HydEquipment extends Model
|
|
|
return $query->where('serial_number|fixed_asset_number|fixed_asset_number2', 'like', '%'.$value.'%');
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ //根据pid 查询当前子类的设备
|
|
|
+ public function searchPidAttr($query, $value, $data)
|
|
|
+ {
|
|
|
+ $eqtype =new EquipmentType();
|
|
|
+ $list =$eqtype->getIdbyPid($value);
|
|
|
+ $ids=[];
|
|
|
+ foreach($list as $key =>$value)
|
|
|
+ {
|
|
|
+ $ids[] = $value['id'];
|
|
|
+ }
|
|
|
+ return $query->where('equipment_type', 'in', $ids);
|
|
|
+
|
|
|
+ }
|
|
|
public function getList()
|
|
|
{
|
|
|
$res = $this->dataRange()
|