dingxin 5 年前
父节点
当前提交
bb4a90bd4d
共有 37 个文件被更改,包括 2479 次插入88 次删除
  1. 39
    2
      config/config.js
  2. 2
    1
      package.json
  3. 32
    0
      src/components/Wangedit/Wangedit.jsx
  4. 19
    9
      src/components/XForm/ImageUpload.jsx
  5. 6
    1
      src/global.less
  6. 145
    5
      src/pages/activity/editActivity.jsx
  7. 211
    0
      src/pages/customer/customerlist/index.jsx
  8. 69
    0
      src/pages/customer/customerlist/style.css
  9. 72
    0
      src/pages/customer/customerlist/style.less
  10. 69
    0
      src/pages/customer/customerlist/style.wxss
  11. 67
    0
      src/pages/customer/drift/index.jsx
  12. 57
    0
      src/pages/customer/drift/style.less
  13. 166
    0
      src/pages/customer/independentList/index.jsx
  14. 54
    0
      src/pages/customer/independentList/style.css
  15. 57
    0
      src/pages/customer/independentList/style.less
  16. 54
    0
      src/pages/customer/independentList/style.wxss
  17. 201
    0
      src/pages/customer/recommendCustomer/audit.jsx
  18. 191
    0
      src/pages/customer/recommendCustomer/index.jsx
  19. 54
    0
      src/pages/customer/recommendCustomer/style.css
  20. 57
    0
      src/pages/customer/recommendCustomer/style.less
  21. 54
    0
      src/pages/customer/recommendCustomer/style.wxss
  22. 169
    0
      src/pages/customer/report/index.jsx
  23. 54
    0
      src/pages/customer/report/style.css
  24. 57
    0
      src/pages/customer/report/style.less
  25. 54
    0
      src/pages/customer/report/style.wxss
  26. 76
    15
      src/pages/integralMall/editGoods.jsx
  27. 47
    45
      src/pages/integralMall/exchangeRecords.jsx
  28. 210
    0
      src/pages/news/list/NewsList.jsx
  29. 58
    0
      src/pages/news/list/style.less
  30. 1
    1
      src/pages/news/type/NewsType.jsx
  31. 1
    1
      src/pages/style/GoodsList.less
  32. 1
    1
      src/pages/user/login/components/Login/LoginSubmit.jsx
  33. 1
    1
      src/pages/user/login/components/Login/index.jsx
  34. 9
    6
      src/pages/user/login/components/Login/index.less
  35. 42
    0
      src/services/apis.js
  36. 12
    0
      src/services/news.js
  37. 11
    0
      src/utils/upload.js

+ 39
- 2
config/config.js 查看文件

@@ -134,6 +134,43 @@ export default {
134 134
                 },
135 135
               ],
136 136
             },
137
+            {
138
+              path: '/customer',
139
+              name: '客户管理',
140
+              component: '../layouts/BlankLayout',
141
+              routes: [
142
+                {
143
+                  path: '/customer/customerlist/list',
144
+                  name: '客户列表',
145
+                  component: './customer/customerlist/index',
146
+                },
147
+                {
148
+                  path: '/customer/drift/list',
149
+                  name: '游客列表',
150
+                  component: './customer/drift/index',
151
+                },
152
+                {
153
+                  path: '/customer/report/list',
154
+                  name: '报备客户',
155
+                  component: './customer/report/index',
156
+                },
157
+                {
158
+                  path: '/customer/recommendCustomer/list',
159
+                  name: '推荐客户',
160
+                  component: './customer/recommendCustomer/index',
161
+                },
162
+                {
163
+                  path: '/customer/recommendCustomer/audit',
164
+                  name: '', //审核
165
+                  component: './customer/recommendCustomer/audit',
166
+                },
167
+                {
168
+                  path: '/customer/independentList',
169
+                  name: '经济人',
170
+                  component: './customer/independentList/index',
171
+                },
172
+              ],
173
+            },
137 174
             {
138 175
               path: '/integralMall',
139 176
               name: '积分商城',
@@ -232,7 +269,7 @@ export default {
232 269
                 },
233 270
                 {
234 271
                   path: '/activity/SignList',
235
-                  name: '报名列表',
272
+                  name: '',
236 273
                   component: './activity/SignList',
237 274
                 },
238 275
               ],
