refactor: 社保公积金Tab重构为账户卡片列表+展开年度标准管理

1. 社保/公积金Tab从"选账户→展示配置"改为"账户卡片列表+展开管理"
2. 每个账户卡片可展开显示:当前标准/最低工资编辑/新建年度标准/版本历史/调基/试算
3. 账户新建/编辑/删除/设默认从设置页面迁移到社保公积金菜单
4. 设置页面去掉"社保公积金账户"Tab
5. "新建版本"改名为"新建年度标准"
6. 新增AccountCard组件独立管理每个账户的展开状态和数据查询

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-16 15:05:06 +08:00
parent a5911d1874
commit 8391c123fc
10 changed files with 985 additions and 849 deletions
+15 -1
View File
@@ -107,6 +107,8 @@ export function BatchManager() {
const [filterType, setFilterType] = useState<string>('')
const [selectedBatchId, setSelectedBatchId] = useState<string | null>(null)
const [showCreateModal, setShowCreateModal] = useState(false)
const [createMonth, setCreateMonth] = useState(new Date().toISOString().slice(0, 7))
const [createPayMonth, setCreatePayMonth] = useState('')
const [createType, setCreateType] = useState<'REGULAR' | 'TERMINATION' | 'BONUS' | 'SEVERANCE'>('REGULAR')
const [createMode, setCreateMode] = useState<'copy_last' | 'blank_employees' | 'blank_all' | 'copy_batch' | 'custom'>('copy_last')
const [sourceBatchId, setSourceBatchId] = useState<string>('')
@@ -260,6 +262,18 @@ export function BatchManager() {
<Card>
<h2 className="text-xs font-medium mb-3"></h2>
<div className="space-y-3">
<div className="grid grid-cols-2 gap-3">
<div>
<Label>*</Label>
<Input type="month" value={createMonth} onChange={(e) => setCreateMonth(e.target.value)} />
<p className="text-xs text-gray-400 mt-0.5"></p>
</div>
<div>
<Label></Label>
<Input type="month" value={createPayMonth} onChange={(e) => setCreatePayMonth(e.target.value)} />
<p className="text-xs text-gray-400 mt-0.5">==10=9</p>
</div>
</div>
<div className="grid grid-cols-2 gap-3">
<div>
<Label></Label>
@@ -307,7 +321,7 @@ export function BatchManager() {
</div>
<div className="flex gap-2">
<Button
onClick={() => createMutation.mutate({ month, type: createType, mode: createMode, sourceBatchId: sourceBatchId || undefined, employeeIds: createMode === 'custom' ? selectedEmployeeIds : undefined })}
onClick={() => createMutation.mutate({ month: createMonth, payMonth: createPayMonth || undefined, type: createType, mode: createMode, sourceBatchId: sourceBatchId || undefined, employeeIds: createMode === 'custom' ? selectedEmployeeIds : undefined })}
disabled={createMutation.isPending || (createMode === 'copy_batch' && !sourceBatchId) || (createMode === 'custom' && selectedEmployeeIds.length === 0)}
>
{createMutation.isPending ? '创建中...' : '确认创建'}