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:
@@ -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 ? '创建中...' : '确认创建'}
|
||||
|
||||
Reference in New Issue
Block a user