fix: 非列表页面姓名显示处也加上身份证号

后端:
- employee.routes.ts: checkPhone 返回 idCardNumber
- risk.service.ts: 风险项查询加上 idCardNumber 并解密
- dashboard.routes.ts: 风险中心返回 employeeIdCardNumber

前端:
- Termination.tsx: 离职管理所有姓名显示处加上身份证号(员工概况、通知书、PDF导出、下拉选项)
- Roster.tsx: 弹窗标题加上身份证号,signChoice 传递 idCardNumber
- SignMethodChoice.tsx: 签署方式弹窗显示身份证号
- Contracts.tsx: 手机查重提示加上身份证号
- RiskCenter.tsx: 风险卡片员工姓名后显示身份证号
This commit is contained in:
freedakgmail
2026-08-18 07:46:43 +08:00
parent a58cc3f6f9
commit 5c016914dd
8 changed files with 28 additions and 14 deletions
@@ -23,6 +23,8 @@ interface SignMethodChoiceProps {
employeeId: string
/** 员工姓名(用于显示) */
employeeName: string
/** 员工身份证号(用于显示) */
employeeIdCardNumber?: string
/** 签署场景 */
scene: 'CONTRACT' | 'RESIGNATION' | 'POLICY' | 'PAYSLIP' | 'ONBOARDING'
/** 文件标题 */
@@ -48,6 +50,7 @@ export default function SignMethodChoice({
onClose,
employeeId,
employeeName,
employeeIdCardNumber,
scene,
documentTitle,
contractId,
@@ -107,7 +110,7 @@ export default function SignMethodChoice({
<Modal open={open} onClose={onClose} title={`${actionName}成功 — 选择签署方式`} size="sm">
<div className="space-y-4">
<div className="text-sm text-gray-600 bg-gray-50 rounded-md p-3">
<div className="font-medium text-gray-700">{employeeName} · {SCENE_LABELS[scene] || scene}</div>
<div className="font-medium text-gray-700">{employeeName} · {SCENE_LABELS[scene] || scene}{employeeIdCardNumber && <span className="ml-1 text-gray-400 font-mono text-xs">{employeeIdCardNumber}</span>}</div>
<div className="text-xs text-gray-400 mt-1">{documentTitle}</div>
</div>