广州市综治平台前端
xusd
15 hours ago d880dfb0f9a79c51834c9f8a7017d8fa59f14f36
src/views/register/visit/component/SelfVisitorRegister.jsx
@@ -20,6 +20,11 @@
const FormItem = Form.Item;
const InputSearch = Input.Search;
// 获取案号接口
function getCaseNoApi() {
   return $$.ax.request({ url: 'caseInfo/getCaseNo', type: 'get', service: 'mediate' });
}
const VisitorRegister = (props) => {
   const isOrganization = $$.getQueryString('isOrganization');
   const [dialogType, setDialogType] = useState(); //添加当事人的类型
@@ -46,6 +51,24 @@
      '24_00006-2': '被申请方代理人',
   };
   // 自动获取案号
   const autoGetCaseNo = async () => {
      try {
         const userInfo = $$.getSessionStorage('customerSystemUser');
         if (userInfo && userInfo.unitType === 104) {
            global.setSpinning(true);
            const res = await getCaseNoApi();
            global.setSpinning(false);
            if (res.type && res.data) {
               props.formRef.current.setFieldValue('caseNo', res.data);
            }
         }
      } catch (error) {
         global.setSpinning(false);
         console.error('获取案号失败:', error);
      }
   };
   useEffect(() => {
      if (props.formRef.current) {
         //引入当事人数据
@@ -68,6 +91,11 @@
   useEffect(() => {
      setFakeData(props.partyList || []);
   }, [props.partyList]);
   // 组件初始化时自动获取案号
   useEffect(() => {
      autoGetCaseNo();
   }, []);
   //获取当前时间
   const getFormattedDateTime = () => {
@@ -332,6 +360,11 @@
                     />
                  </FormItem>
               </Col>
               <Col span={8}>
                  <FormItem label="诉前调解案号" field="caseNo">
                     <Input placeholder="请填写" />
                  </FormItem>
               </Col>
               <Col span={24}>
                  <FormItem
                     label={