import { Card, Table, Tag, Typography } from '@douyinfe/semi-ui'; import type { DashboardData } from '../types'; interface MovementRow { id: string; time: string; dir: string; material: string; qty: string; operator: string; } export function WarehouseBoard({ data }: { data: DashboardData }) { const { warehouse: w } = data; const rows: MovementRow[] = w.movements.map((m) => ({ id: m.id, time: m.time, dir: m.type === 'in' ? '入库' : '出库', material: m.material, qty: `${m.qty}`, operator: m.operator, })); const columns = [ { title: '时间', dataIndex: 'time' }, { title: '方向', dataIndex: 'dir', render: (dir: string) => ( {dir} ), }, { title: '物料名称', dataIndex: 'material' }, { title: '数量', dataIndex: 'qty' }, { title: '操作人', dataIndex: 'operator' }, ]; return (
暂无出入库记录} /> ); } function TextStat({ value, label, color }: { value: number; label: string; color: string }) { return (
{value}
{label}
); } function BigNumber({ value, unit, color, }: { value: number; unit: string; color: string; }) { return (
{value} {unit}
); }