Bladeren bron

修复bug

周立森 5 jaren geleden
bovenliggende
commit
815b5e28c7

+ 9
- 0
src/pages/activity/ActivityList.jsx Bestand weergeven

@@ -202,6 +202,12 @@ const handleSubmit = (e, props) => {
202 202
     });
203 203
   }
204 204
 
205
+   //重置搜索
206
+   function handleReset() {
207
+    props.form.resetFields();
208
+  }
209
+
210
+
205 211
   const { getFieldDecorator } = props.form
206 212
   return (
207 213
 
@@ -242,6 +248,9 @@ const handleSubmit = (e, props) => {
242 248
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
243 249
             搜索
244 250
           </Button>
251
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
252
+              重置
253
+            </Button>
245 254
         </Form.Item>
246 255
       </Form>
247 256
       <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>

+ 9
- 0
src/pages/carouselFigure/advertisingList.jsx Bestand weergeven

@@ -164,6 +164,12 @@ const handleSubmit = (e, props) => {
164 164
     });
165 165
   }
166 166
 
167
+   //重置搜索
168
+   function handleReset() {
169
+    props.form.resetFields();
170
+  }
171
+
172
+
167 173
   const { getFieldDecorator } = props.form
168 174
   return (
169 175
 
@@ -204,6 +210,9 @@ const handleSubmit = (e, props) => {
204 210
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
205 211
             搜索
206 212
           </Button>
213
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
214
+              重置
215
+            </Button>
207 216
         </Form.Item>
208 217
       </Form>
209 218
       <AuthButton name="admin.extendContent.post" noRight={null}>

+ 8
- 0
src/pages/carouselFigure/carouselFigureList.jsx Bestand weergeven

@@ -164,6 +164,11 @@ const handleSubmit = (e, props) => {
164 164
     });
165 165
   }
166 166
 
167
+   //重置搜索
168
+   function handleReset() {
169
+    props.form.resetFields();
170
+  }
171
+
167 172
   const { getFieldDecorator } = props.form
