From f97808963c1ecd3036e9e537c2c840c5df9f4604 Mon Sep 17 00:00:00 2001
From: LiuJiaNan <15703339975@163.com>
Date: Mon, 19 Jan 2026 13:42:28 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=BE=A9=E5=A4=84=E7=90=86=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E7=BC=BA=E5=B0=91=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +-
.../Inspection/Defense/List/index.js | 49 ++++++++++++++++---
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/package.json b/package.json
index 90314da..d584509 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-to-print": "^3.2.0",
- "zy-react-library": "^1.1.23"
+ "zy-react-library": "^1.1.30"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",
diff --git a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
index 10f716d..361666b 100644
--- a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
+++ b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
@@ -16,9 +16,9 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
import useTable from "zy-react-library/hooks/useTable";
import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { getFileUrl } from "zy-react-library/utils";
-import { formatDate } from "~/utils/dateFormat";
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
import { NS_INSPECTION } from "~/enumerate/namespace";
+import { formatDate } from "~/utils/dateFormat";
function List(props) {
const [defenseHandlingModalOpen, setDefenseHandlingModalOpen] = useState(false);
@@ -29,8 +29,8 @@ function List(props) {
const { tableProps, getData } = useTable(props["inspectionList"], {
form,
transform: formData => ({
- checkStartTime: formData.checkTime?.[0] ? (formData.checkTime[0] + " 00:00:00") : "",
- checkEndTime: formData.checkTime?.[1] ? (formData.checkTime[1] + " 23:59:59") : "",
+ checkStartTime: formData.checkTime?.[0] ? (`${formData.checkTime[0]} 00:00:00`) : "",
+ checkEndTime: formData.checkTime?.[1] ? (`${formData.checkTime[1]} 23:59:59`) : "",
}),
params: { status: "700" },
});
@@ -135,9 +135,24 @@ function List(props) {
}
function DefenseHandlingModalComponent(props) {
+ const [signature, setSignature] = useState("");
+
const [form] = Form.useForm();
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
+ const getData = async () => {
+ const { data } = await props["defenseRecordList"]({ id: props.inspectionId, pageIndex: 1, pageSize: 999 });
+ setSignature(data.at(-1).signature);
+ form.setFieldsValue({
+ createTime: data.at(-1).createTime,
+ content: data.at(-1).content,
+ });
+ };
+
+ useEffect(() => {
+ getData();
+ }, []);
+
const onSubmit = async (values) => {
if (values.status === "1") {
props.history.push(`./edit?id=${props.id}&inspectionId=${props.inspectionId}`);
@@ -180,6 +195,22 @@ function DefenseHandlingModalComponent(props) {
}}
onFinish={onSubmit}
options={[
+ {
+ name: "defendantSignature",
+ label: "申辩人",
+ render: (signature &&