合伙人子账号
+ {settingsButton}
主账号在「开城合伙人」创建;此处仅管理子账号树与权限
@@ -305,7 +312,7 @@ export default function PartnerAccountsPage() {
loading={loading}
columns={columns}
dataSource={treeData}
- scroll={{ x: 1200 }}
+ scroll={{ x: 'max-content' }}
pagination={false}
expandable={{
expandedRowKeys,
@@ -399,7 +406,7 @@ export default function PartnerAccountsPage() {
label: `账单 (${detail.bills?.length ?? 0})`,
children: (
+ dataSource={detail.bills ?? []} pagination={false} scroll={{ x: 'max-content' }} />
),
},
{
@@ -407,7 +414,7 @@ export default function PartnerAccountsPage() {
label: `名下订单 (${detail.orders?.length ?? 0})`,
children: (
+ dataSource={detail.orders ?? []} pagination={false} scroll={{ x: 'max-content' }} />
),
},
]} />
diff --git a/apps/admin-web/src/pages/PartnerBillsPage.tsx b/apps/admin-web/src/pages/PartnerBillsPage.tsx
index 5ca09ac..cb97582 100644
--- a/apps/admin-web/src/pages/PartnerBillsPage.tsx
+++ b/apps/admin-web/src/pages/PartnerBillsPage.tsx
@@ -1,576 +1,579 @@
-import { useEffect, useState } from 'react';
-import {
- Button,
- Card,
- DatePicker,
- Descriptions,
- Drawer,
- Form,
- Input,
- Modal,
- Select,
- Space,
- Statistic,
- Table,
- Tag,
- Typography,
- message,
-} from 'antd';
-import type { ColumnsType } from 'antd/es/table';
-import dayjs, { type Dayjs } from 'dayjs';
-import { request, type Paginated } from '../lib/api';
-import { ADMIN_OPTIONS_PAGE_SIZE, fmtTime } from '../lib/constants';
-import { downloadExcelCsv } from '../lib/exportExcel';
+import { useEffect, useState } from 'react';
+import {
+ Button,
+ Card,
+ DatePicker,
+ Descriptions,
+ Drawer,
+ Form,
+ Input,
+ Modal,
+ Select,
+ Space,
+ Statistic,
+ Table,
+ Tag,
+ Typography,
+ message,
+} from 'antd';
+import type { ColumnsType } from 'antd/es/table';
+import dayjs, { type Dayjs } from 'dayjs';
+import { request, type Paginated } from '../lib/api';
+import { ADMIN_OPTIONS_PAGE_SIZE, fmtTime } from '../lib/constants';
+import { downloadExcelCsv } from '../lib/exportExcel';
import { useAdminList } from '../lib/useAdminList';
+import { useAdminListColumns } from '../lib/useAdminListColumns';
+
+
+type Row = {
+ id: string;
+ billNo: string;
+ orderCommission: number;
+ redeemCommission: number;
+ totalAmount: number;
+ status: string;
+ periodStart: string;
+ periodEnd: string;
+ rejectReason?: string | null;
+ paymentRef?: string | null;
+ paidAt?: string | null;
+ partner?: {
+ companyName?: string;
+ phone?: string;
+ bankAccountName?: string | null;
+ bankAccountNo?: string | null;
+ bankBranch?: string | null;
+ };
+ partnerAccount?: {
+ companyName?: string;
+ phone?: string;
+ bankAccountName?: string | null;
+ bankAccountNo?: string | null;
+ bankBranch?: string | null;
+ };
+};
+
+type PartnerOption = { id: string; companyName: string; phone?: string };
+
+const STATUS_LABELS: Record
= {
+ PENDING_REVIEW: '待审核',
+ AWAITING_CONFIRM: '待合伙人确认',
+ UNPAID: '未打款',
+ PAID: '已打款',
+ REJECTED: '已驳回',
+};
+
+const STATUS_COLORS: Record = {
+ PENDING_REVIEW: 'gold',
+ AWAITING_CONFIRM: 'blue',
+ UNPAID: 'red',
+ PAID: 'green',
+ REJECTED: 'red',
+};
+
+export default function PartnerBillsPage() {
+ const [form] = Form.useForm();
+ const [filters, setFilters] = useState