forked from gzzfw/frontEnd/gzDyh

dminyi
2024-09-08 72d230f345462c69e3d916f32998f044c9bb812a
结案申请
1 files modified
167 ■■■■ changed files
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx 167 ●●●● patch | view | raw | blame | history
gz-customerSystem/src/views/register/handleFeedback/component/CaseResult.jsx
@@ -2,7 +2,7 @@
 * @Author: dminyi 1301963064@qq.com
 * @Date: 2024-09-02 14:49:13
 * @LastEditors: dminyi 1301963064@qq.com
 * @LastEditTime: 2024-09-08 17:52:21
 * @LastEditTime: 2024-09-08 18:25:54
 * @FilePath: \gzDyh\gz-customerSystem\src\views\register\handleFeedback\component\CaseResult.jsx
 * @Description: 结案申请
 */
@@ -29,6 +29,7 @@
const CaseResult = ({ visible = false, handleOnCancel, caseResultId, caseId }) => {
  const formRef = useRef();
  const formRefWrite = useRef();
  const failRef = useRef();
  const [selectedTab, setSelectedTab] = useState('1'); // 默认选中第一个 tab
  const [scanFile, setScanFile] = useState(false);
  const [selectedTab1, setSelectedTab1] = useState('1'); // 默认选中第一个 tab
@@ -81,9 +82,32 @@
  };
  const handleSubmit = () => {
    const data = formRef.current.getFields()
    if (value === 1) {
      const data = formRef?.current.getFields()
    console.log(data, 'handleSubmit')
    windupApply(data)
    }
    if (value === 2) {
      const data = formRefWrite?.current.getFields()
      console.log(data, 'handleSubmit')
      windupApply(data)
    }
    if (selectedTab === '2') {
      const data = failRef?.current.getFields()
      console.log(data, 'handleSubmit')
      // windupApply(data)
    }
  }
  const handleSubmit1 = () => {
    if (selectedTab === '2') {
      const data = failRef?.current.getFields()
      console.log(data, 'handleSubmit')
      windupApply(data)
    }
  }
  const windupApply = async (submitData) => {
@@ -253,45 +277,12 @@
                      >
                        <ArcoUpload
                          params={{
                            action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${caseResultId}&ownerType=22_00018-207`,
                            action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${caseResultId}&ownerType=22_00018-302`,
                          }}
                          field='file1'
                          field='file'
                          label='代理人委托书'
                          // editData={props.editData}
                          ownerType='22_00018-207'
                        />
                      </FormItem>
                    </Col>
                    <Col span={24}>
                      <FormItem
                        label={
                          <>
                            <div style={{ display: 'flex' }}>
                              协议要点
                              <div className="must" style={{ marginLeft: '4px' }}>必填</div>
                              <img src={scan} alt="" style={{ marginRight: '-2px', marginLeft: '8px' }} />
                              <div style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }} onClick={() => setScanFile(true)}>识别材料</div>
                            </div>
                            <div className='caseResult-tips'>
                              <img src={tip} alt='' style={{ width: '16px', marginRight: '8px' }} />
                              <span>协议要点应尽量简洁,当事人大厅来访或小程序线上反映问题时,可在小程序中查看到填写的协议要点内容</span>
                            </div>
                          </>
                        }
                        field='caseDes'
                        rules={[{ message: '请填写事项概况', required: true }]}
                      >
                        <div className='caseResult-textarea'>公共模板1:调解成功口头协议</div>
                        <Input.TextArea
                          rows={5}
                          maxLength={{ length: 200, errorOnly: true }}
                          showWordLimit
                          wrapperStyle={{ width: '100%' }}
                          value='根据纠纷化解人员的协调,当事人双方同意如下调解协议:
                                  [简要说明协议第一条]
                                  [简要说明协议第二条]
                                  [……]
                                  本口头调解协议由纠纷化解人员记录,并已告知双方当事人。双方当事人确认无误。'
                          ownerType='22_00018-302'
                        />
                      </FormItem>
                    </Col>
@@ -303,11 +294,7 @@
                              结案意见
                              <div className="must" style={{ marginLeft: '4px' }}>必填</div>
                            </div>
                          </>
                        }
                        field='caseDes'
                        rules={[{ message: '请填写事项概况', required: true }]}
                      >
                            <div className='modeMore'>
                        <div className='tabs1' >
                          {tabs1.map((tab) => (
                            <div
@@ -325,7 +312,32 @@
                            </div>
                          ))}
                        </div>
                              <div style={{ color: '#1A6FB8' }} onClick={() => setMode(!mode)}>更多模板</div>
                            </div>
                          </>
                        }
                        field='windupContent'
                        rules={[{ message: '请填写事项概况', required: true }]}
                      >
                        {/* <div className='tabs1' >
                          {tabs1.map((tab) => (
                            <div
                              key={tab.index}
                              style={{
                                color: selectedTab1 === tab.index ? 'rgba(26,111,184,1)' : 'rgba(0,0,0,0.45)',
                                border: `1px solid ${selectedTab1 === tab.index ? 'rgba(26,111,184,1)' : 'rgba(229,230,235,1)'}`,
                                borderRadius: '2px',
                                cursor: 'pointer',
                                padding: '0px 8px',
                              }}
                              onClick={() => handleTabChange1(tab.index)}
                            >
                              {tab.label}
                            </div>
                          ))}
                        </div> */}
                        <Input.TextArea
                          rows={5}
                          wrapperStyle={{ width: '100%' }}
