傅行帆 пре 4 година
родитељ
комит
8c3f0f630b

+ 70
- 70
config/routes.js Прегледај датотеку

@@ -65,35 +65,35 @@ export default [
65 65
           //     },
66 66
           //   ],
67 67
           // },
68
-          // {
69
-          //   path: '/customer',
70
-          //   name: '客户管理',
71
-          //   component: '../layouts/BlankLayout',
72
-          //   routes: [
73
-          //     {
74
-          //       path: '/customer/customerlist/list',
75
-          //       name: '客户列表',
76
-          //       component: './customer/customerlist/index',
77
-          //     },
78
-          //     {
79
-          //       path: '/customer/customerlist/customerDetail',
80
-          //       name: '私客详情',
81
-          //       hideInMenu: true,
82
-          //       component: './customer/customerlist/customerDetail',
83
-          //     },
84
-          //     {
85
-          //       path: '/customer/drift/list',
86
-          //       name: '游客列表',
87
-          //       component: './customer/drift/index',
88
-          //     },
89
-          //     {
90
-          //       path: '/customer/customerlist/publicCustomerDetail',
91
-          //       name: '公客详情',
92
-          //       hideInMenu: true,
93
-          //       component: './customer/customerlist/publicCustomerDetail',
94
-          //     },
95
-          //   ],
96
-          // },
68
+          {
69
+            path: '/customer',
70
+            name: '会员管理',
71
+            component: '../layouts/BlankLayout',
72
+            routes: [
73
+              {
74
+                path: '/customer/customerlist/list',
75
+                name: '会员列表',
76
+                component: './customer/customerlist/index',
77
+              },
78
+              {
79
+                path: '/customer/customerlist/customerDetail',
80
+                name: '私客详情',
81
+                hideInMenu: true,
82
+                component: './customer/customerlist/customerDetail',
83
+              },
84
+              // {
85
+              //   path: '/customer/drift/list',
86
+              //   name: '游客列表',
87
+              //   component: './customer/drift/index',
88
+              // },
89
+              {
90
+                path: '/customer/customerlist/publicCustomerDetail',
91
+                name: '公客详情',
92
+                hideInMenu: true,
93
+                component: './customer/customerlist/publicCustomerDetail',
94
+              },
95
+            ],
96
+          },
97 97
           // {
98 98
           //   path: '/recommend',
99 99
           //   name: '推荐客户',
@@ -454,48 +454,48 @@ export default [
454 454
             },
455 455
             ],
456 456
           },
