Browse Source

Merge branch 'master' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager

# Conflicts:
#	src/pages/staff/list/editStaff.jsx
傅行帆 5 years ago
parent
commit
0f62e0fb3a

+ 1
- 1
config/routes.js View File

206
               },
206
               },
207
               {
207
               {
208
                 path: '/channel/InviteClients',
208
                 path: '/channel/InviteClients',
209
-                name: '邀请客户',
209
+                name: '邀请经纪人',
210
                 hideInMenu: true,
210
                 hideInMenu: true,
211
                 component: './channel/InviteClients',
211
                 component: './channel/InviteClients',
212
               },
212
               },

+ 11
- 0
src/pages/channel/recommendClients.jsx View File

3
 import { FormattedMessage } from 'umi-plugin-react/locale';
3
 import { FormattedMessage } from 'umi-plugin-react/locale';
4
 import channels from './channelList.less';
4
 import channels from './channelList.less';
5
 import router from 'umi/router';
5
 import router from 'umi/router';
6
+import moment from 'moment';
6
 import apis from '../../services/apis';
7
 import apis from '../../services/apis';
7
 import request from '../../utils/request'
8
 import request from '../../utils/request'
8
 
9
 
91
     dataIndex: 'status',
92
     dataIndex: 'status',
92
     key: 'status',
93
     key: 'status',
93
     align: 'center',
94
     align: 'center',
95
+    // eslint-disable-next-line consistent-return
96
+    render: (text, records) => {
97
+      if (records.status === 1) { return '报备' }
98
+      if (records.status === 2) { return 'admin.taNews.weight' }
99
+      if (records.status === 3) { return '认购' }
100
+      if (records.status === 4) { return '签约' }
101
+      if (records.verifyStatus === 1) { return '待审核' }
102
+      if (records.verifyStatus === 2) { return '审核同意' }
103
+      if (records.verifyStatus === 3) { return '签约' }
104
+    },
94
   },
105
   },
95
 ];
106
 ];
96
 
107
 

+ 14
- 0
src/pages/customer/customerlist/index.jsx View File

196
       align: 'center',
196
       align: 'center',
197
       width: '15%',
197
       width: '15%',
198
     },
198
     },
199
+    {
200
+      title: '推广人员',
201
+      dataIndex: 'sharePersonName',
202
+      key: 'sharePersonName',
203
+      align: 'center',
204
+      width: '15%',
205
+    },
199
   ]
206
   ]
200
 
207
 
201
   const privateColumns = [
208
   const privateColumns = [
247
         </>
254
         </>
248
       ),
255
       ),
249
     },
256
     },
257
+    {
258
+      title: '推广人员',
259
+      dataIndex: 'sharePersonName',
260
+      key: 'sharePersonName',
261
+      align: 'center',
262
+      width: '15%',
263
+    },
250
     {
264
     {
251
       title: '客户状态',
265
       title: '客户状态',
252
       dataIndex: 'reportRecommendStatus',
266
       dataIndex: 'reportRecommendStatus',

+ 3
- 3
src/pages/integralMall/exchangeRecords.jsx View File

87
       dataIndex: 'personType',
87
       dataIndex: 'personType',
88
       key: 'personType',
88
       key: 'personType',
89
       align: 'center',
89
       align: 'center',
90
-      render: (personType)=> <><span>{personType === 'Realty Consultant' ? '置业顾问' : personType === 'Sales Executive' ? '销售主管' : personType === 'estate agent' ? '经纪人' : ''}</span></>
90
+      render: (personType)=> <><span>{personType === 'Realty Consultant' ? '置业顾问' : personType === 'Sales Executive' ? '销售主管' : personType === 'estate agent' ? '经纪人' : personType === 'customer' ? '客户' : ''}</span></>
91
     },
91
     },
92
     {
92
     {
93
       title: '手机号',
93
       title: '手机号',
113
       dataIndex: 'createDate',
113
       dataIndex: 'createDate',
114
       key: 'createDate',
114
       key: 'createDate',
115
       align: 'center',
115
       align: 'center',
116
-      render: (createDate) => <><span>{moment(createDate).format('YYYY-MM-DD HH:mm')}</span></>
116
+      render: (_, recorde) => <><span>{moment(recorde.createDate).format('YYYY-MM-DD HH:mm')}</span></>,
117
     },
117
     },
118
     {
118
     {
119
       title: '领取时间',
119
       title: '领取时间',
120
       dataIndex: 'verifyDate',
120
       dataIndex: 'verifyDate',
121
       key: 'verifyDate',
121
       key: 'verifyDate',
122
       align: 'center',
122
       align: 'center',
123
-      render: (verifyDate) => <><span>{verifyDate != null ? moment(verifyDate).format('YYYY-MM-DD HH:mm') : ''}</span></>
123
+      render: (_, recorde) => <><span>{recorde.verifyDate != null ? moment(recorde.verifyDate).format('YYYY-MM-DD HH:mm') : ''}</span></>,
124
     },
124
     },
125
     {
125
     {
126
       title: '状态',
126
       title: '状态',

+ 4
- 1
src/pages/integralMall/verifyList.jsx View File

35
   }
35
   }
36
 
