dingxin před 5 roky
rodič
revize
059f33255b

+ 1
- 0
config/routes.js Zobrazit soubor

@@ -189,6 +189,7 @@ export default [
189 189
               {
190 190
                 path: '/channel/brokerList',
191 191
                 name: '经纪人',
192
+                hideInMenu: true,
192 193
                 component: './channel/brokerList',
193 194
               },
194 195
               {

+ 2
- 2
src/pages/channel/brokerList.jsx Zobrazit soubor

@@ -103,7 +103,7 @@ const header = props => {
103 103
 //   const [page, changePage] = useState({})
104 104
   // eslint-disable-next-line react-hooks/rules-of-hooks
105 105
   useEffect(() => {
106
-    getListBroker()
106
+    getListBroker({ channelId: props.location.query.id, pageNum: 1, pageSize: 10 })
107 107
   }, [])
108 108
 
109 109
     function getListBroker(params) {
@@ -118,7 +118,7 @@ const header = props => {
118 118
 
119 119
  // 查询
120 120
  function queryList() {
121
-  getListBroker({ ...queryData, pageNum: 1, pageSize: 10, channelId: localStorage.getItem('value') })
121
+  getListBroker({ ...queryData, pageNum: 1, pageSize: 10, channelId: props.location.query.id })
122 122
 }
123 123
     // 分页
124 124
     function onChange(pageNumber) {

+ 15
- 1
src/pages/channel/channelList.jsx Zobrazit soubor

@@ -64,6 +64,7 @@ const columns = [
64 64
     dataIndex: 'brokerCount',
65 65
     key: 'brokerCount',
66 66
     align: 'center',
67
+      render: (text, record) => <a style={ { color: '#66B3FF' } } onClick= {() => toBroker(record)} >{ record.recommendCount }</a>,
67 68
   },
68 69
   {
69 70
     title: '推荐客户有效',
@@ -86,7 +87,7 @@ const columns = [
86 87
       <AuthButton name="admin.channel.id.put" noRight={null}>
87 88
         <a style={{ color: '#66B3FF' }} onClick={() => toedit(record.channelId)} >编辑</a>
88 89
       </AuthButton>
89
-    )
90
+    ),
90 91
   },
91 92
 ];
92 93
 
@@ -110,6 +111,19 @@ function toedit(channelId) {
110 111
   });
111 112
 }
112 113
 
114
+// 经纪人页面
115
+function toBroker(record) {
116
+  if (record.brokerCount === 0) {
117
+    return
118
+  }
119
+  router.push({
120
+    pathname: '/channel/brokerList',
121
+    query: {
122
+      id: record.channelId,
123
+    },
124
+  });
125
+}
126
+
113 127
 const header = props => {
114 128
   // eslint-disable-next-line react-hooks/rules-of-hooks
115 129
   const [data, setData] = useState({ channelNmae: [], result: [] })