傅行帆 5 years ago
parent
commit
6abf5b0589
1 changed files with 53 additions and 2 deletions
  1. 53
    2
      src/pages/funds/financialContact/index.jsx

+ 53
- 2
src/pages/funds/financialContact/index.jsx View File

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, Breadcrumb } from 'antd';
2
+import { Form, Input, Button, Card, Icon, Avatar, Select, message, Table, Divider, Tag, Pagination, Modal, Breadcrumb,Row,Col } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
7
 
7
 
8
 function financialContact(props) {
8
 function financialContact(props) {
9
 
9
 
10
+    const { Meta } = Card;
10
     // const [taNoticeList, setTaNoticeList] = useState([])
11
     // const [taNoticeList, setTaNoticeList] = useState([])
11
     const [data, setData] = useState({})
12
     const [data, setData] = useState({})
13
+    const [visible, setVisible] = useState(false);
14
+    const [currentData, setCurrentData] = useState('');
12
 
15
 
13
     useEffect(() => {
16
     useEffect(() => {
14
         getList({ pageNum: 1, pageSize: 10 });
17
         getList({ pageNum: 1, pageSize: 10 });
87
         });
90
         });
88
     }
91
     }
89
 
92
 
93
+    const openModel =(wxImg)=>{
94
+        console.log(wxImg)
95
+        if(wxImg){
96
+            setVisible(true)
97
+            setCurrentData(wxImg)
98
+        }    
99
+    }
100
+
101
+    const onCancel = () => {
102
+        setVisible(false)
103
+    }
104
+
90
 
105
 
91
     const { getFieldDecorator } = props.form
106
     const { getFieldDecorator } = props.form
92
 
107
 
123
             {/* <div style={{ marginTop: '20px' }}>
138
             {/* <div style={{ marginTop: '20px' }}>
124
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} >导出</Button>
139
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} >导出</Button>
125
             </div> */}
140
             </div> */}
126
-            <Table dataSource={data.records} columns={columns} pagination={false} style={{ marginTop: '20px' }} />
141
+
142
+            <Row>
143
+                {(data.records || []).map((x, index) => (
144
+                <Col key={index} span={6}>
145
+                     <Card
146
+                        style={{ width: 300, marginTop: 16 }}
147
+                        actions={[
148
+                        <span>{"TEL:" + x.phone}</span>,
149
+                        <span onClick={() => openModel(x.wxCardImg)}>加微信</span>,
150
+                        ]}
151
+                    >
152
+                        <Meta
153
+                        style={{ height: 100 }}
154
+                        avatar={<Avatar src={x.avatar ? x.avatar : "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"} />}
155
+                        title={x.contactName}
156
+                        description={x.appellation}
157
+                        />
158
+                    </Card>
159
+                </Col>
160
+                ))}
161
+            </Row>
162
+
127
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
163
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
128
                 <Pagination
164
                 <Pagination
129
                     showQuickJumper
165
                     showQuickJumper
130
                     defaultCurrent={1}
166
                     defaultCurrent={1}
131
                     total={data.total} onChange={e => changePageNum(e)} current={data.current} />
167
                     total={data.total} onChange={e => changePageNum(e)} current={data.current} />
132
             </div>
168
             </div>
169
+
170
+
171
+            <Modal
172
+                title="加我微信"
173
+                width="500px"
174
+                visible={visible}
175
+                onCancel={onCancel}
176
+                footer={[]}
177
+            >
178
+                <div style={{textAlign:'center',display:'inline-grid',width:'100%'}}>
179
+                     <img src={currentData} alt="" style={{margin:'0 auto'}}/>
180
+                <p>扫码加我微信聊</p>
181
+                </div>
182
+               
183
+            </Modal>
133
         </>
184
         </>
134
 
185
 
135
     )
186
     )