Commit 282e97f12baea46f1b3f31bbad427c11c7daff5b
1 parent
3c481d51
feat: update 发票对账
Showing
2 changed files
with
22 additions
and
12 deletions
src/pages/Invoice/components/BankImportModal.tsx
@@ -15,7 +15,8 @@ export default ({ setVisible, onClose }) => { | @@ -15,7 +15,8 @@ export default ({ setVisible, onClose }) => { | ||
15 | setFileList(newFileList); | 15 | setFileList(newFileList); |
16 | 16 | ||
17 | const [messageApi] = message.useMessage(); | 17 | const [messageApi] = message.useMessage(); |
18 | - const [setUploading] = useState(false); | 18 | + const [uploadLoading, setUploading] = useState(false); |
19 | + console.log(uploadLoading); | ||
19 | 20 | ||
20 | const exportLoading = (content: string) => { | 21 | const exportLoading = (content: string) => { |
21 | messageApi.open({ | 22 | messageApi.open({ |
src/pages/Invoice/index.tsx
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | ||
1 | import { INVOICE_COLUMNS, INVOICE_STATUS } from '@/pages/Invoice/constant'; | 2 | import { INVOICE_COLUMNS, INVOICE_STATUS } from '@/pages/Invoice/constant'; |
2 | -import { postServiceInvoiceQueryInvoice } from '@/services'; | 3 | +import { |
4 | + postServiceInvoiceDeleteInvoice, | ||
5 | + postServiceInvoiceQueryInvoice, | ||
6 | +} from '@/services'; | ||
3 | import { enumValueToLabel, formatDateTime } from '@/utils'; | 7 | import { enumValueToLabel, formatDateTime } from '@/utils'; |
4 | import { formatDate } from '@/utils/time'; | 8 | import { formatDate } from '@/utils/time'; |
5 | import { getUserInfo } from '@/utils/user'; | 9 | import { getUserInfo } from '@/utils/user'; |
@@ -9,8 +13,7 @@ import { | @@ -9,8 +13,7 @@ import { | ||
9 | PageContainer, | 13 | PageContainer, |
10 | ProTable, | 14 | ProTable, |
11 | } from '@ant-design/pro-components'; | 15 | } from '@ant-design/pro-components'; |
12 | -import { history } from '@umijs/max'; | ||
13 | -import { Avatar, Button, Dropdown, Tabs, Tag } from 'antd'; | 16 | +import { Avatar, Button, Dropdown, Tabs, Tag, message } from 'antd'; |
14 | import { useRef, useState } from 'react'; | 17 | import { useRef, useState } from 'react'; |
15 | import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant'; | 18 | import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant'; |
16 | import BankImportModal from './components/BankImportModal'; | 19 | import BankImportModal from './components/BankImportModal'; |
@@ -131,14 +134,20 @@ const InvoicePage = () => { | @@ -131,14 +134,20 @@ const InvoicePage = () => { | ||
131 | > | 134 | > |
132 | 查看 | 135 | 查看 |
133 | </a>, | 136 | </a>, |
134 | - <a | ||
135 | - href={record.url} | ||
136 | - target="_blank" | ||
137 | - rel="noopener noreferrer" | ||
138 | - key="view2" | ||
139 | - > | ||
140 | - 删除 | ||
141 | - </a>, | 137 | + <ButtonConfirm |
138 | + key="delete" | ||
139 | + className="p-0" | ||
140 | + title="确认删除?" | ||
141 | + text="删除" | ||
142 | + onConfirm={async () => { | ||
143 | + let res = await postServiceInvoiceDeleteInvoice({ | ||
144 | + data: { invoiceId: record.id }, | ||
145 | + }); | ||
146 | + if (res) { | ||
147 | + message.success(res.message); | ||
148 | + } | ||
149 | + }} | ||
150 | + />, | ||
142 | ], | 151 | ], |
143 | }); | 152 | }); |
144 | 153 |