fangmingyue hace 2 años
padre
commit
58f3b5b20e

+ 38
- 38
config/proxy.js Ver fichero

@@ -1,38 +1,38 @@
1
-/**
2
- * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
3
- * The agent cannot take effect in the production environment
4
- * so there is no configuration of the production environment
5
- * For details, please see
6
- * https://pro.ant.design/docs/deploy
7
- */
8
-export default {
9
-  dev: {
10
-    '/api/': {
11
-      // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://192.168.89.76:8081',
13
-      // target: 'https://www.newhousehold.cn',
14
-      changeOrigin: true,
15
-      pathRewrite: {
16
-        '^': '',
17
-      },
18
-    },
19
-  },
20
-  test: {
21
-    '/api/': {
22
-      target: 'https://xlk.njyz.tech',
23
-      changeOrigin: true,
24
-      pathRewrite: {
25
-        '^': '',
26
-      },
27
-    },
28
-  },
29
-  pre: {
30
-    '/api/': {
31
-      target: 'your pre url',
32
-      changeOrigin: true,
33
-      pathRewrite: {
34
-        '^': '',
35
-      },
36
-    },
37
-  },
38
-};
1
+/**
2
+ * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
3
+ * The agent cannot take effect in the production environment
4
+ * so there is no configuration of the production environment
5
+ * For details, please see
6
+ * https://pro.ant.design/docs/deploy
7
+ */
8
+export default {
9
+  dev: {
10
+    '/api/': {
11
+      // target: 'https://xlk.njyz.tech/',
12
+      target: 'http://192.168.89.76:8081',
13
+      // target: 'https://www.newhousehold.cn',
14
+      changeOrigin: true,
15
+      pathRewrite: {
16
+        '^': '',
17
+      },
18
+    },
19
+  },
20
+  test: {
21
+    '/api/': {
22
+      target: 'https://xlk.njyz.tech',
23
+      changeOrigin: true,
24
+      pathRewrite: {
25
+        '^': '',
26
+      },
27
+    },
28
+  },
29
+  pre: {
30
+    '/api/': {
31
+      target: 'your pre url',
32
+      changeOrigin: true,
33
+      pathRewrite: {
34
+        '^': '',
35
+      },
36
+    },
37
+  },
38
+};

+ 4
- 2
src/models/login.js Ver fichero

@@ -1,4 +1,6 @@
1
-import { routerRedux } from 'dva/router';
1
+// import { routerRedux } from 'dva/router';
2
+import { routerRedux, router } from 'dva';
3
+const { Redirect, Switch, Route } = router
2 4
 import { stringify } from 'querystring';
3 5
 // import { fakeAccountLogin, getFakeCaptcha } from '@/services/login';
4 6
 // import { setAuthority } from '@/utils/authority';
@@ -7,7 +9,6 @@ import { fetch, apis } from '@/utils/request';
7 9
 
8 10
 const signin = fetch(apis.user.signin);
9 11
 const signout = fetch(apis.user.signout);
10
-
11 12
 const Model = {
12 13
   namespace: 'login',
13 14
   state: {
@@ -67,6 +68,7 @@ const Model = {
67 68
       }
68 69
     },
69 70
   },
