审核详情

This commit is contained in:
2025-03-16 14:57:34 +08:00
parent 53e7be1156
commit 27e70a5148
3 changed files with 77 additions and 1 deletions

View File

@ -80,6 +80,14 @@ class Ticket extends Controller
$this->title = '工单详情';
['id' => $id] = $this->_vali(['id.require' => '请指定工单ID!']);
$this->vo = TicketTicket::mk()->with(['user', 'type', 'reply'])->append(['imgs_arr', 'status_text', 'type_name', 'last_reply'])->find($id);
$process = ApprovalProcess::where('type', '=', 'GDSH')->order('id', 'asc')->findOrEmpty();
$instance = ApprovalInstance::query()->with(['steps.approver', 'logs'])->where('process_id', '=', $process->id)->where('oid', '=', $id)->findOrEmpty();
$this->instance = $instance;
if ($instance->isEmpty()) {
$this->step_index = -1;
} else {
$this->step_index = $instance->current_step;
}
$this->fetch();
}
@ -301,6 +309,7 @@ class Ticket extends Controller
if ($instance->current_step >= count($instance->steps)) {
$instance->status = 1;
$ticket->status = 0;
$ticket->save();
} else {
$step = $instance->steps[$instance->current_step];
if ($step['approver_type'] == 3) {