fix: 薪资批次排除预入职员工(hireDate > 批次月末)

原查询只过滤status=ACTIVE,预入职员工status也是ACTIVE会被错误纳入。
增加hireDate <= monthEnd条件,确保只拉入已入职员工。

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
selfrelease
2026-08-18 14:15:38 +08:00
parent 1feada76d1
commit 9ac07eba0f
11 changed files with 474 additions and 120 deletions
+24
View File
@@ -1174,6 +1174,7 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
<thead>
<tr className="border-b text-left text-xs text-gray-500">
<th className="py-2 px-2"></th>
<th className="py-2 px-2"></th>
<th className="py-2 px-2 text-right"></th>
<th className="py-2 px-2 text-right"></th>
<th className="py-2 px-2 text-right"></th>
@@ -1203,6 +1204,29 @@ function BatchDetail({ batchId, onBack }: { batchId: string; onBack: () => void
)}
</div>
</td>
<td className="py-2 px-2">
{(() => {
const ct = entry.employee.contracts?.[0]?.contractType
const cfg: Record<string, { label: string; style: string }> = {
FIXED: { label: '固定期限', style: 'bg-blue-50 text-blue-700' },
UNFIXED: { label: '无固定期', style: 'bg-purple-50 text-purple-700' },
LABOR: { label: '劳务协议', style: 'bg-amber-50 text-amber-700' },
INTERNSHIP: { label: '实习协议', style: 'bg-teal-50 text-teal-700' },
PARTTIME: { label: '兼职协议', style: 'bg-cyan-50 text-cyan-700' },
OUTSOURCING: { label: '业务外包', style: 'bg-slate-50 text-slate-700' },
DISPATCH: { label: '劳务派遣', style: 'bg-cyan-50 text-cyan-700' },
UNSIGNED: { label: '未签合同', style: 'bg-red-50 text-danger' },
}
const c = cfg[ct || ''] || { label: '未签合同', style: 'bg-red-50 text-danger' }
const noSocial = ct && ['LABOR', 'INTERNSHIP', 'PARTTIME', 'OUTSOURCING', 'UNSIGNED'].includes(ct)
return (
<div className="flex flex-col gap-0.5">
<span className={`px-1.5 py-0.5 rounded text-[11px] ${c.style}`}>{c.label}</span>
{noSocial && <span className="text-[10px] text-gray-400"></span>}
</div>
)
})()}
</td>
{renderCell(entry, 'baseSalary')}
{renderCell(entry, 'overtimePay')}
{renderCell(entry, 'allowance')}