gaoluyang
2026-10-17 6141f7a7e61dacd8b80056b564170415d7fff31a
fix(ui): 列表时间统一只展示年月日

- 全局表格 formatDateTime 格式器改为输出 YYYY-MM-DD
- 修正未走格式器、直接渲染完整时间的列表列(SRM、HRM、MES、WMS、BI、定时任务日志等)
- 详情页、审批页、打印单据保留完整时分秒

Co-Authored-By: Claude Code <noreply@anthropic.com>
已修改16个文件
60 ■■■■■ 文件已修改
src/packages/effects/plugins/src/vxe-table/extends.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/bi/decision/alert-center/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/leave/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hrm/salary/payment/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/infra/job/logger/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/tm/tool/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/workbench/components/tabs/RecordParamTab.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/srm/supplier/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/srm/supplierApply/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/srm/supplierCertificate/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/srm/supplierEvaluation/data.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/srm/tender/data.ts 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/order/check/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/order/movement/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/order/receipt/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/wms/order/shipment/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
    },
  });
}
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,
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',
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: '状态',
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)}`;
      },
    },
    {
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) {
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!)">
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,
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,
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: '附件',
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,
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: '操作',
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>
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>
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>
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>