71
+  
70 72
   reducers: {
71 73
     changeLoginStatus(state, { payload }) {
72 74
       // setAuthority((payload.user.roles || []).map(x => x.roleId));

+ 287
- 0
src/pages/activity/groupRoomActivity/detail.jsx Ver fichero

@@ -1,3 +1,4 @@
1
+<<<<<<< HEAD
1 2
 import React, { useState, useEffect } from 'react';
2 3
 import { Form, Input, Button, Icon, Select, Card, Radio, DatePicker, message, Upload } from 'antd';
3 4
 
@@ -282,3 +283,289 @@ const Edit = props => {
282 283
 };
283 284
 
284 285
 export default Edit;
286
+=======
287
+import React, { useState, useEffect } from 'react';
288
+import { Form, Input, Button, Icon, Select, Card, Radio, DatePicker, message, Upload } from 'antd';
289
+
290
+import apis from '@/services/apis';
291
+import moment from 'moment';
292
+import router from 'umi/router';
293
+import BuildSelect from '@/components/SelectButton/BuildSelect';
294
+import request from '@/utils/request';
295
+import yinhao from '@/assets/yinhao.png';
296
+import logo from '@/assets/logo.svg';
297
+import touxiang from '@/assets/touxiang.jpg';
298
+import poster1 from '@/assets/poster1.png';
299
+import poster2 from '@/assets/poster2.png';
300
+import xiaochengxu from '@/assets/xiaochengxu.png';
301
+import AuthButton from '@/components/AuthButton';
302
+import { getImgURL } from '@/utils/image';
303
+import Share from '@/components/Share';
304
+import Poster from '@/components/Poster';
305
+import PictureQRcode from '@/utils/imageQC'
306
+
307
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
308
+const { TextArea } = Input;
309
+
310
+const formItemLayout = {
311
+  labelCol: { span: 6 },
312
+  wrapperCol: { span: 14 },
313
+};
314
+
315
+const cancelPage = () => {
316
+  router.go('-1');
317
+};
318
+
319
+const getSignList = dynamicId => {
320
+  router.push({
321
+    pathname: '/activity/groupRoomActivity/registrationRecord',
322
+    query: {
323
+      dynamicId,
324
+    },
325
+  });
326
+};
327
+
328
+
329
+
330
+// const newQrcode = row => {
331
+//   const x = new XMLHttpRequest();
332
+//   const resourceUrl = row.qrCode;
333
+//   x.open('GET', resourceUrl, true);
334
+//   x.responseType = 'blob';
335
+//   x.onload = function (e) {
336
+//     const url = window.URL.createObjectURL(x.response);
337
+//     const a = document.createElement('a');
338
+//     a.href = url;
339
+//     a.style.display = 'none';
340
+//     a.download = '活动二维码.png';
341
+//     a.click();
342
+//   };
343
+//   x.send();
344
+// };
345
+
346
+const BasicForm = props => {
347
+  const detailData = props.detailData || {};
348
+
349
+  const radioOnChange = e => {
350
+    // setIsEnlist(e.target.value)
351
+  };
352
+
353
+  const { dynamicId } = props;
354
+  const handleSubmit = e => {
355
+    e.preventDefault();
356
+    props.form.validateFields((err, values) => {
357
+      if (!err) {
358
+        console.log('Received values of form: ', values);
359
+        const { activityTime, signupTime } = values;
360
+        const [startDate, endDate] = activityTime;
361
+        values.startDate = moment(startDate).format('YYYY-MM-DD HH:mm');
362
+        values.endDate = moment(endDate).format('YYYY-MM-DD HH:mm');
363
+        if (signupTime) {
364
+          const [enlistStart, enlistEnd] = signupTime;
365
+          values.enlistStart = moment(enlistStart).format('YYYY-MM-DD HH:mm');
366
+          values.enlistEnd = moment(enlistEnd).format('YYYY-MM-DD HH:mm');
367
+        }
368
+        console.log('submit data --->', values);
369
+        if (dynamicId) {
370
+          values.dynamicId = dynamicId;
371
+          request({ ...apis.activity.update, data: values })
372
+            .then(data => {
373
+              message.info('保存成功');
374
+              // router.go(-1)
375
+            })
376
+            .catch(err => {
377
+              message.info(err.msg || err.message);
378
+            });
379
+        } else {
380
+          request({ ...apis.activity.add, data: { ...values } })
381
+            .then(data => {
382
+              message.info('保存成功');
383
+              router.push({
384
+                pathname: '/activity/editActivity',
385
+                query: {
386
+                  dynamicId: data.dynamicId,
387
+                },
388
+              });
389
+              // router.go(-1)
390
+            })
391
+            .catch(err => {
392
+              message.info(err.msg || err.message);
393
+            });
394
+        }
395
+      }
396
+    });
397
+  };
398
+
399
+  const { getFieldDecorator } = props.form;
400
+  return (
401
+    <>
402
+      <Form {...formItemLayout} onSubmit={handleSubmit}>
403
+        <Form.Item label="所属项目">
404
+          {getFieldDecorator('buildingId', {
405
+            initialValue: detailData.buildingId,
406
+            rules: [
407
+              {
408
+                required: true,
409
+                message: '请选择所属项目',
410
+              },
411
+            ],
412
+          })(<BuildSelect disabled />)}
413
+        </Form.Item>
414
+        <Form.Item label="活动封面图1">
415
+          <img src={getImgURL(detailData.listImgUrl)} height="210px" width="375px" />
416
+        </Form.Item>
417
+        {/* <Form.Item label="活动封面图2">
418
+          <img src={getImgURL(detailData.bannerListImg)} height="125px" width="375px" />
419
+        </Form.Item> */}
420
+        <Form.Item label="活动详情主图">
421
+          <img src={getImgURL(detailData.imgUrl)} height="300px" width="375px" />
422
+        </Form.Item>
423
+        <Form.Item label="活动标题">
424
+          <span>{detailData.title}</span>
425
+        </Form.Item>
426
+        <Form.Item label="副标题">
427
+          <span>{detailData.halfTitle}</span>
428
+        </Form.Item>
429
+        <Form.Item label="活动时间">
430
+          <span>{`${moment(detailData.startDate).format('YYYY-MM-DD HH:mm')} —— ${moment(
431
+            detailData.endDate,
432
+          ).format('YYYY-MM-DD HH:mm')}`}</span>
433
+        </Form.Item>
434
+        <Form.Item label="活动地点">
435
+          <span>{detailData.address}</span>
436
+        </Form.Item>
437
+        <Form.Item label="活动人数">
438
+          <span>{detailData.personNum}</span>
439
+        </Form.Item>
440
+        <Form.Item label="团房价">
441
+          <span>{detailData.groupBuyPrice}</span>
442
+        </Form.Item>
443
+        {/* <Form.Item label="阅读量">
444
+          <span>{detailData.pvNum}</span>
445
+        </Form.Item>
446
+        <Form.Item label="转发量">
447
+          <span>{detailData.shareNum}</span>
448
+        </Form.Item>
449
+        <Form.Item label="收藏数">
450
+          <span>{detailData.saveNum}</span>
451
+        </Form.Item>
452
+        <Form.Item label="最大报名人数">
453
+          <span>{detailData.maxEnlistByPerson}</span>
454
+        </Form.Item> */}
455
+        <Form.Item label="活动详情">
456
+          <div
457
+            style={{ maxHeight: '500px', overflowY: 'auto' }}
458
+            dangerouslySetInnerHTML={{ __html: detailData.desc }}
459
+          ></div>
460
+        </Form.Item>
461
+        <Form.Item label="报名时间">
462
+          <span>{`${moment(detailData.enlistStart).format('YYYY-MM-DD HH:mm')} —— ${moment(
463
+            detailData.enlistEnd,
464
+          ).format('YYYY-MM-DD HH:mm')}`}</span>
465
+        </Form.Item>
466
+        <Form.Item label="权重">
467
+          <span>{detailData.heavy}</span>
468
+        </Form.Item>
469
+      </Form>
470
+      <div style={{ textAlign: 'center' }}>
471
+        <AuthButton name="admin.SignList.get" noRight={null}>
472
+          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
473
+            <span
474
+              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
475
+              onClick={getSignList.bind(this, detailData.dynamicId)}
476
+            >
477
+              <Button>报名记录</Button>
478
+            </span>
479
+          )}
480
+        </AuthButton>
481
+        <AuthButton name="admin.dymic.qrcode" noRight={null}>
482
+          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
483
+            <span
484
+              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
485
+              // onClick={newQrcode.bind(this, detailData)}
486
+              onClick={() => { PictureQRcode(detailData, '活动二维码') }}
487
+            >
488
+              {<Button>下载二维码</Button>}
489
+            </span>
490
+          )}
491
+        </AuthButton>
492
+        <Button onClick={() => cancelPage()}>取消</Button>
493
+      </div>
494
+    </>
495
+  );
496
+};
497
+
498
+const Basic = Form.create({ name: 'BasicForm' })(BasicForm);
499
+
500
+/**
501
+ *
502
+ *
503
+ * @param {*} props
504
+ * @returns
505
+ */
506
+const Edit = props => {
507
+  const [tab, changeTab] = useState('basic');
508
+  const { dynamicId } = props.location.query;
509
+  const [detailData, setDetailData] = useState(false);
510
+
511
+  const getDynamicData = dynamicId => {
512
+    request({ ...apis.activity.details, params: { dynamicId } }).then(data => {
513
+      console.log(data);
514
+      data.activityTime = [moment(data.startDate), moment(data.endDate)];
515
+      data.signupTime = [moment(data.enlistStart), moment(data.enlistEnd)];
516
+
517
+      setDetailData(data);
518
+    });
519
+  };
520
+
521
+  useEffect(() => {
522
+    if (dynamicId) {
523
+      getDynamicData(dynamicId);
524
+    }
525
+  }, []);
526
+
527
+  const target = { id: dynamicId, type: 'activity' };
528
+  return (
529
+    <Card>
530
+      <div>
531
+        <Radio.Group value={tab} buttonStyle="solid" onChange={e => changeTab(e.target.value)}>
532
+          <Radio.Button value="basic">基本信息</Radio.Button>
533
+          {/* <Radio.Button value="poster">海报图片</Radio.Button>
534
+          <Radio.Button value="share">分享设置</Radio.Button> */}
535
+        </Radio.Group>
536
+      </div>
537
+      <div>
538
+        {tab === 'basic' && <Basic dynamicId={dynamicId} detailData={detailData} />}
539
+
540
+        {tab === 'poster' && <Poster target={target} />}
541
+        {tab === 'share' && <Share target={target} />}
542
+      </div>
543
+      {/* <div style={{ textAlign: 'center' }}>
544
+        <AuthButton name="admin.SignList.get" noRight={null}>
545
+          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
546
+            <span
547
+              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
548
+              onClick={getSignList.bind(this, detailData.dynamicId)}
549
+            >
550
+              <Button>报名记录</Button>
551
+            </span>
552
+          )}
553
+        </AuthButton>
554
+        <AuthButton name="admin.dymic.qrcode" noRight={null}>
555
+          {(detailData.activityStatus === 0 || detailData.activityStatus === 2) && (
556
+            <span
557
+              style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
558
+              onClick={newQrcode.bind(this, detailData)}
559
+            >
560
+              {<Button>下载二维码</Button>}
561
+            </span>
562
+          )}
563
+        </AuthButton>
564
+        <Button onClick={() => cancelPage()}>取消</Button>
565
+      </div> */}
566
+    </Card>
567
+  );
568
+};
569
+
570
+export default Edit;
571
+>>>>>>> bc4b69cb9010c90ff362a9cb0f07bad2144aa6bf

