广州市综治平台前端
xusd
16 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={
@@ -400,6 +433,34 @@
                     />
                  </FormItem>
               </Col>
               <Col span={24}>
                  <FormItem
                     label={
                        <div style={{ display: 'flex' }}>
                           备注
                           <img src={scan} alt="" style={{ marginRight: '-2px', marginLeft: '8px' }} />
                           <div
                              style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }}
                              onClick={() => {
                                 setScanFile(true);
                                 setOcrText('caseRemark');
                              }}
                           >
                              识别材料
                           </div>
                        </div>
                     }
                     field="caseRemark"
                  >
                     <Input.TextArea
                        maxLength={500}
                        showWordLimit
                        rows={7}
                        placeholder="请填写备注"
                        wrapperStyle={{ width: '100%' }}
                     />
                  </FormItem>
               </Col>
               <div style={{ padding: '0px 16px', borderRadius: '2px', display: 'flex', alignItems: 'center' }}>
                  <img src={majorStatus_1} alt="" srcset="" />
                  <FormItem