|
@@ -1,53 +1,70 @@
|
1
|
|
-import { getBrokerDetails } from '@/services/apis';
|
2
|
1
|
import { useEffect, useRef } from 'react';
|
3
|
2
|
import React from 'react';
|
4
|
|
-import { Avatar, Row, Col } from 'antd';
|
|
3
|
+import { Modal, Descriptions, Typography, Table } from 'antd';
|
5
|
4
|
import apis from '@/services/apis';
|
6
|
5
|
import request from '@/utils/request';
|
7
|
6
|
|
8
|
|
-function agentDeal (props) {
|
9
|
|
- const { detail, personId } = props;
|
|
7
|
+const { Title, Paragraph, Text } = Typography;
|
10
|
8
|
|
11
|
|
- useEffect(() => {
|
12
|
|
- request({
|
13
|
|
- ...apis.broker.getBrokerDetails, params: { personId: detail.personId }
|
14
|
|
- }).then((res) => {
|
15
|
|
- console.log('res', res)
|
16
|
|
- });
|
17
|
|
- });
|
|
9
|
+function agentDeal (props) {
|
|
10
|
+ const { detail, open, onCancel } = props;
|
|
11
|
+ const { personId } = detail || {}
|
18
|
12
|
|
|
13
|
+ const [cardList, setCardList] = React.useState([]);
|
19
|
14
|
|
20
|
|
- const list = [
|
21
|
|
- {
|
22
|
|
- title: '姓名',
|
23
|
|
- render: detail.name,
|
24
|
|
- },
|
|
15
|
+ const columns = [
|
25
|
16
|
{
|
26
|
|
- title: '手机号',
|
27
|
|
- render: detail.phone,
|
|
17
|
+ title: '开户行',
|
|
18
|
+ dataIndex: 'bankName',
|
|
19
|
+ key: 'bankName',
|
|
20
|
+ render: t => <Text copyable>{t || '-'}</Text>
|
28
|
21
|
},
|
29
|
22
|
{
|
30
|
|
- title: '身份证号',
|
31
|
|
- render: detail.idNo,
|
|
23
|
+ title: '卡号',
|
|
24
|
+ dataIndex: 'cardNo',
|
|
25
|
+ key: 'cardNo',
|
|
26
|
+ render: t => <Text copyable>{t || '-'}</Text>
|
32
|
27
|
},
|
33
|
|
- {
|
34
|
|
- title: '银行卡号',
|
35
|
|
- // render: detail.personId,
|
36
|
|
- },
|
37
|
|
- ];
|
|
28
|
+ ]
|
|
29
|
+
|
|
30
|
+ useEffect(() => {
|
|
31
|
+ if (personId) {
|
|
32
|
+ request({
|
|
33
|
+ ...apis.broker.getBrokerDetails,
|
|
34
|
+ params: { personId, pageSize: 100 }
|
|
35
|
+ }).then((res) => {
|
|
36
|
+ setCardList(res.records || []);
|
|
37
|
+ });
|
|
38
|
+ }
|
|
39
|
+ }, [personId]);
|
|
40
|
+
|
38
|
41
|
return (
|
39
|
|
- <>
|
40
|
|
- <Row>
|
41
|
|
- {list.map((x, index) => {
|
42
|
|
- return (
|
43
|
|
- <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
|
44
|
|
- <Col span={7}>{x.title}:</Col>
|
45
|
|
- <Col span={17}>{x.render || '--'}</Col>
|
46
|
|
- </div>
|
47
|
|
- );
|
48
|
|
- })}
|
49
|
|
- </Row>
|
50
|
|
- </>
|
|
42
|
+ <Modal
|
|
43
|
+ width={800}
|
|
44
|
+ visible={open}
|
|
45
|
+ title={detail.name || detail.nickname || '详情'}
|
|
46
|
+ onCancel={onCancel}
|
|
47
|
+ onOk={onCancel}
|
|
48
|
+ footer={null}
|
|
49
|
+ >
|
|
50
|
+ <Paragraph>
|
|
51
|
+ <h4 style={{ fontSize: '16px', marginBottom: '1em' }}>基础信息</h4>
|
|
52
|
+ <Descriptions column={3}>
|
|
53
|
+ <Descriptions.Item label="姓 名"><Text copyable>{detail.name || detail.nickname || '-'}</Text></Descriptions.Item>
|
|
54
|
+ <Descriptions.Item label="手 机"><Text copyable>{detail.phone || '-'}</Text></Descriptions.Item>
|
|
55
|
+ <Descriptions.Item label="身份证"><Text copyable>{detail.idNo || '-'}</Text></Descriptions.Item>
|
|
56
|
+ </Descriptions>
|
|
57
|
+ </Paragraph>
|
|
58
|
+ <Paragraph style={{ marginTop: '4em' }}>
|
|
59
|
+ <h4 style={{ fontSize: '16px', marginBottom: '1em' }}>银行卡信息</h4>
|
|
60
|
+ <Table
|
|
61
|
+ columns={columns}
|
|
62
|
+ dataSource={cardList}
|
|
63
|
+ rowKey="cardId"
|
|
64
|
+ pagination={false}
|
|
65
|
+ />
|
|
66
|
+ </Paragraph>
|
|
67
|
+ </Modal>
|
51
|
68
|
);
|
52
|
69
|
}
|
53
|
70
|
|