From fc62e83f73b4b8ff4714f995da4eafbb7f525d1a Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 18 八月 2026 23:30:10 +0800
Subject: [PATCH] feat(table): 统一表格日期字段展示格式为YYYY-MM-DD

---
 src/views/personnelManagement/socialSecuritySet/index.vue                                    |    2 
 src/views/collaborativeApproval/rulesRegulationsManagement/index.vue                         |    2 
 src/views/basicData/parameterMaintenance/index.vue                                           |    3 +
 src/components/PIMTable/PIMTable.vue                                                         |    5 ++
 src/views/inventoryManagement/stockManagement/Qualified.vue                                  |    8 +++
 src/views/financialManagement/receivable/salesReturn.vue                                     |    2 
 src/views/collaborativeApproval/sealManagement/index.vue                                     |    2 
 src/views/inventoryManagement/dispatchLog/Record.vue                                         |    6 ++
 src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js |    8 ++-
 src/views/productionManagement/productionReporting/index.vue                                 |    1 
 src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue                           |   12 +++--
 src/views/equipmentManagement/ledger/index.vue                                               |    2 
 src/views/inventoryManagement/stockManagement/Record.vue                                     |    6 ++
 src/views/inventoryManagement/stockManagement/Unqualified.vue                                |    8 +++
 src/views/collaborativeApproval/knowledgeBase/index.vue                                      |    1 
 src/views/financialManagement/payable/purchaseReturn.vue                                     |    2 
 src/views/inventoryManagement/receiptManagement/Record.vue                                   |    8 ++-
 src/views/safeProduction/dangerInvestigation/index.vue                                       |    6 ++
 18 files changed, 61 insertions(+), 23 deletions(-)

diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 74615af..0045336 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -112,6 +112,10 @@
             {{ formatters(scope.row[item.prop], item.formatData) }}
           </el-tag>
         </div>
+        <!-- 鏃堕棿绫诲瀷 -->
+        <div v-else-if="item.dataType === 'date'">
+          {{ scope.row[item.prop] ? dayjs(scope.row[item.prop]).format('YYYY-MM-DD') : '' }}
+        </div>
         <!-- 鎸夐挳 -->
         <div v-else-if="item.dataType == 'action'"
              @click.stop>
@@ -204,6 +208,7 @@
   import pagination from "./Pagination.vue";
   import { computed, ref, inject, getCurrentInstance } from "vue";
   import { ElMessage } from "element-plus";
+  import dayjs from "dayjs";
 
   // 鑾峰彇鍏ㄥ眬鐨� uploadHeader
   const { proxy } = getCurrentInstance();
diff --git a/src/views/basicData/parameterMaintenance/index.vue b/src/views/basicData/parameterMaintenance/index.vue
index 38ddd4f..01b604d 100644
--- a/src/views/basicData/parameterMaintenance/index.vue
+++ b/src/views/basicData/parameterMaintenance/index.vue
@@ -302,6 +302,7 @@
     {
       label: "鍒涘缓鏃堕棿",
       prop: "createTime",
+      dataType:"date"
     },
     {
       label: "鎿嶄綔",
@@ -374,7 +375,7 @@
   const formCreateTimeDate = computed({
     get: () => (formData.createTime ? String(formData.createTime).split(" ")[0] : ""),
     set: (value) => {
-      formData.createTime = value ? `${value} ${dayjs().format("HH:mm:ss")}` : "";
+        formData.createTime = value ? dayjs(value).format("YYYY-MM-DD") : "";
     },
   });
   // const productTypes = ref([]);
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index f50d06b..05a1d1c 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -555,6 +555,7 @@
     label: "鍒涘缓鏃堕棿",
     prop: "createTime",
     width: 180,
+    dataType:"date"
   },
   {
     dataType: "action",
diff --git a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
index f7ba9d9..128b7ed 100644
--- a/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
+++ b/src/views/collaborativeApproval/rulesRegulationsManagement/index.vue
@@ -309,7 +309,7 @@
     },
     { label: "鐗堟湰", prop: "version", width: 120 },
     { label: "鍙戝竷浜�", prop: "createUserName", width: 120 },
-    { label: "鍙戝竷鏃堕棿", prop: "createTime", width: 180 },
+    { label: "鍙戝竷鏃堕棿", prop: "createTime", width: 180,dataType: "date" },
     {
       label: "鐘舵��",
       prop: "status",
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index a06f6d5..7be9ef9 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -252,7 +252,7 @@
     formatData: (v) => getSealTypeText(v),
     formatType: () => 'info'
   },
