tangjie 2026-07-08 20:55:23 +08:00
parent 73411b43e8
commit 467251bbcf
11 changed files with 90 additions and 76 deletions

View File

@ -160,35 +160,7 @@ export function toFilingPersonnelRow(data = {}) {
};
}
export function fromFilingPersonnelAddCmd(item = {}) {
const row = toFilingPersonnelRow(item);
return normalizeQueryIds({
sourcePersonnelId: row.sourcePersonnelId,
personName: row.personName,
personTypeCode: row.personTypeCode,
personTypeName: row.personTypeName,
positionName: row.positionName,
titleName: row.titleName,
genderCode: row.genderCode,
genderName: row.genderName,
birthDate: row.birthDate,
joinWorkDate: row.joinWorkDate,
idCardNo: row.idCardNo,
currentAddress: row.currentAddress,
officeAddress: row.officeAddress,
educationCode: row.educationCode,
educationName: row.educationName,
graduateSchool: row.graduateSchool,
major: row.major,
qualScope: row.qualScope,
publications: row.publications,
professionalLevelCert: row.professionalLevelCert,
registerEngineerFlag: row.registerEngineerFlag,
abilityDeclaration: row.abilityDeclaration,
workExperience: row.workExperience,
proofMaterialUrl: row.proofMaterialUrl,
});
}
export function toFilingEquipmentRow(data = {}) {
return {

View File

@ -40,7 +40,7 @@ export const REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS = [
/** 监管端已备案机构 - 备案状态搜索1=已备案2=未备案) */
export const REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS = [
{ label: "全部", value: "" },
{ label: "已备案", value: "1" },
{ label: "未备案", value: "2" },
];

View File

@ -243,7 +243,7 @@ function DepartmentPositionPage(props) {
closePositionModal();
fetchPositionData(pageIndex, pageSize);
} else {
message.error(res?.message || "操作失败");
}
};
@ -542,7 +542,7 @@ function DeptFormModal({
onCancel();
await onSuccess();
} else {
message.error(res?.message || "操作失败");
}
} finally {
setSubmitting(false);

View File

@ -85,7 +85,7 @@ function EquipInfoPage(props) {
message.success("操作成功");
handleSearch();
} else {
message.error(res?.message || "操作失败");
}
},
});
@ -339,7 +339,7 @@ function EquipFormModal({
handleCancel();
onSuccess();
} else {
message.error(res?.message || "操作失败");
}
} finally {
setSubmitting(false);

View File

@ -84,7 +84,7 @@ function PersonnelChangePage(props) {
message.success("删除成功");
handleSearch();
} else {
message.error(res?.message || "删除失败");
}
},
});
@ -134,7 +134,7 @@ function PersonnelChangePage(props) {
setAuditModalOpen(false);
handleSearch();
} else {
message.error(res?.message || "审核操作失败");
}
} catch {
message.error("审核操作失败");

View File

@ -258,7 +258,7 @@ function CertModal({
handleCancel();
onSuccess();
} else {
message.error(res?.message || "操作失败");
}
} finally {
setSubmitting(false);

View File

@ -76,7 +76,7 @@ function FilingApplicationListPage(props) {
message.success("删除成功");
getData();
} else {
message.error(res?.message || res?.errMessage || "删除失败");
}
},
});

View File

@ -85,7 +85,7 @@ export default function EquipmentStep({
setSelectOpen(false);
}}
/>
<Image
{previewImage&&<Image
style={{ display: "none" }}
preview={{
visible: !!previewImage,
@ -94,7 +94,7 @@ export default function EquipmentStep({
if (!visible) setPreviewImage("");
},
}}
/>
/>}
</>
);
}

View File

