diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php index 83dbab4..033e54e 100644 --- a/plugs/think-plugs-ticket/src/controller/Ticket.php +++ b/plugs/think-plugs-ticket/src/controller/Ticket.php @@ -7,6 +7,7 @@ use plugin\ticket\model\ApprovalInstance; use plugin\ticket\model\ApprovalProcess; use plugin\ticket\model\ApprovalStep; use plugin\ticket\model\TicketDept; +use plugin\ticket\model\TicketRepair; use plugin\ticket\model\TicketReply; use plugin\ticket\model\TicketTicket; use plugin\ticket\model\TicketType; @@ -499,6 +500,33 @@ class Ticket extends Controller } } + public function repair_ticket_modify() + { + $data = $this->_vali([ + 'ticket_id.require'=>'请指定工单ID!', + ]); + $repair = TicketRepair::query()->where('id', '=', $data['ticket_id'])->findOrEmpty(); + if ($repair->isEmpty()) { + $this->error('未找到工单信息'); + } + if ($repair->ticket === null) { + $this->error('未找到主工单信息'); + } + if ($repair->status === 1) { + $this->error('该工单已维修完成,无法操作!'); + } + $adminInfo = $this->request->session('user'); + if ($repair->ticket->kj_user_id != $adminInfo['id']) { + $this->error('您不是该工单的控价人员,无法操作!'); + } + if ($this->request->isPost()) { + + } else { + $this->vo = $repair; + $this->fetch(); + } + } + public function verify_process_create() { $data = $this->_vali([