('/ConsumptionChangeRequests/my')
diff --git a/src/frontend/src/views/allocations/ChangeRequestList.vue b/src/frontend/src/views/allocations/ChangeRequestList.vue
index 4027293..f8bcb75 100644
--- a/src/frontend/src/views/allocations/ChangeRequestList.vue
+++ b/src/frontend/src/views/allocations/ChangeRequestList.vue
@@ -9,6 +9,7 @@
待处理
+ 已处理
我的申请
@@ -68,6 +69,57 @@
+
+
+
+
+
+
+ {{ formatDate(row.requestedAt) }}
+
+
+
+
+ {{ row.requestedByUnitName }}
+
+
+
+
+
+ {{ row.requestType === 'Delete' ? '删除' : '修改' }}
+
+
+
+
+
+ {{ row.consumptionReport?.materialName || '-' }}
+
+
+
+
+ {{ row.reason }}
+
+
+
+
+
+ {{ getStatusText(row.status) }}
+
+
+
+
+
+ {{ row.processedAt ? formatDate(row.processedAt) : '-' }}
+
+
+
+
+ {{ row.processComments || '-' }}
+
+
+
+
+
@@ -188,8 +240,9 @@ import { changeRequestsApi, type ChangeRequest } from '@/api'
const loading = ref(false)
const processing = ref(false)
-const viewMode = ref<'pending' | 'my'>('pending')
+const viewMode = ref<'pending' | 'processed' | 'my'>('pending')
const pendingRequests = ref([])
+const processedRequests = ref([])
const myRequests = ref([])
const rejectDialogVisible = ref(false)
@@ -228,6 +281,14 @@ async function loadPendingRequests() {
}
}
+async function loadProcessedRequests() {
+ try {
+ processedRequests.value = await changeRequestsApi.getProcessed()
+ } catch (error: any) {
+ console.error('加载已处理申请失败', error)
+ }
+}
+
async function loadMyRequests() {
try {
myRequests.value = await changeRequestsApi.getMy()
@@ -239,7 +300,7 @@ async function loadMyRequests() {
async function loadData() {
loading.value = true
try {
- await Promise.all([loadPendingRequests(), loadMyRequests()])
+ await Promise.all([loadPendingRequests(), loadProcessedRequests(), loadMyRequests()])
} finally {
loading.value = false
}