From 32a57873cf4d31bff7115aadbb961d380c0b0801 Mon Sep 17 00:00:00 2001 From: freedakgmail Date: Thu, 23 Jul 2026 20:29:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=88=E5=BA=A6=E5=A2=9E=E5=87=8F?= =?UTF-8?q?=E5=91=98=E6=94=B9=E4=B8=BA=E6=9C=88=E5=BA=A6=E5=8A=9E=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=AD=A3=E5=B8=B8=E5=9C=A8=E4=BF=9D?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/SocialInsurance.tsx | 49 ++++++++++++++++++++------ 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/SocialInsurance.tsx b/frontend/src/pages/SocialInsurance.tsx index 59911c9..6037732 100644 --- a/frontend/src/pages/SocialInsurance.tsx +++ b/frontend/src/pages/SocialInsurance.tsx @@ -72,11 +72,18 @@ export default function SocialInsurance() { const { data: monthlyChanges } = useQuery({ queryKey: ['monthly-changes', monthlyMonth], queryFn: async () => { - const [socialRes, housingRes] = await Promise.all([ + const [socialRes, housingRes, socialActiveRes, housingActiveRes] = await Promise.all([ api.get('/social/monthly-changes', { params: { month: monthlyMonth } }) as any, api.get('/social/housing/monthly-changes', { params: { month: monthlyMonth } }) as any, + api.get('/social/active-declaration', { params: { month: monthlyMonth } }) as any, + api.get('/social/housing/active-declaration', { params: { month: monthlyMonth } }) as any, ]) - return { social: socialRes.data, housing: housingRes.data } + return { + social: socialRes.data, + housing: housingRes.data, + socialActive: socialActiveRes.data, + housingActive: housingActiveRes.data, + } }, enabled: tab === 'monthly', }) @@ -219,7 +226,7 @@ export default function SocialInsurance() { }`} onClick={() => { setTab(t); setShowVersions(false); setShowNewVersion(false); setShowAdjust(false); setAdjustData(null); setEditItems({}) }} > - {t === 'social' ? '社保' : t === 'housing' ? '公积金' : '月度增减员'} + {t === 'social' ? '社保' : t === 'housing' ? '公积金' : '月度办理'} ))} @@ -523,11 +530,11 @@ export default function SocialInsurance() { )} - {/* ========== 月度增减员 Tab ========== */} + {/* ========== 月度办理 Tab ========== */} {tab === 'monthly' && (
-

月度增减员

+

月度办理

setMonthlyMonth(e.target.value)} className="!w-32" />
- 展示当月新增参保(入职/重新入职)和减少参保(离职/解聘)的员工列表,用于社保和公积金经办机构申报。 + 展示当月社保/公积金新增(入职/重新入职)、减少(离职/解聘)及正常在保人员列表,用于经办机构申报。
{(() => { if (!monthlyChanges) return
加载中...
const sAdd = monthlyChanges.social?.additions || [] const sSub = monthlyChanges.social?.subtractions || [] + const sNormal = monthlyChanges.socialActive?.items || [] const hAdd = monthlyChanges.housing?.additions || [] const hSub = monthlyChanges.housing?.subtractions || [] - if (sAdd.length === 0 && sSub.length === 0 && hAdd.length === 0 && hSub.length === 0) { - return
{monthlyMonth} 无增减员记录
+ const hNormal = monthlyChanges.housingActive?.items || [] + if (sAdd.length === 0 && sSub.length === 0 && hAdd.length === 0 && hSub.length === 0 && sNormal.length === 0 && hNormal.length === 0) { + return
{monthlyMonth} 无办理记录
} return (
- {/* 社保增减员 */} + {/* 社保 */}

社保

@@ -588,11 +597,21 @@ export default function SocialInsurance() { {i.endMonth} ))} + {sNormal.map((i: any) => ( + + {i.name} + {i.department} + 正常 + ¥{fmt(i.base)} + {i.startMonth} + {i.endMonth || '在保'} + + ))}
- {/* 公积金增减员 */} + {/* 公积金 */}

公积金

@@ -628,6 +647,16 @@ export default function SocialInsurance() { {i.endMonth} ))} + {hNormal.map((i: any) => ( + + {i.name} + {i.department} + 正常 + ¥{fmt(i.base)} + {i.startMonth} + {i.endMonth || '在保'} + + ))}