Browse Source

Merge branch 'dev'

魏超 5 years ago
parent
commit
087812384b

+ 8
- 8
src/components/SelectButton/LivePlatSelect.jsx View File

22
 const LivePlatSelect = props => {
22
 const LivePlatSelect = props => {
23
   const [data, setData] = useState([])
23
   const [data, setData] = useState([])
24
   const [value, setValue] = useState([])
24
   const [value, setValue] = useState([])
25
-  console.log('props', props);
25
+
26
   useEffect(() => {
26
   useEffect(() => {
27
     getLivePlatList();
27
     getLivePlatList();
28
-  }, [props.cityId])
28
+  }, [props.value])
29
 
29
 
30
 
30
 
31
   const getLivePlatList = e => {
31
   const getLivePlatList = e => {
38
 
38
 
39
 
39
 
40
   const checkValue = (data) => {
40
   const checkValue = (data) => {
41
-    if (props.liveApp) {
42
-      const tempData = data.filter(f => f.id == props.liveApp)
43
-      const va = (tempData.length > 0) ? props.liveApp : '平台已下线,请重新选择'
41
+    if (props.value) {
42
+      const tempData = data.filter(f => f.id == props.value)
43
+      const va = (tempData.length > 0) ? props.value : '平台已下线,请重新选择'
44
       props.onChange(va)
44
       props.onChange(va)
45
 
45
 
46
     }
46
     }
49
   return (
49
   return (
50
       <Select
50
       <Select
51
       showSearch
51
       showSearch
52
-      value={props.value}
52
+      value={`${props.value || ''}`}
53
       style={{ width: '300px' }}
53
       style={{ width: '300px' }}
54
       placeholder="请选择平台"
54
       placeholder="请选择平台"
55
       onChange={props.onChange}
55
       onChange={props.onChange}
56
       filterOption={(input, option) =>
56
       filterOption={(input, option) =>
57
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
57
         option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
58
       }>
58
       }>
59
-          {data.map(building => (
60
-            <Option key={building.id} value={building.id}>{building.livePlatName}</Option>
59
+          {data.map(live => (
60
+            <Option key={live.id} value={`${live.id}`}>{live.livePlatName}</Option>
61
           ))}
61
           ))}
62
       </Select>
62
       </Select>
63
   )
63
   )

+ 1
- 0
src/components/XForm/ImageListUpload.jsx View File

77
       <div className="clearfix">
77
       <div className="clearfix">
78
         <Upload
78
         <Upload
79
           listType="picture-card"
79
           listType="picture-card"
80
+          multiple={true}
80
           fileList={fileList}
81
           fileList={fileList}
81
           onPreview={this.handlePreview}
82
           onPreview={this.handlePreview}
82
           onChange={this.handleChange}
83
           onChange={this.handleChange}

+ 3
- 3
src/pages/activity/liveActivity/edit/components/base.jsx View File

32
   // 查询列表
32
   // 查询列表
33
   const getLiveActivityData = (liveActivityId) => {
33
   const getLiveActivityData = (liveActivityId) => {
34
     request({ ...apis.taliveActivity.getTaLiveActivity, urlData: {id: liveActivityId} }).then((data) => {
34
     request({ ...apis.taliveActivity.getTaLiveActivity, urlData: {id: liveActivityId} }).then((data) => {
35
-        console.log(data)
35
+        console.log(data, 'getLiveActivityData')
36
         setLiveActivityData(data.data)
36
         setLiveActivityData(data.data)
37
         // if(data.qrCode == 'null'){
37
         // if(data.qrCode == 'null'){
38
         //   message.error("暂时无法获取二维码")
38
         //   message.error("暂时无法获取二维码")
135
         </Form.Item>
135
         </Form.Item>
136
         <Form.Item label="直播小程序">
136
         <Form.Item label="直播小程序">
137
           {getFieldDecorator('liveApp', {
137
           {getFieldDecorator('liveApp', {
138
-              initialValue: liveActivityData.liveAppName,
138
+              initialValue: liveActivityData.liveApp,
139
               rules: [{ required: true, message: '请选择直播小程序' }],
139
               rules: [{ required: true, message: '请选择直播小程序' }],
140
-            })(<LivePlatSelect liveApp={liveActivityData.liveAppName}/>)}
140
+            })(<LivePlatSelect />)}
141
         </Form.Item>
141
         </Form.Item>
142
         <Form.Item label="房间参数">
142
         <Form.Item label="房间参数">
143
           {getFieldDecorator('liveRoomParam', {
143
           {getFieldDecorator('liveRoomParam', {

+ 7
- 6
src/pages/building/list/add/components/base.jsx View File

13
 import TagGroup from './tags'
13
 import TagGroup from './tags'
14
 import Amap from './amap'
14
 import Amap from './amap'
15
 import BudildingProjectType from './buildingProjectType'
15
 import BudildingProjectType from './buildingProjectType'
16
+import DragableUploadImageList from '@/components/DragableUploadImageList'
16
 import SelectCity from '../../../../../components/SelectButton/CitySelect'
17
 import SelectCity from '../../../../../components/SelectButton/CitySelect'
17
 import FileUpload from '@/components/XForm/FileUpload';
18
 import FileUpload from '@/components/XForm/FileUpload';
18
 import { POI_TYPES_KETY, getAroundData, getPOIType, POI_TYPES } from './amapAroundData'
19
 import { POI_TYPES_KETY, getAroundData, getPOIType, POI_TYPES } from './amapAroundData'
397
             })(<Input />)}
398
             })(<Input />)}
398
           </Form.Item>
399
           </Form.Item>
399
           <Form.Item label="项目说明" >
400
           <Form.Item label="项目说明" >
400
-            {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过15个字" maxLength = "15"/>)}
401
+            {getFieldDecorator('dynamic')(<Input placeholder="项目动态等,不超过30个字" maxLength = "30"/>)}
401
           </Form.Item>
402
           </Form.Item>
402
           <Form.Item label="物业类型" >
403
           <Form.Item label="物业类型" >
403
             {getFieldDecorator('propertyType')(
404
             {getFieldDecorator('propertyType')(
446
             {getFieldDecorator('avatarImage', {
447
             {getFieldDecorator('avatarImage', {
447
               rules: [{ required: true, message: '请选择项目主图' }],
448
               rules: [{ required: true, message: '请选择项目主图' }],
448
             })(
449
             })(
449
-              <ImageListUpload />,
450
+              <DragableUploadImageList />,
450
             )}
451
             )}
451
           </Form.Item>
452
           </Form.Item>
452
           <Form.Item label="楼盘封面图" help="建议图片尺寸:750*420px,比例16:9,格式:jpg,用于楼盘列表">
453
           <Form.Item label="楼盘封面图" help="建议图片尺寸:750*420px,比例16:9,格式:jpg,用于楼盘列表">
562
             {getFieldDecorator('familyNum')(<InputNumber />)}
563
             {getFieldDecorator('familyNum')(<InputNumber />)}
563
           </Form.Item>
564
           </Form.Item>
564
           <Form.Item label="物业公司" >
565
           <Form.Item label="物业公司" >
565
-            {getFieldDecorator('serviceCompany')(<Input />)}
566
+            {getFieldDecorator('serviceCompany')(<Input placeholder="不超过30个字" maxLength = "30"/>)}
566
           </Form.Item>
567
           </Form.Item>
567
           <Form.Item label="物业费" >
568
           <Form.Item label="物业费" >
568
-            {getFieldDecorator('serviceFee')(<Input />)}
569
+            {getFieldDecorator('serviceFee')(<Input placeholder="不超过30个字" maxLength = "30"/>)}
569
           </Form.Item>
570
           </Form.Item>
570
           <Form.Item label="装修标准" >
571
           <Form.Item label="装修标准" >
571
             {getFieldDecorator('decoration')(<Input />)}
572
             {getFieldDecorator('decoration')(<Input />)}
572
           </Form.Item>
573
           </Form.Item>
573
           <Form.Item label="开发商" >
574
           <Form.Item label="开发商" >
574
-            {getFieldDecorator('propertyDeveloper')(<Input placeholder="不超过15个字" maxLength = "15"/>)}
575
+            {getFieldDecorator('propertyDeveloper')(<Input placeholder="不超过30个字" maxLength = "30"/>)}
575
           </Form.Item>
576
           </Form.Item>
576
           <Form.Item label="备案名" >
577
           <Form.Item label="备案名" >
577
-            {getFieldDecorator('recordName')(<Input placeholder="不超过15个字" maxLength = "15"/>)}
578
+            {getFieldDecorator('recordName')(<Input placeholder="不超过30个字" maxLength = "30"/>)}
578
           </Form.Item>
579
           </Form.Item>
579
           <Form.Item label="楼栋总数" >
580
           <Form.Item label="楼栋总数" >
580
             {getFieldDecorator('buildingNum')(<Input min={0} type="number" style={{ width: 80}}/>)}
581
             {getFieldDecorator('buildingNum')(<Input min={0} type="number" style={{ width: 80}}/>)}

+ 7
- 0
src/pages/carouselFigure/editCarousel.jsx View File

348
           }],
348
           }],
349
           value: data.status != null ? data.status : 1,
349
           value: data.status != null ? data.status : 1,
350
         },
350
         },
351
+        {
352
+          label: '权重',
353
+          name: 'orderNo',
354
+          type: FieldTypes.Number,
355
+          value: data.orderNo,
356
+          help: "数值越大越靠前",
357
+        },
351
       ]
358
       ]
352
 
359
 
353
       const handleSubmit = val => {
360
       const handleSubmit = val => {

+ 7
- 0
src/pages/carouselFigure/propaganda.jsx View File

316
         },],
316
         },],
317
         value: data.status != null ? data.status : 1,
317
         value: data.status != null ? data.status : 1,
318
       },
318
       },
319
+      {
320
+        label: '权重',
321
+        name: 'orderNo',
322
+        type: FieldTypes.Number,
323
+        value: data.orderNo,
324
+        help: "数值越大越靠前",
325
+      },
319
     ]
326
     ]
320
 
327
 
321
     const handleSubmit = val => {
328
     const handleSubmit = val => {

+ 161
- 0
src/pages/customer/customerlist/components/BatchAssistConsultant.jsx View File

1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Table, Avatar, Radio, Modal, Descriptions, notification } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../../utils/request';
5
+import apis from '../../../../services/apis';
6
+import Styles from '../style.less';
7
+import BuildSelect from '../../../../components/SelectButton/BuildSelect'
8
+
9
+
10
+const { Option } = Select;
11
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
12
+const { Meta } = Card;
13
+
14
+/**
15
+ * 分配置业顾问
16
+ *
17
+ * @param {*} props
18
+ * @returns
19
+ */
20
+class ModalAttribution extends React.Component {
21
+  constructor(props) {
22
+    super(props);
23
+    console.log(props, 'props')
24
+    this.state = {
25
+       dataSource: { records: [] },
26
+       visibleData: { visible: false, customerId: [], buildingName: '' },
27
+    }
28
+  }
29
+
30
+  // 挂载之后
31
+  componentDidMount() {
32
+    // this.getList({ pageNumber: 1, pageSize: 5 })
33
+  }
34
+
35
+  componentDidUpdate(preProps, preState) {
36
+    console.log(this.props.visibleData)
37
+    if (this.props.visibleData.visible !== preState.visibleData.visible) {
38
+      this.getList({ pageNumber: 1, pageSize: 5, customerId: this.props.visibleData.customerId })
39
+      this.setState({ visibleData: this.props.visibleData });
40
+    }
41
+  }
42
+
43
+  // 弹框确定按钮
44
+  // eslint-disable-next-line react/sort-comp
45
+  handleOk() {
46
+    this.props.onCancel()
47
+  }
48
+
49
+  // 弹框取消按钮
50
+  handleCancel() {
51
+    this.props.onCancel()
52
+  }
53
+
54
+  changBuilding(buildingId){
55
+    this.getUserList({ pageNumber: 1, pageSize: 5, buildingId: buildingId })
56
+    this.setState({ visibleData: { visible: this.props.visibleData.visible, customerId: this.props.visibleData.customerId, buildingName: buildingId } });
57
+  }
58
+
59
+  getUserList(params){
60
+    console.log('params: ', params)
61
+    if (params.buildingId === '' || params.buildingId === null || params.buildingId === undefined) {
62
+      return
63
+    }
64
+    // 网路请求
65
+    request({ ...apis.customer.buildingConsultant, params: { ...params } }).then(res => {
66
+      this.setState({ dataSource: res })
67
+    }).catch(err => {
68
+      
69
+    })
70
+  }
71
+
72
+  getList(params) {
73
+    // 网路请求
74
+    console.log('params: ', params)
75
+    request({ ...apis.customer.buildingConsultant }).then(res => {
76
+      this.setState({ dataSource: res })
77
+    }).catch(err => {
78
+      
79
+    })
80
+  }
81
+
82
+  openNotificationWithIcon = (type, message) => {
83
+    notification[type]({
84
+      message,
85
+      description:
86
+        '',
87
+    });
88
+  };
89
+
90
+   // 分页
91
+  onChange(pageNum) {
92
+    this.getList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingName })
93
+  }
94
+
95
+  // 提交
96
+  submitGm(record) {
97
+    // 网路请求
98
+    request({ ...apis.customer.batchConsultantAssist, data: { userId: record.userId, personIds: this.state.visibleData.customerId } }).then(res => {
99
+      // eslint-disable-next-line no-unused-expressions
100
+      this.openNotificationWithIcon('success', '操作成功')
101
+      this.handleCancel()
102
+    }).catch(err => {
103
+      // eslint-disable-next-line no-unused-expressions
104
+      this.openNotificationWithIcon('error', err)
105
+    })
106
+  }
107
+
108
+  render() {
109
+    const columns = [
110
+      // {
111
+      //   title: '编号',
112
+      //   dataIndex: 'userId',
113
+      //   key: 'userId',
114
+      // },
115
+      {
116
+        title: '姓名',
117
+        dataIndex: 'userName',
118
+        key: 'userName',
119
+      },
120
+      {
121
+        title: '电话',
122
+        dataIndex: 'phone',
123
+        key: 'phone',
124
+      },
125
+      {
126
+        title: '部门',
127
+        dataIndex: 'department',
128
+        key: 'department',
129
+      },
130
+      {
131
+        title: '岗位',
132
+        dataIndex: 'position',
133
+        key: 'position',
134
+      },
135
+      {
136
+        title: '操作',
137
+        dataIndex: 'personId',
138
+        key: 'personId',
139
+        // eslint-disable-next-line no-nested-ternary
140
+        render: (_, record) => <>{ <Button type="danger" onClick={() => this.submitGm(record)}>确定</Button>}</>, },
141
+    ]
142
+    return (
143
+      <>
144
+        <Modal
145
+            title="分配置业顾问"
146
+            width={800}
147
+            destroyOnClose="true"
148
+            footer={null}
149
+            visible={this.state.visibleData.visible}
150
+            onCancel={(e) => this.handleCancel(e)}
151
+          >
152
+            <span>你正在为{this.props.visibleData.customerId.length}位公客分配置业顾问</span><br/><br/>
153
+            <BuildSelect onChange={this.changBuilding.bind(this)} value={this.state.visibleData.buildingName} />
154
+            <Table rowKey="BatchAssistConsultant" dataSource={this.state.dataSource.records} columns={columns} pagination={{pageSize: 5, total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
155
+          </Modal>
156
+      </>
157
+    );
158
+  }
159
+}
160
+
161
+export default ModalAttribution

+ 63
- 10
src/pages/customer/customerlist/index.jsx View File

8
 
8
 
9
 import Attribution from './components/attribution'
9
 import Attribution from './components/attribution'
10
 import AssistConsultant from './components/assistConsultant'
10
 import AssistConsultant from './components/assistConsultant'
11
+import BatchAssistConsultant from './components/BatchAssistConsultant'
11
 import IntegralRecord from './components/integralRecord'
12
 import IntegralRecord from './components/integralRecord'
12
 import ModalRecommendRecord from './components/recommend'
13
 import ModalRecommendRecord from './components/recommend'
13
 import ChangeStatus from './components/changeStatus'
14
 import ChangeStatus from './components/changeStatus'
60
 
61
 
61
   const [loadingStatus, setLoadingStatus] = useState(false)
62
   const [loadingStatus, setLoadingStatus] = useState(false)
62
 
63
 
64
+  // 选中的公客信息
65
+  const [personInfo, setPersonInfo] = useState([])
66
+
67
+  const [batchAssistVisibleData, setBatchAssistVisibleData] = useState({visible: false, customerId: []})
68
+
63
   // eslint-disable-next-line react-hooks/rules-of-hooks
69
   // eslint-disable-next-line react-hooks/rules-of-hooks
64
   useEffect(() => {
70
   useEffect(() => {
65
     getList({ pageNumber: 1, pageSize: 10, customerType })
71
     getList({ pageNumber: 1, pageSize: 10, customerType })
148
     setRecordVisibleData({ visible: false, customerId: '' })
154
     setRecordVisibleData({ visible: false, customerId: '' })
149
     setStatusVisibleData({ visible: false, customerId: '' })
155
     setStatusVisibleData({ visible: false, customerId: '' })
150
     setRecommendVisibleData({ visible: false, customerId: '' })
156
     setRecommendVisibleData({ visible: false, customerId: '' })
157
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
151
   }
158
   }
152
 
159
 
153
   function showRecord(record) {
160
   function showRecord(record) {
155
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
162
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
156
     setStatusVisibleData({ visible: false, customerId: '' })
163
     setStatusVisibleData({ visible: false, customerId: '' })
157
     setRecommendVisibleData({ visible: false, customerId: '' })
164
     setRecommendVisibleData({ visible: false, customerId: '' })
165
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
158
   }
166
   }
159
 
167
 
160
   function showStatus(record) {
168
   function showStatus(record) {
162
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
170
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
163
     setRecommendVisibleData({ visible: false, customerId: '' })
171
     setRecommendVisibleData({ visible: false, customerId: '' })
164
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
172
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
173
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
165
   }
174
   }
166
 
175
 
167
   // 推荐客户
176
   // 推荐客户
170
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
179
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
171
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
180
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
172
     setRecommendVisibleData({ visible: true, customerId: personId })
181
     setRecommendVisibleData({ visible: true, customerId: personId })
182
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
173
   }
183
   }
174
 
184
 
175
   //分配置业顾问
185
   //分配置业顾问
179
     setStatusVisibleData({ visible: false, customerId: '' })
189
     setStatusVisibleData({ visible: false, customerId: '' })
180
     setRecommendVisibleData({ visible: false, customerId: '' })
190
     setRecommendVisibleData({ visible: false, customerId: '' })
181
     setAssistVisibleData({ visible: true, customerId: personId })
191
     setAssistVisibleData({ visible: true, customerId: personId })
192
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
193
+  }
194
+
195
+  function batchAssistConsultant(){
196
+    if (personInfo.length <= 0){
197
+      return message.info("请至少选择一条数据");
198
+    }
199
+    setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
200
+    setRecordVisibleData({ visible: false, customerId: '' })
201
+    setStatusVisibleData({ visible: false, customerId: '' })
202
+    setRecommendVisibleData({ visible: false, customerId: '' })
203
+    setAssistVisibleData({ visible: false, customerId: '' })
204
+    setBatchAssistVisibleData({ visible: true, customerId: personInfo })
182
   }
205
   }
183
 
206
 
184
   function toCustomerDateil(record) {
207
   function toCustomerDateil(record) {
237
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
260
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
238
     setRecommendVisibleData({ visible: false, customerId: '' })
261
     setRecommendVisibleData({ visible: false, customerId: '' })
239
     setAssistVisibleData({ visible: false, customerId: ''})
262
     setAssistVisibleData({ visible: false, customerId: ''})
263
+    setBatchAssistVisibleData({visible: false, customerId: ''})
240
     getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
264
     getList({ pageNum: 1, pageSize: 10, customerType, ...props.form.getFieldsValue() })
241
   }
265
   }
242
 
266
 
267
+    const rowSelection = {
268
+      onChange: (selectedRowKeys, selectedRows) => {
269
+        console.log('selectedRowKeys:', selectedRowKeys, 'selectedRows: ', selectedRows);
270
+        setPersonInfo(selectedRows)
271
+      },
272
+    };
273
+
243
   const publicColumns = [
274
   const publicColumns = [
244
     {
275
     {
245
       title: '头像',
276
       title: '头像',
290
       // eslint-disable-next-line no-nested-ternary
321
       // eslint-disable-next-line no-nested-ternary
291
       render: (_, record) => (
322
       render: (_, record) => (
292
         <>
323
         <>
293
-          <AuthButton name="admin.customer.public.detail" noRight={null}>
324
+          {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
294
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
325
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
295
           </AuthButton>
326
           </AuthButton>
296
-          &nbsp;&nbsp;
327
+          &nbsp;&nbsp; */}
297
           <AuthButton name="admin.customer.recommend" noRight={null}>
328
           <AuthButton name="admin.customer.recommend" noRight={null}>
298
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
329
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
299
           </AuthButton>
330
           </AuthButton>
300
           <AuthButton name="admin.customer.assign" noRight={null}>
331
           <AuthButton name="admin.customer.assign" noRight={null}>
301
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => assistConsultant(record.personId)}>分配置业顾问</Button>
332
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => assistConsultant(record.personId)}>分配置业顾问</Button>
302
           </AuthButton>
333
           </AuthButton>
334
+          <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
335
+            <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
336
+          </AuthButton>
303
         </>
337
         </>
304
       ),
338
       ),
305
     },
339
     },
393
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
427
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
394
           </AuthButton>
428
           </AuthButton>
395
             &nbsp;&nbsp;
429
             &nbsp;&nbsp;
396
-          <AuthButton name="admin.customer.recommend.get" noRight={null}>
430
+          {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
397
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
431
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
398
           </AuthButton>
432
           </AuthButton>
399
-            &nbsp;&nbsp;
433
+            &nbsp;&nbsp; */}
400
           <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
434
           <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
401
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
435
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
402
           </AuthButton>
436
           </AuthButton>
480
             </Button>
514
             </Button>
481
         </Form.Item>
515
         </Form.Item>
482
       </Form>
516
       </Form>
483
-      <AuthButton name="admin.customer.import" noRight={null}>
484
-        <Button type="primary" loading={loadingStatus} onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
485
-          导出
486
-        </Button>
487
-      </AuthButton>
517
+      {
518
+        customerType === 'private' ? 
519
+        <AuthButton name="admin.customer.import" noRight={null}>
520
+          <Button type="primary" loading={loadingStatus} onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
521
+            导出
522
+          </Button>
523
+        </AuthButton> :
524
+        <>
525
+        <AuthButton name="admin.customer.import" noRight={null}>
526
+          <Button type="primary" onClick={() => batchAssistConsultant()} style={{ float: 'right', margin: '20px 0', marginLeft:'20px', zIndex: 1 }}>
527
+            批量分配置业顾问
528
+          </Button>
529
+        </AuthButton>
530
+        <AuthButton name="admin.customer.import" noRight={null}>
531
+          <Button type="primary" loading={loadingStatus} onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
532
+            导出
533
+          </Button>
534
+        </AuthButton>
535
+        </>
536
+      }
537
+      
488
 
538
 
489
       <div style={{ margin: '20px 0'}}>
539
       <div style={{ margin: '20px 0'}}>
490
           <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
540
           <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
500
         //   };
550
         //   };
501
         // }}
551
         // }}
502
         dataSource={dataSource.records} columns={privateColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> :
552
         dataSource={dataSource.records} columns={privateColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> :
503
-        <Table 
553
+        <Table rowSelection={rowSelection}
504
         // onRow={record => {
554
         // onRow={record => {
505
         //   return {
555
         //   return {
506
         //     onClick: () => publicCustomerDetail(record),
556
         //     onClick: () => publicCustomerDetail(record),
523
 
573
 
524
       {/* 分配置业顾问 */}
574
       {/* 分配置业顾问 */}
525
       <AssistConsultant visibleData={assistVisibleData} onCancel={() => closeAll()}/>
575
       <AssistConsultant visibleData={assistVisibleData} onCancel={() => closeAll()}/>
576
+
577
+      {/* 批量分配置业顾问 */}
578
+      <BatchAssistConsultant visibleData={batchAssistVisibleData} onCancel={() => closeAll()}/>
526
     </>
579
     </>
527
   );
580
   );
528
 }
581
 }

