diff --git a/track-uniapp/src/pages.json b/track-uniapp/src/pages.json
index 9baf101..07d4f7c 100644
--- a/track-uniapp/src/pages.json
+++ b/track-uniapp/src/pages.json
@@ -1,11 +1,10 @@
{
"pages": [
{
- "path": "pages/scan/detail",
+ "path": "pages/login/login",
"style": {
- "navigationBarTitleText": "产品详情",
- "navigationBarBackgroundColor": "#2563EB",
- "navigationBarTextStyle": "white"
+ "navigationBarTitleText": "登录",
+ "navigationStyle": "custom"
}
},
{
@@ -16,6 +15,22 @@
"navigationBarTextStyle": "white"
}
},
+ {
+ "path": "pages/scan/records",
+ "style": {
+ "navigationBarTitleText": "任务历史记录",
+ "navigationBarBackgroundColor": "#2563EB",
+ "navigationBarTextStyle": "white"
+ }
+ },
+ {
+ "path": "pages/scan/detail",
+ "style": {
+ "navigationBarTitleText": "产品详情",
+ "navigationBarBackgroundColor": "#2563EB",
+ "navigationBarTextStyle": "white"
+ }
+ },
{
"path": "pages/tasks/index",
"style": {
diff --git a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
index 03eb217..13b33fb 100644
--- a/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
+++ b/track-uniapp/src/pages/scan/components/TaskTreeNode.vue
@@ -16,26 +16,32 @@
驳回: {{ task.reject_reason }}
-
+
-
-
+
+
+ 📋
+ 查看全部记录 ({{ task.records.length }})
+ ›
+
+
+
- {{ formatTime(rec.created_at) }}
+ {{ formatTime(task.records[0].created_at) }}
- ✏️
- 🗑️
+ ✏️
+ 🗑️
-
-
+
+
@@ -70,6 +76,7 @@
:isLast="idx === task.child_tasks.length - 1"
@action="(e) => $emit('action', e)"
@editRecord="(e) => $emit('editRecord', e)"
+ @viewRecords="(t) => $emit('viewRecords', t)"
/>
@@ -86,7 +93,7 @@ export default {
currentUserId: { type: [String, Number], default: "" },
currentUsername: { type: String, default: "" },
},
- emits: ["action", "editRecord"],
+ emits: ["action", "editRecord", "viewRecords"],
computed: {
canEditRecord() {
// 双重宽松匹配:assignee_id 可能是数字ID或用户名字符串
@@ -167,7 +174,17 @@ export default {
.reject-reason { color: #ef4444; }
/* 进度记录 */
-.records-area { background-color: #f9f9f9; padding: 12rpx 16rpx; border-radius: 10rpx; margin-top: 16rpx; margin-bottom: 6rpx; }
+.records-area { background-color: #f9f9f9; padding: 0; border-radius: 10rpx; margin-top: 16rpx; margin-bottom: 6rpx; overflow: hidden; }
+.records-bar {
+ display: flex; align-items: center; gap: 8rpx;
+ padding: 16rpx 20rpx;
+ background: linear-gradient(135deg, #eff6ff, #dbeafe);
+ border-bottom: 1px solid #bfdbfe;
+}
+.records-bar-icon { font-size: 28rpx; }
+.records-bar-text { flex: 1; font-size: 26rpx; font-weight: 700; color: #2563eb; }
+.records-bar-arrow { font-size: 32rpx; color: #93c5fd; font-weight: 700; }
+.record-item { padding: 12rpx 16rpx; }
.record-item { padding: 8rpx 0; border-bottom: 1px dashed #e5e7eb; }
.record-item:last-child { border-bottom: none; }
.record-top { display: flex; align-items: center; justify-content: space-between; }
diff --git a/track-uniapp/src/pages/scan/detail.vue b/track-uniapp/src/pages/scan/detail.vue
index 7a5c21f..5cb3f4c 100644
--- a/track-uniapp/src/pages/scan/detail.vue
+++ b/track-uniapp/src/pages/scan/detail.vue
@@ -54,34 +54,37 @@
-
+
-
+
-
-
- 📋
- 该产品暂无流转任务
-
-
+
+
+
+ 📋
+ 该产品暂无流转任务
+
+
-
-
+
+
+
@@ -605,6 +608,9 @@ export default {
this.rejectReason = "";
this.transferForm = { next_task_name: "", assignees: [], selectedUserId: "", warehouse: false, note: "" };
},
+ handleViewRecords(task) {
+ uni.navigateTo({ url: `/pages/scan/records?taskId=${task.id}` });
+ },
closeActionPopup() { this.actionPopup = { visible: false, type: "", task: null }; },
async doReceive() {
@@ -655,7 +661,7 @@ export default {