fix(ui): 列表时间统一只展示年月日
- 全局表格 formatDateTime 格式器改为输出 YYYY-MM-DD
- 修正未走格式器、直接渲染完整时间的列表列(SRM、HRM、MES、WMS、BI、定时任务日志等)
- 详情页、审批页、打印单据保留完整时分秒
Co-Authored-By: Claude Code <noreply@anthropic.com>
| | |
| | | |
| | | import type { VxeGridApi } from './api'; |
| | | |
| | | import { formatDate, formatDateTime, isFunction } from '../../../../utils/src'; |
| | | import { formatDate, isFunction } from '../../../../utils/src'; |
| | | |
| | | export function extendProxyOptions( |
| | | api: VxeGridApi, |
| | |
| | | |
| | | vxeUI.formats.add('formatDateTime', { |
| | | tableCellFormatMethod({ cellValue }) { |
| | | return formatDateTime(cellValue) as string; |
| | | // 列表中的日期统一只展示年月日,不展示时分秒 |
| | | return formatDate(cellValue) as string; |
| | | }, |
| | | }); |
| | | } |
| | |
| | | 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, |
| | |
| | | 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', |
| | |
| | | props: { type: DICT_TYPE.HRM_PAYMENT_METHOD }, |
| | | }, |
| | | }, |
| | | { field: 'paymentTime', title: '发放时间', width: 160 }, |
| | | { field: 'paymentTime', title: '发放时间', width: 160, formatter: 'formatDateTime' }, |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | |
| | | |
| | | 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'; |
| | | |
| | |
| | | title: '执行时间', |
| | | minWidth: 280, |
| | | formatter: ({ row }) => { |
| | | return `${formatDateTime(row.beginTime)} ~ ${formatDateTime(row.endTime)}`; |
| | | return `${formatDate(row.beginTime)} ~ ${formatDate(row.endTime)}`; |
| | | }, |
| | | }, |
| | | { |
| | |
| | | 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'; |
| | | |
| | |
| | | formatter: ({ row }) => { |
| | | if (row.maintenType === MesMaintenTypeEnum.REGULAR) { |
| | | return row.nextMaintenDate |
| | | ? formatDateTime(row.nextMaintenDate) |
| | | ? formatDate(row.nextMaintenDate) |
| | | : '-'; |
| | | } |
| | | if (row.maintenType === MesMaintenTypeEnum.USAGE) { |
| | |
| | | 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'; |
| | | |
| | |
| | | <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!)"> |
| | |
| | | { 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, |
| | |
| | | }, |
| | | { 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, |
| | |
| | | { 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: '附件', |
| | |
| | | minWidth: 80, |
| | | cellRender: { name: 'CellTag', props: EVALUATION_GRADE_CELLTAG }, |
| | | }, |
| | | { field: 'createTime', title: '创建时间', minWidth: 160 }, |
| | | { field: 'createTime', title: '创建时间', minWidth: 160, formatter: 'formatDateTime' }, |
| | | { |
| | | title: '操作', |
| | | width: 130, |
| | |
| | | }, |
| | | { 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: '操作', |
| | |
| | | OrderStatusEnum, |
| | | OrderUpdateStatusList, |
| | | } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils'; |
| | | import { downloadFileFromBlobPart, formatDate } from '@vben/utils'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | |
| | | </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> |
| | |
| | | OrderStatusEnum, |
| | | OrderUpdateStatusList, |
| | | } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils'; |
| | | import { downloadFileFromBlobPart, formatDate } from '@vben/utils'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | |
| | | </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> |
| | |
| | | OrderStatusEnum, |
| | | OrderUpdateStatusList, |
| | | } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils'; |
| | | import { downloadFileFromBlobPart, formatDate } from '@vben/utils'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | |
| | | </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> |
| | |
| | | OrderStatusEnum, |
| | | OrderUpdateStatusList, |
| | | } from '@vben/constants'; |
| | | import { downloadFileFromBlobPart, formatDateTime } from '@vben/utils'; |
| | | import { downloadFileFromBlobPart, formatDate } from '@vben/utils'; |
| | | |
| | | import { message } from 'ant-design-vue'; |
| | | |
| | |
| | | </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> |