+ 7
- 3
src/pages/house/raise/edit/components/HouseGrid/Room.jsx View File

4
 import Style from './style.less'
4
 import Style from './style.less'
5
 
5
 
6
 export default function Room(props) {
6
 export default function Room(props) {
7
-  const { roomName, price, apartmentName, status, raiseHeat, realRaiseHeat } = props.dataset || {}
8
-  let personNum = props.hotType === 1 ? (raiseHeat || 0) : (realRaiseHeat || 0)
7
+  console.log(props.dataset, 'propsDataSet')
8
+  const { roomName, price, apartmentName, status, raiseHeat, raiseRealHeat } = props.dataset || {}
9
+  let personNum = props.hotType === 1 ? (raiseHeat || 0) : (raiseRealHeat || 0)
10
+  if (props.hotType === 2){
11
+    personNum = isNaN(raiseRealHeat) ? 0 : raiseRealHeat
12
+  }  
9
   if (props.hotType === 3) {
13
   if (props.hotType === 3) {
10
-    personNum = !isNaN(raiseHeat) && !isNaN(realRaiseHeat) ?  raiseHeat+realRaiseHeat : isNaN(raiseHeat) && !isNaN(realRaiseHeat) ? realRaiseHeat : !isNaN(raiseHeat) && isNaN(realRaiseHeat) ? raiseHeat : 0
14
+    personNum = !isNaN(raiseHeat) && !isNaN(raiseRealHeat) ?  raiseHeat+raiseRealHeat : isNaN(raiseHeat) && !isNaN(raiseRealHeat) ? raiseRealHeat : !isNaN(raiseHeat) && isNaN(raiseRealHeat) ? raiseHeat : 0
11
   }
15
   }
12
 
16
 
13
   const handleClick = () => {
17
   const handleClick = () => {

+ 30
- 0
src/pages/record/share/countList.jsx View File

96
     });
96
     });
