dev_1.0.1
tangjie 2026-07-03 14:47:36 +08:00
parent bb66034d4d
commit 540b779cef
9 changed files with 186 additions and 171 deletions

View File

@ -10,7 +10,7 @@ module.exports = {
javaGitBranch: "<branch-name>", javaGitBranch: "<branch-name>",
// 本地联调 safetyEval-servicecontext-path: /safetyEval默认端口 8095 // 本地联调 safetyEval-servicecontext-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.134", API_HOST: "http://192.168.0.149",
}, },
production: { production: {
// 应用后端分支名称,部署上线需要 // 应用后端分支名称,部署上线需要

View File

@ -5,13 +5,16 @@
<!--NED--> <!--NED-->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head data-built-info="<%= $builtInfo %>"> <head data-built-info="<%= $builtInfo %>">
<meta charset="UTF-8"/> <meta charset="UTF-8" />
<meta name="renderer" content="webkit"/> <meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover"> <meta name="viewport"
content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover">
<% for (const item of $links) { %> <% for (const item of $links) { %>
<link type="text/css" rel="stylesheet" href="<%= item %>"></link> <link type="text/css" rel="stylesheet" href="<%= item %>">
</link>
<% } %> <% } %>
<title>--</title> <title>--</title>
<script> <script>
@ -85,17 +88,41 @@
} }
}); });
})(); })();
window.jjbCommonGlobalConfig = {
// http拦截器
httpInterceptor: {
// 请求拦截
request: (url, method, params, headers) => {
// 处理你的请求拦截
// 给请求头添加一个租户ID
if(sessionStorage.getItem('orgInfoId')){
headers.orgInfoId = sessionStorage.getItem('orgInfoId');
}
return Promise.resolve([
url,
method,
params,
headers
])
},
}
}
</script> </script>
<!-- SCRIPTS --> <!-- SCRIPTS -->
<% for (const item of $scripts) { %> <% for (const item of $scripts) { %>
<script src="<%= item %>" type="text/javascript"></script> <script src="<%= item %>" type="text/javascript"></script>
<% } %> <% } %>
</head> </head>
<body >
<body>
<!-- NOSCRIPT --> <!-- NOSCRIPT -->
<noscript>此网页需要开启JavaScript功能。</noscript> <noscript>此网页需要开启JavaScript功能。</noscript>
<!-- MAIN --> <!-- MAIN -->
<% const { root } = $element; %> <% const { root }=$element; %>
<div id="<%= root.id %>" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div> <div id="<%= root.id %>" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div>
</body> </body>
</html> </html>

View File

