mirror of
https://gitee.com/celaraze/chemex.git
synced 2024-12-02 03:07:49 +08:00
commit
5608655740
@ -75,12 +75,16 @@ class CheckRecordController extends AdminController
|
||||
if (empty($check)) {
|
||||
return admin_trans_label('Record None');
|
||||
} else {
|
||||
$check_item = $check->check_item;
|
||||
$check_item = match ($check->check_item) {
|
||||
get_class(new \App\Models\DeviceRecord()) => 'device',
|
||||
get_class(new \App\Models\PartRecord()) => 'part',
|
||||
get_class(new \App\Models\SoftwareRecord()) => 'software',
|
||||
};
|
||||
$item = Support::getItemRecordByClass($check_item, $item_id);
|
||||
if (empty($item)) {
|
||||
return admin_trans_label('Item None');
|
||||
} else {
|
||||
return $item->name;
|
||||
return $item->asset_number;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -35,7 +35,7 @@ class DeviceTrackUpdateDeleteForm extends Form implements LazyRenderable
|
||||
}
|
||||
|
||||
// 设备追踪
|
||||
$device_track = DeviceTrack::where('id', $id)->first();
|
||||
$device_track = DeviceTrack::where('device_id', $id)->first();
|
||||
|
||||
$device_track->return_time = $return_time;
|
||||
$device_track->return_description = $return_description;
|
||||
|
Loading…
Reference in New Issue
Block a user