From ca6f90dcc968c4dd83e0664aaab0ea724b7892a4 Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Fri, 30 Aug 2024 14:34:12 +0800
Subject: [PATCH] feat: 查看当事人详情
---
gz-customerSystem/src/views/register/index.less | 14 +-
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx | 6 +
gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx | 11 +
gz-customerSystem/src/views/register/visit/preview.jsx | 4
gz-customerSystem/src/views/register/visit/component/detailDialog.jsx | 224 +++++++++++++++++++++++++++-----------------
gz-customerSystem/src/api/appUrl.js | 5
gz-customerSystem/src/views/register/visit/index.jsx | 21 +++
7 files changed, 181 insertions(+), 104 deletions(-)
diff --git a/gz-customerSystem/src/api/appUrl.js b/gz-customerSystem/src/api/appUrl.js
index 170b127..d07e8ae 100644
--- a/gz-customerSystem/src/api/appUrl.js
+++ b/gz-customerSystem/src/api/appUrl.js
@@ -10,11 +10,11 @@
export const debug = {
// web服务
// baseUrl: 'http://gz.hugeinfo.com.cn',
- baseUrl: 'http://192.168.3.108:9002',
+ baseUrl: 'http://tj4jd4.natappfree.cc',
// baseUrl: 'http://mdqgnh.natappfree.cc',
// 附件服务
- fileUrl: 'http://192.168.3.108:9002',
+ fileUrl: 'http://tj4jd4.natappfree.cc',
// fileUrl: 'http://gz.hugeinfo.com.cn',
@@ -33,6 +33,7 @@
oper: 'dyh-oper', // dyh-oper
sys: 'dyh-sys', // dyh-sys
disp: 'dyh-disp', //dyh-disp
+ utils: 'dyh-utils'
};
// 正式版
diff --git a/gz-customerSystem/src/views/register/index.less b/gz-customerSystem/src/views/register/index.less
index 4c73c7e..cd7a886 100644
--- a/gz-customerSystem/src/views/register/index.less
+++ b/gz-customerSystem/src/views/register/index.less
@@ -131,14 +131,14 @@
margin-bottom: 8px;
padding-left: 8px;
}
+}
- .dialogTag {
- line-height: 22px;
- padding: 0 8px;
- border-radius: 4px;
- margin-top: 4px;
- color: #fff;
- }
+.dialogTag {
+ line-height: 22px;
+ padding: 0 8px;
+ border-radius: 4px;
+ margin-top: 4px;
+ color: #fff;
}
.visitTableClass {
diff --git a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
index 1a2c4f0..5d4197d 100644
--- a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -275,6 +275,12 @@
label: <span>{x.trueName} <span style={{ color: '#86909c' }}>({x.perTypeName})</span></span>,
value: x.id,
}))}
+ onChange={(value) => {
+ if (value) {
+ const personList = visitList.filter(item => value.indexOf(item.id) != -1).map(item => item.trueName)
+ formRef.current.setFieldValue('personNameList', personList)
+ }
+ }}
>
</CheckboxGroup>
</FormItem>
diff --git a/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx b/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
index cd9a8b9..7810b96 100644
--- a/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/detailDialog.jsx
@@ -1,4 +1,4 @@
-import React, { useState } from 'react'
+import React, { useEffect, useState } from 'react'
import KeyVisits from "./keyVisits";
import { link } from '@/assets/images'
@@ -7,63 +7,72 @@
[
{
label: '姓名',
- perClass: '自然人',
- width: '120',
- value: '李晓明',
+ perClass: '',
+ value: '',
isName: true,//判断是否是姓名标签
+ field: 'trueName',
},
{
label: '联系方式',
- width: '120',
- value: '13380313411',
+ value: '',
+ field: 'mobile',
},
],
[
{
label: '证件类型',
- value: '居民身份证',
+ value: '',
+ field: 'certiTypeName',
},
{
label: '证件号码',
- value: '440981199999999999',
+ value: '',
+ field: 'certiNo',
},
],
[
{
label: '联系地址',
- value: '居民身份证',
+ value: '',
+ field: 'addr',
},
{
label: '户籍地址',
- value: '广州市天河区棠下街20号',
+ value: '',
+ field: 'placeAddr',
},
],
[
{
label: '工作单位',
- value: '好又多',
+ value: '',
+ field: 'workUnit',
},
{
label: '民族',
- value: '汉',
+ value: '',
+ field: 'nationName',
},
],
[
{
label: '性别',
- value: '男',
+ value: '',
+ field: 'sexName',
},
{
label: '是否有个人极端倾向',
- value: '否',
+ value: '',
+ field: 'extreme',
},
],
[
{
- label: '身份证新材料',
+ label: '身份证明材料',
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />李晓明身份证明材料.pdf
</a>,
+ isFile: true
},
],
]
@@ -71,41 +80,46 @@
[
{
label: '企业名称',
- perClass: '法人',
- width: '120',
- value: '李晓明',
+ perClass: '',
+ value: '',
isName: true,//判断是否是姓名标签
+ field: 'trueName',
},
{
label: '联系方式',
- width: '120',
- value: '13380313411',
+ value: '',
+ field: 'mobile',
},
],
[
{
label: '企业所在地',
- value: '广州市天河区棠下街120号',
+ value: '',
+ field: 'addr',
},
{
label: '统一社会信用代码',
- value: '440981199999999999',
+ value: '',
+ field: 'orgaCode',
},
],
[
{
label: '法定代表人',
- value: '蒋照月',
+ value: '',
+ field: 'deputy',
},
{
label: '企业类型',
- value: '餐饮服务',
+ value: '',
+ field: 'orgaTypeName',
},
],
[
{
label: '住所',
- value: '广州市天河区棠下街120号',
+ value: '',
+ field: 'placeAddr',
},
],
[
@@ -114,12 +128,14 @@
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
</a>,
+ isFile: true
},
{
label: '法定代表人身份证明材料',
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />江照月个人身份.pdf
</a>,
+ isFile: true
},
],
]
@@ -127,41 +143,46 @@
[
{
label: '机构名称',
- perClass: '非法人组织',
- width: '120',
- value: '李晓明',
+ perClass: '',
+ value: '',
isName: true,//判断是否是姓名标签
+ field: 'trueName',
},
{
label: '联系方式',
- width: '120',
- value: '13380313411',
+ value: '',
+ field: 'mobile',
},
],
[
{
label: '机构所在地',
- value: '广州市天河区棠下街120号',
+ value: '',
+ field: 'addr',
},
{
label: '机构组织代码',
- value: '440981199999999999',
+ value: '',
+ field: 'orgaCode',
},
],
[
{
label: '机构代表人',
- value: '蒋照月',
+ value: '',
+ field: 'deputy',
},
{
label: '机构类型',
- value: '餐饮服务',
+ value: '',
+ field: 'orgaTypeName',
},
],
[
{
label: '住所',
- value: '广州市天河区棠下街120号',
+ value: '',
+ field: 'placeAddr',
},
],
[
@@ -170,12 +191,14 @@
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
</a>,
+ isFile: true
},
{
label: '机构代表人身份证明材料',
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />江照月个人身份.pdf
</a>,
+ isFile: true
},
],
]
@@ -183,71 +206,82 @@
[
{
label: '姓名',
- perClass: '代理人',
- width: '120',
- value: '李晓明',
+ perClass: '',
+ value: '',
isName: true,//判断是否是姓名标签
+ field: 'trueName',
},
{
label: '联系方式',
- width: '120',
- value: '13380313411',
+ value: '',
+ field: 'mobile',
},
],
[
{
label: '证件类型',
- value: '居民身份证',
+ value: '',
+ field: 'certiTypeName',
},
{
label: '证件号码',
- value: '440981199999999999',
+ value: '',
+ field: 'certiNo',
},
],
[
{
label: '联系地址',
- value: '居民身份证',
+ value: '',
+ field: 'addr',
},
{
label: '户籍地址',
- value: '广州市天河区棠下街20号',
+ value: '',
+ field: 'placeAddr',
},
],
[
{
label: '工作单位',
- value: '好又多',
+ value: '',
+ field: 'workUnit',
},
{
label: '民族',
- value: '汉',
+ value: '',
+ field: 'nationName',
},
],
[
{
label: '性别',
- value: '男',
+ value: '',
+ field: 'sexName',
},
{
label: '是否有个人极端倾向',
- value: '否',
+ value: '',
+ field: 'extreme',
},
],
[
{
label: '委托关系',
- value: '亲属',
+ value: '',
+ field: 'agentRelateName',
},
{
label: '委托类型',
- value: '一般授权代理',
+ value: '',
+ field: 'agentTypeName',
},
],
[
{
label: '代理对象',
- value: '广东好又多贸易公司',
+ value: '',
+ field: 'personList',
},
],
[
@@ -256,29 +290,76 @@
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />广东好又多餐饮有限公司营业执照.pdf
</a>,
+ isFile: true,
},
{
label: '代理人授权委托书',
value: <a href="your-link-here.html" target="_blank">
<img src={link} alt="" className="title-file" />江照月个人身份.pdf
</a>,
+ isFile: true,
},
],
]
- const tableList = agentList
+
+ const [tableList, setTableList] = useState([])
+
+ useEffect(() => {
+ console.log(props.editData);
+ const data = props.editData
+ let newList
+ let mapList = []
+ if (data.perClass === "09_01001-1") {
+ //自然人
+ mapList = nuturalList
+ }
+ if (data.perClass === "09_01001-2") {
+ //法人组织
+ mapList = legalList
+ }
+ if (data.perClass === "09_01001-3") {
+ //非法人组织
+ mapList = organizationList
+ }
+ if (data.perType === "24_00006-1" || data.perType === "24_00006-1") {
+ //代理人
+ mapList = agentList
+ }
+ newList = mapList.map(item => {
+ return item.map(res => {
+ if (res.isFile) {
+ return res
+ }
+ if (res.isName) {
+ return {
+ ...res,
+ value: data[res.field],
+ perClass: data.perClassName || data.perTypeName
+ }
+ } else {
+ return {
+ ...res,
+ value: res.field === 'personList' ? data[res.field].join(',') : data[res.field]
+ }
+ }
+ })
+ })
+
+ setTableList(newList)
+ }, [])
return (
- <div style={{maxHeight: '590px', overflowY: 'scroll'}}>
- <table border="1" align="center" cellpadding="8" className="table" style={{marginBottom: '20px'}}>
+ <div style={{ maxHeight: '590px', overflowY: 'scroll' }}>
+ <table border="1" align="center" cellpadding="8" className="table" style={{ marginBottom: '20px' }}>
{
tableList?.map((item, index) => {
return <tr key={index}>
{
item?.map(res => {
return <>
- <th bgcolor="#F7F8FA" className="table-title" width={res.width ? res.width : ''}>{res.label}</th>
- <td width='380'>
- <div style={{ display: 'flex' }}>
+ <th bgcolor="#F7F8FA" className="table-title" width='120'>{res.label}</th>
+ <td width={380}>
+ <div style={{ display: 'flex', minHeight: '22px' }}>
<div>{res.value}</div>
{res.isName && <div className="title-personRemark">{res.perClass}</div>}
</div>
@@ -289,35 +370,6 @@
</tr>
})
}
- {/* <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>
- </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>
- </tr> */}
</table>
{/* 重复来访重点人员 */}
<div style={{ width: 'calc(100% - 9px)', background: '#f2f3f5', marginBottom: '20px', padding: '12px' }}>
diff --git a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
index 57329ba..4954c9e 100644
--- a/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/visitorRegister.jsx
@@ -302,6 +302,7 @@
//查看
const handleCheckParty = (value) => {
setDialogType(value.perType)
+ setEditData(value)
setDetailVisabled(true)
}
@@ -367,8 +368,7 @@
return (
- <div className='dataSync-page'>
-
+ <div className='dataSync-page' style={{ ...props.style }}>
<Col span={24} style={{ display: 'flex', alignItems: 'center' }}>
<Space size='small'>
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px', }}></div><h4>当事人信息</h4>
@@ -765,14 +765,17 @@
title={'查看' + peopleMap[dialogType]}
visible={detailVisabled}
onOk={() => setDetailVisabled(false)}
- onCancel={() => setDetailVisabled(false)}
+ onCancel={() => {
+ setDetailVisabled(false)
+ setEditData(null)
+ }}
autoFocus={false}
focusLock={true}
footer={null}
unmountOnExit={true}
maskClosable={false}
>
- <DetailDialog />
+ <DetailDialog editData={editData} />
</Modal>
<Modal
style={{ width: '1200px' }}
diff --git a/gz-customerSystem/src/views/register/visit/index.jsx b/gz-customerSystem/src/views/register/visit/index.jsx
index 371c7df..869ad11 100644
--- a/gz-customerSystem/src/views/register/visit/index.jsx
+++ b/gz-customerSystem/src/views/register/visit/index.jsx
@@ -95,7 +95,14 @@
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"),
+ agentList: fakeData?.filter(item => item.perType === "24_00006-1" || item.perType === "24_00006-2").map(item => {
+ //personNameList用于查看详情显示代理人名字,不需要上传,去除
+ const { personNameList, ...rest } = item
+ return {
+ ...rest,
+ personId: item.personId.join(',')
+ }
+ }),
}
} else {
const res = await getId()
@@ -103,7 +110,14 @@
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"),
+ agentList: fakeData?.filter(item => item.perType === "24_00006-1" || item.perType === "24_00006-2").map(item => {
+ //personNameList用于查看详情显示代理人名字,不需要上传,去除
+ const { personNameList, ...rest } = item
+ return {
+ ...rest,
+ personId: item.personId.join(',')
+ }
+ }),
id: res.data
}
}
@@ -164,7 +178,8 @@
<Step title='结案归档' disabled />
</Steps>
</div>
- {isReview ? <Preview /> : <VisitorRegister formRef={formRef} />}
+ <Preview style={{ display: isReview ? '' : 'none' }} />
+ <VisitorRegister formRef={formRef} style={{ display: isReview ? 'none' : '' }} />
<div className="dataSync-excel">
<Space size="large" style={{ margin: '4px 14px' }}>
<Button type="primary" style={{ backgroundColor: '#1A6FB8' }} onClick={handleSave} >保存</Button>
diff --git a/gz-customerSystem/src/views/register/visit/preview.jsx b/gz-customerSystem/src/views/register/visit/preview.jsx
index 221e93f..6b201ec 100644
--- a/gz-customerSystem/src/views/register/visit/preview.jsx
+++ b/gz-customerSystem/src/views/register/visit/preview.jsx
@@ -17,7 +17,7 @@
import { EventLevelDrawer, MattersDetail } from './component/levelDetail'
-const Preview = () => {
+const Preview = (props) => {
const [filesCheck, setFilesCheck] = useState(false);
const [apply, setApply] = useState(false);
const [visible, setVisible] = useState(false);
@@ -128,7 +128,7 @@
return (
- <div style={{ backgroundColor: '#ffff', margin: '8px 16px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 211px)', overflowY: 'scroll' }}>
+ <div style={{ backgroundColor: '#ffff', margin: '8px 8px 0px 16px', padding: '12px 18px 16px 16px', height: 'calc(100vh - 228px)', overflowY: 'scroll', ...props.style }}>
<Col span={24} style={{ display: 'flex', alignItems: 'center', marginBottom: '8px' }}>
<Space size='small'>
<div className='MediationInfo-subTitle' style={{ marginTop: '-9px' }}></div><h4>当事人信息</h4>
--
Gitblit v1.8.0