@ -33,39 +33,7 @@ export function toFilingListRow(data = {}) {
}; };
} }
// ─── 字段映射:基本表单 ───
export function toFilingBasicForm(data = {}) {
return {
id: asId(data.id),
businessScope: data.businessScope,
filingTerritoryCode: data.filingTerritoryCode,
filingTerritoryName: data.filingTerritoryName,
filingUnitName: data.filingUnitName,
filingUnitTypeCode: data.filingUnitTypeCode,
filingUnitTypeName: data.filingUnitTypeName,
filingNo: data.filingNo,
registerAddress: data.registerAddress,
officeAddress: data.officeAddress,
creditCode: data.creditCode,
qualCertNo: data.qualCertNo,
legalPersonPhone: data.legalPersonPhone,
contactPhone: data.contactPhone,
infoDisclosureUrl: data.infoDisclosureUrl,
fixedAssetAmount: data.fixedAssetAmount,
workplaceArea: data.workplaceArea,
archiveRoomArea: data.archiveRoomArea,
fulltimeEvaluatorCount: data.fulltimeEvaluatorCount,
registeredEngineerCount: data.registeredEngineerCount,
unitIntro: data.unitIntro,
attachmentUrl: data.attachmentUrl,
attachments: parseUploadFileList(data.attachmentUrl, "备案附件.pdf"),
filingStatusCode: data.filingStatusCode,
filingStatusName: data.filingStatusName,
applyTypeCode: data.applyTypeCode,
originFilingId: asId(data.originFilingId),
};
}
export function fromFilingBasicForm(values = {}) { export function fromFilingBasicForm(values = {}) {
const territoryName = values.filingTerritoryName || values.filingTerritoryCode; const territoryName = values.filingTerritoryName || values.filingTerritoryCode;
@ -100,7 +68,7 @@ export function fromFilingBasicForm(values = {}) {
export function toFilingDetail(data = {}) { export function toFilingDetail(data = {}) {
return { return {
...toFilingBasicForm(data), ...data,
materials: (data.materials || []), materials: (data.materials || []),
commitment: data.commitment ? toFilingCommitmentForm(data.commitment, data.filingUnitName) : null, commitment: data.commitment ? toFilingCommitmentForm(data.commitment, data.filingUnitName) : null,
personnelList: (data.personnelList || []).map(toFilingPersonnelRow), personnelList: (data.personnelList || []).map(toFilingPersonnelRow),
@ -222,6 +190,11 @@ export async function fetchQualFilingDetail(id) {
return fromSingleResponse(res, toFilingDetail); return fromSingleResponse(res, toFilingDetail);
} }
export async function fetchQualChangeDetail(id) {
const res = await apiGet("/safetyEval/qual-filing-change/detail", { id: asId(id) });
return fromSingleResponse(res, toFilingDetail);
}
export async function fetchQualFilingChangeHistory(originFilingId) { export async function fetchQualFilingChangeHistory(originFilingId) {
const res = await apiGet("/safetyEval/qual-filing-change/history", { const res = await apiGet("/safetyEval/qual-filing-change/history", {
originFilingId: asId(originFilingId), originFilingId: asId(originFilingId),
@ -230,7 +203,7 @@ export async function fetchQualFilingChangeHistory(originFilingId) {
} }
export const qualFilingPage = declareRequest("qualFilingLoading", safePageResult(async (params) => { export const qualFilingPage = declareRequest("qualFilingLoading", safePageResult(async (params) => {
const query = toFilingPageQuery(params, { applyTypeCode: APPLY_TYPE_APPLICATION }); const query = toFilingPageQuery(params, { });
const res = await apiGet("/safetyEval/qual-filing/page", query); const res = await apiGet("/safetyEval/qual-filing/page", query);
return fromPageResponse(res, toFilingListRow); return fromPageResponse(res, toFilingListRow);
})); }));
@ -340,4 +313,8 @@ export const submitQualFiling = declareRequest(
"Post > @/safetyEval/qual-filing/aggregationSaveOrEdit", "Post > @/safetyEval/qual-filing/aggregationSaveOrEdit",
); );
export const submitQualFilingChange = declareRequest(
"qualFilingSubmitLoading",
"Post > @/safetyEval/qual-filing-change/aggregationSaveOrEdit",
);

View File

@ -23,9 +23,10 @@ function FiledManageListPage(props) {
const params = { const params = {
...router.query, ...router.query,
current: pagination?.current || router.query.current || 1, current: pagination?.current || router.query.current || 1,
pageSize: pagination?.pageSize || router.query.pageSize || 10, size: pagination?.size || router.query.size || 10,
applyTypeCode: 2,
}; };
const res = await props.qualFilingFiledPage(params); const res = await props.qualFilingPage(params);
if (res?.success !== false) { if (res?.success !== false) {
setDataSource(res?.data || []); setDataSource(res?.data || []);
setTotal(res?.totalCount || 0); setTotal(res?.totalCount || 0);
@ -43,12 +44,12 @@ function FiledManageListPage(props) {
}, []); }, []);
const handleSearch = (values) => { const handleSearch = (values) => {
router.query = { ...router.query, ...values, current: 1, pageSize: 10 }; router.query = { ...router.query, ...values, current: 1, size: 10 };
getData(); getData();
}; };
const handlePageChange = (pagination) => { const handlePageChange = (pagination) => {
router.query = { ...router.query, current: pagination.current, pageSize: pagination.pageSize }; router.query = { ...router.query, current: pagination.current, size: pagination.size };
getData(pagination); getData(pagination);
}; };

View File

@ -24,6 +24,7 @@ function FilingApplicationListPage(props) {
...router.query, ...router.query,
current: pagination?.current || router.query.current || 1, current: pagination?.current || router.query.current || 1,
pageSize: pagination?.pageSize || router.query.pageSize || 10, pageSize: pagination?.pageSize || router.query.pageSize || 10,
applyTypeCode: 1,
}; };
const res = await props.qualFilingPage(params); const res = await props.qualFilingPage(params);
if (res?.success !== false) { if (res?.success !== false) {
@ -60,7 +61,7 @@ function FilingApplicationListPage(props) {
}; };
const handleCreate = () => { const handleCreate = () => {
props.history.push(`/safetyEval/container/qualApplication/filingForm?mode=application`); props.history.push(`/container/qualApplication/filingForm?mode=application`);
}; };
const handleDelete = (record) => { const handleDelete = (record) => {
@ -71,10 +72,7 @@ function FilingApplicationListPage(props) {
cancelText: "否", cancelText: "否",
onOk: async () => { onOk: async () => {
const res = await props.qualFilingDelete({ id: record.id }); const res = await props.qualFilingDelete({ id: record.id });
if (res?.success === false) {
message.error(res.message || "删除失败");
return;
}
message.success("删除成功"); message.success("删除成功");
getData(); getData();
}, },

View File

@ -17,7 +17,7 @@ const { router } = tools;
function FilingChangeListPage(props) { function FilingChangeListPage(props) {
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [historyRecord, setHistoryRecord] = useState(null); const [historyRecord, setHistoryRecord] = useState(null);
const [startingId, setStartingId] = useState("");
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
const [total, setTotal] = useState(0); const [total, setTotal] = useState(0);
@ -28,7 +28,7 @@ function FilingChangeListPage(props) {
const params = { const params = {
...router.query, ...router.query,
current: pagination?.current || router.query.current || 1, current: pagination?.current || router.query.current || 1,
pageSize: pagination?.pageSize || router.query.pageSize || 10, size: pagination?.size || router.query.size || 10,
}; };
const res = await props.qualFilingChangePage(params); const res = await props.qualFilingChangePage(params);
if (res?.success !== false) { if (res?.success !== false) {
@ -48,23 +48,23 @@ function FilingChangeListPage(props) {
}, []); }, []);
const handleSearch = (values) => { const handleSearch = (values) => {
router.query = { ...router.query, ...values, current: 1, pageSize: 10 }; router.query = { ...router.query, ...values, current: 1, size: 10 };
getData(); getData();
}; };
const handlePageChange = (pagination) => { const handlePageChange = (pagination) => {
router.query = { ...router.query, current: pagination.current, pageSize: pagination.pageSize }; router.query = { ...router.query, current: pagination.current, size: pagination.size };
getData(pagination); getData(pagination);
}; };
const handleStartChange = async (record) => { const handleStartChange = async (record) => {
setStartingId(record.id);
try { try {
props.history.push(`/safetyEval/container/qualApplication/filingForm?mode=change&id=${record.id}`); props.history.push(`/container/qualApplication/filingForm?mode=change&id=${record.id}`);
} finally { } finally {
setStartingId("");
} }
}; };
@ -89,7 +89,7 @@ function FilingChangeListPage(props) {
<Button <Button
type="link" type="link"
size="small" size="small"
loading={startingId === record.id}
onClick={() => handleStartChange(record)} onClick={() => handleStartChange(record)}
> >
修改备案信息 修改备案信息

View File

@ -28,7 +28,7 @@ export default function EquipmentStep({
size="small" size="small"
rowKey="id" rowKey="id"
pagination={false} pagination={false}
dataSource={equipmentList} dataSource={equipmentList || []}
columns={[ columns={[
{ title: "序号", width: 60, render: (_, __, index) => index + 1 }, { title: "序号", width: 60, render: (_, __, index) => index + 1 },
{ title: "装备名称", dataIndex: "deviceName" }, { title: "装备名称", dataIndex: "deviceName" },

View File

@ -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 } 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";
@ -78,7 +78,14 @@ function FilingFormPage(props) {
useEffect(() => { useEffect(() => {
loadPersonnelOptions(); loadPersonnelOptions();
if (query.id) { if (query.id) {
fetchQualFilingDetail(query.id).then((res) => { let aciotn = () => {};
if (mode === FILING_FORM_MODE.CHANGE) {
aciotn = fetchQualChangeDetail;
} else {
aciotn = fetchQualFilingDetail;
}
aciotn(query.id).then((res) => {
setDetail((prev) => ({ ...prev, ...(res?.data || {}) })); setDetail((prev) => ({ ...prev, ...(res?.data || {}) }));
console.log(res?.data, "res.data"); console.log(res?.data, "res.data");
basicForm.setFieldsValue(res?.data || {}); basicForm.setFieldsValue(res?.data || {});
@ -137,47 +144,46 @@ function FilingFormPage(props) {
const currentDetail = collectCurrentDetail(); const currentDetail = collectCurrentDetail();
const body = { const body = {
qualFilingAddCmd: { [`qualFiling${mode === "change" ? "Change" : ""}AddCmd`]: {
...currentDetail, ...currentDetail,
filingStatusCode: config.isSaveDraft ? 5 : 2, filingStatusCode: config.isSaveDraft ? 5 : 2,
applyTypeCode: mode === "application" ? 1 : 2, applyTypeCode: mode === "application" ? 1 : 2,
}, },
}; };
const params = body.qualFilingAddCmd; const params = body[`qualFiling${mode === "change" ? "Change" : ""}AddCmd`];
if (params.materials) { if (params.materials) {
body.qualFilingMaterialAddCmds = params.materials; body[`qualFilingMaterial${mode === "change" ? "Change" : ""}AddCmds`] = params.materials;
delete params.materials; delete params.materials;
} }
if (params.personnelList) { if (params.personnelList) {
body.qualFilingPersonnelAddCmds = params.personnelList; body[`qualFilingPersonnel${mode === "change" ? "Change" : ""}AddCmds`] = params.personnelList;
delete params.personnelList; delete params.personnelList;
} }
if (params.equipmentList) { if (params.equipmentList) {
body.qualFilingEquipmentAddCmds = params.equipmentList; body[`qualFilingEquipment${mode === "change" ? "Change" : ""}AddCmds`] = params.equipmentList;
delete params.equipmentList; delete params.equipmentList;
} }
if (params.commitment) { if (params.commitment) {
body.qualFilingCommitmentAddCmd = params.commitment; body[`qualFilingCommitment${mode === "change" ? "Change" : ""}AddCmd`] = params.commitment;
delete params.commitment; delete params.commitment;
} }
if (router.query.id) {
body.qualFilingAddCmd.id = router.query.id;
}
const result = await props.submitQualFiling(body); let action=props.submitQualFiling;
if (mode === FILING_FORM_MODE.CHANGE) {
action=props.submitQualFilingChange;
}
const result = await action(body);
if (result?.success) { if (result?.success) {
setVerifyOpen(false); setVerifyOpen(false);
message.success(config.isSaveDraft ? "暂存成功" : "提交成功"); message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
props.history.push("filingApplication/list"); props.history.push("filingApplication/list");
} else {
message.error(result?.message || (config.isSaveDraft ? "暂存失败" : "提交失败"));
} }
setSubmitting(false); setSubmitting(false);
}; };
const handleMaterialUpload = (record, {url, ext}) => { const handleMaterialUpload = (record, { url, ext }) => {
const attachmentUrl = url ; const attachmentUrl = url;
setDetail((prev) => ({ setDetail((prev) => ({
...prev, ...prev,
materials: (prev.materials || []).map((item) => { materials: (prev.materials || []).map((item) => {
@ -195,9 +201,6 @@ function FilingFormPage(props) {
message.success(`材料已选择,${saveActionHint}`); message.success(`材料已选择,${saveActionHint}`);
}; };
const handlePersonnelAdd = (sourcePersonnelIds, rows = []) => { const handlePersonnelAdd = (sourcePersonnelIds, rows = []) => {
const existing = new Set( const existing = new Set(
(detailRef.current?.personnelList || []).map((item) => (detailRef.current?.personnelList || []).map((item) =>
@ -310,7 +313,13 @@ function FilingFormPage(props) {
{ {
key: "commitment", key: "commitment",
label: "3. 法定代表人承诺书", label: "3. 法定代表人承诺书",
children: <CommitmentStep form={commitmentForm} disabled={readOnly} personnelOptions={personnelOptions} />, children: (
<CommitmentStep
form={commitmentForm}
disabled={readOnly}
personnelOptions={personnelOptions}
/>
),
forceRender: true, forceRender: true,
}, },
{ {
@ -380,15 +389,6 @@ function FilingFormPage(props) {
}} }}
/> />
<div
style={{
display: "flex",
justifyContent: "space-between",
marginTop: 24,
paddingTop: 16,
borderTop: "1px solid #f0f0f0",
}}
>
<Space> <Space>
{stepIndex > 0 && ( {stepIndex > 0 && (
@ -425,7 +425,7 @@ function FilingFormPage(props) {
</> </>
)} )}
</Space> </Space>
</div>
</Spin> </Spin>
<PrerequisiteVerifyModal <PrerequisiteVerifyModal
open={verifyOpen} open={verifyOpen}

View File

@ -1,14 +1,26 @@
import React from "react"; import React, { useEffect, useState } from "react";
import { NS_ORG_INFO } from "~/enumerate/namespace";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Skeleton } from "antd";
/** 资质申请管理模块入口:需先有机构信息 */ /** 资质申请管理模块入口:需先有机构信息 */
function QualApplication(props) { function QualApplication(props) {
const [orgInfoId, setOrgInfoId] = useState(
sessionStorage.getItem("orgInfoId"),
);
useEffect(() => {
if (!orgInfoId) {
props.orgInfoGet().then((res) => {
setOrgInfoId(res?.data?.id);
});
}
}, []);
return ( return (
<div style={{ height: "100%" }}> <div style={{ height: "100%" }}>
{props.children} {orgInfoId ? props.children : <Skeleton></Skeleton>}
</div> </div>
); );
} }
export default QualApplication; export default Connect([NS_ORG_INFO], true)(QualApplication);