Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

Yansen 5 years ago
parent
commit
ab14b78cf1

+ 5
- 0
config/routes.js View File

@@ -554,6 +554,11 @@ export default [
554 554
                 name: '购买套餐',
555 555
                 component: './system/miniappSetMeal/index',
556 556
               },
557
+              {
558
+                path: '/system/sell/index',
559
+                name: '售前售后联系人',
560
+                component: './system/sell/index',
561
+              },
557 562
               // {
558 563
               //   path: '/system/MiniappTheme',
559 564
               //   name: '小程序主题',

+ 2
- 1
src/pages/activity/drainage/DrainageList.jsx View File

@@ -329,8 +329,9 @@ const header = props => {
329 329
 
330 330
     const { getFieldDecorator } = props.form;
331 331
     {/* <XForm onSubmit={handleSubmit} onCancel={handleCancel} fields={fields} ></XForm> */ }
332
-
332
+ 
333 333
     return <Form {...formItemLayout} onSubmit={handleSubmit}>
334
+      <span style={{ color: '#ef273a' }}>发布后请到资源位管理中关联资源位图,否则客户看不到</span>
334 335
 
335 336
       <Form.Item label="是否投放小程序端" help='选择是后,该活动可投放至小程序的轮播位以及开屏广告'>
336 337
         {getFieldDecorator('isMiniapp', {

+ 2
- 2
src/pages/activity/drainage/components/RedPacket.jsx View File

@@ -111,7 +111,7 @@ function RedPacket(props) {
111 111
                 </Form.Item>
112 112
                 <Form.Item label="单个红包金额范围/元">
113 113
                     {getFieldDecorator('minPacket', {
114
-                        initialValue: data.minPacket / 100 || 3,
114
+                        initialValue: data.minPacket / 100 || 1,
115 115
                         rules: [
116 116
                             { required: true, message: '请设置合适的最小红包值', pattern: new RegExp('^[0-9]{1,5}([.][0-9]{1,2})?$') },
117 117
                         ],
@@ -119,7 +119,7 @@ function RedPacket(props) {
119 119
                         <InputNumber min={1} max={199} />,
120 120
                     )}~
121 121
                      {getFieldDecorator('maxPacket', {
122
-                        initialValue: data.maxPacket / 100 || 3,
122
+                        initialValue: data.maxPacket / 100 || 199,
123 123
                         rules: [
124 124
                             { required: true, message: '请设置合适的最大红包值', pattern: new RegExp('^[0-9]{1,5}([.][0-9]{1,2})?$') },
125 125
                         ],

+ 54
- 3
src/pages/funds/financialContact/index.jsx View File

@@ -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 });
@@ -16,7 +19,7 @@ function financialContact(props) {
16 19
     // 查询列表
17 20
 
18 21
     const getList = params => {
19
-        request({ ...apis.funds.list, params: { ...params } }).then(data => {
22
+        request({ ...apis.funds.list, params: { ...params, contactType: "finance" } }).then(data => {
20 23
             setData(data)
21 24
         })
22 25
     }
@@ -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
     )

+ 6
- 0
src/pages/h5SampleManager/h5Sample/addH5.jsx View File

@@ -145,6 +145,7 @@ const header = props => {
145 145
     return (
146 146
         <>
147 147
             <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
148
+
148 149
                 <Form.Item label="H5活动名称">
149 150
                     {getFieldDecorator('name', {
150 151
                         rules: [
@@ -216,6 +217,11 @@ const header = props => {
216 217
             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
217 218
             <Button onClick={() => router.go(-1)}>取消</Button>
218 219
                 </Form.Item>
220
+                <Row>
221
+                    <Col span={7}></Col>
222
+                    <Col span={17}><span style={{ color: '#ef273a' }}>发布后请到资源位管理中关联资源位图,否则客户看不到</span></Col>
223
+                </Row>
224
+                
219 225
             </Form>
220 226
             <Modal
221 227
                 title="新增成功"

+ 193
- 0
src/pages/system/sell/index.jsx View File

@@ -0,0 +1,193 @@
1
+import React, { useState, useEffect } from 'react';
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';
4
+import moment from 'moment';
5
+import apis from '../../../services/apis';
6
+import request from '../../../utils/request';
7
+
8
+function financialContact(props) {
9
+
10
+    const { Meta } = Card;
11
+    // const [taNoticeList, setTaNoticeList] = useState([])
12
+    const [data, setData] = useState({})
13
+    const [visible, setVisible] = useState(false);
14
+    const [currentData, setCurrentData] = useState('');
15
+
16
+    useEffect(() => {
17
+        getList({ pageNum: 1, pageSize: 10 });
18
+    }, [])
19
+    // 查询列表
20
+
21
+    const getList = params => {
22
+        request({ ...apis.funds.list, params: { ...params,contactType: "sell" } }).then(data => {
23
+            setData(data)
24
+        })
25
+    }
26
+
27
+    function handleSubmit(e) {
28
+        e.preventDefault();
29
+        props.form.validateFields((err, values) => {
30
+            if (!err) {
31
+                // eslint-disable-next-line no-console
32
+                console.log('提交数据: ', values)
33
+                getList({ ...values })
34
+            }
35
+        });
36
+    }
37
+
38
+    function handleReset() {
39
+        props.form.resetFields();
40
+
41
+        getList({ pageNum: 1, pageSize: 10 })
42
+    }
43
+
44
+    const columns = [
45
+        {
46
+            title: '姓名',
47
+            dataIndex: 'contactName',
48
+            key: 'contactName',
49
+            align: 'center',
50
+        },
51
+        {
52
+            title: '性别',
53
+            dataIndex: 'sex',
54
+            key: 'sex',
55
+            align: 'center',
56
+            render: x => <span>{x == 1 ? '男' : x === 2 ? '女' : '未知'}</span >,
57
+        },
58
+        {
59
+            title: '头像',
60
+            dataIndex: 'avatar',
61
+            key: 'avatar',
62
+            align: 'center',
63
+            render: (x, row) => <img src={row.avatar} alt="" width="93px" height="93px"></img >,
64
+        },
65
+        {
66
+            title: '固话',
67
+            dataIndex: 'telephone',
68
+            key: 'telephone',
69
+            align: 'center',
70
+        },
71
+        {
72
+            title: '手机号',
73
+            dataIndex: 'phone',
74
+            key: 'phone',
75
+            align: 'center',
76
+        },
77
+        {
78
+            title: '头衔',
79
+            dataIndex: 'appellation',
80
+            key: 'appellation',
81
+            align: 'center',
82
+        },
83
+    ]
84
+
85
+    const changePageNum = pageNumber => {
86
+        props.form.validateFields((err, values) => {
87
+            if (!err) {
88
+                getList({ pageNum: pageNumber, pageSize: 10, ...values })
89
+            }
90
+        });
91
+    }
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
+
105
+
106
+    const { getFieldDecorator } = props.form
107
+
108
+    return (
109
+
110
+        <>
111
+            <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
112
+                <Form.Item>
113
+                    {getFieldDecorator('contactName')(
114
+                        <Input
115
+                            placeholder="姓名"
116
+                        />,
117
+                    )}
118
+                </Form.Item>
119
+                <Form.Item>
120
+                    {getFieldDecorator('telephone')(
121
+                        <Input
122
+                            placeholder="固话"
123
+                        />,
124
+                    )}
125
+                </Form.Item>
126
+                <Form.Item>
127
+                    {getFieldDecorator('phone')(
128
+                        <Input
129
+                            placeholder="手机号"
130
+                        />,
131
+                    )}
132
+                </Form.Item>
133
+                <Form.Item>
134
+                    <Button type="primary" htmlType="submit"> 搜索</Button>
135
+                    <Button style={{ marginLeft: 8 }} onClick={handleReset}>重置</Button>
136
+                </Form.Item>
137
+            </Form>
138
+            {/* <div style={{ marginTop: '20px' }}>
139
+                <Button type="primary" style={{ float: 'right', marginBottom: '20px', zIndex: 1 }} >导出</Button>
140
+            </div> */}
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
+
163
+            <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
164
+                <Pagination
165
+                    showQuickJumper
166
+                    defaultCurrent={1}
167
+                    total={data.total} onChange={e => changePageNum(e)} current={data.current} />
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>
184
+        </>
185
+
186
+    )
187
+}
188
+
189
+
190
+const WrappedFinancialContact = Form.create({ name: 'financialContact' })(financialContact);
191
+
192
+export default WrappedFinancialContact
193
+