diff --git a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
index 04ca546..a8df9eb 100644
--- a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
+++ b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
@@ -26,18 +26,6 @@
{{ statusLabel(task.status) }}
-
-
-
-
-
-
-
-
diff --git a/track-uniapp/src/pages/scan/detail.vue b/track-uniapp/src/pages/scan/detail.vue
index 79fb6a7..09c5917 100644
--- a/track-uniapp/src/pages/scan/detail.vue
+++ b/track-uniapp/src/pages/scan/detail.vue
@@ -326,13 +326,8 @@ export default {
currentUserId: "",
currentUsername: "",
// Picker 数据源
- processOptions: ["备货", "生产", "测试", "维修", "质检", "打包"],
- userOptions: [
- { id: "duxingchen", name: "杜邢宸" },
- { id: "zhangsan", name: "张三" },
- { id: "lisi", name: "李四" },
- { id: "wangwu", name: "王五" },
- ],
+ processOptions: [],
+ userOptions: [],
// 任务操作
actionPopup: { visible: false, type: "", task: null },
actionLoading: false,
@@ -429,6 +424,11 @@ export default {
async loadUsers() {
try {
this.users = await get("/users/", { limit: 200 });
+ // 同步填充 Picker 使用的 userOptions(接口返回 id/username/full_name)
+ this.userOptions = (this.users || []).map(u => ({
+ id: u.username || u.id,
+ name: u.full_name || u.username,
+ }));
} catch { /* 静默 */ }
},
loadCurrentUser() {
@@ -634,9 +634,23 @@ export default {
},
// ---- 任务操作 ----
- handleTaskAction({ task, type, record }) {
+ async handleTaskAction({ task, type, record }) {
if (type === "record") { this.openRecordPopup(task); return; }
if (type === "deleteRecord") { this.doDeleteRecord(record); return; }
+
+ // 转交时异步拉取真实工序和用户数据
+ if (type === "transfer") {
+ uni.showLoading({ title: "加载数据..." });
+ try {
+ if (!this.userOptions.length) await this.loadUsers();
+ if (!this.processOptions.length) {
+ this.processOptions = [...TASK_NAME_OPTIONS];
+ }
+ } finally {
+ uni.hideLoading();
+ }
+ }
+
this.actionPopup = { visible: true, type, task };
this.rejectReason = "";
this.transferForm = { next_task_name: "", assignees: [], selectedUserId: "", warehouse: false, note: "" };