97
   }
97
   }
98
 
98
 
99
+  function exportSales() {
100
+    const fieldsValue = props.form.getFieldsValue()
101
+    let {shareTime,receiveTime, ...submitValue} = fieldsValue
102
+    if(null != shareTime && shareTime.length > 0){
103
+      const [startCreateDate, endCreateDate] = shareTime
104
+      submitValue.startCreateDate = moment(startCreateDate).format('YYYY-MM-DD');
105
+      submitValue.endCreateDate = moment(endCreateDate).format('YYYY-MM-DD');
106
+    }else{
107
+      submitValue.startCreateDate = null
108
+      submitValue.endCreateDate = null
109
+    }   
110
+
111
+    request({ ...apis.activity.exportSales, params: { ...submitValue} })
112
+      .then(data => {
113
+        if (!data) {
114
+          return
115
+        }
116
+        const url = window.URL.createObjectURL(new Blob([data]))
117
+        const link = document.createElement('a')
118
+        link.style.display = 'none'
119
+        link.href = url
120
+        link.setAttribute('download', '销售分享统计.xlsx')
121
+        document.body.append(link)
122
+        link.click()
123
+      }).catch(() => {
124
+
125
+      })
126
+    }
127
+
99
   const columns = [
128
   const columns = [
100
 
129
 
101
     {
130
     {
154
           </Form.Item>
183
           </Form.Item>
155
         </div>
184
         </div>
156
       </Form>
185
       </Form>
186
+      <Button name="admin.activityDynamicEnlist.export.get" noRight={null} type="primary" onClick={exportSales}>导出</Button>
157
       <Table rowKey="exchangeRecords" style={{marginTop:'40px'}} dataSource={data.records} columns={columns} pagination={false} />
187
       <Table rowKey="exchangeRecords" style={{marginTop:'40px'}} dataSource={data.records} columns={columns} pagination={false} />
158
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
188
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
159
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
189
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>

+ 15
- 10
src/pages/staff/list/RoleList.jsx View File

117
     align: 'center',
117
     align: 'center',
118
 
118
 
119
     render: (text, record) => <>
119
     render: (text, record) => <>
120
-    <AuthButton name="admin.role.publish" noRight={null}>
121
-      <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => stop(record.roleId, record.status)}>{ record.status === 1 ? '删除' : '' }
122
-      <Icon type="stop" className={styles.shoppingCart} style={{ fontSize: 14 }}/>
123
-      </span>
124
-      </AuthButton>
125
-      <AuthButton name="admin.role.put" noRight={null}>
126
-      <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={() => toEditRole(record.roleId)} >编辑
127
-      <Icon type="form" className={styles.edit} />
128
-      </span>
129
-      </AuthButton>
120
+    {record.isAdmin ? "" : 
121
+      <>
122
+        <AuthButton name="admin.role.publish" noRight={null}>
123
+        <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => stop(record.roleId, record.status)}>{ record.status === 1 ? '删除' : '' }
124
+        <Icon type="stop" className={styles.shoppingCart} style={{ fontSize: 14 }}/>
125
+        </span>
126
+        </AuthButton>
127
+        <AuthButton name="admin.role.put" noRight={null}>
128
+        <span style={{ color: '#FF925C', cursor: 'pointer' }} onClick={() => toEditRole(record.roleId)} >编辑
129
+        <Icon type="form" className={styles.edit} />
130
+        </span>
131
+        </AuthButton>
132
+      </>
133
+      }
134
+      
130
     </>,
135
     </>,
131
 
136
 
132
   },
137
   },

