|
@@ -1,24 +1,25 @@
|
1
|
|
-import React from 'react'
|
2
|
|
-import { useNavigate } from 'react-router-dom'
|
3
|
|
-import { Button, Popconfirm, message } from 'antd'
|
4
|
|
-import { ProTable } from '@ant-design/pro-components'
|
5
|
|
-import { queryTable } from '@/utils/request'
|
6
|
|
-import { getTaCustom, deleteTaCustom } from '@/services/taCustom'
|
7
|
|
-import Page from '@/components/Page'
|
|
1
|
+import React, { useEffect } from "react";
|
|
2
|
+import { useNavigate } from "react-router-dom";
|
|
3
|
+import { Button, Popconfirm, message } from "antd";
|
|
4
|
+import { ProTable } from "@ant-design/pro-components";
|
|
5
|
+import { queryTable } from "@/utils/request";
|
|
6
|
+import { getTaCustom, deleteTaCustom } from "@/services/taCustom";
|
|
7
|
+import Page from "@/components/Page";
|
8
|
8
|
|
9
|
|
-const customList = queryTable(getTaCustom)
|
|
9
|
+const customList = queryTable(getTaCustom);
|
10
|
10
|
|
11
|
11
|
export default (props) => {
|
12
|
|
- const actionRef = React.useRef()
|
13
|
|
- const navigate = useNavigate()
|
|
12
|
+ const actionRef = React.useRef();
|
|
13
|
+ const navigate = useNavigate();
|
14
|
14
|
|
15
|
15
|
const handleDelete = (id) => {
|
16
|
16
|
if (id) {
|
17
|
17
|
deleteTaCustom(id).then((res) => {
|
18
|
|
- actionRef.current.reload()
|
19
|
|
- })
|
|
18
|
+ actionRef.current.reload();
|
|
19
|
+ });
|
20
|
20
|
}
|
21
|
|
- }
|
|
21
|
+ };
|
|
22
|
+
|
22
|
23
|
|
23
|
24
|
const columns = [
|
24
|
25
|
{
|
|
@@ -27,24 +28,24 @@ export default (props) => {
|
27
|
28
|
ellipsis: true,
|
28
|
29
|
},
|
29
|
30
|
{
|
30
|
|
- title: '税号',
|
31
|
|
- dataIndex: 'dutyParagraph',
|
|
31
|
+ title: "税号",
|
|
32
|
+ dataIndex: "dutyParagraph",
|
32
|
33
|
ellipsis: true,
|
33
|
34
|
search: false,
|
34
|
35
|
},
|
35
|
36
|
{
|
36
|
|
- title: '开户行',
|
37
|
|
- dataIndex: 'openingBank',
|
|
37
|
+ title: "开户行",
|
|
38
|
+ dataIndex: "openingBank",
|
38
|
39
|
ellipsis: true,
|
39
|
40
|
},
|
40
|
41
|
{
|
41
|
|
- title: '账号',
|
42
|
|
- dataIndex: 'account',
|
|
42
|
+ title: "账号",
|
|
43
|
+ dataIndex: "account",
|
43
|
44
|
ellipsis: true,
|
44
|
45
|
},
|
45
|
46
|
{
|
46
|
|
- title: '联系人姓名',
|
47
|
|
- dataIndex: 'contactsName',
|
|
47
|
+ title: "联系人姓名",
|
|
48
|
+ dataIndex: "contactsName",
|
48
|
49
|
ellipsis: true,
|
49
|
50
|
},
|
50
|
51
|
{
|
|
@@ -59,13 +60,13 @@ export default (props) => {
|
59
|
60
|
// ellipsis: true,
|
60
|
61
|
// },
|
61
|
62
|
{
|
62
|
|
- title: '联系人手机',
|
63
|
|
- dataIndex: 'contactsPhone',
|
|
63
|
+ title: "联系人手机",
|
|
64
|
+ dataIndex: "contactsPhone",
|
64
|
65
|
ellipsis: true,
|
65
|
66
|
},
|
66
|
67
|
{
|
67
|
|
- title: '联系人邮箱',
|
68
|
|
- dataIndex: 'contactsEmail',
|
|
68
|
+ title: "联系人邮箱",
|
|
69
|
+ dataIndex: "contactsEmail",
|
69
|
70
|
search: false,
|
70
|
71
|
ellipsis: true,
|
71
|
72
|
},
|
|
@@ -91,8 +92,8 @@ export default (props) => {
|
91
|
92
|
// search: false,
|
92
|
93
|
// },
|
93
|
94
|
{
|
94
|
|
- title: '操作',
|
95
|
|
- valueType: 'option',
|
|
95
|
+ title: "操作",
|
|
96
|
+ valueType: "option",
|
96
|
97
|
width: 200,
|
97
|
98
|
render: (_, record) => [
|
98
|
99
|
<Button
|
|
@@ -100,7 +101,7 @@ export default (props) => {
|
100
|
101
|
style={{ padding: 0 }}
|
101
|
102
|
type="link"
|
102
|
103
|
onClick={() => {
|
103
|
|
- navigate(`/custom/edit?id=${record.customId}`)
|
|
104
|
+ navigate(`/custom/edit?id=${record.customId}`);
|
104
|
105
|
}}
|
105
|
106
|
>
|
106
|
107
|
编辑
|
|
@@ -118,7 +119,7 @@ export default (props) => {
|
118
|
119
|
</Popconfirm>,
|
119
|
120
|
],
|
120
|
121
|
},
|
121
|
|
- ]
|
|
122
|
+ ];
|
122
|
123
|
|
123
|
124
|
return (
|
124
|
125
|
<Page>
|
|
@@ -130,7 +131,7 @@ export default (props) => {
|
130
|
131
|
key="1"
|
131
|
132
|
type="primary"
|
132
|
133
|
onClick={() => {
|
133
|
|
- navigate('/custom/edit')
|
|
134
|
+ navigate("/custom/edit");
|
134
|
135
|
}}
|
135
|
136
|
>
|
136
|
137
|
新增
|
|
@@ -140,5 +141,5 @@ export default (props) => {
|
140
|
141
|
columns={columns}
|
141
|
142
|
/>
|
142
|
143
|
</Page>
|
143
|
|
- )
|
144
|
|
-}
|
|
144
|
+ );
|
|
145
|
+};
|