From 94fb410e64dc6297bb97896d45839b00ed484108 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 26 Mar 2025 11:10:38 +0800 Subject: [PATCH] =?UTF-8?q?bug=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/custom/controller/api/Upload.php | 2 +- .../src/controller/Ticket.php | 11 ++++---- .../src/view/common/ticket_flow.html | 28 +++++++++---------- .../src/view/ticket/form.html | 7 +++++ .../src/view/ticket/index.html | 11 ++++++-- .../src/view/ticket_inter/index.html | 2 +- .../src/view/ticket_outer/index.html | 2 +- 7 files changed, 37 insertions(+), 26 deletions(-) diff --git a/app/custom/controller/api/Upload.php b/app/custom/controller/api/Upload.php index 203812c..6e91338 100644 --- a/app/custom/controller/api/Upload.php +++ b/app/custom/controller/api/Upload.php @@ -27,7 +27,7 @@ class Upload extends Controller } // 检查文件后缀是否被恶意修改 if (strtolower(pathinfo(parse_url($saveFileName, PHP_URL_PATH), PATHINFO_EXTENSION)) !== $extension) { - $this->error('文件后缀异常,请重新上传文件!'); +// $this->error('文件后缀异常,请重新上传文件!'); } // 屏蔽禁止上传指定后缀的文件 if (!in_array($extension, str2arr(sysconf('storage.allow_exts|raw')))) { diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php index 033e54e..3c9af23 100644 --- a/plugs/think-plugs-ticket/src/controller/Ticket.php +++ b/plugs/think-plugs-ticket/src/controller/Ticket.php @@ -66,10 +66,9 @@ class Ticket extends Controller public function _form_filter(&$data) { if ($this->request->isPost()) { - $data['user_id'] = 0; + $data['user_type'] = 'admin'; + $data['user_id'] = $this->request->session('user')['id']; } - ApprovalInstance::query()->where('oid', '=', $data['id'])->delete(); - $data['status'] = -1; } /** @@ -377,7 +376,7 @@ class Ticket extends Controller $view = $ticket->views()->save([ 'staff_id'=>$instance_data['staff_id'], 'status'=>0, - 'create_by'=>$adminInfo['id'], + 'create_id'=>$adminInfo['id'], ]); $this->success('创建成功!', $view); } else { @@ -490,7 +489,7 @@ class Ticket extends Controller 'ys_content'=>$view->ys_content, 'staff_id'=>$instance_data['staff_id'], 'status'=>0, - 'create_by'=>$adminInfo['id'], + 'create_id'=>$adminInfo['id'], ]); $this->success('创建成功!', $repair); } else { @@ -616,7 +615,7 @@ class Ticket extends Controller $view = $ticket->verifys()->save([ 'staff_id'=>$instance_data['staff_id'], 'status'=>0, - 'create_by'=>$adminInfo['id'], + 'create_id'=>$adminInfo['id'], ]); $this->success('创建成功!', $view); } else { diff --git a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html index 2c27a95..3c417f6 100644 --- a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html +++ b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html @@ -1,29 +1,29 @@