/*
|
* @Company: hugeInfo
|
* @Author: ldh
|
* @Date: 2022-03-23 14:34:29
|
* @LastEditTime: 2022-12-02 17:14:34
|
* @LastEditors: ldh
|
* @Version: 1.0.0
|
* @Description: 其他功能
|
*/
|
import React, { useState } from 'react';
|
import { useNavigate, useSearchParams } from 'react-router-dom';
|
import { Row, Col, Space, Input, Button, Tooltip } from 'antd';
|
import { UserAddOutlined } from '@ant-design/icons';
|
import WantUserTag from '../../../components/WantUserTag';
|
import MyUpload from '../../../components/MyUpload';
|
import { ax, infoSuccess, modalInfo, sleep } from '../../../utils/utility';
|
|
// 退回上一处理人接口
|
function returnTaskApi(submitData) {
|
return ax.request({ url: 'judicTask/backTask', type: 'post', data: submitData, service: 'mediate' });
|
}
|
|
const { TextArea } = Input;
|
|
const MediateSetting = ({ taskId, disputeData, tabActive }) => {
|
const [searchParams] = useSearchParams();
|
|
const navigate = useNavigate();
|
|
const back = searchParams.get('back');
|
|
const [handleContent, setHandleContent] = useState();
|
|
// 退回上一环节
|
function handleReturn() {
|
modalInfo({
|
title: '司法确认任务退回确认',
|
content: '确定将司法确认任务退回给上一级处理人吗?',
|
okText: '确定退回',
|
onOk: async () => {
|
global.setSpinning(true);
|
const res = await returnTaskApi({ id: taskId, handleContent });
|
global.setSpinning(false);
|
if (res.type) {
|
infoSuccess({ content: '退回成功,即将为您跳转「我的司法确认」页面' });
|
await sleep();
|
navigate(`${back}?isBack=true`);
|
}
|
},
|
});
|
}
|
|
// 选择助理/书记员TODO:暂无
|
const oneDom = (
|
<Row gutter={[16, 16]}>
|
<Col>
|
<h5>选择助理/书记员</h5>
|
<div className="caseDetail-subtitle" style={{ marginBottom: '8px' }}>
|
助理/书记员可在“我的司法确认-我参与的”列表中跟进案件调解工作
|
</div>
|
<Button type="dashed" icon={<UserAddOutlined />}>
|
选择人员
|
</Button>
|
</Col>
|
<Col span={24}>
|
<h5>助理/书记员名单</h5>
|
<Space size="large">
|
<WantUserTag name="陈雄" onClose={() => console.log(99)} />
|
<WantUserTag name="陈雄" onClose={() => console.log(99)} />
|
</Space>
|
</Col>
|
</Row>
|
);
|
|
// 退回上一环节
|
const twoDom = (
|
<>
|
<div className="mediationWindow-modal-main">
|
<Row gutter={[16, 16]}>
|
<Col span={24}>
|
<h5>退回理由</h5>
|
<TextArea
|
rows={2}
|
value={handleContent}
|
onChange={(e) => setHandleContent(e.target.value)}
|
placeholder="输入退回司法确认任务给上一级处理人的理由"
|
/>
|
</Col>
|
<Col span={24}>
|
<h5>上传附件</h5>
|
<MyUpload fileId={taskId} fileType="22_00018-501" />
|
</Col>
|
</Row>
|
</div>
|
<div className="mediationWindow-modal-footer">
|
<Tooltip title={disputeData.process === '22_00006-3' ? '司法确认中不可退回' : null}>
|
<Button disabled={disputeData.process === '22_00006-3'} onClick={handleReturn} danger>
|
退回上一环节
|
</Button>
|
</Tooltip>
|
</div>
|
</>
|
);
|
|
return (
|
<>
|
{tabActive === '1' && oneDom}
|
{tabActive === '2' && twoDom}
|
</>
|
);
|
};
|
|
export default MediateSetting;
|