+ 12
- 14
src/pages/staff/list/editStaff.jsx View File

167
       label: '是否置业顾问',
167
       label: '是否置业顾问',
168
       name: 'isConsultant',
168
       name: 'isConsultant',
169
       type: FieldTypes.Switch,
169
       type: FieldTypes.Switch,
170
-      value: userData.isConsultant
170
+      value: userData.isConsultant,
171
+      props: {disabled: userData.isConsultant},
171
     },
172
     },
172
     {
173
     {
173
       label: '电话',
174
       label: '电话',
181
             pattern: new RegExp('^1[0-9]{10}$'),
182
             pattern: new RegExp('^1[0-9]{10}$'),
182
             message: '请输入正确的电话号码',
183
             message: '请输入正确的电话号码',
183
         },
184
         },
184
-      ],
185
+      ]
186
+    },
187
+    {
188
+      label: '登录名',
189
+      name: 'loginName',
190
+      type: FieldTypes.Text,
191
+      placeholder: '请输入登录名',
192
+      value: userData.loginName,
193
+      hidden: () => consultantChecked,
185
       help: '默认密码:123456',
194
       help: '默认密码:123456',
186
     },
195
     },
187
     {
196
     {
273
 
282
 
274
   console.log('--------->', fields)
283
   console.log('--------->', fields)
275
 
284
 
276
-  return <XForm onSubmit={handleSubmit} fields={fields} onCancel={() => router.go(-1)}></XForm>
285
+  return <XForm onChange={console.log} onSubmit={handleSubmit} fields={fields.filter(Boolean)} onCancel={() => router.go(-1)}></XForm>
277
 }
286
 }
