From cf7bd4b1d0dcc40d81d48dafaebb9e906d1d3fa5 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Thu, 24 Jul 2025 15:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E9=AA=8C=E8=AE=B0=E5=BD=95=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/repair/repairManage/component/view.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/material/repair/repairManage/component/view.vue b/src/views/material/repair/repairManage/component/view.vue index 20cd25c8..b8dc49cc 100644 --- a/src/views/material/repair/repairManage/component/view.vue +++ b/src/views/material/repair/repairManage/component/view.vue @@ -215,7 +215,7 @@
-
{{ this.printInfo.createTime }}
+
{{ formatDate(printInfo.createTime) }}
{{ this.printInfo.repairer }}
{{ this.printInfo.userName }}
@@ -430,6 +430,17 @@ export default { } }, + // 定义格式化日期的方法 + formatDate(dateStr) { + if (!dateStr) return ''; + const date = new Date(dateStr); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }, + + // 打印 print() { printJS({