傅行帆 5 gadus atpakaļ
vecāks
revīzija
6abf5b0589
1 mainītis faili ar 53 papildinājumiem un 2 dzēšanām
  1. 53
    2
      src/pages/funds/financialContact/index.jsx

+ 53
- 2
src/pages/funds/financialContact/index.jsx Parādīt failu

@@ -1,5 +1,5 @@
1 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 3
 import router from 'umi/router';
4 4
 import moment from 'moment';
5 5
 import apis from '../../../services/apis';
@@ -7,8 +7,11 @@ import request from '../../../utils/request';
7 7
 
8 8
 function financialContact(props) {
9 9
 
10
+    const { Meta } = Card;
10 11
     // const [taNoticeList, setTaNoticeList] = useState([])
11 12
     const [data, setData] = useState({})
13
+    const [visible, setVisible] = useState(false);
14
+    const [currentData, setCurrentData] = useState('');
12 15
 
13 16
     useEffect(() => {
14 17
         getList({ pageNum: 1, pageSize: 10 });
@@ -87,6 +90,18 @@ function financialContact(props) {
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 106
     const { getFieldDecorator } = props.form
92 107
 
@@ -123,13 +138,49 @@ function financialContact(props) {
123 138
             {/* <div style={{ marginTop: '20px' }}>
124 139
                 <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} >导出</Button>
125 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 163
             <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
128 164
                 <Pagination
129 165
                     showQuickJumper
130 166
                     defaultCurrent={1}
131 167
                     total={data.total} onChange={e => changePageNum(e)} current={data.current} />
132 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
     )