From 3b02c870676f57280f3f00d365eca6a348594c22 Mon Sep 17 00:00:00 2001 From: duxingchen Date: Wed, 5 Aug 2026 15:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=9E=84:=20flex=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E6=92=91=E6=BB=A1=E5=85=A8=E5=B1=8F=20+=20=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8C=BA=E4=B8=8B=E6=B2=89=E5=88=B0=E5=AD=90=E6=A0=91=E5=BA=95?= =?UTF-8?q?=E9=83=A8=20+=20=E5=BA=95=E9=83=A8Footer=E9=92=89=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/scan/components/TaskTreeNode.vue | 67 +++++++++---------- track-uniapp/src/pages/scan/detail.vue | 66 +++++++++++++++--- 2 files changed, 88 insertions(+), 45 deletions(-) diff --git a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue index 13b33fb..d471bbe 100644 --- a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue +++ b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue @@ -4,7 +4,7 @@ - + ⚠返工 @@ -15,39 +15,7 @@ 负责人: {{ task.assignee_id }} 驳回: {{ task.reject_reason }} - - - - - - 📋 - 查看全部记录 ({{ task.records.length }}) - - - - - - {{ formatTime(task.records[0].created_at) }} - - ✏️ - 🗑️ - - - {{ task.records[0].remark }} - - - - - - {{ statusLabel(task.status) }} @@ -64,7 +32,7 @@ @tap.stop="$emit('action', { task, type: 'record' })">📝 记录/拍照 - + + + + + + + 📋 + 查看全部记录 ({{ task.records.length }}) + + + + + + {{ formatTime(task.records[0].created_at) }} + + ✏️ + 🗑️ + + + {{ task.records[0].remark }} + + + + + diff --git a/track-uniapp/src/pages/scan/detail.vue b/track-uniapp/src/pages/scan/detail.vue index 5cb3f4c..79fb6a7 100644 --- a/track-uniapp/src/pages/scan/detail.vue +++ b/track-uniapp/src/pages/scan/detail.vue @@ -1,5 +1,5 @@ @@ -335,6 +353,21 @@ export default { const u = this.userOptions.find(u => u.id === this.transferForm.selectedUserId); return u ? u.name : ""; }, + activeTask() { + // 查找树中第一个 WIP 或 PENDING 任务作为底部 Footer 的操作目标 + const findActive = (tasks) => { + if (!tasks) return null; + for (const t of tasks) { + if (t.status === 'WIP' || t.status === 'PENDING') return t; + if (t.child_tasks && t.child_tasks.length) { + const found = findActive(t.child_tasks); + if (found) return found; + } + } + return null; + }; + return this.product ? findActive(this.product.task_tree) : null; + }, }, onLoad(options) { this.loadUsers(); @@ -661,7 +694,7 @@ export default {