style(frontend): 全项目表格统一百分比布局并居中

This commit is contained in:
yml2213
2026-10-24 14:49:23 +08:00
parent a96229a106
commit ce8efa6bad
52 changed files with 346 additions and 145 deletions
@@ -5,7 +5,8 @@
* 不写渠道映射,也不维护游戏分类。
*/
import { ReloadOutlined, SyncOutlined } from '@ant-design/icons'
import { Alert, App, Button, Card, Space, Switch, Table, Tag, Typography } from 'antd'
import { Alert, App, Button, Card, Space, Switch, Tag, Typography } from 'antd'
import PercentTable from '@/components/common/PercentTable'
import { useQuery, useQueryClient } from '@tanstack/react-query'
import { useState } from 'react'
@@ -134,7 +135,7 @@ export function AffiliateSkuPanel() {
style={{ marginBottom: 12 }}
message="自动发货只按上游货源 SKU 配采购成本:订单项直接按 aff:<skuCode> 归一,不走渠道映射;这里不维护游戏分类和商品上下架,那些只属于接单平台。"
/>
<Table
<PercentTable
tableLayout="fixed"
rowKey="id"
size="small"
@@ -15,10 +15,10 @@ import {
Select,
Space,
Switch,
Table,
Tag,
Typography,
} from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useQuery } from '@tanstack/react-query'
import { useState } from 'react'
@@ -427,7 +427,7 @@ export function ChannelMappingPanel() {
</Button>
<Button onClick={() => setExpandedMappingProductIds([])}>收起全部</Button>
</Space>
<Table<ChannelProductMappingGroup>
<PercentTable<ChannelProductMappingGroup>
tableLayout="fixed"
rowKey={(row) => String(row.canonicalProductId)}
size="small"
@@ -445,7 +445,7 @@ export function ChannelMappingPanel() {
<Typography.Text type="secondary">
该标准商品下共有 {group.mappings.length} 条渠道映射
</Typography.Text>
<Table<ChannelProductMapping>
<PercentTable<ChannelProductMapping>
tableLayout="fixed"
rowKey="id"
size="small"
@@ -4,7 +4,8 @@
* 异常表不再存履约载体,履约方式从 order_items.fulfillment_mode join 得到;
* 前端按履约方式筛选时传 fulfillmentMode 参数。
*/
import { App, Button, Card, Select, Space, Table, Tag, Typography } from 'antd'
import { App, Button, Card, Select, Space, Tag, Typography } from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useQuery } from '@tanstack/react-query'
import { useState } from 'react'
@@ -160,7 +161,7 @@ export function CostExceptionPanel() {
/>
}
>
<Table
<PercentTable
tableLayout="fixed"
rowKey="id"
size="small"
@@ -6,20 +6,8 @@
* 通用成本模型(平台费 / 支付费 / 售后损失 / 其他)对所有履约方式生效。
*/
import { PlusOutlined, SearchOutlined } from '@ant-design/icons'
import {
Alert,
App,
Button,
Card,
Form,
Input,
Modal,
Select,
Space,
Table,
Tag,
Typography,
} from 'antd'
import { Alert, App, Button, Card, Form, Input, Modal, Select, Space, Tag, Typography } from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useQuery } from '@tanstack/react-query'
import { useState } from 'react'
@@ -244,7 +232,7 @@ export function CostItemPanel() {
style={{ width: 260 }}
/>
</Space>
<Table
<PercentTable
tableLayout="fixed"
rowKey="id"
size="small"
@@ -3,18 +3,8 @@
*
* 履约方式直接读 order_items.fulfillment_mode,页面只做展示,不允许改判。
*/
import {
App,
Alert,
Button,
Card,
Descriptions,
Empty,
InputNumber,
Space,
Table,
Typography,
} from 'antd'
import { App, Alert, Button, Card, Descriptions, Empty, InputNumber, Space, Typography } from 'antd'
import PercentTable from '@/components/common/PercentTable'
import { useState } from 'react'
import { createAdminCostSnapshot, previewAdminCost } from '@/services/admin'
@@ -150,7 +140,7 @@ export function CostPreviewPanel() {
/>
) : null}
<Table
<PercentTable
tableLayout="fixed"
rowKey={(row) => `${row.costItemId}-${row.costVersionId}`}
size="small"
@@ -17,10 +17,10 @@ import {
Modal,
Select,
Space,
Table,
Tag,
Typography,
} from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useQuery } from '@tanstack/react-query'
import { useState } from 'react'
@@ -402,7 +402,7 @@ export function CostVersionPanel() {
style={{ width: 140 }}
/>
</Space>
<Table
<PercentTable
tableLayout="fixed"
rowKey="id"
size="small"
@@ -33,10 +33,10 @@ import {
Select,
Space,
Statistic,
Table,
Tag,
Typography,
} from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { useState } from 'react'
@@ -382,7 +382,7 @@ export function ManualSkuConfigPanel() {
</Button>
</Space>
<Table
<PercentTable
rowKey="id"
size="small"
columns={columns}
@@ -23,11 +23,11 @@ import {
Select,
Space,
Switch,
Table,
Tabs,
Tag,
Typography,
} from 'antd'
import PercentTable from '@/components/common/PercentTable'
import type { TableColumnsType } from 'antd'
import { useQuery, useQueryClient } from '@tanstack/react-query'
import { useState } from 'react'
@@ -559,7 +559,7 @@ export function ProductCatalogPanel() {
style={{ width: 280 }}
/>
</Space>
<Table
<PercentTable
tableLayout="fixed"
rowKey="id"
size="small"