diff --git a/jjb.config.js b/jjb.config.js index 1163db8..a384d58 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -1,20 +1,20 @@ module.exports = { // 应用后端git地址,部署上线需要 - javaGit: "", + javaGit: "http://47.92.113.182:3000/cq_anquan/safety-eval-service.git", // 应用后端仓库名称,部署上线需要 - javaGitName: "", + javaGitName: "safety-eval-service", // 环境配置 environment: { development: { // 应用后端分支名称,部署上线需要 - javaGitBranch: "", + javaGitBranch: "dev", // 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095) // 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095 API_HOST: "http://192.168.0.103", }, production: { // 应用后端分支名称,部署上线需要 - javaGitBranch: "", + javaGitBranch: "dev", // 接口服务地址 API_HOST: "", }, diff --git a/src/components/UploadButton/index.js b/src/components/UploadButton/index.js index 024bdbb..bb3c375 100644 --- a/src/components/UploadButton/index.js +++ b/src/components/UploadButton/index.js @@ -23,6 +23,9 @@ export default function UploadButton({ { if (info.file.status === "uploading") { setUploading(true); @@ -40,4 +43,4 @@ export default function UploadButton({ ); -} \ No newline at end of file +} diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js index 9ef443d..b6906d7 100644 --- a/src/enumerate/constant/index.js +++ b/src/enumerate/constant/index.js @@ -18,7 +18,7 @@ export const VERIFY_STATUS_MAP = { /** 审核状态 */ export const REVIEW_STATUS_MAP = { - + 1: { label: "已审核", color: "success" }, 2: { label: "审核中", color: "processing" }, 3: { label: "打回", color: "error" }, }; diff --git a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js index 67556da..294f50c 100644 --- a/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js +++ b/src/pages/Container/EnterpriseInfo/DepartmentPosition/index.js @@ -55,6 +55,8 @@ function toSelectedDept(node) { } function DepartmentPositionPage(props) { + const { orgPosition } = props; + const { orgPositionLoading } = orgPosition; const [selectedDept, setSelectedDept] = useState(null); const [treeData, setTreeData] = useState([]); const [deptModalOpen, setDeptModalOpen] = useState(false); @@ -180,7 +182,7 @@ function DepartmentPositionPage(props) { okText: "是", cancelText: "否", onOk: async () => { - const res = await props.orgPositionRemove({ id }); + const res = await props.orgPositionRemove({ data: id }); if (res?.success !== false) { message.success("删除成功"); fetchPositionData(1, 10); @@ -316,6 +318,7 @@ function DepartmentPositionPage(props) { , ]} onFinish={() => fetchPositionData(1, 10)} + onReset={() => fetchPositionData(1, 10)} style={{ marginBottom: 16 }} /> @@ -544,7 +548,7 @@ function DeptFormModal({ setSubmitting(false); } }; - console.log(treeData); + return (
- - - + {!currentId && ( + + + + )} { - if (hasExistingData) { - form.setFieldsValue({ - ...detail, - productionDate: detail.productionDate - ? dayjs(detail.productionDate) - : undefined, - }); - setEditing(false); - } else { - form.resetFields(); - } + setEditing(false); }; const handleSave = async (submitType) => { diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js index 122bbcc..ba8985d 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/Certificate/index.js @@ -62,12 +62,13 @@ function StaffCertificatePage(props) { return ( { setCurrentId(""); setAddModalOpen(true); }}>新增证书 } > - { - 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) => { @@ -464,7 +465,7 @@ function StaffFormModal({ handleCancel(); onSuccess(); } else { - message.error(res?.message || "操作失败"); + } } finally { setSubmitting(false); diff --git a/src/pages/Container/EnterpriseInfo/PersonnelInfo/StaffViewModal.js b/src/pages/Container/EnterpriseInfo/PersonnelInfo/StaffViewModal.js index 8daa91b..f67f118 100644 --- a/src/pages/Container/EnterpriseInfo/PersonnelInfo/StaffViewModal.js +++ b/src/pages/Container/EnterpriseInfo/PersonnelInfo/StaffViewModal.js @@ -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 FilePreviewModal, { FilePreviewContent } from "~/components/FilePreviewModal"; +import FilePreviewModal, { + FilePreviewContent, +} from "~/components/FilePreviewModal"; import { resolvePreviewSrc } from "~/components/CertPreviewImg"; -import { fetchStaffCertDetail, fetchStaffCertListByPersonnelId } from "~/api/staffCertificate"; +import { + fetchStaffCertDetail, + fetchStaffCertListByPersonnelId, +} from "~/api/staffCertificate"; import { fetchOrgPersonnelDetail } from "~/utils/qualFiling/personnelHelper"; const GENDER_MAP = { 1: "男", 2: "女" }; @@ -41,26 +46,30 @@ export default function StaffViewModal({ const loadCertList = requestCertListRef.current; Promise.all([ - Promise.resolve(requestDetailsRef.current({ id: currentId })).catch((err) => { - console.warn("[StaffViewModal] load detail failed:", err); - return { data: {} }; - }), + Promise.resolve(requestDetailsRef.current({ id: currentId })).catch( + (err) => { + console.warn("[StaffViewModal] load detail failed:", err); + return { data: {} }; + }, + ), typeof loadCertList === "function" ? Promise.resolve(loadCertList(currentId)).catch((err) => { - console.warn("[StaffViewModal] load certificates failed:", err); - return []; - }) + console.warn("[StaffViewModal] load certificates failed:", err); + return []; + }) : Promise.resolve([]), - ]).then(([detailRes, certList]) => { - if (!cancelled) { - setInfo(detailRes?.data || {}); - setCertificates(Array.isArray(certList) ? certList : []); - } - }).finally(() => { - if (!cancelled) { - setDetailLoading(false); - } - }); + ]) + .then(([detailRes, certList]) => { + if (!cancelled) { + setInfo(detailRes?.data || {}); + setCertificates(Array.isArray(certList) ? certList : []); + } + }) + .finally(() => { + if (!cancelled) { + setDetailLoading(false); + } + }); return () => { cancelled = true; }; @@ -85,14 +94,18 @@ export default function StaffViewModal({ } }; + const proofMaterialUrl = info.proofMaterialUrl + ? JSON.parse(info.proofMaterialUrl) + : []; - const proofMaterialUrl= info.proofMaterialUrl? JSON.parse(info.proofMaterialUrl) : []; - const certPreviewFiles = certPreviewInfo?.certImgs?.length ? certPreviewInfo.certImgs : certPreviewInfo?.certImgFiles || []; 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 ( <> @@ -108,28 +121,57 @@ export default function StaffViewModal({ > {info.userName} - {GENDER_MAP[info.genderCode]} - {info.birthDate} + + {GENDER_MAP[info.genderCode]} + + + {info.birthDate} + {info.account} {info.deptName} {info.postName} - {info.personType || "基础人员"} - {info.qualScope || "-"} - {info.professionalLevelName || "-"} - {info.evaluatorCertNo || "-"} - {info.educationTypeName || "-"} - {info.educationLevelName || "-"} - {info.titleName || "-"} + + {info.personType || "基础人员"} + + + {info.qualScope || "-"} + + + {info.professionalLevelName || "-"} + + + {info.evaluatorCertNo || "-"} + + + {info.educationTypeName || "-"} + + + {info.educationLevelName || "-"} + + + {info.titleName || "-"} + {REGISTER_ENGINEER_MAP[info.registerEngineerFlag] ?? "-"} - {info.idCardNo} - - {info.currentAddress} - {info.officeAddress} - {info.graduateSchool} + + {info.idCardNo} + + + + {info.currentAddress} + + + {info.officeAddress} + + + {info.graduateSchool} + {info.major} - + {info.publications || "-"} @@ -139,18 +181,32 @@ export default function StaffViewModal({ {info.workExperience || "-"} - {proofMaterialUrl.length ? proofMaterialUrl.map((item) => ( - - )) : "-" -} + {proofMaterialUrl.length + ? proofMaterialUrl.map((item) => { + const isImage = /\.(jpg|jpeg|png|gif|webp|bmp|svg)(\?.*)?$/i.test(item.url); + return ( +
+ {isImage ? ( + + ) : ( + + )} +
+ ); + }) + : "-"}
-
证照信息
+
+ 证照信息 +
( - + ), }, ]} @@ -192,7 +254,9 @@ export default function StaffViewModal({ loading={certPreviewLoading} cancelText="关闭" okText={certPreviewUrl ? "新窗口打开" : "关闭"} - okButtonProps={{ style: certPreviewUrl ? undefined : { display: "none" } }} + okButtonProps={{ + style: certPreviewUrl ? undefined : { display: "none" }, + }} onCancel={() => { setCertPreview(null); setCertPreviewInfo(null); @@ -207,18 +271,38 @@ export default function StaffViewModal({ > {certPreviewInfo && (
- - {certPreviewInfo.certName} - {certPreviewInfo.certNo} - {certPreviewInfo.certCategory || "-"} - {certPreviewInfo.issueOrg || "-"} - {certPreviewInfo.validStartDate || "-"} - {certPreviewInfo.validEndDate || "-"} + + + {certPreviewInfo.certName} + + + {certPreviewInfo.certNo} + + + {certPreviewInfo.certCategory || "-"} + + + {certPreviewInfo.issueOrg || "-"} + + + {certPreviewInfo.validStartDate || "-"} + + + {certPreviewInfo.validEndDate || "-"} + - +
)} ); -} \ No newline at end of file +} diff --git a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js index a4fa6ac..5ac6725 100644 --- a/src/pages/Container/EnterpriseInfo/QualificationCert/index.js +++ b/src/pages/Container/EnterpriseInfo/QualificationCert/index.js @@ -195,7 +195,7 @@ function QualificationCertPage(props) { }, { title: "操作", - width: 200, + width: 180, fixed: "right", render: (_, record) => ( diff --git a/src/pages/Container/QualApplication/FilingApplication/List/index.js b/src/pages/Container/QualApplication/FilingApplication/List/index.js index 7478e10..8a6f82b 100644 --- a/src/pages/Container/QualApplication/FilingApplication/List/index.js +++ b/src/pages/Container/QualApplication/FilingApplication/List/index.js @@ -7,7 +7,7 @@ import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { NS_QUAL_FILING } from "~/enumerate/namespace"; import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions"; import FilingListTable from "../../FilingListTable"; -import { goFilingForm } from "../../filingPaths"; + const { router } = tools; diff --git a/src/pages/Container/QualApplication/FilingForm/index.js b/src/pages/Container/QualApplication/FilingForm/index.js index d6a57af..7939337 100644 --- a/src/pages/Container/QualApplication/FilingForm/index.js +++ b/src/pages/Container/QualApplication/FilingForm/index.js @@ -7,7 +7,7 @@ import { fetchQualFilingDetail, fetchQualChangeDetail, fromFilingPersonnelAddCmd import { NS_QUAL_FILING } from "~/enumerate/namespace"; import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions"; import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate"; -import { clearLocalDraft, saveLocalDraft } from "../filingLocalDraft"; + import { fetchOrgPersonnelOptions, mapEquipRowToFilingEquipment, @@ -114,22 +114,7 @@ function FilingFormPage(props) { [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(() => { if (activeStep === "commitment") { @@ -169,10 +154,8 @@ function FilingFormPage(props) { setVerifyOpen(true); }; - const handleVerifyConfirm = async (config) => { - if (!verifyResult?.passed) { - return; - } + const handleVerifyConfirm = async (config={}) => { + setSubmitting(true); const currentDetail = collectCurrentDetail(); @@ -251,7 +234,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, @@ -421,7 +404,7 @@ function FilingFormPage(props) { {!readOnly && isLastStep && ( <> {mode !== FILING_FORM_MODE.FILED && ( - )} diff --git a/src/pages/Container/QualApplication/FilingListTable.jsx b/src/pages/Container/QualApplication/FilingListTable.jsx index b8f3926..7e58cb7 100644 --- a/src/pages/Container/QualApplication/FilingListTable.jsx +++ b/src/pages/Container/QualApplication/FilingListTable.jsx @@ -160,8 +160,7 @@ export default function FilingListTable({ {statusOptions.map((opt) => ( diff --git a/src/pages/Container/QualApplication/filingVerify.js b/src/pages/Container/QualApplication/filingVerify.js index 1cd5ff8..b595da7 100644 --- a/src/pages/Container/QualApplication/filingVerify.js +++ b/src/pages/Container/QualApplication/filingVerify.js @@ -95,16 +95,15 @@ export function verifyFilingPrerequisites(detail = {}) { 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({ - key: "mgmtSystem", - label: "管理体系", - desc: mgmtUploaded ? "管理体系文件已上传" : "尚未上传管理体系文件", - passed: mgmtUploaded, - }); - } + items.push({ + key: "mgmtSystem", + label: "管理体系", + desc: mgmtUploaded ? "管理体系文件已上传" : "尚未上传管理体系文件", + passed: mgmtUploaded, + }); return { passed: items.every((item) => item.passed), diff --git a/src/pages/Container/QualificationReview/FilingTabs/index.js b/src/pages/Container/QualificationReview/FilingTabs/index.js index b55da78..2765f0f 100644 --- a/src/pages/Container/QualificationReview/FilingTabs/index.js +++ b/src/pages/Container/QualificationReview/FilingTabs/index.js @@ -45,6 +45,8 @@ const FilingTabs = ({ size="small" placeholder="请选择" value={compliance[record.id]} + allowClear + defaultValue={'pass'} onChange={(v) => onComplianceChange?.(record.id, v)} > 符合 diff --git a/src/pages/Container/QualificationReview/QualReview/index.js b/src/pages/Container/QualificationReview/QualReview/index.js index da06fea..a83462b 100644 --- a/src/pages/Container/QualificationReview/QualReview/index.js +++ b/src/pages/Container/QualificationReview/QualReview/index.js @@ -59,7 +59,7 @@ const QualReview = (props) => { }, { title: "机构名称", dataIndex: "filingUnitName", width: 220, ellipsis: true }, { 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: "专家核验", diff --git a/src/pages/Container/QualificationReview/QualReviewForm/index.js b/src/pages/Container/QualificationReview/QualReviewForm/index.js index 71bb3c9..ff09751 100644 --- a/src/pages/Container/QualificationReview/QualReviewForm/index.js +++ b/src/pages/Container/QualificationReview/QualReviewForm/index.js @@ -95,6 +95,7 @@ const QualReviewForm = (props) => { isChange={isChange} legalPassCount={legalPassCount} legalFailCount={legalFailCount} + onSuccess={() => props.history.goBack()} onCancel={() => setReviewVisible(false)} /> diff --git a/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js b/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js index 92c54fd..9791dd4 100644 --- a/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js +++ b/src/pages/Container/Supervision/BasicInfo/OrgAccount/index.js @@ -7,6 +7,7 @@ import { useEffect, useState } from "react"; import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout"; import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm"; import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper"; +import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd"; import { isOrgAccountEnabled } from "~/utils/enterpriseInfo/adapter"; import { CHONGQING_DISTRICTS, @@ -374,4 +375,4 @@ function OrgAccountPage(props) { ); } -export default Connect([NS_ORG_INFO], true)(OrgAccountPage); \ No newline at end of file +export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(OrgAccountPage)); \ No newline at end of file