|
@@ -5,7 +5,7 @@ import request from '../../../utils/request';
|
5
|
5
|
import apis from '../../../services/apis';
|
6
|
6
|
import Styles from './style.less';
|
7
|
7
|
import router from 'umi/router';
|
8
|
|
-
|
|
8
|
+import withActions from '@/components/ActionList';
|
9
|
9
|
import Attribution from './components/attribution'
|
10
|
10
|
import AssistConsultant from './components/assistConsultant'
|
11
|
11
|
import BatchAssistConsultant from './components/BatchAssistConsultant'
|
|
@@ -217,7 +217,7 @@ function body(props) {
|
217
|
217
|
localStorageValue.endCreateDate = localStorageDate(localStorageValue.endCreateDate)
|
218
|
218
|
props.form.setFieldsValue(localStorageValue);
|
219
|
219
|
|
220
|
|
- getList( {pageNumber: 1, pageSize: 10, customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
|
|
220
|
+ getList({ pageNumber: 1, pageSize: 10, customerType, ...JSON.parse(localStorage.getItem("pubPageParams")) })
|
221
|
221
|
} else {
|
222
|
222
|
localStorage.setItem("pubPageParams", JSON.stringify({ pageNumber: 1, pageSize: 10, customerType: 'public' }))
|
223
|
223
|
getList({ pageNumber: 1, pageSize: 10, customerType: 'public' })
|
|
@@ -413,7 +413,7 @@ function body(props) {
|
413
|
413
|
dataIndex: 'picture',
|
414
|
414
|
key: 'picture',
|
415
|
415
|
align: 'center',
|
416
|
|
- width: '15%',
|
|
416
|
+ width: '10%',
|
417
|
417
|
// render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
|
418
|
418
|
render: (_, record) => <Avatar shape="square" style={{ color: 'blue', cursor: 'pointer' }} onClick={() => publicCustomerDetail(record)} src={record.picture} size={64} icon="user" />,
|
419
|
419
|
},
|
|
@@ -438,7 +438,7 @@ function body(props) {
|
438
|
438
|
dataIndex: '',
|
439
|
439
|
key: '',
|
440
|
440
|
align: 'center',
|
441
|
|
- width: '15%',
|
|
441
|
+ width: '10%',
|
442
|
442
|
render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
|
443
|
443
|
},
|
444
|
444
|
{
|
|
@@ -453,7 +453,7 @@ function body(props) {
|
453
|
453
|
dataIndex: 'sharePersonName',
|
454
|
454
|
key: 'sharePersonName',
|
455
|
455
|
align: 'center',
|
456
|
|
- width: '15%',
|
|
456
|
+ width: '10%',
|
457
|
457
|
},
|
458
|
458
|
{
|
459
|
459
|
title: '性别',
|
|
@@ -469,25 +469,35 @@ function body(props) {
|
469
|
469
|
dataIndex: 'customerId',
|
470
|
470
|
key: 'customerId',
|
471
|
471
|
align: 'center',
|
472
|
|
- width: '25%',
|
473
|
|
- // eslint-disable-next-line no-nested-ternary
|
474
|
|
- render: (_, record) => (
|
475
|
|
- <>
|
476
|
|
- {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
|
477
|
|
- <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
|
478
|
|
- </AuthButton>
|
479
|
|
- */}
|
480
|
|
- <AuthButton name="admin.customer.recommend" noRight={null}>
|
481
|
|
- <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
482
|
|
- </AuthButton>
|
483
|
|
- <AuthButton name="admin.customer.assign" noRight={null}>
|
484
|
|
- <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
|
485
|
|
- </AuthButton>
|
486
|
|
- <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
487
|
|
- <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
488
|
|
- </AuthButton>
|
489
|
|
- </>
|
490
|
|
- ),
|
|
472
|
+ width: '20%',
|
|
473
|
+ render: withActions((text, record) => [
|
|
474
|
+ <AuthButton name="admin.customer.recommend" noRight={null}>
|
|
475
|
+ <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
|
476
|
+ </AuthButton>,
|
|
477
|
+ <AuthButton name="admin.customer.assign" noRight={null}>
|
|
478
|
+ <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
|
|
479
|
+ </AuthButton>,
|
|
480
|
+ <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
|
481
|
+ <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
|
482
|
+ </AuthButton>
|
|
483
|
+ ]),
|
|
484
|
+ // render: (_, record) => (
|
|
485
|
+ // <>
|
|
486
|
+ // {/* <AuthButton name="admin.customer.public.detail" noRight={null}>
|
|
487
|
+ // <Button className={customerType === 'private' ? Styles.displayS : Styles.text } type="link" onClick={() => publicCustomerDetail(record)}>查看详情</Button>
|
|
488
|
+ // </AuthButton>
|
|
489
|
+ // */}
|
|
490
|
+ // <AuthButton name="admin.customer.recommend" noRight={null}>
|
|
491
|
+ // <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
|
492
|
+ // </AuthButton>
|
|
493
|
+ // <AuthButton name="admin.customer.assign" noRight={null}>
|
|
494
|
+ // <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
|
|
495
|
+ // </AuthButton>
|
|
496
|
+ // <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
|
497
|
+ // <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
|
498
|
+ // </AuthButton>
|
|
499
|
+ // </>
|
|
500
|
+ // ),
|
491
|
501
|
},
|
492
|
502
|
]
|
493
|
503
|
|
|
@@ -574,35 +584,46 @@ function body(props) {
|
574
|
584
|
key: 'customerId',
|
575
|
585
|
align: 'center',
|
576
|
586
|
width: '20%',
|
577
|
|
- // eslint-disable-next-line no-nested-ternary
|
578
|
|
- render: (_, record) => (
|
579
|
|
- <>
|
580
|
|
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', }}>
|
581
|
|
- <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
|
582
|
|
- <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
|
583
|
|
- </AuthButton>
|
584
|
|
-
|
585
|
|
- <AuthButton name="admin.customer.recommend.belong" noRight={null}>
|
586
|
|
- <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
|
587
|
|
- </AuthButton>
|
588
|
|
- </div>
|
589
|
|
-
|
590
|
|
-
|
591
|
|
- {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
|
592
|
|
- <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
|
593
|
|
- </AuthButton>
|
594
|
|
- */}
|
595
|
|
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
596
|
|
- <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
597
|
|
- <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
598
|
|
- </AuthButton>
|
599
|
|
-
|
600
|
|
- <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
|
601
|
|
- <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
602
|
|
- </AuthButton>
|
603
|
|
- </div>
|
604
|
|
- </>
|
605
|
|
- ),
|
|
587
|
+ render: withActions((text, record) => [
|
|
588
|
+
|
|
589
|
+ <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
|
|
590
|
+ <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
|
|
591
|
+ </AuthButton>,
|
|
592
|
+
|
|
593
|
+ <AuthButton name="admin.customer.recommend.belong" noRight={null}>
|
|
594
|
+ <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
|
|
595
|
+ </AuthButton>,
|
|
596
|
+
|
|
597
|
+ <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
|
598
|
+ <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
|
599
|
+ </AuthButton>,
|
|
600
|
+
|
|
601
|
+ <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
|
|
602
|
+ <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
|
603
|
+ </AuthButton>
|
|
604
|
+ ]),
|
|
605
|
+ // render: (_, record) => (
|
|
606
|
+ // <>
|
|
607
|
+ // <AuthButton name="admin.customer.recommend.edit.id.put" noRight={null}>
|
|
608
|
+ // <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showStatus(record)}>变更状态</Button>
|
|
609
|
+ // </AuthButton>
|
|
610
|
+ // <AuthButton name="admin.customer.recommend.belong" noRight={null}>
|
|
611
|
+ // <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showGM(record)}>调整归属</Button>
|
|
612
|
+ // </AuthButton>
|
|
613
|
+
|
|
614
|
+ // {/* <AuthButton name="admin.customer.recommend.get" noRight={null}>
|
|
615
|
+ // <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => toCustomerDateil(record)}>查看详情</Button>
|
|
616
|
+ // </AuthButton>
|
|
617
|
+ // */}
|
|
618
|
+ // <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
|
|
619
|
+ // <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecord(record)}>积分记录</Button>
|
|
620
|
+ // </AuthButton>
|
|
621
|
+ // <AuthButton name="admin.mine.taPointsRecords.id.get" noRight={null}>
|
|
622
|
+ // <Button className={customerType === 'private' ? Styles.text : Styles.displayS} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
|
|
623
|
+ // </AuthButton>
|
|
624
|
+
|
|
625
|
+ // </>
|
|
626
|
+ // ),
|
606
|
627
|
},
|
607
|
628
|
]
|
608
|
629
|
|