36
 
37
   const changeStatus = (row) => () => {
37
   const changeStatus = (row) => () => {
38
+    // console.log(new Date())
39
+    row.verifyDate = new Date()
40
+    // console.log('row.verifyDate: ', row.verifyDate)
38
     request({ ...apis.integralMall.changeTaPointsExchange, data: row}).then((data) => {
41
     request({ ...apis.integralMall.changeTaPointsExchange, data: row}).then((data) => {
39
         message.info("操作成功")
42
         message.info("操作成功")
40
-        getVerifyList({ pageNum: pageNumber, pageSize: 10, phone: props.location.query.telValue })
43
+        getVerifyList({ pageNum: 1, pageSize: 10, phone: props.location.query.telValue })
41
     })
44
     })
42
   }
45
   }
43
   
46
   

+ 18
- 0
src/pages/news/list/NewsList.jsx View File

5
 import request from '../../../utils/request';
5
 import request from '../../../utils/request';
6
 import apis from '../../../services/apis';
6
 import apis from '../../../services/apis';
7
 import Styles from './style.less';
7
 import Styles from './style.less';
8
+import styles from '../../style/GoodsList.less';
8
 import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9
 import NewsTypeSelect from '../../../components/SelectButton/NewTypeSelect'
9
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10
 import BuildSelect from '../../../components/SelectButton/BuildSelect'
10
 import SelectCity from '../../../components/SelectButton/CitySelect'
11
 import SelectCity from '../../../components/SelectButton/CitySelect'
118
       });
119
       });
119
     }
120
     }
120
 
121
 
122
+    //   置顶
123
+    const topNews = (weightParam, newsId) => () => {
124
+      const weight = Math.abs(weightParam - 1)
125
+      request({ ...apis.news.weight, params: {newsId: newsId, weight} }).then((data) => {
126
+          console.log(data)
127
+          message.info('操作成功!')
128
+          getList({ pageNum: 1, pageSize: 10 })
129
+      }).catch((err) => {
130
+          console.log(err)
131
+          message.info(err.msg || err.message)
132
+      })
133
+    }
134
+
121
     function cancelRelease(newsId, newsStatus, buildingId, newsTypeId) {
135
     function cancelRelease(newsId, newsStatus, buildingId, newsTypeId) {
122
       console.log("newsId" + newsId + "status" + newsStatus);
136
       console.log("newsId" + newsId + "status" + newsStatus);
123
       if (newsStatus === 1) {
137
       if (newsStatus === 1) {
166
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
180
         cover={<img alt="example" src={data.newsImg} style={{ borderRadius: '12px 0 0 12px', width: '230px', height: '228px' }}></img>}
167
         bodyStyle={{ padding: '10px 20px' }}
181
         bodyStyle={{ padding: '10px 20px' }}
168
       >
182
       >
183
+        <AuthButton name="admin.taNews.weight.put" noRight={null}>
184
+        <span style={{ position: 'absolute', right: '100px', top: '19px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={topNews(data.weight, data.newsId)}>{ data.weight === 1 ? '取消置顶' : '置顶' }</span>
185
+        </AuthButton>
186
+
169
         <AuthButton name="admin.taNews.id.put" noRight={null}>
187
         <AuthButton name="admin.taNews.id.put" noRight={null}>
170
           <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(data.newsId)}>
188
           <span style={{ position: 'absolute', right: '20px', top: '20px', fontSize: ' 0.106rem',zIndex:1, color: '#FF7E48', cursor: 'pointer' }} onClick={toEditList(data.newsId)}>
171
             编辑
189
             编辑

+ 1
- 1
src/pages/staff/list/addRole.jsx View File

212
             <Button type="primary" htmlType="submit">
212
             <Button type="primary" htmlType="submit">
213
               保存
213
               保存
214
           </Button>
214
           </Button>
215
-            <Button className={channels.formButton} htmlType="submit" onChange = {toRoleList}>
215
+            <Button className={channels.formButton} onClick = {toRoleList}>
216
               取消
216
               取消
217
           </Button>
217
           </Button>
218
           </Form.Item>
218
           </Form.Item>

+ 2
- 1
src/pages/staff/list/editStaff.jsx View File

139
             pattern: new RegExp('^1[0-9]{10}$'),
139
             pattern: new RegExp('^1[0-9]{10}$'),
140
             message: '请输入正确的电话号码',
140
             message: '请输入正确的电话号码',
141
         },
141
         },
142
-    ],
142
+      ],
143
+      help: '默认密码:123456',
143
     },
144
     },
144
     {
145
     {
145
       label: '角色',
146
       label: '角色',

+ 5
- 0
src/services/apis.js View File

156
       method: 'PUT',
156
       method: 'PUT',
157
       url: `${prefix}/taNews/:id`,
157
       url: `${prefix}/taNews/:id`,
158
       action: 'admin.taNews.id.put',
158
       action: 'admin.taNews.id.put',
159
+    },
160
+    weight: {
161
+      method: 'PUT',
162
+      url: `${prefix}/taNews/weight`,
163
+      action: 'admin.taNews.weight.put',
159
     }
164
     }
160
   },
165
   },
161
   newsType: {
166
   newsType: {