zlisen 3 years ago
parent
commit
a7aaadc5d6

+ 24
- 5
config/routes.js View File

108
                 hideInMenu: true,
108
                 hideInMenu: true,
109
                 component: './customer/Customer/PublicCustomer/publicCustomerDetail',
109
                 component: './customer/Customer/PublicCustomer/publicCustomerDetail',
110
               },
110
               },
111
+
112
+               {
113
+                path: '/customer/recommend/channel',
114
+                name: '经纪人报备',
115
+                component: './recommend/channel',
116
+              },
111
               {
117
               {
112
-                path: '/customer/recommend/list',
113
-                name: '推荐记录',
114
-                component: './customer/Recommend',
118
+                path: '/customer/recommend/channel/audit',
119
+                name: '到访确认',
120
+                hideInMenu: true,
121
+                component: './recommend/channel/audit',
115
               },
122
               },
116
               {
123
               {
117
-                path: '/customer/recommend/audit',
124
+                path: '/customer/recommend/customer',
125
+                name: '普通客户推荐',
126
+                component: './recommend/customer',
127
+              },
128
+              {
129
+                path: '/customer/recommend/customer/audit',
118
                 name: '客户审核',
130
                 name: '客户审核',
119
                 hideInMenu: true,
131
                 hideInMenu: true,
120
-                component: './customer/Recommend/audit',
132
+                component: './recommend/customer/audit',
121
               },
133
               },
134
+
135
+             
122
             ],
136
             ],
123
           },
137
           },
124
 
138
 
582
                 path: '/findRoom/setting',
596
                 path: '/findRoom/setting',
583
                 name: '回访设置',
597
                 name: '回访设置',
584
                 component: './findRoom/setting',
598
                 component: './findRoom/setting',
599
+              },
600
+               {
601
+                path: '/findRoom/messageList',
602
+                name: '客户留言',
603
+                component: './system/messageList',
585
               },
604
               },
586
               // {
605
               // {
587
               //   path: '/home/recommend/auditcopy',
606
               //   path: '/home/recommend/auditcopy',

+ 4
- 1
src/components/SelectButton/BuildSelect2.jsx View File