+ 66
- 55
src/pages/broker/list/detail.jsx Ver fichero

@@ -1,55 +1,66 @@
1
-import { getBrokerDetails } from '@/services/apis';
2
-import { useRef, useEffect } from 'react';
3
-import React from 'react';
4
-import { Avatar, Row, Col } from 'antd';
5
-import { fetch, apis } from '@/utils/request';
6
-
7
-function agentDeal (props) {
8
-  const { detail, personId, api } = props;
9
-  const formRef = useRef();
10
-
11
-  useEffect(() => {
12
-    if (personId) {
13
-      getBrokerDetails(personId).then((res) => {
14
-        res; console.log('方方', res)
15
-      });
16
-    }
17
-
18
-  }, [personId]);
19
-
20
-
21
-  const list = [
22
-    {
23
-      title: '姓名',
24
-      render: detail.name,
25
-    },
26
-    {
27
-      title: '手机号',
28
-      render: detail.phone,
29
-    },
30
-    {
31
-      title: '身份证号',
32
-      render: detail.idNo,
33
-    },
34
-    {
35
-      title: '银行卡号',
36
-      render: detail.personId,
37
-    },
38
-  ];
39
-  return (
40
-    <>
41
-      <Row>
42
-        {list.map((x, index) => {
43
-          return (
44
-            <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
45
-              <Col span={7}>{x.title}:</Col>
46
-              <Col span={17}>{x.render || '--'}</Col>
47
-            </div>
48
-          );
49
-        })}
50
-      </Row>
51
-    </>
52
-  );
53
-}
54
-
55
-export default agentDeal;
1
+import { getBrokerDetails } from '@/services/apis';
2
+import { useEffect } from 'react';
3
+import React from 'react';
4
+import { Avatar, Row, Col } from 'antd';
5
+import apis from '@/services/apis';
6
+import request from '@/utils/request';
7
+
8
+function agentDeal (props) {
9
+  const { detail } = props;
10
+  // const formRef = useRef();
11
+
12
+  // useEffect(() => {
13
+  //   if (personId) {
14
+  //     getBrokerDetails(personId).then((res) => {
15
+  //       res; console.log('方方', res)
16
+  //     });
17
+  //   }
18
+
19
+  // }, [personId]);
20
+
21
+  useEffect(() => {
22
+    if (detail.personId) {
23
+      request({
24
+        ...apis.broker.getBrokerDetails
25
+      }).then((res) => {
26
+        res; console.log('res', res)
27
+      });
28
+    }
29
+  });
30
+
31
+
32
+  const list = [
33
+    {
34
+      title: '姓名',
35
+      render: detail.name,
36
+    },
37
+    {
38
+      title: '手机号',
39
+      render: detail.phone,
40
+    },
41
+    {
42
+      title: '身份证号',
43
+      render: detail.idNo,
44
+    },
45
+    {
46
+      title: '银行卡号',
47
+      // render: detail,
48
+    },
49
+  ];
50
+  return (
51
+    <>
52
+      <Row>
53
+        {list.map((x, index) => {
54
+          return (
55
+            <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
56
+              <Col span={7}>{x.title}:</Col>
57
+              <Col span={17}>{x.render || '--'}</Col>
58
+            </div>
59
+          );
60
+        })}
61
+      </Row>
62
+    </>
63
+  );
64
+}
65
+
66
+export default agentDeal;