457
-          // {
458
-          //   path: '/staff',
459
-          //   name: '员工管理',
460
-          //   component: '../layouts/BlankLayout',
461
-          //   routes: [
462
-          //     {
463
-          //       path: '/staff/StaffList',
464
-          //       name: '员工列表',
465
-          //       component: './staff/list/StaffList',
466
-          //     },
467
-          //     {
468
-          //       path: '/staff/editStaff',
469
-          //       name: '编辑员工',
470
-          //       hideInMenu: true,
471
-          //       component: './staff/list/editStaff',
472
-          //     },
457
+          {
458
+            path: '/staff',
459
+            name: '员工管理',
460
+            component: '../layouts/BlankLayout',
461
+            routes: [
462
+              {
463
+                path: '/staff/StaffList',
464
+                name: '员工列表',
465
+                component: './staff/list/StaffList',
466
+              },
467
+              {
468
+                path: '/staff/editStaff',
469
+                name: '编辑员工',
470
+                hideInMenu: true,
471
+                component: './staff/list/editStaff',
472
+              },
473 473
 
474
-          //     {
475
-          //       path: '/staff/RoleList',
476
-          //       name: '角色管理',
477
-          //       component: './staff/list/RoleList',
478
-          //     },
479
-          //     {
480
-          //       path: '/staff/editRole',
481
-          //       name: '编辑角色',
482
-          //       hideInMenu: true,
483
-          //       component: './staff/list/editRole',
484
-          //     },
485
-          //     {
486
-          //       path: '/staff/list/addRole',
487
-          //       name: '添加角色',
488
-          //       hideInMenu: true,
489
-          //       component: './staff/list/addRole',
490
-          //     },
491
-          //     {
492
-          //       path: '/staff/list/distribution',
493
-          //       name: '分配归属',
494
-          //       hideInMenu: true,
495
-          //       component: './staff/list/distribution',
496
-          //     },
497
-          //   ],
498
-          // },
474
+              {
475
+                path: '/staff/RoleList',
476
+                name: '角色管理',
477
+                component: './staff/list/RoleList',
478
+              },
479
+              {
480
+                path: '/staff/editRole',
481
+                name: '编辑角色',
482
+                hideInMenu: true,
483
+                component: './staff/list/editRole',
484
+              },
485
+              {
486
+                path: '/staff/list/addRole',
487
+                name: '添加角色',
488
+                hideInMenu: true,
489
+                component: './staff/list/addRole',
490
+              },
491
+              {
492
+                path: '/staff/list/distribution',
493
+                name: '分配归属',
494
+                hideInMenu: true,
495
+                component: './staff/list/distribution',
496
+              },
497
+            ],
498
+          },
499 499
           {
500 500
             path: '/carouselFigure',
501 501
             name: '资源位管理',

+ 46
- 46
src/pages/customer/customerlist/index.jsx Прегледај датотеку

@@ -39,7 +39,7 @@ function body(props) {
39 39
   const [dataPub, setDataPub] = useState({ records: [] })
40 40
   // 默认私客
41 41
   // eslint-disable-next-line react-hooks/rules-of-hooks
42
-  const [customerType, setCustomerType] = useState('private')
42
+  const [customerType, setCustomerType] = useState('public')
43 43
 
44 44
   // 调整归属 ============  start
45 45
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -423,7 +423,7 @@ function body(props) {
423 423
       dataIndex: 'name',
424 424
       key: 'name',
425 425
       align: 'center',
426
-      width: '10%',
426
+      // width: '10%',
427 427
       // eslint-disable-next-line no-nested-ternary
428 428
       render: (_, record) => <><Navigate onClick={() => publicCustomerDetail(record)}>{record.name || record.nickname}</Navigate></>,
429 429
     },
@@ -434,28 +434,28 @@ function body(props) {
434 434
       align: 'center',
435 435
       width: '15%',
436 436
     },
437
-    {
438
-      title: '是否归属项目',
439
-      dataIndex: '',
440
-      key: '',
441
-      align: 'center',
442
-      width: '10%',
443
-      render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
444
-    },
445
-    {
446
-      title: '归属项目',
447
-      dataIndex: 'buildingName',
448
-      key: 'buildingName',
449
-      align: 'center',
450
-      width: '15%',
451
-    },
452
-    {
453
-      title: '推广人员',
454
-      dataIndex: 'sharePersonName',
455
-      key: 'sharePersonName',
456
-      align: 'center',
457
-      width: '10%',
458
-    },
437
+    // {
438
+    //   title: '是否归属项目',
439
+    //   dataIndex: '',
440
+    //   key: '',
441
+    //   align: 'center',
442
+    //   width: '10%',
443
+    //   render: (_, record) => <><span>{record.buildingId != null ? '是' : '否'}</span></>,
444
+    // },
445
+    // {
446
+    //   title: '归属项目',
447
+    //   dataIndex: 'buildingName',
448
+    //   key: 'buildingName',
449
+    //   align: 'center',
450
+    //   width: '15%',
451
+    // },
452
+    // {
453
+    //   title: '推广人员',
454
+    //   dataIndex: 'sharePersonName',
455
+    //   key: 'sharePersonName',
456
+    //   align: 'center',
457
+    //   width: '10%',
458
+    // },
459 459
     {
460 460
       title: '性别',
461 461
       dataIndex: 'sex',
@@ -473,12 +473,12 @@ function body(props) {
473 473
       width: '20%',
474 474
       render: withActions((text, record) => [
475 475
         <EditIcon color="#FF4A4A" text="查看详情" onClick={() => publicCustomerDetail(record)} />,
476
-        <AuthButton name="admin.customer.recommend" noRight={null}>
477
-          <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
478
-        </AuthButton>,
479
-        <AuthButton name="admin.customer.assign" noRight={null}>
480
-          <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
481
-        </AuthButton>,
476
+        // <AuthButton name="admin.customer.recommend" noRight={null}>
477
+        //   <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => showRecommend(record.personId)}>推荐客户</Button>
478
+        // </AuthButton>,
479
+        // <AuthButton name="admin.customer.assign" noRight={null}>
480
+        //   <Button className={customerType === 'private' ? Styles.displayS : Styles.text} type="link" onClick={() => assistConsultant(record.customerId, record.buildingId)}>分配置业顾问</Button>
481
+        // </AuthButton>,
482 482
         <AuthButton name="admin.mine.taPointsRecords.point.record" noRight={null}>
483 483
           <Button className={Styles.text} type="link" onClick={() => showRecord(record)}>积分记录</Button>
484 484
         </AuthButton>
@@ -632,20 +632,20 @@ function body(props) {
632 632
   return (
633 633
     <>
634 634
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
635
-        {customerType === 'public' && <Form.Item>
635
+        {/* {customerType === 'public' && <Form.Item>
636 636
           {getFieldDecorator('belongStatus')(
637 637
             <Select style={{ width: '180px' }} placeholder="是否归属项目" onChange={handleSelectChange}>
638 638
               <Option value={1}>是</Option>
639 639
               <Option value={0}>否</Option>
640 640
             </Select>,
641 641
           )}
642
-        </Form.Item>}
643
-        <Form.Item>
642
+        </Form.Item>} */}
643
+        {/* <Form.Item>
644 644
           {getFieldDecorator('buildingId')(
645 645
             <BuildSelect />,
646 646
           )}
647
-        </Form.Item>
648
-        {customerType === 'private' && <Form.Item>
647
+        </Form.Item> */}
648
+        {/* {customerType === 'private' && <Form.Item>
649 649
           {getFieldDecorator('status')(
650 650
             <Select style={{ width: '180px' }} placeholder="状态" onChange={handleSelectChange}>
651 651
               <Option value={1}>报备</Option>
@@ -654,7 +654,7 @@ function body(props) {
654 654
               <Option value={4}>签约</Option>
655 655
             </Select>,
656 656
           )}
657
-        </Form.Item>}
657
+        </Form.Item>} */}
658 658
         <Form.Item>
659 659
           {getFieldDecorator('name')(
660 660
             <Input
@@ -671,7 +671,7 @@ function body(props) {
671 671
             />,
672 672
           )}
673 673
         </Form.Item>
674
-        {customerType === 'private' && <Form.Item>
674
+        {/* {customerType === 'private' && <Form.Item>
675 675
           {getFieldDecorator('consultName')(
676 676
             <Input placeholder="置业顾问" />,
677 677
           )}
@@ -680,7 +680,7 @@ function body(props) {
680 680
           {getFieldDecorator('consultTel')(
681 681
             <Input placeholder="置业顾问电话" />,
682 682
           )}
683
-        </Form.Item>}
683
+        </Form.Item>} */}
684 684
         <Form.Item >
685 685
           {getFieldDecorator('startCreateDate')(
686 686
             <DatePicker placeholder="注册开始时间" format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }} />)}
@@ -689,16 +689,16 @@ function body(props) {
689 689
           {getFieldDecorator('endCreateDate')(
690 690
             <DatePicker placeholder="注册结束时间" format="YYYY-MM-DD HH:mm:ss" showTime={{ format: 'HH:mm:ss' }} />)}
691 691
         </Form.Item>
692
-        <Form.Item>
692
+        {/* <Form.Item>
693 693
           {getFieldDecorator('sceneType')(
694 694
             <WxDictSelect />,
695 695
           )}
696
-        </Form.Item>
697
-        <Form.Item>
696
+        </Form.Item> */}
697
+        {/* <Form.Item>
698 698
           {getFieldDecorator('sharePersonName')(
699 699
             <Input placeholder="推广人" />,
700 700
           )}
701
-        </Form.Item>
701
+        </Form.Item> */}
702 702
         <Form.Item>
703 703
           <AuthButton name="admin.customer.recommend.search" noRight={null}>
704 704
             <Button type="primary" htmlType="submit" >
@@ -718,11 +718,11 @@ function body(props) {
718 718
           </Button>
719 719
           </AuthButton> :
720 720
           <>
721
-            <AuthButton name="admin.customer.import" noRight={null}>
721
+            {/* <AuthButton name="admin.customer.import" noRight={null}>
722 722
               <Button type="primary" onClick={() => batchAssistConsultant()} style={{ float: 'right', margin: '20px 0', marginLeft: '20px', zIndex: 1 }}>
723 723
                 批量分配置业顾问
724 724
           </Button>
725
-            </AuthButton>
725
+            </AuthButton> */}
726 726
             <AuthButton name="admin.customer.import" noRight={null}>
727 727
               <Button type="primary" loading={loadingStatus} onClick={() => exportCustomer()} style={{ float: 'right', margin: '20px 0', zIndex: 1 }}>
728 728
                 导出
@@ -732,12 +732,12 @@ function body(props) {
732 732
       }
733 733
 
734 734
 
735
-      <div style={{ margin: '20px 0' }}>
735
+      {/* <div style={{ margin: '20px 0' }}>
736 736
         <Radio.Group value={customerType} onChange={radioButtonHandleSizeChange} buttonStyle="solid">
737 737
           <Radio.Button value="private">私客</Radio.Button>
738 738
           <Radio.Button value="public">公客</Radio.Button>
739 739
         </Radio.Group>
740
-      </div>
740
+      </div> */}
741 741
       {customerType === 'private' ?
742 742
         <Table
743 743
           // onRow={record => {

+ 22
- 22
src/pages/staff/list/StaffList.jsx Прегледај датотеку

@@ -41,18 +41,18 @@ const CartBody = props => {
41 41
     // console.log(data, "11111")
42 42
     if (data.status === 1) {
43 43
       if (data.isConsultant) {
44
-        request({ ...apis.staff.check, params: { userId: data.userId, personId: data.consultantPersonId, buildingId: data.buildingId } }).then(res => {
45
-          if (res.length > 0) {
46
-            Modal.confirm({
47
-              title: '此置业顾问下有私客,是否转移私客?',
48
-              okText: '确认',
49
-              cancelText: '取消',
50
-              onOk() {
51
-                setVisible(true)
52
-              },
53
-            });
54
-          } else {
55
-            const titleMessahe = data.isConsultant ? '停用后此员工无法继续登录后台(若为置业顾问停用后在小程序端将成为普通用户)确认进行停用操作?' : '停用后此员工无法继续登录后台,确认进行停用操作?';
44
+        // request({ ...apis.staff.check, params: { userId: data.userId, personId: data.consultantPersonId, buildingId: data.buildingId } }).then(res => {
45
+        //   if (res.length > 0) {
46
+        //     Modal.confirm({
47
+        //       title: '此生活顾问下有私客,是否转移私客?',
48
+        //       okText: '确认',
49
+        //       cancelText: '取消',
50
+        //       onOk() {
51
+        //         setVisible(true)
52
+        //       },
53
+        //     });
54
+        //   } else {
55
+            const titleMessahe = data.isConsultant ? '停用后此员工无法继续登录后台(若为生活顾问停用后在小程序端将成为普通用户)确认进行停用操作?' : '停用后此员工无法继续登录后台,确认进行停用操作?';
56 56
             Modal.confirm({
57 57
               title: titleMessahe,
58 58
               okText: '确认',
@@ -64,10 +64,10 @@ const CartBody = props => {
64 64
                 })
65 65
               },
66 66
             });
67
-          }
68
-        })
67
+          // }
68
+        // })
69 69
       } else {
70
-        const titleMessahe = data.isConsultant ? '停用后此员工无法继续登录后台(若为置业顾问停用后在小程序端将成为普通用户)确认进行停用操作?' : '停用后此员工无法继续登录后台,确认进行停用操作?';
70
+        const titleMessahe = data.isConsultant ? '停用后此员工无法继续登录后台(若为生活顾问停用后在小程序端将成为普通用户)确认进行停用操作?' : '停用后此员工无法继续登录后台,确认进行停用操作?';
71 71
         Modal.confirm({
72 72
           title: titleMessahe,
73 73
           okText: '确认',
@@ -105,7 +105,7 @@ const CartBody = props => {
105 105
 
106 106
   // 员工离职
107 107
   const departure = row => {
108
-    // 是置业顾问
108
+    // 是生活顾问
109 109
     if (row.isConsultant === true) {
110 110
       // 跳转路由
111 111
       router.push({
@@ -117,7 +117,7 @@ const CartBody = props => {
117 117
       return
118 118
     }
119 119
 
120
-    // 不是置业顾问
120
+    // 不是生活顾问
121 121
     Modal.confirm({
122 122
       title: '停用后无法登录后台系统',
123 123
       content: '确认进行离职操作?',
@@ -226,11 +226,11 @@ const header = props => {
226 226
 
227 227
     <>
228 228
       <Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
229
-        <Form.Item>
229
+        {/* <Form.Item>
230 230
           {getFieldDecorator('buildingId')(
231 231
             <BuildingSelect />
232 232
           )}
233
-        </Form.Item>
233
+        </Form.Item> */}
234 234
         <Form.Item>
235 235
           {getFieldDecorator('userName')(
236 236
             <Input
@@ -261,9 +261,9 @@ const header = props => {
261 261
         <Form.Item>
262 262
 
263 263
           {getFieldDecorator('isConsultant')(
264
-            <Select style={{ width: '180px' }} placeholder="是否置业顾问" >
265
-              <Option value="0">非置业顾问</Option>
266
-              <Option value="1">置业顾问</Option>
264
+            <Select style={{ width: '180px' }} placeholder="是否生活顾问" >
265
+              <Option value="0">非生活顾问</Option>
266
+              <Option value="1">生活顾问</Option>
267 267
             </Select>,
268 268
           )}
269 269
         </Form.Item>

+ 36
- 36
src/pages/staff/list/editStaff.jsx Прегледај датотеку

@@ -189,7 +189,7 @@ const Edit = (props) => {
189 189
       ]
190 190
     },
191 191
     {
192
-      label: '是否置业顾问',
192
+      label: '是否生活顾问',
193 193
       name: 'isConsultant',
194 194
       type: FieldTypes.Switch,
195 195
       value: userData.isConsultant,
@@ -234,42 +234,42 @@ const Edit = (props) => {
234 234
       </Select>,
235 235
       value: userData.roleIds,
236 236
     },
237
+    // {
238
+    //   label: '授权项目',
239
+    //   name: 'buildingId',
240
+    //   render: <BuildingSelection userData={userData} />,
241
+    //   value: userData.buildingId,
242
+    //   hidden: () => !consultantChecked,
243
+    //   rules: [
244
+    //     { required: true, message: '请选择授权项目' },
245
+    //   ]
246
+    // },
247
+    // {
248
+    //   label: '授权项目',
249
+    //   name: 'buildingIds',
250
+    //   render: <Select
251
+    //     mode="multiple"
252
+    //     showSearch
253
+    //     style={{ width: '100%' }}
254
+    //     placeholder="请选择授权项目"
255
+    //     filterOption={(input, option) =>
256
+    //       option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
257
+    //     }
258
+    //     >
259
+    //     {buildData.map(item => (
260
+    //       <Select.Option key={item.buildingId} value={item.buildingId}>
261
+    //         {item.buildingName}
262
+    //       </Select.Option>
263
+    //     ))}
264
+    //   </Select>,
265
+    //   value: userData.buildingIds,
266
+    //   hidden: () => consultantChecked,
267
+    //   rules: [
268
+    //     { required: true, message: '请选择授权项目' },
269
+    //   ]
270
+    // },
237 271
     {
238
-      label: '授权项目',
239
-      name: 'buildingId',
240
-      render: <BuildingSelection userData={userData} />,
241
-      value: userData.buildingId,
242
-      hidden: () => !consultantChecked,
243
-      rules: [
244
-        { required: true, message: '请选择授权项目' },
245
-      ]
246
-    },
247
-    {
248
-      label: '授权项目',
249
-      name: 'buildingIds',
250
-      render: <Select
251
-        mode="multiple"
252
-        showSearch
253
-        style={{ width: '100%' }}
254
-        placeholder="请选择授权项目"
255
-        filterOption={(input, option) =>
256
-          option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
257
-        }
258
-        >
259
-        {buildData.map(item => (
260
-          <Select.Option key={item.buildingId} value={item.buildingId}>
261
-            {item.buildingName}
262
-          </Select.Option>
263
-        ))}
264
-      </Select>,
265
-      value: userData.buildingIds,
266
-      hidden: () => consultantChecked,
267
-      rules: [
268
-        { required: true, message: '请选择授权项目' },
269
-      ]
270
-    },
271
-    {
272
-      label: '置业顾问头像',
272
+      label: '生活顾问头像',
273 273
       name: 'photo',
274 274
       type: FieldTypes.ImageUploader,
275 275
       extra: '建议图片尺寸:320*320px,比例1:1,格式:jpg,用于置业顾问头像,限制大小:100k',