feat: 专项附加扣除只显示当月社保在保人员
This commit is contained in:
@@ -1096,12 +1096,16 @@ function SpecialDeductionTab({ month, setMonth }: { month: string; setMonth: (m:
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// 查询所有员工列表(用于添加未录入的员工)
|
// 查询当月社保在保人员(只有缴纳社保的员工才需要填报专项附加扣除)
|
||||||
const { data: employees = [] } = useQuery<any[]>({
|
const { data: employees = [] } = useQuery<any[]>({
|
||||||
queryKey: ['employees-for-deduction'],
|
queryKey: ['active-social-employees', month],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const res = await api.get('/roster', { params: { pageSize: 999 } }) as any
|
const res = await api.get('/social/active-declaration', { params: { month } }) as any
|
||||||
return res.data?.items || res.data || []
|
return (res.data?.items || []).map((item: any) => ({
|
||||||
|
id: item.employeeId,
|
||||||
|
name: item.name,
|
||||||
|
department: item.department,
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user