278
 
287
 
279
-
280
-
281
 export default Edit
288
 export default Edit
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-

+ 10
- 0
src/services/apis.js View File

263
       url: `${prefix}/customer/consultant/assist/:id`,
263
       url: `${prefix}/customer/consultant/assist/:id`,
264
       action: 'admin.customer.consultant.assist.id.put',
264
       action: 'admin.customer.consultant.assist.id.put',
265
     },
265
     },
266
+    batchConsultantAssist: {
267
+      method: 'POST',
268
+      url: `${prefix}/customer/consultant/batchAssist`,
269
+      action: 'admin.customer.consultant.assist.id.put',
270
+    },
266
     taPointsRecords: {
271
     taPointsRecords: {
267
       method: 'GET',
272
       method: 'GET',
268
       url: `${prefix}/mine/taPointsRecords/:id`,
273
       url: `${prefix}/mine/taPointsRecords/:id`,
558
         method: 'GET',
563
         method: 'GET',
559
         action: 'admin.saleCountList.get',
564
         action: 'admin.saleCountList.get',
560
       },
565
       },
566
+      exportSales: {
567
+        url: `${prefix}/exportSales`,
568
+        method: 'GET',
569
+        action: 'admin.saleCountList.get',
570
+      },
561
       shareCountList: {
571
       shareCountList: {
562
         url: `${prefix}/shareCountList`,
572
         url: `${prefix}/shareCountList`,
563
         method: 'GET',
573
         method: 'GET',