fix: 后端对非劳动合同类型 socialInsBase/housingFundBase 返回 null
不再在数据源头返回社保基数和公积金基数,而非前端隐藏
This commit is contained in:
@@ -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
|
||||
// 劳务协议、实习协议、兼职协议、业务外包等非劳动合同不缴纳社保
|
||||
|
||||
@@ -917,11 +917,7 @@ export default function Roster() {
|
||||
})()}
|
||||
</td>}
|
||||
{colVisible('socialInsBase') && <td className="px-4 py-2.5 text-right text-xs">
|
||||
{(() => {
|
||||
const ct = e.latestContract?.contractType
|
||||
if (!ct || ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(ct)) return <span className="text-gray-300">—</span>
|
||||
return e.socialInsBase ? e.socialInsBase.toLocaleString() : <span className="text-gray-300">—</span>
|
||||
})()}
|
||||
{e.socialInsBase ? e.socialInsBase.toLocaleString() : <span className="text-gray-300">—</span>}
|
||||
</td>}
|
||||
{colVisible('socialInsAmount') && <td className="px-4 py-2.5 text-right">
|
||||
{(() => {
|
||||
|
||||
Reference in New Issue
Block a user