@@ -347,62 +359,77 @@
        {/*化解不成功*/}
        {selectedTab === '2' &&
          <Form
            ref={failRef}
            layout='vertical'
            requiredSymbol={false}
            scrollToFirstError={true}
            initialValues={{
              caseLevel: 3,
            }}//默认值
          >
            <Col span={24}>
              <FormItem
                label={<div style={{ display: 'flex' }}>
              <div style={{ display: 'flex', marginBottom: '16px' }}>
                  无法化解理由
                  <Tooltip onClick={() => setNoHandleReason(!noHandleReason)}>
                    <img src={question1} alt="" style={{ width: '13px', height: '13px', margin: '4px 4px 0px 4px' }} />
                  </Tooltip>
                  <div className="must" style={{ marginLeft: '4px' }}>必填</div>
                </div>
                }
                field='caseDes'
                rules={[{ message: '请填写事项概况', required: true }]}
              >
                <table border="1" align="center" cellpadding="8" className="table">
                <tr>
                  <th bgcolor="#F7F8FA" className="table-title" width="120">当事人的主要诉求</th>
                  <td>
                    <div>
                      鉴于上述情况,申请方希望综治中心可以帮忙解决:<br />
                      1. 请求判决被申请人张三立即偿还借款本金人民币20万元整;<br />
                      2. 请求判决被申请人支付自借款之日起至实际还款之日止按合同约定的年利率计算的利息;
                    </div>
                  </td>
                </tr>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title" width="120">调解过程中提供的解决方案</th>
                    <td>
                    <FormItem
                      label=''
                      field='failReason1'
                    >
                      <Input.TextArea
                        showWordLimit
                        rows={3}
                        placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
                        wrapperStyle={{ width: '100%' }}
                      />
                    </FormItem>
                    </td>
                  </tr>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title">调解过程中的主要分歧点</th>
                    <td>
                    <FormItem
                      label=''
                      field='failReason2'
                    >
                      <Input.TextArea
                        showWordLimit
                        rows={3}
                        placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
                        wrapperStyle={{ width: '100%' }}
                      />
                    </FormItem>
                    </td>
                  </tr>
                  <tr>
                    <th bgcolor="#F7F8FA" className="table-title">最终难以调和的原因</th>
                    <td>
                    <FormItem
                      label=''
                      field='failReason3'
                    >
                      <Input.TextArea
                        showWordLimit
                        rows={3}
                        placeholder='请完整描述事项概况,应具备5要素:发生时间+发生地点+人物情况+事项起因+事项经过'
                        wrapperStyle={{ width: '100%' }}
                      />
                    </FormItem>
                    </td>
                  </tr>
                </table>
              </FormItem>
            </Col>
            <Col span={24}>
              <FormItem
@@ -412,12 +439,15 @@
                      结案意见
                      <div className="must" style={{ marginLeft: '4px' }}>必填</div>
                    </div>
                    <div className='modeMore'>
                      <div className='caseResult-textarea'>公共模板:化解不成功结案意见范本</div>
                      <div style={{ color: '#1A6FB8' }} onClick={() => setMode(!mode)}>更多模板</div>
                    </div>
                  </>
                }
                field='caseDes'
                field='windupContent'
                rules={[{ message: '请填写事项概况', required: true }]}
              >
                <div className='caseResult-textarea'>公共模板1:化解不成功结案意见范本</div>
                <Input.TextArea
                  rows={5}
                  wrapperStyle={{ width: '100%' }}
@@ -425,29 +455,8 @@
                />
              </FormItem>
            </Col>
            <Col span={24}>
              <FormItem
                label='是否转诉讼案件'
                field='caseDes'
              >
                <Radio.Group onChange={onChange} value={radioValue}>
                  <Space direction="vertical">
                    <Radio value={1}>否</Radio>
                    <Radio value={2}>是</Radio>
                  </Space>
                </Radio.Group>
              </FormItem>
            </Col>
            <Col span={24}>
              <FormItem
                label='是否转诉诉讼案号讼案件'
                field='caseDes'
              >
                <Input style={{ width: 350 }} placeholder='请输入法院立案号' />
              </FormItem>
            </Col>
            <Space style={{ marginBottom: '16px' }}>
              <Button type='primary'>提交</Button>
              <Button type='primary' onClick={handleSubmit1}>提交</Button>
              <Button type='outline' style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }}>保存</Button>
            </Space>
          </Form>