| | |
| | | import ReviewProgress from './ReviewProgress'; |
| | | import * as $$ from '@/utils/utility'; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { getOffset, getSize } from '@/utils/utility'; |
| | | |
| | | const RadioGroup = Radio.Group; |
| | | const FormItem = Form.Item; |
| | |
| | | export default function ReviewExamine(props) { |
| | | const navigate = useNavigate(); |
| | | const formRef = useRef(); |
| | | const scrollRef = useRef(null); |
| | | const [result, setResult] = useState() |
| | | const [infoData, setInfoData] = useState({}); |
| | | const [id, setId] = useState(); |
| | | const [progressData, setProgressData] = useState({}) |
| | | const [reasonRadio, setReasonRadio] = useState(); |
| | | const [height, setHeight] = useState(500); |
| | | const options = [ |
| | | { |
| | | label: '材料不完整', |
| | |
| | | |
| | | useEffect(() => { |
| | | getInfoData() |
| | | getAppId() |
| | | // getAppId() |
| | | getProData() |
| | | onWindowResize() |
| | | window.addEventListener("resize", onWindowResize); |
| | | // 返回一个函数,该函数会在组件卸载前执行 |
| | | return () => { |
| | | // 组件销毁时执行 |
| | | window.removeEventListener("resize", onWindowResize); |
| | | }; |
| | | }, []) |
| | | |
| | | //获取id |
| | | const getAppId = async () => { |
| | | const res = await getId() |
| | | if (res.type) { |
| | | setId(res.data) |
| | | const onWindowResize = () => { |
| | | let offsetTop = 0; |
| | | if (scrollRef.current.container) { |
| | | offsetTop = getOffset(scrollRef.current.container).top; |
| | | } |
| | | } |
| | | setHeight(getSize().windowH - offsetTop - 80) |
| | | }; |
| | | |
| | | //获取id |
| | | // const getAppId = async () => { |
| | | // const res = await getId() |
| | | // if (res.type) { |
| | | // setId(res.data) |
| | | // } |
| | | // } |
| | | |
| | | //回显数据 |
| | | const getInfoData = async () => { |
| | | const res = await getData({ caseTaskId: props.caseTaskId }) |
| | | if (res.type) { |
| | | setInfoData(res.data || {}) |
| | | setId(res.data.id) |
| | | } |
| | | } |
| | | |
| | |
| | | if (!errors) { |
| | | const { file, myNoUp, ...rest } = formRef.current.getFields() |
| | | requestSubmit({ |
| | | id, |
| | | id: id, |
| | | caseId: props.caseId, |
| | | caseTaskId: props.caseTaskId, |
| | | ...rest |
| | |
| | | const res = await submit(data) |
| | | if (res.type) { |
| | | $$.infoSuccess({ content: '提交成功!' }); |
| | | navigate(`/mediate/visit/visitWorkBench`) } |
| | | navigate(`/mediate/visit/visitWorkBench`) |
| | | } |
| | | } |
| | | |
| | | //删除文件 |
| | |
| | | |
| | | return ( |
| | | <div className='dataSync'> |
| | | <div className='dataSync-noBackTabPage'> |
| | | <Scrollbars style={{ height: '100%' }} autoHide> |
| | | <div className='dataSync-noBackTabPage' style={{ background: '#fff' }}> |
| | | <Scrollbars style={{ height: height + 'px' }} autoHide ref={scrollRef}> |
| | | <div className='whiteBox'> |
| | | <Space size='small'> |
| | | <div className='MediationInfo-subTitle' style={{ marginTop: '-8px' }}></div><h5>结案申请</h5> |
| | |
| | | </Col> |
| | | <Col span={24}> |
| | | <div><div className="title-text">结案意见</div></div> |
| | | <div>{infoData?.windupContent || '-'}</div> |
| | | <div>{infoData?.auditContent || '-'}</div> |
| | | </Col> |
| | | {/* <Col span={24}> |
| | | <div><div className="title-text">是否转诉讼案件</div></div> |
| | |
| | | </Col> */} |
| | | <Col span={24}> |
| | | <div><div className="title-text">申请时间</div></div> |
| | | <div>{infoData?.applyTime || '-'}</div> |
| | | <div>{$$.myTimeFormat(infoData?.applyTime, 'YYYY-MM-DD HH:mm') || '-'}</div> |
| | | </Col> |
| | | <Col span={24}> |
| | | <div><div className="title-text">申请人</div></div> |
| | |
| | | </Col> |
| | | </Row> |
| | | </div> |
| | | <div style={{ display: 'flex', marginTop: '8px' }}> |
| | | <div style={{ display: 'flex', borderTop: '8px solid #f0f2f5' }}> |
| | | <div className='whiteBox' style={{ flex: 1, marginRight: '8px' }}> |
| | | <Space size='small'> |
| | | <div className='MediationInfo-subTitle' style={{ marginTop: '-8px' }}></div><h5>审核</h5> |
| | |
| | | layout='vertical' |
| | | requiredSymbol={false} |
| | | initialValues={{ |
| | | auditResult: '24_00004-1', |
| | | auditResultName: '同意' |
| | | }}//默认值 |
| | | scrollToFirstError |
| | | > |
| | |
| | | direction='vertical' |
| | | options={options} |
| | | onChange={(value) => { |
| | | const obj = options.find(item => item.value === value) |
| | | formRef.current.setFieldValue('audit_content', obj.label) |
| | | setReasonRadio(value) |
| | | if (value !== '4') { |
| | | const obj = options.find(item => item.value === value) |
| | | formRef.current.setFieldValue('auditContent', obj.label) |
| | | } else { |
| | | formRef.current.setFieldValue('auditResultName', '') |
| | | } |
| | | }} |
| | | > |
| | | </RadioGroup> |
| | | </FormItem> |
| | | </Col> |
| | | <Col span={24}> |
| | | <FormItem |
| | | label=' ' |
| | | field='audit_content' |
| | | rules={[{ required: true, message: '理由不能为空' }]} |
| | | > |
| | | <TextArea |
| | | autoSize={{ minRows: 4, maxRows: 8 }} |
| | | placeholder='请填写回退的具体理由' |
| | | /> |
| | | </FormItem> |
| | | </Col> |
| | | { |
| | | reasonRadio === '4' && <Col span={24}> |
| | | <FormItem |
| | | label=' ' |
| | | field='auditContent' |
| | | rules={[{ required: true, message: '理由不能为空' }]} |
| | | > |
| | | <TextArea |
| | | autoSize={{ minRows: 4, maxRows: 8 }} |
| | | placeholder='请填写回退的具体理由' |
| | | /> |
| | | </FormItem> |
| | | </Col> |
| | | } |
| | | <Col span={24} className="doubleFile"> |
| | | <ArcoUpload |
| | | params={{ |
| | |
| | | } |
| | | </Row> |
| | | </Form> |
| | | <div className='dialogFooter'> |
| | | <Button |
| | | type="primary" |
| | | className="dialogPrimary" |
| | | onClick={handleSubmit} |
| | | > |
| | | 提交 |
| | | </Button> |
| | | </div> |
| | | </div> |
| | | { |
| | | (infoData.caseLevel === 1 || infoData.caseLevel === 2) && |
| | |
| | | } |
| | | </div> |
| | | </Scrollbars> |
| | | <div className='dialogFooter' style={{ margin: 0, padding: '16px 12px' }}> |
| | | <Button |
| | | type="primary" |
| | | className="dialogPrimary" |
| | | onClick={handleSubmit} |
| | | > |
| | | 提交 |
| | | </Button> |
| | | <Button type='secondary' onClick={() => navigate(-1)}>返回上级页面</Button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | ) |