From 6141f7a7e61dacd8b80056b564170415d7fff31a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 17 十月 2026 20:05:58 +0800
Subject: [PATCH] fix(ui): 列表时间统一只展示年月日
---
src/views/hrm/salary/payment/data.ts | 2 +-
src/views/wms/order/check/index.vue | 6 +++---
src/views/wms/order/movement/index.vue | 6 +++---
src/views/hrm/leave/data.ts | 4 ++--
src/views/srm/supplierEvaluation/data.ts | 2 +-
src/views/srm/supplierCertificate/data.ts | 2 +-
src/views/bi/decision/alert-center/index.vue | 2 +-
src/views/infra/job/logger/data.ts | 4 ++--
src/views/srm/supplier/data.ts | 2 +-
src/views/wms/order/receipt/index.vue | 6 +++---
src/views/srm/tender/data.ts | 4 ++--
src/views/wms/order/shipment/index.vue | 6 +++---
src/views/mes/workbench/components/tabs/RecordParamTab.vue | 3 ++-
src/views/srm/supplierApply/data.ts | 2 +-
src/views/mes/tm/tool/data.ts | 4 ++--
src/packages/effects/plugins/src/vxe-table/extends.ts | 5 +++--
16 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/src/packages/effects/plugins/src/vxe-table/extends.ts b/src/packages/effects/plugins/src/vxe-table/extends.ts
index 0a9914a..5369d63 100644
--- a/src/packages/effects/plugins/src/vxe-table/extends.ts
+++ b/src/packages/effects/plugins/src/vxe-table/extends.ts
@@ -4,7 +4,7 @@
import type { VxeGridApi } from './api';
-import { formatDate, formatDateTime, isFunction } from '../../../../utils/src';
+import { formatDate, isFunction } from '../../../../utils/src';
export function extendProxyOptions(
api: VxeGridApi,
@@ -75,7 +75,8 @@
vxeUI.formats.add('formatDateTime', {
tableCellFormatMethod({ cellValue }) {
- return formatDateTime(cellValue) as string;
+ // 鍒楄〃涓殑鏃ユ湡缁熶竴鍙睍绀哄勾鏈堟棩锛屼笉灞曠ず鏃跺垎绉�
+ return formatDate(cellValue) as string;
},
});
}
diff --git a/src/views/bi/decision/alert-center/index.vue b/src/views/bi/decision/alert-center/index.vue
index c47a01a..5609ade 100644
--- a/src/views/bi/decision/alert-center/index.vue
+++ b/src/views/bi/decision/alert-center/index.vue
@@ -70,7 +70,7 @@
field: 'status', title: '鐘舵��', width: 80,
slots: { default: 'statusSlot' },
},
- { field: 'triggeredTime', title: '瑙﹀彂鏃堕棿', width: 170 },
+ { field: 'triggeredTime', title: '瑙﹀彂鏃堕棿', width: 170, formatter: 'formatDateTime' },
{ field: 'handleRemark', title: '澶勭悊澶囨敞', width: 140 },
{
title: '鎿嶄綔', width: 160,
diff --git a/src/views/hrm/leave/data.ts b/src/views/hrm/leave/data.ts
index c6d5154..9e9b357 100644
--- a/src/views/hrm/leave/data.ts
+++ b/src/views/hrm/leave/data.ts
@@ -144,8 +144,8 @@
default: 'leaveType',
},
},
- { field: 'startTime', title: '寮�濮嬫椂闂�', width: 160 },
- { field: 'endTime', title: '缁撴潫鏃堕棿', width: 160 },
+ { field: 'startTime', title: '寮�濮嬫椂闂�', width: 160, formatter: 'formatDateTime' },
+ { field: 'endTime', title: '缁撴潫鏃堕棿', width: 160, formatter: 'formatDateTime' },
{ field: 'duration', title: '鏃堕暱(澶�)', width: 90 },
{
field: 'status',
diff --git a/src/views/hrm/salary/payment/data.ts b/src/views/hrm/salary/payment/data.ts
index b9e1873..8209f32 100644
--- a/src/views/hrm/salary/payment/data.ts
+++ b/src/views/hrm/salary/payment/data.ts
@@ -53,7 +53,7 @@
props: { type: DICT_TYPE.HRM_PAYMENT_METHOD },
},
},
- { field: 'paymentTime', title: '鍙戞斁鏃堕棿', width: 160 },
+ { field: 'paymentTime', title: '鍙戞斁鏃堕棿', width: 160, formatter: 'formatDateTime' },
{
field: 'status',
title: '鐘舵��',
diff --git a/src/views/infra/job/logger/data.ts b/src/views/infra/job/logger/data.ts
index f17622c..fa231c6 100644
--- a/src/views/infra/job/logger/data.ts
+++ b/src/views/infra/job/logger/data.ts
@@ -6,7 +6,7 @@
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
-import { formatDateTime } from '@vben/utils';
+import { formatDate, formatDateTime } from '@vben/utils';
import dayjs from 'dayjs';
@@ -98,7 +98,7 @@
title: '鎵ц鏃堕棿',
minWidth: 280,
formatter: ({ row }) => {
- return `${formatDateTime(row.beginTime)} ~ ${formatDateTime(row.endTime)}`;
+ return `${formatDate(row.beginTime)} ~ ${formatDate(row.endTime)}`;
},
},
{
diff --git a/src/views/mes/tm/tool/data.ts b/src/views/mes/tm/tool/data.ts
index af2c051..4d4b324 100644
--- a/src/views/mes/tm/tool/data.ts
+++ b/src/views/mes/tm/tool/data.ts
@@ -11,7 +11,7 @@
MesToolStatusEnum,
} from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
-import { formatDateTime } from '@vben/utils';
+import { formatDate } from '@vben/utils';
import { Button } from 'ant-design-vue';
@@ -302,7 +302,7 @@
formatter: ({ row }) => {
if (row.maintenType === MesMaintenTypeEnum.REGULAR) {
return row.nextMaintenDate
- ? formatDateTime(row.nextMaintenDate)
+ ? formatDate(row.nextMaintenDate)
: '-';
}
if (row.maintenType === MesMaintenTypeEnum.USAGE) {
diff --git a/src/views/mes/workbench/components/tabs/RecordParamTab.vue b/src/views/mes/workbench/components/tabs/RecordParamTab.vue
index d6f9a64..ed59dd3 100644
--- a/src/views/mes/workbench/components/tabs/RecordParamTab.vue
+++ b/src/views/mes/workbench/components/tabs/RecordParamTab.vue
@@ -6,6 +6,7 @@
import { nextTick, ref, watch } from 'vue';
import { IconifyIcon } from '@vben/icons';
+import { formatDate } from '@vben/utils';
import { Button, Divider, message, Popconfirm, Tag } from 'ant-design-vue';
@@ -446,7 +447,7 @@
<span v-if="record.recordNo" class="record-param-tab__card-no">
{{ record.recordNo }}
</span>
- <span class="record-param-tab__card-time">{{ record.createTime }}</span>
+ <span class="record-param-tab__card-time">{{ formatDate(record.createTime) }}</span>
</div>
<div class="record-param-tab__card-actions">
<Button type="link" size="small" @click="handleEditRecord(record.id!)">
diff --git a/src/views/srm/supplier/data.ts b/src/views/srm/supplier/data.ts
index 58dc484..c08301b 100644
--- a/src/views/srm/supplier/data.ts
+++ b/src/views/srm/supplier/data.ts
@@ -167,7 +167,7 @@
{ field: 'contactName', title: '鑱旂郴浜�', minWidth: 100 },
{ field: 'contactMobile', title: '鑱旂郴鐢佃瘽', minWidth: 120 },
{ field: 'contactEmail', title: '閭', minWidth: 150 },
- { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160 },
+ { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
{
title: '鎿嶄綔',
width: 130,
diff --git a/src/views/srm/supplierApply/data.ts b/src/views/srm/supplierApply/data.ts
index 6b99c4c..ec74d30 100644
--- a/src/views/srm/supplierApply/data.ts
+++ b/src/views/srm/supplierApply/data.ts
@@ -154,7 +154,7 @@
},
{ field: 'contactName', title: '鑱旂郴浜�', minWidth: 100 },
{ field: 'contactMobile', title: '鑱旂郴鐢佃瘽', minWidth: 120 },
- { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160 },
+ { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
{
title: '鎿嶄綔',
width: 200,
diff --git a/src/views/srm/supplierCertificate/data.ts b/src/views/srm/supplierCertificate/data.ts
index c956f2d..0300ede 100644
--- a/src/views/srm/supplierCertificate/data.ts
+++ b/src/views/srm/supplierCertificate/data.ts
@@ -155,7 +155,7 @@
{ field: 'issuingAuthority', title: '棰佸彂鏈烘瀯', minWidth: 120 },
{ field: 'validStartDate', title: '棰佸彂鏃ユ湡', minWidth: 120 },
{ field: 'validEndDate', title: '鍒版湡鏃ユ湡', minWidth: 120 },
- { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160 },
+ { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
{
field: 'attachmentList',
title: '闄勪欢',
diff --git a/src/views/srm/supplierEvaluation/data.ts b/src/views/srm/supplierEvaluation/data.ts
index 4a20888..73d8d73 100644
--- a/src/views/srm/supplierEvaluation/data.ts
+++ b/src/views/srm/supplierEvaluation/data.ts
@@ -121,7 +121,7 @@
minWidth: 80,
cellRender: { name: 'CellTag', props: EVALUATION_GRADE_CELLTAG },
},
- { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160 },
+ { field: 'createTime', title: '鍒涘缓鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
{
title: '鎿嶄綔',
width: 130,
diff --git a/src/views/srm/tender/data.ts b/src/views/srm/tender/data.ts
index 475eae7..db01cbf 100644
--- a/src/views/srm/tender/data.ts
+++ b/src/views/srm/tender/data.ts
@@ -269,8 +269,8 @@
},
{ field: 'budgetAmount', title: '棰勭畻閲戦', minWidth: 120 },
{ field: 'purchaseOrg', title: '閲囪喘缁勭粐', minWidth: 100 },
- { field: 'startTime', title: '寮�濮嬫椂闂�', minWidth: 160 },
- { field: 'endTime', title: '鎴鏃堕棿', minWidth: 160 },
+ { field: 'startTime', title: '寮�濮嬫椂闂�', minWidth: 160, formatter: 'formatDateTime' },
+ { field: 'endTime', title: '鎴鏃堕棿', minWidth: 160, formatter: 'formatDateTime' },
{ field: 'purchaseOrderNo', title: '閲囪喘璁㈠崟鍙�', minWidth: 140 },
{
title: '鎿嶄綔',
diff --git a/src/views/wms/order/check/index.vue b/src/views/wms/order/check/index.vue
index 9d1f868..80f1f8d 100644
--- a/src/views/wms/order/check/index.vue
+++ b/src/views/wms/order/check/index.vue
@@ -11,7 +11,7 @@
OrderStatusEnum,
OrderUpdateStatusList,
} from '@vben/constants';
-import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils';
+import { downloadFileFromBlobPart, formatDate } from '@vben/utils';
import { message } from 'ant-design-vue';
@@ -326,11 +326,11 @@
</template>
<template #operateInfo="{ row }">
<div>
- 鍒涘缓锛歿{ formatDateTime(row.createTime) || '-' }} /
+ 鍒涘缓锛歿{ formatDate(row.createTime) || '-' }} /
{{ row.creatorName || row.creator || '-' }}
</div>
<div>
- 鏇存柊锛歿{ formatDateTime(row.updateTime) || '-' }} /
+ 鏇存柊锛歿{ formatDate(row.updateTime) || '-' }} /
{{ row.updaterName || row.updater || '-' }}
</div>
</template>
diff --git a/src/views/wms/order/movement/index.vue b/src/views/wms/order/movement/index.vue
index fb2c219..701b043 100644
--- a/src/views/wms/order/movement/index.vue
+++ b/src/views/wms/order/movement/index.vue
@@ -11,7 +11,7 @@
OrderStatusEnum,
OrderUpdateStatusList,
} from '@vben/constants';
-import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils';
+import { downloadFileFromBlobPart, formatDate } from '@vben/utils';
import { message } from 'ant-design-vue';
@@ -295,11 +295,11 @@
</template>
<template #operateInfo="{ row }">
<div>
- 鍒涘缓锛歿{ formatDateTime(row.createTime) || '-' }} /
+ 鍒涘缓锛歿{ formatDate(row.createTime) || '-' }} /
{{ row.creatorName || row.creator || '-' }}
</div>
<div>
- 鏇存柊锛歿{ formatDateTime(row.updateTime) || '-' }} /
+ 鏇存柊锛歿{ formatDate(row.updateTime) || '-' }} /
{{ row.updaterName || row.updater || '-' }}
</div>
</template>
diff --git a/src/views/wms/order/receipt/index.vue b/src/views/wms/order/receipt/index.vue
index 2d86d8b..52a2b1c 100644
--- a/src/views/wms/order/receipt/index.vue
+++ b/src/views/wms/order/receipt/index.vue
@@ -11,7 +11,7 @@
OrderStatusEnum,
OrderUpdateStatusList,
} from '@vben/constants';
-import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils';
+import { downloadFileFromBlobPart, formatDate } from '@vben/utils';
import { message } from 'ant-design-vue';
@@ -300,11 +300,11 @@
</template>
<template #operateInfo="{ row }">
<div>
- 鍒涘缓锛歿{ formatDateTime(row.createTime) || '-' }} /
+ 鍒涘缓锛歿{ formatDate(row.createTime) || '-' }} /
{{ row.creatorName || row.creator || '-' }}
</div>
<div>
- 鏇存柊锛歿{ formatDateTime(row.updateTime) || '-' }} /
+ 鏇存柊锛歿{ formatDate(row.updateTime) || '-' }} /
{{ row.updaterName || row.updater || '-' }}
</div>
</template>
diff --git a/src/views/wms/order/shipment/index.vue b/src/views/wms/order/shipment/index.vue
index 14550a2..cc85985 100644
--- a/src/views/wms/order/shipment/index.vue
+++ b/src/views/wms/order/shipment/index.vue
@@ -11,7 +11,7 @@
OrderStatusEnum,
OrderUpdateStatusList,
} from '@vben/constants';
-import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils';
+import { downloadFileFromBlobPart, formatDate } from '@vben/utils';
import { message } from 'ant-design-vue';
@@ -298,11 +298,11 @@
</template>
<template #operateInfo="{ row }">
<div>
- 鍒涘缓锛歿{ formatDateTime(row.createTime) || '-' }} /
+ 鍒涘缓锛歿{ formatDate(row.createTime) || '-' }} /
{{ row.creatorName || row.creator || '-' }}
</div>
<div>
- 鏇存柊锛歿{ formatDateTime(row.updateTime) || '-' }} /
+ 鏇存柊锛歿{ formatDate(row.updateTime) || '-' }} /
{{ row.updaterName || row.updater || '-' }}
</div>
</template>
--
Gitblit v1.9.3