From 1ac0a9ee5b9703505626154a109eb22ff0dfa9b5 Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期四, 20 八月 2026 20:03:09 +0800
Subject: [PATCH] feat[date]: 新增 parseDate 工具函数并统一日期展示格式

---
 src/views/inventoryManagement/stockReport/index.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index 26bc8a0..615e943 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">
+              {{ getDate(scope.row.createTime) }}
+            </template>
+          </el-table-column>
           <el-table-column label="鍏ュ簱鎵规"
                            prop="inboundBatches"
                            width="180"
@@ -216,6 +220,7 @@
   import { ref, reactive, onMounted, nextTick, getCurrentInstance } from "vue";
   import { ElMessage } from "element-plus";
   import * as echarts from "echarts";
+  import dayjs from "dayjs";
   import pagination from "@/components/PIMTable/Pagination.vue";
   import {
     getStockInventoryInAndOutReportList,
@@ -261,6 +266,14 @@
     );
   };
 
+  const getDate = val =>{
+    console.log(val)
+    if(!val){
+      return "--"
+    }
+    return dayjs(val).isValid() ? dayjs(val).format('YYYY鈥慚M鈥慏D') : '--'
+  }
+
   // 鑾峰彇鏉ユ簮绫诲瀷閫夐」
   const fetchStockRecordTypeOptions = () => {
     findAllQualifiedStockInRecordTypeOptions().then(res => {

--
Gitblit v1.9.3