This commit is contained in:
2026-08-14 14:03:36 +08:00
parent ae92f8b78c
commit 148b89c3ca
6 changed files with 38 additions and 38 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
} }
})(); })();
</script> </script>
<script type="module" crossorigin src="/assets/index-Be93DOW4.js"></script> <script type="module" crossorigin src="/assets/index-b8paHjMP.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D3fwIbOp.css"> <link rel="stylesheet" crossorigin href="/assets/index-D3fwIbOp.css">
</head> </head>
<body> <body>
@@ -191,7 +191,7 @@ const AdminBankTransactions: React.FC = () => {
allowClear allowClear
options={accounts.map(a => ({ options={accounts.map(a => ({
value: a.id, value: a.id,
label: `${a.bank_name} - ${a.account_no} (${a.account_name})`, label: `${a.bankName} - ${a.accountNo} (${a.accountName})`,
}))} }))}
/> />
<RangePicker <RangePicker
@@ -218,7 +218,7 @@ const AdminBankTransactions: React.FC = () => {
{selectedAccount && ( {selectedAccount && (
<div style={{ padding: '8px 12px', background: '#f8fafc', borderRadius: 8, fontSize: 13, color: '#64748b' }}> <div style={{ padding: '8px 12px', background: '#f8fafc', borderRadius: 8, fontSize: 13, color: '#64748b' }}>
<strong></strong>{selectedAccount.bank_name} | {selectedAccount.account_no} | {selectedAccount.account_name} <strong></strong>{selectedAccount.bankName} | {selectedAccount.accountNo} | {selectedAccount.accountName}
</div> </div>
)} )}
</Card> </Card>
@@ -70,10 +70,10 @@ const AdminScheduledTasks: React.FC = () => {
} }
form.setFieldsValue({ form.setFieldsValue({
name: task.name, name: task.name,
task_type: task.task_type, task_type: task.taskType,
schedule: task.schedule, schedule: task.schedule,
config: configStr, config: configStr,
is_active: task.is_active, is_active: task.isActive,
}); });
} else { } else {
setEditing(null); setEditing(null);
@@ -148,24 +148,24 @@ const AdminScheduledTasks: React.FC = () => {
{ title: '任务名称', dataIndex: 'name', width: 160, ellipsis: true }, { title: '任务名称', dataIndex: 'name', width: 160, ellipsis: true },
{ {
title: '类型', title: '类型',
dataIndex: 'task_type', dataIndex: 'taskType',
width: 100, width: 100,
render: (v: string) => <Tag color={v === 'external_api' ? 'blue' : 'purple'}>{TASK_TYPE_LABELS[v] || v}</Tag>, render: (v: string) => <Tag color={v === 'external_api' ? 'blue' : 'purple'}>{TASK_TYPE_LABELS[v] || v}</Tag>,
}, },
{ title: '调度表达式', dataIndex: 'schedule', width: 140, render: (v: string) => <code style={{ background: '#f1f5f9', padding: '2px 6px', borderRadius: 4 }}>{v}</code> }, { title: '调度表达式', dataIndex: 'schedule', width: 140, render: (v: string) => <code style={{ background: '#f1f5f9', padding: '2px 6px', borderRadius: 4 }}>{v}</code> },
{ {
title: '状态', title: '状态',
dataIndex: 'is_active', dataIndex: 'isActive',
width: 80, width: 80,
render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>, render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>,
}, },
{ {
title: '最后执行', title: '最后执行',
dataIndex: 'last_run_at', dataIndex: 'lastRunAt',
width: 160, width: 160,
render: (v: string, r: ScheduledTask) => { render: (v: string, r: ScheduledTask) => {
if (!v) return '-'; if (!v) return '-';
const status = r.last_status ? STATUS_LABELS[r.last_status] : null; const status = r.lastStatus ? STATUS_LABELS[r.lastStatus] : null;
return ( return (
<span> <span>
{v.includes('T') ? v.replace('T', ' ').slice(0, 19) : v} {v.includes('T') ? v.replace('T', ' ').slice(0, 19) : v}
@@ -180,8 +180,8 @@ const AdminScheduledTasks: React.FC = () => {
render: (_: any, record: ScheduledTask) => ( render: (_: any, record: ScheduledTask) => (
<Space size="small"> <Space size="small">
<Button type="link" size="small" icon={<PlayCircleOutlined />} onClick={() => handleRun(record.id)}></Button> <Button type="link" size="small" icon={<PlayCircleOutlined />} onClick={() => handleRun(record.id)}></Button>
<Button type="link" size="small" icon={record.is_active ? <StopOutlined /> : <CheckCircleOutlined />} onClick={() => handleToggle(record)}> <Button type="link" size="small" icon={record.isActive ? <StopOutlined /> : <CheckCircleOutlined />} onClick={() => handleToggle(record)}>
{record.is_active ? '禁用' : '启用'} {record.isActive ? '禁用' : '启用'}
</Button> </Button>
<Button type="link" size="small" icon={<EditOutlined />} onClick={() => openModal(record)}></Button> <Button type="link" size="small" icon={<EditOutlined />} onClick={() => openModal(record)}></Button>
<Popconfirm title="确定删除该任务?" onConfirm={() => handleDelete(record.id)} okText="确定" cancelText="取消"> <Popconfirm title="确定删除该任务?" onConfirm={() => handleDelete(record.id)} okText="确定" cancelText="取消">
+10 -10
View File
@@ -63,11 +63,11 @@ const AdminSettings: React.FC = () => {
if (account) { if (account) {
setAccountEditing(account); setAccountEditing(account);
accountForm.setFieldsValue({ accountForm.setFieldsValue({
account_name: account.account_name, account_name: account.accountName,
bank_name: account.bank_name, bank_name: account.bankName,
account_no: account.account_no, account_no: account.accountNo,
is_active: account.is_active, is_active: account.isActive,
is_default: account.is_default, is_default: account.isDefault,
description: account.description, description: account.description,
}); });
} else { } else {
@@ -109,23 +109,23 @@ const AdminSettings: React.FC = () => {
}; };
const accountColumns = [ const accountColumns = [
{ title: '账户名称', dataIndex: 'account_name', width: 150 }, { title: '账户名称', dataIndex: 'accountName', width: 150 },
{ title: '开户银行', dataIndex: 'bank_name', width: 150 }, { title: '开户银行', dataIndex: 'bankName', width: 150 },
{ {
title: '银行账号', title: '银行账号',
dataIndex: 'account_no', dataIndex: 'accountNo',
width: 180, width: 180,
render: (v: string) => <code style={{ background: '#f1f5f9', padding: '2px 6px', borderRadius: 4 }}>{v}</code>, render: (v: string) => <code style={{ background: '#f1f5f9', padding: '2px 6px', borderRadius: 4 }}>{v}</code>,
}, },
{ {
title: '状态', title: '状态',
dataIndex: 'is_active', dataIndex: 'isActive',
width: 80, width: 80,
render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>, render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>,
}, },
{ {
title: '默认', title: '默认',
dataIndex: 'is_default', dataIndex: 'isDefault',
width: 80, width: 80,
render: (v: boolean) => v && <Tag color="blue"></Tag>, render: (v: boolean) => v && <Tag color="blue"></Tag>,
}, },
+15 -15
View File
@@ -1615,14 +1615,14 @@ export interface InvoiceDetail {
export interface BankAccount { export interface BankAccount {
id: string; id: string;
account_name: string; accountName: string;
bank_name: string; bankName: string;
account_no: string; accountNo: string;
is_active: boolean; isActive: boolean;
is_default: boolean; isDefault: boolean;
description?: string | null; description?: string | null;
created_at?: string | null; createdAt?: string | null;
updated_at?: string | null; updatedAt?: string | null;
} }
// ── Scheduled Task ───────────────────────────────────── // ── Scheduled Task ─────────────────────────────────────
@@ -1630,14 +1630,14 @@ export interface BankAccount {
export interface ScheduledTask { export interface ScheduledTask {
id: string; id: string;
name: string; name: string;
task_type: 'external_api' | 'internal_method'; taskType: 'external_api' | 'internal_method';
schedule: string; schedule: string;
config?: string | null; config?: string | null;
is_active: boolean; isActive: boolean;
last_run_at?: string | null; lastRunAt?: string | null;
last_status?: string | null; lastStatus?: string | null;
last_error?: string | null; lastError?: string | null;
created_by?: string | null; createdBy?: string | null;
created_at?: string | null; createdAt?: string | null;
updated_at?: string | null; updatedAt?: string | null;
} }