/*
|
* @Author: dminyi 1301963064@qq.com
|
* @Date: 2024-08-09 09:59:43
|
* @LastEditors: lwh
|
* @LastEditTime: 2025-06-23 18:17:42
|
* @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\index.jsx
|
* @Description: 来访登记
|
*/
|
|
import React, { useState, useRef, Fragment, useEffect } from 'react';
|
import { useSearchParams, useNavigate } from 'react-router-dom';
|
import NewPage from '@/components/NewPage';
|
import * as $$ from '@/utils/utility';
|
import '@arco-themes/react-gzzz/css/arco.css';
|
import '../index.less';
|
import { Space, Col, Row } from 'antd';
|
import { Button, Steps, Message, Form, Input, Modal, Empty, Select } from '@arco-design/web-react';
|
import { scan } from '@/assets/images/icon';
|
import { empty, tip, question1 } from '@/assets/images';
|
import VisitorRegister from './component/visitorRegister';
|
import RepeatDetail from './RepeatDetail';
|
import HandleRecord from './HandleRecord';
|
import ArcoUpload from '@/components/ArcoUpload';
|
import CaseUpdateInfo from '@/components/CaseUpdateInfo';
|
|
const Step = Steps.Step;
|
const FormItem = Form.Item;
|
const TextArea = Input.TextArea;
|
|
const appUrl = $$.appUrl;
|
|
function saveDispute(data) {
|
return $$.ax.request({ url: `casedraftInfo/caseDraftRegister`, type: 'post', service: 'mediate', data });
|
}
|
|
function getId() {
|
return $$.ax.request({ url: `caseUtils/getNewTimeCaseId`, type: 'get', service: 'utils' });
|
}
|
|
function submitDispute(data) {
|
return $$.ax.request({ url: `case/modify/update`, type: 'post', service: 'mediate', data });
|
}
|
|
function getDetailData(id) {
|
return $$.ax.request({ url: `caseInfo/getCaseInfo?id=${id}`, type: 'get', service: 'mediate' });
|
}
|
|
// ai分析是否为风险/重点案件
|
function getRiskResultApi(data) {
|
return $$.ax.request({ urlAi: `case-law/getRiskResult`, data, typeAi: 'post', service: 'mediate' });
|
}
|
function embeddingTextToMilvusApi(data) {
|
return $$.ax.request({ urlAi: `case-law/embeddingTextToMilvus`, data, typeAi: 'post', service: 'mediate' });
|
}
|
|
// ai分析是否为重复来访案件
|
function getRepeatResultApi(data) {
|
return $$.ax.request({ urlAi: `case-law/getRepeatResult`, data, typeAi: 'post', service: 'mediate' });
|
}
|
|
function getCaseInfoApi(id) {
|
return $$.ax.request({ url: 'caseInfo/getCaseInfo?id=' + id, type: 'get', service: 'mediate' });
|
}
|
|
function listFeedbackApi(id) {
|
return $$.ax.request({ url: `caseFeedback/listFeedback?id=` + id, type: 'get', service: 'mediate' });
|
}
|
|
function delFile(id) {
|
return $$.ax.request({ url: `fileInfo/deleteFileById`, type: 'get', service: 'sys', data: { id } });
|
}
|
|
function updateFeedbackApi(data) {
|
return $$.ax.request({ url: `caseFeedback/updateFeedback`, type: 'post', service: 'mediate', data });
|
}
|
|
function saveFeedbackApi(data) {
|
return $$.ax.request({ url: `caseFeedback/saveFeedback`, type: 'post', service: 'mediate', data });
|
}
|
|
function getTransactResultApi(caseId) {
|
return $$.ax.request({ url: `caseInfoUnfold/getTransactResult?caseId=${caseId}`, type: 'get', service: 'mediate' });
|
}
|
|
function getNewTimeIdApi(id) {
|
return $$.ax.request({ url: `caseUtils/getNewTimeId`, type: 'get', service: 'utils' });
|
}
|
// 获取修改记录列表
|
function getModifyRecordApi(caseId) {
|
return $$.ax.request({
|
url: 'cases/modify-record/group-by-time-user',
|
type: 'get',
|
data: { caseId },
|
service: 'mediate'
|
});
|
}
|
|
const Organization = (props) => {
|
const formRef = useRef();
|
const formRecord = useRef();
|
|
const formOralRef = useRef();
|
const formRefWrite = useRef();
|
const failRef = useRef();
|
const [searchParams] = useSearchParams();
|
const caseId = searchParams.get('caseId');
|
const taskId = searchParams.get('taskId');
|
const completed = searchParams.get('completed'); // Get the "completed" parameter from URL
|
const navigate = useNavigate();
|
const [isReview, setIsReview] = useState(false); //预览页面控制
|
const [current, setCurrent] = useState(1);
|
const [id, setId] = useState();
|
const [editData, setEditData] = useState({}); //回显数据
|
const [backFileList, setBackFileList] = useState([]); //文件列表
|
const [Update, setUpdate] = useState(false);
|
const [repeatData, setRepeatData] = useState({ hisData: [], newData: {}, visible: false });
|
const [list, setList] = useState([]); //办理记录
|
const [feedBacklist, setFeedBackList] = useState([]); //办理记录
|
const [formView, setFormView] = useState(false); //编辑办理事由
|
const [updateData, setUpdateData] = useState({}); //编辑办理事由
|
const [scannerVisible, setScannerVisible] = useState(false); //识别材料
|
const [ocrText, setOcrText] = useState(''); //识别材料
|
const [handleContent, setHandleContent] = useState(''); //办理意见
|
const [handleFile, setHandleFile] = useState([]); //办理附件
|
const [staticButtonStatus, setStaticButtonStatus] = useState(true); //静态按钮
|
|
const [selectedTemplate2, setSelectedTemplate2] = useState();
|
const [selectedTemplate1, setSelectedTemplate1] = useState();
|
const [selectedTemplate, setSelectedTemplate] = useState();
|
const [selectedTab, setSelectedTab] = useState('1'); // 默认选中第一个 tab
|
const [value, setValue] = useState(2);
|
const [noHandleReason, setNoHandleReason] = useState(false);
|
const [mode, setMode] = useState(false);
|
const [drawerVisible, setDrawerVisible] = useState(false); //化解不成功理由抽屉控制
|
const [caseDetailAi, setCaseDetailAi] = useState('');
|
const [caseClaim, setCaseClaim] = useState('');
|
const [canal, setCanal] = useState('');
|
const [transactResult, setTransactResult] = useState(null);
|
const [uniteHandleId, setUniteHandleId] = useState('');
|
const [caseResultId, setCaseResultId] = useState('');
|
const [supervisingId, setSupervisingId] = useState('');
|
const [caseUpdateInfoVisible, setCaseUpdateInfoVisible] = useState(false);
|
const [deleteFileIds, setDeleteFileIds] = useState([]);
|
const [recordList, setRecordList] = useState([]);
|
const tabs = [
|
{ index: '1', label: '化解成功' },
|
{ index: '2', label: '化解不成功' },
|
];
|
|
const agreement = [
|
{ value: 1, label: '口头协议' },
|
{ value: 2, label: '书面协议' },
|
];
|
const [init, setInit] = useState(false);
|
|
useEffect(() => {
|
if (caseId) {
|
getDeatil(caseId);
|
getModifyRecord(caseId);
|
listFeedback(caseId);
|
getCaseInfo(caseId);
|
getTransactResult(caseId);
|
setId(caseId);
|
} else {
|
getAppId();
|
}
|
}, []);
|
|
const getModifyRecord = async (id) => {
|
const res = await getModifyRecordApi(id);
|
if (res.type) {
|
setRecordList(res.data);
|
}
|
};
|
|
const getTransactResult = async (id) => {
|
const res = await getTransactResultApi(id);
|
if (res.type) {
|
if (res.data) {
|
setTransactResult({ ...res.data, file: res.data.fileInfoBaseDTOList?.map((i) => ({ ...i, uid: i.id })) });
|
setSelectedTab(res.data.mediResult === '22_00025-1' ? '1' : '2');
|
setValue(res.data.agreeType === '24_00003-2' ? 2 : 1);
|
setCaseResultId(res.data.caseResultId);
|
if (res.data.mediResult === '22_00025-1') {
|
if (res.data.agreeType === '24_00003-2') {
|
formRefWrite.current.setFieldValue('windupContent', res.data?.windupContent);
|
formRefWrite.current.setFieldValue('file', res.data.fileInfoBaseDTOList);
|
} else {
|
formOralRef.current.setFieldValue('windupContent', res.data.windupContent);
|
formOralRef.current.setFieldValue('agreeContent', res.data.agreeContent);
|
}
|
} else {
|
failRef.current.setFieldValue('windupContent', res.data.windupContent);
|
}
|
} else {
|
setTransactResult(null);
|
}
|
}
|
};
|
|
const getCaseInfo = async (id) => {
|
const res = await getCaseInfoApi(id);
|
if (res.type) {
|
let caseDes = res.data.caseDes;
|
let caseClaim = res.data.caseClaim;
|
setCanal(res.data.canal);
|
setCaseDetailAi(caseDes);
|
setCaseClaim(caseClaim);
|
}
|
};
|
|
const listFeedback = async (id) => {
|
const res = await listFeedbackApi(id);
|
if (res.type) {
|
let data = res.data.caseFeedbackList;
|
setList(data);
|
console.log('init', init);
|
if (!init) {
|
setFeedBackList(data);
|
setInit(true)
|
}
|
}
|
};
|
|
//编辑
|
const getDeatil = async (id) => {
|
const res = await getDetailData(id);
|
if (res.type) {
|
const { agentList, personList, ...rest } = res.data;
|
const bafileList = res.data.fileInfoList?.map((item) => item.fileList)?.flat();
|
setBackFileList(bafileList);
|
console.log('bafileList', bafileList);
|
const parList = agentList.concat(personList);
|
const newParList =
|
parList?.map((item) => {
|
const fileInfoList = item.fileInfoList;
|
let file = []; //身份证明材料、企业登记材料
|
let file1 = []; //法人、机构身份证明材料、代理人授权委托书
|
if (fileInfoList && fileInfoList.length != 0) {
|
fileInfoList.forEach((item) => {
|
if (item.ownerType == '22_00018-202' || item.ownerType == '22_00018-203') {
|
item.fileList.forEach((res) => {
|
file.push({
|
...res,
|
uid: res.id,
|
});
|
});
|
}
|
if (item.ownerType == '22_00018-204' || item.ownerType == '22_00018-207') {
|
item.fileList.forEach((res) => {
|
file1.push({
|
...res,
|
uid: res.id,
|
});
|
});
|
}
|
});
|
}
|
return {
|
...item,
|
file,
|
file1,
|
};
|
}) || [];
|
const obj = {
|
...rest,
|
caseLevel: rest.caseLevel ? String(rest.caseLevel) : '',
|
fakeData: newParList,
|
myCaseType: rest.caseTypeFirst ? [rest.caseTypeFirst, rest.caseType] : undefined,
|
myQuesAddress: (() => {
|
// 构建地址数组的逻辑
|
const addressArray = [];
|
|
// 如果有区域信息,添加到数组
|
if (rest.queArea && rest.queArea.trim()) {
|
addressArray.push(rest.queArea);
|
}
|
|
// 如果有道路信息,添加到数组
|
if (rest.queRoad && rest.queRoad.trim()) {
|
addressArray.push(rest.queRoad);
|
}
|
|
// 如果数组为空,返回undefined,否则返回数组
|
return addressArray.length > 0 ? addressArray : undefined;
|
})(),
|
};
|
formRef.current.setFieldsValue(obj);
|
setEditData(obj);
|
}
|
};
|
|
//获取id
|
const getAppId = async () => {
|
const res = await getId();
|
if (res.type) {
|
setId(res.data);
|
}
|
};
|
|
//提交信息,需要校验规则
|
const handleSubmit = async () => {
|
if (formRef.current) {
|
formRef.current.validate(undefined, (errors, values) => {
|
if (!errors) {
|
const { myCaseType, myQuesAddress, ...rest } = formRef.current.getFields();
|
const params = handleData(rest);
|
if (params.personList.length === 0 || params.personList.filter((item) => item.perType === '15_020008-1').length === 0) {
|
Message.warning('申请方当事人为空,无法提交!');
|
return;
|
}
|
$$.modalInfo({
|
title: '提醒',
|
content: '确定提交吗?',
|
cancelText: '我再想想',
|
onOk: () => {
|
reauestSubmit({
|
...params,
|
isSelfAccept: 0,
|
isDraft: 0,
|
operateType: 0
|
});
|
},
|
});
|
}
|
});
|
}
|
};
|
|
//数据处理
|
const handleData = (data) => {
|
const { fakeData, ...newObj } = data;
|
if (data.id) {
|
return {
|
...newObj,
|
personList: fakeData?.filter((item) => item.perType === '15_020008-1' || item.perType === '15_020008-2'),
|
agentList: fakeData
|
?.filter((item) => item.perType === '24_00006-1' || item.perType === '24_00006-2')
|
.map((item) => {
|
return {
|
...item,
|
personId: Array.isArray(item.personId) ? item.personId.join(',') : item.personId,
|
};
|
}),
|
};
|
} else {
|
return {
|
...newObj,
|
personList: fakeData?.filter((item) => item.perType === '15_020008-1' || item.perType === '15_020008-2'),
|
agentList: fakeData
|
?.filter((item) => item.perType === '24_00006-1' || item.perType === '24_00006-2')
|
.map((item) => {
|
return {
|
...item,
|
personId: Array.isArray(item.personId) ? item.personId.join(',') : item.personId,
|
};
|
}),
|
id: id,
|
};
|
}
|
};
|
|
// 查看修改日志弹窗
|
function selfAcceptance() {
|
// 查看修改日志
|
setCaseUpdateInfoVisible(true);
|
}
|
|
//提交请求
|
const reauestSubmit = async (data, isSelfAccept) => {
|
|
global.setSpinning(true);
|
submitDisputeApi(data, isSelfAccept);
|
global.setSpinning(false);
|
|
};
|
|
async function submitDisputeApi(data, isSelfAccept) {
|
data.fileList = backFileList;
|
let caseWindupApply = {
|
|
};
|
if (completed) {
|
// 化解成功
|
if (transactResult.mediResult === '22_00025-1') {
|
if (value === 2) {
|
// formOralRef.current.validateFields(['windupContent', 'file']);
|
caseWindupApply = {
|
windupContent: formRefWrite.current.getFieldValue('windupContent'),
|
file: formRefWrite.current.getFieldValue('file'),
|
agreeType: value === 1 ? '24_00003-1' : '24_00003-2',
|
agreeTypeName: value === 1 ? '口头协议' : '书面协议',
|
};
|
} else {
|
// formOralRef.current.validateFields(['windupContent', 'agreeContent']);
|
caseWindupApply = {
|
windupContent: formOralRef.current.getFieldValue('windupContent'),
|
agreeContent: formOralRef.current.getFieldValue('agreeContent'),
|
agreeType: value === 1 ? '24_00003-1' : '24_00003-2',
|
agreeTypeName: value === 1 ? '口头协议' : '书面协议',
|
};
|
}
|
}
|
|
if (transactResult.mediResult === '22_00025-2') {
|
// 化解不成功
|
// failRef.current.validateFields(['windupContent']);
|
caseWindupApply = {
|
failReason1: failRef.current.getFieldValue('failReason1'),
|
failReason3: failRef.current.getFieldValue('failReason3'),
|
windupContent: failRef.current.getFieldValue('windupContent'),
|
};
|
}
|
}
|
data.caseWindupApply = { ...transactResult, ...caseWindupApply };
|
data.caseFeedbackList = feedBacklist;
|
data.deleteFileIds = deleteFileIds;
|
console.log('data', data);
|
// 这里提交接口todo,接口需要修改
|
const response = await submitDispute(data);
|
if (response.type) {
|
if (isSelfAccept) {
|
navigate(`/mediate/visit/handleFeedback?caseTaskId=${response.data}&caseId=${id}`);
|
} else {
|
Message.success('提交成功!');
|
if (completed) {
|
navigate(`/mediate/visit/visitWorkBench`, { replace: true });
|
setCurrent(2);
|
} else {
|
window.history.back();
|
}
|
}
|
}
|
}
|
|
// ai分析是否为风险/重点案件
|
async function getRiskResult(data) {
|
const res = await getRiskResultApi(data);
|
if (res.type) {
|
}
|
}
|
|
// 向量化处理
|
async function embeddingTextToMilvus(data) {
|
const res = await embeddingTextToMilvusApi(data);
|
if (res.type) {
|
}
|
}
|
|
const handleBack = () => {
|
if (!Update && completed) {
|
navigate(`/mediate/visit/visitWorkBench`, { replace: true });
|
} else {
|
window.history.back();
|
}
|
};
|
|
//取消添加
|
const handleChange = () => {
|
setFormView(false);
|
setId('');
|
setStaticButtonStatus(true);
|
formRecord.current.resetFields();
|
setUpdateData({});
|
};
|
|
//点击编辑办理事由
|
const handleEdit = (record, index) => {
|
console.log('record', record);
|
setId(record.id);
|
setFormView(true);
|
formRecord.current.setFieldsValue({
|
...record,
|
fileInfoList: record.fileInfoList?.map((i) => ({ ...i, uid: i.id })),
|
});
|
setUpdateData({ ...record, fileInfoList: record.fileInfoList?.map((i) => ({ ...i, uid: i.id })) });
|
// setList(list.filter((i, idx) => idx !== index))
|
// setCasualList(list)
|
};
|
|
//保存信息
|
const handleFinish = () => {
|
if (formRecord.current) {
|
formRecord.current.validate(undefined, (errors, values) => {
|
if (!errors) {
|
let submitData = formRecord.current.getFields();
|
saveFeedback(submitData);
|
setFormView(false);
|
// setStaticButtonStatus(true);
|
}
|
});
|
}
|
};
|
|
//添加办理记录
|
const addMark = () => {
|
setFormView(true);
|
getNewTimeId('addMark');
|
};
|
|
//获取理由id
|
const getNewTimeId = async (type) => {
|
const res = await getNewTimeIdApi();
|
if (res.type) {
|
if (type === 'uniteHandle') {
|
setUniteHandleId(res.data);
|
}
|
if (type === 'addMark') {
|
setId(res.data);
|
}
|
if (type === 'caseResult') {
|
setCaseResultId(res.data);
|
}
|
if (type === 'supervising') {
|
setSupervisingId(res.data);
|
}
|
}
|
};
|
|
//新增、编辑办理理由
|
const saveFeedback = async (submitData) => {
|
if (submitData.id) {
|
//编辑
|
const res = await updateFeedbackApi({
|
...submitData,
|
});
|
if (res.type) {
|
$$.infoSuccess({ content: '修改成功' });
|
// getRiskResult({ caseId, caseText: (submitData.handleContent || '') })
|
listFeedback(caseId);
|
formRecord.current.resetFields();
|
}
|
} else {
|
const res = await saveFeedbackApi({
|
...submitData,
|
caseId: caseId,
|
id: id,
|
caseTaskId: '',
|
});
|
if (res.type) {
|
$$.infoSuccess({ content: '保存成功' });
|
// getRiskResult({ caseId, caseText: (submitData.handleContent || '') })
|
listFeedback(caseId);
|
formRecord.current.resetFields();
|
}
|
}
|
};
|
|
//删除文件
|
const handleDelFile = async (id) => {
|
console.log('删除新提交文件', id);
|
const res = await delFile(id);
|
if (res.type) {
|
$$.infoSuccess({ content: '删除成功!' });
|
}
|
};
|
|
//删除文件
|
const handleDelRealFile = async (id) => {
|
console.log('删除存在文件', id);
|
setDeleteFileIds([...deleteFileIds, id]);
|
// const res = await delFile(id);
|
// if (res.type) {
|
// $$.infoSuccess({ content: '删除成功!' });
|
// }
|
};
|
//上传文件
|
const handleUploadFile = async (id) => {
|
console.log('上传文件', id);
|
|
};
|
|
const handleTabChange = (newTabIndex) => {
|
setSelectedTab(newTabIndex);
|
};
|
|
const handleTemplate = (type) => {
|
setSelectedTemplate(type);
|
if (type === 1) {
|
formOralRef.current.setFieldValue('windupContent', '双方当事人于xx时间xx地址已达成xx协议,纠纷已化解。');
|
} else {
|
formOralRef.current.setFieldValue('windupContent', '');
|
}
|
};
|
|
const handleTemplate1 = (type) => {
|
setSelectedTemplate1(type);
|
if (type === 1) {
|
formOralRef.current.setFieldValue(
|
'agreeContent',
|
'根据纠纷化解人员的协调,当事人双方同意如下调解协议:[简要说明协议第一条][简要说明协议第二条][……]本口头调解协议由纠纷化解人员记录,并已告知双方当事人。双方当事人确认无误。'
|
);
|
}
|
};
|
|
const handleTemplate2 = (type) => {
|
setSelectedTemplate2(type);
|
if (type === 1) {
|
formRefWrite.current.setFieldValue('windupContent', '双方当事人于xx时间xx地址已达成xx协议,纠纷已化解。');
|
} else {
|
formRefWrite.current.setFieldValue('windupContent', '');
|
}
|
};
|
|
const handleTemplate3 = (type) => {
|
if (type === 1) {
|
failRef.current.setFieldValue(
|
'windupContent',
|
'经过多次调解,尽管纠纷化解人员尽最大努力帮助双方找到解决方案,但由于以下原因,当事人双方未能达成一致意见:[详细说明化解未成功的原因之一][详细说明化解未成功的原因之二][……][……]鉴于上述情况,纠纷化解人员认为目前无法通过调解方式解决双方的争议,建议双方考虑采取其他合法途径解决纠纷。'
|
);
|
} else {
|
failRef.current.setFieldValue('windupContent', '');
|
}
|
};
|
|
console.log(value, 'value');
|
|
return (
|
<div style={{ position: 'relative' }}>
|
<NewPage pageHead={{ breadcrumbData: [{ title: '工作台' }, { title: '来访登记' }], title: '来访登记' }}>
|
<Fragment>
|
<div className="dataSync-page" style={{ height: 'calc(100vh - 145px)', paddingBottom: '60px' }}>
|
<VisitorRegister
|
isEdit={true}
|
formRef={formRef}
|
mainId={id}
|
partyList={editData.fakeData}
|
fileInfoList={editData.fileInfoList}
|
onValuesChange={(first, all) => { }}
|
canal={canal}
|
/>
|
{completed && (<div style={{ marginBottom: '12px' }}>
|
<Space size="small">
|
<div className="MediationInfo-subTitle" style={{ marginTop: '-9px' }}></div>
|
<h4>办理记录({list.length})</h4>
|
</Space>
|
<Form layout="vertical" requiredSymbol={false} scrollToFirstError={true}>
|
<Col span={24}>
|
<HandleRecord isReview={false} handleEdit={handleEdit} data={list} />
|
{/* <HandleRecord isReview={false} handleEdit={handleEdit} data={list} noEdit={false} /> */}
|
<div className="Form" style={{ display: formView ? '' : 'none', marginBottom: '50px' }}>
|
<Col span={24} style={{ marginBottom: '8px' }}>
|
<Space size="small">
|
<div className="MediationInfo-subTitle" style={{ marginTop: '-9px' }}></div>
|
<h4>添加办理记录</h4>
|
</Space>
|
</Col>
|
<Col span={24}>
|
<Form
|
ref={formRecord}
|
layout="vertical"
|
requiredSymbol={false}
|
scrollToFirstError={true}
|
onValuesChange={(first, all) => {
|
// setUpdate({ first: first, all: all })
|
}}
|
>
|
<Row gutter={[32, 0]}>
|
<Col span={24}>
|
<FormItem
|
label={
|
<div style={{ display: 'flex' }}>
|
办理意见
|
<div className="must">必填</div>
|
<img src={scan} alt="" style={{ marginRight: '-2px', marginLeft: '8px' }} />
|
<div
|
style={{ marginLeft: '8px', color: '#1A6FB8', fontSize: '14px', cursor: 'pointer' }}
|
onClick={() => {
|
setScannerVisible(true);
|
setOcrText('handleContent');
|
}}
|
>
|
识别材料
|
</div>
|
</div>
|
}
|
field="handleContent"
|
rules={[{ message: '请填写办理意见', required: true }]}
|
>
|
<Input.TextArea
|
maxLength={800}
|
showWordLimit
|
rows={7}
|
placeholder="办理意见应该填写完整,办理意见应具备5要素:调解时间+调解参与部门/人+调解地点+调解过程+调解结果"
|
wrapperStyle={{ width: '100%' }}
|
/>
|
</FormItem>
|
</Col>
|
<Col span={24}>
|
<ArcoUpload
|
params={{
|
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${id}&ownerType=22_00018-501`,
|
}}
|
field="fileInfoList"
|
label={'办理附件'}
|
editData={updateData}
|
handleDelFile={handleDelFile}
|
handleDelRealFile={handleDelRealFile}
|
handleChangeFile={handleUploadFile}
|
ownerType="22_00018-501"
|
/>
|
</Col>
|
</Row>
|
</Form>
|
</Col>
|
<Space size="middle">
|
<Button type="primary" onClick={() => handleFinish()}>
|
提交
|
</Button>
|
<Button type="secondary" onClick={handleChange}>
|
取消添加
|
</Button>
|
</Space>
|
</div>
|
{list?.length === 0 && !formView && (
|
<div className="handle-content-empty" style={{ marginTop: '10%' }}>
|
<Empty description={<span className="empty-text">暂无数据</span>} image={empty}></Empty>
|
</div>
|
)}
|
</Col>
|
</Form>
|
</div>)}
|
{completed && (
|
<div style={{ margin: '0 0 68px 0' }}>
|
<Space size="small">
|
<div className="MediationInfo-subTitle" style={{ marginTop: '-9px' }}></div>
|
<h4>办理结果</h4>
|
</Space>
|
<div style={{ height: '550px' }}>
|
<div className="caseResult-title">化解结果</div>
|
<div className="caseResult-tabs">
|
{tabs.map((tab) => (
|
<div
|
key={tab.index}
|
style={{
|
color: selectedTab === tab.index ? 'rgba(26,111,184,1)' : 'rgba(0,0,0,0.45)',
|
padding: '5px 16px',
|
border: `1px solid ${selectedTab === tab.index ? 'rgba(26,111,184,1)' : 'rgba(229,230,235,1)'}`,
|
borderRadius: '2px',
|
cursor: 'not-allowed',
|
pointerEvents: 'auto',
|
}}
|
>
|
{tab.label}
|
</div>
|
))}
|
</div>
|
{/*化解成功*/}
|
{selectedTab === '1' && (
|
<>
|
<Col span={8} style={{ marginBottom: '16px' }}>
|
<div style={{ marginBottom: '8px' }}>达成的协议类型</div>
|
<Select
|
options={agreement}
|
onChange={(v) => {
|
setValue(v);
|
}}
|
value={value}
|
></Select>
|
</Col>
|
{/*口头协议 */}
|
<Form ref={formOralRef} layout="vertical" requiredSymbol={false} scrollToFirstError={true}>
|
{value === 1 && (
|
<>
|
<Row>
|
<Col span={24} style={{ position: 'relative' }}>
|
<FormItem
|
label={
|
<>
|
<div style={{ display: 'flex' }}>
|
协议要点
|
<div className="must">必填</div>
|
</div>
|
<div className="caseResult-tips">
|
<img src={tip} alt="" style={{ width: '16px', marginRight: '8px', marginTop: '-5px' }} />
|
<span>协议要点应尽量简洁,当事人大厅来访或小程序线上反映问题时,可在小程序中查看到填写的协议要点内容</span>
|
</div>
|
<div style={{ position: 'absolute', display: 'flex ', top: '79px', zIndex: 1 }}>
|
<div
|
className={`myTag ${selectedTemplate1 === 1 ? 'highlighted' : ''}`} // 条件样式
|
style={{ marginRight: '22px' }}
|
onClick={() => handleTemplate1(1)}
|
>
|
公共模板:调解成功口头协议
|
</div>
|
</div>
|
</>
|
}
|
field="agreeContent"
|
rules={[{ message: '请填写协议要点', required: true }]}
|
>
|
<TextArea autoSize={{ minRows: 4, maxRows: 8 }} placeholder="请填写" style={{ marginTop: '40px' }} />
|
</FormItem>
|
</Col>
|
<Col span={24} style={{ position: 'relative' }}>
|
<div style={{ position: 'absolute', display: 'flex', top: '28px', zIndex: 1 }}>
|
<div
|
className={`myTag ${selectedTemplate === 1 ? 'highlighted' : ''}`} // 条件样式
|
style={{ marginRight: '22px' }}
|
onClick={() => handleTemplate(1)}
|
>
|
公共模板:化解成功协议履行情况范本
|
</div>
|
</div>
|
<FormItem
|
label={
|
<div style={{ display: 'flex' }}>
|
协议履行情况<div className="must">必填</div>
|
</div>
|
}
|
field="windupContent"
|
rules={[{ message: '请填写协议履行情况', required: true }]}
|
>
|
<TextArea autoSize={{ minRows: 4, maxRows: 8 }} placeholder="请填写" style={{ marginTop: '35px' }} />
|
</FormItem>
|
</Col>
|
</Row>
|
</>
|
)}
|
{/*书面协议 */}
|
{value === 2 && (
|
<>
|
<Form ref={formRefWrite} layout="vertical" requiredSymbol={false} scrollToFirstError={true}>
|
<Row>
|
<Col span={24}>
|
<ArcoUpload
|
params={
|
{
|
action: `${appUrl.fileUrl}/${appUrl.sys}/api/web/fileInfo/upload?mainId=${caseId}&ownerId=${caseResultId}&ownerType=22_00018-302`,
|
}
|
}
|
handleDelFile={handleDelFile}
|
handleDelRealFile={handleDelRealFile}
|
handleChangeFile={handleUploadFile}
|
editData={transactResult}
|
// onFileListChange={(fileList) => {
|
// // 用于上传后点击回显
|
// formRefWrite.current.setFieldValue(
|
// 'file',
|
// fileList?.map((i, idx) => ({ ...i, url: `${appUrl.fileUrl}${appUrl.fileShowUrl}${i.response?.data[0]?.id}` }))
|
// );
|
// }}
|
formItemParams={{
|
rules: [{ message: '请上传协议文书', required: true }],
|
}}
|
field="file"
|
label={
|
<>
|
<div style={{ display: 'flex' }}>
|
协议文书
|
<div className="must" style={{ marginLeft: '4px' }}>
|
必填
|
</div>
|
</div>
|
<div className="caseResult-tips">
|
<img src={tip} alt="" style={{ width: '16px', marginRight: '8px' }} />
|
<span>如通过人民调解工作成功化解纠纷事项,建议上传签字盖章后的人民调解协议书</span>
|
</div>
|
</>
|
}
|
ownerType="22_00018-302"
|
/>
|
</Col>
|
<Col span={24} style={{ position: 'relative' }}>
|
<div style={{ position: 'absolute', display: 'flex', top: '28px', zIndex: 1 }}>
|
<div
|
className={`myTag ${selectedTemplate2 === 1 ? 'highlighted' : ''}`} // 条件样式
|
style={{ marginRight: '22px' }}
|
onClick={() => handleTemplate2(1)}
|
>
|
公共模板:化解成功协议履行情况范本
|
</div>
|
</div>
|
|
<FormItem
|
label={
|
<div style={{ display: 'flex' }}>
|
协议履行情况<div className="must">必填</div>
|
</div>
|
}
|
field="windupContent"
|
rules={[{ message: '请填写协议履行情况', required: true }]}
|
>
|
<TextArea autoSize={{ minRows: 4, maxRows: 8 }} placeholder="请填写" style={{ marginTop: '35px' }} />
|
</FormItem>
|
</Col>
|
</Row>
|
</Form>
|
</>
|
)}
|
</Form>
|
</>
|
)}
|
{/*化解不成功*/}
|
{selectedTab === '2' && (
|
<Form ref={failRef} layout="vertical" requiredSymbol={false} scrollToFirstError={true}>
|
<Col span={24}>
|
<div style={{ display: 'flex', marginBottom: '16px' }}>
|
无法化解理由
|
<img
|
src={question1}
|
style={{ width: '13px', height: '13px', margin: '5px 4px 0px', cursor: 'pointer' }}
|
onClick={() => {
|
setDrawerVisible(true);
|
}}
|
/>
|
<div className="must" style={{ marginLeft: '4px' }}>
|
必填
|
</div>
|
</div>
|
<table border="1" align="center" cellpadding="8" className="table">
|
<tr>
|
<th bgcolor="#F7F8FA" className="table-title" width="120">
|
当事人的主要诉求
|
</th>
|
<td>
|
<div>{caseDetailAi}</div>
|
</td>
|
</tr>
|
<tr>
|
<th bgcolor="#F7F8FA" className="table-title" width="120">
|
调解过程中提供的解决方案
|
</th>
|
<td>
|
<FormItem label="" field="failReason1" rules={[{ message: '请填写调解过程中提供的解决方案', required: true }]}>
|
<Input.TextArea showWordLimit rows={3} placeholder="如提出的纠纷化解建议、思路等" wrapperStyle={{ width: '100%' }} />
|
</FormItem>
|
</td>
|
</tr>
|
<tr>
|
<th bgcolor="#F7F8FA" className="table-title">
|
最终难以调和的原因
|
</th>
|
<td>
|
<FormItem label="" field="failReason3" rules={[{ message: '请填写最终难以调和的原因', required: true }]}>
|
<Input.TextArea
|
showWordLimit
|
rows={3}
|
placeholder="如利益分配不均、信任缺失、信息不对称等"
|
wrapperStyle={{ width: '100%' }}
|
/>
|
</FormItem>
|
</td>
|
</tr>
|
</table>
|
</Col>
|
{/* <Col span={24} style={{ position: 'relative' }}>
|
<div style={{ position: 'absolute', display: 'flex ', top: '28px', zIndex: 1 }}>
|
<div
|
className="myTag"
|
style={{ marginRight: '22px' }}
|
onClick={() => {
|
handleTemplate3(1);
|
}}
|
>
|
公共模板:化解不成功结案意见范本
|
</div>
|
</div>
|
<FormItem
|
label={
|
<div style={{ display: 'flex' }}>
|
结案意见<div className="must">必填</div>
|
</div>
|
}
|
field="windupContent"
|
rules={[{ message: '请填写结案意见', required: true }]}
|
>
|
<TextArea autoSize={{ minRows: 4, maxRows: 8 }} placeholder="请填写" style={{ marginTop: '35px' }} />
|
</FormItem>
|
</Col> */}
|
</Form>
|
)}
|
</div>
|
</div>
|
)}
|
</div>
|
<div className="dataSync-excel">
|
<Space size="middle" style={{ margin: '4px 14px' }}>
|
<Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSubmit}>
|
提交
|
</Button>
|
{completed && (<Button type="outline" style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={addMark}>
|
添加办理记录
|
</Button>)}
|
{recordList.length > 0 && (
|
<Button type="outline" style={{ color: '#1A6FB8', border: '1px solid #1A6FB8' }} onClick={() => selfAcceptance()}>
|
查看修改日志 ({recordList.length})
|
</Button>
|
)}
|
<Button type="secondary" onClick={handleBack}>
|
返回上级页面
|
</Button>
|
</Space>
|
</div>
|
</Fragment>
|
<CaseUpdateInfo visible={caseUpdateInfoVisible} onCancel={() => setCaseUpdateInfoVisible(false)} caseId={caseId} />
|
</NewPage>
|
|
</div>
|
);
|
};
|
|
export default Organization;
|