From f63eb4ad70844de4b92dfb3a61dd4bf6cdb7d6bb Mon Sep 17 00:00:00 2001 From: 18631081161 <2088094923@qq.com> Date: Fri, 16 Jan 2026 15:15:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implementations/AllocationService.cs | 2 +- src/frontend/src/views/allocations/AllocationList.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs b/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs index 359abe9..18ba10d 100644 --- a/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs +++ b/src/MilitaryTrainingManagement/Services/Implementations/AllocationService.cs @@ -163,7 +163,7 @@ public class AllocationService : IAllocationService Unit = unit, TotalQuota = totalQuota, CreatedByUnitId = createdByUnitId, - CreatedAt = DateTime.UtcNow + CreatedAt = DateTime.Now }; _context.MaterialAllocations.Add(allocation); diff --git a/src/frontend/src/views/allocations/AllocationList.vue b/src/frontend/src/views/allocations/AllocationList.vue index 8f41aa6..32105de 100644 --- a/src/frontend/src/views/allocations/AllocationList.vue +++ b/src/frontend/src/views/allocations/AllocationList.vue @@ -436,6 +436,7 @@ const filteredAllocations = computed(() => { }) function formatDate(dateStr: string): string { + if (!dateStr) return '-' const date = new Date(dateStr) const year = date.getFullYear() const month = String(date.getMonth() + 1).padStart(2, '0')