+ 3
- 3
src/pages/broker/list/index.jsx Ver fichero

@@ -4,8 +4,7 @@ import { router } from 'umi'
4 4
 import Link from 'umi/link';
5 5
 import moment from 'moment'
6 6
 import QueryTable from '@/components/QueryTable'
7
-import { fetch, apis } from '@/utils/request';
8
-import DealDetail from './detail';
7
+import apis from '@/services/apis';
9 8
 // import { useSearchParams } from '@umijs/max';
10 9
 
11 10
 const searchFields = [
@@ -154,7 +153,8 @@ export default (props) => {
154 153
         columns={tableColumns}
155 154
       />
156 155
       <Modal title="经纪人详情" visible={open} onOk={hideModal} onCancel={hideModal} footer={null}>
157
-        <DealDetail detail={detail} personId={personId} api={apis.broker.getBrokerDetails} />
156
+        {/* <DealDetail detail={detail} personId={personId} api={apis.broker.getBrokerDetails} /> */}
157
+        <DealDetail detail={detail} ref={ref} />
158 158
       </Modal>
159 159
     </>
160 160
   )

+ 71
- 71
src/pages/customer/deal/detail.jsx Ver fichero

@@ -1,71 +1,71 @@
1
-import React from 'react';
2
-import { Avatar, Row, Col } from 'antd';
3
-import apis from '../../../services/apis';
4
-import moment from 'moment';
5
-import WxDictSelect from '@/components/SelectButton/WxDictSelect';
6
-import BuildingSelect from '@/components/SelectButton/BuildSelect';
7
-import QueryTable from '@/components/QueryTable';
8
-
9
-function costomerDeal (props) {
10
-  const { detail } = props;
11
-  const list = [
12
-    {
13
-      title: '所属项目',
14
-      render: detail.buildingName,
15
-    },
16
-    {
17
-      title: '客户姓名',
18
-      render: detail.name,
19
-    },
20
-    {
21
-      title: '归属渠道',
22
-      render: detail.recommendName
23
-        ? `${detail.recommendName}/${detail.recommendTel}`
24
-        : '--',
25
-    },
26
-    {
27
-      title: '内场接待',
28
-      render: detail.realtyConsultantName ? `${detail.realtyConsultantName}/${detail.realtyConsultantTel}` : '--',
29
-    },
30
-    {
31
-      title: '业绩分成人|占比%',
32
-      render: detail.dividendsName,
33
-    },
34
-    {
35
-      title: '户型',
36
-      render: detail.houseTypeName,
37
-    },
38
-    {
39
-      title: '房号',
40
-      render: detail.houseInfo,
41
-    },
42
-    {
43
-      title: '签约日期',
44
-      render: moment(detail.createDate).format('YYYY-MM-DD HH:mm:ss'),
45
-    },
46
-    {
47
-      title: '成交金额',
48
-      render: detail.price,
49
-    },
50
-    {
51
-      title: '备注',
52
-      render: detail.remark,
53
-    },
54
-  ];
55
-  return (
56
-    <>
57
-      <Row>
58
-        {list.map((x, index) => {
59
-          return (
60
-            <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
61
-              <Col span={7}>{x.title}:</Col>
62
-              <Col span={17}>{x.render || '--'}</Col>
63
-            </div>
64
-          );
65
-        })}
66
-      </Row>
67
-    </>
68
-  );
69
-}
70
-
71
-export default costomerDeal;
1
+import React from 'react';
2
+import { Avatar, Row, Col } from 'antd';
3
+import apis from '../../../services/apis';
4
+import moment from 'moment';
5
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
6
+import BuildingSelect from '@/components/SelectButton/BuildSelect';
7
+import QueryTable from '@/components/QueryTable';
8
+
9
+function costomerDeal (props) {
10
+  const { detail } = props;
11
+  const list = [
12
+    {
13
+      title: '所属项目',
14
+      render: detail.buildingName,
15
+    },
16
+    {
17
+      title: '客户姓名',
18
+      render: detail.name,
19
+    },
20
+    {
21
+      title: '归属渠道',
22
+      render: detail.recommendName
23
+        ? `${detail.recommendName}/${detail.recommendTel}`
24
+        : '--',
25
+    },
26
+    {
27
+      title: '内场接待',
28
+      render: detail.realtyConsultantName ? `${detail.realtyConsultantName}/${detail.realtyConsultantTel}` : '--',
29
+    },
30
+    {
31
+      title: '业绩分成人|占比%',
32
+      render: detail.dividendsName,
33
+    },
34
+    {
35
+      title: '户型',
36
+      render: detail.houseTypeName,
37
+    },
38
+    {
39
+      title: '房号',
40
+      render: detail.houseInfo,
41
+    },
42
+    {
43
+      title: '签约日期',
44
+      render: moment(detail.createDate).format('YYYY-MM-DD HH:mm:ss'),
45
+    },
46
+    {
47
+      title: '成交金额',
48
+      render: detail.price,
49
+    },
50
+    {
51
+      title: '备注',
52
+      render: detail.remark,
53
+    },
54
+  ];
55
+  return (
56
+    <>
57
+      <Row>
58
+        {list.map((x, index) => {
59
+          return (
60
+            <div key={index} style={{ marginBottom: '20px', display: 'flex' }}>
61
+              <Col span={7}>{x.title}:</Col>
62
+              <Col span={17}>{x.render || '--'}</Col>
63
+            </div>
64
+          );
65
+        })}
66
+      </Row>
67
+    </>
68
+  );
69
+}
70
+
71
+export default costomerDeal;

+ 156
- 156
src/pages/customer/deal/index.jsx Ver fichero

@@ -1,156 +1,156 @@
1
-import React, { useState } from 'react';
2
-import { Avatar, Modal } from 'antd';
3
-import apis from '../../../services/apis';
4
-import moment from 'moment';
5
-import WxDictSelect from '@/components/SelectButton/WxDictSelect';
6
-import BuildingSelect from '@/components/SelectButton/BuildSelect';
7
-import QueryTable from '@/components/QueryTable';
8
-import DealDetail from './detail';
9
-
10
-function costomerDrift (props) {
11
-  const [visible, setVisible] = useState(false);
12
-  const [detail, setDetail] = useState({});
13
-  const columns = [
14
-    {
15
-      title: '头像',
16
-      dataIndex: 'picture',
17
-      key: 'picture',
18
-      align: 'center',
19
-      render: (_, record) => <Avatar shape="square" src={record.picture} size={64} icon="user" />,
20
-    },
21
-    {
22
-      title: '姓名',
23
-      dataIndex: 'name',
24
-      key: 'name',
25
-      align: 'center',
26
-    },
27
-    {
28
-      title: '电话',
29
-      dataIndex: 'phone',
30
-      key: 'phone',
31
-      align: 'center',
32
-    },
33
-
34
-    {
35
-      title: '性别',
36
-      dataIndex: 'sex',
37
-      key: 'sex',
38
-      align: 'center',
39
-      // eslint-disable-next-line no-nested-ternary
40
-      render: (_, record) => (
41
-        <span>{record.sex === '1' ? '男' : record.sex === '2' ? '女' : '未知'}</span>
42
-      ),
43
-    },
44
-    {
45
-      title: '所属项目',
46
-      dataIndex: 'buildingName',
47
-      key: 'buildingName',
48
-      align: 'center',
49
-    },
50
-    {
51
-      title: '成交金额',
52
-      dataIndex: 'price',
53
-      key: 'price',
54
-      align: 'center',
55
-    },
56
-    {
57
-      title: '报备人',
58
-      dataIndex: 'recommendName',
59
-      key: 'recommendName',
60
-      align: 'center',
61
-      width: 200,
62
-      render: (_, record) => {
63
-        const phone = record.recommendTel ? ` ${record.recommendTel}` : ''
64
-        return <span>{`${record.recommendName}${phone}`}</span>
65
-      },
66
-    },
67
-    {
68
-      title: '签约日期',
69
-      dataIndex: 'createDate',
70
-      key: 'createDate',
71
-      align: 'center',
72
-      render: t => moment(t).format('YYYY-MM-DD HH:mm:ss'),
73
-    },
74
-    {
75
-      title: '状态',
76
-      dataIndex: 'type',
77
-      key: 'type',
78
-      align: 'center',
79
-      render: t => t == 'signatory' ? '签约' : t == 'commission' ? '结佣' : '--'
80
-
81
-    },
82
-    {
83
-      title: '操作',
84
-      dataIndex: 'edit',
85
-      key: 'edit',
86
-      align: 'center',
87
-      render: (_, record) => (
88
-        <>
89
-          <a
90
-            onClick={() => {
91
-              setDetail(record), setVisible(true);
92
-            }}
93
-          >
94
-            查看详情
95
-          </a>
96
-        </>
97
-      ),
98
-    },
99
-  ];
100
-
101
-  const searchFields = [
102
-    {
103
-      name: 'buildingId',
104
-      label: '项目',
105
-      placeholder: '请选择项目',
106
-      render: () => <BuildingSelect style={{ width: 160 }} />,
107
-    },
108
-    {
109
-      name: 'name',
110
-      label: '姓名',
111
-      placeholder: '请输入姓名',
112
-    },
113
-    {
114
-      name: 'phone',
115
-      label: '电话',
116
-      placeholder: '请输入电话',
117
-    },
118
-    {
119
-      name: 'type',
120
-      label: '状态',
121
-      placeholder: '请选择状态',
122
-      type: 'select',
123
-      options: [
124
-        { label: '全部', value: '' },
125
-        { label: '签约', value: 'signatory' },
126
-        { label: '结佣', value: 'commission' },
127
-      ],
128
-    },
129
-  ];
130
-  // pageNum=1&pageSize=10&buildingId=&name=&phone=&type=
131
-  return (
132
-    <>
133
-      <QueryTable
134
-        rowKey="customerSignatoryId"
135
-        api={apis.customer.getDealList}
136
-        searchFields={searchFields}
137
-        columns={columns}
138
-      />
139
-      <Modal
140
-        title='客户详情'
141
-        visible={visible}
142
-        onOk={() => {
143
-          setVisible(false);
144
-        }}
145
-        onCancel={() => {
146
-          setVisible(false);
147
-        }}
148
-        footer={null}
149
-      >
150
-        <DealDetail detail={detail} />
151
-      </Modal>
152
-    </>
153
-  );
154
-}
155
-
156
-export default costomerDrift;
1
+import React, { useState } from 'react';
2
+import { Avatar, Modal } from 'antd';
3
+import apis from '../../../services/apis';
4
+import moment from 'moment';
5
+import WxDictSelect from '@/components/SelectButton/WxDictSelect';
6
+import BuildingSelect from '@/components/SelectButton/BuildSelect';
7
+import QueryTable from '@/components/QueryTable';
8
+import DealDetail from './detail';
9
+
10
+function costomerDrift (props) {
11
+  const [visible, setVisible] = useState(false);
12
+  const [detail, setDetail] = useState({});
13
+  const columns = [
14
+    {
15
+      title: '头像',
16
+      dataIndex: 'picture',
17
+      key: 'picture',
18
+      align: 'center',
19
+      render: (_, record) => <Avatar shape="square" src={record.picture} size={64} icon="user" />,
20
+    },
21
+    {
22
+      title: '姓名',
23
+      dataIndex: 'name',
24
+      key: 'name',
25
+      align: 'center',
26
+    },
27
+    {
28
+      title: '电话',
29
+      dataIndex: 'phone',
30
+      key: 'phone',
31
+      align: 'center',
32
+    },
33
+
34
+    {
35
+      title: '性别',
36
+      dataIndex: 'sex',
37
+      key: 'sex',
38
+      align: 'center',
39
+      // eslint-disable-next-line no-nested-ternary
40
+      render: (_, record) => (
41
+        <span>{record.sex === '1' ? '男' : record.sex === '2' ? '女' : '未知'}</span>
42
+      ),
43
+    },
44
+    {
45
+      title: '所属项目',
46
+      dataIndex: 'buildingName',
47
+      key: 'buildingName',
48
+      align: 'center',
49
+    },
50
+    {
51
+      title: '成交金额',
52
+      dataIndex: 'price',
53
+      key: 'price',
54
+      align: 'center',
55
+    },
56
+    {
57
+      title: '报备人',
58
+      dataIndex: 'recommendName',
59
+      key: 'recommendName',
60
+      align: 'center',
61
+      width: 200,
62
+      render: (_, record) => {
63
+        const phone = record.recommendTel ? ` ${record.recommendTel}` : ''
64
+        return <span>{`${record.recommendName}${phone}`}</span>
65
+      },
66
+    },
67
+    {
68
+      title: '签约日期',
69
+      dataIndex: 'createDate',
70
+      key: 'createDate',
71
+      align: 'center',
72
+      render: t => moment(t).format('YYYY-MM-DD HH:mm:ss'),
73
+    },
74
+    {
75
+      title: '状态',
76
+      dataIndex: 'type',
77
+      key: 'type',
78
+      align: 'center',
79
+      render: t => t == 'signatory' ? '签约' : t == 'commission' ? '结佣' : '--'
80
+
81
+    },
82
+    {
83
+      title: '操作',
84
+      dataIndex: 'edit',
85
+      key: 'edit',
86
+      align: 'center',
87
+      render: (_, record) => (
88
+        <>
89
+          <a
90
+            onClick={() => {
91
+              setDetail(record), setVisible(true);
92
+            }}
93
+          >
94
+            查看详情
95
+          </a>
96
+        </>
97
+      ),
98
+    },
99
+  ];
100
+
101
+  const searchFields = [
102
+    {
103
+      name: 'buildingId',
104
+      label: '项目',
105
+      placeholder: '请选择项目',
106
+      render: () => <BuildingSelect style={{ width: 160 }} />,
107
+    },
108
+    {
109
+      name: 'name',
110
+      label: '姓名',
111
+      placeholder: '请输入姓名',
112
+    },
113
+    {
114
+      name: 'phone',
115
+      label: '电话',
116
+      placeholder: '请输入电话',
117
+    },
118
+    {
119
+      name: 'type',
120
+      label: '状态',
121
+      placeholder: '请选择状态',
122
+      type: 'select',
123
+      options: [
124
+        { label: '全部', value: '' },
125
+        { label: '签约', value: 'signatory' },
126
+        { label: '结佣', value: 'commission' },
127
+      ],
128
+    },
129
+  ];
130
+  // pageNum=1&pageSize=10&buildingId=&name=&phone=&type=
131
+  return (
132
+    <>
133
+      <QueryTable
134
+        rowKey="customerSignatoryId"
135
+        api={apis.customer.getDealList}
136
+        searchFields={searchFields}
137
+        columns={columns}
138
+      />
139
+      <Modal
140
+        title='客户详情'
141
+        visible={visible}
142
+        onOk={() => {
143
+          setVisible(false);
144
+        }}
145
+        onCancel={() => {
146
+          setVisible(false);
147
+        }}
148
+        footer={null}
149
+      >
150
+        <DealDetail detail={detail} />
151
+      </Modal>
152
+    </>
153
+  );
154
+}
155
+
156
+export default costomerDrift;

+ 1
- 1
src/services/apis.js Ver fichero

@@ -2472,7 +2472,7 @@ export default {
2472 2472
     // 获取经纪人详情
2473 2473
     getBrokerDetails: {
2474 2474
       method: 'GET',
2475
-      url: `${prefix}/admin/bkBankCard`,
2475
+      url: `${prefix}/bkBankCard`,
2476 2476
     },
2477 2477
   }
2478 2478
 };

