forked from gzzfw/frontEnd/gzDyh

zhangyongtian
2024-09-15 126d818da70a1711223d22217a3d7a88a8570988
fix: 结案申请bug修改
4 files modified
113 ■■■■■ changed files
gz-customerSystem/src/components/ArcoUpload/index.jsx 2 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx 30 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/handleFeedback/component/AuditView.jsx 3 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx 78 ●●●●● patch | view | raw | blame | history
gz-customerSystem/src/components/ArcoUpload/index.jsx
@@ -24,6 +24,7 @@
 * editData *, // 编辑回显数据
 * handleDelFile *,//删除文件接口
 * ownerType,//用于回显文件
 * formItemParams, formItem的参数
 */
export default function ArcoUpload(props) {
@@ -62,6 +63,7 @@
        label={props.label}
        field={props.field}
        triggerPropName='fileList'
        {...props.formItemParams}
      >
        <Upload
          drag
gz-customerSystem/src/views/register/eventFlow/component/EscalationModel.jsx
@@ -58,21 +58,19 @@
  }
  const handleSubmit = () => {
    formRef.current.validate(undefined, (errors, values) => {
      if (formRef.current) {
        formRef.current.validate(undefined, (errors, values) => {
          if (!errors) {
            handleEscala({
              id,
              caseId: props.caseId,
              caseTaskId: props.caseTaskId,
              returnContent: values.returnContent,
              ...unitData
            })
          }
        })
      }
    })
    if (formRef.current) {
      formRef.current.validate(undefined, (errors, values) => {
        if (!errors) {
          handleEscala({
            id,
            caseId: props.caseId,
            caseTaskId: props.caseTaskId,
            appearContent: values.appearContent,
            ...unitData
          })
        }
      })
    }
  }
  const handleTemplate = (type) => {
@@ -130,7 +128,7 @@
              </div>
              <FormItem
                label={(<div style={{ display: 'flex' }}>上报意见<div className="must">必填</div></div>)}
                field='returnContent'
                field='appearContent'
                rules={[{ required: true, message: '请选择回退理由' }]}
              >
                <TextArea
gz-customerSystem/src/views/register/handleFeedback/component/AuditView.jsx
@@ -7,6 +7,7 @@
import * as $$ from '@/utils/utility';
import { Scrollbars } from "react-custom-scrollbars";
import { getOffset, getSize } from '@/utils/utility';
import { useNavigate } from 'react-router-dom';
const FormItem = Form.Item;
const appUrl = $$.appUrl;
@@ -26,6 +27,7 @@
}
const AuditView = (props) => {
  const navigate = useNavigate();
  const formRef = useRef();
  const scrollRef = useRef(null);
  const [id, setId] = useState();
@@ -89,6 +91,7 @@
    const res = await submit(data)
    if (res.type) {
      $$.infoSuccess({ content: '提交成功!' });
      navigate('/mediate/visit/visitWorkBench')
    }
  }
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx
@@ -108,31 +108,53 @@
  const handleSubmit = () => {
    //口头协议
    if (value === 1) {
      const data = formRef?.current.getFields()
      windupApply(data)
      formRef?.current.validate(undefined, (errors, values) => {
        if (!errors) {
          const data = formRef?.current.getFields()
          windupApply({
            agreeType: '24_00003-1',
            agreeTypeName: '口头协议',
            ...data
          })
        }
      })
    }
    //书面协议
    if (value === 2) {
      const data = formRefWrite?.current.getFields()
      windupApply(data)
      formRefWrite?.current.validate(undefined, (errors, values) => {
        if (!errors) {
          const { file, ...rest } = formRefWrite?.current.getFields()
          windupApply({
            agreeType: '24_00003-2',
            agreeTypeName: '书面协议',
            ...rest
          })
        }
      })
    }
  }
  //化解不成功的提交处理
  const handleSubmit1 = () => {
    if (selectedTab === '2') {
      const data = failRef?.current.getFields()
      windupApply(data)
    }
    failRef?.current.validate(undefined, (errors, values) => {
      if (!errors) {
        const { failReason1, failReason2, failReason3, ...rest } = failRef?.current.getFields()
        const failReason = `1、${failReason1};2、${failReason2};3、${failReason3}。`
        windupApply({
          failReason: failReason,
          ...rest
        })
      }
    })
  }
  //结案申请请求
  const windupApply = async (submitData) => {
    console.log(submitData);
    const res = await windupApplyApi({
      mediResultName: selectedTab === '1' ? '化解成功' : '化解不成功',
      mediResult: selectedTab === '1' ? '22_00025-1' : '22_00025-2',
      agreeType: value === 1 ? '24_00003-1' : '24_00003-2',
      agreeTypeName: value === 1 ? '口头协议' : '书面协议',
      caseTaskId: caseTaskId,
      caseId: caseId,
      caseResultId: caseResultId,
@@ -217,7 +239,7 @@
                              <div className="must">必填</div>
                            </div>
                            <div className='caseResult-tips'>
                              <img src={tip} alt='' style={{ width: '16px', marginRight: '8px',marginTop: '-5px' }} />
                              <img src={tip} alt='' style={{ width: '16px', marginRight: '8px', marginTop: '-5px' }} />
                              <span>协议要点应尽量简洁,当事人大厅来访或小程序线上反映问题时,可在小程序中查看到填写的协议要点内容</span>
                            </div>
                            <div style={{ position: 'absolute', display: 'flex ', top: '79px', zIndex: 1 }}>
@@ -232,6 +254,7 @@
                          </>
                        )}
                        field='agreeContent'
                        rules={[{ message: '请填写协议要点', required: true }]}
                      >
                        <TextArea
                          autoSize={{ minRows: 4, maxRows: 8 }}
@@ -259,6 +282,7 @@
                      <FormItem
                        label={(<div style={{ display: 'flex' }}>结案意见<div className="must">必填</div></div>)}
                        field='windupContent'
                        rules={[{ message: '请填写结案意见', required: true }]}
                      >
                        <TextArea
                          autoSize={{ minRows: 4, maxRows: 8 }}
@@ -282,7 +306,14 @@
                >
                  <Row>
                    <Col span={24}>
                      <FormItem
                      <ArcoUpload
                        params={{
                          action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${caseResultId}&ownerType=22_00018-302`,
                        }}
                        formItemParams={{
                          rules: [{ message: '请上传协议文书', required: true }]
                        }}
                        field='file'
                        label={
                          <>
                            <div style={{ display: 'flex' }}>
@@ -295,19 +326,8 @@
                            </div>
                          </>
                        }
                        field='caseDes'
                        rules={[{ message: '请填写事项概况', required: true }]}
                      >
                        <ArcoUpload
                          params={{
                            action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${caseResultId}&ownerType=22_00018-302`,
                          }}
                          field='file'
                          label=''
                          // editData={props.editData}
                          ownerType='22_00018-302'
                        />
                      </FormItem>
                        ownerType='22_00018-302'
                      />
                    </Col>
                    <Col span={24} style={{ position: 'relative' }}>
                      <div style={{ position: 'absolute', display: 'flex', top: '28px', zIndex: 1 }}>
@@ -329,6 +349,7 @@
                      <FormItem
                        label={(<div style={{ display: 'flex' }}>结案意见<div className="must">必填</div></div>)}
                        field='windupContent'
                        rules={[{ message: '请填写结案意见', required: true }]}
                      >
                        <TextArea
                          autoSize={{ minRows: 4, maxRows: 8 }}
@@ -340,7 +361,6 @@
                  </Row>
                </Form>
              </>
            }
            <Space style={{ marginBottom: '16px' }}>
              <Button type='primary' onClick={handleSubmit}>提交</Button>
