Commit 53ad288e73cdd7fd774a55e5e94c3ffbcabd40fd
1 parent
91912481
feat: update 发票核销
Showing
4 changed files
with
20 additions
and
14 deletions
src/pages/Invoice/components/BankChooseModal.tsx
@@ -264,6 +264,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | @@ -264,6 +264,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | ||
264 | }; | 264 | }; |
265 | 265 | ||
266 | useEffect(() => { | 266 | useEffect(() => { |
267 | + formRef.current?.setFieldValue('status', 'ABNORMAL'); | ||
267 | loadBankData({ current: page, pageSize: pageSize }); | 268 | loadBankData({ current: page, pageSize: pageSize }); |
268 | }, []); | 269 | }, []); |
269 | 270 |
src/pages/Invoice/components/InvoiceVerificationModal.tsx
@@ -261,6 +261,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | @@ -261,6 +261,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | ||
261 | setting: { | 261 | setting: { |
262 | listsHeight: 400, | 262 | listsHeight: 400, |
263 | }, | 263 | }, |
264 | + reload: false, | ||
264 | }} | 265 | }} |
265 | form={{ | 266 | form={{ |
266 | // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下 | 267 | // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下 |
@@ -284,6 +285,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | @@ -284,6 +285,7 @@ export default ({ invoiceId, setVisible, onClose }) => { | ||
284 | onClick={() => { | 285 | onClick={() => { |
285 | setBankChooseModalVisible(true); | 286 | setBankChooseModalVisible(true); |
286 | }} | 287 | }} |
288 | + hidden={invoiceInfo.status === 'VERIFIED'} | ||
287 | type="primary" | 289 | type="primary" |
288 | > | 290 | > |
289 | 添加 | 291 | 添加 |
src/pages/Invoice/constant.tsx
@@ -95,12 +95,14 @@ export const BANK_STATEMENT_COLUMNS = [ | @@ -95,12 +95,14 @@ export const BANK_STATEMENT_COLUMNS = [ | ||
95 | valueType: 'text', | 95 | valueType: 'text', |
96 | width: 100, | 96 | width: 100, |
97 | hideInTable: true, | 97 | hideInTable: true, |
98 | + editable: false, | ||
98 | }, | 99 | }, |
99 | { | 100 | { |
100 | dataIndex: 'status', | 101 | dataIndex: 'status', |
101 | title: '状态', | 102 | title: '状态', |
102 | valueType: 'text', | 103 | valueType: 'text', |
103 | width: 100, | 104 | width: 100, |
105 | + editable: false, | ||
104 | }, | 106 | }, |
105 | { | 107 | { |
106 | dataIndex: 'serialNumber', | 108 | dataIndex: 'serialNumber', |
src/pages/Invoice/index.tsx
@@ -7,6 +7,7 @@ import { | @@ -7,6 +7,7 @@ import { | ||
7 | } from '@/pages/Invoice/constant'; | 7 | } from '@/pages/Invoice/constant'; |
8 | import { | 8 | import { |
9 | postServiceBankStatementDeleteBankStatement, | 9 | postServiceBankStatementDeleteBankStatement, |
10 | + postServiceBankStatementEditBankStatement, | ||
10 | postServiceBankStatementQueryBankStatement, | 11 | postServiceBankStatementQueryBankStatement, |
11 | postServiceInvoiceDeleteInvoice, | 12 | postServiceInvoiceDeleteInvoice, |
12 | postServiceInvoiceQueryInvoice, | 13 | postServiceInvoiceQueryInvoice, |
@@ -125,11 +126,12 @@ const InvoicePage = () => { | @@ -125,11 +126,12 @@ const InvoicePage = () => { | ||
125 | key: 'option', | 126 | key: 'option', |
126 | fixed: 'right', | 127 | fixed: 'right', |
127 | width: 120, | 128 | width: 120, |
128 | - render: (text, record, _, action) => [ | 129 | + render: (text, record) => [ |
129 | <a | 130 | <a |
130 | key="editable" | 131 | key="editable" |
131 | onClick={() => { | 132 | onClick={() => { |
132 | - action?.startEditable?.(record.id); | 133 | + setInvoiceVerificationVisible(true); |
134 | + setInvoiceId(record.id); | ||
133 | }} | 135 | }} |
134 | > | 136 | > |
135 | 核销 | 137 | 核销 |
@@ -239,19 +241,8 @@ const InvoicePage = () => { | @@ -239,19 +241,8 @@ const InvoicePage = () => { | ||
239 | action?.startEditable?.(record.id); | 241 | action?.startEditable?.(record.id); |
240 | }} | 242 | }} |
241 | > | 243 | > |
242 | - 核销 | 244 | + 编辑 |
243 | </a>, | 245 | </a>, |
244 | - <Button | ||
245 | - className="p-0" | ||
246 | - key="view" | ||
247 | - type="link" | ||
248 | - onClick={() => { | ||
249 | - setInvoiceVerificationVisible(true); | ||
250 | - setInvoiceId(record.id); | ||
251 | - }} | ||
252 | - > | ||
253 | - 查看 | ||
254 | - </Button>, | ||
255 | <ButtonConfirm | 246 | <ButtonConfirm |
256 | key="delete" | 247 | key="delete" |
257 | className="p-0" | 248 | className="p-0" |
@@ -350,6 +341,16 @@ const InvoicePage = () => { | @@ -350,6 +341,16 @@ const InvoicePage = () => { | ||
350 | pagination={{ | 341 | pagination={{ |
351 | pageSize: 10, | 342 | pageSize: 10, |
352 | }} | 343 | }} |
344 | + editable={{ | ||
345 | + type: 'multiple', | ||
346 | + onSave: async (rowKey, data) => { | ||
347 | + await postServiceBankStatementEditBankStatement({ data: data }); | ||
348 | + }, | ||
349 | + actionRender: (row, config, defaultDom) => [ | ||
350 | + defaultDom.save, | ||
351 | + defaultDom.cancel, | ||
352 | + ], | ||
353 | + }} | ||
353 | request={async (params) => { | 354 | request={async (params) => { |
354 | const res = await postServiceBankStatementQueryBankStatement({ | 355 | const res = await postServiceBankStatementQueryBankStatement({ |
355 | data: { ...params }, | 356 | data: { ...params }, |