@@ -296,7 +333,7 @@ export default {
296 333
 
297 334
   proxy: {
298 335
     '/api/': {
299
-      target: 'http://192.168.0.84:8080/',
336
+      target: 'http://localhost:8080/',
300 337
       changeOrigin: true,
301 338
       // pathRewrite: { '^/server': '' },
302 339
     },

+ 2
- 1
package.json 查看文件

@@ -60,7 +60,8 @@
60 60
     "umi": "^2.8.7",
61 61
     "umi-plugin-pro-block": "^1.3.2",
62 62
     "umi-plugin-react": "^1.9.5",
63
-    "umi-request": "^1.0.8"
63
+    "umi-request": "^1.0.8",
64
+    "wangeditor": "^3.1.1"
64 65
   },
65 66
   "devDependencies": {
66 67
     "@ant-design/colors": "^3.1.0",

+ 32
- 0
src/components/Wangedit/Wangedit.jsx 查看文件

@@ -0,0 +1,32 @@
1
+import React from 'react';
2
+import E from 'wangeditor'
3
+
4
+/**
5
+ * @param {*} props
6
+ * @returns
7
+ */
8
+class Wangedit extends React.Component {
9
+  constructor(props, context) {
10
+    super(props, context);
11
+    this.state = {}
12
+  }
13
+
14
+  render() {
15
+    return (
16
+      <div ref="editorElem" style={{ textAlign: 'left' }}>
17
+      </div>
18
+    );
19
+  }
20
+
21
+  componentDidMount() {
22
+    const elem = this.refs.editorElem
23
+    const editor = new E(elem)
24
+    // 使用 onchange 函数监听内容的变化
25
+    editor.customConfig.onchange = this.props.onChange
26
+    editor.create()
27
+    editor.txt.html(this.props.value)
28
+  }
29
+}
30
+
31
+export default Wangedit
32
+

+ 19
- 9
src/components/XForm/ImageUpload.jsx 查看文件

@@ -1,10 +1,14 @@
1 1
 import React from 'react';
2 2
 import { Upload, Icon, message } from 'antd';
3 3
 import './style.less';
4
+import { uploaderProps } from '../../utils/upload';
5
+
6
+
4 7
 
5 8
 class ImageUpload extends React.Component {
6 9
   state = {
7
-    loading: false
10
+    loading: false,
11
+    imageUrl: undefined,
8 12
   };
9 13
 
10 14
   handleChange = info => {
@@ -14,13 +18,19 @@ class ImageUpload extends React.Component {
14 18
     }
15 19
 
16 20
     if (info.file.status === "done") {
17
-      const imageUrl = info.response.url
18
-
19 21
       this.setState({
20
-        loading: false
22
+        loading: false,
21 23
       })
22 24
 
23
-      this.props.onChange(imageUrl)
25
+      if (info.file.response && info.file.response.url) {
26
+        this.setState({
27
+          imageUrl: info.file.response.thumbUrl,
28
+        });
29
+
30
+        if (typeof this.props.onChange === 'function') {
31
+          this.props.onChange(info.file.response.url);
32
+        }
33
+      }
24 34
     }
25 35
   };
26 36
 
@@ -35,16 +45,16 @@ class ImageUpload extends React.Component {
35 45
 
36 46
     return (
37 47
       <Upload
38
-        name="avatar"
39 48
         listType="picture-card"
40 49
         className="avatar-uploader"
41 50
         showUploadList={false}
42
-        action={this.props.action}
43 51
         beforeUpload={this.props.beforeUpload}
44 52
         onChange={this.handleChange}
53
+
54
+        {...uploaderProps}
45 55
       >
46
-        {value ? (
47
-          <img src={value} alt="avatar" style={{ width: "100%" }} />
56
+        {(this.state.imageUrl || value) ? (
57
+          <img src={this.state.imageUrl || value} alt="avatar" style={{ width: "100%" }} />
48 58
         ) : (
49 59
           uploadButton
50 60
         )}

+ 6
- 1
src/global.less 查看文件

@@ -55,7 +55,12 @@ ol {
55 55
   box-shadow: none;
56 56
   border: none;
57 57
 }
58
-
58
+.ant-input-affix-wrapper .ant-input-prefix{
59
+  left:7px;
60
+}
61
+.ant-input-affix-wrapper .ant-input:not(:first-child) {
62
+  padding-left: 40px;
63
+}
59 64
 .ant-pro-global-header-trigger{
60 65
   display: none;
61 66
 }

+ 145
- 5
src/pages/activity/editActivity.jsx 查看文件

@@ -1,8 +1,15 @@
1
-import React, { useState } from 'react';
2
-import { Form, Input, Button, Icon, Select, Tabs, Radio } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker,message } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4 4
 import styles from '../style/GoodsList.less';
5
+import moment from 'moment';
6
+import router from 'umi/router';
7
+import BuildSelect from '../../components/SelectButton/BuildSelect'
8
+import XForm, { FieldTypes } from '../../components/XForm';
9
+import Wangedit from '../../components/Wangedit/Wangedit'
10
+import request from '../../utils/request'
5 11
 
12
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
6 13
 /**
7 14
  *
8 15
  *
@@ -10,12 +17,145 @@ import styles from '../style/GoodsList.less';
10 17
  * @returns
11 18
  */
12 19
  const Edit = (props) => {
13
-  const [ tab, changeTab ] = useState('basic');
20
+  const [ tab, changeTab ] = useState('basic')
14 21
   const dynamicId = props.location.query.dynamicId
15
-  console.log(dynamicId)
22
+  const [ dynamicData, setDynamicData ] = useState({})
23
+  if(dynamicId){
24
+    useEffect(() => {
25
+      getDynamicData(dynamicId);
26
+    },[])
27
+
28
+  // 查询列表
29
+  const getDynamicData = (dynamicId) => {
30
+    request({
31
+        url: '/api/admin/buildingDynamic/Details',
32
+        method: 'GET',
33
+        params: { dynamicId },
34
+    }).then((data) => {
35
+        console.log(data)
36
+        setDynamicData(data)
37
+    })
38
+  }
39
+  }
40
+
41
+  const cancelPage = () =>{
42
+    router.push({
43
+      pathname: '/activity/ActivityList',
44
+    });
45
+  }
16 46
 
17 47
   const Basic = (props) => {
18
-  return <div>Basic</div>
48
+    const fields = [
49
+      {
50
+        label: '所属项目',
51
+        name: 'buildingId',
52
+        render: <BuildSelect />,
53
+        value: dynamicData.buildingId,
54
+        rules: [
55
+          {required: true, message: '请选择所属项目'},
56
+        ]
57
+      },
58
+      {
59
+        label: '主图',
60
+        name: 'imgUrl',
61
+        type: FieldTypes.ImageUploader,
62
+        value: dynamicData.imgUrl,
63
+      },
64
+      {
65
+        label: '活动标题',
66
+        name: 'title',
67
+        type: FieldTypes.Text,
68
+        value: dynamicData.title,
69
+        rules: [
70
+          {required: true, message: '请输入活动标题'},
71
+        ]
72
+      },
73
+      {
74
+        label: '活动时间',
75
+        name: 'activityTime',
76
+        type: FieldTypes.RangePicker,
77
+        value: dynamicData.startDate != null ?  [moment(dynamicData.startDate,'YYYY-MM-DD'),moment(dynamicData.endDate,'YYYY-MM-DD')] : null,
78
+        rules: [
79
+          {required: true, message: '请选择活动时间'},
80
+        ]
81
+      },
82
+      {
83
+        label: '活动地点',
84
+        name: 'address',
85
+        type: FieldTypes.Text,
86
+        value: dynamicData.address,
87
+        rules: [
88
+          {required: true, message: '请输入活动地点'},
89
+        ]
90
+      },
91
+      {
92
+        label: '活动人数',
93
+        name: 'enlistNum',
94
+        type: FieldTypes.Text,
95
+        value: dynamicData.enlistNum,
96
+        rules: [
97
+          {required: true, message: '请输入活动人数'},
98
+        ]
99
+      },
100
+      {
101
+        label: '活动详情',
102
+        name: 'desc',
103
+        render: <Wangedit />,
104
+        value: dynamicData.desc,
105
+      },
106
+      {
107
+        label: '是否需要报名',
108
+        name: 'isEnlist',
109
+        render: <Radio.Group name="radiogroup">
110
+                  <Radio value={1}>是</Radio>
111
+                  <Radio value={0}>否</Radio>
112
+                </Radio.Group>,
113
+        value: dynamicData.isEnlist != null ? dynamicData.isEnlist-0 : 1,
114
+      },
115
+      {
116
+        label: '报名时间',
117
+        name: 'signupTime',
118
+        type: FieldTypes.RangePicker,
119
+        value: dynamicData.enlistStart != null ?  [moment(dynamicData.enlistStart,'YYYY-MM-DD'),moment(dynamicData.enlistEnd,'YYYY-MM-DD')] : null,
120
+        rules: [
121
+          {required: true, message: '请选择报名时间'},
122
+        ]
123
+      },
124
+    ]
125
+  
126
+    const handleSubmit = val => { 
127
+      let {activityTime,signupTime, ...submitValue} = val
128
+      const [startDate, endDate] = activityTime
129
+      submitValue.startDate = moment(startDate).format('YYYY-MM-DD');
130
+      submitValue.endDate = moment(endDate).format('YYYY-MM-DD');
131
+      const [enlistStart, enlistEnd] = signupTime
132
+      submitValue.enlistStart = moment(enlistStart).format('YYYY-MM-DD');
133
+      submitValue.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD');
134
+      console.log('submit data --->', submitValue)
135
+      if(dynamicId){
136
+        submitValue.dynamicId = dynamicId
137
+        request({
138
+          url: '/api/admin/buildingDynamic/update',
139
+          method: 'PUT',
140
+          data: submitValue,
141
+        }).then((data) => {
142
+          cancelPage()
143
+        }).catch((err) => {
144
+          message.info(err.msg || err.message)
145
+        })
146
+      }else{
147
+        request({
148
+          url: '/api/admin/buildingDynamic/add',
149
+          method: 'POST',
150
+          data: submitValue,
151
+        }).then((data) => {
152
+          cancelPage()
153
+        }).catch((err) => {
154
+          message.info(err.msg || err.message)
155
+        })
156
+      }
157
+    }
158
+    return <XForm onSubmit={handleSubmit} onCancel={cancelPage} fields={fields}></XForm>
19 159
   }
20 160
   
21 161
   const Poster = (props) => {

+ 211
- 0
src/pages/customer/customerlist/index.jsx 查看文件

@@ -0,0 +1,211 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+
8
+
9
+const { Option } = Select;
10
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+const { Meta } = Card;
12
+
13
+const tempDate = [{ code: 's101' }]
14
+
15
+/**
16
+ *
17
+ *
18
+ * @param {*} props
19
+ * @returns
20
+ */
21
+function body(props) {
22
+  const { getFieldDecorator } = props.form
23
+
24
+  // eslint-disable-next-line react-hooks/rules-of-hooks
25
+  const [dataSource, setDataSource] = useState({ records: [] })
26
+
27
+  // 默认私客
28
+    // eslint-disable-next-line react-hooks/rules-of-hooks
29
+  const [customerType, setCustomerType] = useState('private')
30
+
31
+  // eslint-disable-next-line react-hooks/rules-of-hooks
32
+  useEffect(() => {
33
+    getList({ pageNumber: 1, pageSize: 10, customerType })
34
+  }, [])
35
+
36
+  function getList(params) {
37
+    // 网路请求
38
+    request({ ...apis.customer.customerRecommend, params: { ...params } }).then(res => {
39
+      setDataSource(res)
40
+    }).catch(err => {
41
+      // eslint-disable-next-line no-unused-expressions
42
+      <Alert
43
+        style={{
44
+          marginBottom: 24,
45
+        }}
46
+        message={err}
47
+        type="error"
48
+        showIcon
49
+      />
50
+    })
51
+  }
52
+
53
+  // 提交事件
54
+  function handleSubmit(e) {
55
+    e.preventDefault();
56
+    props.form.validateFields((err, values) => {
57
+      if (!err) {
58
+        getList({ pageNum: 1, pageSize: 10, customerType, ...values })
59
+      }
60
+    });
61
+  }
62
+
63
+  // Change 事件
64
+  function handleSelectChange(e) {
65
+    // eslint-disable-next-line no-console
66
+    console.log(e)
67
+  }
68
+
69
+  // 分页
70
+  function onChange(pageNum) {
71
+    // eslint-disable-next-line react-hooks/rules-of-hooks
72
+      getList({ pageNumber: pageNum, pageSize: 10, customerType })
73
+  }
74
+
75
+  // 私客/公客切换
76
+  function radioButtonHandleSizeChange(e) {
77
+    const { value } = e.target
78
+    setCustomerType(value)
79
+    getList({ pageNumber: 1, pageSize: 10, customerType: value })
80
+  }
81
+
82
+  const columns = [
83
+    {
84
+      title: '头像',
85
+      dataIndex: 'picture',
86
+      key: 'picture',
87
+      render: (_, record) => <Avatar shape="square" src={customerType === 'private' ? record.picture : record.avatarurl } size={64} icon="user" />,
88
+    },
89
+    {
90
+      title: '姓名',
91
+      dataIndex: 'name',
92
+      key: 'name',
93
+      // eslint-disable-next-line no-nested-ternary
94
+      render: (_, record) => <><sapn>{ customerType === 'private' ? record.name : record.nickname }</sapn></>,
95
+    },
96
+    {
97
+      title: '电话',
98
+      dataIndex: 'phone',
99
+      key: 'phone',
100
+    },
101
+    {
102
+      title: '性别',
103
+      dataIndex: 'sex',
104
+      key: 'sex',
105
+      // eslint-disable-next-line no-nested-ternary
106
+      render: (_, record) => <><sapn>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</sapn></>,
107
+    },
108
+    {
109
+      title: '置业顾问',
110
+      dataIndex: 'consultantName',
111
+      key: 'consultantName',
112
+      // eslint-disable-next-line no-nested-ternary
113
+      render: (_, record) => (
114
+        <>
115
+          <sapn>{ record.consultantName }</sapn>
116
+          <br/>
117
+          <sapn>{ record.consultTel }</sapn>
118
+        </>
119
+      ),
120
+    },
121
+    {
122
+      title: '客户状态',
123
+      dataIndex: 'reportRecommendStatus',
124
+      key: 'reportRecommendStatus',
125
+       // eslint-disable-next-line no-nested-ternary
126
+       render: (_, record) => <><sapn>{ record.reportRecommendStatus === 0 ? '为报备' : record.reportRecommendStatus === 1 ? '报备' : record.reportRecommendStatus === 2 ? '推荐' : '' }</sapn></>,
127
+    },
128
+    {
129
+      title: '操作',
130
+      dataIndex: 'customerId',
131
+      key: 'customerId',
132
+      // eslint-disable-next-line no-nested-ternary
133
+      render: (_, record) => (
134
+        <>
135
+          <sapn className={ customerType === 'private' ? Styles.text : Styles.displayS }>变更状态</sapn>
136
+          &nbsp;&nbsp;
137
+          <sapn className={  customerType === 'private' ? Styles.text : Styles.displayS }>调整归属</sapn>
138
+          <br/>
139
+          <sapn className={ Styles.text }>查看详情</sapn>
140
+          &nbsp;&nbsp;
141
+          <sapn className={ Styles.text }>积分记录</sapn>
142
+        </>
143
+      ),
144
+    },
145
+  ]
146
+
147
+  return (
148
+    <>
149
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
150
+        <Form.Item>
151
+          {getFieldDecorator('buildingId')(
152
+            <Select style={{ width: '180px' }} placeholder="意向项目" onChange={handleSelectChange}>
153
+              <Option value="male">male</Option>
154
+            </Select>,
155
+          )}
156
+        </Form.Item>
157
+        <Form.Item>
158
+          {getFieldDecorator('reportRecommendStatus')(
159
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
160
+              <Option value={0}>未报备</Option>
161
+              <Option value={1}>报备</Option>
162
+              <Option value={2}>推荐</Option>
163
+            </Select>,
164
+          )}
165
+        </Form.Item>
166
+        <Form.Item>
167
+          {getFieldDecorator('name')(
168
+            <Input
169
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
170
+              placeholder="姓名"
171
+            />,
172
+          )}
173
+        </Form.Item>
174
+        <Form.Item>
175
+          {getFieldDecorator('tel')(
176
+            <Input
177
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
178
+              placeholder="电话"
179
+            />,
180
+          )}
181
+        </Form.Item>
182
+        <Form.Item>
183
+          {getFieldDecorator('consultName')(
184
+            <Input placeholder="置业顾问" />,
185
+          )}
186
+        </Form.Item>
187
+        <Form.Item>
188
+          {getFieldDecorator('consultTel')(
189
+            <Input placeholder="置业顾问电话" />,
190
+          )}
191
+        </Form.Item>
192
+        <Form.Item>
193
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
194
+            搜索
195
+          </Button>
196
+        </Form.Item>
197
+      </Form>
198
+
199
+       <div style={{ marginTop: '20px', marginBottom: '20px' }}>
200
+        <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
201
+            <Radio.Button value="private">私客</Radio.Button>
202
+            <Radio.Button value="public">公客</Radio.Button>
203
+        </Radio.Group>
204
+       </div>
205
+      <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
206
+    </>
207
+  );
208
+}
209
+const WrappedBody = Form.create({ name: 'body' })(body);
210
+
211
+export default WrappedBody

+ 69
- 0
src/pages/customer/customerlist/style.css 查看文件

@@ -0,0 +1,69 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.text {
7
+  color: #ef273a;
8
+}
9
+.SelectFrom {
10
+  width: 180px;
11
+  background: #ffffff;
12
+  border-radius: 7px;
13
+  border: 1px solid #dbdbdb;
14
+}
15
+.addButton {
16
+  background: #50be00;
17
+  border-radius: 4px;
18
+  border: 0px;
19
+  margin: 10px 0px;
20
+}
21
+.cardText {
22
+  font-size: 18px;
23
+  color: #333;
24
+  line-height: 24px;
25
+  display: flex;
26
+  align-items: center;
27
+  position: relative;
28
+}
29
+.cardItem {
30
+  font-size: 18px;
31
+  font-weight: 400;
32
+  color: #666;
33
+  line-height: 24px;
34
+  display: flex;
35
+  align-items: center;
36
+}
37
+.ediText {
38
+  font-size: 18px;
39
+  color: #ff925c;
40
+  line-height: 24px;
41
+  position: absolute;
42
+  right: 0;
43
+}
44
+.title {
45
+  display: inline-block;
46
+  width: 84px;
47
+  justify-content: space-between;
48
+  text-align: justify;
49
+  text-align-last: justify;
50
+}
51
+.address {
52
+  width: 400px;
53
+  height: 24px;
54
+  text-overflow: ellipsis;
55
+  white-space: nowrap;
56
+  overflow: hidden;
57
+}
58
+.pitchButton {
59
+  border-color: #ff7e48;
60
+  background-color: #ff7e48;
61
+  color: #ffffff;
62
+}
63
+.noButton {
64
+  border-color: #ff7e48;
65
+  color: #ff7e48;
66
+}
67
+.displayS {
68
+  display: none;
69
+}

+ 72
- 0
src/pages/customer/customerlist/style.less 查看文件

@@ -0,0 +1,72 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.text {
7
+  color: rgba(239,39,58,1);
8
+}
9
+.SelectFrom {
10
+  width: 180px;
11
+  background: #ffffff;
12
+  border-radius: 7px;
13
+  border: 1px solid #dbdbdb;
14
+}
15
+.addButton {
16
+  background: #50be00;
17
+  border-radius: 4px;
18
+  border: 0px;
19
+  margin: 10px 0px;
20
+}
21
+.cardText {
22
+  font-size: 18px;
23
+  color: #333;
24
+  line-height: 24px;
25
+  display: flex;
26
+  align-items: center;
27
+  position: relative;
28
+
29
+}
30
+.cardItem{
31
+  font-size: 18px;
32
+  font-weight: 400;
33
+  color: #666;
34
+  line-height: 24px;
35
+  display: flex;
36
+  align-items: center;  
37
+}
38
+.ediText {
39
+  font-size: 18px;
40
+  color: #ff925c;
41
+  line-height: 24px;
42
+  position: absolute;
43
+  right: 0;
44
+}
45
+.title{
46
+  display: inline-block;
47
+  width: 84px;
48
+  justify-content: space-between;
49
+  text-align: justify;
50
+  text-align-last:justify
51
+}
52
+
53
+.address { 
54
+  width: 400px;
55
+  height: 24px; 
56
+  text-overflow: ellipsis; 
57
+  white-space: nowrap;
58
+  overflow: hidden;
59
+}
60
+
61
+.pitchButton { 
62
+  border-color: rgba(255,126,72,1);
63
+  background-color: rgba(255,126,72,1);
64
+  color: rgba(255,255,255,1); 
65
+}
66
+.noButton {
67
+  border-color: rgba(255,126,72,1);
68
+  color: rgba(255,126,72,1);
69
+}
70
+.displayS {
71
+  display: none;
72
+}

+ 69
- 0
src/pages/customer/customerlist/style.wxss 查看文件

@@ -0,0 +1,69 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.text {
7
+  color: #ef273a;
8
+}
9
+.SelectFrom {
10
+  width: 180px;
11
+  background: #ffffff;
12
+  border-radius: 7px;
13
+  border: 1px solid #dbdbdb;
14
+}
15
+.addButton {
16
+  background: #50be00;
17
+  border-radius: 4px;
18
+  border: 0px;
19
+  margin: 10px 0px;
20
+}
21
+.cardText {
22
+  font-size: 18px;
23
+  color: #333;
24
+  line-height: 24px;
25
+  display: flex;
26
+  align-items: center;
27
+  position: relative;
28
+}
29
+.cardItem {
30
+  font-size: 18px;
31
+  font-weight: 400;
32
+  color: #666;
33
+  line-height: 24px;
34
+  display: flex;
35
+  align-items: center;
36
+}
37
+.ediText {
38
+  font-size: 18px;
39
+  color: #ff925c;
40
+  line-height: 24px;
41
+  position: absolute;
42
+  right: 0;
43
+}
44
+.title {
45
+  display: inline-block;
46
+  width: 84px;
47
+  justify-content: space-between;
48
+  text-align: justify;
49
+  text-align-last: justify;
50
+}
51
+.address {
52
+  width: 400px;
53
+  height: 24px;
54
+  text-overflow: ellipsis;
55
+  white-space: nowrap;
56
+  overflow: hidden;
57
+}
58
+.pitchButton {
59
+  border-color: #ff7e48;
60
+  background-color: #ff7e48;
61
+  color: #ffffff;
62
+}
63
+.noButton {
64
+  border-color: #ff7e48;
65
+  color: #ff7e48;
66
+}
67
+.displayS {
68
+  display: none;
69
+}

+ 67
- 0
src/pages/customer/drift/index.jsx 查看文件

@@ -0,0 +1,67 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Table, Avatar, Alert } from 'antd';
3
+
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less'
7
+
8
+function costomerDrift() {
9
+  // eslint-disable-next-line react-hooks/rules-of-hooks
10
+  const [dataSources, setDataSources] = useState({ records: [] })
11
+
12
+  // eslint-disable-next-line react-hooks/rules-of-hooks
13
+  useEffect(() => {
14
+   getList({ pageNumber: '1', pageSize: '10' })
15
+  }, [])
16
+
17
+  function getList(params) {
18
+    request({ ...apis.customer.drift, params: { ...params } }).then(res => {
19
+      setDataSources(res)
20
+    }).catch(err => {
21
+      // eslint-disable-next-line no-unused-expressions
22
+      <Alert
23
+        style={{
24
+          marginBottom: 24,
25
+        }}
26
+        message={err}
27
+        type="error"
28
+        showIcon
29
+      />
30
+    })
31
+  }
32
+
33
+  // 分页
34
+  function onChange(pageNum) {
35
+    // eslint-disable-next-line no-console
36
+    console.log('Page: ', pageNum);
37
+    getList({ pageNumber: pageNum, pageSize: 10 })
38
+  }
39
+
40
+  const columns = [
41
+    {
42
+      title: '头像',
43
+      dataIndex: 'avatarurl',
44
+      key: 'avatarurl',
45
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} icon="user" />,
46
+    },
47
+    {
48
+      title: '姓名',
49
+      dataIndex: 'nickname',
50
+      key: 'nickname',
51
+    },
52
+    {
53
+      title: '性别',
54
+      dataIndex: 'gender',
55
+      key: 'gender',
56
+      // eslint-disable-next-line no-nested-ternary
57
+      render: (_, record) => <><sapn>{ record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知' }</sapn></>,
58
+    },
59
+  ];
60
+
61
+  return (
62
+    // eslint-disable-next-line max-len
63
+    <Table dataSource={dataSources.records} columns={columns} pagination={{ total: dataSources.total, onChange }} />
64
+  )
65
+}
66
+
67
+export default costomerDrift

+ 57
- 0
src/pages/customer/drift/style.less 查看文件

@@ -0,0 +1,57 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+
26
+}
27
+.cardItem{
28
+  font-size: 18px;
29
+  font-weight: 400;
30
+  color: #666;
31
+  line-height: 24px;
32
+  display: flex;
33
+  align-items: center;  
34
+}
35
+.ediText {
36
+  font-size: 18px;
37
+  color: #ff925c;
38
+  line-height: 24px;
39
+  position: absolute;
40
+  right: 0;
41
+}
42
+.title{
43
+  display: inline-block;
44
+  width: 84px;
45
+  justify-content: space-between;
46
+  text-align: justify;
47
+  text-align-last:justify
48
+}
49
+
50
+.address { 
51
+  width: 400px;
52
+  height: 24px; 
53
+  text-overflow: ellipsis; 
54
+  white-space: nowrap;
55
+  overflow: hidden;
56
+}
57
+

+ 166
- 0
src/pages/customer/independentList/index.jsx 查看文件

@@ -0,0 +1,166 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+import { router } from 'umi';
8
+
9
+
10
+const { Option } = Select;
11
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
12
+const { Meta } = Card;
13
+
14
+/**
15
+ *
16
+ *
17
+ * @param {*} props
18
+ * @returns
19
+ */
20
+function body(props) {
21
+  const { getFieldDecorator } = props.form
22
+
23
+  // eslint-disable-next-line react-hooks/rules-of-hooks
24
+  const [dataSource, setDataSource] = useState({ records: [] })
25
+
26
+  // eslint-disable-next-line react-hooks/rules-of-hooks
27
+  useEffect(() => {
28
+    getList({ pageNumber: 1, pageSize: 10 })
29
+  }, [])
30
+
31
+  function getList(params) {
32
+    // 网路请求
33
+    request({ ...apis.customer.agents, params: { ...params } }).then(res => {
34
+      setDataSource(res)
35
+    }).catch(err => {
36
+      // eslint-disable-next-line no-unused-expressions
37
+      <Alert
38
+        style={{
39
+          marginBottom: 24,
40
+        }}
41
+        message={err}
42
+        type="error"
43
+        showIcon
44
+      />
45
+    })
46
+  }
47
+
48
+  // 提交事件
49
+  function handleSubmit(e) {
50
+    e.preventDefault();
51
+    props.form.validateFields((err, values) => {
52
+      if (!err) {
53
+        getList({ pageNum: 1, pageSize: 10, ...values })
54
+      }
55
+    });
56
+  }
57
+
58
+  // Change 事件
59
+  function handleSelectChange(e) {
60
+    // eslint-disable-next-line no-console
61
+    console.log(e)
62
+  }
63
+
64
+  // 分页
65
+  function onChange(pageNum) {
66
+    // eslint-disable-next-line react-hooks/rules-of-hooks
67
+      getList({ pageNumber: pageNum, pageSize: 10 })
68
+  }
69
+
70
+  function toAudit(cuurentId) {
71
+    router.push({
72
+      pathname: '/customer/recommendCustomer/audit',
73
+      query: {
74
+        id: cuurentId,
75
+      },
76
+    })
77
+  }
78
+
79
+  const columns = [
80
+    {
81
+      title: '头像',
82
+      dataIndex: 'avatarurl',
83
+      key: 'avatarurl',
84
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} icon="user" />,
85
+    },
86
+    {
87
+      title: '姓名',
88
+      dataIndex: 'nickname',
89
+      key: 'nickname',
90
+    },
91
+    {
92
+      title: '电话',
93
+      dataIndex: 'phone',
94
+      key: 'phone',
95
+    },
96
+    {
97
+      title: '性别',
98
+      dataIndex: 'gender',
99
+      key: 'gender',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><sapn>{ record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知' }</sapn></>,
102
+    },
103
+    {
104
+      title: '类型',
105
+      dataIndex: 'personType',
106
+      key: 'personType',
107
+      render: (_, record) => <><sapn>{ record.channelName !== null ? '渠道经纪人' : '独立经纪人' }</sapn></>,
108
+    },
109
+    {
110
+      title: '所属渠道',
111
+      dataIndex: 'channelName',
112
+      key: 'channelName',
113
+    },
114
+    {
115
+      title: '操作',
116
+      dataIndex: 'customerId',
117
+      key: 'customerId',
118
+      render: (_, record) => (
119
+        <>
120
+          {
121
+            <>
122
+              <sapn style={{ color: 'rgba(239,39,58,1)' }}>查看详细</sapn>
123
+              &nbsp;&nbsp;&nbsp;&nbsp;
124
+              <sapn style={{ color: 'rgba(239,39,58,1)' }}>邀请经纪人</sapn>
125
+              &nbsp;&nbsp;&nbsp;&nbsp;
126
+              <sapn style={{ color: 'rgba(239,39,58,1)' }}>推荐客户</sapn>
127
+            </>
128
+          }
129
+        </>
130
+      ),
131
+    },
132
+  ]
133
+
134
+  return (
135
+    <>
136
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
137
+        <Form.Item>
138
+          {getFieldDecorator('name')(
139
+            <Input
140
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
141
+              placeholder="姓名"
142
+            />,
143
+          )}
144
+        </Form.Item>
145
+        <Form.Item>
146
+          {getFieldDecorator('tel')(
147
+            <Input
148
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
149
+              placeholder="电话"
150
+            />,
151
+          )}
152
+        </Form.Item>
153
+        <Form.Item>
154
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
155
+            搜索
156
+          </Button>
157
+        </Form.Item>
158
+      </Form>
159
+
160
+      <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
161
+    </>
162
+  );
163
+}
164
+const WrappedBody = Form.create({ name: 'body' })(body);
165
+
166
+export default WrappedBody

+ 54
- 0
src/pages/customer/independentList/style.css 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 57
- 0
src/pages/customer/independentList/style.less 查看文件

@@ -0,0 +1,57 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+
26
+}
27
+.cardItem{
28
+  font-size: 18px;
29
+  font-weight: 400;
30
+  color: #666;
31
+  line-height: 24px;
32
+  display: flex;
33
+  align-items: center;  
34
+}
35
+.ediText {
36
+  font-size: 18px;
37
+  color: #ff925c;
38
+  line-height: 24px;
39
+  position: absolute;
40
+  right: 0;
41
+}
42
+.title{
43
+  display: inline-block;
44
+  width: 84px;
45
+  justify-content: space-between;
46
+  text-align: justify;
47
+  text-align-last:justify
48
+}
49
+
50
+.address { 
51
+  width: 400px;
52
+  height: 24px; 
53
+  text-overflow: ellipsis; 
54
+  white-space: nowrap;
55
+  overflow: hidden;
56
+}
57
+

+ 54
- 0
src/pages/customer/independentList/style.wxss 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 201
- 0
src/pages/customer/recommendCustomer/audit.jsx 查看文件

@@ -0,0 +1,201 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Upload, message } from 'antd';
3
+import ImageUpload from '../../../components/XForm/ImageUpload';
4
+import moment from 'moment';
5
+import request from '../../../utils/request';
6
+import apis from '../../../services/apis';
7
+import Styles from './style.less';
8
+import { router } from 'umi';
9
+
10
+const { Option } = Select;
11
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
12
+const { Meta } = Card;
13
+
14
+const { TextArea } = Input;
15
+
16
+const tailFormItemLayout = {
17
+  labelCol: {
18
+    xs: { span: 20 },
19
+    sm: { span: 3 },
20
+  },
21
+  wrapperCol: {
22
+    xs: { span: 20 },
23
+    sm: { span: 16 },
24
+  },
25
+};
26
+
27
+function body(props) {
28
+  const { getFieldDecorator } = props.form
29
+
30
+  // eslint-disable-next-line react-hooks/rules-of-hooks
31
+  const [dataSource, setDataSource] = useState({ picture: '' })
32
+
33
+  const { id } = props.location.query;
34
+
35
+  if (id !== '') {
36
+    // eslint-disable-next-line react-hooks/rules-of-hooks
37
+    useEffect(() => {
38
+      getById(id)
39
+    }, [])
40
+  }
41
+
42
+  // 获取详情信息
43
+  function getById(currentId) {
44
+    const { url, method } = apis.customer.recommendGetById
45
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(currentId)
46
+
47
+    request({ url: tempUrl, method }).then(res => {
48
+      props.form.setFieldsValue(res)
49
+    })
50
+  }
51
+
52
+  function submitDate(params) {
53
+    const { url, method } = apis.customer.auto
54
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(params.customerId)
55
+
56
+    // props.form.setFieldsValue(res)
57
+    request({ url: tempUrl, method, params: { verifyStatus: params.verifyStatus } }).then(() => {
58
+      // eslint-disable-next-line no-unused-expressions
59
+      <Alert
60
+        style={{
61
+          marginBottom: 24,
62
+        }}
63
+        message="操作成功"
64
+        type="success"
65
+        showIcon
66
+      />
67
+      router.go(-1)
68
+    }).catch(err => {
69
+      // eslint-disable-next-line no-unused-expressions
70
+      <Alert
71
+        style={{
72
+          marginBottom: 24,
73
+        }}
74
+        message={err}
75
+        type="error"
76
+        showIcon
77
+      />
78
+    })
79
+  }
80
+
81
+  // 提交事件
82
+  function handleSubmit(e) {
83
+    e.preventDefault();
84
+    props.form.validateFields((err, values) => {
85
+      if (!err) {
86
+        submitDate({ ...values })
87
+      }
88
+    });
89
+  }
90
+
91
+  // Change 事件
92
+  function handleSelectChange(e) {
93
+    // eslint-disable-next-line no-console
94
+    console.log(e)
95
+  }
96
+
97
+  return (
98
+    <>
99
+      <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e, props)} style={{ width: '800px', margin: 'auto' }}>
100
+        <Form.Item label="客户ID" style={{ display: 'none' }}>
101
+          {getFieldDecorator('customerId')(
102
+            <Input
103
+              placeholder="客户ID"
104
+            />,
105
+          )}
106
+        </Form.Item>
107
+        <Form.Item label="意向项目:">
108
+          {getFieldDecorator('intention')(
109
+            <Input
110
+              placeholder="意向项目"
111
+            />,
112
+          )}
113
+        </Form.Item>
114
+        <Form.Item label="客户照片">
115
+          {getFieldDecorator('picture')(
116
+            <ImageUpload value={dataSource.picture} />,
117
+          )}
118
+        </Form.Item>
119
+        <Form.Item label="客户姓名">
120
+          {getFieldDecorator('name')(
121
+            <Input placeholder="客户姓名" />,
122
+          )}
123
+        </Form.Item>
124
+        <Form.Item label="客户电话">
125
+          {getFieldDecorator('phone')(
126
+            <Input placeholder="客户电话" />,
127
+          )}
128
+        </Form.Item>
129
+        <Form.Item label="客户性别">
130
+          {getFieldDecorator('sex')(
131
+            <Radio.Group>
132
+              <Radio value={1}>男</Radio>
133
+              <Radio value={2}>女</Radio>
134
+            </Radio.Group>,
135
+          )}
136
+        </Form.Item>
137
+        <Form.Item label="到访人数">
138
+          {getFieldDecorator('visiteNum')(
139
+            <Input placeholder="到访人数" />,
140
+          )}
141
+        </Form.Item>
142
+        <Form.Item label="客户描述">
143
+          {getFieldDecorator('describe')(
144
+            <TextArea placeholder="客户描述" rows={10} />,
145
+          )}
146
+        </Form.Item>
147
+        <Form.Item label="物业类型">
148
+          {getFieldDecorator('realtyManageType')(
149
+            <Input placeholder="物业类型" />,
150
+          )}
151
+        </Form.Item>
152
+        <Form.Item label="需求类型">
153
+          {getFieldDecorator('demandType')(
154
+            <Input placeholder="需求类型" />,
155
+          )}
156
+        </Form.Item>
157
+        <Form.Item label="价格区间">
158
+          {getFieldDecorator('priceRange')(
159
+            <Input placeholder="价格区间" />,
160
+          )}
161
+        </Form.Item>
162
+        <Form.Item label="报备日期">
163
+          {getFieldDecorator('reportDate')(
164
+            <DatePicker showTime placeholder="报备日期" />,
165
+          )}
166
+        </Form.Item>
167
+        <Form.Item label="状态">
168
+          {getFieldDecorator('verifyStatus')(
169
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
170
+              <Option value={0}>未通过</Option>
171
+              <Option value={1}>已通过</Option>
172
+              <Option value={2}>已驳回</Option>
173
+            </Select>,
174
+          )}
175
+        </Form.Item>
176
+        <Form.Item label="归属置业顾问">
177
+            <Row gutter={8}>
178
+              <Col span={12}>
179
+                {getFieldDecorator('consultantName')(<Input placeholder="归属置业顾问" />)}
180
+              </Col>
181
+              <Col span={12}>
182
+                <Button>选择</Button>
183
+              </Col>
184
+            </Row>
185
+        </Form.Item>
186
+        <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
187
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
188
+            搜索
189
+          </Button>
190
+          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
191
+          <Button onClick={() => router.go(-1)}>
192
+            取消
193
+          </Button>
194
+        </Form.Item>
195
+      </Form>
196
+    </>
197
+  );
198
+}
199
+const WrappedBody = Form.create({ name: 'body' })(body);
200
+
201
+export default WrappedBody

+ 191
- 0
src/pages/customer/recommendCustomer/index.jsx 查看文件

@@ -0,0 +1,191 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+import { router } from 'umi';
8
+
9
+
10
+const { Option } = Select;
11
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
12
+const { Meta } = Card;
13
+
14
+/**
15
+ *
16
+ *
17
+ * @param {*} props
18
+ * @returns
19
+ */
20
+function body(props) {
21
+  const { getFieldDecorator } = props.form
22
+
23
+  // eslint-disable-next-line react-hooks/rules-of-hooks
24
+  const [dataSource, setDataSource] = useState({ records: [] })
25
+
26
+  // eslint-disable-next-line react-hooks/rules-of-hooks
27
+  useEffect(() => {
28
+    getList({ pageNumber: 1, pageSize: 10 })
29
+  }, [])
30
+
31
+  function getList(params) {
32
+    // 网路请求
33
+    request({ ...apis.customer.recommender, params: { ...params } }).then(res => {
34
+      setDataSource(res)
35
+    }).catch(err => {
36
+      // eslint-disable-next-line no-unused-expressions
37
+      <Alert
38
+        style={{
39
+          marginBottom: 24,
40
+        }}
41
+        message={err}
42
+        type="error"
43
+        showIcon
44
+      />
45
+    })
46
+  }
47
+
48
+  // 提交事件
49
+  function handleSubmit(e) {
50
+    e.preventDefault();
51
+    props.form.validateFields((err, values) => {
52
+      if (!err) {
53
+        getList({ pageNum: 1, pageSize: 10, ...values })
54
+      }
55
+    });
56
+  }
57
+
58
+  // Change 事件
59
+  function handleSelectChange(e) {
60
+    // eslint-disable-next-line no-console
61
+    console.log(e)
62
+  }
63
+
64
+  // 分页
65
+  function onChange(pageNum) {
66
+    // eslint-disable-next-line react-hooks/rules-of-hooks
67
+      getList({ pageNumber: pageNum, pageSize: 10 })
68
+  }
69
+
70
+  function toAudit(cuurentId) {
71
+    router.push({
72
+      pathname: '/customer/recommendCustomer/audit',
73
+      query: {
74
+        id: cuurentId,
75
+      },
76
+    })
77
+  }
78
+
79
+  const columns = [
80
+    {
81
+      title: '头像',
82
+      dataIndex: 'picture',
83
+      key: 'picture',
84
+      render: (_, record) => <Avatar shape="square" src={record.picture} size={64} icon="user" />,
85
+    },
86
+    {
87
+      title: '姓名',
88
+      dataIndex: 'name',
89
+      key: 'name',
90
+    },
91
+    {
92
+      title: '电话',
93
+      dataIndex: 'phone',
94
+      key: 'phone',
95
+    },
96
+    {
97
+      title: '性别',
98
+      dataIndex: 'sex',
99
+      key: 'sex',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><sapn>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</sapn></>,
102
+    },
103
+    {
104
+      title: '意向项目',
105
+      dataIndex: 'intention',
106
+      key: 'intention',
107
+    },
108
+    {
109
+      title: '推荐人',
110
+      dataIndex: 'consultantName',
111
+      key: 'consultantName',
112
+      render: (_, record) => <><sapn>{ record.recommendName + " " + record.recommendTel }</sapn></>,
113
+    },
114
+    {
115
+      title: '推荐时间',
116
+      dataIndex: 'createDate',
117
+      key: 'createDate',
118
+      render: (_, record) => <><sapn>{ moment(record.createDate).format('YYYY-MM-DD') }</sapn></>,
119
+    },
120
+    {
121
+      title: '状态',
122
+      dataIndex: 'verifyStatus',
123
+      key: 'verifyStatus',
124
+      render: (_, record) => <><sapn>{ record.verifyStatus === 0 ? '未通过': record.verifyStatus === 1 ? '已通过' : record.verifyStatus === 2 ? '已驳回' : '' }</sapn></>,
125
+    },
126
+    {
127
+      title: '操作',
128
+      dataIndex: 'customerId',
129
+      key: 'customerId',
130
+      render: (_, record) => (
131
+        <>
132
+          {
133
+            record.verifyStatus === 0 ? <sapn style={{ color: 'rgba(239,39,58,1)' }} onClick={() => toAudit(record.customerId)}>审核</sapn> : ''
134
+          }
135
+        </>
136
+      ),
137
+    },
138
+  ]
139
+
140
+  return (
141
+    <>
142
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
143
+        <Form.Item>
144
+          {getFieldDecorator('name')(
145
+            <Input
146
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
147
+              placeholder="姓名"
148
+            />,
149
+          )}
150
+        </Form.Item>
151
+        <Form.Item>
152
+          {getFieldDecorator('tel')(
153
+            <Input
154
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
155
+              placeholder="电话"
156
+            />,
157
+          )}
158
+        </Form.Item>
159
+        <Form.Item>
160
+          {getFieldDecorator('consultName')(
161
+            <Input placeholder="推荐人" />,
162
+          )}
163
+        </Form.Item>
164
+        <Form.Item>
165
+          {getFieldDecorator('consultTel')(
166
+            <Input placeholder="推荐人电话" />,
167
+          )}
168
+        </Form.Item>
169
+        <Form.Item>
170
+          {getFieldDecorator('verifyStatus')(
171
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
172
+              <Option value={0}>未通过</Option>
173
+              <Option value={1}>已通过</Option>
174
+              <Option value={2}>已驳回</Option>
175
+            </Select>,
176
+          )}
177
+        </Form.Item>
178
+        <Form.Item>
179
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
180
+            搜索
181
+          </Button>
182
+        </Form.Item>
183
+      </Form>
184
+
185
+      <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
186
+    </>
187
+  );
188
+}
189
+const WrappedBody = Form.create({ name: 'body' })(body);
190
+
191
+export default WrappedBody

+ 54
- 0
src/pages/customer/recommendCustomer/style.css 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 57
- 0
src/pages/customer/recommendCustomer/style.less 查看文件

@@ -0,0 +1,57 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+
26
+}
27
+.cardItem{
28
+  font-size: 18px;
29
+  font-weight: 400;
30
+  color: #666;
31
+  line-height: 24px;
32
+  display: flex;
33
+  align-items: center;  
34
+}
35
+.ediText {
36
+  font-size: 18px;
37
+  color: #ff925c;
38
+  line-height: 24px;
39
+  position: absolute;
40
+  right: 0;
41
+}
42
+.title{
43
+  display: inline-block;
44
+  width: 84px;
45
+  justify-content: space-between;
46
+  text-align: justify;
47
+  text-align-last:justify
48
+}
49
+
50
+.address { 
51
+  width: 400px;
52
+  height: 24px; 
53
+  text-overflow: ellipsis; 
54
+  white-space: nowrap;
55
+  overflow: hidden;
56
+}
57
+

+ 54
- 0
src/pages/customer/recommendCustomer/style.wxss 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 169
- 0
src/pages/customer/report/index.jsx 查看文件

@@ -0,0 +1,169 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+
8
+
9
+const { Option } = Select;
10
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+const { Meta } = Card;
12
+
13
+const tempDate = [{ code: 's101' }]
14
+
15
+/**
16
+ *
17
+ *
18
+ * @param {*} props
19
+ * @returns
20
+ */
21
+function body(props) {
22
+  const { getFieldDecorator } = props.form
23
+
24
+  // eslint-disable-next-line react-hooks/rules-of-hooks
25
+  const [dataSource, setDataSource] = useState({ records: [] })
26
+
27
+  // eslint-disable-next-line react-hooks/rules-of-hooks
28
+  useEffect(() => {
29
+    getList({ pageNumber: 1, pageSize: 9 })
30
+  }, [])
31
+
32
+  function getList(params) {
33
+    // 网路请求
34
+    request({ ...apis.customer.report, params: { ...params } }).then(res => {
35
+      setDataSource(res)
36
+    }).catch(err => {
37
+      // eslint-disable-next-line no-unused-expressions
38
+      <Alert
39
+        style={{
40
+          marginBottom: 24,
41
+        }}
42
+        message={err}
43
+        type="error"
44
+        showIcon
45
+      />
46
+    })
47
+  }
48
+
49
+  // 提交事件
50
+  function handleSubmit(e) {
51
+    e.preventDefault();
52
+    props.form.validateFields((err, values) => {
53
+      if (!err) {
54
+        getList({ pageNum: 1, pageSize: 10, ...values })
55
+      }
56
+    });
57
+  }
58
+
59
+  // Change 事件
60
+  function handleSelectChange(e) {
61
+    // eslint-disable-next-line no-console
62
+    console.log(e)
63
+  }
64
+
65
+  // 分页
66
+  function onChange(pageNum) {
67
+    // eslint-disable-next-line react-hooks/rules-of-hooks
68
+      getList({ pageNumber: pageNum, pageSize: 9 })
69
+  }
70
+
71
+  const columns = [
72
+    {
73
+      title: '头像',
74
+      dataIndex: 'picture',
75
+      key: 'picture',
76
+      render: (_, record) => <Avatar shape="square" src={record.picture} size={64} icon="user" />,
77
+    },
78
+    {
79
+      title: '姓名',
80
+      dataIndex: 'name',
81
+      key: 'name',
82
+    },
83
+    {
84
+      title: '电话',
85
+      dataIndex: 'phone',
86
+      key: 'phone',
87
+    },
88
+    {
89
+      title: '性别',
90
+      dataIndex: 'sex',
91
+      key: 'sex',
92
+      // eslint-disable-next-line no-nested-ternary
93
+      render: (_, record) => <><sapn>{ record.sex === 1 ? '男' : record.sex === 2 ? '女' : '未知' }</sapn></>,
94
+    },
95
+    {
96
+      title: '意向项目',
97
+      dataIndex: 'intention',
98
+      key: 'intention',
99
+    },
100
+    {
101
+      title: '置业顾问',
102
+      dataIndex: 'consultantName',
103
+      key: 'consultantName',
104
+    },
105
+    {
106
+      title: '置业顾问手机号',
107
+      dataIndex: 'consultTel',
108
+      key: 'consultTel',
109
+    },
110
+  ]
111
+
112
+  return (
113
+    <>
114
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
115
+        <Form.Item>
116
+          {getFieldDecorator('name')(
117
+            <Input
118
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
119
+              placeholder="姓名"
120
+            />,
121
+          )}
122
+        </Form.Item>
123
+        <Form.Item>
124
+          {getFieldDecorator('tel')(
125
+            <Input
126
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
127
+              placeholder="电话"
128
+            />,
129
+          )}
130
+        </Form.Item>
131
+        <Form.Item>
132
+          {getFieldDecorator('consultName')(
133
+            <Input placeholder="推荐人" />,
134
+          )}
135
+        </Form.Item>
136
+        <Form.Item>
137
+          {getFieldDecorator('consultTel')(
138
+            <Input placeholder="推荐电话" />,
139
+          )}
140
+        </Form.Item>
141
+        <Form.Item>
142
+          {getFieldDecorator('sex')(
143
+            <Select style={{ width: '180px' }} placeholder="性别" onChange={handleSelectChange}>
144
+              <Option value="1">男</Option>
145
+              <Option value="0">女</Option>
146
+            </Select>,
147
+          )}
148
+        </Form.Item>
149
+        <Form.Item>
150
+          {getFieldDecorator('buildingId')(
151
+            <Select style={{ width: '180px' }} placeholder="意向项目" onChange={handleSelectChange}>
152
+              <Option value="male">male</Option>
153
+            </Select>,
154
+          )}
155
+        </Form.Item>
156
+        <Form.Item>
157
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
158
+            搜索
159
+          </Button>
160
+        </Form.Item>
161
+      </Form>
162
+
163
+      <Table dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />
164
+    </>
165
+  );
166
+}
167
+const WrappedBody = Form.create({ name: 'body' })(body);
168
+
169
+export default WrappedBody

+ 54
- 0
src/pages/customer/report/style.css 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 57
- 0
src/pages/customer/report/style.less 查看文件

@@ -0,0 +1,57 @@
1
+.SubmitButton {
2
+  background: rgba(239,39,58,1);
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+
26
+}
27
+.cardItem{
28
+  font-size: 18px;
29
+  font-weight: 400;
30
+  color: #666;
31
+  line-height: 24px;
32
+  display: flex;
33
+  align-items: center;  
34
+}
35
+.ediText {
36
+  font-size: 18px;
37
+  color: #ff925c;
38
+  line-height: 24px;
39
+  position: absolute;
40
+  right: 0;
41
+}
42
+.title{
43
+  display: inline-block;
44
+  width: 84px;
45
+  justify-content: space-between;
46
+  text-align: justify;
47
+  text-align-last:justify
48
+}
49
+
50
+.address { 
51
+  width: 400px;
52
+  height: 24px; 
53
+  text-overflow: ellipsis; 
54
+  white-space: nowrap;
55
+  overflow: hidden;
56
+}
57
+

+ 54
- 0
src/pages/customer/report/style.wxss 查看文件

@@ -0,0 +1,54 @@
1
+.SubmitButton {
2
+  background: #ef273a;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  background: #50be00;
14
+  border-radius: 4px;
15
+  border: 0px;
16
+  margin: 10px 0px;
17
+}
18
+.cardText {
19
+  font-size: 18px;
20
+  color: #333;
21
+  line-height: 24px;
22
+  display: flex;
23
+  align-items: center;
24
+  position: relative;
25
+}
26
+.cardItem {
27
+  font-size: 18px;
28
+  font-weight: 400;
29
+  color: #666;
30
+  line-height: 24px;
31
+  display: flex;
32
+  align-items: center;
33
+}
34
+.ediText {
35
+  font-size: 18px;
36
+  color: #ff925c;
37
+  line-height: 24px;
38
+  position: absolute;
39
+  right: 0;
40
+}
41
+.title {
42
+  display: inline-block;
43
+  width: 84px;
44
+  justify-content: space-between;
45
+  text-align: justify;
46
+  text-align-last: justify;
47
+}
48
+.address {
49
+  width: 400px;
50
+  height: 24px;
51
+  text-overflow: ellipsis;
52
+  white-space: nowrap;
53
+  overflow: hidden;
54
+}

+ 76
- 15
src/pages/integralMall/editGoods.jsx 查看文件

@@ -1,27 +1,88 @@
1
-import React from 'react';
2
-import { Form, Input, Button, Icon, Select } from 'antd';
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Menu, Dropdown, Button, Icon, message, Table, Divider, Tag, Select, Form, Alert } from 'antd';
3 3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
-import styles from '../style/GoodsList.less';
4
+import channels from '../channel/channelList.less';
5
+import router from 'umi/router';
6
+import request from '../../utils/request'
5 7
 