@@ -379,6 +399,7 @@
                    <FormItem
                      label=''
                      field='failReason1'
                      rules={[{ message: '请填写调解过程中提供的解决方案', required: true }]}
                    >
                      <Input.TextArea
                        showWordLimit
@@ -395,6 +416,7 @@
                    <FormItem
                      label=''
                      field='failReason2'
                      rules={[{ message: '请填写调解过程中的主要分歧点', required: true }]}
                    >
                      <Input.TextArea
                        showWordLimit
@@ -411,6 +433,7 @@
                    <FormItem
                      label=''
                      field='failReason3'
                      rules={[{ message: '请填写最终难以调和的原因', required: true }]}
                    >
                      <Input.TextArea
                        showWordLimit
@@ -430,6 +453,7 @@
              <FormItem
                label={(<div style={{ display: 'flex' }}>结案意见<div className="must">必填</div></div>)}
                field='windupContent'
                rules={[{ message: '请填写结案意见', required: true }]}
              >
                <TextArea
                  autoSize={{ minRows: 4, maxRows: 8 }}
@@ -440,7 +464,7 @@
            </Col>
            <Space style={{ marginBottom: '16px' }}>
              <Button type='primary' onClick={handleSubmit1}>提交</Button>
              <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }}>保存</Button>
              {/* <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }}>保存</Button> */}
            </Space>
          </Form>
        }