Commit 53ad288e73cdd7fd774a55e5e94c3ffbcabd40fd
1 parent
91912481
feat: update 发票核销
Showing
4 changed files
with
20 additions
and
14 deletions
src/pages/Invoice/components/BankChooseModal.tsx
src/pages/Invoice/components/InvoiceVerificationModal.tsx
... | ... | @@ -261,6 +261,7 @@ export default ({ invoiceId, setVisible, onClose }) => { |
261 | 261 | setting: { |
262 | 262 | listsHeight: 400, |
263 | 263 | }, |
264 | + reload: false, | |
264 | 265 | }} |
265 | 266 | form={{ |
266 | 267 | // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下 |
... | ... | @@ -284,6 +285,7 @@ export default ({ invoiceId, setVisible, onClose }) => { |
284 | 285 | onClick={() => { |
285 | 286 | setBankChooseModalVisible(true); |
286 | 287 | }} |
288 | + hidden={invoiceInfo.status === 'VERIFIED'} | |
287 | 289 | type="primary" |
288 | 290 | > |
289 | 291 | 添加 | ... | ... |
src/pages/Invoice/constant.tsx
... | ... | @@ -95,12 +95,14 @@ export const BANK_STATEMENT_COLUMNS = [ |
95 | 95 | valueType: 'text', |
96 | 96 | width: 100, |
97 | 97 | hideInTable: true, |
98 | + editable: false, | |
98 | 99 | }, |
99 | 100 | { |
100 | 101 | dataIndex: 'status', |
101 | 102 | title: '状态', |
102 | 103 | valueType: 'text', |
103 | 104 | width: 100, |
105 | + editable: false, | |
104 | 106 | }, |
105 | 107 | { |
106 | 108 | dataIndex: 'serialNumber', | ... | ... |
src/pages/Invoice/index.tsx
... | ... | @@ -7,6 +7,7 @@ import { |
7 | 7 | } from '@/pages/Invoice/constant'; |
8 | 8 | import { |
9 | 9 | postServiceBankStatementDeleteBankStatement, |
10 | + postServiceBankStatementEditBankStatement, | |
10 | 11 | postServiceBankStatementQueryBankStatement, |
11 | 12 | postServiceInvoiceDeleteInvoice, |
12 | 13 | postServiceInvoiceQueryInvoice, |
... | ... | @@ -125,11 +126,12 @@ const InvoicePage = () => { |
125 | 126 | key: 'option', |
126 | 127 | fixed: 'right', |
127 | 128 | width: 120, |
128 | - render: (text, record, _, action) => [ | |
129 | + render: (text, record) => [ | |
129 | 130 | <a |
130 | 131 | key="editable" |
131 | 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 | 241 | action?.startEditable?.(record.id); |
240 | 242 | }} |
241 | 243 | > |
242 | - 核销 | |
244 | + 编辑 | |
243 | 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 | 246 | <ButtonConfirm |
256 | 247 | key="delete" |
257 | 248 | className="p-0" |
... | ... | @@ -350,6 +341,16 @@ const InvoicePage = () => { |
350 | 341 | pagination={{ |
351 | 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 | 354 | request={async (params) => { |
354 | 355 | const res = await postServiceBankStatementQueryBankStatement({ |
355 | 356 | data: { ...params }, | ... | ... |