魏超 преди 5 години
родител
ревизия
087812384b

+ 8
- 8
src/components/SelectButton/LivePlatSelect.jsx Целия файл

@@ -22,10 +22,10 @@ function usePrevious(props) {
22 22
 const LivePlatSelect = props => {
23 23
   const [data, setData] = useState([])
24 24
   const [value, setValue] = useState([])
25
-  console.log('props', props);
25
+
26 26
   useEffect(() => {
27 27
     getLivePlatList();
28
-  }, [props.cityId])
28
+  }, [props.value])
29 29
 
30 30
 
31 31
   const getLivePlatList = e => {
@@ -38,9 +38,9 @@ const LivePlatSelect = props => {
38 38
 
39 39
 
40 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 44
       props.onChange(va)
45 45
 
46 46
     }
@@ -49,15 +49,15 @@ const LivePlatSelect = props => {
49 49
   return (
50 50
       <Select
51 51
       showSearch
52
-      value={props.value}
52
+      value={`${props.value || ''}`}
53 53
       style={{ width: '300px' }}
54 54
       placeholder="请选择平台"
55 55
       onChange={props.onChange}
56 56
       filterOption={(input, option) =>
57 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 62
       </Select>
63 63
   )

+ 1
- 0
src/components/XForm/ImageListUpload.jsx Целия файл

@@ -77,6 +77,7 @@ class ImageListUpload extends React.Component {
77 77
       <div className="clearfix">
78 78
         <Upload
79 79
           listType="picture-card"
80
+          multiple={true}
80 81
           fileList={fileList}
81 82
           onPreview={this.handlePreview}
82 83
           onChange={this.handleChange}

+ 3
- 3
src/pages/activity/liveActivity/edit/components/base.jsx Целия файл

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

+ 7
- 6
src/pages/building/list/add/components/base.jsx Целия файл

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

+ 7
- 0
src/pages/carouselFigure/editCarousel.jsx Целия файл

@@ -348,6 +348,13 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
348 348
           }],
349 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 360
       const handleSubmit = val => {

+ 7
- 0
src/pages/carouselFigure/propaganda.jsx Целия файл

@@ -316,6 +316,13 @@ import LiveGroup from './LiveGroup';
316 316
         },],
317 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 328
     const handleSubmit = val => {

+ 161
- 0
src/pages/customer/customerlist/components/BatchAssistConsultant.jsx Целия файл

@@ -0,0 +1,161 @@
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 Целия файл

@@ -8,6 +8,7 @@ import router from 'umi/router';
8 8
 
9 9
 import Attribution from './components/attribution'
10 10
 import AssistConsultant from './components/assistConsultant'
11
+import BatchAssistConsultant from './components/BatchAssistConsultant'
11 12
 import IntegralRecord from './components/integralRecord'
12 13
 import ModalRecommendRecord from './components/recommend'
13 14
 import ChangeStatus from './components/changeStatus'
@@ -60,6 +61,11 @@ function body(props) {
60 61
 
61 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 69
   // eslint-disable-next-line react-hooks/rules-of-hooks
64 70
   useEffect(() => {
65 71
     getList({ pageNumber: 1, pageSize: 10, customerType })
@@ -148,6 +154,7 @@ function body(props) {
148 154
     setRecordVisibleData({ visible: false, customerId: '' })
149 155
     setStatusVisibleData({ visible: false, customerId: '' })
150 156
     setRecommendVisibleData({ visible: false, customerId: '' })
157
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
151 158
   }
152 159
 
153 160
   function showRecord(record) {
@@ -155,6 +162,7 @@ function body(props) {
155 162
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
156 163
     setStatusVisibleData({ visible: false, customerId: '' })
157 164
     setRecommendVisibleData({ visible: false, customerId: '' })
165
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
158 166
   }
159 167
 
160 168
   function showStatus(record) {
@@ -162,6 +170,7 @@ function body(props) {
162 170
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
163 171
     setRecommendVisibleData({ visible: false, customerId: '' })
164 172
     setStatusVisibleData({ visible: true, customerId: record.customerId, status: record.status })
173
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
165 174
   }
166 175
 
167 176
   // 推荐客户
@@ -170,6 +179,7 @@ function body(props) {
170 179
     setGVisibleData({ visible: false, customerId: '', realtyConsultant: '', buildingId: '' })
171 180
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
172 181
     setRecommendVisibleData({ visible: true, customerId: personId })
182
+    setBatchAssistVisibleData({ visible: false, customerId: '' })
173 183
   }
174 184
 
175 185
   //分配置业顾问
@@ -179,6 +189,19 @@ function body(props) {
179 189
     setStatusVisibleData({ visible: false, customerId: '' })
180 190
     setRecommendVisibleData({ visible: false, customerId: '' })
181 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 207
   function toCustomerDateil(record) {
@@ -237,9 +260,17 @@ function body(props) {
237 260
     setStatusVisibleData({ visible: false, customerId: '', status: '' })
238 261
     setRecommendVisibleData({ visible: false, customerId: '' })
239 262
     setAssistVisibleData({ visible: false, customerId: ''})
263
+    setBatchAssistVisibleData({visible: false, customerId: ''})
240 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 274
   const publicColumns = [
244 275
     {
245 276
       title: '头像',
@@ -290,16 +321,19 @@ function body(props) {
290 321
       // eslint-disable-next-line no-nested-ternary
291 322
       render: (_, record) => (
292 323
         <>
293
-          <AuthButton name="admin.customer.public.detail" noRight={null}>
324
+          {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
294 325
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
295 326
           </AuthButton>
296
-          &nbsp;&nbsp;
327
+          &nbsp;&nbsp; */}
297 328
           <AuthButton name="admin.customer.recommend" noRight={null}>
298 329
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
299 330
           </AuthButton>
300 331
           <AuthButton name="admin.customer.assign" noRight={null}>
301 332
             <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => assistConsultant(record.personId)}>分配置业顾问</Button>
302 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,10 +427,10 @@ function body(props) {
393 427
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
394 428
           </AuthButton>
395 429
             &nbsp;&nbsp;
396
-          <AuthButton name="admin.customer.recommend.get" noRight={null}>
430
+          {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
397 431
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
398 432
           </AuthButton>
399
-            &nbsp;&nbsp;
433
+            &nbsp;&nbsp; */}
400 434
           <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
401 435
             <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
402 436
           </AuthButton>
@@ -480,11 +514,27 @@ function body(props) {
480 514
             </Button>
481 515
         </Form.Item>
482 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 539
       <div style={{ margin: '20px 0'}}>
490 540
           <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
@@ -500,7 +550,7 @@ function body(props) {
500 550
         //   };
501 551
         // }}
502 552
         dataSource={dataSource.records} columns={privateColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> :
503
-        <Table 
553
+        <Table rowSelection={rowSelection}
504 554
         // onRow={record => {
505 555
         //   return {
506 556
         //     onClick: () => publicCustomerDetail(record),
@@ -523,6 +573,9 @@ function body(props) {
523 573
 
524 574
       {/* 分配置业顾问 */}
525 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 Целия файл

@@ -4,10 +4,14 @@ import HotBlock from "../HotBlock"
4 4
 import Style from './style.less'
5 5
 
6 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 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 17
   const handleClick = () => {

+ 30
- 0
src/pages/record/share/countList.jsx Целия файл

@@ -96,6 +96,35 @@ function record(props) {
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 128
   const columns = [
100 129
 
101 130
     {
@@ -154,6 +183,7 @@ function record(props) {
154 183
           </Form.Item>
155 184
         </div>
156 185
       </Form>
186
+      <Button name="admin.activityDynamicEnlist.export.get" noRight={null} type="primary" onClick={exportSales}>导出</Button>
157 187
       <Table rowKey="exchangeRecords" style={{marginTop:'40px'}} dataSource={data.records} columns={columns} pagination={false} />
158 188
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
159 189
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>

+ 15
- 10
src/pages/staff/list/RoleList.jsx Целия файл

@@ -117,16 +117,21 @@ const columns = [
117 117
     align: 'center',
118 118
 
119 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 Целия файл

@@ -167,7 +167,8 @@ const Edit = (props) => {
167 167
       label: '是否置业顾问',
168 168
       name: 'isConsultant',
169 169
       type: FieldTypes.Switch,
170
-      value: userData.isConsultant
170
+      value: userData.isConsultant,
171
+      props: {disabled: userData.isConsultant},
171 172
     },
172 173
     {
173 174
       label: '电话',
@@ -181,7 +182,15 @@ const Edit = (props) => {
181 182
             pattern: new RegExp('^1[0-9]{10}$'),
182 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 194
       help: '默认密码:123456',
186 195
     },
187 196
     {
@@ -273,18 +282,7 @@ const Edit = (props) => {
273 282
 
274 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 288
 export default Edit
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-

+ 10
- 0
src/services/apis.js Целия файл

@@ -263,6 +263,11 @@ export default {
263 263
       url: `${prefix}/customer/consultant/assist/:id`,
264 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 271
     taPointsRecords: {
267 272
       method: 'GET',
268 273
       url: `${prefix}/mine/taPointsRecords/:id`,
@@ -558,6 +563,11 @@ export default {
558 563
         method: 'GET',
559 564
         action: 'admin.saleCountList.get',
560 565
       },
566
+      exportSales: {
567
+        url: `${prefix}/exportSales`,
568
+        method: 'GET',
569
+        action: 'admin.saleCountList.get',
570
+      },
561 571
       shareCountList: {
562 572
         url: `${prefix}/shareCountList`,
563 573
         method: 'GET',