diff --git a/plugs/think-plugs-inspection/src/controller/api/auth/Message.php b/plugs/think-plugs-inspection/src/controller/api/auth/Message.php index c4e0358..4708c7a 100644 --- a/plugs/think-plugs-inspection/src/controller/api/auth/Message.php +++ b/plugs/think-plugs-inspection/src/controller/api/auth/Message.php @@ -20,7 +20,7 @@ class Message extends Auth public function read() { - $message_id = $this->request->post('message_id'); + $message_id = $this->request->post('id'); $message = $this->staff->messages()->where('id', $message_id)->find(); if (empty($message)) { $this->error('消息不存在'); diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php index 1bd18e7..9265976 100644 --- a/plugs/think-plugs-ticket/src/controller/Ticket.php +++ b/plugs/think-plugs-ticket/src/controller/Ticket.php @@ -2,6 +2,7 @@ namespace plugin\ticket\controller; +use app\custom\model\CustomMessage; use plugin\inspection\model\InspectionStaff; use plugin\ticket\model\ApprovalInstance; use plugin\ticket\model\ApprovalProcess; @@ -379,6 +380,8 @@ class Ticket extends Controller 'status'=>0, 'title'=>'您有新的核验工单需要处理', 'content'=>'您有新的核验工单需要处理,请及时处理。', + 'type' => 'TICKET_VIEW', + 'oid' => $view->id, ]); $this->success('创建成功!', $view); } else { @@ -480,6 +483,13 @@ class Ticket extends Controller 'content' => $comment_data['content'], 'result' => "后台用户反馈", ]); + CustomMessage::create([ + 'user_id' => $share->user_id, + 'title' => "随手拍反馈", + 'content' => "您的随手拍有新的回复了,请及时查看。", + 'type' => 'USER_SHARE', + 'oid' => $share->id, + ]); } TicketTicket::mk()->commit(); } catch (\Exception $e) { diff --git a/plugs/think-plugs-ticket/src/controller/TicketInter.php b/plugs/think-plugs-ticket/src/controller/TicketInter.php index 643facf..c761372 100644 --- a/plugs/think-plugs-ticket/src/controller/TicketInter.php +++ b/plugs/think-plugs-ticket/src/controller/TicketInter.php @@ -2,6 +2,7 @@ namespace plugin\ticket\controller; +use app\custom\model\CustomMessage; use plugin\inspection\model\InspectionStaff; use plugin\ticket\model\ApprovalInstance; use plugin\ticket\model\ApprovalProcess; @@ -211,6 +212,7 @@ class TicketInter extends Controller } ApprovalStep::create([ 'instance_id' => $instance->id, + 'title' => $step['title'], 'step_number' => $index, 'approver_type' => $step['approver_type'], 'approver_id' => $approver_id, @@ -267,6 +269,8 @@ class TicketInter extends Controller 'status'=>0, 'title'=>'您有新的维修工单需要处理', 'content'=>'您有新的维修工单需要处理,请及时处理。', + 'type' => 'TICKET_REPAIR', + 'oid' => $view->id, ]); $ticket->kj_user_id = $instance_data['kj_user_id']; $this->success('创建成功!', $view); @@ -446,6 +450,13 @@ class TicketInter extends Controller 'content' => $comment_data['content'], 'result' => "后台用户反馈", ]); + CustomMessage::create([ + 'user_id' => $share->user_id, + 'title' => "随手拍反馈", + 'content' => "您的随手拍有新的回复了,请及时查看。", + 'type' => 'USER_SHARE', + 'oid' => $share->id, + ]); } TicketTicket::mk()->commit(); } catch (\Exception $e) { diff --git a/plugs/think-plugs-ticket/src/controller/TicketOuter.php b/plugs/think-plugs-ticket/src/controller/TicketOuter.php index 607efc6..ff07a94 100644 --- a/plugs/think-plugs-ticket/src/controller/TicketOuter.php +++ b/plugs/think-plugs-ticket/src/controller/TicketOuter.php @@ -2,6 +2,7 @@ namespace plugin\ticket\controller; +use app\custom\model\CustomMessage; use PhpOffice\PhpSpreadsheet\IOFactory; use plugin\inspection\model\InspectionStaff; use plugin\ticket\model\ApprovalInstance; @@ -186,6 +187,13 @@ class TicketOuter extends Controller 'content' => $comment_data['content'], 'result' => "后台用户反馈", ]); + CustomMessage::create([ + 'user_id' => $share->user_id, + 'title' => "随手拍反馈", + 'content' => "您的随手拍有新的回复了,请及时查看。", + 'type' => 'USER_SHARE', + 'oid' => $share->id, + ]); } TicketTicket::mk()->commit(); } catch (\Exception $e) { diff --git a/plugs/think-plugs-ticket/src/controller/UserShare.php b/plugs/think-plugs-ticket/src/controller/UserShare.php index a2230db..85dee43 100644 --- a/plugs/think-plugs-ticket/src/controller/UserShare.php +++ b/plugs/think-plugs-ticket/src/controller/UserShare.php @@ -2,6 +2,7 @@ namespace plugin\ticket\controller; +use app\custom\model\CustomMessage; use plugin\points_mall\service\UserPointService; use plugin\ticket\model\TicketCommonReply; use plugin\ticket\model\TicketTicket; @@ -131,6 +132,13 @@ class UserShare extends Controller 'content' => $basic_data['content'], 'result' => $result, ]); + CustomMessage::create([ + 'user_id' => $share->user_id, + 'title' => "随手拍反馈", + 'content' => "您的随手拍有新的回复了,请及时查看。", + 'type' => 'USER_SHARE', + 'oid' => $share->id, + ]); $this->success('处理成功!'); } diff --git a/plugs/think-plugs-ticket/src/view/approval/form.html b/plugs/think-plugs-ticket/src/view/approval/form.html index 484f82d..296d372 100644 --- a/plugs/think-plugs-ticket/src/view/approval/form.html +++ b/plugs/think-plugs-ticket/src/view/approval/form.html @@ -47,7 +47,7 @@ {{# } else { }} @@ -102,6 +102,8 @@ $(function () { if (obj.event === 'remove') { obj.del(); } + const currData = table.cache['processStepTable'] || []; + $('input[name="steps"]').val(JSON.stringify(currData)) }); table.on('edit(processStepTable)', function (obj) { const currData = table.cache['processStepTable'] || []; @@ -128,6 +130,7 @@ $(function () { table.reload('processStepTable', { data: currData }); + $('input[name="steps"]').val(JSON.stringify(currData)) }); }); 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 052682c..f3643e3 100644 --- a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html +++ b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html @@ -1,4 +1,4 @@ -
+
{/if}
- \ No newline at end of file + + \ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/ticket/index.html b/plugs/think-plugs-ticket/src/view/ticket/index.html index f2bc948..2391c6f 100644 --- a/plugs/think-plugs-ticket/src/view/ticket/index.html +++ b/plugs/think-plugs-ticket/src/view/ticket/index.html @@ -32,7 +32,7 @@ {{# } else if (d.views && d.views.length > 0) { }} 查看核验工单 - {{# if (view.status == 1) { }} + {{# if (d.views[d.views.length - 1].status == 1) { }} 分配 diff --git a/plugs/think-plugs-ticket/src/view/ticket_inter/repair_ticket_create.html b/plugs/think-plugs-ticket/src/view/ticket_inter/repair_ticket_create.html index 5627ce7..88312b9 100644 --- a/plugs/think-plugs-ticket/src/view/ticket_inter/repair_ticket_create.html +++ b/plugs/think-plugs-ticket/src/view/ticket_inter/repair_ticket_create.html @@ -12,17 +12,6 @@ -
- -
- -
-