feat
parent
bb66034d4d
commit
540b779cef
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
javaGitBranch: "<branch-name>",
|
||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 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: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
|
|||
|
|
@ -5,13 +5,16 @@
|
|||
<!--NED-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
|
||||
<head data-built-info="<%= $builtInfo %>">
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<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) { %>
|
||||
<link type="text/css" rel="stylesheet" href="<%= item %>"></link>
|
||||
<link type="text/css" rel="stylesheet" href="<%= item %>">
|
||||
</link>
|
||||
<% } %>
|
||||
<title>--</title>
|
||||
<script>
|
||||
|
|
@ -85,12 +88,35 @@
|
|||
}
|
||||
});
|
||||
})();
|
||||
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>
|
||||
<!-- SCRIPTS -->
|
||||
<% for (const item of $scripts) { %>
|
||||
<script src="<%= item %>" type="text/javascript"></script>
|
||||
<% } %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- NOSCRIPT -->
|
||||
<noscript>此网页需要开启JavaScript功能。</noscript>
|
||||
|
|
@ -98,4 +124,5 @@
|
|||
<% const { root }=$element; %>
|
||||
<div id="<%= root.id %>" style="width: 100%; height: 100%; position: relative;overflow-y: auto"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -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 = {}) {
|
||||
const territoryName = values.filingTerritoryName || values.filingTerritoryCode;
|
||||
|
|
@ -100,7 +68,7 @@ export function fromFilingBasicForm(values = {}) {
|
|||
|
||||
export function toFilingDetail(data = {}) {
|
||||
return {
|
||||
...toFilingBasicForm(data),
|
||||
...data,
|
||||
materials: (data.materials || []),
|
||||
commitment: data.commitment ? toFilingCommitmentForm(data.commitment, data.filingUnitName) : null,
|
||||
personnelList: (data.personnelList || []).map(toFilingPersonnelRow),
|
||||
|
|
@ -222,6 +190,11 @@ export async function fetchQualFilingDetail(id) {
|
|||
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) {
|
||||
const res = await apiGet("/safetyEval/qual-filing-change/history", {
|
||||
originFilingId: asId(originFilingId),
|
||||
|
|
@ -230,7 +203,7 @@ export async function fetchQualFilingChangeHistory(originFilingId) {
|
|||
}
|
||||
|
||||
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);
|
||||
return fromPageResponse(res, toFilingListRow);
|
||||
}));
|
||||
|
|
@ -340,4 +313,8 @@ export const submitQualFiling = declareRequest(
|
|||
"Post > @/safetyEval/qual-filing/aggregationSaveOrEdit",
|
||||
);
|
||||
|
||||
export const submitQualFilingChange = declareRequest(
|
||||
"qualFilingSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing-change/aggregationSaveOrEdit",
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@ function FiledManageListPage(props) {
|
|||
const params = {
|
||||
...router.query,
|
||||
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) {
|
||||
setDataSource(res?.data || []);
|
||||
setTotal(res?.totalCount || 0);
|
||||
|
|
@ -43,12 +44,12 @@ function FiledManageListPage(props) {
|
|||
}, []);
|
||||
|
||||
const handleSearch = (values) => {
|
||||
router.query = { ...router.query, ...values, current: 1, pageSize: 10 };
|
||||
router.query = { ...router.query, ...values, current: 1, size: 10 };
|
||||
getData();
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ function FilingApplicationListPage(props) {
|
|||
...router.query,
|
||||
current: pagination?.current || router.query.current || 1,
|
||||
pageSize: pagination?.pageSize || router.query.pageSize || 10,
|
||||
applyTypeCode: 1,
|
||||
};
|
||||
const res = await props.qualFilingPage(params);
|
||||
if (res?.success !== false) {
|
||||
|
|
@ -60,7 +61,7 @@ function FilingApplicationListPage(props) {
|
|||
};
|
||||
|
||||
const handleCreate = () => {
|
||||
props.history.push(`/safetyEval/container/qualApplication/filingForm?mode=application`);
|
||||
props.history.push(`/container/qualApplication/filingForm?mode=application`);
|
||||
};
|
||||
|
||||
const handleDelete = (record) => {
|
||||
|
|
@ -71,10 +72,7 @@ function FilingApplicationListPage(props) {
|
|||
cancelText: "否",
|
||||
onOk: async () => {
|
||||
const res = await props.qualFilingDelete({ id: record.id });
|
||||
if (res?.success === false) {
|
||||
message.error(res.message || "删除失败");
|
||||
return;
|
||||
}
|
||||
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const { router } = tools;
|
|||
function FilingChangeListPage(props) {
|
||||
const [searchForm] = Form.useForm();
|
||||
const [historyRecord, setHistoryRecord] = useState(null);
|
||||
const [startingId, setStartingId] = useState("");
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [dataSource, setDataSource] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
|
|
@ -28,7 +28,7 @@ function FilingChangeListPage(props) {
|
|||
const params = {
|
||||
...router.query,
|
||||
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);
|
||||
if (res?.success !== false) {
|
||||
|
|
@ -48,23 +48,23 @@ function FilingChangeListPage(props) {
|
|||
}, []);
|
||||
|
||||
const handleSearch = (values) => {
|
||||
router.query = { ...router.query, ...values, current: 1, pageSize: 10 };
|
||||
router.query = { ...router.query, ...values, current: 1, size: 10 };
|
||||
getData();
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
const handleStartChange = async (record) => {
|
||||
setStartingId(record.id);
|
||||
|
||||
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 {
|
||||
setStartingId("");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ function FilingChangeListPage(props) {
|
|||
<Button
|
||||
type="link"
|
||||
size="small"
|
||||
loading={startingId === record.id}
|
||||
|
||||
onClick={() => handleStartChange(record)}
|
||||
>
|
||||
修改备案信息
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default function EquipmentStep({
|
|||
size="small"
|
||||
rowKey="id"
|
||||
pagination={false}
|
||||
dataSource={equipmentList}
|
||||
dataSource={equipmentList || []}
|
||||
columns={[
|
||||
{ title: "序号", width: 60, render: (_, __, index) => index + 1 },
|
||||
{ title: "装备名称", dataIndex: "deviceName" },
|
||||
|
|
|
|||
|
|
@ -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 } 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";
|
||||
|
|
@ -78,7 +78,14 @@ function FilingFormPage(props) {
|
|||
useEffect(() => {
|
||||
loadPersonnelOptions();
|
||||
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 || {}) }));
|
||||
console.log(res?.data, "res.data");
|
||||
basicForm.setFieldsValue(res?.data || {});
|
||||
|
|
@ -137,41 +144,40 @@ function FilingFormPage(props) {
|
|||
|
||||
const currentDetail = collectCurrentDetail();
|
||||
const body = {
|
||||
qualFilingAddCmd: {
|
||||
[`qualFiling${mode === "change" ? "Change" : ""}AddCmd`]: {
|
||||
...currentDetail,
|
||||
filingStatusCode: config.isSaveDraft ? 5 : 2,
|
||||
applyTypeCode: mode === "application" ? 1 : 2,
|
||||
},
|
||||
};
|
||||
const params = body.qualFilingAddCmd;
|
||||
const params = body[`qualFiling${mode === "change" ? "Change" : ""}AddCmd`];
|
||||
if (params.materials) {
|
||||
body.qualFilingMaterialAddCmds = params.materials;
|
||||
body[`qualFilingMaterial${mode === "change" ? "Change" : ""}AddCmds`] = params.materials;
|
||||
delete params.materials;
|
||||
}
|
||||
if (params.personnelList) {
|
||||
body.qualFilingPersonnelAddCmds = params.personnelList;
|
||||
body[`qualFilingPersonnel${mode === "change" ? "Change" : ""}AddCmds`] = params.personnelList;
|
||||
delete params.personnelList;
|
||||
}
|
||||
if (params.equipmentList) {
|
||||
body.qualFilingEquipmentAddCmds = params.equipmentList;
|
||||
body[`qualFilingEquipment${mode === "change" ? "Change" : ""}AddCmds`] = params.equipmentList;
|
||||
delete params.equipmentList;
|
||||
}
|
||||
if (params.commitment) {
|
||||
body.qualFilingCommitmentAddCmd = params.commitment;
|
||||
body[`qualFilingCommitment${mode === "change" ? "Change" : ""}AddCmd`] = 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) {
|
||||
setVerifyOpen(false);
|
||||
message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
|
||||
props.history.push("filingApplication/list");
|
||||
} else {
|
||||
message.error(result?.message || (config.isSaveDraft ? "暂存失败" : "提交失败"));
|
||||
}
|
||||
setSubmitting(false);
|
||||
};
|
||||
|
|
@ -195,9 +201,6 @@ function FilingFormPage(props) {
|
|||
message.success(`材料已选择,${saveActionHint}`);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
const handlePersonnelAdd = (sourcePersonnelIds, rows = []) => {
|
||||
const existing = new Set(
|
||||
(detailRef.current?.personnelList || []).map((item) =>
|
||||
|
|
@ -310,7 +313,13 @@ function FilingFormPage(props) {
|
|||
{
|
||||
key: "commitment",
|
||||
label: "3. 法定代表人承诺书",
|
||||
children: <CommitmentStep form={commitmentForm} disabled={readOnly} personnelOptions={personnelOptions} />,
|
||||
children: (
|
||||
<CommitmentStep
|
||||
form={commitmentForm}
|
||||
disabled={readOnly}
|
||||
personnelOptions={personnelOptions}
|
||||
/>
|
||||
),
|
||||
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>
|
||||
{stepIndex > 0 && (
|
||||
|
|
@ -425,7 +425,7 @@ function FilingFormPage(props) {
|
|||
</>
|
||||
)}
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
</Spin>
|
||||
<PrerequisiteVerifyModal
|
||||
open={verifyOpen}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
const [orgInfoId, setOrgInfoId] = useState(
|
||||
sessionStorage.getItem("orgInfoId"),
|
||||
);
|
||||
useEffect(() => {
|
||||
if (!orgInfoId) {
|
||||
props.orgInfoGet().then((res) => {
|
||||
setOrgInfoId(res?.data?.id);
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div style={{ height: "100%" }}>
|
||||
{props.children}
|
||||
{orgInfoId ? props.children : <Skeleton></Skeleton>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default QualApplication;
|
||||
export default Connect([NS_ORG_INFO], true)(QualApplication);
|
||||
|
|
|
|||
Loading…
Reference in New Issue