diff --git a/track-uniapp/src/pages/scan/detail.vue b/track-uniapp/src/pages/scan/detail.vue index 32256a9..f6bd0c7 100644 --- a/track-uniapp/src/pages/scan/detail.vue +++ b/track-uniapp/src/pages/scan/detail.vue @@ -189,7 +189,7 @@ export default { }, computed: { userLabels() { return this.users.map(u => `${u.full_name} (${u.username})`); }, - canDeleteImage() { if (!this.recordPopup.task) return true; if (!this.currentUser) return true; return this.currentUser.username === this.recordPopup.task.assignee_id; }, + canDeleteImage() { if (!this.recordPopup.task) return true; if (!this.currentUser) return true; const frozen = ["COMPLETED","REJECTED","ARCHIVED","CANCELED"]; if (frozen.includes(this.recordPopup.task.status)) return false; return this.currentUser.username === this.recordPopup.task.assignee_id; }, transferUserName() { const u = this.userOptions.find(u => u.id === this.transferForm.selectedUserId); return u ? u.name : ""; }, spawnUserName() { const u = this.userOptions.find(u => u.id === this.spawnForm.assignee_id); return u ? u.name : ""; }, userGridOptions() { return (this.userOptions || []).map(u => ({ id: u.id, name: u.name })); }, diff --git a/track-uniapp/src/pages/scan/records.vue b/track-uniapp/src/pages/scan/records.vue index 3b4049f..d871fea 100644 --- a/track-uniapp/src/pages/scan/records.vue +++ b/track-uniapp/src/pages/scan/records.vue @@ -67,6 +67,9 @@ export default { computed: { canEdit() { if (!this.currentUser || !this.task) return false; + // 已完成/已驳回/已入库/已撤回 的任务禁止编辑 + const frozen = ["COMPLETED", "REJECTED", "ARCHIVED", "CANCELED"]; + if (frozen.includes(this.task.status)) return false; return ( this.currentUser.id == this.task.assignee_id || this.currentUser.username == this.task.assignee_id