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 @@
- {if $ticket.user_shares} + {if $ticket.user_shares && sizeof($ticket.user_shares) > 0}
关联随手拍
@@ -54,7 +54,7 @@
{/if} - {if $ticket.inspection_shares} + {if $ticket.inspection_shares && sizeof($ticket.inspection_shares) > 0}
关联维修人员上报
@@ -85,7 +85,7 @@
{/if} - {if $ticket.views} + {if $ticket.views && sizeof($ticket.views) > 0}
核验信息
@@ -164,7 +164,7 @@
{/if} - {if $ticket.repair_process} + {if $ticket.repair_process && sizeof($ticket.repair_process) > 0}
@@ -192,7 +192,7 @@
{/if} - {if $ticket.repairs} + {if $ticket.repairs && sizeof($ticket.repairs) > 0}
核验信息
@@ -247,7 +247,7 @@
{/if} - {if $ticket.verify_process} + {if $ticket.verify_process && sizeof($ticket.verify_process) > 0}
@@ -275,7 +275,7 @@
{/if} - {if $ticket.verifys} + {if $ticket.verifys && sizeof($ticket.verifys) > 0}
验收信息
diff --git a/plugs/think-plugs-ticket/src/view/ticket/form.html b/plugs/think-plugs-ticket/src/view/ticket/form.html index 5e45238..3545013 100644 --- a/plugs/think-plugs-ticket/src/view/ticket/form.html +++ b/plugs/think-plugs-ticket/src/view/ticket/form.html @@ -1,5 +1,12 @@
+
+ +
+ + +
+
diff --git a/plugs/think-plugs-ticket/src/view/ticket/index.html b/plugs/think-plugs-ticket/src/view/ticket/index.html index dab86ec..47f6e1f 100644 --- a/plugs/think-plugs-ticket/src/view/ticket/index.html +++ b/plugs/think-plugs-ticket/src/view/ticket/index.html @@ -87,15 +87,20 @@ return `查看工单`; } } else { - return `创建核验工单`; + return `创建核验工单`; } }}, {field:'status', title:'状态', width:80, templet:function(item){ - if (item.status === 0) { + if (item.status !== 1) { if (!item.views || item.views.length === 0) { return `待核验` } - return `待分配` + const view = item.views[item.views.length - 1]; + if (view.status == 1) { + return `待分配` + } else { + return `待核验完成` + } } else { if (item.state === 2) { return `外部工单` diff --git a/plugs/think-plugs-ticket/src/view/ticket_inter/index.html b/plugs/think-plugs-ticket/src/view/ticket_inter/index.html index d25a5ee..e8ac4ad 100644 --- a/plugs/think-plugs-ticket/src/view/ticket_inter/index.html +++ b/plugs/think-plugs-ticket/src/view/ticket_inter/index.html @@ -82,7 +82,7 @@ return `查看工单`; } } else { - return `创建核验工单`; + return `创建核验工单`; } }}, {field: 'repair', title:'维修情况', width: 100, minWidth:100, templet:function(item){ diff --git a/plugs/think-plugs-ticket/src/view/ticket_outer/index.html b/plugs/think-plugs-ticket/src/view/ticket_outer/index.html index d82c74e..694032f 100644 --- a/plugs/think-plugs-ticket/src/view/ticket_outer/index.html +++ b/plugs/think-plugs-ticket/src/view/ticket_outer/index.html @@ -84,7 +84,7 @@ return `查看工单`; } } else { - return `创建核验工单`; + return `创建核验工单`; } }}, {fixed: 'right', title:'操作', toolbar: '#toolbar', width:200}