/*
|
* @Company: hugeInfo
|
* @Author: ldh
|
* @Date: 2022-03-08 10:53:04
|
* @LastEditTime: 2022-12-08 17:46:35
|
* @LastEditors: ldh
|
* @Version: 1.0.0
|
* @Description: 当事人查看
|
*/
|
import React from 'react';
|
import PropTypes from 'prop-types';
|
import {
|
PhoneFilled,
|
EnvironmentOutlined,
|
IdcardOutlined,
|
ContainerOutlined,
|
PictureOutlined,
|
UserOutlined,
|
BankOutlined,
|
TeamOutlined,
|
FileTextOutlined,
|
} from '@ant-design/icons';
|
import './index.less';
|
import FilesTable from '../FilesTable';
|
|
/**
|
* data, // 数据
|
*/
|
const PartyCheck = ({ data = { agent: {} } }) => {
|
const agent = data.agent ? data.agent : {};
|
|
// 自然人,法人,非法人组织填写内容
|
const partyType = (type) => {
|
if (type === '09_01001-1') {
|
return [
|
{ label: '联系电话', value: data.mobile, icon: <PhoneFilled style={{ transform: 'rotate(90deg)' }} /> },
|
{
|
label: '证件信息',
|
value: (
|
<>
|
<span>{data.certiTypeName || '-'}</span>
|
<span className="public-rightBorder">{data.certiNo || '-'}</span>
|
</>
|
),
|
icon: <IdcardOutlined />,
|
},
|
{ label: '现住址', value: data.addr || '-', icon: <EnvironmentOutlined /> },
|
{
|
label: '其他信息',
|
value: (
|
<>
|
<span>{data.sexName || '未知性别'}</span>
|
<span className="public-rightBorder">{data.age || '未知年龄'}</span>
|
<span className="public-rightBorder">{data.nationName || '未知民族'}</span>
|
<span className="public-rightBorder">{data.jobName || '未知职业'}</span>
|
</>
|
),
|
icon: <ContainerOutlined />,
|
},
|
{
|
label: '身份证明材料',
|
value: data.fileInfoList?.filter((item) => item.ownerType === '22_00018-202')[0]?.fileList || [],
|
icon: <PictureOutlined />,
|
type: 'file',
|
},
|
{ label: '代理人', value: data.agentStatus === '1' ? '该当事人无代理人信息' : true, icon: <UserOutlined />, type: 'agent' },
|
];
|
} else {
|
let str = type === '09_01001-2' ? ['法人', '法定代表人', '企业'] : ['机构代表人', '机构代表人', '机构'];
|
return [
|
{ label: str[0], value: data.deputy, icon: <IdcardOutlined /> },
|
{ label: str[0] + '联系电话', value: data.mobile, icon: <PhoneFilled style={{ transform: 'rotate(90deg)' }} /> },
|
{
|
label: str[0] + '证件信息',
|
value: (
|
<>
|
<span>{data.certiTypeName || '-'}</span>
|
<span className="public-rightBorder">{data.certiNo || '-'}</span>
|
</>
|
),
|
icon: <IdcardOutlined />,
|
},
|
{ label: '组织机构代码/统一社会信用代码', value: data.orgaCode || '-', icon: <ContainerOutlined /> },
|
{ label: '经营住址', value: data.addr || '-', icon: <EnvironmentOutlined /> },
|
{
|
label: str[1] + '身份证明材料',
|
value: data.fileInfoList?.filter((item) => item.ownerType === '22_00018-204')[0]?.fileList || [],
|
icon: <PictureOutlined />,
|
type: 'file',
|
},
|
{
|
label: str[2] + '登记材料',
|
value: data.fileInfoList?.filter((item) => item.ownerType === '22_00018-204')[0]?.fileList || [],
|
icon: <BankOutlined />,
|
type: 'file',
|
},
|
{ label: '代理人', value: data.agentStatus === '1' ? '该当事人无代理人信息' : true, icon: <UserOutlined />, type: 'agent' },
|
];
|
}
|
};
|
|
const agentType = () => {
|
return [
|
{
|
label: '基本信息',
|
value: (
|
<>
|
<span>{agent.trueName || '-'}</span>
|
<span className="public-rightBorder">{agent.sexName || '-'}</span>
|
</>
|
),
|
icon: <UserOutlined />,
|
},
|
{ label: '联系电话', value: agent.mobile || '-', icon: <PhoneFilled style={{ transform: 'rotate(90deg)' }} /> },
|
{
|
label: '委托关系',
|
value: (
|
<>
|
<span>{agent.perClassName || '-'}</span>
|
<span className="public-rightBorder">{agent.agentTypeName || '-'}</span>
|
</>
|
),
|
icon: <TeamOutlined />,
|
},
|
{
|
label: '证件信息',
|
value: (
|
<>
|
<span>{agent.certiTypeName || '-'}</span>
|
<span className="public-rightBorder">{agent.certiNo || '-'}</span>
|
</>
|
),
|
icon: <IdcardOutlined />,
|
},
|
{ label: '现住址', value: agent.addr || '-', icon: <EnvironmentOutlined /> },
|
{
|
label: '身份证明材料',
|
value: agent?.fileInfoList?.filter((item) => item.ownerType === '22_00018-205')[0]?.fileList || [],
|
icon: <PictureOutlined />,
|
type: 'file',
|
},
|
{
|
label: '代理人授权委托书',
|
value: agent?.fileInfoList?.filter((item) => item.ownerType === '22_00018-207')[0]?.fileList || [],
|
icon: <FileTextOutlined />,
|
type: 'file',
|
},
|
];
|
};
|
|
return (
|
<div className="partyCheck">
|
<div className="partyCheck-header">
|
<div className={`partyCheck-header-avatar partyCheck-header-avatar-${data.perType === '15_020008-1' ? 'blue' : 'orange'}`}>
|
{data.trueName?.substr(0, 1)}
|
</div>
|
<div className="partyCheck-header-name">{data.trueName || '-'}</div>
|
<div className="partyCheck-header-type">{data.perClassName || '-'}</div>
|
</div>
|
{partyType(data.perClass).map((x, t) => (
|
<div className="partyCheck-item" key={t}>
|
<div className="partyCheck-item-tag">{x.icon}</div>
|
<div className="partyCheck-item-content">
|
<h5>{x.label}</h5>
|
{x.type === 'file' ? (
|
<FilesTable isList={true} isCheck={true} data={x.value} />
|
) : x.type === 'agent' && x.value === true ? (
|
agentType().map((item, index) => (
|
<div className="partyCheck-agentItem" key={index}>
|
<div>{item.icon}</div>
|
<div className="partyCheck-item-content">
|
<h5>{item.label}</h5>
|
{item.type === 'file' ? <FilesTable isList={true} isCheck={true} data={item.value} /> : <div>{item.value}</div>}
|
</div>
|
</div>
|
))
|
) : (
|
<div>{x.value}</div>
|
)}
|
</div>
|
</div>
|
))}
|
</div>
|
);
|
};
|
|
PartyCheck.propTypes = {
|
data: PropTypes.object,
|
};
|
|
export default PartyCheck;
|