袁伟杰:V2.0.004 ERP日期渲染问题

This commit is contained in:
yuan
2026-05-15 15:00:41 +08:00
parent 7859af83b2
commit eac6df3207
25 changed files with 75 additions and 123 deletions

View File

@@ -104,6 +104,7 @@ import { onMounted, ref } from 'vue'
import { useToast } from 'wot-design-uni'
import { deleteStockLoss, getStockLoss, updateStockLossStatus } from '@/api/erp/stock-loss'
import { useAccess } from '@/hooks/useAccess'
import { formatDate as formatDateValue } from '@/utils/date'
import { navigateBackPlus } from '@/utils'
const props = defineProps<{
@@ -134,9 +135,8 @@ function formatPrice(price?: number) {
}
/** 格式化日期 */
function formatDate(dateStr?: string) {
if (!dateStr) return '-'
return dateStr.substring(0, 10)
function formatDate(dateStr?: string | number | Date) {
return formatDateValue(dateStr) || '-'
}
/** 返回上一页 */