From 537df5f5eabbb9c9dd0fd11d4ab07003f58640f9 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 12 八月 2026 11:24:38 +0800
Subject: [PATCH] fix: 日期格式化

---
 src/views/productionManagement/productionTraceability/index.vue |    2 +-
 src/views/inventoryManagement/stockReport/index.vue             |   11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index 26bc8a0..ad294e2 100644
--- a/src/views/inventoryManagement/stockReport/index.vue
+++ b/src/views/inventoryManagement/stockReport/index.vue
@@ -152,7 +152,11 @@
                            prop="createTime"
                            width="200"
                            show-overflow-tooltip
-                           v-if="searchForm.reportType !== 'inout'" />
+                           v-if="searchForm.reportType !== 'inout'">
+            <template #default="scope">
+              {{ formatDate(scope.row.createTime) }}
+            </template>
+          </el-table-column>
           <el-table-column label="鍏ュ簱鎵规"
                            prop="inboundBatches"
                            width="180"
@@ -252,6 +256,11 @@
 
   const total = ref(0);
 
+  const formatDate = value => {
+    if (!value) return "";
+    return String(value).slice(0, 10);
+  };
+
   const stockRecordTypeOptions = ref([]);
 
   const getRecordType = recordType => {
diff --git a/src/views/productionManagement/productionTraceability/index.vue b/src/views/productionManagement/productionTraceability/index.vue
index a94bc89..58fe2de 100644
--- a/src/views/productionManagement/productionTraceability/index.vue
+++ b/src/views/productionManagement/productionTraceability/index.vue
@@ -44,7 +44,7 @@
             </el-tag>
           </el-descriptions-item>
           <el-descriptions-item label="瀹㈡埛鍚嶇О">{{ rowData.productionOrderDto?.customerName || '-' }}</el-descriptions-item>
-          <el-descriptions-item label="寮�濮嬫棩鏈�">{{ parseTime(rowData.productionOrderDto?.startTime) || '-' }}</el-descriptions-item>
+          <el-descriptions-item label="寮�濮嬫棩鏈�">{{ parseTime(rowData.productionOrderDto?.startTime, '{y}-{m}-{d}') || '-' }}</el-descriptions-item>
           <el-descriptions-item label="瀹屾垚杩涘害">
             <el-progress :percentage="rowData.productionOrderDto?.completionStatus>=100?100:rowData.productionOrderDto?.completionStatus"
                          :color="customColors(rowData.productionOrderDto?.completionStatus)"

--
Gitblit v1.9.3