方明岳 2 lat temu
rodzic
commit
bc4b69cb90

+ 2
- 1
config/proxy.js Wyświetl plik

@@ -9,7 +9,8 @@ export default {
9 9
   dev: {
10 10
     '/api/': {
11 11
       // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://192.168.89.147:8081',
12
+      // target: 'http://192.168.89.147:8081',
13
+      target: 'http://192.168.2.7:8080/',
13 14
       // target: 'https://www.newhousehold.cn',
14 15
       changeOrigin: true,
15 16
       pathRewrite: {

+ 4
- 2
src/models/login.js Wyświetl plik

@@ -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));

+ 1
- 4
src/pages/activity/groupRoomActivity/detail.jsx Wyświetl plik

@@ -197,10 +197,7 @@ const BasicForm = props => {
197 197
             <span
198 198
               style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }}
199 199
               // onClick={newQrcode.bind(this, detailData)}
200
-
201
-              onClick={() => {
202
-                PictureQRcode(detailData, '活动二维码')
203
-              }}
200
+              onClick={() => { PictureQRcode(detailData, '活动二维码') }}
204 201
             >
205 202
               {<Button>下载二维码</Button>}
206 203
             </span>

+ 66
- 0
src/pages/broker/list/detail.jsx Wyświetl plik

@@ -0,0 +1,66 @@
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;

+ 47
- 25
src/pages/broker/list/index.jsx Wyświetl plik

@@ -1,10 +1,12 @@
1
-import React, { useMemo, useRef, useCallback, useState } from 'react'
2
-import { Button, notification, Spin, Badge, Select } from 'antd'
1
+import React, { useMemo, useRef, useCallback, useState, useEffect, OperButton } from 'react'
2
+import { Button, notification, Spin, Badge, Select, Modal, Input } from 'antd'
3 3
 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';
7
+import DealDetail from './detail';
8
+import apis from '@/services/apis';
9
+// import { useSearchParams } from '@umijs/max';
8 10
 
9 11
 const searchFields = [
10 12
   {
@@ -48,7 +50,13 @@ const searchFields = [
48 50
 ]
49 51
 
50 52
 export default (props) => {
51
-  const ref = useRef()
53
+  const [detail, setDetail, personId] = useState({});
54
+  const [open, setOpen] = useState(false);
55
+  const hideModal = () => {
56
+    setOpen(false);
57
+  };
58
+
59
+  const ref = useRef();
52 60
 
53 61
   const tableColumns = [
54 62
     {
@@ -57,7 +65,7 @@ export default (props) => {
57 65
       key: 'avatarurl',
58 66
       align: 'center',
59 67
       render: (t) => {
60
-        return <img src={t} width={64} height={64} style={{borderRadius: '4px'}} alt="" />
68
+        return <img src={t} width={64} height={64} style={{ borderRadius: '4px' }} alt="" />
61 69
       }
62 70
     },
63 71
     {
@@ -77,7 +85,7 @@ export default (props) => {
77 85
       key: 'customerNum',
78 86
       align: 'right',
79 87
       width: 120,
80
-      render: (t, row) => <Link to={`/broker/customer/list?recommendPerson=${row.personId}`}>{ !t ? 0 : t }</Link>
88
+      render: (t, row) => <Link to={`/broker/customer/list?recommendPerson=${row.personId}`}>{!t ? 0 : t}</Link>
81 89
     },
82 90
     {
83 91
       title: '佣金总数',
@@ -115,26 +123,40 @@ export default (props) => {
115 123
       align: 'center',
116 124
       render: (t) => moment(t).format('YYYY-MM-DD HH:mm')
117 125
     },
118
-    // {
119
-    //   title: '操作',
120
-    //   key: 'options',
121
-    //   align: 'center',
122
-    //   render: (_, row) => (
123
-    //     <>
124
-    //       <OperButton onClick={() => router.push(`/broker/announcement/edit?id=${row.screenId}`)}>详情</OperButton>
125
-    //       <OperButton.Confirm title="确认进行操作?" color="#1890ff" onClick={() => onPublish(row)}>{row.status === 1 ? '取消发布' : '发布'}</OperButton.Confirm>
126
-    //     </>
127
-    //   )
128
-    // },
126
+    {
127
+      title: '操作',
128
+      dataIndex: 'options',
129
+      key: 'options',
130
+      align: 'center',
131
+      render: (_, row) => (
132
+        <>
133
+          {/* <OperButton onClick={() => router.push(`/broker/announcement/edit?id=${row.screenId}`)}>详情</OperButton>
134
+          <OperButton.Confirm title="确认进行操作?" color="#1890ff" onClick={() => onPublish(row)}>{row.status === 1 ? '取消发布' : '发布'}</OperButton.Confirm> */}
135
+          {/* to={`/admin/bkBankCard?personId=${row}`}  , router.push(`/admin/bkBankCard?personId=${row.personId}`) */}
136
+          <Button
137
+            type="link" onClick={() => {
138
+              setDetail(row), setOpen(true)
139
+            }}
140
+          >
141
+            查看详情
142
+          </Button>
143
+        </>
144
+      )
145
+    },
129 146
   ]
130
-
147
+  // console.log('尝试', row.detail);
131 148
   return (
132
-    <QueryTable
133
-      ref={ref}
134
-      rowKey="personId"
135
-      api={apis.broker.getBrokerList}
136
-      searchFields={searchFields}
137
-      columns={tableColumns}
138
-    />
149
+    <>
150
+      <QueryTable
151
+        ref={ref}
152
+        rowKey="personId"
153
+        api={apis.broker.getBrokerList}
154
+        searchFields={searchFields}
155
+        columns={tableColumns}
156
+      />
157
+      <Modal title="经纪人详情" visible={open} onOk={hideModal} onCancel={hideModal} footer={null}>
158
+        <DealDetail detail={detail} ref={ref}/>
159
+      </Modal>
160
+    </>
139 161
   )
140 162
 }

+ 1
- 3
src/pages/customer/deal/detail.jsx Wyświetl plik

@@ -6,9 +6,8 @@ import WxDictSelect from '@/components/SelectButton/WxDictSelect';
6 6
 import BuildingSelect from '@/components/SelectButton/BuildSelect';
7 7
 import QueryTable from '@/components/QueryTable';
8 8
 
9
-function costomerDeal(props) {
9
+function costomerDeal (props) {
10 10
   const { detail } = props;
11
-
12 11
   const list = [
13 12
     {
14 13
       title: '所属项目',
@@ -53,7 +52,6 @@ function costomerDeal(props) {
53 52
       render: detail.remark,
54 53
     },
55 54
   ];
56
-
57 55
   return (
58 56
     <>
59 57
       <Row>

+ 4
- 4
src/pages/customer/deal/index.jsx Wyświetl plik

@@ -7,7 +7,7 @@ import BuildingSelect from '@/components/SelectButton/BuildSelect';
7 7
 import QueryTable from '@/components/QueryTable';
8 8
 import DealDetail from './detail';
9 9
 
10
-function costomerDrift(props) {
10
+function costomerDrift (props) {
11 11
   const [visible, setVisible] = useState(false);
12 12
   const [detail, setDetail] = useState({});
13 13
   const columns = [
@@ -76,8 +76,8 @@ function costomerDrift(props) {
76 76
       dataIndex: 'type',
77 77
       key: 'type',
78 78
       align: 'center',
79
-      render: t => t=='signatory'?'签约':t=='commission'?'结佣':'--'
80
-      
79
+      render: t => t == 'signatory' ? '签约' : t == 'commission' ? '结佣' : '--'
80
+
81 81
     },
82 82
     {
83 83
       title: '操作',
@@ -137,7 +137,7 @@ function costomerDrift(props) {
137 137
         columns={columns}
138 138
       />
139 139
       <Modal
140
-      title='客户详情'
140
+        title='客户详情'
141 141
         visible={visible}
142 142
         onOk={() => {
143 143
           setVisible(false);

+ 20
- 15
src/services/apis.js Wyświetl plik

@@ -220,10 +220,10 @@ export default {
220 220
       }
221 221
 
222 222
     },
223
-    logs:{
223
+    logs: {
224 224
       url: `${prefix}/building/logs`,
225
-        method: 'GET',
226
-        action: 'admin.building.logs.get',
225
+      method: 'GET',
226
+      action: 'admin.building.logs.get',
227 227
     }
228 228
 
229 229
   },
@@ -346,7 +346,7 @@ export default {
346 346
     },
347 347
     //回访
348 348
     reply: {
349
-      
349
+
350 350
       method: 'PUT',
351 351
       url: `${prefix}/reply/:id`,
352 352
       action: '',
@@ -414,8 +414,8 @@ export default {
414 414
       url: `${prefix}/marking/signatory`,
415 415
       action: 'admin.marking.signatory.put',
416 416
     },
417
-     // 结佣
418
-     commission: {
417
+    // 结佣
418
+    commission: {
419 419
       method: 'PUT',
420 420
       url: `${prefix}/marking/commission`,
421 421
       action: 'admin.marking.commission.put',
@@ -426,7 +426,7 @@ export default {
426 426
       url: `${prefix}/marking/invalidCustomer`,
427 427
       action: 'admin.marking.invalidCustomer.put',
428 428
     },
429
-    
429
+
430 430
     recommendGetById: {
431 431
       method: 'GET',
432 432
       url: `${prefix}/customer/recommend/getById/:id`,
@@ -999,35 +999,35 @@ export default {
999 999
       method: 'DELETE',
1000 1000
       action: 'admin.taPolicy.id.delete',
1001 1001
     },
1002
-  
1003
-    getPolicyTypeList:{
1002
+
1003
+    getPolicyTypeList: {
1004 1004
       url: `${prefix}/taPolicyType`,
1005 1005
       method: 'GET',
1006 1006
       action: 'admin.taPolicyType.get',
1007 1007
     },
1008
-    addPolicyType:{
1008
+    addPolicyType: {
1009 1009
       url: `${prefix}/taPolicyType`,
1010 1010
       method: 'Post',
1011 1011
       action: 'admin.taPolicyType.Post',
1012 1012
     },
1013 1013
 
1014
-    getPolicyTypeDetail:{
1014
+    getPolicyTypeDetail: {
1015 1015
       url: `${prefix}/taPolicyType/:id`,
1016 1016
       method: 'GET',
1017 1017
       action: 'admin.taPolicyType.id.get',
1018 1018
     },
1019 1019
 
1020
-    upDatePolicyType:{
1020
+    upDatePolicyType: {
1021 1021
       url: `${prefix}/taPolicyType/:id`,
1022 1022
       method: 'PUT',
1023 1023
       action: 'admin.taPolicyType.id.put',
1024 1024
     },
1025
-    deletePolicyType:{
1025
+    deletePolicyType: {
1026 1026
       url: `${prefix}/taPolicyType/:id`,
1027 1027
       method: 'DELETE',
1028 1028
       action: 'admin.taPolicyType.id.delete',
1029 1029
     },
1030
- 
1030
+
1031 1031
     // getPolicyTypeList:{
1032 1032
     //   url: `${prefix}/taPolicyType`,
1033 1033
     //   method: 'GET',
@@ -1170,7 +1170,7 @@ export default {
1170 1170
       method: 'DELETE',
1171 1171
       action: 'admin.channel.id.delete',
1172 1172
     },
1173
- 
1173
+
1174 1174
     // getListBroker: {
1175 1175
     //   url: `${prefix}/channel/InviteClientsList`,
1176 1176
     //   method: 'GET',
@@ -2469,5 +2469,10 @@ export default {
2469 2469
       method: 'GET',
2470 2470
       url: `${prefix}/broker/customer`,
2471 2471
     },
2472
+    // 获取经纪人详情
2473
+    getBrokerDetails: {
2474
+      method: 'GET',
2475
+      url: `${prefix}/bkBankCard`,
2476
+    },
2472 2477
   }
2473 2478
 };

+ 13
- 0
src/utils/imageQC.js Wyświetl plik

@@ -4,6 +4,19 @@ import { message } from 'antd';
4 4
 export default function PictureQRcode(res, title) {
5 5
   if (res.qrCode === null || res.qrCode == 'null') {
6 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();
7 20
 
8 21
   } else {
9 22
     const x = new XMLHttpRequest();