@ -3,7 +3,7 @@ import { tools } from "@cqsjjb/jjb-common-lib";
import { Button, Form, message, Modal, Space, Spin, Tabs } from "antd";
import { useCallback, useEffect, useRef, useState } from "react";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import { fetchQualFilingDetail, fetchQualChangeDetail, fromFilingPersonnelAddCmd } from "~/api/qualFiling";
import { fetchQualFilingDetail, fetchQualChangeDetail, } from "~/api/qualFiling";
import { NS_QUAL_FILING } from "~/enumerate/namespace";
import { FILING_FORM_MODE } from "~/enumerate/qualFilingOptions";
import { FILING_MATERIAL_TEMPLATE } from "../filingMaterialTemplate";
@ -16,8 +16,7 @@ import {
persistFilingToBackend,
} from "../filingPersist";
import { verifyFilingPrerequisites } from "../filingVerify";
import { resolveUploadFileId } from "~/utils/mockUpload";
import { goFilingList } from "../filingPaths";
import BasicInfoStep from "./components/BasicInfoStep";
import CommitmentStep from "./components/CommitmentStep";
import EquipmentStep from "./components/EquipmentStep";
@ -174,7 +173,12 @@ function FilingFormPage(props) {
delete params.materials;
}
if (params.personnelList) {
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList.map(fromFilingPersonnelAddCmd);
body[`qualFilingPersonnel${word}AddCmds`] = params.personnelList.map(item=>{
return {
...item,
personName: item.userName,
};
});
delete params.personnelList;
}
if (params.equipmentList) {
@ -381,7 +385,9 @@ function FilingFormPage(props) {
onChange={goToStep}
/>
<Space>
<Space style={{
marginTop: '12px'
}}>
{stepIndex > 0 && (
<Button
onClick={() => {

View File

@ -151,12 +151,12 @@ function RegisteredOrgDetailPage(props) {
fetchRegisteredOrgDetail(id),
fetchRegisteredOrgQualificationGroups(id).catch((err) => {
console.warn("[RegisteredOrgDetail] qualification load failed:", err);
message.error(err?.message || "加载申请材料失败");
return [];
}),
fetchRegisteredOrgPersonnelList(id).catch((err) => {
console.warn("[RegisteredOrgDetail] personnel load failed:", err);
message.error(err?.message || "加载人员信息失败");
return [];
}),
]);
@ -265,7 +265,7 @@ function RegisteredOrgDetailPage(props) {
];
return (
<PageLayout title="备案信息详情" extra={<Button onClick={goBack}> 返回</Button>}>
<PageLayout title="备案信息详情" history={props.history} previous>
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
{orgName || undefined}
</p>

View File

@ -1,35 +1,51 @@
import { Button, Form, Tag } from "antd";
import { Button, Form, Table, Tag } from "antd";
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { useEffect } from "react";
import { useEffect, useState } from "react";
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import Search from "zy-react-library/components/Search";
import TableList from "zy-react-library/components/Table";
import useTable from "zy-react-library/hooks/useTable";
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
import {
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS,
} from "~/enumerate/enterpriseOptions";
import { NS_ORG_INFO } from "~/enumerate/namespace";
import { safeListRequest } from "~/utils";
import { formSelectField } from "~/utils/enterpriseForm";
const FILING_RECORD_STATUS_COLOR = {
1: "success",
2: "default",
};
const SEARCH_COL = { xs: 24, sm: 12, md: 8, lg: 6 };
const SEARCH_DEFAULT_VALUES = { filingType: "", filingRecordStatus: "" };
/** 约定式路由首字母小写registeredOrg/detail */
const DETAIL_PATH = "/container/supervision/basicInfo/registeredOrg/detail";
function RegisteredOrgListPage(props) {
const [searchForm] = Form.useForm();
const [dataSource, setDataSource] = useState([]);
const [total, setTotal] = useState(0);
const [loading, setLoading] = useState(false);
const [pageIndex, setPageIndex] = useState(1);
const [pageSize, setPageSize] = useState(10);
const { tableProps, getData } = useTable(safeListRequest(props.registeredOrgList), { form: searchForm });
const fetchData = async (page = 1, size = 10) => {
setLoading(true);
try {
const formData = searchForm.getFieldsValue();
const res = await props.registeredOrgList({ ...formData, current: page, size });
if (res?.success !== false) {
setDataSource(res?.data || []);
setTotal(res?.totalCount || 0);
}
} catch {
setDataSource([]);
setTotal(0);
} finally {
setLoading(false);
}
};
useEffect(() => {
getData();
fetchData();
}, []);
const goDetail = (id) => {
@ -55,25 +71,45 @@ function RegisteredOrgListPage(props) {
</div>
}
>
<Search
<SearchForm
form={searchForm}
values={SEARCH_DEFAULT_VALUES}
options={[
{ name: "orgName", label: "评价机构名称", placeholder: "关键字搜索", colProps: SEARCH_COL },
{ name: "registerAddress", label: "注册地址", placeholder: "关键字搜索", colProps: SEARCH_COL },
formSelectField("filingType", "备案类型", REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS, {
colProps: SEARCH_COL,
componentProps: { allowClear: false, showSearch: false },
}),
formSelectField("filingRecordStatus", "备案状态", REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS, {
colProps: SEARCH_COL,
componentProps: { allowClear: false, showSearch: false },
}),
loading={loading}
formLine={[
<Form.Item key="orgName" name="orgName">
<ControlWrapper.Input label="评价机构名称" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="registerAddress" name="registerAddress">
<ControlWrapper.Input label="注册地址" allowClear placeholder="关键字搜索" />
</Form.Item>,
<Form.Item key="filingType" name="filingType" initialValue="">
<ControlWrapper.Select label="备案类型" placeholder="请选择" allowClear options={REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS} />
</Form.Item>,
<Form.Item key="filingRecordStatus" name="filingRecordStatus" initialValue="">
<ControlWrapper.Select label="备案状态" placeholder="请选择" allowClear options={REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS} />
</Form.Item>,
]}
onFinish={getData}
onFinish={() => fetchData(1, 10)}
onReset={() => fetchData(1, 10)}
style={{
marginBottom: 12,
}}
/>
<TableList
{...tableProps}
<Table
dataSource={dataSource}
loading={loading}
scroll={{ y: props.scrollY }}
pagination={{
current: pageIndex,
pageSize,
total,
showSizeChanger: true,
showTotal: (t) => `${t}`,
}}
onChange={(pag) => {
setPageIndex(pag.current);
setPageSize(pag.pageSize);
fetchData(pag.current, pag.pageSize);
}}
columns={[
{ title: "评价机构名称", dataIndex: "orgName", ellipsis: true },
{ title: "注册地址", dataIndex: "registerAddress", ellipsis: true },
@ -102,4 +138,4 @@ function RegisteredOrgListPage(props) {
);
}
export default Connect([NS_ORG_INFO], true)(RegisteredOrgListPage);
export default Connect([NS_ORG_INFO], true)(AntdTableFuncControl(RegisteredOrgListPage));