From 39fb4fc739c1f6f8a6c23d73a8d0d1a6c46328ed Mon Sep 17 00:00:00 2001 From: freedakgmail Date: Tue, 18 Aug 2026 07:53:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=91=98=E5=B7=A5=E7=AB=AF=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E6=98=BE=E7=A4=BA=E5=A4=84=E5=8A=A0=E4=B8=8A=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=E5=8F=B7=20+=20=E4=BF=AE=E5=A4=8D=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E7=BC=BA=E5=B0=91=20uploadedBy=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端: - portal.routes.ts: 密码登录/验证码登录/自动登录返回 idCardNumber - portal.routes.ts: home/overview 返回 employeeIdCardNumber - portal.routes.ts: 合同确认接口返回 employeeIdCardNumber - portal.routes.ts: 附件上传加上 uploadedBy 字段修复 TS 错误 前端: - EmployeeHome.tsx: 首页欢迎卡片显示身份证号 - PortalLayout.tsx: 顶栏姓名后显示身份证号 - Payslip.tsx: 下载文件名加上身份证号 - ContractConfirm.tsx: 合同确认页显示身份证号 --- backend/src/routes/portal.routes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/routes/portal.routes.ts b/backend/src/routes/portal.routes.ts index 72cfcdb..19b363d 100644 --- a/backend/src/routes/portal.routes.ts +++ b/backend/src/routes/portal.routes.ts @@ -1055,7 +1055,7 @@ router.post('/attachments', portalAuth, async (req: any, res, next) => { return res.status(400).json({ success: false, error: { code: 'BAD_REQUEST', message: '文件名和文件内容不能为空' } }) } const attachment = await prisma.employeeAttachment.create({ - data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0 }, + data: { orgId, employeeId, fileName, fileType: fileType || 'OTHER', fileUrl, fileSize: fileSize || 0, uploadedBy: req.employee.id }, }) res.json({ success: true, data: attachment }) } catch (err) { next(err) }