-  { label: '鐢宠鏃堕棿', prop: 'createTime', width: 180 },
+  { label: '鐢宠鏃堕棿', prop: 'createTime', width: 180,dataType: "date" },
   {
     label: '鐘舵��',
     prop: 'status',
diff --git a/src/views/equipmentManagement/ledger/index.vue b/src/views/equipmentManagement/ledger/index.vue
index af10532..0288c3f 100644
--- a/src/views/equipmentManagement/ledger/index.vue
+++ b/src/views/equipmentManagement/ledger/index.vue
@@ -127,7 +127,7 @@
         <el-descriptions-item label="鍚◣鎬讳环">{{ detailData.taxIncludingPriceTotal }}</el-descriptions-item>
         <el-descriptions-item label="绋庣巼(%)">{{ detailData.taxRate }}</el-descriptions-item>
         <el-descriptions-item label="涓嶅惈绋庢�讳环">{{ detailData.unTaxIncludingPriceTotal }}</el-descriptions-item>
-        <el-descriptions-item label="褰曞叆鏃ユ湡">{{ detailData.createTime }}</el-descriptions-item>
+        <el-descriptions-item label="褰曞叆鏃ユ湡">{{ detailData.createTime ? dayjs(detailData.createTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
         <el-descriptions-item label="棰勮杩愯鏃堕棿">{{ detailData.planRuntimeTime ? dayjs(detailData.planRuntimeTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item>
         <el-descriptions-item label="璁惧鍥剧墖" :span="2">
           <div v-if="detailData.storageBlobVOs && detailData.storageBlobVOs.length > 0" style="display: flex; gap: 10px; flex-wrap: wrap;">
diff --git a/src/views/financialManagement/payable/purchaseReturn.vue b/src/views/financialManagement/payable/purchaseReturn.vue
index 4171df2..8d42a2e 100644
--- a/src/views/financialManagement/payable/purchaseReturn.vue
+++ b/src/views/financialManagement/payable/purchaseReturn.vue
@@ -85,7 +85,7 @@
   { label: "閫�璐у崟鍙�", prop: "returnNo", minWidth: "150" },
   { label: "渚涘簲鍟�", prop: "supplierName", minWidth: "180" },
   { label: "鍏宠仈鍏ュ簱鍗曞彿", prop: "inboundBatches", minWidth: "150" },
-  { label: "閫�璐ф棩鏈�", prop: "preparedAt", minWidth: "170" },
+  { label: "閫�璐ф棩鏈�", prop: "preparedAt", minWidth: "170",dataType: "date"},
   {
     label: "閫�娆炬�婚",
     prop: "totalAmount",
diff --git a/src/views/financialManagement/receivable/salesReturn.vue b/src/views/financialManagement/receivable/salesReturn.vue
index afe363c..d6af451 100644
--- a/src/views/financialManagement/receivable/salesReturn.vue
+++ b/src/views/financialManagement/receivable/salesReturn.vue
@@ -77,7 +77,7 @@
   { label: "閫�璐у崟鍙�", prop: "returnNo", minWidth: "150" },
   { label: "瀹㈡埛鍚嶇О", prop: "customerName", minWidth: "180" },
   { label: "鍏宠仈鍙戣揣鍗曞彿", prop: "shippingNo", minWidth: "150" },
-  { label: "閫�璐ф棩鏈�", prop: "makeTime", minWidth: "170" },
+  { label: "閫�璐ф棩鏈�", prop: "makeTime", minWidth: "170",dataType: "date" },
   {
     label: "閫�娆炬�婚",
     prop: "refundAmount",
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 5a056d6..fe05536 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -108,7 +108,11 @@
                          show-overflow-tooltip />
         <el-table-column label="鍑哄簱鏃ユ湡"
                          prop="createTime"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip >
+          <template #default="scope">
+            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column label="浜у搧澶х被"
                          prop="productName"
                          show-overflow-tooltip />
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index 0a01def..07a3029 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -107,9 +107,11 @@
                          prop="inboundBatches"
                          width="200"
                          show-overflow-tooltip />
-        <el-table-column label="鍏ュ簱鏃堕棿"
-                         prop="createTime"
-                         show-overflow-tooltip />
+        <el-table-column label="鍏ュ簱鏃堕棿" show-overflow-tooltip>
+          <template #default="scope">
+            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column label="浜у搧澶х被"
                          prop="productName"
                          show-overflow-tooltip />
diff --git a/src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue b/src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue
index a835ef4..7d66307 100644
--- a/src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue
+++ b/src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue
@@ -50,11 +50,13 @@
             show-overflow-tooltip
           />
           <el-table-column label="澶囨敞" prop="remark" show-overflow-tooltip />
-          <el-table-column
-            label="鏈�杩戞洿鏂版椂闂�"
-            prop="updateTime"
-            show-overflow-tooltip
-          />
+          <el-table-column label="鏈�杩戞洿鏂版椂闂�"
+                           prop="updateTime"
+                           show-overflow-tooltip >
+            <template #default="scope">
+              {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
+            </template>
+          </el-table-column>
           <el-table-column fixed="right" label="鎿嶄綔" min-width="180" align="center">
             <template #default="scope">
               <el-button
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index 4286772..a1f96f4 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -31,7 +31,13 @@
         <el-table-column label="鍐荤粨鏁伴噺" prop="lockedQuantity" show-overflow-tooltip />
         <el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum"  show-overflow-tooltip />
         <el-table-column label="澶囨敞" prop="remark"  show-overflow-tooltip />
-        <el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
+        <el-table-column label="鏈�杩戞洿鏂版椂闂�"
+                         prop="updateTime"
+                         show-overflow-tooltip >
+          <template #default="scope">
+            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column fixed="right" label="鎿嶄綔" min-width="90" align="center">
           <template #default="scope">
             <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">棰嗙敤</el-button>
diff --git a/src/views/inventoryManagement/stockManagement/Record.vue b/src/views/inventoryManagement/stockManagement/Record.vue
index 934ae06..b45dd00 100644
--- a/src/views/inventoryManagement/stockManagement/Record.vue
+++ b/src/views/inventoryManagement/stockManagement/Record.vue
@@ -107,7 +107,11 @@
                          show-overflow-tooltip />
         <el-table-column label="鏈�杩戞洿鏂版椂闂�"
                          prop="updateTime"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip >
+          <template #default="scope">
+            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column fixed="right"
                          label="鎿嶄綔"
                          min-width="80"
diff --git a/src/views/inventoryManagement/stockManagement/Unqualified.vue b/src/views/inventoryManagement/stockManagement/Unqualified.vue
index 55662be..6c36f26 100644
--- a/src/views/inventoryManagement/stockManagement/Unqualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -26,7 +26,13 @@
         <el-table-column label="搴撳瓨鏁伴噺" prop="qualitity" show-overflow-tooltip />
         <el-table-column label="鍐荤粨鏁伴噺" prop="lockedQuantity" show-overflow-tooltip />
         <el-table-column label="澶囨敞" prop="remark"  show-overflow-tooltip />
-        <el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
+        <el-table-column label="鏈�杩戞洿鏂版椂闂�"
+                         prop="updateTime"
+                         show-overflow-tooltip >
+          <template #default="scope">
+            {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column fixed="right" label="鎿嶄綔" min-width="90" align="center">
           <template #default="scope">
             <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">棰嗙敤</el-button>
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js b/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
index 727f896..285309f 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-template/approveTemplateConstants.js
@@ -159,16 +159,18 @@
   if (val == null || val === "") return "";
   if (Array.isArray(val) && val.length >= 3) {
     const [y, m, d, h = 0, min = 0, s = 0] = val;
-    return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss");
+    // return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss");
+      return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD");
+
   }
   if (typeof val === "number") {
     const d = val > 1e12 ? dayjs(val) : dayjs.unix(val);
-    return d.isValid() ? d.format("YYYY-MM-DD HH:mm:ss") : "";
+    return d.isValid() ? d.format("YYYY-MM-DD") : "";
   }
   const s = String(val).trim();
   if (!s) return "";
   const parsed = dayjs(s.includes("T") ? s : s.replace(/-/g, "/"));
-  return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : s;
+  return parsed.isValid() ? parsed.format("YYYY-MM-DD") : s;
 }
 
 export function formatDisplayTime(val) {
diff --git a/src/views/personnelManagement/socialSecuritySet/index.vue b/src/views/personnelManagement/socialSecuritySet/index.vue
index 1f3f104..8329b9c 100644
--- a/src/views/personnelManagement/socialSecuritySet/index.vue
+++ b/src/views/personnelManagement/socialSecuritySet/index.vue
@@ -65,7 +65,7 @@
   { label: "淇濋櫓绫诲瀷", prop: "insuranceTypes", width: 120 },
   { label: "浣跨敤鑼冨洿", prop: "deptNames", width: 120 },
   { label: "澶囨敞", prop: "remark", minWidth: 120 },
-  { label: "鍒涘缓鏃堕棿", prop: "createTime", width: 160 },
+  { label: "鍒涘缓鏃堕棿", prop: "createTime", width: 160,dataType: "date" },
   { label: "鍒涘缓浜�", prop: "createUserName", width: 100 },
   {
     dataType: "action",
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index fa4e163..28edda2 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -236,6 +236,7 @@
       label: "鍒涘缓鏃堕棿",
       prop: "createTime",
       width: 120,
+      dataType: "date"
     },
     {
       dataType: "action",
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index a278058..4caac4e 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -69,7 +69,11 @@
                          show-overflow-tooltip />
         <el-table-column label="涓婃姤鏃堕棿"
                          prop="createTime"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip >
+          <template #default="scope">
+            {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }}
+          </template>
+        </el-table-column>
         <el-table-column label="鏁存敼瀹屾垚鏈熼檺"
                          prop="rectifyTime"
                          width="120"

--
Gitblit v1.9.3