From 6d66110495e07bc99c6fab50c97f4e8bf198597b Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Tue, 18 Mar 2025 14:17:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
plugs/think-plugs-ticket/src/controller/Ticket.php | 11 +++++++++--
plugs/think-plugs-ticket/src/view/ticket/index.html | 2 +-
plugs/think-plugs-ticket/src/view/ticket/my.html | 4 ----
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php
index 36ff137..2d695b6 100644
--- a/plugs/think-plugs-ticket/src/controller/Ticket.php
+++ b/plugs/think-plugs-ticket/src/controller/Ticket.php
@@ -150,7 +150,6 @@ class Ticket extends Controller
{
$this->title = "工单分配";
if ($this->request->isPost()) {
- $this->_applyFormToken();
// 提交
$data = $this->_vali([
'id.require' => '请指定工单ID!',
@@ -169,6 +168,14 @@ class Ticket extends Controller
// 外部
$ticket->state = 2;
}
+ if ($ticket->fz_user_id) {
+ $staff = InspectionStaff::query()->find($ticket->fz_user_id);
+ $staff->messages()->save([
+ 'title' => "您有新的工单待处理",
+ 'content' => "您有新的工单待处理,请及时处理。",
+ ]);
+ }
+ $ticket->status = 1;
$ticket->save();
$this->success('工单分配成功!');
} else {
@@ -360,7 +367,7 @@ class Ticket extends Controller
$query->like(['title|content|contact_name|ticket_address|contact_phone#keyword'])
->dateBetween(['create_at'])
->equal(['status', 'type_id']);
- $query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0]))
+ $query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0])->field("oid")->select())
->append(['imgs_arr', 'source_type_name', 'status_text', 'type_name', 'last_reply'])->with('approval');
});
}
diff --git a/plugs/think-plugs-ticket/src/view/ticket/index.html b/plugs/think-plugs-ticket/src/view/ticket/index.html
index d13dd72..1dfce00 100644
--- a/plugs/think-plugs-ticket/src/view/ticket/index.html
+++ b/plugs/think-plugs-ticket/src/view/ticket/index.html
@@ -1,7 +1,7 @@
{extend name="table"}
{block name="button"}
-
+
diff --git a/plugs/think-plugs-ticket/src/view/ticket/my.html b/plugs/think-plugs-ticket/src/view/ticket/my.html
index 448f835..ea45ff1 100644
--- a/plugs/think-plugs-ticket/src/view/ticket/my.html
+++ b/plugs/think-plugs-ticket/src/view/ticket/my.html
@@ -1,10 +1,6 @@
{extend name="table"}
{block name="button"}
-
-
-
-
{/block}
{block name="content"}