Merge remote-tracking branch 'origin/dev-tmp1' into dev-tmp1
# Conflicts: # jjb.config.jsdev-tmp1
commit
31234feaf2
|
|
@ -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({
|
|||
<Descriptions.Item label="性别">
|
||||
{GENDER_MAP[info.genderCode]}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="身份证号">
|
||||
{info.idCardNo}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="年龄">
|
||||
{getAgeByIdCard(info.idCardNo) ?? "-"}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="本行业工作年限">
|
||||
{info.workDateAge}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="账号">{info.account}</Descriptions.Item>
|
||||
<Descriptions.Item label="部门">{info.deptName}</Descriptions.Item>
|
||||
<Descriptions.Item label="岗位">{info.postName}</Descriptions.Item>
|
||||
<Descriptions.Item label="身份证号">
|
||||
{info.idCardNo}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="现住地址">
|
||||
{info.currentAddress}
|
||||
</Descriptions.Item>
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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({
|
|||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="idCardNo"
|
||||
label="身份证号"
|
||||
rules={[
|
||||
idCardRule(true),
|
||||
{ max: 18, message: "身份证号不能超过18个字符" },
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入身份证号" maxLength={18} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item label="年龄">
|
||||
<Input
|
||||
disabled
|
||||
value={
|
||||
ageFromIdCard != null ? String(ageFromIdCard) : undefined
|
||||
}
|
||||
placeholder="输入身份证号后自动计算"
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="workDateAge"
|
||||
|
|
@ -858,18 +883,6 @@ function StaffFormModal({
|
|||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="idCardNo"
|
||||
label="身份证号"
|
||||
rules={[
|
||||
idCardRule(true),
|
||||
{ max: 18, message: "身份证号不能超过18个字符" },
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入身份证号" maxLength={18} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="currentAddress"
|
||||
|
|
@ -1373,15 +1386,28 @@ function StaffFormModal({
|
|||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="industryCode"
|
||||
label="专业"
|
||||
rules={[{ required: true, message: "请选择专业" }]}
|
||||
label="系列/专业"
|
||||
rules={[{ required: true, message: "请选择系列/专业" }]}
|
||||
>
|
||||
<Select
|
||||
placeholder="请选择专业"
|
||||
placeholder="请选择系列/专业"
|
||||
allowClear
|
||||
options={PROFESSIONAL_MAJOR_OPTIONS}
|
||||
showSearch
|
||||
onChange={(val, option) => {
|
||||
form.setFieldValue('industryName', option?.label);
|
||||
}}
|
||||
optionFilterProp="label"
|
||||
options={(staffInfo?.basicDisciplineMajorList || []).map(
|
||||
(item) => ({
|
||||
label: `${item.professionalName}`,
|
||||
value: item.id,
|
||||
}),
|
||||
)}
|
||||
loading={staffInfo?.staffInfoLoading}
|
||||
disabled={!staffInfo?.basicDisciplineMajorList?.length}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item name="industryName" noStyle />
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<AttachmentUpload
|
||||
|
|
|
|||
Loading…
Reference in New Issue