diff --git a/src/pages/Container/BranchCompany/Inspection/Defense/Edit/index.js b/src/pages/Container/BranchCompany/Inspection/Defense/Edit/index.js
new file mode 100644
index 0000000..e5dcbea
--- /dev/null
+++ b/src/pages/Container/BranchCompany/Inspection/Defense/Edit/index.js
@@ -0,0 +1,7 @@
+import Add from "~/pages/Container/BranchCompany/Inspection/Inspection/Add";
+
+function Edit(props) {
+ return ();
+}
+
+export default Edit;
diff --git a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
index 15651e3..237be35 100644
--- a/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
+++ b/src/pages/Container/BranchCompany/Inspection/Defense/List/index.js
@@ -23,6 +23,7 @@ function List(props) {
const [defenseHandlingModalOpen, setDefenseHandlingModalOpen] = useState(false);
const [defenseRecordModalOpen, setDefenseRecordModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
+ const [currentInspectionId, setCurrentInspectionId] = useState("");
const [form] = Form.useForm();
const { tableProps, getData } = useTable(props["inspectionList"], {
form,
@@ -86,6 +87,7 @@ function List(props) {
onClick={() => {
setDefenseHandlingModalOpen(true);
setCurrentId(record.id);
+ setCurrentInspectionId(record.inspectionId);
}}
>
申辩处理
@@ -109,6 +111,8 @@ function List(props) {
{defenseHandlingModalOpen && (
{
setDefenseHandlingModalOpen(false);
setCurrentId("");
@@ -134,6 +138,10 @@ function DefenseHandlingModalComponent(props) {
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
const onSubmit = async (values) => {
+ if (values.status === "1") {
+ props.history.push(`./edit?id=${props.id}&inspectionId=${props.inspectionId}`);
+ return;
+ }
let signature = "";
if (values.signature) {
const { filePath } = await uploadFile({
@@ -164,8 +172,11 @@ function DefenseHandlingModalComponent(props) {
loading={uploadFileLoading || props.inspection.defenseLoading}
form={form}
span={24}
- labelCol={{ span: 10 }}
+ labelCol={{ span: 12 }}
showActionButtons={false}
+ values={{
+ status: "2",
+ }}
onFinish={onSubmit}
options={[
{
@@ -247,6 +258,8 @@ function DefenseRecordModalComponent(props) {
>
) },
{ title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && ) },
- { title: "申辩附件名称", dataIndex: "name", width: 200,render: (_, record) => record.files?.[0]?.fileName || "无" },
+ { title: "申辩附件名称", dataIndex: "name", width: 200, render: (_, record) => record.files?.[0]?.fileName || "无" },
{ title: "申辩附件", dataIndex: "url", render: (_, record) => (
record.files?.[0]?.filePath && (