diff --git a/backend/src/routes/roster.routes.ts b/backend/src/routes/roster.routes.ts index aef715d..441779d 100644 --- a/backend/src/routes/roster.routes.ts +++ b/backend/src/routes/roster.routes.ts @@ -222,8 +222,16 @@ router.get('/', authMiddleware, async (req: AuthRequest, res, next) => { monthlySalary: safeDecrypt(e.monthlySalary), baseSalary: e.baseSalary ? safeDecrypt(e.baseSalary) : null, performanceSalary: e.performanceSalary ? safeDecrypt(e.performanceSalary) : null, - socialInsBase: e.socialInsBase, - housingFundBase: e.housingFundBase, + socialInsBase: (() => { + const ct = latestContract?.contractType + if (!ct || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(ct)) return null + return e.socialInsBase + })(), + housingFundBase: (() => { + const ct = latestContract?.contractType + if (!ct || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(ct)) return null + return e.housingFundBase + })(), socialInsCalc: (() => { const contractType = latestContract?.contractType // 劳务协议、实习协议、兼职协议、业务外包等非劳动合同不缴纳社保 diff --git a/frontend/src/pages/Roster.tsx b/frontend/src/pages/Roster.tsx index c934f03..b41544c 100644 --- a/frontend/src/pages/Roster.tsx +++ b/frontend/src/pages/Roster.tsx @@ -917,11 +917,7 @@ export default function Roster() { })()} } {colVisible('socialInsBase') &&