import React, { useState } from 'react'; /** * D2. 发行方管理 * * 入驻审核列表、发行方详情、券审核列表 */ interface Issuer { id: string; name: string; creditRating: string; status: 'pending' | 'approved' | 'rejected'; submittedAt: string; couponCount: number; totalVolume: string; } const mockIssuers: Issuer[] = [ { id: 'ISS-001', name: 'Starbucks Inc.', creditRating: 'AAA', status: 'approved', submittedAt: '2026-01-15', couponCount: 12, totalVolume: '$128,450' }, { id: 'ISS-002', name: 'Amazon Corp.', creditRating: 'AA', status: 'approved', submittedAt: '2026-01-20', couponCount: 8, totalVolume: '$456,000' }, { id: 'ISS-003', name: 'NewBrand LLC', creditRating: '-', status: 'pending', submittedAt: '2026-02-09', couponCount: 0, totalVolume: '-' }, { id: 'ISS-004', name: 'Target Corp.', creditRating: 'A', status: 'approved', submittedAt: '2026-01-25', couponCount: 5, totalVolume: '$67,200' }, { id: 'ISS-005', name: 'FakeStore Inc.', creditRating: '-', status: 'rejected', submittedAt: '2026-02-05', couponCount: 0, totalVolume: '-' }, ]; export const IssuerManagementPage: React.FC = () => { const [tab, setTab] = useState<'all' | 'pending' | 'approved' | 'rejected'>('all'); const filtered = tab === 'all' ? mockIssuers : mockIssuers.filter(i => i.status === tab); const creditColor = (rating: string) => { const map: Record = { 'AAA': 'var(--color-credit-aaa)', 'AA': 'var(--color-credit-aa)', 'A': 'var(--color-credit-a)', 'BBB': 'var(--color-credit-bbb)', }; return map[rating] || 'var(--color-text-tertiary)'; }; const statusStyle = (status: string) => { const map: Record = { pending: { bg: 'var(--color-warning-light)', color: 'var(--color-warning)' }, approved: { bg: 'var(--color-success-light)', color: 'var(--color-success)' }, rejected: { bg: 'var(--color-error-light)', color: 'var(--color-error)' }, }; return map[status] || { bg: 'var(--color-gray-100)', color: 'var(--color-text-tertiary)' }; }; const statusLabel = (status: string) => { const map: Record = { pending: '待审核', approved: '已通过', rejected: '已驳回' }; return map[status] || status; }; return (

发行方管理

{/* Tabs */}
{(['all', 'pending', 'approved', 'rejected'] as const).map(t => ( ))}
{/* Table */}
{['ID', '企业名称', '信用评级', '状态', '提交时间', '券数量', '总发行额', '操作'].map(h => ( ))} {filtered.map(issuer => { const ss = statusStyle(issuer.status); return ( ); })}
{h}
{issuer.id} {issuer.name} {issuer.creditRating} {statusLabel(issuer.status)} {issuer.submittedAt} {issuer.couponCount} {issuer.totalVolume} {issuer.status === 'pending' && ( )}
); };