From 52e9b9219975ff2808f5c8ce3b8b3c176a1e8ef4 Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Thu, 15 Aug 2024 12:00:04 +0800
Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master

---
 gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx |   73 ++++++++++++++++++++----------------
 1 files changed, 41 insertions(+), 32 deletions(-)

diff --git a/gz-customerSystem/src/views/register/visit/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
similarity index 90%
rename from gz-customerSystem/src/views/register/visit/visitorRegister.jsx
rename to gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
index 8a962d9..428a66d 100644
--- a/gz-customerSystem/src/views/register/visit/visitorRegister.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -1,14 +1,16 @@
 import React, { useState, useEffect, useRef } from "react";
-import PersonCard from '../../../components/personCard';
-import * as $$ from '../../../utils/utility';
-import { question1, image } from '../../../assets/images';
 import { Row, Col, Space, Tooltip, Button } from 'antd';
-import { Form, Input, Radio, Select, DatePicker, Cascader } from '@arco-design/web-react';
+import { Form, Input, Radio, Select, DatePicker, Cascader,Modal } from '@arco-design/web-react';
 import "@arco-design/web-react/dist/css/arco.css";
-import TableView from '../../../components/TableView';
-import MyModal from '../../../components/MyModal';
-import MyUpload from '../../../components/MyUpload';
-import '../index.less';
+import MyModal from '../../../../components/MyModal';
+import MyUpload from '../../../../components/MyUpload';
+import PersonCard from '../../../../components/personCard';
+import * as $$ from '../../../../utils/utility';
+import { question1,image } from '../../../../assets/images';
+import "@arco-design/web-react/dist/css/arco.css";
+import TableView from '../../../../components/TableView';
+import '../../index.less';
+import ApplyDialog from "./applyDialog";
 
 const RadioGroup = Radio.Group;// 根据调解案号获取纠纷登记信息
 const FormItem = Form.Item;
@@ -16,14 +18,13 @@
 const InputSearch = Input.Search;
 
 
-
-function getCaseDataApi(submitData) {
-  return $$.ax.request({ url: `caseInfo/getCaseInfo?id=${submitData}`, type: 'get', service: 'mediate' });
-}
+const VisitorRegister = (props) => {
+  const [dialogType, setDialogType] = useState(0);//添加当事人的类型
+  const [addVisabled, setAddVisabled] = useState(false);//添加当事人弹窗控制
 
 
 
-const Organization = () => {
+
   const formRef = useRef();
   const [scanFile, setScanFile] = useState(false);
   const [filesList, setFilesList] = useState([]);
@@ -90,6 +91,11 @@
       remark: [{ label: '精神障碍', color: '#C64FBE' }]
     },
   ];
+  const peopleMap = {
+    0: '申请方',
+    1: '被申请方',
+    2: '代理人'
+  }
 
   const fakeData1 = [
     {
@@ -196,13 +202,12 @@
     },
   ];
 
-
-  function handleCheckParty() {
+  const handleCheckParty = () => {
     console.log('check party');
   }
 
   //获取当前时间
-  function getFormattedDateTime() {
+  const getFormattedDateTime = () => {
     let now = new Date();
     let year = now.getFullYear();
     let month = (now.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的,所以要+1  
@@ -213,19 +218,10 @@
     return `${year}-${month}-${day} ${hours}:${minutes}`;
   }
 
-  //保存信息
-  const handleSubmit = async () => {
-    if (formRef.current) {
-      try {
-        await formRef.current.validate((errors, values) => {
-          console.log(errors, values);
-        });
-        // Message.info('校验通过,提交成功!');
-      } catch (_) {
-        console.log(formRef.current.getFieldsError());
-        // Message.error('校验失败,请检查字段!');
-      }
-    }
+  //添加申请人: 0、被申请人: 1、代理人: 2
+  const handleAdd = (type) => {
+    setDialogType(type)
+    setAddVisabled(true)
   }
 
   function handleChangeFile() {
@@ -239,12 +235,13 @@
           <div className='MediationInfo-subTitle' style={{ marginTop: '-6px' }}></div><h5>当事人信息</h5>
         </Space>
       </Col>
-      <div>
+      <div style={{ margin: '16px 0' }}>
         <PersonCard
           isCheck={true}
           partyType={'applicant'} // 这里设定为申请人
           data={fakeData}
           handleCheckParty={handleCheckParty}
+          handleAdd={handleAdd}
         />
       </div>
       <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
@@ -253,7 +250,7 @@
         </Space>
       </Col>
       <Form
-        ref={formRef}
+        ref={props.formRef}
         layout='vertical'
         requiredSymbol={false}
         initialValues={{
@@ -464,8 +461,20 @@
         <div style={{ marginTop: '24px' }}><Button type="primary" onClick={() => setScaned(true)}>上传完成</Button></div>
       </MyModal>
       
+      <Modal
+        title={'添加' + peopleMap[dialogType]}
+        visible={addVisabled}
+        onOk={() => setAddVisabled(false)}
+        onCancel={() => setAddVisabled(false)}
+        autoFocus={false}
+        focusLock={true}
+        footer={null}
+      // style={{ width: '1000px' }}
+      >
+        <ApplyDialog />
+      </Modal>
     </div>
   )
 }
 
-export default Organization;
\ No newline at end of file
+export default VisitorRegister;
\ No newline at end of file

--
Gitblit v1.8.0