From 86738c1c4577495d7b5447ef499e4b178098f8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Tue, 10 Nov 2026 16:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=98=E7=9B=98=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/palletLocationMismatch54.vue | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/views/modules/haianWarehouse/warehouse/palletLocationMismatch54.vue b/src/views/modules/haianWarehouse/warehouse/palletLocationMismatch54.vue index a1fd939..bd270b9 100644 --- a/src/views/modules/haianWarehouse/warehouse/palletLocationMismatch54.vue +++ b/src/views/modules/haianWarehouse/warehouse/palletLocationMismatch54.vue @@ -66,6 +66,15 @@ + + + + + + + + + @@ -73,7 +82,6 @@ - @@ -124,6 +132,22 @@ export default { this.clearRelocateRefreshTimers() }, methods: { + // 接收日期、失效日期只显示自然日。后端已按yyyy-MM-dd返回,空值留空 - rqrq + formatStockDate (value) { + if (!value) { + return '' + } + if (typeof value === 'string') { + return value.length >= 10 ? value.substring(0, 10) : value + } + const date = new Date(value) + if (Number.isNaN(date.getTime())) { + return '' + } + const month = String(date.getMonth() + 1).padStart(2, '0') + const day = String(date.getDate()).padStart(2, '0') + return date.getFullYear() + '-' + month + '-' + day + }, // 数量去尾零,空值显示0 - rqrq formatQty (qty) { if (qty === null || qty === undefined || qty === '') {