From 2d3f1895f362891334ff69835c0c97187834aa08 Mon Sep 17 00:00:00 2001
From: tangjie <122778500@qq.com>
Date: Thu, 2 Jul 2026 15:01:19 +0800
Subject: [PATCH] feat
---
src/api/qualReview/index.js | 6 +
src/components/AttachmentUpload/index.js | 2 +
.../FilingForm/components/CommitmentStep.jsx | 1 +
.../FilingForm/components/EquipmentStep.jsx | 62 +++-
.../FilingForm/components/MaterialStep.jsx | 6 +-
.../QualApplication/FilingForm/index.js | 54 +---
.../QualApplication/FilingListTable.jsx | 2 +-
.../QualApplication/filingMaterialTemplate.js | 20 +-
.../QualApplication/filingPersist.js | 4 +-
.../QualReviewForm/index.js | 270 +++++++++++++-----
.../Container/QualificationReview/mockData.js | 2 +-
11 files changed, 286 insertions(+), 143 deletions(-)
diff --git a/src/api/qualReview/index.js b/src/api/qualReview/index.js
index 9f03f97..50a65ca 100644
--- a/src/api/qualReview/index.js
+++ b/src/api/qualReview/index.js
@@ -5,3 +5,9 @@ export const queryReviewList = declareRequest(
"Get > /safety-eval/qual-filing/page",
'qualReviewList: [] | res.data || [] & qualReviewTotal: 0 | res.total || 0'
);
+
+export const queryComplianceCheck = declareRequest(
+ "qualReviewLoading",
+ "Get > /safety-eval/qual-filing/compliance-check > id",
+ 'complianceCheckItems: [] | res.data || []',
+);
\ No newline at end of file
diff --git a/src/components/AttachmentUpload/index.js b/src/components/AttachmentUpload/index.js
index 7b55b3a..8c89fd2 100644
--- a/src/components/AttachmentUpload/index.js
+++ b/src/components/AttachmentUpload/index.js
@@ -29,12 +29,14 @@ export default function AttachmentUpload({ name, label, disabled = false }) {
};
}}
getValueFromEvent={({ fileList }) => {
+ console.log(fileList, 'fileList')
return (
fileList?.map((file) => ({
url: file.response?.data?.url || file.url,
uid: file.uid,
status: "done",
name: file.name,
+ percent: file.percent,
})) || []
);
}}
diff --git a/src/pages/Container/QualApplication/FilingForm/components/CommitmentStep.jsx b/src/pages/Container/QualApplication/FilingForm/components/CommitmentStep.jsx
index 5f7fffa..e08232d 100644
--- a/src/pages/Container/QualApplication/FilingForm/components/CommitmentStep.jsx
+++ b/src/pages/Container/QualApplication/FilingForm/components/CommitmentStep.jsx
@@ -51,6 +51,7 @@ export default function CommitmentStep({
personnelOptions = [],
onSignatureChange,
}) {
+
const legalRepName = Form.useWatch("legalRepName", form);
const filingUnitName = Form.useWatch("filingUnitName", form);
diff --git a/src/pages/Container/QualApplication/FilingForm/components/EquipmentStep.jsx b/src/pages/Container/QualApplication/FilingForm/components/EquipmentStep.jsx
index 01bca70..69296eb 100644
--- a/src/pages/Container/QualApplication/FilingForm/components/EquipmentStep.jsx
+++ b/src/pages/Container/QualApplication/FilingForm/components/EquipmentStep.jsx
@@ -1,6 +1,6 @@
-import { Button, Space, Table } from "antd";
+import { Button, Image, Space, Table, Upload } from "antd";
import { useState } from "react";
-import { resolveUploadFileId } from "~/utils/mockUpload";
+
import OrgEquipmentSelectModal from "./OrgEquipmentSelectModal";
export default function EquipmentStep({
@@ -11,8 +11,11 @@ export default function EquipmentStep({
onUploadCalibration,
}) {
const [selectOpen, setSelectOpen] = useState(false);
+ const [previewImage, setPreviewImage] = useState("");
const existingIds = equipmentList.map((item) => String(item.sourceEquipmentId || ""));
+ const isImage = (url) => /\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(url || "");
+
return (
<>
@@ -33,17 +36,42 @@ export default function EquipmentStep({
{ title: "生产厂家", dataIndex: "manufacturer" },
{
title: "计量检定情况",
- width: 120,
+ width: 180,
render: (_, record) => (
- !disabled ? (
-
- ) : (record.calibrationReportUrl ? "已上传" : "-")
+
+ {record.calibrationReportUrl ? (
+
+ ) : (
+ !disabled && (
+ {
+ if (info.file.status === "done") {
+ const data = info.file.response?.data;
+ if (data) {
+ onUploadCalibration?.(record, data);
+ }
+ }
+ }}
+ >
+
+
+ )
+ )}
+
),
},
{
@@ -66,6 +94,16 @@ export default function EquipmentStep({
setSelectOpen(false);
}}
/>
+
{
+ if (!visible) setPreviewImage("");
+ },
+ }}
+ />
>
);
}
diff --git a/src/pages/Container/QualApplication/FilingForm/components/MaterialStep.jsx b/src/pages/Container/QualApplication/FilingForm/components/MaterialStep.jsx
index 538e426..1dc5ff3 100644
--- a/src/pages/Container/QualApplication/FilingForm/components/MaterialStep.jsx
+++ b/src/pages/Container/QualApplication/FilingForm/components/MaterialStep.jsx
@@ -64,9 +64,9 @@ export default function MaterialStep({
action={`${window.process.env.app.API_HOST}/safety-eval/file/upload`}
onChange={(info) => {
if (info.file.status === "done") {
- const url = info.file.response?.data?.url;
- if (url) {
- onUpload?.(record, url);
+ const data = info.file.response?.data;
+ if (data) {
+ onUpload?.(record, data);
}
}
}}
diff --git a/src/pages/Container/QualApplication/FilingForm/index.js b/src/pages/Container/QualApplication/FilingForm/index.js
index 4471a94..21d9c43 100644
--- a/src/pages/Container/QualApplication/FilingForm/index.js
+++ b/src/pages/Container/QualApplication/FilingForm/index.js
@@ -55,7 +55,7 @@ function FilingFormPage(props) {
: mode === FILING_FORM_MODE.CHANGE
? "change"
: "application";
- const goBackList = useCallback(() => goFilingList(listMode), [listMode]);
+
const saveActionHint =
mode === FILING_FORM_MODE.FILED
? "请点击提交后保存"
@@ -66,6 +66,7 @@ function FilingFormPage(props) {
return personnelOptions;
}
const options = await fetchOrgPersonnelOptions().catch(() => []);
+
setPersonnelOptions(options);
return options;
}, [personnelOptions.length]);
@@ -167,23 +168,24 @@ function FilingFormPage(props) {
if (result?.success) {
setVerifyOpen(false);
- message.success(isSaveDraft ? "暂存成功" : "提交成功");
+ message.success(config.isSaveDraft ? "暂存成功" : "提交成功");
props.history.push("filingApplication/list");
} else {
- message.error(result?.message || (isSaveDraft ? "暂存失败" : "提交失败"));
+ message.error(result?.message || (config.isSaveDraft ? "暂存失败" : "提交失败"));
}
setSubmitting(false);
};
- const handleMaterialUpload = (record, url) => {
- const attachmentUrl = url || resolveUploadFileId([]);
+ const handleMaterialUpload = (record, {url, ext}) => {
+ const attachmentUrl = url ;
setDetail((prev) => ({
...prev,
materials: (prev.materials || []).map((item) => {
- return item.materialType === record.materialType
+ return item.id === record.id
? {
...item,
attachmentUrl,
+ materialFormat: ext,
uploadStatusCode: 2,
uploadStatusName: "已上传",
}
@@ -193,20 +195,8 @@ function FilingFormPage(props) {
message.success(`材料已选择,${saveActionHint}`);
};
- const handleSignatureChange = (url, files) => {
- commitmentForm.setFieldsValue({
- signatureFiles: files,
- legalRepSignatureUrl: url,
- });
- setDetail((prev) => ({
- ...prev,
- commitment: {
- ...prev.commitment,
- legalRepSignatureUrl: url,
- signatureFiles: files,
- },
- }));
- };
+
+
const handlePersonnelAdd = (sourcePersonnelIds, rows = []) => {
const existing = new Set(
@@ -290,8 +280,8 @@ function FilingFormPage(props) {
});
};
- const handleEquipmentCalibration = (record, url) => {
- updateDetail((prev) => ({
+ const handleEquipmentCalibration = (record, { url }) => {
+ setDetail((prev) => ({
...prev,
equipmentList: (prev.equipmentList || []).map((item) =>
item.id === record.id ? { ...item, calibrationReportUrl: url } : item,
@@ -320,7 +310,7 @@ function FilingFormPage(props) {
{
key: "commitment",
label: "3. 法定代表人承诺书",
- children: ,
+ children: ,
forceRender: true,
},
{
@@ -344,7 +334,7 @@ function FilingFormPage(props) {
disabled={readOnly}
onAdd={handleEquipmentAdd}
onRemove={handleEquipmentRemove}
- onCalibration={handleEquipmentCalibration}
+ onUploadCalibration={handleEquipmentCalibration}
/>
),
},
@@ -399,21 +389,7 @@ function FilingFormPage(props) {
borderTop: "1px solid #f0f0f0",
}}
>
-
-
-
+
{stepIndex > 0 && (
}
history={props.history}
previous
- footer={}
+ footer={
+
+ }
>
-
-
-
法律规定内容
-
- {LEGAL_CHECK_ITEMS.map((item) => {
- const style = LEGAL_STATUS_STYLE[item.status];
- return (
-
-
{style.icon}
-
-
{item.title}
-
{item.desc}
+
+
+
+
法律规定内容
+
+ {complianceCheckItems.map((item) => {
+ const style = LEGAL_STATUS_STYLE[item.status];
+ return (
+
+
{style.icon}
+
+
{item.title}
+
{item.description}
+
+
+ );
+ })}
+
+
+
+
+ setCompliance((prev) => ({ ...prev, [id]: v }))
+ }
+ />
+
+ setReviewVisible(false)}
+ width={580}
+ footer={
+
+
+
+
+
+ }
+ >
+
+
+ 评价分析
+
+
+
+
已核验材料
+
+ {legalPassCount + legalFailCount}
- );
- })}
-
+
+
符合
+
+ {legalPassCount}
+
+
+
+
不符合
+
+ {legalFailCount}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
setCompliance((prev) => ({ ...prev, [id]: v }))}
- />
-
- setReviewVisible(false)}
- width={580}
- footer={
-
-
-
-
-
- }
- >
-
-
评价分析
-
-
已核验材料
{legalPassCount+legalFailCount}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
);
};
-const statStyle = { background: "#fff", border: "1px solid #d9d9d9", borderRadius: 6, padding: "0.4rem", textAlign: "center" };
+const statStyle = {
+ background: "#fff",
+ border: "1px solid #d9d9d9",
+ borderRadius: 6,
+ padding: "0.4rem",
+ textAlign: "center",
+};
const statLabelStyle = { fontSize: "0.7rem", color: "rgba(0,0,0,0.45)" };
-export default QualReviewForm;
+export default Connect(
+ [NS_QUAL_REVIEW],
+ true,
+)(QualReviewForm);
diff --git a/src/pages/Container/QualificationReview/mockData.js b/src/pages/Container/QualificationReview/mockData.js
index 7da604f..6fcc4af 100644
--- a/src/pages/Container/QualificationReview/mockData.js
+++ b/src/pages/Container/QualificationReview/mockData.js
@@ -114,5 +114,5 @@ export const LEGAL_CHECK_ITEMS = [
export const LEGAL_STATUS_STYLE = {
pass: { icon: "✅", borderColor: "#059669", bg: "#f0fdf4" },
warn: { icon: "⚠️", borderColor: "#d97706", bg: "#fffbeb" },
- fail: { icon: "❌", borderColor: "#dc2626", bg: "#fef2f2" },
+ NOT_PASS: { icon: "❌", borderColor: "#dc2626", bg: "#fef2f2" },
};