Compare commits
No commits in common. "ee34cebb5ebc75a7d4cd0c9dabee603a1ed9b2ee" and "2b8f7e0c50858c60f8a7bd656648aa13897976ae" have entirely different histories.
ee34cebb5e
...
2b8f7e0c50
|
|
@ -14,6 +14,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
|||
label={label}
|
||||
valuePropName="fileList"
|
||||
getValueProps={(value) => {
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return { fileList: value };
|
||||
}
|
||||
|
|
@ -29,6 +30,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
|
|||
};
|
||||
}}
|
||||
getValueFromEvent={({ fileList }) => {
|
||||
|
||||
return (
|
||||
fileList?.map((file) => ({
|
||||
url: file.response?.data?.url || file.url,
|
||||
|
|
|
|||
|
|
@ -1,16 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import {
|
||||
Button,
|
||||
DatePicker,
|
||||
Form,
|
||||
Input,
|
||||
message,
|
||||
Modal,
|
||||
Row,
|
||||
Col,
|
||||
Select,
|
||||
Table,
|
||||
} from "antd";
|
||||
import { Button, DatePicker, Form, Input, message, Modal, Row, Col, Select, Table, Upload } from "antd";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import dayjs from "dayjs";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
|
|
@ -31,7 +21,6 @@ import {
|
|||
} from "~/enumerate/enterpriseOptions";
|
||||
import { getBirthDateFromIdCard } from "~/utils";
|
||||
import { idCardRule, mobileRule } from "~/utils/validators";
|
||||
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||
import StaffViewModal from "../StaffViewModal";
|
||||
|
||||
const { router } = tools;
|
||||
|
|
@ -59,26 +48,17 @@ function PersonnelInfoPage(props) {
|
|||
Get("/safetyEval/org-position/page", { current: 1, size: 200 }),
|
||||
]);
|
||||
if (cancelled) return;
|
||||
setDeptOptions(
|
||||
(deptRes?.data || []).map((d) => ({
|
||||
label: d.deptName,
|
||||
value: d.id,
|
||||
})),
|
||||
);
|
||||
setPositionOptions(
|
||||
(posRes?.data || []).map((p) => ({
|
||||
label: p.positionName,
|
||||
value: p.id,
|
||||
deptId: p.deptId,
|
||||
})),
|
||||
);
|
||||
setDeptOptions((deptRes?.data || []).map((d) => ({ label: d.deptName, value: d.id })));
|
||||
setPositionOptions((posRes?.data || []).map((p) => ({
|
||||
label: p.positionName,
|
||||
value: p.id,
|
||||
deptId: p.deptId,
|
||||
})));
|
||||
} catch (err) {
|
||||
console.warn("[PersonnelInfo] load dept/position options failed:", err);
|
||||
}
|
||||
})();
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
return () => { cancelled = true; };
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -154,37 +134,19 @@ function PersonnelInfoPage(props) {
|
|||
loading={loading}
|
||||
formLine={[
|
||||
<Form.Item key="userName" name="userName">
|
||||
<ControlWrapper.Input
|
||||
label="用户名称"
|
||||
placeholder="请输入用户名称"
|
||||
allowClear
|
||||
/>
|
||||
<ControlWrapper.Input label="用户名称" placeholder="请输入用户名称" allowClear />
|
||||
</Form.Item>,
|
||||
<Form.Item key="deptId" name="deptId">
|
||||
<ControlWrapper.Select
|
||||
label="部门"
|
||||
placeholder="请选择部门"
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
<ControlWrapper.Select label="部门" placeholder="请选择部门" allowClear style={{ width: "100%" }}>
|
||||
{deptOptions.map((d) => (
|
||||
<Select.Option key={d.value} value={d.value}>
|
||||
{d.label}
|
||||
</Select.Option>
|
||||
<Select.Option key={d.value} value={d.value}>{d.label}</Select.Option>
|
||||
))}
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
<Form.Item key="postId" name="postId">
|
||||
<ControlWrapper.Select
|
||||
label="岗位"
|
||||
placeholder="请选择岗位"
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
<ControlWrapper.Select label="岗位" placeholder="请选择岗位" allowClear style={{ width: "100%" }}>
|
||||
{positionOptions.map((p) => (
|
||||
<Select.Option key={p.value} value={p.value}>
|
||||
{p.label}
|
||||
</Select.Option>
|
||||
<Select.Option key={p.value} value={p.value}>{p.label}</Select.Option>
|
||||
))}
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
|
|
@ -204,7 +166,7 @@ function PersonnelInfoPage(props) {
|
|||
{ title: "用户名称", dataIndex: "userName" },
|
||||
{ title: "账号", dataIndex: "account" },
|
||||
{ title: "部门", dataIndex: "deptName" },
|
||||
{ title: "岗位", dataIndex: "postName" },
|
||||
{ title: "岗位", dataIndex: "positionName" },
|
||||
{
|
||||
title: "证照名称",
|
||||
dataIndex: "certNames",
|
||||
|
|
@ -216,51 +178,17 @@ function PersonnelInfoPage(props) {
|
|||
width: 320,
|
||||
render: (_, record) => (
|
||||
<TableAction>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setCurrentId(record.id);
|
||||
setViewModalOpen(true);
|
||||
}}
|
||||
>
|
||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); setViewModalOpen(true); }}>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setCurrentId(record.id);
|
||||
setFormModalOpen(true);
|
||||
}}
|
||||
>
|
||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); setFormModalOpen(true); }}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
setCurrentId(record.id);
|
||||
goCertificate(record.id, record.userName);
|
||||
}}
|
||||
>
|
||||
<Button type="link" size="small" onClick={() => { setCurrentId(record.id); goCertificate(record.id, record.userName); }}>
|
||||
证书
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => onResetPassword(record.id)}
|
||||
>
|
||||
重置密码
|
||||
</Button>
|
||||
<Button
|
||||
danger
|
||||
type="link"
|
||||
size="small"
|
||||
onClick={() => onDelete(record.id)}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
<Button type="link" size="small" onClick={() => onResetPassword(record.id)}>重置密码</Button>
|
||||
<Button danger type="link" size="small" onClick={() => onDelete(record.id)}>删除</Button>
|
||||
</TableAction>
|
||||
),
|
||||
},
|
||||
|
|
@ -314,21 +242,14 @@ function PersonnelInfoPage(props) {
|
|||
}
|
||||
|
||||
function StaffFormModal({
|
||||
open,
|
||||
currentId,
|
||||
staffInfoGet,
|
||||
staffInfoAdd,
|
||||
staffInfoEdit,
|
||||
deptOptions,
|
||||
positionOptions,
|
||||
onCancel,
|
||||
onSuccess,
|
||||
open, currentId, staffInfoGet, staffInfoAdd, staffInfoEdit, deptOptions, positionOptions, onCancel, onSuccess,
|
||||
}) {
|
||||
const [form] = Form.useForm();
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [detailLoading, setDetailLoading] = useState(false);
|
||||
const [deptPositionOptions, setDeptPositionOptions] = useState([]);
|
||||
const [positionLoading, setPositionLoading] = useState(false);
|
||||
const [uploadFileList, setUploadFileList] = useState([]);
|
||||
const watchedDeptId = Form.useWatch("deptId", form);
|
||||
const wasOpenRef = useRef(false);
|
||||
const inflightDeptRef = useRef(null);
|
||||
|
|
@ -343,11 +264,7 @@ function StaffFormModal({
|
|||
inflightDeptRef.current = id;
|
||||
setPositionLoading(true);
|
||||
try {
|
||||
const res = await Get("/safetyEval/org-position/page", {
|
||||
current: 1,
|
||||
size: 200,
|
||||
deptId: id,
|
||||
});
|
||||
const res = await Get("/safetyEval/org-position/page", { current: 1, size: 200, deptId: id });
|
||||
const options = (res?.data || []).map((p) => ({
|
||||
label: p.positionName,
|
||||
value: p.id,
|
||||
|
|
@ -369,6 +286,7 @@ function StaffFormModal({
|
|||
if (!currentId) {
|
||||
form.resetFields();
|
||||
setDeptPositionOptions([]);
|
||||
setUploadFileList([]);
|
||||
form.setFieldsValue({
|
||||
registerEngineerFlag: 2,
|
||||
});
|
||||
|
|
@ -376,6 +294,7 @@ function StaffFormModal({
|
|||
}
|
||||
if (!open) {
|
||||
setDeptPositionOptions([]);
|
||||
setUploadFileList([]);
|
||||
}
|
||||
wasOpenRef.current = open;
|
||||
}, [open, currentId, form]);
|
||||
|
|
@ -384,34 +303,36 @@ function StaffFormModal({
|
|||
if (!open || !currentId) return;
|
||||
let cancelled = false;
|
||||
setDetailLoading(true);
|
||||
staffInfoGet({ id: currentId })
|
||||
.then((res) => {
|
||||
if (cancelled || !res?.data) return;
|
||||
const data = { ...res.data };
|
||||
loadPositionsByDept(data.deptId);
|
||||
if (cancelled) return;
|
||||
const setFields = {
|
||||
...data,
|
||||
};
|
||||
if (data.birthDate) setFields.birthDate = dayjs(data.birthDate);
|
||||
|
||||
if (setFields.proofMaterialUrl) {
|
||||
setFields.proofMaterialUrl = JSON.parse(setFields.proofMaterialUrl);
|
||||
}
|
||||
|
||||
form.setFieldsValue(setFields);
|
||||
})
|
||||
.finally(() => {
|
||||
if (!cancelled) setDetailLoading(false);
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
staffInfoGet({ id: currentId }).then((res) => {
|
||||
if (cancelled || !res?.data) return;
|
||||
const data = { ...res.data };
|
||||
loadPositionsByDept(data.deptId);
|
||||
if (cancelled) return;
|
||||
const setFields = {
|
||||
...data,
|
||||
};
|
||||
if (data.birthDate) setFields.birthDate = dayjs(data.birthDate);
|
||||
const fileList = data.proofMaterialUrl
|
||||
? data.proofMaterialUrl.split(",").filter(Boolean).map((url, i) => ({
|
||||
uid: `-${i}`,
|
||||
name: url.split("/").pop() || `附件${i + 1}`,
|
||||
status: "done",
|
||||
url,
|
||||
}))
|
||||
: [];
|
||||
setFields.proofMaterialUrl = fileList;
|
||||
setUploadFileList(fileList);
|
||||
form.setFieldsValue(setFields);
|
||||
}).finally(() => {
|
||||
if (!cancelled) setDetailLoading(false);
|
||||
});
|
||||
return () => { cancelled = true; };
|
||||
}, [open, currentId]);
|
||||
|
||||
const handleCancel = () => {
|
||||
form.resetFields();
|
||||
setDeptPositionOptions([]);
|
||||
setUploadFileList([]);
|
||||
onCancel();
|
||||
};
|
||||
|
||||
|
|
@ -433,12 +354,7 @@ function StaffFormModal({
|
|||
setSubmitting(true);
|
||||
const payload = {
|
||||
...values,
|
||||
genderName:
|
||||
values.genderCode === 1
|
||||
? "男"
|
||||
: values.genderCode === 2
|
||||
? "女"
|
||||
: undefined,
|
||||
genderName: values.genderCode === 1 ? "男" : values.genderCode === 2 ? "女" : undefined,
|
||||
personTypeCode: values.personTypeName,
|
||||
personTypeName: values.personTypeName,
|
||||
professionalLevelCode: values.professionalLevelName,
|
||||
|
|
@ -448,8 +364,8 @@ function StaffFormModal({
|
|||
educationLevelCode: values.educationLevelName,
|
||||
educationLevelName: values.educationLevelName,
|
||||
proofMaterialUrl: Array.isArray(values.proofMaterialUrl)
|
||||
? JSON.stringify(values.proofMaterialUrl)
|
||||
: undefined,
|
||||
? values.proofMaterialUrl.map((f) => f.url || f.response?.url).filter(Boolean).join(",")
|
||||
: "",
|
||||
};
|
||||
if (payload.birthDate && typeof payload.birthDate !== "string") {
|
||||
payload.birthDate = payload.birthDate.format("YYYY-MM-DD");
|
||||
|
|
@ -490,26 +406,15 @@ function StaffFormModal({
|
|||
>
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="userName"
|
||||
label="姓名"
|
||||
rules={[{ required: true, message: "请输入姓名" }]}
|
||||
>
|
||||
<Form.Item name="userName" label="姓名" rules={[{ required: true, message: "请输入姓名" }]}>
|
||||
<Input placeholder="请输入姓名" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="genderCode"
|
||||
label="性别"
|
||||
rules={[{ required: true, message: "请选择性别" }]}
|
||||
>
|
||||
<Form.Item name="genderCode" label="性别" rules={[{ required: true, message: "请选择性别" }]}>
|
||||
<Select
|
||||
placeholder="请选择性别"
|
||||
options={[
|
||||
{ label: "男", value: 1 },
|
||||
{ label: "女", value: 2 },
|
||||
]}
|
||||
options={[{ label: "男", value: 1 }, { label: "女", value: 2 }]}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
@ -519,35 +424,17 @@ function StaffFormModal({
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="account"
|
||||
label="账号"
|
||||
rules={[mobileRule("账号", true)]}
|
||||
>
|
||||
<Form.Item name="account" label="账号" rules={[mobileRule("账号", true)]}>
|
||||
<Input placeholder="请输入账号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="deptId"
|
||||
label="部门"
|
||||
rules={[{ required: true, message: "请选择部门" }]}
|
||||
>
|
||||
<Select
|
||||
placeholder="请选择部门"
|
||||
options={deptOptions}
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
/>
|
||||
<Form.Item name="deptId" label="部门" rules={[{ required: true, message: "请选择部门" }]}>
|
||||
<Select placeholder="请选择部门" options={deptOptions} allowClear showSearch optionFilterProp="label" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="postId"
|
||||
label="岗位"
|
||||
rules={[{ required: true, message: "请选择岗位" }]}
|
||||
>
|
||||
<Form.Item name="postId" label="岗位" rules={[{ required: true, message: "请选择岗位" }]}>
|
||||
<Select
|
||||
placeholder="请选择岗位"
|
||||
options={deptPositionOptions}
|
||||
|
|
@ -560,38 +447,23 @@ function StaffFormModal({
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="idCardNo"
|
||||
label="身份证号"
|
||||
rules={[idCardRule(true)]}
|
||||
>
|
||||
<Form.Item name="idCardNo" label="身份证号" rules={[idCardRule(true)]}>
|
||||
<Input placeholder="请输入身份证号" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="personTypeName" label="人员类型">
|
||||
<Select
|
||||
placeholder="请选择人员类型"
|
||||
options={PERSON_TYPE_OPTIONS}
|
||||
/>
|
||||
<Select placeholder="请选择人员类型" options={PERSON_TYPE_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="qualScope" label="资质范围">
|
||||
<Select
|
||||
placeholder="请选择资质范围"
|
||||
allowClear
|
||||
options={QUALIFICATION_INDUSTRY_OPTIONS}
|
||||
/>
|
||||
<Select placeholder="请选择资质范围" allowClear options={QUALIFICATION_INDUSTRY_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="professionalLevelName" label="职业等级">
|
||||
<Select
|
||||
placeholder="请选择职业等级"
|
||||
allowClear
|
||||
options={PROFESSIONAL_LEVEL_OPTIONS}
|
||||
/>
|
||||
<Select placeholder="请选择职业等级" allowClear options={PROFESSIONAL_LEVEL_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
|
@ -601,20 +473,12 @@ function StaffFormModal({
|
|||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="educationTypeName" label="学历类型">
|
||||
<Select
|
||||
placeholder="请选择学历类型"
|
||||
allowClear
|
||||
options={EDUCATION_TYPE_OPTIONS}
|
||||
/>
|
||||
<Select placeholder="请选择学历类型" allowClear options={EDUCATION_TYPE_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="educationLevelName" label="学历层次">
|
||||
<Select
|
||||
placeholder="请选择学历层次"
|
||||
allowClear
|
||||
options={EDUCATION_LEVEL_OPTIONS}
|
||||
/>
|
||||
<Select placeholder="请选择学历层次" allowClear options={EDUCATION_LEVEL_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
|
@ -623,30 +487,17 @@ function StaffFormModal({
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
name="registerEngineerFlag"
|
||||
label="是否注册安全工程师"
|
||||
initialValue={2}
|
||||
>
|
||||
<Select
|
||||
placeholder="请选择"
|
||||
options={REGISTER_ENGINEER_OPTIONS}
|
||||
/>
|
||||
<Form.Item name="registerEngineerFlag" label="是否注册安全工程师" initialValue={2}>
|
||||
<Select placeholder="请选择" options={REGISTER_ENGINEER_OPTIONS} />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name="publications"
|
||||
label="出版学术专著、专利、获奖、发表学术论文等"
|
||||
>
|
||||
<Form.Item name="publications" label="出版学术专著、专利、获奖、发表学术论文等">
|
||||
<Input.TextArea rows={2} placeholder="请输入" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<Form.Item
|
||||
name="abilityDeclaration"
|
||||
label="自我申报的专业能力及认定方式"
|
||||
>
|
||||
<Form.Item name="abilityDeclaration" label="自我申报的专业能力及认定方式">
|
||||
<Input.TextArea rows={2} placeholder="请输入" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
|
|
@ -656,11 +507,21 @@ function StaffFormModal({
|
|||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={24}>
|
||||
<AttachmentUpload
|
||||
name="proofMaterialUrl"
|
||||
label="申报专业能力证明材料"
|
||||
maxCount={5}
|
||||
/>
|
||||
<Form.Item name="proofMaterialUrl" label="申报专业能力证明材料" valuePropName="fileList" getValueFromEvent={(e) => {
|
||||
if (Array.isArray(e)) return e;
|
||||
return e?.fileList;
|
||||
}}>
|
||||
<Upload
|
||||
action="/api/upload"
|
||||
maxCount={5}
|
||||
fileList={uploadFileList}
|
||||
onChange={(info) => {
|
||||
setUploadFileList(info.fileList);
|
||||
}}
|
||||
>
|
||||
<Button icon={<UploadOutlined />}>上传文件</Button>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Form.Item name="currentAddress" label="现住地址">
|
||||
|
|
@ -688,7 +549,4 @@ function StaffFormModal({
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect(
|
||||
[NS_STAFF_INFO],
|
||||
true,
|
||||
)(AntdTableFuncControl(PersonnelInfoPage));
|
||||
export default Connect([NS_STAFF_INFO], true)(AntdTableFuncControl(PersonnelInfoPage));
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Button, Descriptions, Modal, Table, Upload } from "antd";
|
||||
import { Button, Descriptions, Modal, Table } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal";
|
||||
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
|
||||
|
|
@ -85,9 +85,7 @@ export default function StaffViewModal({
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : [];
|
||||
|
||||
const proofFiles = info.proofMaterials || [];
|
||||
const certPreviewFiles = certPreviewInfo?.certImgs?.length
|
||||
? certPreviewInfo.certImgs
|
||||
: certPreviewInfo?.certImgFiles || [];
|
||||
|
|
@ -107,25 +105,25 @@ export default function StaffViewModal({
|
|||
onCancel={onCancel}
|
||||
>
|
||||
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
|
||||
<Descriptions.Item label="姓名">{info.userName}</Descriptions.Item>
|
||||
<Descriptions.Item label="性别">{GENDER_MAP[info.genderCode]}</Descriptions.Item>
|
||||
<Descriptions.Item label="姓名">{info.staffName}</Descriptions.Item>
|
||||
<Descriptions.Item label="性别">{GENDER_MAP[info.gender]}</Descriptions.Item>
|
||||
<Descriptions.Item label="出生日期">{info.birthDate}</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.positionName}</Descriptions.Item>
|
||||
<Descriptions.Item label="人员类型">{info.personType || "基础人员"}</Descriptions.Item>
|
||||
<Descriptions.Item label="资质范围">{info.qualScope || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="职业等级">{info.professionalLevelName || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="职业等级">{info.professionalLevel || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="证书编号">{info.evaluatorCertNo || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="学历类型">{info.educationTypeName || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="学历层次">{info.educationLevelName || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="学历类型">{info.educationType || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="学历层次">{info.educationLevel || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="职称">{info.titleName || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="是否注册安全工程师">
|
||||
{REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="身份证号">{info.idCardNo}</Descriptions.Item>
|
||||
|
||||
<Descriptions.Item label="现住地址" span={2}>{info.currentAddress}</Descriptions.Item>
|
||||
<Descriptions.Item label="学历">{info.education || "-"}</Descriptions.Item>
|
||||
<Descriptions.Item label="现住地址" span={2}>{info.homeAddress}</Descriptions.Item>
|
||||
<Descriptions.Item label="办公地址" span={2}>{info.officeAddress}</Descriptions.Item>
|
||||
<Descriptions.Item label="毕业院校">{info.graduateSchool}</Descriptions.Item>
|
||||
<Descriptions.Item label="专业">{info.major}</Descriptions.Item>
|
||||
|
|
@ -139,14 +137,26 @@ export default function StaffViewModal({
|
|||
{info.workExperience || "-"}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="申报专业能力证明材料" span={2}>
|
||||
{proofMaterialUrl.length ? proofMaterialUrl.map((item) => (
|
||||
<div key={item.id}>
|
||||
<a href={item.url} target="_blank" rel="noopener noreferrer">
|
||||
{item.fileName || item.name || item.url}
|
||||
</a>
|
||||
{proofFiles.length ? (
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: 4 }}>
|
||||
{proofFiles.map((file, index) => {
|
||||
const fileName = file.name || file.fileName || `专业能力证明${index + 1}.pdf`;
|
||||
return (
|
||||
<div key={`${fileName}-${index}`} style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
||||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
style={{ padding: 0 }}
|
||||
onClick={() => setAttachmentPreview({ url: file.url, fileName })}
|
||||
>
|
||||
查看附件
|
||||
</Button>
|
||||
<span>{fileName}</span>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)) : "-"
|
||||
}
|
||||
) : "-"}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
|
|
|
|||
|
|
@ -223,7 +223,6 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
|
|||
setSubmitting(true);
|
||||
values.applyTime =
|
||||
values.applyTime?.format?.("YYYY-MM-DD HH:mm:ss") || values.applyTime;
|
||||
|
||||
values.expectedResignDate =
|
||||
values.expectedResignDate?.format?.("YYYY-MM-DD") ||
|
||||
values.expectedResignDate;
|
||||
|
|
@ -343,9 +342,7 @@ function ViewModal({ open, currentId, requestDetail, onCancel }) {
|
|||
</Descriptions.Item>
|
||||
<Descriptions.Item label="备注">{info.remark}</Descriptions.Item>
|
||||
<Descriptions.Item label="离职通知报告">
|
||||
<a href={info.reportFileUrl} target="_blank" rel="noopener noreferrer">
|
||||
查看
|
||||
</a>
|
||||
{info.reportFileUrl || "-"}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Modal>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ function OrgPersonnelSelectModalInner(props) {
|
|||
columns={[
|
||||
{ title: "人员姓名", dataIndex: "userName" },
|
||||
{ title: "类型", dataIndex: "personTypeName" },
|
||||
|
||||
{ title: "职务", dataIndex: "positionName" },
|
||||
{ title: "职称", dataIndex: "titleName" },
|
||||
{
|
||||
title: "操作",
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default function PersonnelStep({
|
|||
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
||||
{ title: "人员姓名", dataIndex: "userName" },
|
||||
{ title: "类型", dataIndex: "personTypeName" },
|
||||
|
||||
{ title: "职务", dataIndex: "positionName" },
|
||||
{ title: "职称", dataIndex: "titleName" },
|
||||
{
|
||||
title: "操作",
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ const FilingTabs = ({
|
|||
{ title: "序号", width: 60, render: (_, __, i) => i + 1 },
|
||||
{ title: "人员姓名", dataIndex: "personName", width: 100 },
|
||||
{ title: "类型", dataIndex: "personTypeName", width: 100 },
|
||||
|
||||
{ title: "职务", dataIndex: "positionName", width: 120 },
|
||||
{ title: "职称", dataIndex: "titleName", width: 100 },
|
||||
{ title: "操作", width: 80,
|
||||
render: (_, record) => (
|
||||
|
|
|
|||
Loading…
Reference in New Issue