fix: 页面优化
This commit is contained in:
@@ -72,6 +72,7 @@ function renderBodyCell({
|
||||
if (column.dataIndex === 'name') {
|
||||
const maxLen = 15;
|
||||
const raw = text || '';
|
||||
if (!raw) return <span>--</span>;
|
||||
const display = raw.length > maxLen ? raw.slice(0, maxLen) + '...' : raw;
|
||||
return raw.length > maxLen ? (
|
||||
<Tooltip title={raw}>
|
||||
|
||||
@@ -125,22 +125,77 @@ export function useOrderModel() {
|
||||
};
|
||||
|
||||
const columns = [
|
||||
{ title: '订单编号', dataIndex: 'orderNo', key: 'orderNo', width: 200 },
|
||||
{ title: '赛事名称', dataIndex: 'name', key: 'name', width: 180 },
|
||||
{ title: '选手名称', dataIndex: 'realName', key: 'realName', width: 100 },
|
||||
{ title: '手机号', dataIndex: 'phone', key: 'phone', width: 130 },
|
||||
{ title: '比赛组别', dataIndex: 'categoryName', key: 'categoryName', width: 120 },
|
||||
{ title: '报名人', dataIndex: 'creatorName', key: 'creatorName', width: 100 },
|
||||
{ title: '报名人手机号', dataIndex: 'creatorPhone', key: 'creatorPhone', width: 130 },
|
||||
{
|
||||
title: '订单编号',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo',
|
||||
width: 200,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '赛事名称',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
width: 180,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '选手名称',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
width: 100,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
width: 130,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '比赛组别',
|
||||
dataIndex: 'categoryName',
|
||||
key: 'categoryName',
|
||||
width: 120,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '报名人',
|
||||
dataIndex: 'creatorName',
|
||||
key: 'creatorName',
|
||||
width: 100,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '报名人手机号',
|
||||
dataIndex: 'creatorPhone',
|
||||
key: 'creatorPhone',
|
||||
width: 130,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '报名人数',
|
||||
dataIndex: 'creatorSignupCount',
|
||||
key: 'creatorSignupCount',
|
||||
width: 90,
|
||||
align: 'center' as const,
|
||||
customRender: ({ text }: { text: number }) => (text != null ? text : '--'),
|
||||
},
|
||||
{
|
||||
title: '订单时间',
|
||||
dataIndex: 'orderTime',
|
||||
key: 'orderTime',
|
||||
width: 170,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{
|
||||
title: '支付时间',
|
||||
dataIndex: 'payTime',
|
||||
key: 'payTime',
|
||||
width: 170,
|
||||
customRender: ({ text }: { text: string }) => text || '--',
|
||||
},
|
||||
{ title: '订单时间', dataIndex: 'orderTime', key: 'orderTime', width: 170 },
|
||||
{ title: '支付时间', dataIndex: 'payTime', key: 'payTime', width: 170 },
|
||||
{
|
||||
title: '订单总金额',
|
||||
dataIndex: 'creatorSignupFee',
|
||||
|
||||
Reference in New Issue
Block a user