zlisen 3 anos atrás
pai
commit
fec22740f8

+ 1
- 1
src/pages/channel/Channel/List/index.jsx Ver arquivo

@@ -71,7 +71,7 @@ export default function ChannelList(props) {
71 71
 
72 72
   const searchFields = [
73 73
     {
74
-      name: 'cityId',
74
+      name: 'channelId',
75 75
       label: '渠道名称',
76 76
       placeholder: '请选择渠道',
77 77
       render: () => <ChannelSelect style={{ width: 160 }} />,

+ 154
- 63
src/pages/findRoom/addedValueService/audit.jsx Ver arquivo

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Card, Radio, notification, Select } from 'antd';
2
+import { Form, Input, Button, Card, Radio, notification, Select,Checkbox  } from 'antd';
3 3
 import moment from 'moment';
4 4
 import request from '@/utils/request';
5 5
 import apis from '@/services/apis';
@@ -42,7 +42,7 @@ function body(props) {
42 42
   const [dataSource, setDataSource] = useState({ picture: '' });
43 43
 
44 44
   const { id,type } = props.location.query;
45
-  const disabled= type==='detail'
45
+  const disabled= true
46 46
 
47 47
   useEffect(() => {
48 48
     if (id !== '') {
@@ -54,8 +54,30 @@ function body(props) {
54 54
     request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55 55
       // res.reportDate = moment(res.reportDate)
56 56
       if (res) {
57
-        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
-        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
57
+        const b = {};
58
+        JSON.parse(res?.questionnaire)?.map(x => {
59
+          
60
+          if (x.key === 'important' ||x.key === 'special' ||x.key === 'style'||x.key === 'mostImportant') { 
61
+            b[x.key] = [x.resultId];
62
+            return;
63
+          }
64
+          if (x.key === 'maxPrice') {
65
+            b[x.key] = x.result / 10000;
66
+            return;
67
+          }
68
+          if (x.type === 'checkbox') {
69
+            b[x.key] = x.resultId;
70
+          } else {
71
+            b[x.key] = x.result;
72
+          }
73
+        });
74
+
75
+        console.log(b, 'questionnaire');
76
+        props.form.setFieldsValue({
77
+          ...res,
78
+          reportDate: moment(res.reportDate),
79
+          ...b,
80
+        });
59 81
       }
60 82
     });
61 83
   }
@@ -64,11 +86,11 @@ function body(props) {
64 86
     // props.form.setFieldsValue(res)
65 87
     console.log(params, 'params');
66 88
     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'),
89
+      ...apis.searchHouse.reply,
90
+      urlData: { id },
91
+      data: {
92
+        auditRemark: props.form.getFieldValue('auditRemark'),
93
+        status: params.status,
72 94
       },
73 95
     })
74 96
       .then(() => {
@@ -86,7 +108,7 @@ function body(props) {
86 108
     e.preventDefault();
87 109
     props.form.validateFields((err, values) => {
88 110
       if (!err) {
89
-        submitDate({ verifyStatus: '1' });
111
+        submitDate({ status: '1' });
90 112
         // submitDate({ ...values })
91 113
       }
92 114
     });
@@ -99,100 +121,169 @@ function body(props) {
99 121
         onSubmit={e => handleSubmit(e)}
100 122
         style={{ width: '800px', margin: 'auto' }}
101 123
       >
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}/>)}
124
+       <Form.Item label="客户姓名">
125
+          {getFieldDecorator('nickname')(<Input placeholder="客户姓名" disabled />)}
111 126
         </Form.Item>
112 127
         <Form.Item label="客户电话">
113
-          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
128
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled />)}
114 129
         </Form.Item>
115 130
         <Form.Item label="客户性别">
116
-          {getFieldDecorator('sex')(
117
-            <Radio.Group disabled={disabled}>
118
-              <Radio value={1}>男</Radio>
119
-              <Radio value={2}>女</Radio>
131
+          {getFieldDecorator('gender')(
132
+            <Radio.Group disabled>
133
+              <Radio value="1">男</Radio>
134
+              <Radio value="2">女</Radio>
120 135
             </Radio.Group>,
121 136
           )}
122 137
         </Form.Item>
123 138
         <Form.Item label="客户预算">
124
-          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
139
+          {getFieldDecorator('maxPrice')(
140
+            <Input placeholder="客户预算" disabled={disabled} suffix="W" />,
141
+          )}
125 142
         </Form.Item>
126 143
 
127 144
         <Form.Item label="房屋现状">
128
-          {getFieldDecorator('housetype')(
145
+          {getFieldDecorator('houseStatus')(
129 146
             <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>
147
+              <Option value={1}>毛坯</Option>
148
+              <Option value={2}>旧房装修5年以内</Option>
149
+              <Option value={3}>旧房装修5-10年</Option>
150
+              <Option value={4}>旧房装修10年以上</Option>
134 151
             </Select>,
135 152
           )}
136 153
         </Form.Item>
137 154
         <Form.Item label="房屋面积">
138
-          {getFieldDecorator('housetype')(
155
+          {getFieldDecorator('area')(
139 156
             <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>     
157
+              <Option value={1}>50m²</Option>
158
+              <Option value={2}>50~70m²</Option>
159
+              <Option value={3}>70~90m²</Option>
160
+              <Option value={4}>90~110m²</Option>
161
+              <Option value={5}>110~130m²</Option>
162
+              <Option value={6}>130~150m²</Option>  
163
+              <Option value={7}>150~200m²</Option>  
164
+              <Option value={8}>200m²以上</Option>     
148 165
             </Select>,
149 166
           )}
150 167
         </Form.Item>
151 168
 
152 169
         <Form.Item label="家装模式">
153
-          {getFieldDecorator('housetype')(
170
+          {getFieldDecorator('type')(
154 171
             <Select placeholder="家装模式" disabled={disabled}>
155
-              <Option value="新房">只做设计</Option>
156
-              <Option value="二手房">材料全包</Option>
157
-              <Option value="不限">包工不包料</Option>
158
-              <Option value="二手房">施工包辅材不包主材</Option>
159
-              <Option value="不限">全包</Option>
172
+              <Option value={1}>只做设计</Option>
173
+              <Option value={2}>材料全包</Option>
174
+              <Option value={3}>包工不包料</Option>
175
+              <Option value={4}>施工包辅材不包主材</Option>
176
+              <Option value={5}>全包</Option>
177
+             
160 178
             </Select>,
161 179
           )}
162 180
         </Form.Item>
163 181
 
164 182
         <Form.Item label="家装侧重点">
165
-          {getFieldDecorator('more')(
183
+          {getFieldDecorator('important')(
166 184
             <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>
185
+              <Checkbox value={1}>家装价格</Checkbox>
186
+              <Checkbox value={2}>施工品质</Checkbox>
187
+              <Checkbox value={3}>设计感</Checkbox>
188
+              <Checkbox value={4}>环保</Checkbox>
189
+              <Checkbox value={5}>舒适度</Checkbox>
190
+              <Checkbox value={6}>实用度</Checkbox>
191
+            </Checkbox.Group>,
192
+          )}
193
+        </Form.Item>
194
+         <Form.Item label="家装风格">
195
+          {getFieldDecorator('style')(
196
+            <Checkbox.Group disabled={disabled}>
197
+              <Checkbox value={1}>北欧风格</Checkbox>
198
+              <Checkbox value={2}>简欧风格</Checkbox>
199
+              <Checkbox value={3}>欧式古典</Checkbox>
200
+              <Checkbox value={4}>现代简约</Checkbox>
201
+              <Checkbox value={5}>田园风格</Checkbox>
202
+              <Checkbox value={6}>新中式风格</Checkbox>
203
+              <Checkbox value={7}>地中海风格</Checkbox>
204
+              <Checkbox value={8}>东南亚风格</Checkbox>
205
+              <Checkbox value={9}>美式风格</Checkbox>
206
+              <Checkbox value={10}>日式风格</Checkbox>
207
+              <Checkbox value={11}>混搭风格</Checkbox>
177 208
             </Checkbox.Group>,
178 209
           )}
179 210
         </Form.Item>
180
-  
181 211
 
182
-        <Form.Item label="客户备注" >
183
-          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
212
+        <Form.Item label="关键诉求">
213
+          {getFieldDecorator('mostImportant')(
214
+            <Checkbox.Group disabled={disabled}>
215
+              <Checkbox value={1}>设计凸显个性</Checkbox>
216
+              <Checkbox value={2}>智能家居齐全</Checkbox>
217
+              <Checkbox value={3}>强大的收纳功能</Checkbox>
218
+              <Checkbox value={4}>方便清洁和整理</Checkbox>
219
+              <Checkbox value={5}>温馨舒适</Checkbox>
220
+              <Checkbox value={6}>品质生活</Checkbox>
221
+              <Checkbox value={7}>其他</Checkbox>
222
+            
223
+            </Checkbox.Group>,
224
+          )}
184 225
         </Form.Item>
226
+
227
+        <Form.Item label="特殊功能区">
228
+          {getFieldDecorator('special')(
229
+            <Checkbox.Group disabled={disabled}>
230
+              <Checkbox value={1}>衣帽间</Checkbox>
231
+              <Checkbox value={2}>书房</Checkbox>
232
+              <Checkbox value={3}>宠物生活区</Checkbox>
233
+              <Checkbox value={4}>超大浴缸</Checkbox>
234
+              <Checkbox value={5}>超大衣柜</Checkbox>
235
+              <Checkbox value={6}>开放式厨房</Checkbox>
236
+              <Checkbox value={7}>绿植阳台</Checkbox>
237
+              <Checkbox value={8}>健身区</Checkbox>
238
+              <Checkbox value={9}>婴儿房</Checkbox>
239
+              <Checkbox value={10}>其他</Checkbox>
240
+            </Checkbox.Group>,
241
+          )}
242
+        </Form.Item>
243
+        <Form.Item label="是否智能家居">
244
+          {getFieldDecorator('samrt')(
245
+            <Select placeholder="是否智能家居" disabled={disabled}>
246
+              <Option value={1}>会</Option>
247
+              <Option value={2}>非常实用高效</Option>
248
+              <Option value={3}>会选择感兴趣部分</Option>
249
+              <Option value={4}>不会选择</Option>
250
+              <Option value={5}>新奇过多实用</Option>
251
+              <Option value={4}>暂时不了解智能家居</Option>
252
+              <Option value={5}>其他</Option>
253
+            </Select>,
254
+          )}
255
+        </Form.Item>
256
+        {/* <Form.Item label="家装侧重点">
257
+          {getFieldDecorator('important')(
258
+            <Checkbox.Group disabled={disabled}>
259
+              <Checkbox value={1}>独卫</Checkbox>
260
+              <Checkbox value={2}>近地铁</Checkbox>
261
+              <Checkbox value={3}>拎包入住</Checkbox>
262
+              <Checkbox value={4}>精装修</Checkbox>
263
+              <Checkbox value={5}>独立阳台</Checkbox>
264
+              <Checkbox value={6}>集中供暖</Checkbox>
265
+              <Checkbox value={7}>押一付一</Checkbox>
266
+              <Checkbox value={8}>双卫</Checkbox>
267
+              <Checkbox value={9}>新上</Checkbox>
268
+              <Checkbox value={10}>认证公寓</Checkbox>
269
+            </Checkbox.Group>,
270
+          )}
271
+        </Form.Item> */}
272
+  
273
+      
185 274
         <Form.Item label="回访备注">
186
-          {getFieldDecorator('describe', {
275
+          {getFieldDecorator('auditRemark', {
187 276
             rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
188
-          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
277
+          })(<TextArea placeholder="回访备注" disabled={type === 'detail'} rows={7} />)}
189 278
         </Form.Item>
190 279
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
191
-          <Button type="primary" htmlType="submit">
280
+         {type === 'detail'?<Button onClick={()=>{router.go('-1')}}>
281
+            返回
282
+          </Button>:<> <Button type="primary" htmlType="submit">
192 283
             有效
193 284
           </Button>
194 285
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195
-          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
286
+          <Button onClick={() => submitDate({ status: '2' })}>无效</Button></>}
196 287
         </Form.Item>
197 288
       </Form>
198 289
     </Card>

+ 8
- 13
src/pages/findRoom/addedValueService/index.jsx Ver arquivo

@@ -106,15 +106,15 @@ function Recommend() {
106 106
       key: 'intentArea',
107 107
       align: 'center',
108 108
       // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109
+      render: (_, record) => <><span>{JSON.parse(record.questionnaire)?.filter(x=>x.key=='houseStatus')[0]?.result}</span></>,
109 110
 
110 111
     },
111 112
     {
112 113
       title: '装修预算',
113
-      dataIndex: 'intention',
114
-      key: 'intention',
114
+      dataIndex: 'maxPrice',
115
+      key: 'maxPrice',
115 116
       align: 'center',
116
-      // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
117
-
117
+     
118 118
     },
119 119
     {
120 120
       title: '提交时间',
@@ -128,7 +128,7 @@ function Recommend() {
128 128
       dataIndex: 'status',
129 129
       key: 'status',
130 130
       align: 'center',
131
-      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
131
+      render: (_, record) => <><span>{record.status == '0' ? '待回访' : record.status == '1' ? '已回访' : record.status == '2' ? '无效' : ''}</span></>,
132 132
     },
133 133
     {
134 134
       title: '操作',
@@ -137,13 +137,8 @@ function Recommend() {
137 137
       align: 'center',
138 138
 
139 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> */}
140
+        <>{record.status == '0'?<Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>:
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>}
147 142
         </>
148 143
       ),
149 144
     },
@@ -208,7 +203,7 @@ function Recommend() {
208 203
           data.type='4'
209 204
           return data;
210 205
         }}
211
-        actionRender={actionRender}
206
+        // actionRender={actionRender}
212 207
       />
213 208
 
214 209
     </>

+ 112
- 84
src/pages/findRoom/buyRoom/audit.jsx Ver arquivo

@@ -19,7 +19,7 @@ const tailFormItemLayout = {
19 19
     sm: { span: 16 },
20 20
   },
21 21
 };
22
-
22
+const questionnaire = `[{"question":"你的购房预算是多少?","key":"minPrice","type":"range","result":1000000,"resultId":null,"options":[100,500]},{"question":"你的购房预算是多少?","key":"maxPrice","type":"range","result":2910000,"resultId":null,"options":[100,500]},{"question":"你想购买的是新房还是二手房?","key":"isNew","type":"checkbox","result":"新房","resultId":1,"options":[{"name":"新房","id":1},{"name":"二手房","id":2},{"name":"不限","id":3}]},{"question":"你想住几居室的房子?","key":"layout","type":"checkbox","result":"三室二厅","resultId":5,"options":[{"name":"一室一厅","id":1},{"name":"二室一厅","id":2},{"name":"二室二厅","id":3},{"name":"三室一厅","id":4},{"name":"三室二厅","id":5},{"name":"四室一厅","id":6},{"name":"四室二厅","id":7},{"name":"五室及以上","id":8}]},{"question":"你的购房目的?","key":"purpose","type":"checkbox","result":"教育","resultId":5,"options":[{"name":"刚需","id":1},{"name":"结婚","id":2},{"name":"养老","id":3},{"name":"改善","id":4},{"name":"教育","id":5},{"name":"投资","id":6}]},{"question":"你更注重项目的哪些优势?","key":"advantage","type":"checkbox","result":"学区","resultId":2,"options":[{"name":"发展规划","id":1},{"name":"学区","id":2},{"name":"交通","id":3},{"name":"配套","id":4},{"name":"环境","id":5}]},{"question":"你对小区物业管理和社区设施有什么要求?","key":"facility","type":"checkbox","result":"楼栋管家","resultId":1,"remark":"","options":[{"name":"楼栋管家","id":1},{"name":"金钥匙服务","id":2},{"name":"社区娱乐","id":3},{"name":"会所功能","id":4}]},{"question":"你想买多大面积?","key":"area","type":"checkbox","result":"110-130㎡","resultId":4,"options":[{"name":"60㎡以下","id":1},{"name":"60-90㎡","id":2},{"name":"90-110㎡","id":3},{"name":"110-130㎡","id":4},{"name":"130-150㎡","id":5},{"name":"150-200㎡","id":6},{"name":"200㎡以上","id":7}]},{"question":"你更喜欢的朝向?","key":"orientation","type":"checkbox","result":"朝南","resultId":2,"options":[{"name":"朝东","id":1},{"name":"朝南","id":2},{"name":"朝西","id":3},{"name":"朝北","id":4},{"name":"南北通透","id":5}]},{"question":"你想住高楼层还是低楼层?","key":"isHigh","type":"checkbox","result":"低楼层","resultId":1,"options":[{"name":"低楼层","id":1},{"name":"中楼层","id":2},{"name":"高楼层","id":3},{"name":"低层","id":4},{"name":"顶层","id":5}]},{"question":"你对楼龄的要求是?","key":"buildingAge","type":"checkbox","result":"5年以内","resultId":1,"options":[{"name":"5年以内","id":1},{"name":"10年以内","id":2},{"name":"15年以内","id":3},{"name":"20年以内","id":4},{"name":"20年以上","id":5}]},{"result":null,"key":"intentArea","question":"意向区域"},{"question":"创建人小程序人员","result":"b47e82b90071ba6142c07436c80be81f","key":"personId"}]`;
23 23
 const openNotificationWithIcon = (type, message) => {
24 24
   notification[type]({
25 25
     message,
@@ -41,8 +41,8 @@ function body(props) {
41 41
   // eslint-disable-next-line react-hooks/rules-of-hooks
42 42
   const [dataSource, setDataSource] = useState({ picture: '' });
43 43
 
44
-  const { id,type } = props.location.query;
45
-  const disabled= type==='detail'
44
+  const { id, type } = props.location.query;
45
+  const disabled = true;
46 46
 
47 47
   useEffect(() => {
48 48
     if (id !== '') {
@@ -54,7 +54,31 @@ function body(props) {
54 54
     request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55 55
       // res.reportDate = moment(res.reportDate)
56 56
       if (res) {
57
-        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
57
+
58
+        const b = {};
59
+        JSON.parse(res?.questionnaire)?.map(x => {
60
+          if (x.key === 'intentArea') {
61
+          
62
+            return;
63
+          }
64
+          if (x.key === 'maxPrice') {
65
+            b[x.key] = x.result / 10000;
66
+            return;
67
+          }
68
+          if (x.type === 'checkbox') {
69
+            b[x.key] = x.resultId;
70
+          } else {
71
+            b[x.key] = x.result;
72
+          }
73
+        });
74
+
75
+        // console.log(b, 'questionnaire');
76
+        props.form.setFieldsValue({
77
+          ...res,
78
+          reportDate: moment(res.reportDate),
79
+          ...b,
80
+          intentArea: res.intentArea,
81
+        });
58 82
         //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59 83
       }
60 84
     });
@@ -64,11 +88,11 @@ function body(props) {
64 88
     // props.form.setFieldsValue(res)
65 89
     console.log(params, 'params');
66 90
     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'),
91
+      ...apis.searchHouse.reply,
92
+      urlData: { id },
93
+      data: {
94
+        auditRemark: props.form.getFieldValue('auditRemark'),
95
+        status: params.status,
72 96
       },
73 97
     })
74 98
       .then(() => {
@@ -86,7 +110,7 @@ function body(props) {
86 110
     e.preventDefault();
87 111
     props.form.validateFields((err, values) => {
88 112
       if (!err) {
89
-        submitDate({ verifyStatus: '1' });
113
+        submitDate({ status: '1' });
90 114
         // submitDate({ ...values })
91 115
       }
92 116
     });
@@ -104,149 +128,153 @@ function body(props) {
104 128
         </Form.Item> */}
105 129
         {/* ············分割线............. */}
106 130
         <Form.Item label="意向区域">
107
-          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled}/>)}
131
+          {getFieldDecorator('name')(<Input placeholder="意向区域" disabled={disabled} />)}
108 132
         </Form.Item>
109 133
         <Form.Item label="客户姓名">
110
-          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled}/>)}
134
+          {getFieldDecorator('nickname')(<Input placeholder="客户姓名" disabled />)}
111 135
         </Form.Item>
112 136
         <Form.Item label="客户电话">
113
-          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
137
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled />)}
114 138
         </Form.Item>
115 139
         <Form.Item label="客户性别">
116
-          {getFieldDecorator('sex')(
117
-            <Radio.Group disabled={disabled}>
118
-              <Radio value={1}>男</Radio>
119
-              <Radio value={2}>女</Radio>
140
+          {getFieldDecorator('gender')(
141
+            <Radio.Group disabled>
142
+              <Radio value="1">男</Radio>
143
+              <Radio value="2">女</Radio>
120 144
             </Radio.Group>,
121 145
           )}
122 146
         </Form.Item>
123 147
         <Form.Item label="客户预算">
124
-          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
148
+          {getFieldDecorator('maxPrice')(
149
+            <Input placeholder="客户预算" disabled={disabled} suffix="W" />,
150
+          )}
125 151
         </Form.Item>
126 152
         <Form.Item label="房屋类型">
127
-          {getFieldDecorator('housetype')(
153
+          {getFieldDecorator('isNew')(
128 154
             <Select placeholder="房屋类型" disabled={disabled}>
129
-              <Option value="新房">新房</Option>
130
-              <Option value="二手房">二手房</Option>
131
-              <Option value="不限">不限</Option>
155
+              <Option value={1}>新房</Option>
156
+              <Option value={2}>二手房</Option>
157
+              <Option value={3}>不限</Option>
132 158
             </Select>,
133 159
           )}
134 160
         </Form.Item>
135 161
         <Form.Item label="意向居室">
136
-          {getFieldDecorator('housetype')(
162
+          {getFieldDecorator('layout')(
137 163
             <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>
164
+              <Option value={1}>一室一厅</Option>
165
+              <Option value={2}>二室一厅</Option>
166
+              <Option value={3}>二室二厅</Option>
167
+              <Option value={4}>三室一厅</Option>
168
+              <Option value={5}>三室二厅</Option>
169
+              <Option value={6}>四室一厅</Option>
170
+              <Option value={7}>四室二厅</Option>
171
+              <Option value={8}>四室二五室及以上厅</Option>
144 172
             </Select>,
145 173
           )}
146 174
         </Form.Item>
147
-
175
+ 
148 176
         <Form.Item label="购房目的">
149
-          {getFieldDecorator('housetype')(
177
+          {getFieldDecorator('purpose')(
150 178
             <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>
179
+              <Option value={1}>刚需</Option>
180
+              <Option value={2}>结婚</Option>
181
+              <Option value={3}>养老</Option>
182
+              <Option value={4}>改善</Option>
183
+              <Option value={5}>教育</Option>
184
+              <Option value={6}>投资</Option>
157 185
             </Select>,
158 186
           )}
159 187
         </Form.Item>
160 188
         <Form.Item label="侧重优势">
161
-          {getFieldDecorator('housetype')(
189
+          {getFieldDecorator('advantage')(
162 190
             <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
-            
191
+              <Option value={1}>发展规划</Option>
192
+              <Option value={2}>学区</Option>
193
+              <Option value={3}>交通</Option>
194
+              <Option value={4}>配套</Option>
195
+              <Option value={5}>环境</Option>
169 196
             </Select>,
170 197
           )}
171 198
         </Form.Item>
172 199
 
173 200
         <Form.Item label="社区要求">
174
-          {getFieldDecorator('housetype')(
201
+          {getFieldDecorator('facility')(
175 202
             <Select placeholder="社区要求" disabled={disabled}>
176
-              <Option value="发展规划">楼栋管家</Option>
177
-              <Option value="学区">金钥匙服务</Option>
178
-              <Option value="交通">社区娱乐</Option>
179
-              <Option value="配套">会所功能</Option>     
203
+              <Option value={1}>楼栋管家</Option>
204
+              <Option value={2}>金钥匙服务</Option>
205
+              <Option value={3}>社区娱乐</Option>
206
+              <Option value={4}>会所功能</Option>
180 207
             </Select>,
181 208
           )}
182 209
         </Form.Item>
183 210
 
184 211
         <Form.Item label="面积要求">
185
-          {getFieldDecorator('housetype')(
212
+          {getFieldDecorator('area')(
186 213
             <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>     
214
+              <Option value={1}>60m²</Option>
215
+              <Option value={2}>60~90m²</Option>
216
+              <Option value={3}>110~130m²</Option>
217
+              <Option value={4}>130~150m²</Option>
218
+              <Option value={5}>150~200m²</Option>
219
+              <Option value={6}>200m²以上</Option>
193 220
             </Select>,
194 221
           )}
195 222
         </Form.Item>
196 223
 
197 224
         <Form.Item label="朝向要求">
198
-          {getFieldDecorator('housetype')(
225
+          {getFieldDecorator('orientation')(
199 226
             <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
-                
227
+              <Option value={1}>朝东</Option>
228
+              <Option value={2}>朝南</Option>
229
+              <Option value={3}>朝西</Option>
230
+              <Option value={4}>朝北</Option>
231
+              <Option value={5}>南北通透</Option>
206 232
             </Select>,
207 233
           )}
208 234
         </Form.Item>
209 235
 
210
-        <Form.Item label="楼层要求" >
211
-          {getFieldDecorator('housetype')(
236
+        <Form.Item label="楼层要求">
237
+          {getFieldDecorator('isHigh')(
212 238
             <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
-                
239
+              <Option value={1}>低楼层</Option>
240
+              <Option value={2}>中楼层</Option>
241
+              <Option value={3}>高楼层</Option>
242
+              <Option value={4}>底层</Option>
243
+              <Option value={5}>顶层</Option>
219 244
             </Select>,
220 245
           )}
221 246
         </Form.Item>
222 247
 
223 248
         <Form.Item label="楼龄要求">
224
-          {getFieldDecorator('housetype')(
249
+          {getFieldDecorator('buildingAge')(
225 250
             <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
-                
251
+              <Option value={1}>5年以内</Option>
252
+              <Option value={2}>10年以内</Option>
253
+              <Option value={3}>15年以内</Option>
254
+              <Option value={4}>20年以内</Option>
255
+              <Option value={5}>20年以上</Option>
232 256
             </Select>,
233 257
           )}
234 258
         </Form.Item>
235 259
 
236
-        <Form.Item label="客户备注" >
237
-          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
260
+        <Form.Item label="客户备注">
261
+          {getFieldDecorator('remark')(
262
+            <TextArea placeholder="客户描述" disabled={disabled} rows={7} />,
263
+          )}
238 264
         </Form.Item>
239 265
         <Form.Item label="回访备注">
240
-          {getFieldDecorator('describe', {
266
+          {getFieldDecorator('auditRemark', {
241 267
             rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
242
-          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
268
+          })(<TextArea placeholder="回访备注" disabled={type === 'detail'} rows={7} />)}
243 269
         </Form.Item>
244 270
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
245
-          <Button type="primary" htmlType="submit">
271
+         {type === 'detail'?<Button onClick={()=>{router.go('-1')}}>
272
+            返回
273
+          </Button>:<> <Button type="primary" htmlType="submit">
246 274
             有效
247 275
           </Button>
248 276
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
249
-          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
277
+          <Button onClick={() => submitDate({ status: '2' })}>无效</Button></>}
250 278
         </Form.Item>
251 279
       </Form>
252 280
     </Card>

+ 11
- 16
src/pages/findRoom/buyRoom/index.jsx Ver arquivo

@@ -102,18 +102,18 @@ function Recommend() {
102 102
     },
103 103
     {
104 104
       title: '意向区域',
105
-      dataIndex: 'intentArea',//意向区域
106
-      key: 'intentArea',
105
+      dataIndex: 'name',//意向区域
106
+      key: 'name',
107 107
       align: 'center',
108 108
       // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109 109
 
110 110
     },
111 111
     {
112 112
       title: '购房预算',
113
-      dataIndex: 'intention',
114
-      key: 'intention',
113
+      dataIndex: 'maxPrice',
114
+      key: 'maxPrice',
115 115
       align: 'center',
116
-      // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
116
+      render:(x)=>x&&<span>{x/10000}万</span>
117 117
 
118 118
     },
119 119
     {
@@ -128,7 +128,7 @@ function Recommend() {
128 128
       dataIndex: 'status',
129 129
       key: 'status',
130 130
       align: 'center',
131
-      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
131
+      render: (_, record) => <><span>{record.status == '0' ? '待回访' : record.status == '1' ? '已回访' : record.status == '2' ? '无效' : ''}</span></>,
132 132
     },
133 133
     {
134 134
       title: '操作',
@@ -137,13 +137,8 @@ function Recommend() {
137 137
       align: 'center',
138 138
 
139 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> */}
140
+        <>{record.status == '0'?<Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>:
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>}
147 142
         </>
148 143
       ),
149 144
     },
@@ -157,7 +152,7 @@ function Recommend() {
157 152
       placeholder: '请输入姓名',
158 153
     },
159 154
     {
160
-      name: 'tel',
155
+      name: 'phone',
161 156
       label: '电话',
162 157
       placeholder: '请输入电话',
163 158
     },
@@ -174,7 +169,7 @@ function Recommend() {
174 169
     //   ]
175 170
     // },
176 171
     {
177
-      name: 'verifyStatus',
172
+      name: 'status',
178 173
       label: '状态',
179 174
       placeholder: '请选择状态',
180 175
       type: 'select',
@@ -209,7 +204,7 @@ function Recommend() {
209 204
           return data;
210 205
         }}
211 206
         columns={columns}
212
-        actionRender={actionRender}
207
+        // actionRender={actionRender}
213 208
       />
214 209
 
215 210
     </>

+ 72
- 39
src/pages/findRoom/overseas/audit.jsx Ver arquivo

@@ -41,8 +41,8 @@ function body(props) {
41 41
   // eslint-disable-next-line react-hooks/rules-of-hooks
42 42
   const [dataSource, setDataSource] = useState({ picture: '' });
43 43
 
44
-  const { id,type } = props.location.query;
45
-  const disabled= type==='detail'
44
+  const { id, type } = props.location.query;
45
+  const disabled = true;
46 46
 
47 47
   useEffect(() => {
48 48
     if (id !== '') {
@@ -54,8 +54,26 @@ function body(props) {
54 54
     request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55 55
       // res.reportDate = moment(res.reportDate)
56 56
       if (res) {
57
-        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58
-        //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
57
+        const b = {};
58
+        JSON.parse(res?.questionnaire)?.map(x => {
59
+         
60
+          if (x.key === 'maxPrice') {
61
+            b[x.key] = x.result / 10000;
62
+            return;
63
+          }
64
+          if (x.type === 'checkbox') {
65
+            b[x.key] = x.resultId;
66
+          } else {
67
+            b[x.key] = x.result;
68
+          }
69
+        });
70
+
71
+        console.log(b, 'questionnaire');
72
+        props.form.setFieldsValue({
73
+          ...res,
74
+          reportDate: moment(res.reportDate),
75
+          ...b,
76
+        });
59 77
       }
60 78
     });
61 79
   }
@@ -64,11 +82,11 @@ function body(props) {
64 82
     // props.form.setFieldsValue(res)
65 83
     console.log(params, 'params');
66 84
     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'),
85
+      ...apis.searchHouse.reply,
86
+      urlData: { id },
87
+      data: {
88
+        auditRemark: props.form.getFieldValue('auditRemark'),
89
+        status: params.status,
72 90
       },
73 91
     })
74 92
       .then(() => {
@@ -86,7 +104,7 @@ function body(props) {
86 104
     e.preventDefault();
87 105
     props.form.validateFields((err, values) => {
88 106
       if (!err) {
89
-        submitDate({ verifyStatus: '1' });
107
+        submitDate({ status: '1' });
90 108
         // submitDate({ ...values })
91 109
       }
92 110
     });
@@ -104,62 +122,77 @@ function body(props) {
104 122
         </Form.Item> */}
105 123
         {/* ············分割线............. */}
106 124
         <Form.Item label="意向区域">
107
-          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled}/>)}
125
+          {getFieldDecorator('intentArea')(<Input placeholder="意向区域:" disabled={disabled} />)}
108 126
         </Form.Item>
109 127
         <Form.Item label="客户姓名">
110
-          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled}/>)}
128
+          {getFieldDecorator('nickname')(<Input placeholder="客户姓名" disabled={disabled} />)}
111 129
         </Form.Item>
112 130
         <Form.Item label="客户电话">
113
-          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled}/>)}
131
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled} />)}
114 132
         </Form.Item>
115 133
         <Form.Item label="客户性别">
116
-          {getFieldDecorator('sex')(
117
-            <Radio.Group disabled={disabled}>
118
-              <Radio value={1}>男</Radio>
119
-              <Radio value={2}>女</Radio>
134
+          {getFieldDecorator('gender')(
135
+            <Radio.Group disabled>
136
+              <Radio value="1">男</Radio>
137
+              <Radio value="2">女</Radio>
120 138
             </Radio.Group>,
121 139
           )}
122 140
         </Form.Item>
123 141
         <Form.Item label="客户预算">
124
-          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="W"/>)}
142
+          {getFieldDecorator('maxPrice')(
143
+            <Input placeholder="客户预算" disabled={disabled} suffix="W" />,
144
+          )}
125 145
         </Form.Item>
126 146
         <Form.Item label="房屋类型">
127
-          {getFieldDecorator('housetype')(
147
+          {getFieldDecorator('isNew')(
128 148
             <Select placeholder="房屋类型" disabled={disabled}>
129
-              <Option value="新房">新房</Option>
130
-              <Option value="二手房">二手房</Option>
131
-              <Option value="不限">不限</Option>
149
+              <Option value={1}>新房</Option>
150
+              <Option value={2}>二手房</Option>
151
+              <Option value={3}>不限</Option>
132 152
             </Select>,
133 153
           )}
134 154
         </Form.Item>
135
-      
136 155
 
137 156
         <Form.Item label="购房目的">
138
-          {getFieldDecorator('housetype')(
157
+          {getFieldDecorator('layout')(
139 158
             <Select placeholder="购房目的" disabled={disabled}>
140
-              <Option value="刚需">投资</Option>
141
-              <Option value="结婚">移民</Option>
142
-              <Option value="养老">养老</Option>
143
-              <Option value="改善">留学</Option>
144
-              <Option value="教育">度假</Option>
159
+              <Option value={1}>投资</Option>
160
+              <Option value={2}>移民</Option>
161
+              <Option value={3}>养老</Option>
162
+              <Option value={4}>留学</Option>
163
+              <Option value={5}>度假</Option>
145 164
             </Select>,
146 165
           )}
147 166
         </Form.Item>
148
-      
149
-        <Form.Item label="客户备注" >
150
-          {getFieldDecorator('say')(<TextArea placeholder="客户描述" disabled={disabled} rows={7} />)}
167
+
168
+        <Form.Item label="客户备注">
169
+          {getFieldDecorator('remark')(
170
+            <TextArea placeholder="客户描述" disabled={disabled} rows={7} />,
171
+          )}
151 172
         </Form.Item>
152 173
         <Form.Item label="回访备注">
153
-          {getFieldDecorator('describe', {
174
+          {getFieldDecorator('auditRemark', {
154 175
             rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
155
-          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
176
+          })(<TextArea placeholder="回访备注" disabled={type === 'detail'} rows={7} />)}
156 177
         </Form.Item>
157 178
         <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>
179
+          {type === 'detail' ? (
180
+            <Button
181
+              onClick={() => {
182
+                router.go('-1');
183
+              }}
184
+            >
185
+              返回
186
+            </Button>
187
+          ) : (
188
+            <>
189
+              <Button type="primary" htmlType="submit">
190
+                有效
191
+              </Button>
192
+              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
193
+              <Button onClick={() => submitDate({ status: '2' })}>无效</Button>
194
+            </>
195
+          )}
163 196
         </Form.Item>
164 197
       </Form>
165 198
     </Card>

+ 8
- 13
src/pages/findRoom/overseas/index.jsx Ver arquivo

@@ -105,15 +105,15 @@ function Recommend() {
105 105
       dataIndex: 'intentArea',//意向区域
106 106
       key: 'intentArea',
107 107
       align: 'center',
108
-      // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
108
+      render: (_, record) => <><span>{JSON.parse(record.questionnaire)?.filter(x=>x.key=='intentArea')[0]?.result}</span></>,
109 109
 
110 110
     },
111 111
     {
112 112
       title: '购房预算',
113
-      dataIndex: 'intention',
114
-      key: 'intention',
113
+      dataIndex: 'maxPrice',
114
+      key: 'maxPrice',
115 115
       align: 'center',
116
-      render:(x)=>x&&<span>{x}万</span>
116
+      render:(x)=>x&&<span>{x/10000}万</span>
117 117
 
118 118
     },
119 119
     {
@@ -128,7 +128,7 @@ function Recommend() {
128 128
       dataIndex: 'status',
129 129
       key: 'status',
130 130
       align: 'center',
131
-      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
131
+      render: (_, record) => <><span>{record.status == '0' ? '待回访' : record.status == '1' ? '已回访' : record.status == '2' ? '无效' : ''}</span></>,
132 132
     },
133 133
     {
134 134
       title: '操作',
@@ -137,13 +137,8 @@ function Recommend() {
137 137
       align: 'center',
138 138
 
139 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> */}
140
+        <>{record.status == '0'?<Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>:
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>}
147 142
         </>
148 143
       ),
149 144
     },
@@ -208,7 +203,7 @@ function Recommend() {
208 203
           data.type='3'
209 204
           return data;
210 205
         }}
211
-        actionRender={actionRender}
206
+        // actionRender={actionRender}
212 207
       />
213 208
 
214 209
     </>

+ 84
- 50
src/pages/findRoom/rent/audit.jsx Ver arquivo

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Input, Button, Card, Radio, notification, Select,Checkbox } from 'antd';
2
+import { Form, Input, Button, Card, Radio, notification, Select, Checkbox } from 'antd';
3 3
 import moment from 'moment';
4 4
 import request from '@/utils/request';
5 5
 import apis from '@/services/apis';
@@ -26,7 +26,7 @@ const openNotificationWithIcon = (type, message) => {
26 26
     description: '',
27 27
   });
28 28
 };
29
-
29
+const questionnaire = `[{"question":"你的租房预算是多少/月?","key":"minPrice","type":"range","result":500,"resultId":null,"options":[500,4500]},{"question":"你的租房预算是多少/月?","key":"maxPrice","type":"range","result":3016,"resultId":null,"options":[500,4500]},{"question":"你的租房偏好?","key":"preference","type":"checkbox","result":"整租","resultId":1,"options":[{"name":"整租","id":1},{"name":"合租","id":2},{"name":"不限","id":3}]},{"question":"你想租几居室的房子?","key":"layout","type":"checkbox","result":"二室","resultId":2,"options":[{"name":"一室","id":1},{"name":"二室","id":2},{"name":"三室","id":3},{"name":"四室","id":4},{"name":"五室及以上","id":5}]},{"question":"其他要求?","key":"purpose","type":"checkbox","result":"独立阳台","resultId":5,"options":[{"name":"独卫","id":1},{"name":"近地铁","id":2},{"name":"拎包入住","id":3},{"name":"精装修","id":4},{"name":"独立阳台","id":5},{"name":"集中供暖","id":6},{"name":"押一付一","id":7},{"name":"双卫","id":8},{"name":"新上","id":9},{"name":"认证公寓","id":10}]},{"question":"您还有哪些特殊要求?","key":"remark","type":"textarea","result":"12","resultId":null},{"result":null,"key":"intentArea","question":"意向区域"},{"question":"创建人小程序人员","result":"b47e82b90071ba6142c07436c80be81f","key":"personId"}]`;
30 30
 function body(props) {
31 31
   const { getFieldDecorator } = props.form;
32 32
 
@@ -42,7 +42,7 @@ function body(props) {
42 42
   const [dataSource, setDataSource] = useState({ picture: '' });
43 43
 
44 44
   const { id, type } = props.location.query;
45
-  const disabled = type === 'detail';
45
+  const disabled = true;
46 46
 
47 47
   useEffect(() => {
48 48
     if (id !== '') {
@@ -54,7 +54,37 @@ function body(props) {
54 54
     request({ ...apis.searchHouse.IdHouse, urlData: { id: currentId } }).then(res => {
55 55
       // res.reportDate = moment(res.reportDate)
56 56
       if (res) {
57
-        props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
57
+        const b = {};
58
+      
59
+        JSON.parse(res.questionnaire)?.map(x => {
60
+          if (x.key === 'intentArea') {
61
+            // b[x.key] = [x.resultId];
62
+            return;
63
+          }
64
+          if (x.key === 'purpose') {
65
+            b[x.key] = [x.resultId];
66
+         
67
+            return;
68
+          }
69
+          if (x.key === 'maxPrice') {
70
+            b[x.key] = x.result;
71
+            return;
72
+          }
73
+          if (x.type === 'checkbox') {
74
+            b[x.key] = x.resultId;
75
+          } else {
76
+            b[x.key] = x.result;
77
+          }
78
+        });
79
+
80
+        // console.log(b, 'questionnaire');
81
+        props.form.setFieldsValue({
82
+          ...res,
83
+          reportDate: moment(res.reportDate),
84
+          ...b,
85
+          intentArea: res.intentArea,
86
+        });
87
+        // props.form.setFieldsValue({ ...res, reportDate: moment(res.reportDate) });
58 88
         //包裹的没渲染完就执行set 导致在呈现字段之前无法设置表单字段
59 89
       }
60 90
     });
@@ -64,11 +94,11 @@ function body(props) {
64 94
     // props.form.setFieldsValue(res)
65 95
     console.log(params, 'params');
66 96
     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'),
97
+      ...apis.searchHouse.reply,
98
+      urlData: { id },
99
+      data: {
100
+        auditRemark: props.form.getFieldValue('auditRemark'),
101
+        status: params.status,
72 102
       },
73 103
     })
74 104
       .then(() => {
@@ -86,7 +116,7 @@ function body(props) {
86 116
     e.preventDefault();
87 117
     props.form.validateFields((err, values) => {
88 118
       if (!err) {
89
-        submitDate({ verifyStatus: '1' });
119
+        submitDate({ status: '1' });
90 120
         // submitDate({ ...values })
91 121
       }
92 122
     });
@@ -104,80 +134,84 @@ function body(props) {
104 134
         </Form.Item> */}
105 135
         {/* ············分割线............. */}
106 136
         <Form.Item label="意向区域">
107
-          {getFieldDecorator('intention')(<Input placeholder="意向区域:" disabled={disabled} />)}
137
+          {getFieldDecorator('name')(<Input placeholder="意向区域" disabled={disabled} />)}
108 138
         </Form.Item>
109 139
         <Form.Item label="客户姓名">
110
-          {getFieldDecorator('name')(<Input placeholder="客户姓名" disabled={disabled} />)}
140
+          {getFieldDecorator('nickname')(<Input placeholder="客户姓名" disabled />)}
111 141
         </Form.Item>
112 142
         <Form.Item label="客户电话">
113
-          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled={disabled} />)}
143
+          {getFieldDecorator('phone')(<Input placeholder="客户电话" disabled />)}
114 144
         </Form.Item>
115 145
         <Form.Item label="客户性别">
116
-          {getFieldDecorator('sex')(
117
-            <Radio.Group disabled={disabled}>
118
-              <Radio value={1}>男</Radio>
119
-              <Radio value={2}>女</Radio>
146
+          {getFieldDecorator('gender')(
147
+            <Radio.Group disabled>
148
+              <Radio value="1">男</Radio>
149
+              <Radio value="2">女</Radio>
120 150
             </Radio.Group>,
121 151
           )}
122 152
         </Form.Item>
123 153
         <Form.Item label="客户预算">
124
-          {getFieldDecorator('name')(<Input placeholder="客户预算" disabled={disabled} suffix="元/月"/>)}
154
+          {getFieldDecorator('maxPrice')(
155
+            <Input placeholder="客户预算" disabled={disabled} suffix="元/月" />,
156
+          )}
125 157
         </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>
158
+        <Form.Item label="租房偏好">
159
+          {getFieldDecorator('preference')(
160
+            <Select placeholder="租房偏好" disabled={disabled}>
161
+              <Option value={1}>整租</Option>
162
+              <Option value={2}>合租</Option>
163
+              <Option value={3}>不限</Option>
132 164
             </Select>,
133 165
           )}
134 166
         </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>
167
+        <Form.Item label="居室要求">
168
+          {getFieldDecorator('layout')(
169
+            <Select placeholder="居室要求" disabled={disabled}>
170
+              <Option value={1}>一居</Option>
171
+              <Option value={2}>二居</Option>
172
+              <Option value={3}>三居</Option>
173
+              <Option value={4}>四居</Option>
174
+              <Option value={5}>五居</Option>
175
+              <Option value={6}>五居以上</Option>
144 176
             </Select>,
145 177
           )}
146 178
         </Form.Item>
147 179
 
148
-        <Form.Item label="意向居室">
149
-          {getFieldDecorator('more')(
180
+        <Form.Item label="其他要求">
181
+          {getFieldDecorator('purpose')(
150 182
             <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>
183
+              <Checkbox value={1}>独卫</Checkbox>
184
+              <Checkbox value={2}>近地铁</Checkbox>
185
+              <Checkbox value={3}>拎包入住</Checkbox>
186
+              <Checkbox value={4}>精装修</Checkbox>
187
+              <Checkbox value={5}>独立阳台</Checkbox>
188
+              <Checkbox value={6}>集中供暖</Checkbox>
189
+              <Checkbox value={7}>押一付一</Checkbox>
190
+              <Checkbox value={8}>双卫</Checkbox>
191
+              <Checkbox value={9}>新上</Checkbox>
192
+              <Checkbox value={10}>认证公寓</Checkbox>
161 193
             </Checkbox.Group>,
162 194
           )}
163 195
         </Form.Item>
164 196
 
165 197
         <Form.Item label="客户备注">
166
-          {getFieldDecorator('say')(
198
+          {getFieldDecorator('remark')(
167 199
             <TextArea placeholder="客户描述" disabled={disabled} rows={7} />,
168 200
           )}
169 201
         </Form.Item>
170 202
         <Form.Item label="回访备注">
171
-          {getFieldDecorator('describe', {
203
+          {getFieldDecorator('auditRemark', {
172 204
             rules: [{ required: true, message: '请输入回访备注!' }], //v3x必填
173
-          })(<TextArea placeholder="回访备注" disabled={disabled} rows={7} />)}
205
+          })(<TextArea placeholder="回访备注" disabled={type === 'detail'} rows={7} />)}
174 206
         </Form.Item>
175 207
         <Form.Item style={{ display: 'flex', justifyContent: 'center' }}>
176
-          <Button type="primary" htmlType="submit">
208
+         {type === 'detail'?<Button onClick={()=>{router.go('-1')}}>
209
+            返回
210
+          </Button>:<> <Button type="primary" htmlType="submit">
177 211
             有效
178 212
           </Button>
179 213
           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180
-          <Button onClick={() => submitDate({ verifyStatus: '2' })}>无效</Button>
214
+          <Button onClick={() => submitDate({ status: '2' })}>无效</Button></>}
181 215
         </Form.Item>
182 216
       </Form>
183 217
     </Card>

+ 8
- 13
src/pages/findRoom/rent/index.jsx Ver arquivo

@@ -102,16 +102,16 @@ function Recommend() {
102 102
     },
103 103
     {
104 104
       title: '意向区域',
105
-      dataIndex: 'intentArea',//意向区域
106
-      key: 'intentArea',
105
+      dataIndex: 'name',//意向区域
106
+      key: 'name',
107 107
       align: 'center',
108 108
       // render: (_, record) => <><span>{record.area = '江苏省南京市秦淮区'}</span></>,
109 109
 
110 110
     },
111 111
     {
112 112
       title: '租房预算(元/月)',
113
-      dataIndex: 'intention',
114
-      key: 'intention',
113
+      dataIndex: 'maxPrice',
114
+      key: 'maxPrice',
115 115
       align: 'center',
116 116
       // render:(_,record)=><span>{record='香颂.蔚澜半岛'}</span>
117 117
 
@@ -128,7 +128,7 @@ function Recommend() {
128 128
       dataIndex: 'status',
129 129
       key: 'status',
130 130
       align: 'center',
131
-      render: (_, record) => <><span>{record.verifyStatus === 0 ? '待回访' : record.verifyStatus === 1 ? '已回访' : record.verifyStatus === 2 ? '无效' : ''}</span></>,
131
+      render: (_, record) => <><span>{record.status == 0 ? '待回访' : record.status == 1 ? '已回访' : record.status == 2 ? '无效' : ''}</span></>,
132 132
     },
133 133
     {
134 134
       title: '操作',
@@ -137,13 +137,8 @@ function Recommend() {
137 137
       align: 'center',
138 138
 
139 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> */}
140
+        <>{record.status == '0'?<Button type='link' onClick={() => toAudit(record,'edit')}>审核</Button>:
141
+        <Button type='link' onClick={() => toAudit(record,'detail')}>查看详情</Button>}
147 142
         </>
148 143
       ),
149 144
     },
@@ -208,7 +203,7 @@ function Recommend() {
208 203
           return data;
209 204
         }}
210 205
         columns={columns}
211
-        actionRender={actionRender}
206
+        // actionRender={actionRender}
212 207
       />
213 208
 
214 209
     </>

+ 4
- 3
src/services/apis.js Ver arquivo

@@ -332,9 +332,10 @@ export default {
332 332
       action: 'admin.searchHouse.id.put',
333 333
     },
334 334
     //回访
335
-    savingHouse: {
336
-      method: 'POST',
337
-      url: `${prefix}/searchHouse`,
335
+    reply: {
336
+      
337
+      method: 'PUT',
338
+      url: `${prefix}/reply/:id`,
338 339
       action: '',
339 340
     },
340 341
   },