Merge remote-tracking branch 'origin/dev' into dev
commit
21ff39b55d
|
|
@ -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 = {}) {
|
export function toFilingEquipmentRow(data = {}) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ export const REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS = [
|
||||||
|
|
||||||
/** 监管端已备案机构 - 备案状态搜索(1=已备案,2=未备案) */
|
/** 监管端已备案机构 - 备案状态搜索(1=已备案,2=未备案) */
|
||||||
export const REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS = [
|
export const REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS = [
|
||||||
{ label: "全部", value: "" },
|
|
||||||
{ label: "已备案", value: "1" },
|
{ label: "已备案", value: "1" },
|
||||||
{ label: "未备案", value: "2" },
|
{ label: "未备案", value: "2" },
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ function DepartmentPositionPage(props) {
|
||||||
closePositionModal();
|
closePositionModal();
|
||||||
fetchPositionData(pageIndex, pageSize);
|
fetchPositionData(pageIndex, pageSize);
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -542,7 +542,7 @@ function DeptFormModal({
|
||||||
onCancel();
|
onCancel();
|
||||||
await onSuccess();
|
await onSuccess();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ function EquipInfoPage(props) {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
handleSearch();
|
handleSearch();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -339,7 +339,7 @@ function EquipFormModal({
|
||||||
handleCancel();
|
handleCancel();
|
||||||
onSuccess();
|
onSuccess();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ function PersonnelChangePage(props) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
handleSearch();
|
handleSearch();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "删除失败");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -134,7 +134,7 @@ function PersonnelChangePage(props) {
|
||||||
setAuditModalOpen(false);
|
setAuditModalOpen(false);
|
||||||
handleSearch();
|
handleSearch();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "审核操作失败");
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
message.error("审核操作失败");
|
message.error("审核操作失败");
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ function CertModal({
|
||||||
handleCancel();
|
handleCancel();
|
||||||
onSuccess();
|
onSuccess();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || "操作失败");
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
setSubmitting(false);
|
setSubmitting(false);
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ function FilingApplicationListPage(props) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
getData();
|
getData();
|
||||||
} else {
|
} else {
|
||||||
message.error(res?.message || res?.errMessage || "删除失败");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ export default function EquipmentStep({
|
||||||
setSelectOpen(false);
|
setSelectOpen(false);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Image
|
{previewImage&&<Image
|
||||||
style={{ display: "none" }}
|
style={{ display: "none" }}
|
||||||
preview={{
|
preview={{
|
||||||
visible: !!previewImage,
|
visible: !!previewImage,
|
||||||
|
|
@ -94,7 +94,7 @@ export default function EquipmentStep({
|
||||||
if (!visible) setPreviewImage("");
|
if (!visible) setPreviewImage("");
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { tools } from "@cqsjjb/jjb-common-lib";
|
||||||
import { Button, Form, message, Modal, Space, Spin, Tabs } from "antd";
|
import { Button, Form, message, Modal, Space, Spin, Tabs } from "antd";
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
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 { 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";
|
||||||
|
|
@ -16,8 +16,7 @@ import {
|
||||||
persistFilingToBackend,
|
persistFilingToBackend,
|
||||||
} from "../filingPersist";
|
} from "../filingPersist";
|
||||||
import { verifyFilingPrerequisites } from "../filingVerify";
|
import { verifyFilingPrerequisites } from "../filingVerify";
|
||||||
import { resolveUploadFileId } from "~/utils/mockUpload";
|
|
||||||
import { goFilingList } from "../filingPaths";
|
|
||||||
import BasicInfoStep from "./components/BasicInfoStep";
|
import BasicInfoStep from "./components/BasicInfoStep";
|
||||||
import CommitmentStep from "./components/CommitmentStep";
|
import CommitmentStep from "./components/CommitmentStep";
|
||||||
import EquipmentStep from "./components/EquipmentStep";
|
import EquipmentStep from "./components/EquipmentStep";
|
||||||
|
|
@ -174,7 +173,12 @@ function FilingFormPage(props) {
|
||||||
delete params.materials;
|
delete params.materials;
|
||||||
}
|
}
|
||||||
if (params.personnelList) {
|
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;
|
delete params.personnelList;
|
||||||
}
|
}
|
||||||
if (params.equipmentList) {
|
if (params.equipmentList) {
|
||||||
|
|
@ -381,7 +385,9 @@ function FilingFormPage(props) {
|
||||||
onChange={goToStep}
|
onChange={goToStep}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Space>
|
<Space style={{
|
||||||
|
marginTop: '12px'
|
||||||
|
}}>
|
||||||
{stepIndex > 0 && (
|
{stepIndex > 0 && (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -151,12 +151,12 @@ function RegisteredOrgDetailPage(props) {
|
||||||
fetchRegisteredOrgDetail(id),
|
fetchRegisteredOrgDetail(id),
|
||||||
fetchRegisteredOrgQualificationGroups(id).catch((err) => {
|
fetchRegisteredOrgQualificationGroups(id).catch((err) => {
|
||||||
console.warn("[RegisteredOrgDetail] qualification load failed:", err);
|
console.warn("[RegisteredOrgDetail] qualification load failed:", err);
|
||||||
message.error(err?.message || "加载申请材料失败");
|
|
||||||
return [];
|
return [];
|
||||||
}),
|
}),
|
||||||
fetchRegisteredOrgPersonnelList(id).catch((err) => {
|
fetchRegisteredOrgPersonnelList(id).catch((err) => {
|
||||||
console.warn("[RegisteredOrgDetail] personnel load failed:", err);
|
console.warn("[RegisteredOrgDetail] personnel load failed:", err);
|
||||||
message.error(err?.message || "加载人员信息失败");
|
|
||||||
return [];
|
return [];
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
|
@ -265,7 +265,7 @@ function RegisteredOrgDetailPage(props) {
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
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)" }}>
|
<p style={{ margin: 0, marginBottom: 24, color: "rgba(0, 0, 0, 0.45)" }}>
|
||||||
{orgName || undefined}
|
{orgName || undefined}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -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 { 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 PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
import Search from "zy-react-library/components/Search";
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
import TableList from "zy-react-library/components/Table";
|
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
|
||||||
import {
|
import {
|
||||||
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
|
REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS,
|
||||||
REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS,
|
REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS,
|
||||||
} from "~/enumerate/enterpriseOptions";
|
} from "~/enumerate/enterpriseOptions";
|
||||||
import { NS_ORG_INFO } from "~/enumerate/namespace";
|
import { NS_ORG_INFO } from "~/enumerate/namespace";
|
||||||
import { safeListRequest } from "~/utils";
|
|
||||||
import { formSelectField } from "~/utils/enterpriseForm";
|
|
||||||
|
|
||||||
const FILING_RECORD_STATUS_COLOR = {
|
const FILING_RECORD_STATUS_COLOR = {
|
||||||
1: "success",
|
1: "success",
|
||||||
2: "default",
|
2: "default",
|
||||||
};
|
};
|
||||||
|
|
||||||
const SEARCH_COL = { xs: 24, sm: 12, md: 8, lg: 6 };
|
|
||||||
const SEARCH_DEFAULT_VALUES = { filingType: "", filingRecordStatus: "" };
|
|
||||||
/** 约定式路由首字母小写:registeredOrg/detail */
|
/** 约定式路由首字母小写:registeredOrg/detail */
|
||||||
const DETAIL_PATH = "/container/supervision/basicInfo/registeredOrg/detail";
|
const DETAIL_PATH = "/container/supervision/basicInfo/registeredOrg/detail";
|
||||||
|
|
||||||
function RegisteredOrgListPage(props) {
|
function RegisteredOrgListPage(props) {
|
||||||
const [searchForm] = Form.useForm();
|
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(() => {
|
useEffect(() => {
|
||||||
getData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const goDetail = (id) => {
|
const goDetail = (id) => {
|
||||||
|
|
@ -55,25 +71,45 @@ function RegisteredOrgListPage(props) {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Search
|
<SearchForm
|
||||||
form={searchForm}
|
form={searchForm}
|
||||||
values={SEARCH_DEFAULT_VALUES}
|
loading={loading}
|
||||||
options={[
|
formLine={[
|
||||||
{ name: "orgName", label: "评价机构名称", placeholder: "关键字搜索", colProps: SEARCH_COL },
|
<Form.Item key="orgName" name="orgName">
|
||||||
{ name: "registerAddress", label: "注册地址", placeholder: "关键字搜索", colProps: SEARCH_COL },
|
<ControlWrapper.Input label="评价机构名称" allowClear placeholder="关键字搜索" />
|
||||||
formSelectField("filingType", "备案类型", REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS, {
|
</Form.Item>,
|
||||||
colProps: SEARCH_COL,
|
<Form.Item key="registerAddress" name="registerAddress">
|
||||||
componentProps: { allowClear: false, showSearch: false },
|
<ControlWrapper.Input label="注册地址" allowClear placeholder="关键字搜索" />
|
||||||
}),
|
</Form.Item>,
|
||||||
formSelectField("filingRecordStatus", "备案状态", REGISTERED_ORG_FILING_RECORD_STATUS_OPTIONS, {
|
<Form.Item key="filingType" name="filingType" initialValue="">
|
||||||
colProps: SEARCH_COL,
|
<ControlWrapper.Select label="备案类型" placeholder="请选择" allowClear options={REGISTERED_ORG_FILING_TYPE_SEARCH_OPTIONS} />
|
||||||
componentProps: { allowClear: false, showSearch: false },
|
</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
|
<Table
|
||||||
{...tableProps}
|
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={[
|
columns={[
|
||||||
{ title: "评价机构名称", dataIndex: "orgName", ellipsis: true },
|
{ title: "评价机构名称", dataIndex: "orgName", ellipsis: true },
|
||||||
{ title: "注册地址", dataIndex: "registerAddress", 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));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue