feat: 账户关联根部门 + 员工新增自动带出账户
1. 账户管理:新建/编辑时可勾选关联 level=0 根部门(公司/分公司/子公司) 2. 后端新增 API: - PUT /social/accounts/:id/departments 批量关联根部门 - GET /social/accounts/:id/departments 查询已关联部门 - GET /social/department-account/:departmentId 按部门带出适用账户+标准 3. 部门更新 API 支持 socialAccountId/housingAccountId 字段 4. 员工新增表单:选定部门后自动带出社保公积金账户,可手动调整 5. 参保记录创建时写入 accountId Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -547,6 +547,15 @@ export const socialAccountApi = {
|
||||
/** 按员工获取适用账户 */
|
||||
employeeAccount: (employeeId: string) =>
|
||||
get(`/social/employee-account/${employeeId}`).then(unwrap<any>()),
|
||||
/** 获取账户已关联的根部门 */
|
||||
accountDepartments: (id: string) =>
|
||||
get(`/social/accounts/${id}/departments`).then(unwrap<any[]>()),
|
||||
/** 账户关联根部门(批量) */
|
||||
linkDepartments: (id: string, departmentIds: string[]) =>
|
||||
put(`/social/accounts/${id}/departments`, { departmentIds }).then(unwrap<any>()),
|
||||
/** 按部门获取适用账户(选部门时自动带出) */
|
||||
departmentAccount: (departmentId: string) =>
|
||||
get(`/social/department-account/${departmentId}`).then(unwrap<any>()),
|
||||
}
|
||||
|
||||
export const socialInsuranceApi = {
|
||||
|
||||
Reference in New Issue
Block a user