周立森 5 lat temu
rodzic
commit
815b5e28c7

+ 9
- 0
src/pages/activity/ActivityList.jsx Wyświetl plik

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

+ 9
- 0
src/pages/carouselFigure/advertisingList.jsx Wyświetl plik

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

+ 8
- 0
src/pages/carouselFigure/carouselFigureList.jsx Wyświetl plik

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

+ 37
- 27
src/pages/customer/independentList/index.jsx Wyświetl plik

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

+ 11
- 0
src/pages/customer/recommendCustomer/index.jsx Wyświetl plik

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
             <Button type="primary" htmlType="submit" >
219
             <Button type="primary" htmlType="submit" >
212
               搜索
220
               搜索
213
             </Button>
221
             </Button>
222
+            <Button style={{ marginLeft: 8 }} onClick={handleReset}>
223
+              重置
224
+            </Button>
214
         </Form.Item>
225
         </Form.Item>
215
       </Form>
226
       </Form>
216
       <Button type="primary" onClick={() => exportRecommendCustomer()} style={{float:'right',margin:'20px 0'}}>
227
       <Button type="primary" onClick={() => exportRecommendCustomer()} style={{float:'right',margin:'20px 0'}}>

+ 10
- 0
src/pages/customer/report/index.jsx Wyświetl plik

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

+ 6
- 0
src/pages/integralMall/GoodsList.jsx Wyświetl plik

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

+ 10
- 0
src/pages/integralMall/exchangeRecords.jsx Wyświetl plik

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

+ 8
- 0
src/pages/news/list/NewsList.jsx Wyświetl plik

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

+ 9
- 0
src/pages/staff/list/StaffList.jsx Wyświetl plik

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