22
 const BuildingSelect2 = props => {
22
 const BuildingSelect2 = props => {
23
   const [data, setData] = useState([])
23
   const [data, setData] = useState([])
24
   const [value, setValue] = useState([])
24
   const [value, setValue] = useState([])
25
+  const {cityId,disabled=false} = props
25
   console.log('props', props.cityId);
26
   console.log('props', props.cityId);
26
   useEffect(() => {
27
   useEffect(() => {
27
     getBuildList();
28
     getBuildList();
67
       onChange={ onChange}
68
       onChange={ onChange}
68
       filterOption={(input, option) =>
69
       filterOption={(input, option) =>
69
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
70
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
70
-      }>
71
+      }
72
+      disabled={disabled}
73
+      >
71
       {data.map(building => (
74
       {data.map(building => (
72
         <Option key={building.buildingId} value={building.buildingId}>{building.buildingName}</Option>
75
         <Option key={building.buildingId} value={building.buildingId}>{building.buildingName}</Option>
73
       ))}
76
       ))}

+ 3
- 1
src/components/SelectButton/channelSelect.jsx View File

13
  */
13
  */
14
 const ChannelSelect = props => {
14
 const ChannelSelect = props => {
15
   const [data, setData] = useState([])
15
   const [data, setData] = useState([])
16
+  const {disabled=false}=props
16
   useEffect(() => {
17
   useEffect(() => {
17
     getChannelSelect();
18
     getChannelSelect();
18
   }, [props.value])
19
   }, [props.value])
36
       onChange={props.onChange}
37
       onChange={props.onChange}
37
       filterOption={(input, option) =>
38
       filterOption={(input, option) =>
38
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
39
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
39
-      }>
40
+      }
41
+      disabled={disabled}>
40
       {all && <Option key="" value="">全部渠道</Option>}
42
       {all && <Option key="" value="">全部渠道</Option>}
41
       {data.map(Item => (
43
       {data.map(Item => (
42
         <Option key={Item.channelId} value={Item.channelId}> {Item.channelName} </Option>
44
         <Option key={Item.channelId} value={Item.channelId}> {Item.channelName} </Option>

+ 1
- 1
src/components/SelectButton/consultantSelect.jsx View File

37
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
37
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
38
       }>
38
       }>
39
       {data.map(Item => (
39
       {data.map(Item => (
40
-        <Option key={Item.userId} value={Item.userId}> {Item.userName} </Option>
40
+        <Option key={Item.userId} value={`${Item.userId}`}> {Item.userName} </Option>
41
       ))}
41
       ))}
42
     </Select>
42
     </Select>
43
   )
43
   )

+ 2
- 2
src/pages/Live/LiveActivity/Edit/index.jsx View File

78
         <TabPane tab="基本信息" key="1">
78
         <TabPane tab="基本信息" key="1">
79
           <Base liveActivityId={{ liveId }} onSuccess={e => buildingOnSuccess(e)} />
79
           <Base liveActivityId={{ liveId }} onSuccess={e => buildingOnSuccess(e)} />
80
         </TabPane>
80
         </TabPane>
81
-        <TabPane tab="海报设置" key="2">
81
+        {/* <TabPane tab="海报设置" key="2">
82
           <Poster liveActivityId={{ liveId }} />
82
           <Poster liveActivityId={{ liveId }} />
83
         </TabPane>
83
         </TabPane>
84
         <TabPane tab="分享设置" key="3">
84
         <TabPane tab="分享设置" key="3">
85
           <Share liveActivityId={{ liveId }} />
85
           <Share liveActivityId={{ liveId }} />
86
-        </TabPane>
86
+        </TabPane> */}
87
         <TabPane tab="分享记录" key="4">
87
         <TabPane tab="分享记录" key="4">
88
           <ShareRecord liveActivityId={{ liveId }} />
88
           <ShareRecord liveActivityId={{ liveId }} />
89
         </TabPane>
89
         </TabPane>

+ 2
- 2
src/pages/activity/SignupActivity/detail.jsx View File

237
         <TabPane tab="基础信息" key="1">
237
         <TabPane tab="基础信息" key="1">
238
           <Basic dynamicId={dynamicId} detailData={detailData} />
238
           <Basic dynamicId={dynamicId} detailData={detailData} />
239
         </TabPane>
239
         </TabPane>
240
-        <TabPane tab="海报图片" key="2">
240
+        {/* <TabPane tab="海报图片" key="2">
241
           <Poster target={target} />
241
           <Poster target={target} />
242
         </TabPane>
242
         </TabPane>
243
         <TabPane tab="分享设置" key="3">
243
         <TabPane tab="分享设置" key="3">
244
           <Share target={target} />
244
           <Share target={target} />
245
-        </TabPane>
245
+        </TabPane> */}
246
       </Tabs>
246
       </Tabs>
247
     </Card>
247
     </Card>
248
   );
248
   );

+ 2
- 2
src/pages/activity/SignupActivity/edit/index.jsx View File

24
         <TabPane tab="基础信息" key="1">
24
         <TabPane tab="基础信息" key="1">
25
           <Basic dynamicId={dynamicId} type={type}/>
25
           <Basic dynamicId={dynamicId} type={type}/>
26
         </TabPane>
26
         </TabPane>
27
-        <TabPane tab="海报图片" key="2">
27
+        {/* <TabPane tab="海报图片" key="2">
28
           <Poster target={target} />
28
           <Poster target={target} />
29
         </TabPane>
29
         </TabPane>
30
         <TabPane tab="分享设置" key="3">
30
         <TabPane tab="分享设置" key="3">
31
           <Share target={target} />
31
           <Share target={target} />
32
-        </TabPane>
32
+        </TabPane> */}
33
       </Tabs>
33
       </Tabs>
34
     </Card>
34
     </Card>
35
   );
35
   );

+ 2
- 2
src/pages/activity/groupRoomActivity/detail.jsx View File

237
       <div>
237
       <div>
238
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
238
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
239
           <Radio.Button value="basic">基本信息</Radio.Button>
239
           <Radio.Button value="basic">基本信息</Radio.Button>
240
-          <Radio.Button value="poster">海报图片</Radio.Button>
241
-          <Radio.Button value="share">分享设置</Radio.Button>
240
+          {/* <Radio.Button value="poster">海报图片</Radio.Button>
241
+          <Radio.Button value="share">分享设置</Radio.Button> */}
242
         </Radio.Group>
242
         </Radio.Group>
243
       </div>
243
       </div>
244
       <div>
244
       <div>

+ 2
- 2
src/pages/activity/groupRoomActivity/edit/index.jsx View File

21
       <div>
21
       <div>
22
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
22
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
23
           <Radio.Button value="basic">基本信息</Radio.Button>
23
           <Radio.Button value="basic">基本信息</Radio.Button>
24
-          <Radio.Button value="poster">海报图片</Radio.Button>
25
-          <Radio.Button value="share">分享设置</Radio.Button>
24
+          {/* <Radio.Button value="poster">海报图片</Radio.Button>
25
+          <Radio.Button value="share">分享设置</Radio.Button> */}
26
         </Radio.Group>
26
         </Radio.Group>
27
       </div>
27
       </div>
28
       <div>
28
       <div>

+ 2
- 2
src/pages/activity/lookHouseActivity/detail.jsx View File

237
       <div>
237
       <div>
238
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
238
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
239
           <Radio.Button value="basic">基本信息</Radio.Button>
239
           <Radio.Button value="basic">基本信息</Radio.Button>
240
-          <Radio.Button value="poster">海报图片</Radio.Button>
241
-          <Radio.Button value="share">分享设置</Radio.Button>
240
+          {/* <Radio.Button value="poster">海报图片</Radio.Button>
241
+          <Radio.Button value="share">分享设置</Radio.Button> */}
242
         </Radio.Group>
242
         </Radio.Group>
243
       </div>
243
       </div>
244
       <div>
244
       <div>

+ 2
- 2
src/pages/activity/lookHouseActivity/edit/index.jsx View File

21
       <div>
21
       <div>
22
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
22
         <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
23
           <Radio.Button value="basic">基本信息</Radio.Button>
23
           <Radio.Button value="basic">基本信息</Radio.Button>
24
-          <Radio.Button value="poster">海报图片</Radio.Button>
25
-          <Radio.Button value="share">分享设置</Radio.Button>
24
+          {/* <Radio.Button value="poster">海报图片</Radio.Button>
25
+          <Radio.Button value="share">分享设置</Radio.Button> */}
26
         </Radio.Group>
26
         </Radio.Group>
27
       </div>
27
       </div>
28
       <div>
28
       <div>

+ 4
- 4
src/pages/news/list/Edit.jsx View File

36
 
36
 
37
   return (
37
   return (
38
     <Card>
38
     <Card>
39
-      <Tabs defaultActiveKey="1">
40
-        <TabPane tab="基本信息" key="1">
39
+      {/* <Tabs defaultActiveKey="1">
40
+        <TabPane tab="基本信息" key="1"> */}
41
           {/* <div style={{ maxWidth: 1000 }}> */}
41
           {/* <div style={{ maxWidth: 1000 }}> */}
42
             <Basic newsId={newsId} />
42
             <Basic newsId={newsId} />
43
           {/* </div> */}
43
           {/* </div> */}
44
-        </TabPane>
44
+        {/* </TabPane>
45
 
45
 
46
         <TabPane tab="海报图片" key="2">
46
         <TabPane tab="海报图片" key="2">
47
         <Poster target={target} />
47
         <Poster target={target} />
50
         <TabPane tab="分享设置" key="3">
50
         <TabPane tab="分享设置" key="3">
51
         <Share target={target} />
51
         <Share target={target} />
52
         </TabPane>
52
         </TabPane>
53
-      </Tabs>
53
+      </Tabs> */}
54
     </Card>
54
     </Card>
55
   );
55
   );
56
 };
56
 };

+ 83
- 93
src/pages/recommend/channel/audit.jsx View File

1
 import React, { useState, useEffect } from 'react';
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, notification } from 'antd';
2
 import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Upload, message, notification } from 'antd';
3
-import ImageUpload from '../../../components/XForm/ImageUpload';
3
+import ImageUpload from '@/components/XForm/ImageUpload';
4
 import moment from 'moment';
4
 import moment from 'moment';
5
 import request from '../../../utils/request';
5
 import request from '../../../utils/request';
6
 import apis from '../../../services/apis';
6
 import apis from '../../../services/apis';
7
 import { router } from 'umi';
7
 import { router } from 'umi';
8
 
8
 
9
 import Attribution from './components/attribution'
9
 import Attribution from './components/attribution'
10
+import BuildingSelect from '@/components/SelectButton/BuildSelect2';
11
+import ConsultantSelect from '@/components/SelectButton/consultantSelect';
12
+import ChannelSelect from '@/components/SelectButton/channelSelect';
13
+
10
 
14
 
11
 const { TextArea } = Input;
15
 const { TextArea } = Input;
12
 
16
 
36
   const [visibleData, setVisibleData] = useState({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
40
   const [visibleData, setVisibleData] = useState({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
37
 
41
 
38
   // eslint-disable-next-line react-hooks/rules-of-hooks
42
   // eslint-disable-next-line react-hooks/rules-of-hooks
39
-  const [dataSource, setDataSource] = useState({ picture: '' })
43
+  const [data, setData] = useState({})
40
 
44
 
41
   const { id } = props.location.query;
45
   const { id } = props.location.query;
42
 
46
 
49
 
53
 
50
   // 获取详情信息
54
   // 获取详情信息
51
   function getById(currentId) {
55
   function getById(currentId) {
52
-    request({ ...apis.customer.recommendGetById, urlData: { id: currentId } }).then(res => {
56
+    request({ ...apis.customer.getDetail, urlData: { id: currentId } }).then(res => {
53
       // res.reportDate = moment(res.reportDate)
57
       // res.reportDate = moment(res.reportDate)
54
       if(res){
58
       if(res){
55
-        props.form.setFieldsValue({...res,reportDate:moment(res.reportDate)})
59
+        let channelCustomer = {}
60
+        if(res.channelCustomer){
61
+          channelCustomer.channelId=res.channelCustomer.channelId
62
+          channelCustomer.remark=res.channelCustomer.remark
63
+          
64
+        }
65
+        if(res.customerVisit){
66
+          channelCustomer.imageUrl=res.customerVisit.imageUrl
67
+          // channelCustomer.remark=res.channelCustomer.remark
68
+          
69
+        }
70
+        
71
+        setData(res)
72
+        props.form.setFieldsValue({...res,...channelCustomer})
56
       }
73
       }
57
     
74
     
58
     })
75
     })
59
   }
76
   }
60
 
77
 
61
-  function submitDate(params) {
78
+  function submitDate(data) {
62
     // props.form.setFieldsValue(res)
79
     // props.form.setFieldsValue(res)
63
-    console.log(params, 'params')
64
-    request({ ...apis.customer.auto, urlData: { id: params.customerId || props.form.getFieldValue('customerId') }, params: { verifyStatus: params.verifyStatus, realtyConsultant: props.form.getFieldValue('realtyConsultant') } }).then(() => {
80
+    console.log(data, 'data')
81
+    const params ={
82
+      auditResult:data.status,
83
+      channelCustomerId:id,
84
+      realtyConsultant:props.form.getFieldValue('realtyConsultant'),
85
+      name:props.form.getFieldValue('name'),
86
+      customerVisit:{ 
87
+        imageUrl:props.form.getFieldValue('imageUrl'),
88
+      },
89
+      remark:props.form.getFieldValue('remark'),
90
+    }
91
+    // {
92
+    //   "auditResult": "string",
93
+    //   "channelCustomerId": "string",
94
+    //   "customerVisit": {
95
+    //     "buildingId": "string",
96
+    //     "createDate": "2021-07-31T16:56:21.899Z",
97
+    //     "customerId": "string",
98
+    //     "customerVisitId": "string",
99
+    //     "imageUrl": "string",
100
+    //     "name": "string",
101
+    //     "orgId": 0,
102
+    //     "realtyConsultant": "string",
103
+    //     "realtyConsultantName": "string",
104
+    //     "recommendName": "string",
105
+    //     "recommendPerson": "string",
106
+    //     "remark": "string"
107
+    //   },
108
+    //   "realtyConsultant": "string"
109
+    // }
110
+    request({ ...apis.customer.auto, urlData: { id: id }, data: { ...params }}).then(() => {
65
       // eslint-disable-next-line no-unused-expressions
111
       // eslint-disable-next-line no-unused-expressions
66
       openNotificationWithIcon('success', '操作成功')
112
       openNotificationWithIcon('success', '操作成功')
67
       router.go(-1)
113
       router.go(-1)
76
     e.preventDefault();
122
     e.preventDefault();
77
     props.form.validateFields((err, values) => {
123
     props.form.validateFields((err, values) => {
78
       if (!err) {
124
       if (!err) {
79
-        submitDate({ verifyStatus: '1' })
125
+        submitDate({ status: '1' })
80
         // submitDate({ ...values })
126
         // submitDate({ ...values })
81
       }
127
       }
82
     });
128
     });
83
   }
129
   }
84
 
130
 
85
-  // Change 事件
86
-  function handleSelectChange(e) {
87
-    // eslint-disable-next-line no-console
88
-    console.log(e)
89
-  }
90
 
131
 
91
-  // 显示选择置业顾问的窗口
92
-  function showConsultant() {
93
-    setVisibleData({ visible: true, customerId: props.form.getFieldValue('customerId'), realtyConsultant: props.form.getFieldValue('realtyConsultant'), buildingId: props.form.getFieldValue('buildingId') })
94
-  }
95
 
132
 
96
-  // 关闭选择置业顾问的窗口
97
-  function closeConsultant() {
98
-    setVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
99
-  }
100
 
133
 
101
-  // 选择置业顾问弹窗
102
-  function consultantSuccess(e) {
103
-    console.log(e)
104
-    props.form.setFieldsValue({ realtyConsultant: e.realtyConsultant, consultantName: e.name })
105
-  }
106
 
134
 
107
   return (
135
   return (
108
     <Card>
136
     <Card>
109
       <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ maxWidth: '1000px' }}>
137
       <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ maxWidth: '1000px' }}>
110
-        <Form.Item label="客户ID" style={{ display: 'none' }}>
111
-          {getFieldDecorator('customerId')(
138
+        {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
139
+          {getFieldDecorator('channelCustomerId')(
112
             <Input
140
             <Input
113
               placeholder="客户ID"
141
               placeholder="客户ID"
114
             />,
142
             />,
115
           )}
143
           )}
116
-        </Form.Item>
144
+        </Form.Item>*/}
117
         <Form.Item label="项目ID" style={{ display: 'none' }}>
145
         <Form.Item label="项目ID" style={{ display: 'none' }}>
118
           {getFieldDecorator('buildingId')(
146
           {getFieldDecorator('buildingId')(
119
             <Input
147
             <Input
121
             />,
149
             />,
122
           )}
150
           )}
123
         </Form.Item>
151
         </Form.Item>
124
-        <Form.Item label="归属人" style={{ display: 'none' }}>
125
-          {getFieldDecorator('realtyConsultant')(
126
-            <Input
127
-              placeholder="归属人"
128
-            />,
129
-          )}
130
-        </Form.Item>
131
         <Form.Item label="意向项目:">
152
         <Form.Item label="意向项目:">
132
-          {getFieldDecorator('intention')(
133
-            <Input
153
+          {getFieldDecorator('buildingId')(
154
+            <BuildingSelect
155
+            disabled
134
               placeholder="意向项目"
156
               placeholder="意向项目"
157
+              style={{width:'100%'}}
135
             />,
158
             />,
136
           )}
159
           )}
137
-        </Form.Item>
138
-        <Form.Item label="客户照片">
139
-          {getFieldDecorator('picture')(
140
-            <ImageUpload value={dataSource.picture} />,
141
-          )}
142
-        </Form.Item>
160
+        </Form.Item> 
143
         <Form.Item label="客户姓名">
161
         <Form.Item label="客户姓名">
144
           {getFieldDecorator('name')(
162
           {getFieldDecorator('name')(
145
             <Input placeholder="客户姓名" />,
163
             <Input placeholder="客户姓名" />,
146
           )}
164
           )}
147
         </Form.Item>
165
         </Form.Item>
148
-        <Form.Item label="客户电话">
149
-          {getFieldDecorator('phone')(
150
-            <Input placeholder="客户电话" />,
166
+        <Form.Item label="归属渠道">
167
+          {getFieldDecorator('channelId')(
168
+            <ChannelSelect placeholder="归属渠道" disabled/>,
151
           )}
169
           )}
152
         </Form.Item>
170
         </Form.Item>
153
-        <Form.Item label="客户性别">
154
-          {getFieldDecorator('sex')(
155
-            <Radio.Group>
156
-              <Radio value={1}>男</Radio>
157
-              <Radio value={2}>女</Radio>
158
-            </Radio.Group>,
171
+        <Form.Item label="归属置业顾问">
172
+          {getFieldDecorator('realtyConsultant')(
173
+            <ConsultantSelect placeholder="归属置业顾问" buildingId={props.form.getFieldValue('buildingId')} />,
159
           )}
174
           )}
160
         </Form.Item>
175
         </Form.Item>
161
-        <Form.Item label="到访人数">
162
-          {getFieldDecorator('visiteNum')(
163
-            <Input placeholder="到访人数" />,
176
+        <Form.Item label="到访照片">
177
+          {getFieldDecorator('imageUrl')(
178
+            <ImageUpload />,
164
           )}
179
           )}
165
         </Form.Item>
180
         </Form.Item>
166
-        <Form.Item label="客户描述">
167
-          {getFieldDecorator('describe')(
181
+        <Form.Item label="备注">
182
+          {getFieldDecorator('remark')(
168
             <TextArea placeholder="客户描述" rows={10} />,
183
             <TextArea placeholder="客户描述" rows={10} />,
169
           )}
184
           )}
170
         </Form.Item>
185
         </Form.Item>
171
-        <Form.Item label="物业类型">
172
-          {getFieldDecorator('realtyManageType')(
173
-            <Input placeholder="物业类型" />,
174
-          )}
175
-        </Form.Item>
176
-        <Form.Item label="需求类型">
177
-          {getFieldDecorator('demandType')(
178
-            <Input placeholder="需求类型" />,
179
-          )}
180
-        </Form.Item>
181
-        <Form.Item label="价格区间">
182
-          {getFieldDecorator('priceRange')(
183
-            <Input placeholder="价格区间" />,
184
-          )}
185
-        </Form.Item>
186
-        <Form.Item label="报备日期">
187
-          {getFieldDecorator('reportDate')(
188
-            <DatePicker showTime placeholder="报备日期" />,
189
-          )}
190
-        </Form.Item>
191
-        {/* <Form.Item label="状态">
192
-          {getFieldDecorator('verifyStatus')(
193
-            <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
194
-              <Option value={0}>未通过</Option>
195
-              <Option value={1}>已通过</Option>
196
-              <Option value={2}>已驳回</Option>
197
-            </Select>,
198
-          )}onClick={() => submitDate({ verifyStatus: '1' })}
199
-        </Form.Item> */}
200
-        <Form.Item label="归属置业顾问"
186
+       
187
+
188
+        
189
+
190
+        {/* <Form.Item label="归属置业顾问"
201
       >
191
       >
202
           <Row gutter={8}>
192
           <Row gutter={8}>
203
             <Col span={12}>
193
             <Col span={12}>
214
               <Button onClick={() => showConsultant()}>选择</Button>
204
               <Button onClick={() => showConsultant()}>选择</Button>
215
             </Col>
205
             </Col>
216
           </Row>
206
           </Row>
217
-        </Form.Item>
207
+        </Form.Item> */}
218
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
208
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
219
-          <Button type="primary" htmlType="submit" >
209
+          {data.status==='1'&&<><Button type="primary" htmlType="submit" >
220
             审核通过
210
             审核通过
221
           </Button>
211
           </Button>
222
-          <Button type="danger" ghost style={{marginLeft: '4em'}} onClick={() => submitDate({ verifyStatus: '2' })}>
212
+          <Button type="danger" ghost style={{marginLeft: '4em'}} onClick={() => submitDate({ status: '2' })}>
223
             驳回
213
             驳回
224
-          </Button>
214
+          </Button></>}
225
           <Button style={{marginLeft: '4em'}} onClick={() => router.goBack(-1)}>
215
           <Button style={{marginLeft: '4em'}} onClick={() => router.goBack(-1)}>
226
             取消
216
             取消
227
           </Button>
217
           </Button>
229
       </Form>
219
       </Form>
230
 
220
 
231
       {/* 选择置业顾问 */}
221
       {/* 选择置业顾问 */}
232
-      <Attribution visibleData={visibleData} onCancel={() => closeConsultant()} onSuccess={e => consultantSuccess(e)} />
222
+      {/* <Attribution visibleData={visibleData} onCancel={() => closeConsultant()} onSuccess={e => consultantSuccess(e)} /> */}
233
     </Card>
223
     </Card>
234
   );
224
   );
235
 }
225
 }

+ 3
- 3
src/pages/recommend/channel/index.jsx View File

21
 
21
 
22
   function toAudit(cuurentId) {
22
   function toAudit(cuurentId) {
23
     router.push({
23
     router.push({
24
-      pathname: '/customer/recommend/audit',
24
+      pathname: '/customer/recommend/channel/audit',
25
       query: {
25
       query: {
26
         id: cuurentId,
26
         id: cuurentId,
27
       },
27
       },
105
       title: '状态',
105
       title: '状态',
106
       dataIndex: 'status',
106
       dataIndex: 'status',
107
       key: 'status',
107
       key: 'status',
108
-      render: (_, record) => <><span>{record.status === '1' ? '待审核' : record.status === '2' ? '已通过' : record.status === '3' ? '已驳回' : ''}</span></>,
108
+      render: (_, record) => <><span>{record.status === '1' ? '未到访' : record.status === '2' ? '已到访' : record.status === '3' ? '无效' : ''}</span></>,
109
     },
109
     },
110
     {
110
     {
111
       title: '操作',
111
       title: '操作',
114
       render: (_, record) => (
114
       render: (_, record) => (
115
         <>{record.status === '1' ?<Button type='link' onClick={() => {
115
         <>{record.status === '1' ?<Button type='link' onClick={() => {
116
           toAudit(record.channelCustomerId)
116
           toAudit(record.channelCustomerId)
117
-          }}>审核</Button>:
117
+          }}>到访确认</Button>:
118
           <Button type='link' onClick={() => {
118
           <Button type='link' onClick={() => {
119
             toAudit(record.channelCustomerId)
119
             toAudit(record.channelCustomerId)
120
             }}>查看详情</Button>
120
             }}>查看详情</Button>

+ 70
- 93
src/pages/recommend/customer/audit.jsx View File

1
 import React, { useState, useEffect } from 'react';
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, notification } from 'antd';
2
+import {
3
+  Form,
4
+  Icon,
5
+  Input,
6
+  Button,
7
+  DatePicker,
8
+  Select,
9
+  Card,
10
+  Row,
11
+  Col,
12
+  Pagination,
13
+  Alert,
14
+  Table,
15
+  Avatar,
16
+  Radio,
17
+  Upload,
18
+  message,
19
+  notification,
20
+} from 'antd';
3
 import ImageUpload from '../../../components/XForm/ImageUpload';
21
 import ImageUpload from '../../../components/XForm/ImageUpload';
4
 import moment from 'moment';
22
 import moment from 'moment';
5
 import request from '../../../utils/request';
23
 import request from '../../../utils/request';
6
 import apis from '../../../services/apis';
24
 import apis from '../../../services/apis';
7
 import { router } from 'umi';
25
 import { router } from 'umi';
8
 
26
 
9
-import Attribution from './components/attribution'
27
+import Attribution from './components/attribution';
10
 import BuildingSelect from '@/components/SelectButton/BuildSelect2';
28
 import BuildingSelect from '@/components/SelectButton/BuildSelect2';
11
 import ConsultantSelect from '@/components/SelectButton/consultantSelect';
29
 import ConsultantSelect from '@/components/SelectButton/consultantSelect';
12
 
30
 
26
 const openNotificationWithIcon = (type, message) => {
44
 const openNotificationWithIcon = (type, message) => {
27
   notification[type]({
45
   notification[type]({
28
     message,
46
     message,
29
-    description:
30
-      '',
47
+    description: '',
31
   });
48
   });
32
-}
49
+};
33
 
50
 
34
 function body(props) {
51
 function body(props) {
35
-  const { getFieldDecorator } = props.form
36
-
37
-  // eslint-disable-next-line react-hooks/rules-of-hooks
38
-  const [visibleData, setVisibleData] = useState({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
39
-
40
-  // eslint-disable-next-line react-hooks/rules-of-hooks
41
-  const [dataSource, setDataSource] = useState({ picture: '' })
52
+  const { getFieldDecorator } = props.form;
42
 
53
 
43
   const { id } = props.location.query;
54
   const { id } = props.location.query;
44
 
55
 
45
-  if (id !== '') {
46
-    // eslint-disable-next-line react-hooks/rules-of-hooks
47
-    useEffect(() => {
48
-      getById(id)
49
-    }, [])
50
-  }
56
+  useEffect(() => {
57
+    if (id !== '') {
58
+      getById(id);
59
+    }
60
+  }, []);
51
 
61
 
52
   // 获取详情信息
62
   // 获取详情信息
53
   function getById(currentId) {
63
   function getById(currentId) {
54
     request({ ...apis.customer.getDetail, urlData: { id: currentId } }).then(res => {
64
     request({ ...apis.customer.getDetail, urlData: { id: currentId } }).then(res => {
55
       // res.reportDate = moment(res.reportDate)
65
       // res.reportDate = moment(res.reportDate)
56
-      if(res){
57
-        props.form.setFieldsValue({...res,reportDate:moment(res.reportDate)})
66
+      if (res) {
67
+        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
       }
68
       }
59
-    
60
-    })
69
+    });
61
   }
70
   }
62
 
71
 
63
   function submitDate(params) {
72
   function submitDate(params) {
64
     // props.form.setFieldsValue(res)
73
     // props.form.setFieldsValue(res)
65
-    console.log(params, 'params')
66
-    request({ ...apis.customer.auto, urlData: { id: params.customerId || props.form.getFieldValue('customerId') }, params: { verifyStatus: params.verifyStatus, realtyConsultant: props.form.getFieldValue('realtyConsultant') } }).then(() => {
67
-      // eslint-disable-next-line no-unused-expressions
68
-      openNotificationWithIcon('success', '操作成功')
69
-      router.go(-1)
70
-    }).catch(err => {
71
-      // eslint-disable-next-line no-unused-expressions
72
-
74
+    console.log(params, 'params');
75
+    request({
76
+      ...apis.customer.auto,
77
+      urlData: { id: id },
78
+      params: {
79
+        status: params.status,
80
+        realtyConsultant: props.form.getFieldValue('realtyConsultant'),
81
+      },
73
     })
82
     })
83
+      .then(() => {
84
+        // eslint-disable-next-line no-unused-expressions
85
+        openNotificationWithIcon('success', '操作成功');
86
+        router.go(-1);
87
+      })
88
+      .catch(err => {
89
+        // eslint-disable-next-line no-unused-expressions
90
+      });
74
   }
91
   }
75
 
92
 
76
   // 提交事件
93
   // 提交事件
78
     e.preventDefault();
95
     e.preventDefault();
79
     props.form.validateFields((err, values) => {
96
     props.form.validateFields((err, values) => {
80
       if (!err) {
97
       if (!err) {
81
-        submitDate({ verifyStatus: '1' })
98
+        submitDate({ status: '1' });
82
         // submitDate({ ...values })
99
         // submitDate({ ...values })
83
       }
100
       }
84
     });
101
     });
85
   }
102
   }
86
 
103
 
87
-  // Change 事件
88
-  function handleSelectChange(e) {
89
-    // eslint-disable-next-line no-console
90
-    console.log(e)
91
-  }
92
-
93
-  // 显示选择置业顾问的窗口
94
-  function showConsultant() {
95
-    setVisibleData({ visible: true, customerId: props.form.getFieldValue('customerId'), realtyConsultant: props.form.getFieldValue('realtyConsultant'), buildingId: props.form.getFieldValue('buildingId') })
96
-  }
97
-
98
-  // 关闭选择置业顾问的窗口
99
-  function closeConsultant() {
100
-    setVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
101
-  }
102
-
103
-  // 选择置业顾问弹窗
104
-  function consultantSuccess(e) {
105
-    console.log(e)
106
-    props.form.setFieldsValue({ realtyConsultant: e.realtyConsultant, consultantName: e.name })
107
-  }
108
-
109
   return (
104
   return (
110
     <Card>
105
     <Card>
111
       <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ maxWidth: '1000px' }}>
106
       <Form {...tailFormItemLayout} onSubmit={e => handleSubmit(e)} style={{ maxWidth: '1000px' }}>
112
         {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
107
         {/* <Form.Item label="客户ID" style={{ display: 'none' }}>
113
-          {getFieldDecorator('customerId')(
114
-            <Input
115
-              placeholder="客户ID"
116
-            />,
117
-          )}
108
+          {getFieldDecorator('channelCustomerId')(<Input placeholder="客户ID" />)}
118
         </Form.Item>
109
         </Form.Item>
119
         <Form.Item label="项目ID" style={{ display: 'none' }}>
110
         <Form.Item label="项目ID" style={{ display: 'none' }}>
120
-          {getFieldDecorator('buildingId')(
121
-            <Input
122
-              placeholder="项目ID"
123
-            />,
124
-          )}
111
+          {getFieldDecorator('buildingId')(<Input placeholder="项目ID" />)}
125
         </Form.Item>
112
         </Form.Item>
126
-        <Form.Item label="归属人" style={{ display: 'none' }}>
127
-          {getFieldDecorator('realtyConsultant')(
128
-            <Input
129
-              placeholder="归属人"
130
-            />,
131
-          )}
132
-        </Form.Item> */}
133
         <Form.Item label="意向项目:">
113
         <Form.Item label="意向项目:">
134
           {getFieldDecorator('buildingId')(
114
           {getFieldDecorator('buildingId')(
135
-            <BuildingSelect
136
-              placeholder="意向项目"
137
-              style={{width:'100%'}}
138
-            />,
115
+            <BuildingSelect placeholder="意向项目" style={{ width: '100%' }} />,
139
           )}
116
           )}
140
-        </Form.Item>
117
+        </Form.Item> */}
141
         <Form.Item label="客户姓名">
118
         <Form.Item label="客户姓名">
142
-          {getFieldDecorator('name')(
143
-            <Input placeholder="客户姓名" />,
144
-          )}
119
+          {getFieldDecorator('name')(<Input placeholder="客户姓名" />)}
145
         </Form.Item>
120
         </Form.Item>
146
         <Form.Item label="客户电话">
121
         <Form.Item label="客户电话">
147
-          {getFieldDecorator('phone')(
148
-            <Input placeholder="客户电话" />,
149
-          )}
122
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" />)}
150
         </Form.Item>
123
         </Form.Item>
151
         <Form.Item label="客户性别">
124
         <Form.Item label="客户性别">
152
           {getFieldDecorator('sex')(
125
           {getFieldDecorator('sex')(
157
           )}
130
           )}
158
         </Form.Item>
131
         </Form.Item>
159
         <Form.Item label="客户描述">
132
         <Form.Item label="客户描述">
160
-          {getFieldDecorator('describe')(
161
-            <TextArea placeholder="客户描述" rows={10} />,
162
-          )}
133
+          {getFieldDecorator('remark')(<TextArea placeholder="客户描述" rows={10} />)}
163
         </Form.Item>
134
         </Form.Item>
164
         <Form.Item label="归属置业顾问">
135
         <Form.Item label="归属置业顾问">
165
-          {getFieldDecorator('describe11')(
166
-            <ConsultantSelect placeholder="归属置业顾问" buildingId={props.form.getFieldValue('buildingId')} />,
136
+          {getFieldDecorator('realtyConsultant')(
137
+            <ConsultantSelect
138
+              placeholder="归属置业顾问"
139
+              buildingId={props.form.getFieldValue('buildingId')}
140
+            />,
167
           )}
141
           )}
168
         </Form.Item>
142
         </Form.Item>
169
 
143
 
170
-        
171
-
172
         {/* <Form.Item label="归属置业顾问"
144
         {/* <Form.Item label="归属置业顾问"
173
       >
145
       >
174
           <Row gutter={8}>
146
           <Row gutter={8}>
188
           </Row>
160
           </Row>
189
         </Form.Item> */}
161
         </Form.Item> */}
190
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
162
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
191
-          <Button type="primary" htmlType="submit" >
163
+          <Button type="primary" htmlType="submit">
192
             审核通过
164
             审核通过
193
           </Button>
165
           </Button>
194
-          <Button type="danger" ghost style={{marginLeft: '4em'}} onClick={() => submitDate({ status: '2' })}>
166
+          <Button
167
+            type="danger"
168
+            ghost
169
+            style={{ marginLeft: '4em' }}
170
+            onClick={() => submitDate({ status: '2' })}
171
+          >
195
             驳回
172
             驳回
196
           </Button>
173
           </Button>
197
-          <Button style={{marginLeft: '4em'}} onClick={() => router.goBack(-1)}>
174
+          <Button style={{ marginLeft: '4em' }} onClick={() => router.goBack(-1)}>
198
             取消
175
             取消
199
           </Button>
176
           </Button>
200
         </Form.Item>
177
         </Form.Item>
201
       </Form>
178
       </Form>
202
 
179
 
203
       {/* 选择置业顾问 */}
180
       {/* 选择置业顾问 */}
204
-      <Attribution visibleData={visibleData} onCancel={() => closeConsultant()} onSuccess={e => consultantSuccess(e)} />
181
+      {/* <Attribution visibleData={visibleData} onCancel={() => closeConsultant()} onSuccess={e => consultantSuccess(e)} /> */}
205
     </Card>
182
     </Card>
206
   );
183
   );
207
 }
184
 }
208
 const WrappedBody = Form.create({ name: 'body' })(body);
185
 const WrappedBody = Form.create({ name: 'body' })(body);
209
 
186
 
210
-export default WrappedBody
187
+export default WrappedBody;

+ 5
- 5
src/services/apis.js View File

368
       url: `${prefix}/channelCustomer`,
368
       url: `${prefix}/channelCustomer`,
369
       action: 'admin.customer.recommend.recommender.get',
369
       action: 'admin.customer.recommend.recommender.get',
370
     },
370
     },
371
+    auto: {
372
+      method: 'PUT',
373
+      url: `${prefix}/channelCustomer/:id`,
374
+      action: 'admin.channelCustomer.id.put',
375
+    },
371
     getDetail: {
376
     getDetail: {
372
       method: 'GET',
377
       method: 'GET',
373
       url: `${prefix}/channelCustomer/:id`,
378
       url: `${prefix}/channelCustomer/:id`,
374
       action: 'admin.customer.recommend.recommender.get',
379
       action: 'admin.customer.recommend.recommender.get',
375
     },
380
     },
376
-    auto: {
377
-      method: 'PUT',
378
-      url: `${prefix}/customer/recommend/verify/:id`,
379
-      action: 'admin.customer.recommend.verify.id.put',
380
-    },
381
     recommendGetById: {
381
     recommendGetById: {
382
       method: 'GET',
382
       method: 'GET',
383
       url: `${prefix}/customer/recommend/getById/:id`,
383
       url: `${prefix}/customer/recommend/getById/:id`,