Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/pages/Container/EnterpriseInfo/PersonnelInfo/List/index.js
#	src/pages/Container/EnterpriseInfo/ResignationApply/index.js
v0.0.1-final
huwei 2026-07-07 16:03:09 +08:00
commit 7121437b4d
14 changed files with 325 additions and 171 deletions

View File

@ -14,7 +14,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
label={label}
valuePropName="fileList"
getValueProps={(value) => {
if (Array.isArray(value)) {
return { fileList: value };
}
@ -30,7 +29,6 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
};
}}
getValueFromEvent={({ fileList }) => {
return (
fileList?.map((file) => ({
url: file.response?.data?.url || file.url,

View File

@ -59,6 +59,12 @@ export const GENDER_OPTIONS = [
{ label: "女", value: 2 },
];
/** 性别编码(1男2女) → 名称 */
export const GENDER_MAP = {
1: "男",
2: "女",
};
/** 审核结果 */
export const REVIEW_RESULT_OPTIONS = [
{ label: "通过", value: 1 },

View File

@ -181,8 +181,8 @@ function PersonnelChangePage(props) {
width: 140,
render: (_, record) => {
const code = record.resignAuditStatus ?? record.auditStatus ?? record.auditStatusCode;
const label = RESIGN_AUDIT_STATUS_LABEL[code] ?? "-";
return <Tag color={AUDIT_STATUS_COLOR[code]}>{label}</Tag>;
return RESIGN_AUDIT_STATUS_LABEL[code] ? <Tag color={AUDIT_STATUS_COLOR[code]}>{label}</Tag> : "-";
},
},
{

View File

@ -21,6 +21,7 @@ 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;
@ -48,17 +49,26 @@ 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(() => {
@ -134,19 +144,37 @@ 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>,
@ -166,7 +194,7 @@ function PersonnelInfoPage(props) {
{ title: "用户名称", dataIndex: "userName" },
{ title: "账号", dataIndex: "account" },
{ title: "部门", dataIndex: "deptName" },
{ title: "岗位", dataIndex: "positionName" },
{ title: "岗位", dataIndex: "postName" },
{
title: "证照名称",
dataIndex: "certNames",
@ -178,17 +206,51 @@ 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>
),
},
@ -242,7 +304,15 @@ 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);
@ -267,7 +337,11 @@ 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,
@ -308,30 +382,29 @@ 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);
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; };
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;
};
}, [open, currentId]);
const handleCancel = () => {
@ -360,7 +433,12 @@ 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,
@ -370,8 +448,8 @@ function StaffFormModal({
educationLevelCode: values.educationLevelName,
educationLevelName: values.educationLevelName,
proofMaterialUrl: Array.isArray(values.proofMaterialUrl)
? values.proofMaterialUrl.map((f) => f.url || f.response?.data?.url).filter(Boolean).join(",")
: "",
? JSON.stringify(values.proofMaterialUrl)
: undefined,
};
if (payload.birthDate && typeof payload.birthDate !== "string") {
payload.birthDate = payload.birthDate.format("YYYY-MM-DD");
@ -412,15 +490,26 @@ 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>
@ -430,17 +519,35 @@ 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}
@ -453,23 +560,38 @@ 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}>
@ -479,12 +601,20 @@ 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}>
@ -493,17 +623,30 @@ 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>
@ -513,6 +656,11 @@ function StaffFormModal({
</Form.Item>
</Col>
<Col span={24}>
<AttachmentUpload
name="proofMaterialUrl"
label="申报专业能力证明材料"
maxCount={5}
/>
<Form.Item
name="proofMaterialUrl"
label="申报专业能力证明材料"
@ -580,4 +728,7 @@ function StaffFormModal({
);
}
export default Connect([NS_STAFF_INFO], true)(AntdTableFuncControl(PersonnelInfoPage));
export default Connect(
[NS_STAFF_INFO],
true,
)(AntdTableFuncControl(PersonnelInfoPage));

View File

@ -1,4 +1,4 @@
import { Button, Descriptions, Modal, Table } from "antd";
import { Button, Descriptions, Modal, Table, Upload } from "antd";
import { useEffect, useRef, useState } from "react";
import FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal";
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
@ -85,7 +85,9 @@ export default function StaffViewModal({
}
};
const proofFiles = info.proofMaterials || [];
const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : [];
const certPreviewFiles = certPreviewInfo?.certImgs?.length
? certPreviewInfo.certImgs
: certPreviewInfo?.certImgFiles || [];
@ -105,25 +107,25 @@ export default function StaffViewModal({
onCancel={onCancel}
>
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
<Descriptions.Item label="姓名">{info.staffName}</Descriptions.Item>
<Descriptions.Item label="性别">{GENDER_MAP[info.gender]}</Descriptions.Item>
<Descriptions.Item label="姓名">{info.userName}</Descriptions.Item>
<Descriptions.Item label="性别">{GENDER_MAP[info.genderCode]}</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.positionName}</Descriptions.Item>
<Descriptions.Item label="岗位">{info.postName}</Descriptions.Item>
<Descriptions.Item label="人员类型">{info.personType || "基础人员"}</Descriptions.Item>
<Descriptions.Item label="资质范围">{info.qualScope || "-"}</Descriptions.Item>
<Descriptions.Item label="职业等级">{info.professionalLevel || "-"}</Descriptions.Item>
<Descriptions.Item label="职业等级">{info.professionalLevelName || "-"}</Descriptions.Item>
<Descriptions.Item label="证书编号">{info.evaluatorCertNo || "-"}</Descriptions.Item>
<Descriptions.Item label="学历类型">{info.educationType || "-"}</Descriptions.Item>
<Descriptions.Item label="学历层次">{info.educationLevel || "-"}</Descriptions.Item>
<Descriptions.Item label="学历类型">{info.educationTypeName || "-"}</Descriptions.Item>
<Descriptions.Item label="学历层次">{info.educationLevelName || "-"}</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="学历">{info.education || "-"}</Descriptions.Item>
<Descriptions.Item label="现住地址" span={2}>{info.homeAddress}</Descriptions.Item>
<Descriptions.Item label="现住地址" span={2}>{info.currentAddress}</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>
@ -137,26 +139,14 @@ export default function StaffViewModal({
{info.workExperience || "-"}
</Descriptions.Item>
<Descriptions.Item label="申报专业能力证明材料" span={2}>
{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>
);
})}
{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>
</div>
) : "-"}
)) : "-"
}
</Descriptions.Item>
</Descriptions>

View File

@ -95,7 +95,7 @@ function QualificationCertPage(props) {
okText: "是",
cancelText: "否",
onOk: async () => {
const res = await props.orgQualificationCertRemove({ id });
const res = await props.orgQualificationCertRemove({ data: id });
if (res?.success !== false) {
message.success("删除成功");
getData();
@ -113,7 +113,7 @@ function QualificationCertPage(props) {
cancelText: "否",
onOk: async () => {
const action = enabled ? props.orgQualificationCertDisable : props.orgQualificationCertEnable;
const res = await action({ id: record.id });
const res = await action({ data: record.id });
if (res?.success !== false) {
message.success("操作成功");
await getData();
@ -234,15 +234,13 @@ function QualificationCertPage(props) {
<Button danger type="link" onClick={() => onDelete(record.id)}>
删除
</Button>
<Button type="link" onClick={() => onToggleStatus(record)}>
{record.enableFlag === 1 ? "禁用" : "启用"}
</Button>
</TableAction>
),
},
]}
dataSource={dataSource}
scroll={{ y: props.scrollY }}
scroll={{ y: props.scrollY , x: 1400}}
loading={loading}
pagination={{
total,
@ -315,7 +313,7 @@ function CertFormModal({
const data = { ...res.data };
data.issueDate = toDayjs(data.issueDate);
data.validDate = [toDayjs(data.validStartDate), toDayjs(data.validEndDate)];
data.certImageUrl = parseCertImageUrl(data.certImageUrl);
data.certImageUrl = data.certImageUrl;
form.setFieldsValue(data);
} catch (err) {
console.warn("[QualificationCert] load detail failed:", err);
@ -336,7 +334,7 @@ function CertFormModal({
setSubmitting(true);
values.validStartDate = values.validDate?.[0];
values.validEndDate = values.validDate?.[1];
values.certImageUrl = stringifyCertImageUrl(values.certImageUrl);
values.certImageUrl = values.certImageUrl?.map((item) => item.url).join(",");
if (currentId) values.id = currentId;
const request = currentId ? requestEdit : requestAdd;
const res = await request(values);
@ -420,7 +418,7 @@ function CertFormModal({
<Form.Item name="remark" label="备注">
<TextArea rows={3} placeholder="请输入备注" />
</Form.Item>
<AttachmentUpload name="certImageUrl" label="证书图片" maxCount={3} />
<AttachmentUpload name="certImageUrl" accept="image/*" label="证书图片" maxCount={3} />
</Form>
</Modal>
);

View File

@ -10,9 +10,9 @@ import {
Select,
Table,
Tag,
Upload,
} from "antd";
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
import AttachmentUpload from "~/components/AttachmentUpload";
import { UploadOutlined } from "@ant-design/icons";
import PreviewUrlButton from "~/components/PreviewUrlButton";
import { useEffect, useState } from "react";
@ -213,7 +213,6 @@ function ResignationApplyPage(props) {
function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
const [form] = Form.useForm();
const [submitting, setSubmitting] = useState(false);
const [uploading, setUploading] = useState(false);
const handleCancel = () => {
form.resetFields();
@ -226,9 +225,11 @@ 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;
values.reportFileUrl = values.reportFileUrl?.map?.((f) => f.url).filter(Boolean).join(",") || undefined;
const res = await requestAdd(values);
if (res?.success !== false) {
message.success("提交成功");
@ -291,6 +292,7 @@ function AddModal({ open, staffOptions, requestAdd, onCancel, onSuccess }) {
<Form.Item name="remark" label="备注">
<Input.TextArea rows={2} placeholder="请输入备注" />
</Form.Item>
<AttachmentUpload name="reportFileUrl" label="离职通知报告" maxCount={1} accept=".pdf" />
<Form.Item
name="reportFileUrl"
label="离职通知报告"
@ -388,6 +390,9 @@ 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 ? (
<PreviewUrlButton url={info.reportFileUrl}>
查看文件

View File

@ -69,6 +69,11 @@ const menuItems = [
label: "企业画像管理",
icon: <BarChartOutlined />,
},
{
key: "/safetyEval/container/Supervision/ExperManage",
label: "专家管理",
icon: <IdcardOutlined />,
},
],
},
{

View File

@ -91,7 +91,11 @@ export default function BasicInfoStep({ form, disabled }) {
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="workplaceArea" label="工作场所建筑面积(㎡)">
<Form.Item
name="workplaceArea"
label="工作场所建筑面积(㎡)"
rules={[{ required: !disabled, message: "请输入工作场所建筑面积" }]}
>
<InputNumber style={{ width: "100%" }} min={0} placeholder="㎡" />
</Form.Item>
</Col>

View File

@ -93,9 +93,9 @@ function OrgPersonnelSelectModalInner(props) {
onChange: (page, pageSize) => getData(page, pageSize),
}}
columns={[
{ title: "人员姓名", dataIndex: "staffName" },
{ title: "类型", dataIndex: "personType" },
{ title: "职务", dataIndex: "positionName" },
{ title: "人员姓名", dataIndex: "userName" },
{ title: "类型", dataIndex: "personTypeName" },
{ title: "职称", dataIndex: "titleName" },
{
title: "操作",

View File

@ -14,6 +14,7 @@ export default function PersonnelStep({
const [viewId, setViewId] = useState("");
const existingIds = personnelList.map((item) => String(item.sourcePersonnelId || ""));
console.log(personnelList);
return (
<>
@ -35,9 +36,9 @@ export default function PersonnelStep({
dataSource={personnelList}
columns={[
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
{ title: "人员姓名", dataIndex: "personName" },
{ title: "人员姓名", dataIndex: "userName" },
{ title: "类型", dataIndex: "personTypeName" },
{ title: "职务", dataIndex: "positionName" },
{ title: "职称", dataIndex: "titleName" },
{
title: "操作",

View File

@ -49,8 +49,6 @@ function FilingFormPage(props) {
const detailRef = useRef(null);
const readOnly = query.readOnly;
const saveActionHint =
mode === FILING_FORM_MODE.FILED
? "请点击提交后保存"
@ -74,7 +72,7 @@ function FilingFormPage(props) {
loadPersonnelOptions();
if (query.id) {
let aciotn = () => {};
if (mode === FILING_FORM_MODE.CHANGE) {
aciotn = fetchQualChangeDetail;
} else {
@ -138,7 +136,7 @@ function FilingFormPage(props) {
setSubmitting(true);
const currentDetail = collectCurrentDetail();
const word= mode === "change" ? "Change" : "";
const word = mode === "change" ? "Change" : "";
const body = {
[`qualFiling${word}AddCmd`]: {
...currentDetail,
@ -146,14 +144,17 @@ function FilingFormPage(props) {
applyTypeCode: mode === "application" ? 1 : 3,
},
};
const params = body[`qualFiling${word}AddCmd`];
if (params.materials) {
body[`qualFilingMaterial${word}AddCmds`] = params.materials;
delete params.materials;
}
if (params.personnelList) {
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList;
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList.map((item) => ({
...item,
personName: item.userName,
}));
delete params.personnelList;
}
if (params.equipmentList) {
@ -164,10 +165,10 @@ function FilingFormPage(props) {
body[`qualFilingCommitment${word}AddCmd`] = params.commitment;
delete params.commitment;
}
let action=props.submitQualFiling;
let action = props.submitQualFiling;
if (mode === FILING_FORM_MODE.CHANGE) {
action=props.submitQualFilingChange;
action = props.submitQualFilingChange;
}
const result = await action(body);
@ -175,7 +176,7 @@ function FilingFormPage(props) {
setVerifyOpen(false);
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
props.history.goBack();
}
}
setSubmitting(false);
};
@ -213,9 +214,7 @@ function FilingFormPage(props) {
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
const newRows = idsToAdd.map((id) => {
const row = rowMap.get(String(id));
return row
? mapStaffRowToFilingPersonnel(row)
: mapStaffRowToFilingPersonnel({ id });
return row;
});
setDetail((prev) => ({
...prev,
@ -227,7 +226,7 @@ function FilingFormPage(props) {
const handlePersonnelRemove = (record) => {
Modal.confirm({
title: "提示",
content: `确认删除人员「${record.personName}」?`,
content: `确认删除人员「${record.userName}」?`,
onOk: () => {
setDetail((prev) => ({
...prev,
@ -354,7 +353,6 @@ function FilingFormPage(props) {
title={MODE_TITLE[mode] || "资质备案表单"}
history={props.history}
previous
>
<Spin spinning={loading || submitting}>
<Tabs
@ -372,43 +370,41 @@ function FilingFormPage(props) {
}}
/>
<Space>
{stepIndex > 0 && (
<Button
onClick={async () => {
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
}}
>
上一步
</Button>
)}
{!isLastStep && (
<Button
type="primary"
onClick={async () => {
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
}}
>
下一步
</Button>
)}
{!readOnly && isLastStep && (
<>
{mode !== FILING_FORM_MODE.FILED && (
<Button
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
>
暂存
</Button>
)}
<Button type="primary" onClick={handleSubmitRequest}>
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
<Space>
{stepIndex > 0 && (
<Button
onClick={async () => {
setActiveStep(STEP_ITEMS[stepIndex - 1].key);
}}
>
上一步
</Button>
)}
{!isLastStep && (
<Button
type="primary"
onClick={async () => {
setActiveStep(STEP_ITEMS[stepIndex + 1].key);
}}
>
下一步
</Button>
)}
{!readOnly && isLastStep && (
<>
{mode !== FILING_FORM_MODE.FILED && (
<Button
onClick={() => handleVerifyConfirm({ isSaveDraft: true })}
>
暂存
</Button>
</>
)}
</Space>
)}
<Button type="primary" onClick={handleSubmitRequest}>
{mode === FILING_FORM_MODE.FILED ? "提交填报" : "提交申请"}
</Button>
</>
)}
</Space>
</Spin>
<PrerequisiteVerifyModal
open={verifyOpen}

View File

@ -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) => (

View File

@ -8,7 +8,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { tools } from "@cqsjjb/jjb-common-lib";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { NS_QUAL_EXPERT } from "~/enumerate/namespace";
import { GENDER_OPTIONS } from "~/enumerate/constant";
import { GENDER_OPTIONS, GENDER_MAP } from "~/enumerate/constant";
const { router } = tools;
@ -116,9 +116,9 @@ const ExperManage = (props) => {
{ title: "账号", dataIndex: "account", width: 140 },
{
title: "性别",
dataIndex: "genderName",
dataIndex: "genderCode",
width: 70,
render: (text) => text || "--",
render: (code) => GENDER_MAP[code] || "--",
},
{ title: "身份证号", dataIndex: "idCardNo", width: 180 },
{ title: "证书", dataIndex: "certificate", width: 120, ellipsis: true },
@ -213,7 +213,7 @@ const ExperManage = (props) => {
<Descriptions column={2} bordered size="small" loading={qualExpertDetailLoading}>
<Descriptions.Item label="姓名">{qualExpertDetail?.userName || "--"}</Descriptions.Item>
<Descriptions.Item label="账号">{qualExpertDetail?.account || "--"}</Descriptions.Item>
<Descriptions.Item label="性别">{qualExpertDetail?.genderName || "--"}</Descriptions.Item>
<Descriptions.Item label="性别">{GENDER_MAP[qualExpertDetail?.genderCode] || "--"}</Descriptions.Item>
<Descriptions.Item label="身份证号">{qualExpertDetail?.idCardNo || "--"}</Descriptions.Item>
<Descriptions.Item label="证书" span={2}>{qualExpertDetail?.certificate || "--"}</Descriptions.Item>
</Descriptions>