From b088d25df9af98e40420ca6b3c23d5cbc998b28e Mon Sep 17 00:00:00 2001
From: duxingchen
Date: Wed, 9 Sep 2026 17:29:40 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BB=BB=E5=8A=A1=E6=A0=91/=E6=B5=81?=
=?UTF-8?q?=E8=BD=AC=E5=8D=A1=E5=B1=95=E7=A4=BA=E9=A9=B3=E5=9B=9E=E5=8E=9F?=
=?UTF-8?q?=E5=9B=A0=E4=B8=8E=E8=BF=94=E5=B7=A5=E5=A4=87=E6=B3=A8(?=
=?UTF-8?q?=E7=BD=91=E9=A1=B5SlimCard,=E7=A7=BB=E5=8A=A8=E7=AB=AFFlowCard/?=
=?UTF-8?q?SwipeCards)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/TaskTree/TaskFlowView.tsx | 7 +++++++
track-uniapp/src/pages/scan/components/FlowCard.vue | 9 +++++++++
.../src/pages/scan/components/TaskSwipeCards.vue | 3 +++
3 files changed, 19 insertions(+)
diff --git a/frontend/src/components/TaskTree/TaskFlowView.tsx b/frontend/src/components/TaskTree/TaskFlowView.tsx
index 2c69ad8..5bf2639 100644
--- a/frontend/src/components/TaskTree/TaskFlowView.tsx
+++ b/frontend/src/components/TaskTree/TaskFlowView.tsx
@@ -146,6 +146,13 @@ const SlimCard = memo(function SlimCard({
⏰ {fmtTime(task.created_at)}
{task.completed_at ? ` → ${fmtTime(task.completed_at)}` : " → 至今"}
+ {/* 驳回/返工原因:原 REJECTED 取 reject_reason;返工节点取含“驳回/返工”的备注 */}
+ {(() => {
+ const rj = task.reject_reason;
+ const rm = task.remark;
+ const txt = rj ? `❌ 驳回: ${rj}` : (rm && /驳回|返工/.test(rm) ? rm : null);
+ return txt ? {txt}
: null;
+ })()}
{legacy && 源自: {assigneeName || (findParent(task)?.assignee_id) || "历史任务"}
}
{isNestedSpawn && 协助: {findParent(task)?.assignee_id || "—"}
}
{/* 操作按钮 */}
diff --git a/track-uniapp/src/pages/scan/components/FlowCard.vue b/track-uniapp/src/pages/scan/components/FlowCard.vue
index 96e6d6f..709eb77 100644
--- a/track-uniapp/src/pages/scan/components/FlowCard.vue
+++ b/track-uniapp/src/pages/scan/components/FlowCard.vue
@@ -16,6 +16,8 @@
⏰ {{ fmtDate(node.created_at) }}{{ node.completed_at ? '→' + fmtDate(node.completed_at) : '→至今' }}
+
+ ❌ {{ reasonText }}
查看操作日志 ({{ node.records.length }}条) ›
@@ -34,6 +36,13 @@ export default {
},
emits: ["viewRecords"],
computed: {
+ // 驳回/返工原因:原 REJECTED 有 reject_reason;返工节点原因在 remark(形如“返工任务(驳回自…原因…)”)
+ reasonText() {
+ const n = this.node || {};
+ if (n.reject_reason) return `驳回: ${n.reject_reason}`;
+ const rm = n.remark;
+ return rm && (rm.indexOf("驳回") >= 0 || rm.indexOf("返工") >= 0) ? rm : "";
+ },
isMainNode() {
return !this.node.parent_task_id
|| this.node.task_type === "TRANSFER"
diff --git a/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue b/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue
index 589c6f9..11c6d50 100644
--- a/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue
+++ b/track-uniapp/src/pages/scan/components/TaskSwipeCards.vue
@@ -41,6 +41,9 @@
{{ card.task_name }}
+
+ ❌ 驳回: {{ card.reject_reason }}
+