|
@@ -1,5 +1,5 @@
|
1
|
1
|
import React, { useState, useCallback, useRef } from 'react';
|
2
|
|
-import { Button } from 'antd';
|
|
2
|
+import { Button, message } from 'antd';
|
3
|
3
|
import { UploadOutlined } from '@ant-design/icons';
|
4
|
4
|
import ProTable from '@ant-design/pro-table';
|
5
|
5
|
import { queryTable } from '@/utils/request';
|
|
@@ -30,11 +30,25 @@ export default (props) => {
|
30
|
30
|
const [exporting, exportFunc] = useExport(expfunc);
|
31
|
31
|
|
32
|
32
|
const handleExport = useCallback(() => {
|
|
33
|
+
|
33
|
34
|
if (!exportParams.current) {
|
34
|
35
|
const formData = ref.current ? ref.current.getFieldsValue() : {};
|
35
|
36
|
exportParams.current = { ...formData, ...params }
|
36
|
37
|
}
|
37
|
|
- exportFunc(exportParams.current);
|
|
38
|
+ let obj = exportParams.current
|
|
39
|
+ if (obj.prefix) {
|
|
40
|
+ if (obj.start) {
|
|
41
|
+ if (obj.end) {
|
|
42
|
+ exportFunc(exportParams.current);
|
|
43
|
+ } else {
|
|
44
|
+ message.info('请输入终止号码点击查询后再点击导出')
|
|
45
|
+ }
|
|
46
|
+ } else {
|
|
47
|
+ message.info('请输入起始号码点击查询后再点击导出')
|
|
48
|
+ }
|
|
49
|
+ } else {
|
|
50
|
+ message.info('请输入卡号前缀点击查询后再点击导出')
|
|
51
|
+ }
|
38
|
52
|
}, [exportFunc, params]);
|
39
|
53
|
|
40
|
54
|
// 添加导出按钮
|