1
This commit is contained in:
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -28,7 +28,7 @@
|
||||
}
|
||||
})();
|
||||
</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">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -191,7 +191,7 @@ const AdminBankTransactions: React.FC = () => {
|
||||
allowClear
|
||||
options={accounts.map(a => ({
|
||||
value: a.id,
|
||||
label: `${a.bank_name} - ${a.account_no} (${a.account_name})`,
|
||||
label: `${a.bankName} - ${a.accountNo} (${a.accountName})`,
|
||||
}))}
|
||||
/>
|
||||
<RangePicker
|
||||
@@ -218,7 +218,7 @@ const AdminBankTransactions: React.FC = () => {
|
||||
|
||||
{selectedAccount && (
|
||||
<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>
|
||||
)}
|
||||
</Card>
|
||||
|
||||
@@ -70,10 +70,10 @@ const AdminScheduledTasks: React.FC = () => {
|
||||
}
|
||||
form.setFieldsValue({
|
||||
name: task.name,
|
||||
task_type: task.task_type,
|
||||
task_type: task.taskType,
|
||||
schedule: task.schedule,
|
||||
config: configStr,
|
||||
is_active: task.is_active,
|
||||
is_active: task.isActive,
|
||||
});
|
||||
} else {
|
||||
setEditing(null);
|
||||
@@ -148,24 +148,24 @@ const AdminScheduledTasks: React.FC = () => {
|
||||
{ title: '任务名称', dataIndex: 'name', width: 160, ellipsis: true },
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'task_type',
|
||||
dataIndex: 'taskType',
|
||||
width: 100,
|
||||
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: 'is_active',
|
||||
dataIndex: 'isActive',
|
||||
width: 80,
|
||||
render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '最后执行',
|
||||
dataIndex: 'last_run_at',
|
||||
dataIndex: 'lastRunAt',
|
||||
width: 160,
|
||||
render: (v: string, r: ScheduledTask) => {
|
||||
if (!v) return '-';
|
||||
const status = r.last_status ? STATUS_LABELS[r.last_status] : null;
|
||||
const status = r.lastStatus ? STATUS_LABELS[r.lastStatus] : null;
|
||||
return (
|
||||
<span>
|
||||
{v.includes('T') ? v.replace('T', ' ').slice(0, 19) : v}
|
||||
@@ -180,8 +180,8 @@ const AdminScheduledTasks: React.FC = () => {
|
||||
render: (_: any, record: ScheduledTask) => (
|
||||
<Space size="small">
|
||||
<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)}>
|
||||
{record.is_active ? '禁用' : '启用'}
|
||||
<Button type="link" size="small" icon={record.isActive ? <StopOutlined /> : <CheckCircleOutlined />} onClick={() => handleToggle(record)}>
|
||||
{record.isActive ? '禁用' : '启用'}
|
||||
</Button>
|
||||
<Button type="link" size="small" icon={<EditOutlined />} onClick={() => openModal(record)}>编辑</Button>
|
||||
<Popconfirm title="确定删除该任务?" onConfirm={() => handleDelete(record.id)} okText="确定" cancelText="取消">
|
||||
|
||||
@@ -63,11 +63,11 @@ const AdminSettings: React.FC = () => {
|
||||
if (account) {
|
||||
setAccountEditing(account);
|
||||
accountForm.setFieldsValue({
|
||||
account_name: account.account_name,
|
||||
bank_name: account.bank_name,
|
||||
account_no: account.account_no,
|
||||
is_active: account.is_active,
|
||||
is_default: account.is_default,
|
||||
account_name: account.accountName,
|
||||
bank_name: account.bankName,
|
||||
account_no: account.accountNo,
|
||||
is_active: account.isActive,
|
||||
is_default: account.isDefault,
|
||||
description: account.description,
|
||||
});
|
||||
} else {
|
||||
@@ -109,23 +109,23 @@ const AdminSettings: React.FC = () => {
|
||||
};
|
||||
|
||||
const accountColumns = [
|
||||
{ title: '账户名称', dataIndex: 'account_name', width: 150 },
|
||||
{ title: '开户银行', dataIndex: 'bank_name', width: 150 },
|
||||
{ title: '账户名称', dataIndex: 'accountName', width: 150 },
|
||||
{ title: '开户银行', dataIndex: 'bankName', width: 150 },
|
||||
{
|
||||
title: '银行账号',
|
||||
dataIndex: 'account_no',
|
||||
dataIndex: 'accountNo',
|
||||
width: 180,
|
||||
render: (v: string) => <code style={{ background: '#f1f5f9', padding: '2px 6px', borderRadius: 4 }}>{v}</code>,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'is_active',
|
||||
dataIndex: 'isActive',
|
||||
width: 80,
|
||||
render: (v: boolean) => <Tag color={v ? 'green' : 'default'}>{v ? '启用' : '禁用'}</Tag>,
|
||||
},
|
||||
{
|
||||
title: '默认',
|
||||
dataIndex: 'is_default',
|
||||
dataIndex: 'isDefault',
|
||||
width: 80,
|
||||
render: (v: boolean) => v && <Tag color="blue">默认</Tag>,
|
||||
},
|
||||
|
||||
@@ -1615,14 +1615,14 @@ export interface InvoiceDetail {
|
||||
|
||||
export interface BankAccount {
|
||||
id: string;
|
||||
account_name: string;
|
||||
bank_name: string;
|
||||
account_no: string;
|
||||
is_active: boolean;
|
||||
is_default: boolean;
|
||||
accountName: string;
|
||||
bankName: string;
|
||||
accountNo: string;
|
||||
isActive: boolean;
|
||||
isDefault: boolean;
|
||||
description?: string | null;
|
||||
created_at?: string | null;
|
||||
updated_at?: string | null;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
// ── Scheduled Task ─────────────────────────────────────
|
||||
@@ -1630,14 +1630,14 @@ export interface BankAccount {
|
||||
export interface ScheduledTask {
|
||||
id: string;
|
||||
name: string;
|
||||
task_type: 'external_api' | 'internal_method';
|
||||
taskType: 'external_api' | 'internal_method';
|
||||
schedule: string;
|
||||
config?: string | null;
|
||||
is_active: boolean;
|
||||
last_run_at?: string | null;
|
||||
last_status?: string | null;
|
||||
last_error?: string | null;
|
||||
created_by?: string | null;
|
||||
created_at?: string | null;
|
||||
updated_at?: string | null;
|
||||
isActive: boolean;
|
||||
lastRunAt?: string | null;
|
||||
lastStatus?: string | null;
|
||||
lastError?: string | null;
|
||||
createdBy?: string | null;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user