From 3ce715a4e66955eac86dcd2f5c8afcfdf8becb6d Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 29 十月 2026 16:46:47 +0800
Subject: [PATCH] Merge origin/dev_项目管理 into dev_项目管理

---
 src/main.js |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/main.js b/src/main.js
index 025ff14..d0282b7 100644
--- a/src/main.js
+++ b/src/main.js
@@ -58,6 +58,7 @@
 import PageHeader from "@/components/PageHeader/index.vue";
 
 import { getToken } from "@/utils/auth";
+import { toDateOnly } from "@/utils/dateDisplay";
 import {
   calculateTaxExclusiveTotalPrice,
   summarizeTable,
@@ -80,6 +81,7 @@
 app.config.globalProperties.addDateRange = addDateRange;
 app.config.globalProperties.selectDictLabel = selectDictLabel;
 app.config.globalProperties.selectDictLabels = selectDictLabels;
+app.config.globalProperties.formatDateOnly = toDateOnly;
 app.config.globalProperties.javaApi = __BASE_API__;
 app.config.globalProperties.HaveJson = (val) => {
   return JSON.parse(JSON.stringify(val));
@@ -116,4 +118,19 @@
 });
 app._context.components.ElDialog.props.closeOnClickModal.default = false;
 
+// 鍒楄〃鏃堕棿缁熶竴鍙睍绀哄勾鏈堟棩锛氭湭鍗曠嫭閰嶇疆 formatter 鐨勮〃鏍煎垪璧拌繖閲�
+const tableColumnFormatter =
+  app._context.components.ElTableColumn?.props?.formatter;
+if (tableColumnFormatter) {
+  const formatCell = (row, column, cellValue) => toDateOnly(cellValue);
+  if (typeof tableColumnFormatter === "function") {
+    app._context.components.ElTableColumn.props.formatter = {
+      type: Function,
+      default: formatCell,
+    };
+  } else {
+    tableColumnFormatter.default = formatCell;
+  }
+}
+
 app.mount("#app");

--
Gitblit v1.9.3