Merge remote-tracking branch 'origin/dev' into dev
commit
4edf27164c
|
|
@ -1,20 +1,20 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 应用后端git地址,部署上线需要
|
// 应用后端git地址,部署上线需要
|
||||||
javaGit: "<git-url>",
|
javaGit: "http://47.92.113.182:3000/cq_anquan/safety-eval-service.git",
|
||||||
// 应用后端仓库名称,部署上线需要
|
// 应用后端仓库名称,部署上线需要
|
||||||
javaGitName: "<git-name>",
|
javaGitName: "safety-eval-service",
|
||||||
// 环境配置
|
// 环境配置
|
||||||
environment: {
|
environment: {
|
||||||
development: {
|
development: {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
javaGitBranch: "<branch-name>",
|
javaGitBranch: "dev",
|
||||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||||
API_HOST: "http://192.168.0.103",
|
API_HOST: "http://192.168.0.103",
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
javaGitBranch: "<branch-name>",
|
javaGitBranch: "dev",
|
||||||
// 接口服务地址
|
// 接口服务地址
|
||||||
API_HOST: "",
|
API_HOST: "",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ export default function UploadButton({
|
||||||
<Upload
|
<Upload
|
||||||
showUploadList={false}
|
showUploadList={false}
|
||||||
action={action}
|
action={action}
|
||||||
|
headers={{
|
||||||
|
token: sessionStorage.getItem("token"),
|
||||||
|
}}
|
||||||
onChange={(info) => {
|
onChange={(info) => {
|
||||||
if (info.file.status === "uploading") {
|
if (info.file.status === "uploading") {
|
||||||
setUploading(true);
|
setUploading(true);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export const VERIFY_STATUS_MAP = {
|
||||||
|
|
||||||
/** 审核状态 */
|
/** 审核状态 */
|
||||||
export const REVIEW_STATUS_MAP = {
|
export const REVIEW_STATUS_MAP = {
|
||||||
|
1: { label: "已审核", color: "success" },
|
||||||
2: { label: "审核中", color: "processing" },
|
2: { label: "审核中", color: "processing" },
|
||||||
3: { label: "打回", color: "error" },
|
3: { label: "打回", color: "error" },
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,8 @@ function toSelectedDept(node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function DepartmentPositionPage(props) {
|
function DepartmentPositionPage(props) {
|
||||||
|
const { orgPosition } = props;
|
||||||
|
const { orgPositionLoading } = orgPosition;
|
||||||
const [selectedDept, setSelectedDept] = useState(null);
|
const [selectedDept, setSelectedDept] = useState(null);
|
||||||
const [treeData, setTreeData] = useState([]);
|
const [treeData, setTreeData] = useState([]);
|
||||||
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
const [deptModalOpen, setDeptModalOpen] = useState(false);
|
||||||
|
|
@ -180,7 +182,7 @@ function DepartmentPositionPage(props) {
|
||||||
okText: "是",
|
okText: "是",
|
||||||
cancelText: "否",
|
cancelText: "否",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const res = await props.orgPositionRemove({ id });
|
const res = await props.orgPositionRemove({ data: id });
|
||||||
if (res?.success !== false) {
|
if (res?.success !== false) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
fetchPositionData(1, 10);
|
fetchPositionData(1, 10);
|
||||||
|
|
@ -316,6 +318,7 @@ function DepartmentPositionPage(props) {
|
||||||
</Form.Item>,
|
</Form.Item>,
|
||||||
]}
|
]}
|
||||||
onFinish={() => fetchPositionData(1, 10)}
|
onFinish={() => fetchPositionData(1, 10)}
|
||||||
|
onReset={() => fetchPositionData(1, 10)}
|
||||||
style={{ marginBottom: 16 }}
|
style={{ marginBottom: 16 }}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
|
|
@ -398,6 +401,7 @@ function DepartmentPositionPage(props) {
|
||||||
destroyOnHidden
|
destroyOnHidden
|
||||||
title={currentId ? "编辑岗位" : "添加岗位"}
|
title={currentId ? "编辑岗位" : "添加岗位"}
|
||||||
width={560}
|
width={560}
|
||||||
|
confirmLoading={orgPositionLoading}
|
||||||
onCancel={closePositionModal}
|
onCancel={closePositionModal}
|
||||||
onOk={modalForm.submit}
|
onOk={modalForm.submit}
|
||||||
>
|
>
|
||||||
|
|
@ -544,7 +548,7 @@ function DeptFormModal({
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
console.log(treeData);
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
open={open}
|
open={open}
|
||||||
|
|
@ -557,19 +561,25 @@ function DeptFormModal({
|
||||||
onOk={form.submit}
|
onOk={form.submit}
|
||||||
>
|
>
|
||||||
<Form form={form} layout="vertical" onFinish={handleSubmit}>
|
<Form form={form} layout="vertical" onFinish={handleSubmit}>
|
||||||
<Form.Item name="parentId" label="上级部门" initialValue={selectedDeptId}>
|
{!currentId && (
|
||||||
<TreeSelect
|
<Form.Item
|
||||||
treeData={treeData}
|
name="parentId"
|
||||||
allowClear
|
label="上级部门"
|
||||||
fieldNames={{
|
initialValue={selectedDeptId}
|
||||||
label: "deptName",
|
>
|
||||||
value: "id",
|
<TreeSelect
|
||||||
children: "children",
|
treeData={treeData}
|
||||||
}}
|
allowClear
|
||||||
showSearch
|
fieldNames={{
|
||||||
placeholder="请选择上级部门"
|
label: "deptName",
|
||||||
/>
|
value: "id",
|
||||||
</Form.Item>
|
children: "children",
|
||||||
|
}}
|
||||||
|
showSearch
|
||||||
|
placeholder="请选择上级部门"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="deptName"
|
name="deptName"
|
||||||
label="部门名称"
|
label="部门名称"
|
||||||
|
|
|
||||||
|
|
@ -77,17 +77,7 @@ function OrgInfoPage(props) {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleCancelEdit = () => {
|
const handleCancelEdit = () => {
|
||||||
if (hasExistingData) {
|
setEditing(false);
|
||||||
form.setFieldsValue({
|
|
||||||
...detail,
|
|
||||||
productionDate: detail.productionDate
|
|
||||||
? dayjs(detail.productionDate)
|
|
||||||
: undefined,
|
|
||||||
});
|
|
||||||
setEditing(false);
|
|
||||||
} else {
|
|
||||||
form.resetFields();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSave = async (submitType) => {
|
const handleSave = async (submitType) => {
|
||||||
|
|
|
||||||
|
|
@ -62,12 +62,13 @@ function StaffCertificatePage(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageLayout
|
<PageLayout
|
||||||
|
history={props.history}
|
||||||
|
previous
|
||||||
title={`人员证书 - ${staffName || ""}`}
|
title={`人员证书 - ${staffName || ""}`}
|
||||||
extra={
|
extra={
|
||||||
<Button type="primary" onClick={() => { setCurrentId(""); setAddModalOpen(true); }}>新增证书</Button>
|
<Button type="primary" onClick={() => { setCurrentId(""); setAddModalOpen(true); }}>新增证书</Button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Button style={{ marginBottom: 16 }} onClick={goBack}>返回</Button>
|
|
||||||
<SearchForm
|
<SearchForm
|
||||||
style={{ marginBottom: 24 }}
|
style={{ marginBottom: 24 }}
|
||||||
form={searchForm}
|
form={searchForm}
|
||||||
|
|
|
||||||
|
|
@ -91,8 +91,9 @@ function PersonnelInfoPage(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const goCertificate = (id, staffName) => {
|
const goCertificate = (id, staffName) => {
|
||||||
const base = window.location.pathname.replace(/\/List.*$/, "");
|
|
||||||
window.location.href = `${base}/Certificate?staffId=${id}&staffName=${encodeURIComponent(staffName || "")}`;
|
|
||||||
|
props.history.push(`Certificate?staffId=${id}&staffName=${encodeURIComponent(staffName || "")}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
|
|
@ -464,7 +465,7 @@ function StaffFormModal({
|
||||||
handleCancel();
|
handleCancel();
|
||||||
onSuccess();
|
onSuccess();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
import { Button, Descriptions, Modal, Table, Upload } from "antd";
|
import { Button, Descriptions, Image, Modal, Table, Upload } from "antd";
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal";
|
import FilePreviewModal, {
|
||||||
|
FilePreviewContent,
|
||||||
|
} from "~/components/FilePreviewModal";
|
||||||
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
|
import { resolvePreviewSrc } from "~/components/CertPreviewImg";
|
||||||
import { fetchStaffCertDetail, fetchStaffCertListByPersonnelId } from "~/api/staffCertificate";
|
import {
|
||||||
|
fetchStaffCertDetail,
|
||||||
|
fetchStaffCertListByPersonnelId,
|
||||||
|
} from "~/api/staffCertificate";
|
||||||
import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper";
|
import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper";
|
||||||
|
|
||||||
const GENDER_MAP = { 1: "男", 2: "女" };
|
const GENDER_MAP = { 1: "男", 2: "女" };
|
||||||
|
|
@ -41,26 +46,30 @@ export default function StaffViewModal({
|
||||||
|
|
||||||
const loadCertList = requestCertListRef.current;
|
const loadCertList = requestCertListRef.current;
|
||||||
Promise.all([
|
Promise.all([
|
||||||
Promise.resolve(requestDetailsRef.current({ id: currentId })).catch((err) => {
|
Promise.resolve(requestDetailsRef.current({ id: currentId })).catch(
|
||||||
console.warn("[StaffViewModal] load detail failed:", err);
|
(err) => {
|
||||||
return { data: {} };
|
console.warn("[StaffViewModal] load detail failed:", err);
|
||||||
}),
|
return { data: {} };
|
||||||
|
},
|
||||||
|
),
|
||||||
typeof loadCertList === "function"
|
typeof loadCertList === "function"
|
||||||
? Promise.resolve(loadCertList(currentId)).catch((err) => {
|
? Promise.resolve(loadCertList(currentId)).catch((err) => {
|
||||||
console.warn("[StaffViewModal] load certificates failed:", err);
|
console.warn("[StaffViewModal] load certificates failed:", err);
|
||||||
return [];
|
return [];
|
||||||
})
|
})
|
||||||
: Promise.resolve([]),
|
: Promise.resolve([]),
|
||||||
]).then(([detailRes, certList]) => {
|
])
|
||||||
if (!cancelled) {
|
.then(([detailRes, certList]) => {
|
||||||
setInfo(detailRes?.data || {});
|
if (!cancelled) {
|
||||||
setCertificates(Array.isArray(certList) ? certList : []);
|
setInfo(detailRes?.data || {});
|
||||||
}
|
setCertificates(Array.isArray(certList) ? certList : []);
|
||||||
}).finally(() => {
|
}
|
||||||
if (!cancelled) {
|
})
|
||||||
setDetailLoading(false);
|
.finally(() => {
|
||||||
}
|
if (!cancelled) {
|
||||||
});
|
setDetailLoading(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
return () => {
|
return () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
};
|
};
|
||||||
|
|
@ -85,14 +94,18 @@ export default function StaffViewModal({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const proofMaterialUrl = info.proofMaterialUrl
|
||||||
const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : [];
|
? JSON.parse(info.proofMaterialUrl)
|
||||||
|
: [];
|
||||||
|
|
||||||
const certPreviewFiles = certPreviewInfo?.certImgs?.length
|
const certPreviewFiles = certPreviewInfo?.certImgs?.length
|
||||||
? certPreviewInfo.certImgs
|
? certPreviewInfo.certImgs
|
||||||
: certPreviewInfo?.certImgFiles || [];
|
: certPreviewInfo?.certImgFiles || [];
|
||||||
const certPreviewUrl = resolvePreviewSrc(certPreviewFiles[0]);
|
const certPreviewUrl = resolvePreviewSrc(certPreviewFiles[0]);
|
||||||
const certPreviewName = certPreviewFiles[0]?.fileName || certPreviewFiles[0]?.name || certPreviewInfo?.certName;
|
const certPreviewName =
|
||||||
|
certPreviewFiles[0]?.fileName ||
|
||||||
|
certPreviewFiles[0]?.name ||
|
||||||
|
certPreviewInfo?.certName;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
@ -108,28 +121,57 @@ export default function StaffViewModal({
|
||||||
>
|
>
|
||||||
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
|
<Descriptions bordered column={2} labelStyle={{ width: 120 }}>
|
||||||
<Descriptions.Item label="姓名">{info.userName}</Descriptions.Item>
|
<Descriptions.Item label="姓名">{info.userName}</Descriptions.Item>
|
||||||
<Descriptions.Item label="性别">{GENDER_MAP[info.genderCode]}</Descriptions.Item>
|
<Descriptions.Item label="性别">
|
||||||
<Descriptions.Item label="出生日期">{info.birthDate}</Descriptions.Item>
|
{GENDER_MAP[info.genderCode]}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="出生日期">
|
||||||
|
{info.birthDate}
|
||||||
|
</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.personType || "基础人员"}</Descriptions.Item>
|
<Descriptions.Item label="人员类型">
|
||||||
<Descriptions.Item label="资质范围">{info.qualScope || "-"}</Descriptions.Item>
|
{info.personType || "基础人员"}
|
||||||
<Descriptions.Item label="职业等级">{info.professionalLevelName || "-"}</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="证书编号">{info.evaluatorCertNo || "-"}</Descriptions.Item>
|
<Descriptions.Item label="资质范围">
|
||||||
<Descriptions.Item label="学历类型">{info.educationTypeName || "-"}</Descriptions.Item>
|
{info.qualScope || "-"}
|
||||||
<Descriptions.Item label="学历层次">{info.educationLevelName || "-"}</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="职称">{info.titleName || "-"}</Descriptions.Item>
|
<Descriptions.Item label="职业等级">
|
||||||
|
{info.professionalLevelName || "-"}
|
||||||
|
</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.titleName || "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="是否注册安全工程师">
|
<Descriptions.Item label="是否注册安全工程师">
|
||||||
{REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"}
|
{REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="身份证号">{info.idCardNo}</Descriptions.Item>
|
<Descriptions.Item label="身份证号">
|
||||||
|
{info.idCardNo}
|
||||||
|
</Descriptions.Item>
|
||||||
|
|
||||||
<Descriptions.Item label="现住地址" span={2}>{info.currentAddress}</Descriptions.Item>
|
<Descriptions.Item label="现住地址" span={2}>
|
||||||
<Descriptions.Item label="办公地址" span={2}>{info.officeAddress}</Descriptions.Item>
|
{info.currentAddress}
|
||||||
<Descriptions.Item label="毕业院校">{info.graduateSchool}</Descriptions.Item>
|
</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>
|
<Descriptions.Item label="专业">{info.major}</Descriptions.Item>
|
||||||
<Descriptions.Item label="出版学术专著、专利、获奖、发表学术论文等" span={2}>
|
<Descriptions.Item
|
||||||
|
label="出版学术专著、专利、获奖、发表学术论文等"
|
||||||
|
span={2}
|
||||||
|
>
|
||||||
{info.publications || "-"}
|
{info.publications || "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="自我申报的专业能力及认定方式" span={2}>
|
<Descriptions.Item label="自我申报的专业能力及认定方式" span={2}>
|
||||||
|
|
@ -139,18 +181,32 @@ export default function StaffViewModal({
|
||||||
{info.workExperience || "-"}
|
{info.workExperience || "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
<Descriptions.Item label="申报专业能力证明材料" span={2}>
|
<Descriptions.Item label="申报专业能力证明材料" span={2}>
|
||||||
{proofMaterialUrl.length ? proofMaterialUrl.map((item) => (
|
{proofMaterialUrl.length
|
||||||
<div key={item.id}>
|
? proofMaterialUrl.map((item) => {
|
||||||
<a href={item.url} target="_blank" rel="noopener noreferrer">
|
const isImage = /\.(jpg|jpeg|png|gif|webp|bmp|svg)(\?.*)?$/i.test(item.url);
|
||||||
{item.fileName || item.name || item.url}
|
return (
|
||||||
</a>
|
<div key={item.id}>
|
||||||
</div>
|
{isImage ? (
|
||||||
)) : "-"
|
<Image
|
||||||
}
|
src={item.url}
|
||||||
|
style={{ maxWidth: 200, cursor: "pointer" }}
|
||||||
|
preview={{ mask: item.fileName || item.name || "预览" }}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Button type="link" onClick={() => window.open(item.url)}>
|
||||||
|
{item.fileName || item.name || item.url}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: "-"}
|
||||||
</Descriptions.Item>
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
|
|
||||||
<div style={{ marginTop: 16, marginBottom: 8, fontWeight: 600 }}>证照信息</div>
|
<div style={{ marginTop: 16, marginBottom: 8, fontWeight: 600 }}>
|
||||||
|
证照信息
|
||||||
|
</div>
|
||||||
<Table
|
<Table
|
||||||
size="small"
|
size="small"
|
||||||
bordered
|
bordered
|
||||||
|
|
@ -169,7 +225,13 @@ export default function StaffViewModal({
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 90,
|
width: 90,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button type="link" size="small" onClick={() => openCertPreview(record)}>查看证书</Button>
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
onClick={() => openCertPreview(record)}
|
||||||
|
>
|
||||||
|
查看证书
|
||||||
|
</Button>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -192,7 +254,9 @@ export default function StaffViewModal({
|
||||||
loading={certPreviewLoading}
|
loading={certPreviewLoading}
|
||||||
cancelText="关闭"
|
cancelText="关闭"
|
||||||
okText={certPreviewUrl ? "新窗口打开" : "关闭"}
|
okText={certPreviewUrl ? "新窗口打开" : "关闭"}
|
||||||
okButtonProps={{ style: certPreviewUrl ? undefined : { display: "none" } }}
|
okButtonProps={{
|
||||||
|
style: certPreviewUrl ? undefined : { display: "none" },
|
||||||
|
}}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setCertPreview(null);
|
setCertPreview(null);
|
||||||
setCertPreviewInfo(null);
|
setCertPreviewInfo(null);
|
||||||
|
|
@ -207,15 +271,35 @@ export default function StaffViewModal({
|
||||||
>
|
>
|
||||||
{certPreviewInfo && (
|
{certPreviewInfo && (
|
||||||
<div>
|
<div>
|
||||||
<Descriptions bordered column={1} size="small" style={{ marginBottom: 12 }}>
|
<Descriptions
|
||||||
<Descriptions.Item label="证照名称">{certPreviewInfo.certName}</Descriptions.Item>
|
bordered
|
||||||
<Descriptions.Item label="证书编号">{certPreviewInfo.certNo}</Descriptions.Item>
|
column={1}
|
||||||
<Descriptions.Item label="证书类别">{certPreviewInfo.certCategory || "-"}</Descriptions.Item>
|
size="small"
|
||||||
<Descriptions.Item label="发证机关">{certPreviewInfo.issueOrg || "-"}</Descriptions.Item>
|
style={{ marginBottom: 12 }}
|
||||||
<Descriptions.Item label="有效开始日期">{certPreviewInfo.validStartDate || "-"}</Descriptions.Item>
|
>
|
||||||
<Descriptions.Item label="有效结束日期">{certPreviewInfo.validEndDate || "-"}</Descriptions.Item>
|
<Descriptions.Item label="证照名称">
|
||||||
|
{certPreviewInfo.certName}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="证书编号">
|
||||||
|
{certPreviewInfo.certNo}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="证书类别">
|
||||||
|
{certPreviewInfo.certCategory || "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="发证机关">
|
||||||
|
{certPreviewInfo.issueOrg || "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="有效开始日期">
|
||||||
|
{certPreviewInfo.validStartDate || "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="有效结束日期">
|
||||||
|
{certPreviewInfo.validEndDate || "-"}
|
||||||
|
</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
<FilePreviewContent url={certPreviewUrl} fileName={certPreviewName} />
|
<FilePreviewContent
|
||||||
|
url={certPreviewUrl}
|
||||||
|
fileName={certPreviewName}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ function QualificationCertPage(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 200,
|
width: 180,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<TableAction>
|
<TableAction>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
||||||
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
||||||
import FilingListTable from "../../FilingListTable";
|
import FilingListTable from "../../FilingListTable";
|
||||||
import { goFilingForm } from "../../filingPaths";
|
|
||||||
|
|
||||||
const { router } = tools;
|
const { router } = tools;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { fetchQualFilingDetail, fetchQualChangeDetail, fromFilingPersonnelAddCmd
|
||||||
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
import { NS_QUAL_FILING } from "~/enumerate/namespace";
|
||||||
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
|
||||||
import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate";
|
import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate";
|
||||||
import { clearLocalDraft, saveLocalDraft } from "../filingLocalDraft";
|
|
||||||
import {
|
import {
|
||||||
fetchOrgPersonnelOptions,
|
fetchOrgPersonnelOptions,
|
||||||
mapEquipRowToFilingEquipment,
|
mapEquipRowToFilingEquipment,
|
||||||
|
|
@ -114,22 +114,7 @@ function FilingFormPage(props) {
|
||||||
[syncCommitmentFromBasic],
|
[syncCommitmentFromBasic],
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleSaveDraft = async () => {
|
|
||||||
if (readOnly) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setSubmitting(true);
|
|
||||||
try {
|
|
||||||
const currentDetail = collectCurrentDetail();
|
|
||||||
await persistFilingToBackend(props, currentDetail, mode);
|
|
||||||
message.success("暂存成功");
|
|
||||||
props.history.goBack();
|
|
||||||
} catch (err) {
|
|
||||||
message.error(err?.message || "暂存失败");
|
|
||||||
} finally {
|
|
||||||
setSubmitting(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (activeStep === "commitment") {
|
if (activeStep === "commitment") {
|
||||||
|
|
@ -169,10 +154,8 @@ function FilingFormPage(props) {
|
||||||
setVerifyOpen(true);
|
setVerifyOpen(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleVerifyConfirm = async (config) => {
|
const handleVerifyConfirm = async (config={}) => {
|
||||||
if (!verifyResult?.passed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setSubmitting(true);
|
setSubmitting(true);
|
||||||
|
|
||||||
const currentDetail = collectCurrentDetail();
|
const currentDetail = collectCurrentDetail();
|
||||||
|
|
@ -251,7 +234,7 @@ function FilingFormPage(props) {
|
||||||
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
const rowMap = new Map((rows || []).map((row) => [String(row.id), row]));
|
||||||
const newRows = idsToAdd.map((id) => {
|
const newRows = idsToAdd.map((id) => {
|
||||||
const row = rowMap.get(String(id));
|
const row = rowMap.get(String(id));
|
||||||
return row ? mapStaffRowToFilingPersonnel(row) : mapStaffRowToFilingPersonnel({ id });
|
return row;
|
||||||
});
|
});
|
||||||
setDetail((prev) => ({
|
setDetail((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
|
|
@ -421,7 +404,7 @@ function FilingFormPage(props) {
|
||||||
{!readOnly && isLastStep && (
|
{!readOnly && isLastStep && (
|
||||||
<>
|
<>
|
||||||
{mode !== FILING_FORM_MODE.FILED && (
|
{mode !== FILING_FORM_MODE.FILED && (
|
||||||
<Button loading={submitting} onClick={handleSaveDraft}>
|
<Button loading={submitting} onClick={()=>handleVerifyConfirm({isSaveDraft:true})}>
|
||||||
暂存
|
暂存
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -160,8 +160,7 @@ export default function FilingListTable({
|
||||||
<ControlWrapper.Select
|
<ControlWrapper.Select
|
||||||
label="备案状态"
|
label="备案状态"
|
||||||
placeholder="全部"
|
placeholder="全部"
|
||||||
allowClear={false}
|
|
||||||
showSearch={false}
|
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
>
|
>
|
||||||
{statusOptions.map((opt) => (
|
{statusOptions.map((opt) => (
|
||||||
|
|
|
||||||
|
|
@ -95,16 +95,15 @@ export function verifyFilingPrerequisites(detail = {}) {
|
||||||
passed: SKIP_PERSONNEL_VERIFY || keyOk,
|
passed: SKIP_PERSONNEL_VERIFY || keyOk,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mgmtUploaded = detail.materials.every((m) => m.attachmentUrl);
|
const mgmtUploaded =
|
||||||
|
SKIP_PERSONNEL_VERIFY || detail.materials.every((m) => m.attachmentUrl);
|
||||||
|
|
||||||
if (SKIP_PERSONNEL_VERIFY) {
|
items.push({
|
||||||
items.push({
|
key: "mgmtSystem",
|
||||||
key: "mgmtSystem",
|
label: "管理体系",
|
||||||
label: "管理体系",
|
desc: mgmtUploaded ? "管理体系文件已上传" : "尚未上传管理体系文件",
|
||||||
desc: mgmtUploaded ? "管理体系文件已上传" : "尚未上传管理体系文件",
|
passed: mgmtUploaded,
|
||||||
passed: mgmtUploaded,
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
passed: items.every((item) => item.passed),
|
passed: items.every((item) => item.passed),
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ const FilingTabs = ({
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
value={compliance[record.id]}
|
value={compliance[record.id]}
|
||||||
|
allowClear
|
||||||
|
defaultValue={'pass'}
|
||||||
onChange={(v) => onComplianceChange?.(record.id, v)}
|
onChange={(v) => onComplianceChange?.(record.id, v)}
|
||||||
>
|
>
|
||||||
<Select.Option value="pass">符合</Select.Option>
|
<Select.Option value="pass">符合</Select.Option>
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ const QualReview = (props) => {
|
||||||
},
|
},
|
||||||
{ title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true },
|
{ title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true },
|
||||||
{ title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 },
|
{ title: "机构类型", dataIndex: "filingUnitTypeName", width: 100 },
|
||||||
{ title: "证书编号", dataIndex: "filingNo", width: 140, ellipsis: true },
|
{ title: "证书编号", dataIndex: "qualCertNo", width: 140, ellipsis: true },
|
||||||
{ title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true },
|
{ title: "安全评价业务范围", dataIndex: "businessScope", width: 180, ellipsis: true },
|
||||||
{
|
{
|
||||||
title: "专家核验",
|
title: "专家核验",
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,7 @@ const QualReviewForm = (props) => {
|
||||||
isChange={isChange}
|
isChange={isChange}
|
||||||
legalPassCount={legalPassCount}
|
legalPassCount={legalPassCount}
|
||||||
legalFailCount={legalFailCount}
|
legalFailCount={legalFailCount}
|
||||||
|
onSuccess={() => props.history.goBack()}
|
||||||
onCancel={() => setReviewVisible(false)}
|
onCancel={() => setReviewVisible(false)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import { useEffect, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||||
|
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
import { isOrgAccountEnabled } from "~/utils/enterpriseInfo/adapter";
|
import { isOrgAccountEnabled } from "~/utils/enterpriseInfo/adapter";
|
||||||
import {
|
import {
|
||||||
CHONGQING_DISTRICTS,
|
CHONGQING_DISTRICTS,
|
||||||
|
|
@ -374,4 +375,4 @@ function OrgAccountPage(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_ORG_INFO], true)(OrgAccountPage);
|
export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(OrgAccountPage));
|
||||||
Loading…
Reference in New Issue