zlisen 3 anni fa
parent
commit
125f4573e8

+ 2
- 2
config/proxy.js Vedi File

@@ -8,8 +8,8 @@
8 8
 export default {
9 9
   dev: {
10 10
     '/api/': {
11
-      // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://localhost:8081/',
11
+      target: 'https://xlk.njyz.tech/',
12
+      // target: 'http://localhost:8081/',
13 13
       // target: 'https://xlj.newlandsh.com/',
14 14
       changeOrigin: true,
15 15
       pathRewrite: {

+ 44
- 7
config/routes.js Vedi File

@@ -473,27 +473,64 @@ export default [
473 473
           },
474 474
           {
475 475
             //帮我找房页面+
476
-            path: '/home',
476
+            path: '/findRoom',
477 477
             name: '帮我找房',
478 478
             component: '../layouts/BlankLayout',
479 479
             routes: [
480 480
               {
481
-                path: '/home/recommend',
481
+                path: '/findRoom/buyRoom',
482 482
                 name: '找房需求',
483
-                component: './home/recommend/index',
483
+                component: './findRoom/buyRoom',
484 484
               },
485 485
               {
486
-                path: '/home/recommend/audit',
486
+                path: '/findRoom/buyRoom/audit',
487 487
                 name: '回访确认',
488 488
                 hideInMenu: true,
489
-                component: './home/Recommend/audit',
489
+                component: './findRoom/buyRoom/audit',
490
+              },
491
+              
492
+
493
+              {
494
+                path: '/findRoom/rent',
495
+                name: '租房需求',
496
+                component: './findRoom/rent',
497
+              },
498
+              {
499
+                path: '/findRoom/rent/audit',
500
+                name: '回访确认',
501
+                hideInMenu: true,
502
+                component: './findRoom/rent/audit',
503
+              },
504
+
505
+              {
506
+                path: '/findRoom/overseas',
507
+                name: '海外需求',
508
+                component: './findRoom/overseas',
490 509
               },
491 510
               {
492
-                path: '/home/recommend/auditcopy',
511
+                path: '/findRoom/overseas/audit',
493 512
                 name: '回访确认',
494 513
                 hideInMenu: true,
495
-                component: './home/Recommend/auditCopy',
514
+                component: './findRoom/overseas/audit',
496 515
               },
516
+
517
+              {
518
+                path: '/findRoom/addedValueService',
519
+                name: '增值服务',
520
+                component: './findRoom/addedValueService',
521
+              },
522
+              {
523
+                path: '/findRoom/addedValueService/audit',
524
+                name: '回访确认',
525
+                hideInMenu: true,
526
+                component: './findRoom/addedValueService/audit',
527
+              },
528
+              // {
529
+              //   path: '/home/recommend/auditcopy',
530
+              //   name: '回访确认',
531
+              //   hideInMenu: true,
532
+              //   component: './home/Recommend/auditCopy',
533
+              // },
497 534
             ],
498 535
           },
499 536
           {

+ 1
- 1
src/components/SelectButton/InstitutionSelect.jsx Vedi File

@@ -11,7 +11,7 @@ const getTreeFrom = (arr) => {
11 11
     const key = it.institutionCode
12 12
     const node = {
13 13
       key,
14
-      value: key,
14
+      value: it.institutionId,
15 15
       title: it.institutionName,
16 16
       children: it.children,
17 17
       parent: it.parent,

+ 7
- 2
src/pages/building/Developers/Edit.jsx Vedi File

@@ -151,8 +151,13 @@ function Edit(props) {
151 151
             rules: [{ required: true, message: '请输入开发商索引' }],
152 152
           })(<Input style={{width:200}}/>)}
153 153
         </Form.Item>
154
-        <Form.Item label="品牌宣传图">
155
-          {getFieldDecorator('brandImg', {
154
+        <Form.Item label="品牌logo">
155
+          {getFieldDecorator('brandLogo', {
156
+            rules: [{ required: true, message: '请上传品牌logo' }],
157
+        })(<ImageUploader />)}
158
+        </Form.Item>
159
+        <Form.Item label="品牌宣传图" help="建议尺寸:750*750,比例1:1" >
160
+          {getFieldDecorator('brandImg', { 
156 161
             rules: [{ required: true, message: '请上传品牌宣传图' }],
157 162
         })(<ImageUploader />)}
158 163
         </Form.Item>

+ 7
- 0
src/pages/building/Developers/tableColumns.js Vedi File

@@ -22,6 +22,13 @@ export default ({page,getBrandData, onEdit, onDelete}) => [
22 22
     key: 'brandName',
23 23
     align: 'center',
24 24
   },
25
+  {
26
+    title: '品牌宣传图',
27
+    dataIndex: 'brandLogo',
28
+    key: 'brandLogo',
29
+    align: 'center',
30
+    render:(_,record)=> <img src={getImgURL(record.brandLogo)} style={{width:'100px',borderRadius:'5px'}}/>,
31
+  },
25 32
   {
26 33
     title: '品牌宣传图',
27 34
     dataIndex: 'brandImg',

+ 1
- 1
src/pages/building/Edit/Apartment/Form.jsx Vedi File

@@ -14,7 +14,7 @@ const updateData = fetch(apis.building.buildingApartmentUpdate);
14 14
 const saleType = [
15 15
   {
16 16
     id: '1',
17
-    name: '待售',
17
+    name: '未开盘',
18 18
   },
19 19
   {
20 20
     id: '2',

+ 1
- 1
src/pages/building/Edit/Apartment/List.jsx Vedi File

@@ -5,7 +5,7 @@ import moment from 'moment'
5 5
 const saleType = [
6 6
   {
7 7
     id: 1,
8
-    name: '待售',
8
+    name: '未开盘',
9 9
   },
10 10
   {
11 11
     id: 2,

+ 1
- 1
src/pages/building/Edit/Basic/index.jsx Vedi File

@@ -171,7 +171,7 @@ const BuildingBasic = React.forwardRef((props, ref) => {
171 171
           </Form.Item>
172 172
         </FormGroupItem>
173 173
         <Form.Item label="项目说明" >
174
-          {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过30个字" maxLength={30}/>)}
174
+          {getFieldDecorator('dynamic')(<Input placeholder="项目标签补充,不超过30个字" maxLength={30}/>)}
175 175
         </Form.Item>
176 176
         {/* <Form.Item label="物业类型" >
177 177
           {getFieldDecorator('propertyType')(<Input />)}

+ 1
- 1
src/pages/building/List/searchFields.js Vedi File

@@ -33,7 +33,7 @@ export default () => [
33 33
     placeholder: '请选择销售状态',
34 34
     type: 'select',
35 35
     options: [
36
-      {label: '待售', value: '待售'},
36
+      {label: '未开盘', value: '未开盘'},
37 37
       {label: '在售', value: '在售'},
38 38
       {label: '售罄', value: '售罄'},
39 39
       {label: '在租', value: '在租'},

+ 60
- 63
src/pages/carouselFigure/editAdvertising.jsx Vedi File

@@ -31,7 +31,7 @@ const createEditor = () => {
31 31
   let h5Visible = false;
32 32
   let buildingId = '';
33 33
   let cityId = '';
34
-  let isHaveActive = false;
34
+  let isHaveActive = true;
35 35
   let isCanChoose = true;
36 36
   let isHavePosition = false;
37 37
   let islet = true;
@@ -48,7 +48,7 @@ const createEditor = () => {
48 48
     if (data.showPosition == 'index') {
49 49
       isHavePosition = true;
50 50
     } else {
51
-      isHavePosition = false;
51
+      isHavePosition = true;
52 52
     }
53 53
 
54 54
     // if (data.contentType == 'h5' || data.contentType=='live') {
@@ -100,7 +100,7 @@ const createEditor = () => {
100 100
     if (data.showPosition == 'index') {
101 101
       isHavePosition = true;
102 102
     } else {
103
-      isHavePosition = false;
103
+      isHavePosition = true;
104 104
     }
105 105
 
106 106
     contentVisible = data.contentType === 'other';
@@ -152,23 +152,23 @@ const createEditor = () => {
152 152
     };
153 153
 
154 154
     const fields = [
155
-      // {
156
-      //   label: '是否关联项目',
157
-      //   name: 'isHaveActive',
158
-      //   type: FieldTypes.Switch,
159
-      //   value: isHaveActive,
160
-      //   hidden: () => !isCanChoose,
161
-      //   props: {
162
-      //     onChange: () => {
163
-      //       const type = formRef.current.props.form.getFieldValue('contentType');
164
-      //       if (formRef.current && type !== 'live' && type !== 'h5') {
165
-         
166
-      //         formRef.current.props.form.resetFields(['contentType', []]);
167
-      //       }
168
-      //     },
169
-      //   },
170
-      //   rules: [{ required: true, message: '是否城市活动' }],
171
-      // },
155
+      {
156
+        label: '是否关联项目',
157
+        name: 'isHaveActive',
158
+        type: FieldTypes.Switch,
159
+        value: isHaveActive,
160
+        hidden: () => !isCanChoose,
161
+        props: {
162
+          onChange: () => {
163
+            const type = formRef.current.props.form.getFieldValue('contentType');
164
+            if (formRef.current && type !== 'live' && type !== 'h5') {
165
+              console.log(formRef.current.props.form.getFieldValue('contentType'), '2222');
166
+              formRef.current.props.form.resetFields(['contentType', []]);
167
+            }
168
+          },
169
+        },
170
+        rules: [{ required: true, message: '是否城市活动' }],
171
+      },
172 172
       // {
173 173
       //   label: '发布位置',
174 174
       //   name: 'showPosition',
@@ -187,19 +187,19 @@ const createEditor = () => {
187 187
       //   value: data.showPosition,
188 188
       //   rules: [{ required: true, message: '请选择发布位置' }],
189 189
       // },
190
-      // {
191
-      //   label: '所属项目',
192
-      //   name: 'buildingId',
193
-      //   render: <BuildSelect />,
194
-      //   value: data.buildingId,
195
-      //   hidden: () => !isHaveActive && isHavePosition,
196
-      //   rules: [{ required: true, message: '请选择所属项目' }],
197
-      // },
190
+      {
191
+        label: '所属项目',
192
+        name: 'buildingId',
193
+        render: <BuildSelect />,
194
+        value: data.buildingId,
195
+        hidden: () => !isHaveActive && isHavePosition,
196
+        rules: [{ required: true, message: '请选择所属项目' }],
197
+      },
198 198
       {
199 199
         label: '展示城市',
200 200
         name: 'cityId',
201 201
         render: <CitySelect />,
202
-        // hidden: () => !isHavePosition || isHaveActive,
202
+        hidden: () => !isHavePosition || isHaveActive,
203 203
         value: data.cityId,
204 204
         rules: [{ required: true, message: '请选择展示城市' }],
205 205
       },
@@ -211,28 +211,28 @@ const createEditor = () => {
211 211
         help: '建议图片尺寸:640*960px,比例2:3,格式:jpg,用于开屏广告',
212 212
         rules: [{ required: true, message: '请上传图片' }],
213 213
       },
214
-      // {
215
-      //   label: '类型',
216
-      //   name: 'contentType',
217
-      //   type: FieldTypes.Select,
218
-      //   hidden: () => isHaveActive,
219
-      //   dict: [
220
-      //     // {
221
-      //     //   label: 'H5活动详情',
222
-      //     //   value: 'h5',
223
-      //     // },
224
-      //     {
225
-      //       label: '直播活动详情',
226
-      //       value: 'live',
227
-      //     },
228
-      //     {
229
-      //       label: '其它',
230
-      //       value: 'others',
231
-      //     },
232
-      //   ],
233
-      //   value: data.contentType,
234
-      //   rules: [{ required: true, message: '请选择类型' }],
235
-      // },
214
+      {
215
+        label: '类型',
216
+        name: 'contentType',
217
+        type: FieldTypes.Select,
218
+        hidden: () => isHaveActive,
219
+        dict: [
220
+          // {
221
+          //   label: 'H5活动详情',
222
+          //   value: 'h5',
223
+          // },
224
+          {
225
+            label: '直播活动详情',
226
+            value: 'live',
227
+          },
228
+          {
229
+            label: '无',
230
+            value: 'nothing',
231
+          },
232
+        ],
233
+        value: data.contentType,
234
+        rules: [{ required: true, message: '请选择类型' }],
235
+      },
236 236
       {
237 237
         label: '标题',
238 238
         name: 'title',
@@ -244,7 +244,7 @@ const createEditor = () => {
244 244
       {
245 245
         label: '类型',
246 246
         name: 'contentType',
247
-        // hidden: () => !isHaveActive,
247
+        hidden: () => !isHaveActive,
248 248
         type: FieldTypes.Select,
249 249
         dict: [
250 250
           {
@@ -371,15 +371,14 @@ const createEditor = () => {
371 371
 
372 372
     const handleSubmit = val => {
373 373
       val.showType = 'screen';
374
-      // if (!isHaveActive && val.targetId) {
375
-      //   if (!val.contentType) {
376
-      //     val.contentType = 'h5';
377
-      //   }
378
-      // }
379
-      // if (!isHaveActive && !val.targetId) {
380
-      //   val.contentType = '';
381
-      // }
382
-      val.showPosition='index'
374
+      if (!isHaveActive && val.targetId) {
375
+        if (!val.contentType) {
376
+          val.contentType = 'h5';
377
+        }
378
+      }
379
+      if (!isHaveActive && !val.targetId) {
380
+        val.contentType = '';
381
+      }
383 382
       if (contentId) {
384 383
         request({
385 384
           ...apis.carsuseFigure.updataExtendContent,
@@ -387,7 +386,6 @@ const createEditor = () => {
387 386
           data: val,
388 387
         })
389 388
           .then(data => {
390
-            message.info('操作成功');
391 389
             cancelPage();
392 390
           })
393 391
           .catch(err => {
@@ -396,7 +394,6 @@ const createEditor = () => {
396 394
       } else {
397 395
         request({ ...apis.carsuseFigure.addExtendContent, data: val })
398 396
           .then(data => {
399
-            message.info('操作成功');
400 397
             cancelPage();
401 398
           })
402 399
           .catch(err => {

+ 203
- 0
src/pages/findRoom/addedValueService/audit.jsx Vedi File

@@ -0,0 +1,203 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Card, Radio, notification, Select } 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
+const { TextArea } = Input;
10
+const { Option } = Select;
11
+
12
+const tailFormItemLayout = {
13
+  labelCol: {
14
+    xs: { span: 20 },
15
+    sm: { span: 3 },
16
+  },
17
+  wrapperCol: {
18
+    xs: { span: 20 },
19
+    sm: { span: 16 },
20
+  },
21
+};
22
+
23
+const openNotificationWithIcon = (type, message) => {
24
+  notification[type]({
25
+    message,
26
+    description: '',
27
+  });
28
+};
29
+
30
+function body(props) {
31
+  const { getFieldDecorator } = props.form;
32
+
33
+  // eslint-disable-next-line react-hooks/rules-of-hooks
34
+  const [visibleData, setVisibleData] = useState({
35
+    visible: false,
36
+    customerId: '',
37
+    realtyConsultant: '',
38
+    buildingId: '',
39
+  });
40
+
41
+  // eslint-disable-next-line react-hooks/rules-of-hooks
42
+  const [dataSource, setDataSource] = useState({ picture: '' });
43
+
44
+  const { id,type } = props.location.query;
45
+  const disabled= type==='detail'
46
+
47
+  useEffect(() => {
48
+    if (id !== '') {
49
+      getById(id);
50
+    }
51
+  }, [id]);
52
+  // 获取详情信息
53
+  function getById(currentId) {
54
+    request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55
+      // res.reportDate = moment(res.reportDate)
56
+      if (res) {
57
+        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
+        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59
+      }
60
+    });
61
+  }
62
+
63
+  function submitDate(params) {
64
+    // props.form.setFieldsValue(res)
65
+    console.log(params, 'params');
66
+    request({
67
+      ...apis.customer.auto,
68
+      urlData: { id: params.customerId || props.form.getFieldValue('customerId') },
69
+      params: {
70
+        verifyStatus: params.verifyStatus,
71
+        realtyConsultant: props.form.getFieldValue('realtyConsultant'),
72
+      },
73
+    })
74
+      .then(() => {
75
+        // eslint-disable-next-line no-unused-expressions
76
+        openNotificationWithIcon('success', '操作成功');
77
+        router.go(-1);
78
+      })
79
+      .catch(err => {
80
+        // eslint-disable-next-line no-unused-expressions
81
+      });
82
+  }
83
+
84
+  // 提交事件
85
+  function handleSubmit(e) {
86
+    e.preventDefault();
87
+    props.form.validateFields((err, values) => {
88
+      if (!err) {
89
+        submitDate({ verifyStatus: '1' });
90
+        // submitDate({ ...values })
91
+      }
92
+    });
93
+  }
94
+
95
+  return (
96
+    <Card>
97
+      <Form
98
+        {...tailFormItemLayout}
99
+        onSubmit={e => handleSubmit(e)}
100
+        style={{ width: '800px', margin: 'auto' }}
101
+      >
102
+        {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
103
+          {getFieldDecorator('customerId')(<Input placeholder="客户ID" />)}
104
+        </Form.Item> */}
105
+        {/* ············分割线............. */}
106
+        <Form.Item label="意向区域">
107
+          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled}/>)}
108
+        </Form.Item>
109
+        <Form.Item label="客户姓名">
110
+          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled}/>)}
111
+        </Form.Item>
112
+        <Form.Item label="客户电话">
113
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
114
+        </Form.Item>
115
+        <Form.Item label="客户性别">
116
+          {getFieldDecorator('sex')(
117
+            <Radio.Group disabled={disabled}>
118
+              <Radio value={1}>男</Radio>
119
+              <Radio value={2}>女</Radio>
120
+            </Radio.Group>,
121
+          )}
122
+        </Form.Item>
123
+        <Form.Item label="客户预算">
124
+          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
125
+        </Form.Item>
126
+
127
+        <Form.Item label="房屋现状">
128
+          {getFieldDecorator('housetype')(
129
+            <Select placeholder="房屋现状" disabled={disabled}>
130
+              <Option value="新房">毛坯</Option>
131
+              <Option value="旧房装修5年以内">旧房装修5年以内</Option>
132
+              <Option value="旧房装修5-10年">旧房装修5-10年</Option>
133
+              <Option value="旧房装修10年以上">旧房装修10年以上</Option>
134
+            </Select>,
135
+          )}
136
+        </Form.Item>
137
+        <Form.Item label="房屋面积">
138
+          {getFieldDecorator('housetype')(
139
+            <Select placeholder="房屋面积" disabled={disabled}>
140
+              <Option value="1">50m²</Option>
141
+              <Option value="1">50~70m²</Option>
142
+              <Option value="60~90m²">70~90m²</Option>
143
+              <Option value="6~90m²">90~110m²</Option>
144
+              <Option value="110~130m">110~130m²</Option>
145
+              <Option value="130~150m²">130~150m²</Option>  
146
+              <Option value="150~200m²">150~200m²</Option>  
147
+              <Option value="200m²以上">200m²以上</Option>     
148
+            </Select>,
149
+          )}
150
+        </Form.Item>
151
+
152
+        <Form.Item label="家装模式">
153
+          {getFieldDecorator('housetype')(
154
+            <Select placeholder="家装模式" disabled={disabled}>
155
+              <Option value="新房">只做设计</Option>
156
+              <Option value="二手房">材料全包</Option>
157
+              <Option value="不限">包工不包料</Option>
158
+              <Option value="二手房">施工包辅材不包主材</Option>
159
+              <Option value="不限">全包</Option>
160
+            </Select>,
161
+          )}
162
+        </Form.Item>
163
+
164
+        <Form.Item label="家装侧重点">
165
+          {getFieldDecorator('more')(
166
+            <Checkbox.Group disabled={disabled}>
167
+              <Checkbox value="1">独卫</Checkbox>
168
+              <Checkbox value="2">近地铁</Checkbox>
169
+              <Checkbox value="3">拎包入住</Checkbox>
170
+              <Checkbox value="4">精装修</Checkbox>
171
+              <Checkbox value="5">独立阳台</Checkbox>
172
+              <Checkbox value="6">集中供暖</Checkbox>
173
+              <Checkbox value="7">押一付一</Checkbox>
174
+              <Checkbox value="8">双卫</Checkbox>
175
+              <Checkbox value="9">新上</Checkbox>
176
+              <Checkbox value="10">认证公寓</Checkbox>
177
+            </Checkbox.Group>,
178
+          )}
179
+        </Form.Item>
180
+  
181
+
182
+        <Form.Item label="客户备注" >
183
+          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
184
+        </Form.Item>
185
+        <Form.Item label="回访备注">
186
+          {getFieldDecorator('describe', {
187
+            rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
188
+          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
189
+        </Form.Item>
190
+        <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
191
+          <Button type="primary" htmlType="submit">
192
+            有效
193
+          </Button>
194
+          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195
+          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
196
+        </Form.Item>
197
+      </Form>
198
+    </Card>
199
+  );
200
+}
201
+const HouseCopm = Form.create({ name: 'body' })(body);
202
+
203
+export default HouseCopm;

+ 213
- 0
src/pages/findRoom/addedValueService/index.jsx Vedi File

@@ -0,0 +1,213 @@
1
+import React, { PureComponent, useMemo, useState } from 'react';
2
+import { Avatar, Button } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import QueryTable from '@/components/QueryTable'
7
+import { router } from 'umi';
8
+
9
+
10
+/**
11
+ *
12
+ *
13
+ * @param {*} props
14
+ * @returns
15
+ */
16
+
17
+
18
+
19
+
20
+function Recommend() {
21
+  const [exportLoding, setExportLoding] = useState(false)
22
+  //详情页面弹窗配置
23
+  function toAudit(row,type) {
24
+    router.push({
25
+      pathname: '/findRoom/addedValueService/audit',
26
+      query: {
27
+        id: row.id,
28
+        type:type
29
+      },
30
+    })
31
+
32
+  }
33
+//   function toSee(cuurentId) {
34
+//     router.push({
35
+//       pathname: '/home/recommend/auditCopy',
36
+//       query: {
37
+//         id: cuurentId,
38
+//       },
39
+//     })
40
+
41
+//   }
42
+
43
+
44
+  /**
45
+   *导出数据(推荐用户)
46
+   *
47
+   */
48
+  function exportRecommendCustomer() {
49
+    setExportLoding(true)
50
+    request({
51
+      ...apis.customer.customerRecommendRecommenderExport,
52
+      responseType: 'blob',
53
+    }).then(response => {
54
+      console.log('exportRecommendCustomer: ', response)
55
+      download(response)
56
+    }).catch(error => {
57
+
58
+    })
59
+  }
60
+
61
+  function download(data) {
62
+    if (!data) {
63
+      return
64
+    }
65
+    const url = window.URL.createObjectURL(new Blob([data]))
66
+    const link = document.createElement('a')
67
+    link.style.display = 'none'
68
+    link.href = url
69
+    link.setAttribute('download', '找房需求.xlsx')
70
+    document.body.append(link)
71
+    link.click()
72
+    setExportLoding(false)
73
+  }
74
+  const columns = [
75
+    {
76
+      title: '头像',
77
+      dataIndex: 'avatarurl',
78
+      key: 'avatarurl',
79
+      align: 'center',
80
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} />,
81
+    },
82
+    {
83
+      title: '姓名',
84
+      dataIndex: 'nickname',
85
+      key: 'nickname',
86
+      align: 'center',
87
+      // render: (_, record) => <><span>{record.name = '曹建芳'}</span></>,
88
+    },
89
+    {
90
+      title: '电话',
91
+      dataIndex: 'phone',
92
+      key: 'phone',
93
+      align: 'center',
94
+    },
95
+    {
96
+      title: '性别',
97
+      dataIndex: 'gender',
98
+      key: 'gender',
99
+      align: 'center',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><span>{record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知'}</span></>,
102
+    },
103
+    {
104
+      title: '房屋现状',
105
+      dataIndex: 'intentArea',//意向区域
106
+      key: 'intentArea',
107
+      align: 'center',
108
+      // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109
+
110
+    },
111
+    {
112
+      title: '装修预算',
113
+      dataIndex: 'intention',
114
+      key: 'intention',
115
+      align: 'center',
116
+      // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
117
+
118
+    },
119
+    {
120
+      title: '提交时间',
121
+      dataIndex: 'createdTime',
122
+      key: 'createdTime',
123
+      align: 'center',
124
+      render: (_, record) => <><span>{record.createdTime && moment(record.createdTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
125
+    },
126
+    {
127
+      title: '状态',
128
+      dataIndex: 'status',
129
+      key: 'status',
130
+      align: 'center',
131
+      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
132
+    },
133
+    {
134
+      title: '操作',
135
+      dataIndex: 'customerId',
136
+      key: 'customerId',
137
+      align: 'center',
138
+
139
+      render: (_, record) => (
140
+        <><Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>
142
+        {/* <span style={{ color: 'rgba(239,39,58,1)', cursor: 'pointer' }} >
143
+          {record.verifyStatus === 0 ? <span onClick={() => toAudit(record.customerId)}>审核</span>
144
+            : record.verifyStatus === 1 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
145
+              : record.verifyStatus === 2 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
146
+                : ''}</span> */}
147
+        </>
148
+      ),
149
+    },
150
+  ]
151
+
152
+
153
+  const searchFields = [
154
+    {
155
+      name: 'name',
156
+      label: '姓名',
157
+      placeholder: '请输入姓名',
158
+    },
159
+    {
160
+      name: 'tel',
161
+      label: '电话',
162
+      placeholder: '请输入电话',
163
+    },
164
+    // {
165
+    //   name: 'types',
166
+    //   label: '类型',
167
+    //   placeholder: '类型',
168
+    //   type: 'select',
169
+    //   options: [
170
+    //     { label: '全部', value: '' },
171
+    //     { label: '买房', value: '1' },
172
+    //     { label: '租房', value: '2' },
173
+    //     { label: '海外', value: '3' }
174
+    //   ]
175
+    // },
176
+    {
177
+      name: 'verifyStatus',
178
+      label: '状态',
179
+      placeholder: '请选择状态',
180
+      type: 'select',
181
+      placeholder: '全部',//错误
182
+      options: [
183
+        { label: '全部', value: '' },
184
+        { label: '待回访', value: '0' },
185
+        { label: '已回访', value: '1' },
186
+        { label: '无效', value: '2' }
187
+      ]
188
+    },
189
+  ]
190
+  const actionRender = () => {
191
+    return (
192
+      <Button type="danger" loading={exportLoding} onClick={() => exportRecommendCustomer()}>
193
+        导出
194
+      </Button>
195
+    );
196
+  };
197
+
198
+  return (
199
+    <>
200
+      <QueryTable
201
+        rowKey="recommendCustomer"
202
+        // recommendCustomer
203
+        api={apis.searchHouse.list}
204
+        searchFields={searchFields}
205
+        columns={columns}
206
+        actionRender={actionRender}
207
+      />
208
+
209
+    </>
210
+  );
211
+}
212
+
213
+export default Recommend

+ 257
- 0
src/pages/findRoom/buyRoom/audit.jsx Vedi File

@@ -0,0 +1,257 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Card, Radio, notification, Select } 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
+const { TextArea } = Input;
10
+const { Option } = Select;
11
+
12
+const tailFormItemLayout = {
13
+  labelCol: {
14
+    xs: { span: 20 },
15
+    sm: { span: 3 },
16
+  },
17
+  wrapperCol: {
18
+    xs: { span: 20 },
19
+    sm: { span: 16 },
20
+  },
21
+};
22
+
23
+const openNotificationWithIcon = (type, message) => {
24
+  notification[type]({
25
+    message,
26
+    description: '',
27
+  });
28
+};
29
+
30
+function body(props) {
31
+  const { getFieldDecorator } = props.form;
32
+
33
+  // eslint-disable-next-line react-hooks/rules-of-hooks
34
+  const [visibleData, setVisibleData] = useState({
35
+    visible: false,
36
+    customerId: '',
37
+    realtyConsultant: '',
38
+    buildingId: '',
39
+  });
40
+
41
+  // eslint-disable-next-line react-hooks/rules-of-hooks
42
+  const [dataSource, setDataSource] = useState({ picture: '' });
43
+
44
+  const { id,type } = props.location.query;
45
+  const disabled= type==='detail'
46
+
47
+  useEffect(() => {
48
+    if (id !== '') {
49
+      getById(id);
50
+    }
51
+  }, [id]);
52
+  // 获取详情信息
53
+  function getById(currentId) {
54
+    request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55
+      // res.reportDate = moment(res.reportDate)
56
+      if (res) {
57
+        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
+        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59
+      }
60
+    });
61
+  }
62
+
63
+  function submitDate(params) {
64
+    // props.form.setFieldsValue(res)
65
+    console.log(params, 'params');
66
+    request({
67
+      ...apis.customer.auto,
68
+      urlData: { id: params.customerId || props.form.getFieldValue('customerId') },
69
+      params: {
70
+        verifyStatus: params.verifyStatus,
71
+        realtyConsultant: props.form.getFieldValue('realtyConsultant'),
72
+      },
73
+    })
74
+      .then(() => {
75
+        // eslint-disable-next-line no-unused-expressions
76
+        openNotificationWithIcon('success', '操作成功');
77
+        router.go(-1);
78
+      })
79
+      .catch(err => {
80
+        // eslint-disable-next-line no-unused-expressions
81
+      });
82
+  }
83
+
84
+  // 提交事件
85
+  function handleSubmit(e) {
86
+    e.preventDefault();
87
+    props.form.validateFields((err, values) => {
88
+      if (!err) {
89
+        submitDate({ verifyStatus: '1' });
90
+        // submitDate({ ...values })
91
+      }
92
+    });
93
+  }
94
+
95
+  return (
96
+    <Card>
97
+      <Form
98
+        {...tailFormItemLayout}
99
+        onSubmit={e => handleSubmit(e)}
100
+        style={{ width: '800px', margin: 'auto' }}
101
+      >
102
+        {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
103
+          {getFieldDecorator('customerId')(<Input placeholder="客户ID" />)}
104
+        </Form.Item> */}
105
+        {/* ············分割线............. */}
106
+        <Form.Item label="意向区域">
107
+          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled}/>)}
108
+        </Form.Item>
109
+        <Form.Item label="客户姓名">
110
+          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled}/>)}
111
+        </Form.Item>
112
+        <Form.Item label="客户电话">
113
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
114
+        </Form.Item>
115
+        <Form.Item label="客户性别">
116
+          {getFieldDecorator('sex')(
117
+            <Radio.Group disabled={disabled}>
118
+              <Radio value={1}>男</Radio>
119
+              <Radio value={2}>女</Radio>
120
+            </Radio.Group>,
121
+          )}
122
+        </Form.Item>
123
+        <Form.Item label="客户预算">
124
+          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
125
+        </Form.Item>
126
+        <Form.Item label="房屋类型">
127
+          {getFieldDecorator('housetype')(
128
+            <Select placeholder="房屋类型" disabled={disabled}>
129
+              <Option value="新房">新房</Option>
130
+              <Option value="二手房">二手房</Option>
131
+              <Option value="不限">不限</Option>
132
+            </Select>,
133
+          )}
134
+        </Form.Item>
135
+        <Form.Item label="意向居室">
136
+          {getFieldDecorator('housetype')(
137
+            <Select placeholder="意向居室" disabled={disabled}>
138
+              <Option value="一居">一居</Option>
139
+              <Option value="二居">二居</Option>
140
+              <Option value="三居">三居</Option>
141
+              <Option value="四居">四居</Option>
142
+              <Option value="五居">五居</Option>
143
+              <Option value="五居以上">五居以上</Option>
144
+            </Select>,
145
+          )}
146
+        </Form.Item>
147
+
148
+        <Form.Item label="购房目的">
149
+          {getFieldDecorator('housetype')(
150
+            <Select placeholder="购房目的" disabled={disabled}>
151
+              <Option value="刚需">刚需</Option>
152
+              <Option value="结婚">结婚</Option>
153
+              <Option value="养老">养老</Option>
154
+              <Option value="改善">改善</Option>
155
+              <Option value="教育">教育</Option>
156
+              <Option value="投资">投资</Option>
157
+            </Select>,
158
+          )}
159
+        </Form.Item>
160
+        <Form.Item label="侧重优势">
161
+          {getFieldDecorator('housetype')(
162
+            <Select placeholder="侧重优势" disabled={disabled}>
163
+              <Option value="发展规划">发展规划</Option>
164
+              <Option value="学区">学区</Option>
165
+              <Option value="交通">交通</Option>
166
+              <Option value="配套">配套</Option>
167
+              <Option value="环境">环境</Option>
168
+            
169
+            </Select>,
170
+          )}
171
+        </Form.Item>
172
+
173
+        <Form.Item label="社区要求">
174
+          {getFieldDecorator('housetype')(
175
+            <Select placeholder="社区要求" disabled={disabled}>
176
+              <Option value="发展规划">楼栋管家</Option>
177
+              <Option value="学区">金钥匙服务</Option>
178
+              <Option value="交通">社区娱乐</Option>
179
+              <Option value="配套">会所功能</Option>     
180
+            </Select>,
181
+          )}
182
+        </Form.Item>
183
+
184
+        <Form.Item label="面积要求">
185
+          {getFieldDecorator('housetype')(
186
+            <Select placeholder="面积要求" disabled={disabled}>
187
+              <Option value="60m²">60m²</Option>
188
+              <Option value="60~90m²">60~90m²</Option>
189
+              <Option value="110~130m">110~130m²</Option>
190
+              <Option value="130~150m²">130~150m²</Option>  
191
+              <Option value="150~200m²">150~200m²</Option>  
192
+              <Option value="200m²以上">200m²以上</Option>     
193
+            </Select>,
194
+          )}
195
+        </Form.Item>
196
+
197
+        <Form.Item label="朝向要求">
198
+          {getFieldDecorator('housetype')(
199
+            <Select placeholder="朝向要求" disabled={disabled}>
200
+              <Option value="朝东">朝东</Option>
201
+              <Option value="朝南">朝南</Option>
202
+              <Option value="朝西">朝西</Option>
203
+              <Option value="朝北">朝北</Option>  
204
+              <Option value="南北通透">南北通透</Option>  
205
+                
206
+            </Select>,
207
+          )}
208
+        </Form.Item>
209
+
210
+        <Form.Item label="楼层要求" >
211
+          {getFieldDecorator('housetype')(
212
+            <Select placeholder="楼层要求" disabled={disabled}>
213
+             <Option value="低楼层">低楼层</Option>
214
+              <Option value="中楼层">中楼层</Option>
215
+              <Option value="高楼层">高楼层</Option>
216
+              <Option value="底层">底层</Option>  
217
+              <Option value="顶层">顶层</Option>  
218
+                
219
+            </Select>,
220
+          )}
221
+        </Form.Item>
222
+
223
+        <Form.Item label="楼龄要求">
224
+          {getFieldDecorator('housetype')(
225
+            <Select placeholder="楼龄要求" disabled={disabled}>
226
+              <Option value="5年以内">5年以内</Option>
227
+              <Option value="10年以内">10年以内</Option>
228
+              <Option value="15年以内">15年以内</Option>
229
+              <Option value="20年以内">20年以内</Option>  
230
+              <Option value="20年以上">20年以上</Option>  
231
+                
232
+            </Select>,
233
+          )}
234
+        </Form.Item>
235
+
236
+        <Form.Item label="客户备注" >
237
+          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
238
+        </Form.Item>
239
+        <Form.Item label="回访备注">
240
+          {getFieldDecorator('describe', {
241
+            rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
242
+          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
243
+        </Form.Item>
244
+        <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
245
+          <Button type="primary" htmlType="submit">
246
+            有效
247
+          </Button>
248
+          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
249
+          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
250
+        </Form.Item>
251
+      </Form>
252
+    </Card>
253
+  );
254
+}
255
+const HouseCopm = Form.create({ name: 'body' })(body);
256
+
257
+export default HouseCopm;

+ 213
- 0
src/pages/findRoom/buyRoom/index.jsx Vedi File

@@ -0,0 +1,213 @@
1
+import React, { PureComponent, useMemo, useState } from 'react';
2
+import { Avatar, Button } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import QueryTable from '@/components/QueryTable'
7
+import { router } from 'umi';
8
+
9
+
10
+/**
11
+ *
12
+ *
13
+ * @param {*} props
14
+ * @returns
15
+ */
16
+
17
+
18
+
19
+
20
+function Recommend() {
21
+  const [exportLoding, setExportLoding] = useState(false)
22
+  //详情页面弹窗配置
23
+  function toAudit(row,type) {
24
+    router.push({
25
+      pathname: '/findRoom/buyRoom/audit',
26
+      query: {
27
+        id: row.id,
28
+        type:type
29
+      },
30
+    })
31
+
32
+  }
33
+//   function toSee(cuurentId) {
34
+//     router.push({
35
+//       pathname: '/home/recommend/auditCopy',
36
+//       query: {
37
+//         id: cuurentId,
38
+//       },
39
+//     })
40
+
41
+//   }
42
+
43
+
44
+  /**
45
+   *导出数据(推荐用户)
46
+   *
47
+   */
48
+  function exportRecommendCustomer() {
49
+    setExportLoding(true)
50
+    request({
51
+      ...apis.customer.customerRecommendRecommenderExport,
52
+      responseType: 'blob',
53
+    }).then(response => {
54
+      console.log('exportRecommendCustomer: ', response)
55
+      download(response)
56
+    }).catch(error => {
57
+
58
+    })
59
+  }
60
+
61
+  function download(data) {
62
+    if (!data) {
63
+      return
64
+    }
65
+    const url = window.URL.createObjectURL(new Blob([data]))
66
+    const link = document.createElement('a')
67
+    link.style.display = 'none'
68
+    link.href = url
69
+    link.setAttribute('download', '找房需求.xlsx')
70
+    document.body.append(link)
71
+    link.click()
72
+    setExportLoding(false)
73
+  }
74
+  const columns = [
75
+    {
76
+      title: '头像',
77
+      dataIndex: 'avatarurl',
78
+      key: 'avatarurl',
79
+      align: 'center',
80
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} />,
81
+    },
82
+    {
83
+      title: '姓名',
84
+      dataIndex: 'nickname',
85
+      key: 'nickname',
86
+      align: 'center',
87
+      // render: (_, record) => <><span>{record.name = '曹建芳'}</span></>,
88
+    },
89
+    {
90
+      title: '电话',
91
+      dataIndex: 'phone',
92
+      key: 'phone',
93
+      align: 'center',
94
+    },
95
+    {
96
+      title: '性别',
97
+      dataIndex: 'gender',
98
+      key: 'gender',
99
+      align: 'center',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><span>{record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知'}</span></>,
102
+    },
103
+    {
104
+      title: '意向区域',
105
+      dataIndex: 'intentArea',//意向区域
106
+      key: 'intentArea',
107
+      align: 'center',
108
+      // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109
+
110
+    },
111
+    {
112
+      title: '购房预算',
113
+      dataIndex: 'intention',
114
+      key: 'intention',
115
+      align: 'center',
116
+      // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
117
+
118
+    },
119
+    {
120
+      title: '提交时间',
121
+      dataIndex: 'createdTime',
122
+      key: 'createdTime',
123
+      align: 'center',
124
+      render: (_, record) => <><span>{record.createdTime && moment(record.createdTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
125
+    },
126
+    {
127
+      title: '状态',
128
+      dataIndex: 'status',
129
+      key: 'status',
130
+      align: 'center',
131
+      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
132
+    },
133
+    {
134
+      title: '操作',
135
+      dataIndex: 'customerId',
136
+      key: 'customerId',
137
+      align: 'center',
138
+
139
+      render: (_, record) => (
140
+        <><Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>
142
+        {/* <span style={{ color: 'rgba(239,39,58,1)', cursor: 'pointer' }} >
143
+          {record.verifyStatus === 0 ? <span onClick={() => toAudit(record.customerId)}>审核</span>
144
+            : record.verifyStatus === 1 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
145
+              : record.verifyStatus === 2 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
146
+                : ''}</span> */}
147
+        </>
148
+      ),
149
+    },
150
+  ]
151
+
152
+
153
+  const searchFields = [
154
+    {
155
+      name: 'name',
156
+      label: '姓名',
157
+      placeholder: '请输入姓名',
158
+    },
159
+    {
160
+      name: 'tel',
161
+      label: '电话',
162
+      placeholder: '请输入电话',
163
+    },
164
+    // {
165
+    //   name: 'types',
166
+    //   label: '类型',
167
+    //   placeholder: '类型',
168
+    //   type: 'select',
169
+    //   options: [
170
+    //     { label: '全部', value: '' },
171
+    //     { label: '买房', value: '1' },
172
+    //     { label: '租房', value: '2' },
173
+    //     { label: '海外', value: '3' }
174
+    //   ]
175
+    // },
176
+    {
177
+      name: 'verifyStatus',
178
+      label: '状态',
179
+      placeholder: '请选择状态',
180
+      type: 'select',
181
+      placeholder: '全部',//错误
182
+      options: [
183
+        { label: '全部', value: '' },
184
+        { label: '待回访', value: '0' },
185
+        { label: '已回访', value: '1' },
186
+        { label: '无效', value: '2' }
187
+      ]
188
+    },
189
+  ]
190
+  const actionRender = () => {
191
+    return (
192
+      <Button type="danger" loading={exportLoding} onClick={() => exportRecommendCustomer()}>
193
+        导出
194
+      </Button>
195
+    );
196
+  };
197
+
198
+  return (
199
+    <>
200
+      <QueryTable
201
+        rowKey="recommendCustomer"
202
+        // recommendCustomer
203
+        api={apis.searchHouse.list}
204
+        searchFields={searchFields}
205
+        columns={columns}
206
+        actionRender={actionRender}
207
+      />
208
+
209
+    </>
210
+  );
211
+}
212
+
213
+export default Recommend

+ 170
- 0
src/pages/findRoom/overseas/audit.jsx Vedi File

@@ -0,0 +1,170 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Card, Radio, notification, Select } 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
+const { TextArea } = Input;
10
+const { Option } = Select;
11
+
12
+const tailFormItemLayout = {
13
+  labelCol: {
14
+    xs: { span: 20 },
15
+    sm: { span: 3 },
16
+  },
17
+  wrapperCol: {
18
+    xs: { span: 20 },
19
+    sm: { span: 16 },
20
+  },
21
+};
22
+
23
+const openNotificationWithIcon = (type, message) => {
24
+  notification[type]({
25
+    message,
26
+    description: '',
27
+  });
28
+};
29
+
30
+function body(props) {
31
+  const { getFieldDecorator } = props.form;
32
+
33
+  // eslint-disable-next-line react-hooks/rules-of-hooks
34
+  const [visibleData, setVisibleData] = useState({
35
+    visible: false,
36
+    customerId: '',
37
+    realtyConsultant: '',
38
+    buildingId: '',
39
+  });
40
+
41
+  // eslint-disable-next-line react-hooks/rules-of-hooks
42
+  const [dataSource, setDataSource] = useState({ picture: '' });
43
+
44
+  const { id,type } = props.location.query;
45
+  const disabled= type==='detail'
46
+
47
+  useEffect(() => {
48
+    if (id !== '') {
49
+      getById(id);
50
+    }
51
+  }, [id]);
52
+  // 获取详情信息
53
+  function getById(currentId) {
54
+    request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55
+      // res.reportDate = moment(res.reportDate)
56
+      if (res) {
57
+        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
+        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59
+      }
60
+    });
61
+  }
62
+
63
+  function submitDate(params) {
64
+    // props.form.setFieldsValue(res)
65
+    console.log(params, 'params');
66
+    request({
67
+      ...apis.customer.auto,
68
+      urlData: { id: params.customerId || props.form.getFieldValue('customerId') },
69
+      params: {
70
+        verifyStatus: params.verifyStatus,
71
+        realtyConsultant: props.form.getFieldValue('realtyConsultant'),
72
+      },
73
+    })
74
+      .then(() => {
75
+        // eslint-disable-next-line no-unused-expressions
76
+        openNotificationWithIcon('success', '操作成功');
77
+        router.go(-1);
78
+      })
79
+      .catch(err => {
80
+        // eslint-disable-next-line no-unused-expressions
81
+      });
82
+  }
83
+
84
+  // 提交事件
85
+  function handleSubmit(e) {
86
+    e.preventDefault();
87
+    props.form.validateFields((err, values) => {
88
+      if (!err) {
89
+        submitDate({ verifyStatus: '1' });
90
+        // submitDate({ ...values })
91
+      }
92
+    });
93
+  }
94
+
95
+  return (
96
+    <Card>
97
+      <Form
98
+        {...tailFormItemLayout}
99
+        onSubmit={e => handleSubmit(e)}
100
+        style={{ width: '800px', margin: 'auto' }}
101
+      >
102
+        {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
103
+          {getFieldDecorator('customerId')(<Input placeholder="客户ID" />)}
104
+        </Form.Item> */}
105
+        {/* ············分割线............. */}
106
+        <Form.Item label="意向区域">
107
+          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled}/>)}
108
+        </Form.Item>
109
+        <Form.Item label="客户姓名">
110
+          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled}/>)}
111
+        </Form.Item>
112
+        <Form.Item label="客户电话">
113
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
114
+        </Form.Item>
115
+        <Form.Item label="客户性别">
116
+          {getFieldDecorator('sex')(
117
+            <Radio.Group disabled={disabled}>
118
+              <Radio value={1}>男</Radio>
119
+              <Radio value={2}>女</Radio>
120
+            </Radio.Group>,
121
+          )}
122
+        </Form.Item>
123
+        <Form.Item label="客户预算">
124
+          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
125
+        </Form.Item>
126
+        <Form.Item label="房屋类型">
127
+          {getFieldDecorator('housetype')(
128
+            <Select placeholder="房屋类型" disabled={disabled}>
129
+              <Option value="新房">新房</Option>
130
+              <Option value="二手房">二手房</Option>
131
+              <Option value="不限">不限</Option>
132
+            </Select>,
133
+          )}
134
+        </Form.Item>
135
+      
136
+
137
+        <Form.Item label="购房目的">
138
+          {getFieldDecorator('housetype')(
139
+            <Select placeholder="购房目的" disabled={disabled}>
140
+              <Option value="刚需">投资</Option>
141
+              <Option value="结婚">移民</Option>
142
+              <Option value="养老">养老</Option>
143
+              <Option value="改善">留学</Option>
144
+              <Option value="教育">度假</Option>
145
+            </Select>,
146
+          )}
147
+        </Form.Item>
148
+      
149
+        <Form.Item label="客户备注" >
150
+          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
151
+        </Form.Item>
152
+        <Form.Item label="回访备注">
153
+          {getFieldDecorator('describe', {
154
+            rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
155
+          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
156
+        </Form.Item>
157
+        <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
158
+          <Button type="primary" htmlType="submit">
159
+            有效
160
+          </Button>
161
+          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
162
+          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
163
+        </Form.Item>
164
+      </Form>
165
+    </Card>
166
+  );
167
+}
168
+const HouseCopm = Form.create({ name: 'body' })(body);
169
+
170
+export default HouseCopm;

+ 213
- 0
src/pages/findRoom/overseas/index.jsx Vedi File

@@ -0,0 +1,213 @@
1
+import React, { PureComponent, useMemo, useState } from 'react';
2
+import { Avatar, Button } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import QueryTable from '@/components/QueryTable'
7
+import { router } from 'umi';
8
+
9
+
10
+/**
11
+ *
12
+ *
13
+ * @param {*} props
14
+ * @returns
15
+ */
16
+
17
+
18
+
19
+
20
+function Recommend() {
21
+  const [exportLoding, setExportLoding] = useState(false)
22
+  //详情页面弹窗配置
23
+  function toAudit(row,type) {
24
+    router.push({
25
+      pathname: '/findRoom/overseas/audit',
26
+      query: {
27
+        id: row.id,
28
+        type:type
29
+      },
30
+    })
31
+
32
+  }
33
+//   function toSee(cuurentId) {
34
+//     router.push({
35
+//       pathname: '/home/recommend/auditCopy',
36
+//       query: {
37
+//         id: cuurentId,
38
+//       },
39
+//     })
40
+
41
+//   }
42
+
43
+
44
+  /**
45
+   *导出数据(推荐用户)
46
+   *
47
+   */
48
+  function exportRecommendCustomer() {
49
+    setExportLoding(true)
50
+    request({
51
+      ...apis.customer.customerRecommendRecommenderExport,
52
+      responseType: 'blob',
53
+    }).then(response => {
54
+      console.log('exportRecommendCustomer: ', response)
55
+      download(response)
56
+    }).catch(error => {
57
+
58
+    })
59
+  }
60
+
61
+  function download(data) {
62
+    if (!data) {
63
+      return
64
+    }
65
+    const url = window.URL.createObjectURL(new Blob([data]))
66
+    const link = document.createElement('a')
67
+    link.style.display = 'none'
68
+    link.href = url
69
+    link.setAttribute('download', '找房需求.xlsx')
70
+    document.body.append(link)
71
+    link.click()
72
+    setExportLoding(false)
73
+  }
74
+  const columns = [
75
+    {
76
+      title: '头像',
77
+      dataIndex: 'avatarurl',
78
+      key: 'avatarurl',
79
+      align: 'center',
80
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} />,
81
+    },
82
+    {
83
+      title: '姓名',
84
+      dataIndex: 'nickname',
85
+      key: 'nickname',
86
+      align: 'center',
87
+      // render: (_, record) => <><span>{record.name = '曹建芳'}</span></>,
88
+    },
89
+    {
90
+      title: '电话',
91
+      dataIndex: 'phone',
92
+      key: 'phone',
93
+      align: 'center',
94
+    },
95
+    {
96
+      title: '性别',
97
+      dataIndex: 'gender',
98
+      key: 'gender',
99
+      align: 'center',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><span>{record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知'}</span></>,
102
+    },
103
+    {
104
+      title: '意向国家/区域',
105
+      dataIndex: 'intentArea',//意向区域
106
+      key: 'intentArea',
107
+      align: 'center',
108
+      // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109
+
110
+    },
111
+    {
112
+      title: '购房预算',
113
+      dataIndex: 'intention',
114
+      key: 'intention',
115
+      align: 'center',
116
+      render:(x)=>x&&<span>{x}万</span>
117
+
118
+    },
119
+    {
120
+      title: '提交时间',
121
+      dataIndex: 'createdTime',
122
+      key: 'createdTime',
123
+      align: 'center',
124
+      render: (_, record) => <><span>{record.createdTime && moment(record.createdTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
125
+    },
126
+    {
127
+      title: '状态',
128
+      dataIndex: 'status',
129
+      key: 'status',
130
+      align: 'center',
131
+      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
132
+    },
133
+    {
134
+      title: '操作',
135
+      dataIndex: 'customerId',
136
+      key: 'customerId',
137
+      align: 'center',
138
+
139
+      render: (_, record) => (
140
+        <><Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>
142
+        {/* <span style={{ color: 'rgba(239,39,58,1)', cursor: 'pointer' }} >
143
+          {record.verifyStatus === 0 ? <span onClick={() => toAudit(record.customerId)}>审核</span>
144
+            : record.verifyStatus === 1 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
145
+              : record.verifyStatus === 2 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
146
+                : ''}</span> */}
147
+        </>
148
+      ),
149
+    },
150
+  ]
151
+
152
+
153
+  const searchFields = [
154
+    {
155
+      name: 'name',
156
+      label: '姓名',
157
+      placeholder: '请输入姓名',
158
+    },
159
+    {
160
+      name: 'tel',
161
+      label: '电话',
162
+      placeholder: '请输入电话',
163
+    },
164
+    // {
165
+    //   name: 'types',
166
+    //   label: '类型',
167
+    //   placeholder: '类型',
168
+    //   type: 'select',
169
+    //   options: [
170
+    //     { label: '全部', value: '' },
171
+    //     { label: '买房', value: '1' },
172
+    //     { label: '租房', value: '2' },
173
+    //     { label: '海外', value: '3' }
174
+    //   ]
175
+    // },
176
+    {
177
+      name: 'verifyStatus',
178
+      label: '状态',
179
+      placeholder: '请选择状态',
180
+      type: 'select',
181
+      placeholder: '全部',//错误
182
+      options: [
183
+        { label: '全部', value: '' },
184
+        { label: '待回访', value: '0' },
185
+        { label: '已回访', value: '1' },
186
+        { label: '无效', value: '2' }
187
+      ]
188
+    },
189
+  ]
190
+  const actionRender = () => {
191
+    return (
192
+      <Button type="danger" loading={exportLoding} onClick={() => exportRecommendCustomer()}>
193
+        导出
194
+      </Button>
195
+    );
196
+  };
197
+
198
+  return (
199
+    <>
200
+      <QueryTable
201
+        rowKey="recommendCustomer"
202
+        // recommendCustomer
203
+        api={apis.searchHouse.list}
204
+        searchFields={searchFields}
205
+        columns={columns}
206
+        actionRender={actionRender}
207
+      />
208
+
209
+    </>
210
+  );
211
+}
212
+
213
+export default Recommend

+ 188
- 0
src/pages/findRoom/rent/audit.jsx Vedi File

@@ -0,0 +1,188 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Card, Radio, notification, Select,Checkbox } 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
+const { TextArea } = Input;
10
+const { Option } = Select;
11
+
12
+const tailFormItemLayout = {
13
+  labelCol: {
14
+    xs: { span: 20 },
15
+    sm: { span: 3 },
16
+  },
17
+  wrapperCol: {
18
+    xs: { span: 20 },
19
+    sm: { span: 16 },
20
+  },
21
+};
22
+
23
+const openNotificationWithIcon = (type, message) => {
24
+  notification[type]({
25
+    message,
26
+    description: '',
27
+  });
28
+};
29
+
30
+function body(props) {
31
+  const { getFieldDecorator } = props.form;
32
+
33
+  // eslint-disable-next-line react-hooks/rules-of-hooks
34
+  const [visibleData, setVisibleData] = useState({
35
+    visible: false,
36
+    customerId: '',
37
+    realtyConsultant: '',
38
+    buildingId: '',
39
+  });
40
+
41
+  // eslint-disable-next-line react-hooks/rules-of-hooks
42
+  const [dataSource, setDataSource] = useState({ picture: '' });
43
+
44
+  const { id, type } = props.location.query;
45
+  const disabled = type === 'detail';
46
+
47
+  useEffect(() => {
48
+    if (id !== '') {
49
+      getById(id);
50
+    }
51
+  }, [id]);
52
+  // 获取详情信息
53
+  function getById(currentId) {
54
+    request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55
+      // res.reportDate = moment(res.reportDate)
56
+      if (res) {
57
+        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
+        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59
+      }
60
+    });
61
+  }
62
+
63
+  function submitDate(params) {
64
+    // props.form.setFieldsValue(res)
65
+    console.log(params, 'params');
66
+    request({
67
+      ...apis.customer.auto,
68
+      urlData: { id: params.customerId || props.form.getFieldValue('customerId') },
69
+      params: {
70
+        verifyStatus: params.verifyStatus,
71
+        realtyConsultant: props.form.getFieldValue('realtyConsultant'),
72
+      },
73
+    })
74
+      .then(() => {
75
+        // eslint-disable-next-line no-unused-expressions
76
+        openNotificationWithIcon('success', '操作成功');
77
+        router.go(-1);
78
+      })
79
+      .catch(err => {
80
+        // eslint-disable-next-line no-unused-expressions
81
+      });
82
+  }
83
+
84
+  // 提交事件
85
+  function handleSubmit(e) {
86
+    e.preventDefault();
87
+    props.form.validateFields((err, values) => {
88
+      if (!err) {
89
+        submitDate({ verifyStatus: '1' });
90
+        // submitDate({ ...values })
91
+      }
92
+    });
93
+  }
94
+
95
+  return (
96
+    <Card>
97
+      <Form
98
+        {...tailFormItemLayout}
99
+        onSubmit={e => handleSubmit(e)}
100
+        style={{ width: '800px', margin: 'auto' }}
101
+      >
102
+        {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
103
+          {getFieldDecorator('customerId')(<Input placeholder="客户ID" />)}
104
+        </Form.Item> */}
105
+        {/* ············分割线............. */}
106
+        <Form.Item label="意向区域">
107
+          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled} />)}
108
+        </Form.Item>
109
+        <Form.Item label="客户姓名">
110
+          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled} />)}
111
+        </Form.Item>
112
+        <Form.Item label="客户电话">
113
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled} />)}
114
+        </Form.Item>
115
+        <Form.Item label="客户性别">
116
+          {getFieldDecorator('sex')(
117
+            <Radio.Group disabled={disabled}>
118
+              <Radio value={1}>男</Radio>
119
+              <Radio value={2}>女</Radio>
120
+            </Radio.Group>,
121
+          )}
122
+        </Form.Item>
123
+        <Form.Item label="客户预算">
124
+          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="元/月"/>)}
125
+        </Form.Item>
126
+        <Form.Item label="房屋类型">
127
+          {getFieldDecorator('housetype')(
128
+            <Select placeholder="房屋类型" disabled={disabled}>
129
+              <Option value="新房">新房</Option>
130
+              <Option value="二手房">二手房</Option>
131
+              <Option value="不限">不限</Option>
132
+            </Select>,
133
+          )}
134
+        </Form.Item>
135
+        <Form.Item label="意向居室">
136
+          {getFieldDecorator('housetype')(
137
+            <Select placeholder="意向居室" disabled={disabled}>
138
+              <Option value="一居">一居</Option>
139
+              <Option value="二居">二居</Option>
140
+              <Option value="三居">三居</Option>
141
+              <Option value="四居">四居</Option>
142
+              <Option value="五居">五居</Option>
143
+              <Option value="五居以上">五居以上</Option>
144
+            </Select>,
145
+          )}
146
+        </Form.Item>
147
+
148
+        <Form.Item label="意向居室">
149
+          {getFieldDecorator('more')(
150
+            <Checkbox.Group disabled={disabled}>
151
+              <Checkbox value="1">独卫</Checkbox>
152
+              <Checkbox value="2">近地铁</Checkbox>
153
+              <Checkbox value="3">拎包入住</Checkbox>
154
+              <Checkbox value="4">精装修</Checkbox>
155
+              <Checkbox value="5">独立阳台</Checkbox>
156
+              <Checkbox value="6">集中供暖</Checkbox>
157
+              <Checkbox value="7">押一付一</Checkbox>
158
+              <Checkbox value="8">双卫</Checkbox>
159
+              <Checkbox value="9">新上</Checkbox>
160
+              <Checkbox value="10">认证公寓</Checkbox>
161
+            </Checkbox.Group>,
162
+          )}
163
+        </Form.Item>
164
+
165
+        <Form.Item label="客户备注">
166
+          {getFieldDecorator('say')(
167
+            <TextArea placeholder="客户描述" disabled={disabled} rows={7} />,
168
+          )}
169
+        </Form.Item>
170
+        <Form.Item label="回访备注">
171
+          {getFieldDecorator('describe', {
172
+            rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
173
+          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
174
+        </Form.Item>
175
+        <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
176
+          <Button type="primary" htmlType="submit">
177
+            有效
178
+          </Button>
179
+          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180
+          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
181
+        </Form.Item>
182
+      </Form>
183
+    </Card>
184
+  );
185
+}
186
+const HouseCopm = Form.create({ name: 'body' })(body);
187
+
188
+export default HouseCopm;

+ 213
- 0
src/pages/findRoom/rent/index.jsx Vedi File

@@ -0,0 +1,213 @@
1
+import React, { PureComponent, useMemo, useState } from 'react';
2
+import { Avatar, Button } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import QueryTable from '@/components/QueryTable'
7
+import { router } from 'umi';
8
+
9
+
10
+/**
11
+ *
12
+ *
13
+ * @param {*} props
14
+ * @returns
15
+ */
16
+
17
+
18
+
19
+
20
+function Recommend() {
21
+  const [exportLoding, setExportLoding] = useState(false)
22
+  //详情页面弹窗配置
23
+  function toAudit(row,type) {
24
+    router.push({
25
+      pathname: '/findRoom/rent/audit',
26
+      query: {
27
+        id: row.id,
28
+        type:type
29
+      },
30
+    })
31
+
32
+  }
33
+//   function toSee(cuurentId) {
34
+//     router.push({
35
+//       pathname: '/home/recommend/auditCopy',
36
+//       query: {
37
+//         id: cuurentId,
38
+//       },
39
+//     })
40
+
41
+//   }
42
+
43
+
44
+  /**
45
+   *导出数据(推荐用户)
46
+   *
47
+   */
48
+  function exportRecommendCustomer() {
49
+    setExportLoding(true)
50
+    request({
51
+      ...apis.customer.customerRecommendRecommenderExport,
52
+      responseType: 'blob',
53
+    }).then(response => {
54
+      console.log('exportRecommendCustomer: ', response)
55
+      download(response)
56
+    }).catch(error => {
57
+
58
+    })
59
+  }
60
+
61
+  function download(data) {
62
+    if (!data) {
63
+      return
64
+    }
65
+    const url = window.URL.createObjectURL(new Blob([data]))
66
+    const link = document.createElement('a')
67
+    link.style.display = 'none'
68
+    link.href = url
69
+    link.setAttribute('download', '找房需求.xlsx')
70
+    document.body.append(link)
71
+    link.click()
72
+    setExportLoding(false)
73
+  }
74
+  const columns = [
75
+    {
76
+      title: '头像',
77
+      dataIndex: 'avatarurl',
78
+      key: 'avatarurl',
79
+      align: 'center',
80
+      render: (_, record) => <Avatar shape="square" src={record.avatarurl} size={64} />,
81
+    },
82
+    {
83
+      title: '姓名',
84
+      dataIndex: 'nickname',
85
+      key: 'nickname',
86
+      align: 'center',
87
+      // render: (_, record) => <><span>{record.name = '曹建芳'}</span></>,
88
+    },
89
+    {
90
+      title: '电话',
91
+      dataIndex: 'phone',
92
+      key: 'phone',
93
+      align: 'center',
94
+    },
95
+    {
96
+      title: '性别',
97
+      dataIndex: 'gender',
98
+      key: 'gender',
99
+      align: 'center',
100
+      // eslint-disable-next-line no-nested-ternary
101
+      render: (_, record) => <><span>{record.gender === '1' ? '男' : record.gender === '2' ? '女' : '未知'}</span></>,
102
+    },
103
+    {
104
+      title: '意向区域',
105
+      dataIndex: 'intentArea',//意向区域
106
+      key: 'intentArea',
107
+      align: 'center',
108
+      // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109
+
110
+    },
111
+    {
112
+      title: '租房预算(元/月)',
113
+      dataIndex: 'intention',
114
+      key: 'intention',
115
+      align: 'center',
116
+      // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
117
+
118
+    },
119
+    {
120
+      title: '提交时间',
121
+      dataIndex: 'createdTime',
122
+      key: 'createdTime',
123
+      align: 'center',
124
+      render: (_, record) => <><span>{record.createdTime && moment(record.createdTime).format('YYYY-MM-DD HH:mm:ss')}</span></>,
125
+    },
126
+    {
127
+      title: '状态',
128
+      dataIndex: 'status',
129
+      key: 'status',
130
+      align: 'center',
131
+      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
132
+    },
133
+    {
134
+      title: '操作',
135
+      dataIndex: 'customerId',
136
+      key: 'customerId',
137
+      align: 'center',
138
+
139
+      render: (_, record) => (
140
+        <><Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>
142
+        {/* <span style={{ color: 'rgba(239,39,58,1)', cursor: 'pointer' }} >
143
+          {record.verifyStatus === 0 ? <span onClick={() => toAudit(record.customerId)}>审核</span>
144
+            : record.verifyStatus === 1 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
145
+              : record.verifyStatus === 2 ? <span onClick={() => toSee(record.customerId)}>查看详情</span>
146
+                : ''}</span> */}
147
+        </>
148
+      ),
149
+    },
150
+  ]
151
+
152
+
153
+  const searchFields = [
154
+    {
155
+      name: 'name',
156
+      label: '姓名',
157
+      placeholder: '请输入姓名',
158
+    },
159
+    {
160
+      name: 'tel',
161
+      label: '电话',
162
+      placeholder: '请输入电话',
163
+    },
164
+    // {
165
+    //   name: 'types',
166
+    //   label: '类型',
167
+    //   placeholder: '类型',
168
+    //   type: 'select',
169
+    //   options: [
170
+    //     { label: '全部', value: '' },
171
+    //     { label: '买房', value: '1' },
172
+    //     { label: '租房', value: '2' },
173
+    //     { label: '海外', value: '3' }
174
+    //   ]
175
+    // },
176
+    {
177
+      name: 'verifyStatus',
178
+      label: '状态',
179
+      placeholder: '请选择状态',
180
+      type: 'select',
181
+      placeholder: '全部',//错误
182
+      options: [
183
+        { label: '全部', value: '' },
184
+        { label: '待回访', value: '0' },
185
+        { label: '已回访', value: '1' },
186
+        { label: '无效', value: '2' }
187
+      ]
188
+    },
189
+  ]
190
+  const actionRender = () => {
191
+    return (
192
+      <Button type="danger" loading={exportLoding} onClick={() => exportRecommendCustomer()}>
193
+        导出
194
+      </Button>
195
+    );
196
+  };
197
+
198
+  return (
199
+    <>
200
+      <QueryTable
201
+        rowKey="recommendCustomer"
202
+        // recommendCustomer
203
+        api={apis.searchHouse.list}
204
+        searchFields={searchFields}
205
+        columns={columns}
206
+        actionRender={actionRender}
207
+      />
208
+
209
+    </>
210
+  );
211
+}
212
+
213
+export default Recommend

+ 4
- 3
src/pages/staff/staff/Edit/index.jsx Vedi File

@@ -1,6 +1,6 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { Input, Card, message, Select } from 'antd';
3
-import OrganizationSelect from '@/components/SelectButton/OrganizationSelect';
3
+import InstitutionSelect from '@/components/SelectButton/InstitutionSelect';
4 4
 import router from 'umi/router';
5 5
 import { FieldTypes, createForm } from '@/components/XForm';
6 6
 import apis from '@/services/apis';
@@ -70,6 +70,7 @@ const StaffEdit = props => {
70 70
   }, []);
71 71
 
72 72
   const handleSubmit = val => {
73
+    // val.institutionIdLis =  val.institutionIdLis.join(',')
73 74
     if (userId) {
74 75
       request({ ...apis.staff.updateTaUser, urlData: { id: userId }, data: val })
75 76
         .then(data => {
@@ -200,8 +201,8 @@ const StaffEdit = props => {
200 201
     },
201 202
     {
202 203
       label: '组织机构',
203
-      name: 'institutionId',
204
-      render: <OrganizationSelect />,
204
+      name: 'institutionIdLis',
205
+      render: <InstitutionSelect multiple/>,
205 206
       value: userData.institutionId,
206 207
       rules: [{ required: true, message: '组织机构' }],
207 208
     },