From 71d7ab2de520c0fdd2cf3b4dc3852aabe2e5858f Mon Sep 17 00:00:00 2001 From: selfrelease Date: Mon, 27 Jul 2026 19:58:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=93=E9=A1=B9=E9=99=84=E5=8A=A0?= =?UTF-8?q?=E6=89=A3=E9=99=A4=E5=8F=AA=E6=98=BE=E7=A4=BA=E5=BD=93=E6=9C=88?= =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E5=9C=A8=E4=BF=9D=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/SocialInsurance.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/SocialInsurance.tsx b/frontend/src/pages/SocialInsurance.tsx index ecd3875..57ddc10 100644 --- a/frontend/src/pages/SocialInsurance.tsx +++ b/frontend/src/pages/SocialInsurance.tsx @@ -1096,12 +1096,16 @@ function SpecialDeductionTab({ month, setMonth }: { month: string; setMonth: (m: }, }) - // 查询所有员工列表(用于添加未录入的员工) + // 查询当月社保在保人员(只有缴纳社保的员工才需要填报专项附加扣除) const { data: employees = [] } = useQuery({ - queryKey: ['employees-for-deduction'], + queryKey: ['active-social-employees', month], queryFn: async () => { - const res = await api.get('/roster', { params: { pageSize: 999 } }) as any - return res.data?.items || res.data || [] + const res = await api.get('/social/active-declaration', { params: { month } }) as any + return (res.data?.items || []).map((item: any) => ({ + id: item.employeeId, + name: item.name, + department: item.department, + })) }, })