|
|
@@ -1,5 +1,6 @@
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
import { Table, Button, Modal, Form, Input, DatePicker, Space, Typography, message, Tag } from 'antd';
|
|
|
+import dayjs from 'dayjs';
|
|
|
import { PlusOutlined, EditOutlined, DeleteOutlined, SearchOutlined } from '@ant-design/icons';
|
|
|
import { stockXunlianCodesClient } from '@/client/api';
|
|
|
import type { InferResponseType, InferRequestType } from 'hono/client';
|
|
|
@@ -87,7 +88,7 @@ export const StockXunlianCodesPage: React.FC = () => {
|
|
|
name: record.name,
|
|
|
type: record.type || undefined,
|
|
|
description: record.description || undefined,
|
|
|
- tradeDate: record.tradeDate ? new Date(record.tradeDate) : null,
|
|
|
+ tradeDate: record.tradeDate ? dayjs(record.tradeDate) : null,
|
|
|
});
|
|
|
setIsModalVisible(true);
|
|
|
};
|
|
|
@@ -202,13 +203,13 @@ export const StockXunlianCodesPage: React.FC = () => {
|
|
|
title: '交易日期',
|
|
|
dataIndex: 'tradeDate',
|
|
|
key: 'tradeDate',
|
|
|
- render: (date: string) => date ? new Date(date).toLocaleString() : '-',
|
|
|
+ render: (date: string) => date ? dayjs(date).format('YYYY-MM-DD HH:mm:ss') : '-',
|
|
|
},
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'createdAt',
|
|
|
key: 'createdAt',
|
|
|
- render: (date: string) => new Date(date).toLocaleString(),
|
|
|
+ render: (date: string) => dayjs(date).format('YYYY-MM-DD HH:mm:ss'),
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|