From ae3833a1fc16bd3c9fd13f8301397e5835a9e49c Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Sun, 15 Sep 2024 15:31:02 +0800
Subject: [PATCH] fix: 自行排查更改、流程组件完善
---
gz-customerSystem/src/views/register/visit/preview.jsx | 524 +++++++++++++++++++++++++--------------------------------
1 files changed, 230 insertions(+), 294 deletions(-)
diff --git a/gz-customerSystem/src/views/register/visit/preview.jsx b/gz-customerSystem/src/views/register/visit/preview.jsx
index e6ea1e9..ff662fa 100644
--- a/gz-customerSystem/src/views/register/visit/preview.jsx
+++ b/gz-customerSystem/src/views/register/visit/preview.jsx
@@ -2,309 +2,245 @@
* @Author: dminyi 1301963064@qq.com
* @Date: 2024-08-13 15:19:57
* @LastEditors: dminyi 1301963064@qq.com
- * @LastEditTime: 2024-08-14 14:59:10
+ * @LastEditTime: 2024-09-12 11:42:43
* @FilePath: \gzDyh\gz-customerSystem\src\views\basicInformation\organization\preview.jsx
* @Description: 预览信息
*/
-import React from "react";
+import React, { useState, useEffect } from "react";
import { Row, Col, Space } from 'antd';
-import { person, question, link } from '../../../assets/images'
-import '../index.less';
-import TableView from '../../../components/TableView';
+import * as $$ from '../../../utils/utility';
+import { ApplyDialog, AgentDialog, Respondent, Company } from './component/previewTable'
+import FileTable from "../matterDetail/FileTable";
+import { link } from '@/assets/images';
+import PreviewImage from '@/components/PreviewImage';
+const Preview = (props) => {
+ const [data, setData] = useState({});
+ const levelColorMap = {
+ 1: '#F53F3F',
+ 2: '#EF6C24',
+ 3: '#00B42A',
+ }
+ useEffect(() => {
+ console.log(props.data);
+ const applyData = props.data?.fakeData?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "自然人");
+ const agentData = props.data?.fakeData?.filter(item => item.perTypeName === "申请方代理人");
+ const company = props.data?.fakeData?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "非法人组织");
+ const respondentData = props.data?.fakeData?.filter(item => item.perTypeName === "申请方当事人" && item.perClassName === "法人");
-const Preview = () => {
+ const applyData1 = props.data?.fakeData?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "自然人");
+ const agentData1 = props.data?.fakeData?.filter(item => item.perTypeName === "被申请方代理人");
+ const company1 = props.data?.fakeData?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "非法人组织");
+ const respondentData1 = props.data?.fakeData?.filter(item => item.perTypeName === "被申请方当事人" && item.perClassName === "法人");
- const fakeColumns = [
- {
- title: '序号',
- dataIndex: 'caseNo',
- key: 'caseNo',
- },
- {
- title: '材料类型',
- dataIndex: 'judicNo',
- key: 'judicNo',
- },
- {
- title: '材料数量',
- dataIndex: 'perClassName',
- key: 'perClassName',
- },
- {
- title: '材料名称',
- dataIndex: 'perClassName',
- key: 'perClassName',
- },
- {
- title: '上传时间',
- dataIndex: 'perClassName',
- key: 'perClassName',
- },
- {
- title: '操作',
- dataIndex: 'perClassName',
- key: 'perClassName',
- render: (text) => (
- <div style={{ display: 'flex', color: '#1A6FB8', gap: '16px' }}>
- <div>查看</div>
- <div>删除</div>
- <div>下载</div>
- <div>上传</div>
+ setData({
+ applyData,
+ agentData,
+ company,
+ respondentData,
+ applyData1,
+ agentData1,
+ company1,
+ respondentData1
+ })
+ }, [props.data])
+
+ return (
+ <div style={{ ...props.style }}>
+ <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
+ <Space size='small'>
+ <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>当事人信息</h4>
+ </Space>
+ </Col>
+ <div style={{ marginBottom: '8px' }}>申请方</div>
+ <div className="line-container" style={{ marginBottom: '20px' }}>
+ <div className="line left-line"></div>
+ <div className="line middle-line"></div>
+ <div className="line right-line"></div>
+ </div>
+ {/* ApplyDialog 只有在 applyData 存在且不为空时才渲染 */}
+ {data.applyData && data.applyData.length > 0 ? (
+ <ApplyDialog applyDialog={data.applyData} />
+ ) : null}
+
+ {/* AgentDialog 只有在 agentData 存在且不为空时才渲染 */}
+ {data.agentData && data.agentData.length > 0 ? (
+ <AgentDialog agentDialog={data.agentData} />
+ ) : null}
+
+ {/* Respondent 只有在 respondentData 存在且不为空时才渲染 */}
+ {data.respondentData && data.respondentData.length > 0 ? (
+ <Respondent respondent={data.respondentData} />
+ ) : null}
+
+ {data.company && data.company.length > 0 ? (
+ <Company company={data.company} />
+ ) : null}
+
+ <div style={{ marginBottom: '8px' }}>被申请方</div>
+ <div className="line-container" style={{ marginBottom: '20px' }}>
+ <div className="line left-line"></div>
+ <div className="line middle-line"></div>
+ <div className="line right-line"></div>
+ </div>
+ {data.applyData1 && data.applyData1.length > 0 ? (
+ <ApplyDialog applyDialog={data.applyData1} />
+ ) : null}
+
+ {data.agentData1 && data.agentData1.length > 0 ? (
+ <AgentDialog agentDialog={data.agentData1} />
+ ) : null}
+
+ {data.respondentData1 && data.respondentData1.length > 0 ? (
+ <Respondent respondent={data.respondentData1} />
+ ) : null}
+
+ {data.company1 && data.company1.length > 0 ? (
+ <Company company={data.company1} />
+ ) : null}
+ <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
+ <Space size='small'>
+ <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>纠纷基本情况</h4>
+ </Space>
+ </Col>
+ <Row gutter={[16, 16]}>
+ {props.isDoc &&
+ <>
+ <Col span={8}>
+ <div><div className="title-text">事项状态</div></div>
+ <div style={{ color: '#1A6FB8' }}>{props.data?.statusName || '-'}</div>
+ </Col>
+ <Col span={16}>
+ <div><div className="title-text">事项编号</div></div>
+ <div>{props.data?.caseRef || '-'}</div>
+ </Col>
+ </>
+ }
+ <Col span={8}>
+ <div className="title">
+ <div className="title-text">事项等级</div>
+ </div>
+ <div style={{ display: 'flex' }}>
+ <div style={{ backgroundColor: levelColorMap[props.data?.caseLevel], marginRight: '4px', borderRadius: '4px' }}>
+ <div style={{ color: '#FFFFFF', padding: '0px 6px' }}>
+ {props.data?.caseLevel || '-'}
+ </div>
+ </div>级
+ </div>
+ </Col>
+ <Col span={8}>
+ <div><div className="title-text">事项来源</div></div>
+ <div>自行排查</div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">来访形式</div></div>
+ <div>排查</div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">纠纷类型</div></div>
+ <div>
+ {props.data?.caseTypeFirstName ?
+ `${props.data.caseTypeFirstName}/${props.data.caseTypeName}`
+ : '-'
+ }
+ </div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">纠纷发生时间</div></div>
+ <div>{props.data?.occurTime || '-'}</div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">纠纷发生地点</div></div>
+ <div>{props.data?.addr || '-'}</div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">问题属地</div></div>
+ <div>
+ {props.data?.queAreaName ? `${props.data.queAreaName}/${props.data.queRoadName}` : '-'
+ }
+ </div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">涉及人数(人)</div></div>
+ <div>{props.data?.peopleNum || '-'}</div>
+ </Col>
+ <Col span={8}>
+ <div ><div className="title-text">涉及金额(元)</div></div>
+ <div>{$$.thousands(props.data?.amount) || '-'}</div>
+ </Col>
+ <Col span={24}>
+ <div className="title"><div className="title-text">事项概况</div></div>
+ <div>{props.data?.caseDes || '-'} </div>
+ </Col>
+ <Col span={24}>
+ <div className="title"><div className="title-text">事项申请</div></div>
+ <div>{props.data?.caseClaim || '-'}</div>
+ </Col>
+ <Col span={16}>
+ <div className="title"><div className="title-text">是否重大矛盾纠纷</div></div>
+ <div>{props.data?.majorStatus === 1 ? '是' : '否'}</div>
+ </Col>
+ </Row>
+ {props.transactResult && <>
+ <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '16px', marginTop: '20px' }}>
+ <Space size='small'>
+ <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>办理结果</h4>
+ </Space>
+ </Col>
+ <table border="1" align="center" cellpadding="8" className="table" >
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">化解结果</th>
+ <td width='380'>{props.transactResult.mediResultName || '-'}</td>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">经办人</th>
+ <td width='380'>{props.transactResult.mediator || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title">承办部门</th>
+ <td>{props.transactResult.mediateUnitName || '-'}</td>
+ <th bgcolor="#F7F8FA" className="table-title">配合部门</th>
+ <td>{props.transactResult.applyAssistUnitName || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">受理时间</th>
+ <td width='380'>{$$.minuteFormat(props.transactResult?.acceptTime) || '-'}</td>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">办结时间</th>
+ <td width='380'>{$$.minuteFormat(props.transactResult?.closeTime) || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">办理意见</th>
+ <td width='380' colspan='3'>{props.transactResult?.windupContent || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">协议要点</th>
+ <td width='380' colspan='3'>{props.transactResult?.agreeContent || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">结案意见</th>
+ <td width='380' colspan='3'>{props.transactResult?.windupContent || '-'}</td>
+ </tr>
+ <tr>
+ <th bgcolor="#F7F8FA" className="table-title" width="120">协议文书</th>
+ <td colspan='3'>
+ {props.transactResult?.fileInfoBaseDTOList?.map((item, index) => {
+ console.log(item);
+ return <div style={{ display: 'inline-block' }}>
+ <PreviewImage name={item.name} src={item.showUrl} />
+ {index !== props.transactResult?.fileInfoBaseDTOList.length - 1 && <>,</>}
</div>
- )
- },
- // 更多列配置...
- ];
-
- const fakeData1 = [
- {
- id: 1,
- caseNo: 'A20230101',
- judicNo: 'J20230101',
- perClassName: '自然人',
- inputUserName: '张三',
- mediateUserName: '李四',
- judgeName: '王五',
- mediator: '赵六',
- handlerUserName: '钱七',
- returnUserName: '孙八',
- expireTime: '2023-08-10T08:00:00.000Z',
- processName: '进行中',
- otherMediator: '周九',
- canalName: '网络',
- judicResult: '通过',
- assistName: '吴十',
- mediTypeName: '民事调解',
- serieStatus: '1', // 1 表示非系列案,2 表示系列案
- // 更多字段...
- },
- // 更多数据...
- ];
-
-
-
- return (
- <div style={{ backgroundColor: '#ffff', margin: '8px 16px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 211px)', overflowY: 'scroll' }}>
- <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '4px' }}>
- <Space size='small'>
- <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>当事人信息</h5>
- </Space>
- </Col>
- <div style={{ marginBottom: '8px' }}>申请方</div>
- <div className="line-container" style={{ marginBottom: '20px' }}>
- <div className="line left-line"></div>
- <div className="line middle-line"></div>
- <div className="line right-line"></div>
- </div>
- <table border="1" align="center" cellpadding="8" className="table">
- <tr>
- <th bgcolor="#F7F8FA" className="table-title" width="120">姓名</th>
- <td width='380'><div style={{ display: 'flex' }}><div>李晓明</div><div className="title-personRemark">自然人</div></div></td>
- <th bgcolor="#F7F8FA" className="table-title" width="120">联系方式</th>
- <td width='380'>19</td>
- <th bgcolor="#F7F8FA" className="table-title" width='140'>性别</th>
- <td>汉</td>
- <td rowspan="4" width="112" height='147' style={{ padding: '0px' }}>
- <img border="0" src={person} alt="" style={{ width: '100%', height: '100%' }} />
- </td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">证件类型</th>
- <td>19970000</td>
- <th bgcolor="#F7F8FA" className="table-title">证件号码</th>
- <td>团员</td>
- <th bgcolor="#F7F8FA" className="table-title">民族</th>
- <td>本科</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">联系地址</th>
- <td>网络工程</td>
- <th bgcolor="#F7F8FA" className="table-title">户籍地址</th>
- <td>淮南师范学院</td>
- <th bgcolor="#F7F8FA" className="table-title" rowspan="2" >是否有个人极端倾向</th>
- <td rowspan="2" >237483</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">工作单位</th>
- <td>玩,拆,装</td>
- <th bgcolor="#F7F8FA" className="table-title">身份证明材料</th>
- <td>
- <a href="your-link-here.html" target="_blank">
- <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
- </a>
- </td>
- </tr>
- </table>
- <table border="1" align="center" cellpadding="8" className="table" style={{ marginTop: '20px', marginBottom: '20px' }}>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title" width="120">姓名</th>
- <td width='380'><div style={{ display: 'flex' }}><div>李巧凤</div><div className="title-personRemark">代理人</div></div></td>
- <th bgcolor="#F7F8FA" className="table-title" width="120">联系方式</th>
- <td width='380'>19</td>
- <th bgcolor="#F7F8FA" className="table-title" width="140">性别</th>
- <td>汉</td>
- <td rowspan="4" width="112" height='147' style={{ padding: '0px' }}>
- <img border="0" src={person} alt="" style={{ width: '100%', height: '100%' }} />
- </td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">证件类型</th>
- <td>19970000</td>
- <th bgcolor="#F7F8FA" className="table-title">证件号码</th>
- <td>团员</td>
- <th bgcolor="#F7F8FA" className="table-title">民族</th>
- <td>本科</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">联系地址</th>
- <td>网络工程</td>
- <th bgcolor="#F7F8FA" className="table-title">户籍地址</th>
- <td>淮南师范学院</td>
- <th bgcolor="#F7F8FA" className="table-title" >是否有个人极端倾向</th>
- <td>237483</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">工作单位</th>
- <td>玩,拆,装</td>
- <th bgcolor="#F7F8FA" className="table-title">委托关系</th>
- <td>皖</td>
- <th bgcolor="#F7F8FA" className="table-title">委托类型</th>
- <td>皖</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">代理对象</th>
- <td>玩,拆,装</td>
- <th bgcolor="#F7F8FA" className="table-title">身份证明材料</th>
- <td>
- <a href="your-link-here.html" target="_blank">
- <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
- </a>
- </td>
- <th bgcolor="#F7F8FA" className="table-title">代理人授权委托书</th>
- <td>
- <a href="your-link-here.html" target="_blank">
- <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
- </a>
- </td>
- </tr>
-
- </table>
- <div style={{ marginBottom: '8px' }}>被申请方</div>
- <div className="line-container" style={{ marginBottom: '20px' }}>
- <div className="line left-line"></div>
- <div className="line middle-line"></div>
- <div className="line right-line"></div>
- </div>
- <table border="1" align="center" cellpadding="8" className="table" style={{ marginTop: '20px', marginBottom: '20px' }}>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title" width="120">企业名称</th>
- <td width='380'><div style={{ display: 'flex' }}><div>广东好又多贸易有限公司</div><div className="title-personRemark">法人</div></div></td>
- <th bgcolor="#F7F8FA" className="table-title" width="120">联系方式</th>
- <td width='380'>19</td>
- <th bgcolor="#F7F8FA" className="table-title" width="120">企业所在地</th>
- <td>汉</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">企业类型</th>
- <td>19970000</td>
- <th bgcolor="#F7F8FA" className="table-title">法定代表人</th>
- <td>团员</td>
- <th bgcolor="#F7F8FA" className="table-title">统一社会信用代码</th>
- <td>本科</td>
- </tr>
- <tr>
- <th bgcolor="#F7F8FA" className="table-title">住所</th>
- <td>网络工程</td>
- <th bgcolor="#F7F8FA" className="table-title">企业登记材料</th>
- <td>
- <a href="your-link-here.html" target="_blank">
- <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
- </a>
- </td>
- <th bgcolor="#F7F8FA" className="table-title" >法定代表人身份证明材料</th>
- <td>
- <a href="your-link-here.html" target="_blank">
- <img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
- </a>
- </td>
- </tr>
- </table>
- <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '4px' }}>
- <Space size='small'>
- <div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h5>纠纷基本情况</h5>
- </Space>
- </Col>
- <Row gutter={[16, 16]}>
- <Col span={8}>
- <div className="title"><div className="title-text">事项等级</div><img src={question} alt="" style={{ width: '14px', height: '14px', marginTop: '4px', marginLeft: '4px' }} /></div>
- <div>3级</div>
- </Col>
- <Col span={8}>
- <div><div className="title-text">来访时间</div></div>
- <div>2024-7-12 10:00</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">来访人数(人)</div></div>
- <div>2</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">纠纷类型</div></div>
- <div>市场监管/金融纠纷</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">纠纷发生时间</div></div>
- <div>2024-7-11</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">纠纷发生地点</div></div>
- <div>广州市天河区中山七路康王柏德来商业城</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">问题属地</div></div>
- <div>广州市/天河区/棠下街道</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">涉及人数(人)</div></div>
- <div>2</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">涉及金额(元)</div></div>
- <div>20,000</div>
- </Col>
- <Col span={8}>
- <div ><div className="title-text">事项来源</div></div>
- <div>大厅来访</div>
- </Col>
- <Col span={16}>
- <div ><div className="title-text">来访形式</div></div>
- <div>来访</div>
- </Col>
- <Col span={24}>
- <div className="title"><div className="title-text">事项概况</div><img src={question} alt="" style={{ width: '14px', height: '14px', marginTop: '4px', marginLeft: '4px' }} /></div>
- <div>张先生与李先生是多年的朋友关系。2023年4月,李先生因生意周转需要向张先生借款人民币20万元,并口头承诺于一年内还清。出于信任,张先生未要求签订书面借条或借款合同。然而,到了2024年4月,李先生并未如约归还借款。张先生多次通过电话、微信等方式催促还款,但李先生先是拖延,后干脆以各种理由拒绝偿还,甚至声称该笔款项属于赠予而非借款,这使得张先生感到十分无奈。 </div>
- </Col>
- <Col span={24}>
- <div className="title"><div className="title-text">事项申请</div><img src={question} alt="" style={{ width: '14px', height: '14px', marginTop: '4px', marginLeft: '4px' }} /></div>
- <div>张先生与李先生是多年的朋友关系。2023年4月,李先生因生意周转需要向张先生借款人民币20万元,并口头承诺于一年内还清。出于信任,张先生未要求签订书面借条或借款合同。然而,到了2024年4月,李先生并未如约归还借款。张先生多次通过电话、微信等方式催促还款,但李先生先是拖延,后干脆以各种理由拒绝偿还,甚至声称该笔款项属于赠予而非借款,这使得张先生感到十分无奈。 </div>
- </Col>
- <Col span={16}>
- <div className="title"><div className="title-text">是否重大矛盾纠纷</div></div>
- <div>否</div>
- </Col>
- </Row>
- <TableView
- columns={fakeColumns}
- dataSource={fakeData1}
- size="small"
- rowKey="id"
- bordered={true}
- style={{ marginBottom: '60px' }}
- />
-
- </div>
- )
+ })}
+ </td>
+ </tr>
+ </table>
+ </>}
+ <Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px', marginTop: '20px' }}>
+ <Space size='small'>
+ <div className='MediationInfo-subTitle' style={{ marginTop: '-7px' }}></div><h4>事件材料</h4>
+ </Space>
+ </Col>
+ <FileTable mainId={props.mainId} fileInfoList={props.data?.fileInfoList} isReview={true} />
+ </div>
+ )
}
export default Preview
\ No newline at end of file
--
Gitblit v1.8.0