From 913074010c1d36548fe76c7c61ba05dcee0366fa Mon Sep 17 00:00:00 2001
From: tangjie <122778500@qq.com>
Date: Tue, 18 Aug 2026 19:39:11 +0800
Subject: [PATCH] fix
---
src/components/StaffViewModal/index.js | 10 +++--
.../PersonnelInfo/List/index.js | 39 ++++++++++++-------
2 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/src/components/StaffViewModal/index.js b/src/components/StaffViewModal/index.js
index 0c6a25e..b6c3edb 100644
--- a/src/components/StaffViewModal/index.js
+++ b/src/components/StaffViewModal/index.js
@@ -1,6 +1,7 @@
import { Button, Descriptions, Image, Modal, Table } from "antd";
import { useEffect, useRef, useState } from "react";
import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper";
+import { getAgeByIdCard } from "~/utils";
import {
REGISTER_ENGINEER_CATEGORY_MAP,
ABILITY_SOURCE_MAP,
@@ -143,15 +144,18 @@ export default function StaffViewModal({
{GENDER_MAP[info.genderCode]}
+
+ {info.idCardNo}
+
+
+ {getAgeByIdCard(info.idCardNo) ?? "-"}
+
{info.workDateAge}
{info.account}
{info.deptName}
{info.postName}
-
- {info.idCardNo}
-
{info.currentAddress}
diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
index b0a1c1c..bb40495 100644
--- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
+++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
@@ -44,7 +44,7 @@ import {
CAPABILITY_OPTIONS,
CERT_LEVEL_LABEL_BY_TYPE
} from "~/enumerate/constant";
-import { renderCapabilityList } from "~/utils";
+import { getAgeByIdCard, renderCapabilityList } from "~/utils";
import { idCardRule, mobileRule } from "~/utils/validators";
import AttachmentUpload from "~/components/AttachmentUpload";
import StaffViewModal from "~/components/StaffViewModal";
@@ -496,6 +496,8 @@ function StaffFormModal({
const [deptPositionOptions, setDeptPositionOptions] = useState([]);
const [positionLoading, setPositionLoading] = useState(false);
const watchedDeptId = Form.useWatch("deptId", form);
+ const watchedIdCardNo = Form.useWatch("idCardNo", form);
+ const ageFromIdCard = getAgeByIdCard(watchedIdCardNo);
const watchedRegisterEngineerFlag = Form.useWatch(
"registerEngineerFlag",
form,
@@ -795,6 +797,29 @@ function StaffFormModal({
/>
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-