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 { Button, Descriptions, Image, Modal, Table } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper";
|
import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper";
|
||||||
|
import { getAgeByIdCard } from "~/utils";
|
||||||
import {
|
import {
|
||||||
REGISTER_ENGINEER_CATEGORY_MAP,
|
REGISTER_ENGINEER_CATEGORY_MAP,
|
||||||
ABILITY_SOURCE_MAP,
|
ABILITY_SOURCE_MAP,
|
||||||
|
|
@ -73,7 +74,7 @@ export default function StaffViewModal({
|
||||||
? info.titleCodeArr.map((item) => ({
|
? info.titleCodeArr.map((item) => ({
|
||||||
titleName: TITLE_LEVEL_MAP[item.titleCode] || item.titleCode || "-",
|
titleName: TITLE_LEVEL_MAP[item.titleCode] || item.titleCode || "-",
|
||||||
industryName:
|
industryName:
|
||||||
PROFESSIONAL_MAJOR_MAP[item.industryCode] || item.industryCode || "-",
|
item.industryName,
|
||||||
proveUrlList: parseFileList(item.proveUrl),
|
proveUrlList: parseFileList(item.proveUrl),
|
||||||
}))
|
}))
|
||||||
: [];
|
: [];
|
||||||
|
|
@ -143,15 +144,18 @@ export default function StaffViewModal({
|
||||||
<Descriptions.Item label="性别">
|
<Descriptions.Item label="性别">
|
||||||
{GENDER_MAP[info.genderCode]}
|
{GENDER_MAP[info.genderCode]}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="身份证号">
|
||||||
|
{info.idCardNo}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="年龄">
|
||||||
|
{getAgeByIdCard(info.idCardNo) ?? "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="本行业工作年限">
|
<Descriptions.Item label="本行业工作年限">
|
||||||
{info.workDateAge}
|
{info.workDateAge}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="账号">{info.account}</Descriptions.Item>
|
<Descriptions.Item label="账号">{info.account}</Descriptions.Item>
|
||||||
<Descriptions.Item label="部门">{info.deptName}</Descriptions.Item>
|
<Descriptions.Item label="部门">{info.deptName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="岗位">{info.postName}</Descriptions.Item>
|
<Descriptions.Item label="岗位">{info.postName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="身份证号">
|
|
||||||
{info.idCardNo}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="现住地址">
|
<Descriptions.Item label="现住地址">
|
||||||
{info.currentAddress}
|
{info.currentAddress}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
|
|
@ -286,7 +290,7 @@ export default function StaffViewModal({
|
||||||
dataSource={titleInfo}
|
dataSource={titleInfo}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "职称", dataIndex: "titleName", width: 120 },
|
{ title: "职称", dataIndex: "titleName", width: 120 },
|
||||||
{ title: "专业", dataIndex: "industryName", width: 150 },
|
{ title: "系列/专业", dataIndex: "industryName", width: 150 },
|
||||||
{
|
{
|
||||||
title: "证明材料",
|
title: "证明材料",
|
||||||
dataIndex: "proveUrlList",
|
dataIndex: "proveUrlList",
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,9 @@ import {
|
||||||
import {
|
import {
|
||||||
CERT_LEVEL_OPTIONS_BY_TYPE,
|
CERT_LEVEL_OPTIONS_BY_TYPE,
|
||||||
CAPABILITY_OPTIONS,
|
CAPABILITY_OPTIONS,
|
||||||
PROFESSIONAL_MAJOR_OPTIONS,
|
|
||||||
CERT_LEVEL_LABEL_BY_TYPE
|
CERT_LEVEL_LABEL_BY_TYPE
|
||||||
} from "~/enumerate/constant";
|
} from "~/enumerate/constant";
|
||||||
import { renderCapabilityList } from "~/utils";
|
import { getAgeByIdCard, renderCapabilityList } from "~/utils";
|
||||||
import { idCardRule, mobileRule } from "~/utils/validators";
|
import { idCardRule, mobileRule } from "~/utils/validators";
|
||||||
import AttachmentUpload from "~/components/AttachmentUpload";
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
import StaffViewModal from "~/components/StaffViewModal";
|
import StaffViewModal from "~/components/StaffViewModal";
|
||||||
|
|
@ -497,6 +496,8 @@ function StaffFormModal({
|
||||||
const [deptPositionOptions, setDeptPositionOptions] = useState([]);
|
const [deptPositionOptions, setDeptPositionOptions] = useState([]);
|
||||||
const [positionLoading, setPositionLoading] = useState(false);
|
const [positionLoading, setPositionLoading] = useState(false);
|
||||||
const watchedDeptId = Form.useWatch("deptId", form);
|
const watchedDeptId = Form.useWatch("deptId", form);
|
||||||
|
const watchedIdCardNo = Form.useWatch("idCardNo", form);
|
||||||
|
const ageFromIdCard = getAgeByIdCard(watchedIdCardNo);
|
||||||
const watchedRegisterEngineerFlag = Form.useWatch(
|
const watchedRegisterEngineerFlag = Form.useWatch(
|
||||||
"registerEngineerFlag",
|
"registerEngineerFlag",
|
||||||
form,
|
form,
|
||||||
|
|
@ -706,6 +707,7 @@ function StaffFormModal({
|
||||||
titleCodeArr: [
|
titleCodeArr: [
|
||||||
{
|
{
|
||||||
industryCode: values.industryCode,
|
industryCode: values.industryCode,
|
||||||
|
industryName: values.industryName,
|
||||||
titleCode: values.titleCode,
|
titleCode: values.titleCode,
|
||||||
proveUrl: Array.isArray(values.proveUrl)
|
proveUrl: Array.isArray(values.proveUrl)
|
||||||
? JSON.stringify(values.proveUrl)
|
? JSON.stringify(values.proveUrl)
|
||||||
|
|
@ -795,6 +797,29 @@ function StaffFormModal({
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</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}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="workDateAge"
|
name="workDateAge"
|
||||||
|
|
@ -858,18 +883,6 @@ function StaffFormModal({
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</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}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="currentAddress"
|
name="currentAddress"
|
||||||
|
|
@ -1373,15 +1386,28 @@ function StaffFormModal({
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="industryCode"
|
name="industryCode"
|
||||||
label="专业"
|
label="系列/专业"
|
||||||
rules={[{ required: true, message: "请选择专业" }]}
|
rules={[{ required: true, message: "请选择系列/专业" }]}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
placeholder="请选择专业"
|
placeholder="请选择系列/专业"
|
||||||
allowClear
|
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>
|
||||||
|
<Form.Item name="industryName" noStyle />
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<AttachmentUpload
|
<AttachmentUpload
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue