广州市综治平台前端
xusd
2025-06-07 ee685c9f350ec9241107d4e8a05799768a0bce9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/*
 * @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;