You've already forked guangan
工单筛选
This commit is contained in:
@ -63,11 +63,15 @@ class Ticket extends Auth
|
||||
|
||||
public function list()
|
||||
{
|
||||
$query = TicketTicket::query()->scope(['avail'])->where(['fz_user_id'=>$this->staff->id]);
|
||||
$status = $this->request->get('status', null);
|
||||
$query = TicketTicket::query(); // ->where(['fz_user_id'=>$this->staff->id])
|
||||
if ($status) {
|
||||
$query->where('staff_status', $status);
|
||||
}
|
||||
$keyword = $this->request->get('keyword', null);
|
||||
if ($keyword) {
|
||||
$query->where('title', 'like', "%{$keyword}%");
|
||||
}
|
||||
$pageData = $query->paginate();
|
||||
$this->success('获取工单列表', $pageData);
|
||||
}
|
||||
|
@ -8,6 +8,6 @@ class InspectionStaffToken extends Model
|
||||
{
|
||||
public function staff()
|
||||
{
|
||||
return $this->belongsTo(InspectionStaff::class, 'staff_id');
|
||||
return $this->belongsTo(InspectionStaff::class, 'staff_id', "id");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user