From f1d73b808d3fd188104587f9b7943203f5bdf130 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Mon, 24 Mar 2025 18:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E4=BB=B7=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/Ticket.php | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) 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([