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 || '在保'} + + ))}