168 173
   return (
169 174
 
@@ -204,6 +209,9 @@ const handleSubmit = (e, props) => {
204 209
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
205 210
             搜索
206 211
           </Button>
212
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
213
+              重置
214
+            </Button>
207 215
         </Form.Item>
208 216
       </Form>
209 217
       <AuthButton name="admin.extendContent.post" noRight={null}>

+ 37
- 27
src/pages/customer/independentList/index.jsx Bestand weergeven

@@ -24,11 +24,11 @@ class ModalTable extends React.Component {
24 24
   }
25 25
 
26 26
   // 挂载之后
27
-  componentDidMount() {
27
+  componentDidMount () {
28 28
     this.getList({ pageNumber: 1, pageSize: 5 })
29 29
   }
30 30
 
31
-  componentDidUpdate(preProps, preState) {
31
+  componentDidUpdate (preProps, preState) {
32 32
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
33 33
       this.getList({ pageNumber: 1, pageSize: 5 })
34 34
       this.setState({ visibleData: this.props.visibleData });
@@ -37,16 +37,16 @@ class ModalTable extends React.Component {
37 37
 
38 38
   // 弹框确定按钮
39 39
   // eslint-disable-next-line react/sort-comp
40
-  handleOk() {
40
+  handleOk () {
41 41
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
42 42
   }
43 43
 
44 44
   // 弹框取消按钮
45
-  handleCancel() {
45
+  handleCancel () {
46 46
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
47 47
   }
48 48
 
49
-  getList(params) {
49
+  getList (params) {
50 50
     console.log('this.state.visibleData', this.state.visibleData)
51 51
     const { customerId } = this.state.visibleData
52 52
     if (customerId === '' || customerId === undefined) {
@@ -70,11 +70,11 @@ class ModalTable extends React.Component {
70 70
   }
71 71
 
72 72
   // 分页
73
-  onChange(pageNum) {
73
+  onChange (pageNum) {
74 74
     this.getList({ pageNumber: pageNum, pageSize: 5 })
75 75
   }
76 76
 
77
-  render() {
77
+  render () {
78 78
     const columns = [
79 79
       {
80 80
         title: '头像',
@@ -153,12 +153,12 @@ class InviteTable extends React.Component {
153 153
   }
154 154
 
155 155
   // 挂载之后
156
-  componentDidMount() {
156
+  componentDidMount () {
157 157
     const { customerId } = this.state.visibleData
158 158
     this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
159 159
   }
160 160
 
161
-  componentDidUpdate(preProps, preState) {
161
+  componentDidUpdate (preProps, preState) {
162 162
     const { customerId } = this.state.visibleData
163 163
     if (this.props.visibleData.customerId !== preState.visibleData.customerId) {
164 164
       this.getList({ id: customerId, pageNumber: 1, pageSize: 5 })
@@ -168,16 +168,16 @@ class InviteTable extends React.Component {
168 168
 
169 169
   // 弹框确定按钮
170 170
   // eslint-disable-next-line react/sort-comp
171
-  handleOk() {
171
+  handleOk () {
172 172
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
173 173
   }
174 174
 
175 175
   // 弹框取消按钮
176
-  handleCancel() {
176
+  handleCancel () {
177 177
     this.setState({ visibleData: { visible: false, customerId: '', realtyConsultant: '' } })
178 178
   }
179 179
 
180
-  getList(params) {
180
+  getList (params) {
181 181
     const { customerId } = this.props.visibleData
182 182
     if (customerId === '' || customerId === undefined) {
183 183
       return
@@ -198,11 +198,11 @@ class InviteTable extends React.Component {
198 198
   }
199 199
 
200 200
   // 分页
201
-  onChange(pageNum) {
201
+  onChange (pageNum) {
202 202
     this.getList({ pageNumber: pageNum, pageSize: 5 })
203 203
   }
204 204
 
205
-  render() {
205
+  render () {
206 206
     const columns = [
207 207
       {
208 208
         title: '头像',
@@ -256,7 +256,7 @@ class InviteTable extends React.Component {
256 256
  * @param {*} props
257 257
  * @returns
258 258
  */
259
-function body(props) {
259
+function body (props) {
260 260
   const { getFieldDecorator } = props.form
261 261
 
262 262
   // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -268,7 +268,7 @@ function body(props) {
268 268
   }, [])
269 269
 
270 270
 
271
-  function openNotificationWithIcon(type, message) {
271
+  function openNotificationWithIcon (type, message) {
272 272
     notification[type]({
273 273
       message,
274 274
       description:
@@ -276,7 +276,7 @@ function body(props) {
276 276
     });
277 277
   }
278 278
 
279
-  function getList(params) {
279
+  function getList (params) {
280 280
     // 网路请求
281 281
     request({ ...apis.customer.agents, params: { ...params } }).then(res => {
282 282
       setDataSource(res)
@@ -286,7 +286,7 @@ function body(props) {
286 286
   }
287 287
 
288 288
   // 提交事件
289
-  function handleSubmit(e) {
289
+  function handleSubmit (e) {
290 290
     e.preventDefault();
291 291
     props.form.validateFields((err, values) => {
292 292
       if (!err) {
@@ -299,29 +299,36 @@ function body(props) {
299 299
   // eslint-disable-next-line react-hooks/rules-of-hooks
300 300
   const [gInviteData, setGInviteData] = useState({ visible: false, customerId: '', realtyConsultant: '' })
301 301
   // Change 事件
302
-  function handleSelectChange(e) {
302
+  function handleSelectChange (e) {
303 303
     // eslint-disable-next-line no-console
304 304
     console.log(e)
305 305
   }
306
-  function gM(row) {
306
+  function gM (row) {
307 307
     setGVisibleData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
308 308
 
309 309
     setGInviteData({ visible: false })
310 310
   }
311 311
 
312
-  function Invite(row) {
312
+  function Invite (row) {
313 313
     setGInviteData({ visible: true, customerId: row.personId, realtyConsultant: row.realtyConsultant })
314 314
 
315 315
     setGVisibleData({ visible: false })
316 316
   }
317 317
 
318 318
   // 分页
319
-  function onChange(pageNum) {
319
+  function onChange (pageNum) {
320 320
     // eslint-disable-next-line react-hooks/rules-of-hooks
321 321
     getList({ pageNumber: pageNum, pageSize: 10 })
322 322
   }
323 323
 
324
-  function toAudit(cuurentId) {
324
+  /**
325
+    * 重置搜索
326
+    */
327
+  function handleReset () {
328
+    props.form.resetFields();
329
+  }
330
+
331
+  function toAudit (cuurentId) {
325 332
     router.push({
326 333
       pathname: '/customer/recommendCustomer/audit',
327 334
       query: {
@@ -330,7 +337,7 @@ function body(props) {
330 337
     })
331 338
   }
332 339
 
333
-  function exportIndependen() {
340
+  function exportIndependen () {
334 341
     request({ ...apis.customer.customerRecommendAgentsExport, responseType: 'blob' })
335 342
       .then(response => {
336 343
         download(response)
@@ -339,7 +346,7 @@ function body(props) {
339 346
       })
340 347
   }
341 348
 
342
-  function download(data) {
349
+  function download (data) {
343 350
     if (!data) {
344 351
       return
345 352
     }
@@ -429,13 +436,16 @@ function body(props) {
429 436
             />,
430 437
           )}
431 438
         </Form.Item>
432
-        <Form.Item style={{ position:'absolute',right:'38px' }} >
439
+        <Form.Item style={{ position: 'absolute', right: '38px' }} >
433 440
           <Button type="primary" htmlType="submit" >
434 441
             搜索
435 442
           </Button>
443
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
444
+            重置
445
+            </Button>
436 446
         </Form.Item>
437 447
       </Form>
438
-      <Button type="primary" onClick={() => exportIndependen()}  style={{ float: 'right', margin: '20px 0' }}>
448
+      <Button type="primary" onClick={() => exportIndependen()} style={{ float: 'right', margin: '20px 0' }}>
439 449
         导出
440 450
       </Button>
441 451
       <Table rowKey="independentIndex" dataSource={dataSource.records} columns={columns} pagination={{ total: dataSource.total, onChange }} />

+ 11
- 0
src/pages/customer/recommendCustomer/index.jsx Bestand weergeven

@@ -77,6 +77,14 @@ function body(props) {
77 77
     })
78 78
   }
79 79
 
80
+  
81
+ /**
82
+   * 重置搜索
83
+   */
84
+  function handleReset() {
85
+    props.form.resetFields();
86
+  }
87
+  
80 88
   /**
81 89
    *导出数据(推荐用户)
82 90
    *
@@ -211,6 +219,9 @@ function body(props) {
211 219
             <Button type="primary" htmlType="submit" >
212 220
               搜索
213 221
             </Button>
222
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
223
+              重置
224
+            </Button>
214 225
         </Form.Item>
215 226
       </Form>
216 227
       <Button type="primary" onClick={() => exportRecommendCustomer()} style={{float:'right',margin:'20px 0'}}>

+ 10
- 0
src/pages/customer/report/index.jsx Bestand weergeven

@@ -70,6 +70,13 @@ function body(props) {
70 70
       getList({ pageNumber: pageNum, pageSize: 9 })
71 71
   }
72 72
 
73
+ /**
74
+   * 重置搜索
75
+   */
76
+  function handleReset() {
77
+    props.form.resetFields();
78
+  }
79
+
73 80
   function exportReport() {
74 81
     request({ ...apis.customer.customerRecommendReportExport, responseType: 'blob' })
75 82
     .then(response => {
@@ -177,6 +184,9 @@ function body(props) {
177 184
             <Button type="primary" htmlType="submit">
178 185
               搜索
179 186
             </Button>
187
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
188
+              重置
189
+            </Button>
180 190
         </Form.Item>
181 191
       </Form>
182 192
       <Button type="primary" onClick={() => exportReport()} style={{ float:'right',margin:'20px 0' }}>

+ 6
- 0
src/pages/integralMall/GoodsList.jsx Bestand weergeven

@@ -41,6 +41,9 @@ function header(props) {
41 41
     getList({ pageNum: pageNumber, pageSize: 10 })
42 42
   }
43 43
 
44
+  function handleReset() {
45
+    props.form.resetFields();
46
+  }
44 47
 
45 48
   // 跳转到编辑商品
46 49
   const toEditGoods = (goodsId) => () => {
@@ -188,6 +191,9 @@ function header(props) {
188 191
             <Button type="primary" htmlType="submit" className={styles.searchBtn}>
189 192
               搜索
190 193
             </Button>
194
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
195
+              重置
196
+            </Button>
191 197
         </Form.Item>
192 198
       </Form>
193 199
       <AuthButton name="admin.taGoods.add.post" noRight={null}>

+ 10
- 0
src/pages/integralMall/exchangeRecords.jsx Bestand weergeven

@@ -32,6 +32,13 @@ function record(props) {
32 32
         setData(data)
33 33
     })
34 34
   }
35
+
36
+  //重置搜索
37
+  function handleReset() {
38
+    props.form.resetFields();
39
+  }
40
+
41
+
35 42
   
36 43
   // 提交事件
37 44
   const handleSubmit = (e, props) => {
@@ -175,6 +182,9 @@ function record(props) {
175 182
             <Button type="primary" htmlType="submit">
176 183
               搜索
177 184
             </Button>
185
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
186
+              重置
187
+            </Button>
178 188
           </Form.Item>
179 189
         </div>
180 190
         <div style={{margin:'10px 0'}}>

+ 8
- 0
src/pages/news/list/NewsList.jsx Bestand weergeven

@@ -229,6 +229,11 @@ function body(props) {
229 229
     getList({ pageNum: pageNumber, pageSize: 6 })
230 230
   }
231 231
 
232
+   //重置搜索
233
+   function handleReset() {
234
+    props.form.resetFields();
235
+  }
236
+  
232 237
   function getDate(value, dateString) {
233 238
     // moment(value).format('YYYY-MM-DD HH:mm:ss')
234 239
     console.log(value, dateString)
@@ -273,6 +278,9 @@ function body(props) {
273 278
           <Button type="primary" htmlType="submit" >
274 279
             搜索
275 280
           </Button>
281
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
282
+              重置
283
+            </Button>
276 284
         </Form.Item>
277 285
       </Form>
278 286
       <AuthButton name="admin.taNews.post" noRight={null}>

+ 9
- 0
src/pages/staff/list/StaffList.jsx Bestand weergeven

@@ -132,6 +132,11 @@ const header = (props) => {
132 132
     });
133 133
   }
134 134
 
135
+   //重置搜索
136
+   function handleReset() {
137
+    props.form.resetFields();
138
+  }
139
+
135 140
   const { getFieldDecorator } = props.form
136 141
   return (
137 142
 
@@ -168,6 +173,10 @@ const header = (props) => {
168 173
           <Button type="primary" htmlType="submit" className={styles.searchBtn}>
169 174
             搜索
170 175
           </Button>
176
+          
177
+   <Button style={{ marginLeft: 8 }} onClick={handleReset}>
178
+              重置
179
+            </Button>
171 180
         </Form.Item>
172 181
       </Form>
173 182
       <Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>