袁伟杰:V2.0.004 ERP日期渲染问题
This commit is contained in:
@@ -182,6 +182,7 @@ import {
|
||||
updatePurchaseRequisitionStatus,
|
||||
} from '@/api/erp/purchase-requisition'
|
||||
import { useAccess } from '@/hooks/useAccess'
|
||||
import { formatDate as formatDateValue } from '@/utils/date'
|
||||
import { navigateBackPlus } from '@/utils'
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -276,15 +277,13 @@ 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) || '-'
|
||||
}
|
||||
|
||||
/** 格式化日期时间 */
|
||||
function formatDateTime(dateStr?: string) {
|
||||
if (!dateStr) return '-'
|
||||
return dateStr.substring(0, 16).replace('T', ' ')
|
||||
function formatDateTime(dateStr?: string | number | Date) {
|
||||
return formatDateValue(dateStr, 'YYYY-MM-DD HH:mm') || '-'
|
||||
}
|
||||
|
||||
/** 返回上一页 */
|
||||
|
||||
Reference in New Issue
Block a user