8
+const { TextArea } = Input;
9
+const { Option } = Select;
6 10
 
11
+const header = props => {
7 12
 
8
-/**
9
- *
10
- *
11
- * @param {*} props
12
- * @returns
13
- */
13
+  const [data, setData] = useState({ channelNmae: [], result: [] })
14 14
 
15
+  function goBack(){
16
+    router.push({
17
+      pathname: '/integralMall/GoodsList',
18
+    });
19
+  }
15 20
 
16
-function header(props) {
17
-  const { getFieldDecorator } = props.form
18
-  return (
21
+  function addChannel(params) {
22
+    request({
23
+      url: '/api/admin/channel',
24
+      method: 'POST',
25
+      data: { ...params },
26
+      // eslint-disable-next-line no-shadow
27
+    }).then(data => {
28
+      console.log(data)
29
+      setData(data)
30
+      // eslint-disable-next-line no-unused-expressions
31
+      router.go(-1)
32
+    })
33
+  }
34
+
35
+  function handleSubmit(e) {
36
+    e.preventDefault();
37
+    props.form.validateFields((err, values) => {
38
+      if (!err) {
39
+        console.log('Received values of form: ', values);
40
+        // eslint-disable-next-line max-len
41
+        addChannel({ channelName: values.channelName, channelContact: values.channelContact, contactTel: values.contactTel })
42
+      }
43
+    });
44
+  }
19 45
 
46
+  const { getFieldDecorator } = props.form;
47
+
48
+  return (
20 49
     <>
21
-     <div>编辑商品</div>
50
+      <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={handleSubmit}>
51
+        <Form.Item label="商品名称">
52
+          {getFieldDecorator('channelName', {
53
+            rules: [{ message: '请输入商品名称' }],
54
+          })(<Input className={channels.inpuit} />)}
55
+        </Form.Item>
56
+        <Form.Item label="所需积分">
57
+          {getFieldDecorator('channelContact', {
58
+            rules: [{ message: ' 请输入所需积分' }],
59
+          })(<Input className={channels.inpuit} />)}
60
+        </Form.Item>
61
+        <Form.Item label="商品数量">
62
+          {getFieldDecorator('contactTel', {
63
+            rules: [{ message: '请输入商品数量' }],
64
+          })(<Input className={channels.inpuit} />)}
65
+        </Form.Item>
66
+        <Form.Item label="剩余数量">
67
+          {getFieldDecorator('contactTel', {
68
+            rules: [{ message: '请输入剩余数量' }],
69
+          })(<Input className={channels.inpuit} />)}
70
+        </Form.Item>
71
+        <Form.Item label="商品详情">
72
+          <TextArea className={channels.inpuitTxt} rows={8} />
73
+        </Form.Item>
74
+        <Form.Item wrapperCol={{ span: 15, offset: 7 }}>
75
+          <Button type="primary" htmlType="submit">
76
+            保存
77
+          </Button>
78
+          <Button className={channels.formButton} onClick={goBack} type="primary" htmlType="submit">
79
+            取消
80
+          </Button>
81
+        </Form.Item>
82
+      </Form>
22 83
     </>
23 84
   )
24 85
 }
25
-const WrappedHeader = Form.create({ name: 'header' })(header);
26 86
 
27
-export default WrappedHeader
87
+const WrappedNormalLoginForm = Form.create({ name: 'header' })(header);
88
+export default WrappedNormalLoginForm

+ 47
- 45
src/pages/integralMall/exchangeRecords.jsx 查看文件

@@ -246,52 +246,54 @@ function record(props) {
246 246
 
247 247
     <>
248 248
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
249
-        <Form.Item>
250
-          {getFieldDecorator('name')(
251
-            <Input
252
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
253
-              placeholder="用户姓名"
254
-            />,
255
-          )}
256
-        </Form.Item>
257
-        <Form.Item>
258
-          {getFieldDecorator('phone')(
259
-            <Input
260
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
261
-              placeholder="手机号"
262
-            />,
263
-          )}
264
-        </Form.Item>
265
-        <Form.Item>
266
-          {getFieldDecorator('goodName')(
267
-            <Input
268
-              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
269
-              placeholder="商品名称"
270
-            />,
271
-          )}
272
-        </Form.Item>
273
-        <Form.Item>
274
-          {getFieldDecorator('type')(
275
-            <Select style={{ width: '200px' }} placeholder="用户类型" onChange={handleSelectChange}>
276
-              <Option value="2">置业顾问</Option>
277
-              <Option value="1">销售主管</Option>
278
-              <Option value="0">经纪人</Option>
279
-            </Select>,
280
-          )}
281
-        </Form.Item>
282
-        <Form.Item>
283
-          {getFieldDecorator('state')(
284
-            <Select style={{ width: '200px' }} placeholder="状态" onChange={handleSelectChange}>
285
-              <Option value="1">已领取</Option>
286
-              <Option value="0">未领取</Option>
287
-            </Select>,
288
-          )}
289
-        </Form.Item>
290
-        <Form.Item>
291
-          <Button type="primary" htmlType="submit" className={styles.searchBtn}>
292
-            搜索
249
+        <div style={{ display: 'flex' }}>
250
+          <Form.Item>
251
+            {getFieldDecorator('name')(
252
+              <Input
253
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
254
+                placeholder="用户姓名"
255
+              />,
256
+            )}
257
+          </Form.Item>
258
+          <Form.Item>
259
+            {getFieldDecorator('phone')(
260
+              <Input
261
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
262
+                placeholder="手机号"
263
+              />,
264
+            )}
265
+          </Form.Item>
266
+          <Form.Item>
267
+            {getFieldDecorator('goodName')(
268
+              <Input
269
+                prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
270
+                placeholder="商品名称"
271
+              />,
272
+            )}
273
+          </Form.Item>
274
+          <Form.Item>
275
+            {getFieldDecorator('type')(
276
+              <Select style={{ width: '220px' }} placeholder="用户类型" onChange={handleSelectChange}>
277
+                <Option value="2">置业顾问</Option>
278
+                <Option value="1">销售主管</Option>
279
+                <Option value="0">经纪人</Option>
280
+              </Select>,
281
+            )}
282
+          </Form.Item>
283
+          <Form.Item>
284
+            {getFieldDecorator('state')(
285
+              <Select style={{ width: '220px' }} placeholder="状态" onChange={handleSelectChange}>
286
+                <Option value="1">已领取</Option>
287
+                <Option value="0">未领取</Option>
288
+              </Select>,
289
+            )}
290
+          </Form.Item>
291
+          <Form.Item>
292
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
293
+              搜索
293 294
           </Button>
294
-        </Form.Item>
295
+          </Form.Item>
296
+        </div>
295 297
         <Form.Item>
296 298
           <DateRange />
297 299
         </Form.Item>

+ 210
- 0
src/pages/news/list/NewsList.jsx 查看文件

@@ -0,0 +1,210 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import Styles from './style.less';
7
+
8
+
9
+const { Option } = Select;
10
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
11
+const { Meta } = Card;
12
+
13
+const tempDate = [{ code: 's101' }]
14
+
15
+/**
16
+ *卡片
17
+ *
18
+ * @returns
19
+ */
20
+function CartBody(props) {
21
+  const { data } = props
22
+  console.log(props);
23
+  return (
24
+          <Card
25
+            hoverable
26
+            style={{ minWidth: '400px', borderRadius: '12px', margin: '10px', boxShadow: '0px 0px 16px 2px rgba(0,0,0,0.12)' }}
27
+            cover={<img alt="example" src={ data.newsImg } style={{ borderRadius: '12px 12px 0 0', width: '100%', height: '14vw' }}></img>}
28
+            bodyStyle={{ padding: '10px 20px' }}
29
+          >
30
+            <p className={Styles.cardText}>
31
+              <span className={Styles.title}>资讯类型</span>
32
+              <span >:{ data.newsType.newsTypeName }</span>
33
+              <span className={Styles.ediText}>
34
+                编辑
35
+                <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
36
+              </span>
37
+            </p>
38
+            <p className={Styles.cardText}>
39
+              <span className={Styles.title}>状态</span>
40
+              <span >:{ data.status == '0' ? "已发布" : "未发布" }</span>
41
+            </p>
42
+            <p className={Styles.cardItem}>
43
+              <span className={Styles.title}>阅读数量</span>
44
+              <span > :{ data.pvNum }</span>
45
+            </p>
46
+            <p className={Styles.cardItem}>
47
+              <span className={Styles.title}>转发数量</span>
48
+              <span className={ Styles.address }>:{ data.shareNum }</span>
49
+            </p>
50
+            <p className={Styles.cardItem}>
51
+              <span className={Styles.title}>点赞数量</span>     
52
+              <span >:{ data.favorNum }</span>         
53
+            </p>
54
+            <p className={Styles.cardItem}>
55
+              <span className={Styles.title}>收藏数量</span>
56
+              <span >:{ data.saveNum }</span>
57
+            </p>
58
+            <p className={Styles.cardItem}>
59
+              <span className={Styles.title}>录入时间</span>
60
+              <span >:{ data.createDate }</span>
61
+            </p>
62
+            <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
63
+              <span style={{ color: '#1990FF' }}>
64
+                取消发布
65
+                <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
66
+              </span>
67
+              <span style={{
68
+                color: '#FF4A4A', position: 'absolute', right: '0',
69
+              }} >
70
+                删除
71
+                <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
72
+              </span>
73
+            </p>
74
+          </Card>
75
+  )
76
+}
77
+
78
+/**
79
+ *
80
+ *
81
+ * @param {*} props
82
+ * @returns
83
+ */
84
+function body(props) {
85
+  const { getFieldDecorator } = props.form
86
+
87
+  // eslint-disable-next-line react-hooks/rules-of-hooks
88
+  const [dataSource, setDataSource] = useState({ records: [] })
89
+
90
+  // eslint-disable-next-line react-hooks/rules-of-hooks
91
+  useEffect(() => {
92
+    getList({ pageNum: 1, pageSize: 6 })
93
+  }, [])
94
+
95
+  function getList(params) {
96
+    // 网路请求
97
+    request({ ...apis.news.getList, params: { ...params } }).then(res => {
98
+      setDataSource(res)
99
+    }).catch(err => {
100
+      // eslint-disable-next-line no-unused-expressions
101
+      <Alert
102
+        style={{
103
+          marginBottom: 24,
104
+        }}
105
+        message={err}
106
+        type="error"
107
+        showIcon
108
+      />
109
+    })
110
+  }
111
+
112
+  // 提交事件
113
+  function handleSubmit(e) {
114
+    e.preventDefault();
115
+    props.form.validateFields((err, values) => {
116
+      if (!err) {
117
+        // eslint-disable-next-line no-console
118
+        console.log('提交数据: ', values)
119
+        const { startDate } = values
120
+        getList({ pageNum: 1, pageSize: 9, ...values })
121
+      }
122
+    });
123
+  }
124
+
125
+  // Change 事件
126
+  function handleSelectChange(e) {
127
+    // eslint-disable-next-line no-console
128
+    console.log(e)
129
+  }
130
+
131
+  // 分页
132
+  function onChange(pageNumber) {
133
+    // eslint-disable-next-line react-hooks/rules-of-hooks
134
+      getList({ pageNum: pageNumber, pageSize: 9 })
135
+  }
136
+
137
+  function getDate(value, dateString) {
138
+    // moment(value).format('YYYY-MM-DD HH:mm:ss')
139
+    console.log(value, dateString)
140
+  }
141
+
142
+  return (
143
+    <>
144
+      <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
145
+
146
+        <Form.Item>
147
+          {getFieldDecorator('city')(
148
+            <Select style={{ width: '180px' }} placeholder="请选择城市" onChange={handleSelectChange}>
149
+            </Select>,
150
+          )}
151
+        </Form.Item>
152
+
153
+        <Form.Item>
154
+          {getFieldDecorator('project')(
155
+            <Select style={{ width: '180px' }} placeholder="请选择项目" onChange={handleSelectChange}>
156
+            </Select>,
157
+          )}
158
+        </Form.Item>
159
+        <Form.Item>
160
+          {getFieldDecorator('title')(
161
+            <Input
162
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
163
+              placeholder="请输入标题"
164
+            />,
165
+          )}
166
+        </Form.Item>
167
+        <Form.Item>
168
+          {getFieldDecorator('type')(
169
+            <Select style={{ width: '180px' }} placeholder="咨询类型" onChange={handleSelectChange}>
170
+            </Select>,
171
+          )}
172
+        </Form.Item>       
173
+        <Form.Item>
174
+          {getFieldDecorator('newsStatus')(
175
+            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
176
+              <Option value="1">已发布</Option>
177
+              <Option value="0">未发布</Option>
178
+            </Select>,
179
+          )}
180
+        </Form.Item>
181
+        <Form.Item>
182
+          <Button type="primary" htmlType="submit" className={Styles.SubmitButton}>
183
+            搜索
184
+          </Button>
185
+        </Form.Item>
186
+      </Form>
187
+      <Button type="primary" className={Styles.addButton}>
188
+        新增
189
+      </Button>
190
+
191
+      {/* 卡片内容,显示楼盘项目  */}
192
+      <Row style={{ padding: ' 0 10px' }}>
193
+        {
194
+          dataSource.records.map((item, index) => (
195
+              <Col span={8}>
196
+                <CartBody data={item} key={item.buildingId}/>
197
+              </Col>
198
+            ))
199
+        }
200
+      </Row>
201
+      {/* 分页 */}
202
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
203
+        <Pagination showQuickJumper defaultCurrent={1} total={dataSource.total} onChange={onChange} />
204
+      </div>
205
+    </>
206
+  );
207
+}
208
+const WrappedBody = Form.create({ name: 'body' })(body);
209
+
210
+export default WrappedBody

+ 58
- 0
src/pages/news/list/style.less 查看文件

@@ -0,0 +1,58 @@
1
+.SubmitButton {
2
+    background: #3a91d5;
3
+    border-radius: 7px;
4
+    border: 0px;
5
+  }
6
+  .SelectFrom {
7
+    width: 180px;
8
+    background: #ffffff;
9
+    border-radius: 7px;
10
+    border: 1px solid #dbdbdb;
11
+  }
12
+  .addButton {
13
+    background: #50be00;
14
+    border-radius: 4px;
15
+    border: 0px;
16
+    margin: 10px 0px;
17
+  }
18
+  .cardText {
19
+    font-size: 18px;
20
+    color: #333;
21
+    line-height: 24px;
22
+    display: flex;
23
+    align-items: center;
24
+    position: relative;
25
+  
26
+  }
27
+  .cardItem{
28
+    font-size: 18px;
29
+    font-weight: 400;
30
+    color: #666;
31
+    line-height: 24px;
32
+    display: flex;
33
+    align-items: center;  
34
+  }
35
+  .ediText {
36
+    font-size: 18px;
37
+    color: #ff925c;
38
+    line-height: 24px;
39
+    position: absolute;
40
+    right: 0;
41
+  }
42
+  .title{
43
+    display: inline-block;
44
+    width: 84px;
45
+    justify-content: space-between;
46
+    text-align: justify;
47
+    text-align-last:justify
48
+  }
49
+  
50
+  .address { 
51
+    width: 400px;
52
+    height: 24px; 
53
+    text-overflow: ellipsis; 
54
+    white-space: nowrap;
55
+    overflow: hidden;
56
+  }
57
+  
58
+  

+ 1
- 1
src/pages/news/type/NewsType.jsx 查看文件

@@ -59,7 +59,7 @@ const columns = [
59 59
     title: '类型图片',
60 60
     dataIndex: 'img',
61 61
     key: 'img',
62
-    align: 'center',
62
+    align: 'left',
63 63
     render: (text, record) => <img src={record.img} className={styles.touxiang} />,
64 64
   },
65 65
   {

+ 1
- 1
src/pages/style/GoodsList.less 查看文件

@@ -1,5 +1,5 @@
1 1
 .addBtn {
2
-  padding: 0 30px;
2
+  padding: 0 40px;
3 3
   height: 36px;
4 4
   background-color: #FF7E48;
5 5
   color: #fff;

+ 1
- 1
src/pages/user/login/components/Login/LoginSubmit.jsx 查看文件

@@ -9,7 +9,7 @@ const LoginSubmit = ({ className, ...rest }) => {
9 9
   const clsString = classNames(styles.submit, className);
10 10
   return (
11 11
     <FormItem>
12
-      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ backgroundColor: '#DB3C4B', borderRadius: '4px', border: 'none' }} />
12
+      <Button size="large" className={clsString} type="primary" htmlType="submit" {...rest} style={{ backgroundColor: '#EF273A', borderRadius: '4px', border: 'none' }} />
13 13
     </FormItem>
14 14
   );
15 15
 };

+ 1
- 1
src/pages/user/login/components/Login/index.jsx 查看文件

@@ -118,7 +118,7 @@ class Login extends Component {
118 118
           <div className={styles.con}>
119 119
             <p className={styles.welcome}>Welcome</p>
120 120
             <div className={styles.title}>
121
-              <span style={{fontSize:'18px'}}>ying xiao yun</span>
121
+              <span style={{fontSize:'18px',lineHeight:'18px'}}>ying xiao yun</span>
122 122
               <p className={styles.name}>营销云·系统</p>
123 123
             </div>
124 124
           </div>

+ 9
- 6
src/pages/user/login/components/Login/index.less 查看文件

@@ -9,16 +9,17 @@ position: relative;
9 9
     left:50%;
10 10
     top:50%;
11 11
     margin-top: -100px;
12
-    margin-left: -136px;
12
+    margin-left: -150px;
13 13
     text-align: center;
14 14
     height: 200px;
15
-    width: 272px;
15
+    width: 300px;
16 16
     overflow: hidden;
17 17
     .welcome{
18 18
       color: #fff;
19
-      font-size: 60px;
19
+      font-size: 62px;
20 20
       font-style: italic;
21 21
       margin-bottom: 0;
22
+      font-family: initial;
22 23
     }
23 24
     .title{
24 25
       width: 260px;
@@ -29,7 +30,7 @@ position: relative;
29 30
       padding: 14px  20px;
30 31
       margin:  0 auto;
31 32
       .name{
32
-        font-size: 40px;
33
+        font-size: 41px;
33 34
         margin:0; 
34 35
       }
35 36
     }
@@ -82,8 +83,10 @@ position: relative;
82 83
   }
83 84
 
84 85
   .prefixIcon {
85
-    color: @disabled-color;
86
-    font-size: @font-size-base;
86
+    color: #fff;
87
+    font-size: 18px;
88
+    background-color: #EF273A;
89
+    padding: 3px 4px;
87 90
   }
88 91
 
89 92
   .submit {

+ 42
- 0
src/services/apis.js 查看文件

@@ -1,6 +1,12 @@
1 1
 const prefix = '/api/admin'
2 2
 
3 3
 export default {
4
+  image: {
5
+    upload: {
6
+      url: `${prefix}/antd/image`,
7
+      method: 'POST',
8
+    }
9
+  },
4 10
   user: {
5 11
     current: {
6 12
       method: 'GET',
@@ -39,4 +45,40 @@ export default {
39 45
       url: `${prefix}/tdBuildingType/id`,
40 46
     },
41 47
   },
48
+  news: {
49
+    getList: {
50
+      method: 'GET',
51
+      url: `${prefix}/taNews`,
52
+    },
53
+  },
54
+  customer: {
55
+    drift: {
56
+      method: 'GET',
57
+      url: `${prefix}/customer/recommend/drift`,
58
+    },
59
+    report: {
60
+      method: 'GET',
61
+      url: `${prefix}/customer/recommend/report`,
62
+    },
63
+    recommender: {
64
+      method: 'GET',
65
+      url: `${prefix}/customer/recommend/recommender`,
66
+    },
67
+    auto: {
68
+      method: 'PUT',
69
+      url: `${prefix}/customer/recommend/verify/id`,
70
+    },
71
+    recommendGetById: {
72
+      method: 'GET',
73
+      url: `${prefix}/customer/recommend/getById/id`,
74
+    },
75
+    agents: {
76
+      method: 'GET',
77
+      url: `${prefix}/customer/agents`,
78
+    },
79
+    customerRecommend: {
80
+      method: 'GET',
81
+      url: `${prefix}/customer/recommend`,
82
+    },
83
+  },
42 84
 }

+ 12
- 0
src/services/news.js 查看文件

@@ -0,0 +1,12 @@
1
+import request from '@/utils/request';
2
+
3
+/**
4
+ * 项目
5
+ */
6
+
7
+/**
8
+ * 获取列表
9
+ */
10
+export async function getList() {
11
+  return request('/api/admin/taNews')
12
+}

+ 11
- 0
src/utils/upload.js 查看文件

@@ -0,0 +1,11 @@
1
+import apis from '../services/apis';
2
+
3
+const uploaderProps = {
4
+  name: 'file',
5
+  action: apis.image.upload.url,
6
+  headers: {
7
+    Authorization: `Bearer ${window.localStorage.getItem('x-token')}`
8
+  }
9
+}
10
+
11
+export { uploaderProps }