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 &&