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 === '') {