+ 40
- 42
src/utils/imageQC.js Ver fichero

@@ -1,42 +1,40 @@
1
-
2
-import { message } from 'antd';
3
-//测试封装
4
-export default function PictureQRcode(res, title) {
5
-  if (res.qrCode === null || res.qrCode == 'null') {
6
-    message.error(`保存失败${res.qrCode}`);
7
-    const x = new XMLHttpRequest();
8
-    const resourceUrl = res.qrCode;
9
-    x.open('GET', resourceUrl, true);
10
-    x.responseType = 'blob';
11
-    x.onload = function (e) {
12
-      const url = window.URL.createObjectURL(x.response);
13
-      const a = document.createElement('a');
14
-      a.href = url;
15
-      a.style.display = 'none';
16
-      a.download = `${title}.png`;
17
-      a.click();
18
-    };
19
-    x.send();
20
-
21
-  } else {
22
-    const x = new XMLHttpRequest();
23
-    const resourceUrl = res.qrCode;
24
-    x.open('GET', resourceUrl, true);
25
-    x.responseType = 'blob';
26
-    x.onload = function (e) {
27
-      const url = window.URL.createObjectURL(x.response);
28
-      const a = document.createElement('a');
29
-      a.href = url;
30
-      a.style.display = 'none';
31
-      a.download = `${title}.png`;
32
-      a.click();
33
-    };
34
-    x.send();
35
-    message.info(`保存成功`);
36
-
37
-
38
-  }
39
-
40
-
41
-}
42
-
1
+import { message } from 'antd';
2
+//测试封装
3
+export default function PictureQRcode (res, title) {
4
+  if (res.qrCode === null || res.qrCode == 'null') {
5
+    message.error(`保存失败${res.qrCode}`);
6
+    const x = new XMLHttpRequest();
7
+    const resourceUrl = res.qrCode;
8
+    x.open('GET', resourceUrl, true);
9
+    x.responseType = 'blob';
10
+    x.onload = function (e) {
11
+      const url = window.URL.createObjectURL(x.response);
12
+      const a = document.createElement('a');
13
+      a.href = url;
14
+      a.style.display = 'none';
15
+      a.download = `${title}.png`;
16
+      a.click();
17
+    };
18
+    x.send();
19
+
20
+  } else {
21
+    const x = new XMLHttpRequest();
22
+    const resourceUrl = res.qrCode;
23
+    x.open('GET', resourceUrl, true);
24
+    x.responseType = 'blob';
25
+    x.onload = function (e) {
26
+      const url = window.URL.createObjectURL(x.response);
27
+      const a = document.createElement('a');
28
+      a.href = url;
29
+      a.style.display = 'none';
30
+      a.download = `${title}.png`;
31
+      a.click();
32
+    };
33
+    x.send();
34
+    message.info(`保存成功`);
35
+
36
+
37
+  }
38
+
39
+
40
+}