Commit 9ce0616ea53ca4797ea27d52504921449676e6ff
1 parent
783497cd
feat: update 发票对账
Showing
3 changed files
with
62 additions
and
39 deletions
src/pages/Invoice/components/BankImportModal.tsx
@@ -127,7 +127,7 @@ export default ({ setVisible, onClose }) => { | @@ -127,7 +127,7 @@ export default ({ setVisible, onClose }) => { | ||
127 | }> | 127 | }> |
128 | width={500} | 128 | width={500} |
129 | open | 129 | open |
130 | - title="标题" | 130 | + title="银行流水导入" |
131 | form={form} | 131 | form={form} |
132 | autoFocusFirstInput | 132 | autoFocusFirstInput |
133 | modalProps={{ | 133 | modalProps={{ |
src/pages/Invoice/components/InvoiceVerificationModal.tsx
@@ -261,12 +261,17 @@ export default ({ invoiceId, setVisible, onClose }) => { | @@ -261,12 +261,17 @@ export default ({ invoiceId, setVisible, onClose }) => { | ||
261 | autoFocusFirstInput | 261 | autoFocusFirstInput |
262 | modalProps={{ | 262 | modalProps={{ |
263 | okText: '确定', | 263 | okText: '确定', |
264 | - cancelText: '取消', | 264 | + cancelText: '返回', |
265 | destroyOnClose: true, | 265 | destroyOnClose: true, |
266 | onCancel: () => { | 266 | onCancel: () => { |
267 | setVisible(false); | 267 | setVisible(false); |
268 | }, | 268 | }, |
269 | }} | 269 | }} |
270 | + submitter={{ | ||
271 | + render: (props, defaultDoms) => { | ||
272 | + return [defaultDoms[0]]; | ||
273 | + }, | ||
274 | + }} | ||
270 | onFinish={async () => { | 275 | onFinish={async () => { |
271 | onClose(); | 276 | onClose(); |
272 | }} | 277 | }} |
src/pages/Invoice/index.tsx
@@ -127,43 +127,61 @@ const InvoicePage = () => { | @@ -127,43 +127,61 @@ const InvoicePage = () => { | ||
127 | key: 'option', | 127 | key: 'option', |
128 | fixed: 'right', | 128 | fixed: 'right', |
129 | width: 120, | 129 | width: 120, |
130 | - render: (text, record) => [ | ||
131 | - <a | ||
132 | - key="editable" | ||
133 | - onClick={() => { | ||
134 | - setInvoiceVerificationVisible(true); | ||
135 | - setInvoiceId(record.invoiceId); | ||
136 | - }} | ||
137 | - > | ||
138 | - 核销 | ||
139 | - </a>, | ||
140 | - <Button | ||
141 | - className="p-0" | ||
142 | - key="view" | ||
143 | - type="link" | ||
144 | - onClick={() => { | ||
145 | - setInvoiceVerificationVisible(true); | ||
146 | - setInvoiceId(record.invoiceId); | ||
147 | - }} | ||
148 | - > | ||
149 | - 查看 | ||
150 | - </Button>, | ||
151 | - <ButtonConfirm | ||
152 | - key="delete" | ||
153 | - className="p-0" | ||
154 | - title={'确认删除发票号码为[ ' + record.invoiceNumber + ' ]的发票吗?'} | ||
155 | - text="删除" | ||
156 | - onConfirm={async () => { | ||
157 | - let res = await postServiceInvoiceDeleteInvoice({ | ||
158 | - data: { invoiceId: record.invoiceId }, | ||
159 | - }); | ||
160 | - if (res) { | ||
161 | - message.success(res.message); | ||
162 | - reloadInvoiceTable(); | ||
163 | - } | ||
164 | - }} | ||
165 | - />, | ||
166 | - ], | 130 | + render: (text, record) => { |
131 | + let btns = []; | ||
132 | + if (record.path?.includes('writeOff')) { | ||
133 | + btns.push( | ||
134 | + <a | ||
135 | + key="editable" | ||
136 | + onClick={() => { | ||
137 | + setInvoiceVerificationVisible(true); | ||
138 | + setInvoiceId(record.invoiceId); | ||
139 | + }} | ||
140 | + > | ||
141 | + 核销 | ||
142 | + </a>, | ||
143 | + ); | ||
144 | + } | ||
145 | + | ||
146 | + if (record.path?.includes('queryInvoiceDetails')) { | ||
147 | + btns.push( | ||
148 | + <Button | ||
149 | + className="p-0" | ||
150 | + key="view" | ||
151 | + type="link" | ||
152 | + onClick={() => { | ||
153 | + setInvoiceVerificationVisible(true); | ||
154 | + setInvoiceId(record.invoiceId); | ||
155 | + }} | ||
156 | + > | ||
157 | + 查看 | ||
158 | + </Button>, | ||
159 | + ); | ||
160 | + } | ||
161 | + | ||
162 | + if (record.path?.includes('deleteInvoice')) { | ||
163 | + btns.push( | ||
164 | + <ButtonConfirm | ||
165 | + key="delete" | ||
166 | + className="p-0" | ||
167 | + title={ | ||
168 | + '确认删除发票号码为[ ' + record.invoiceNumber + ' ]的发票吗?' | ||
169 | + } | ||
170 | + text="删除" | ||
171 | + onConfirm={async () => { | ||
172 | + let res = await postServiceInvoiceDeleteInvoice({ | ||
173 | + data: { invoiceId: record.invoiceId }, | ||
174 | + }); | ||
175 | + if (res) { | ||
176 | + message.success(res.message); | ||
177 | + reloadInvoiceTable(); | ||
178 | + } | ||
179 | + }} | ||
180 | + />, | ||
181 | + ); | ||
182 | + } | ||
183 | + return btns; | ||
184 | + }, | ||
167 | }); | 185 | }); |
168 | 186 | ||
169 | return columns; | 187 | return columns; |