diff --git a/src/components/StaffViewModal/index.js b/src/components/StaffViewModal/index.js index 5b10725..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, @@ -73,7 +74,7 @@ export default function StaffViewModal({ ? info.titleCodeArr.map((item) => ({ titleName: TITLE_LEVEL_MAP[item.titleCode] || item.titleCode || "-", industryName: - PROFESSIONAL_MAJOR_MAP[item.industryCode] || item.industryCode || "-", + item.industryName, proveUrlList: parseFileList(item.proveUrl), })) : []; @@ -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} @@ -286,7 +290,7 @@ export default function StaffViewModal({ dataSource={titleInfo} columns={[ { title: "职称", dataIndex: "titleName", width: 120 }, - { title: "专业", dataIndex: "industryName", width: 150 }, + { title: "系列/专业", dataIndex: "industryName", width: 150 }, { title: "证明材料", dataIndex: "proveUrlList", diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js index ce44c5b..bb40495 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js @@ -42,10 +42,9 @@ import { import { CERT_LEVEL_OPTIONS_BY_TYPE, CAPABILITY_OPTIONS, - PROFESSIONAL_MAJOR_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"; @@ -497,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, @@ -706,6 +707,7 @@ function StaffFormModal({ titleCodeArr: [ { industryCode: values.industryCode, + industryName: values.industryName, titleCode: values.titleCode, proveUrl: Array.isArray(values.proveUrl) ? JSON.stringify(values.proveUrl) @@ -795,6 +797,29 @@ function StaffFormModal({ /> + + + + + + + + + + - - - - -