Commit 282e97f12baea46f1b3f31bbad427c11c7daff5b

Authored by zhongnanhuang
1 parent 3c481d51

feat: update 发票对账

src/pages/Invoice/components/BankImportModal.tsx
... ... @@ -15,7 +15,8 @@ export default ({ setVisible, onClose }) => {
15 15 setFileList(newFileList);
16 16  
17 17 const [messageApi] = message.useMessage();
18   - const [setUploading] = useState(false);
  18 + const [uploadLoading, setUploading] = useState(false);
  19 + console.log(uploadLoading);
19 20  
20 21 const exportLoading = (content: string) => {
21 22 messageApi.open({
... ...
src/pages/Invoice/index.tsx
  1 +import ButtonConfirm from '@/components/ButtomConfirm';
1 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 7 import { enumValueToLabel, formatDateTime } from '@/utils';
4 8 import { formatDate } from '@/utils/time';
5 9 import { getUserInfo } from '@/utils/user';
... ... @@ -9,8 +13,7 @@ import {
9 13 PageContainer,
10 14 ProTable,
11 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 17 import { useRef, useState } from 'react';
15 18 import { INVOCING_STATUS, PAYEE_OPTIONS } from '../Order/constant';
16 19 import BankImportModal from './components/BankImportModal';
... ... @@ -131,14 +134,20 @@ const InvoicePage = () => {
131 134 >
132 135 查看
133 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  
... ...