From 58cb9a23ef07fa49a2785bf6d2c60c958ca15ed9 Mon Sep 17 00:00:00 2001 From: duxingchen Date: Thu, 6 Aug 2026 12:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=92=A4=E5=9B=9E:=20transfe?= =?UTF-8?q?r=E6=96=B0=E4=BB=BB=E5=8A=A1parent=5Ftask=5Fid=3Dtask.id(?= =?UTF-8?q?=E6=BA=AF=E6=BA=90=E9=93=BE)=20+=20canRecall=E6=94=BE=E5=AE=BD(?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=97=A7=E6=95=B0=E6=8D=AE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/services/task_service.py | 2 +- track-uniapp/src/pages/scan/components/WorkspaceArea.vue | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/app/services/task_service.py b/backend/app/services/task_service.py index bb3add2..feaccf9 100644 --- a/backend/app/services/task_service.py +++ b/backend/app/services/task_service.py @@ -660,7 +660,7 @@ async def transfer_task( elif is_child_task: new_parent_task_id = task.parent_task_id else: - new_parent_task_id = None + new_parent_task_id = task.id new_task = Task( product_id=task.product_id, diff --git a/track-uniapp/src/pages/scan/components/WorkspaceArea.vue b/track-uniapp/src/pages/scan/components/WorkspaceArea.vue index e9a11e6..74120ab 100644 --- a/track-uniapp/src/pages/scan/components/WorkspaceArea.vue +++ b/track-uniapp/src/pages/scan/components/WorkspaceArea.vue @@ -146,10 +146,8 @@ export default { canRecall() { if (!this.lockedTask || this.lockedTask.status !== 'PENDING') return false; if (this.isAssignee) return false; - if (!this.lockedTask.parent_task_id) return false; - const parent = this.taskMap[this.lockedTask.parent_task_id]; - if (!parent) return false; - return parent.assignee_id == this.currentUserId || parent.assignee_id == this.currentUsername; + // 非接收人即可撤回(后端会校验权限);parent_task_id 为空时也放开(旧数据兼容) + return true; }, branchLabelsMap() { const map = {};