| | |
| | | |
| | | const router = useRouter(); |
| | | |
| | | const eventContext = useGlobalEventContext(); |
| | | |
| | | eventContext.addEvent('serviceChargeSettle', () => { |
| | | getList(paginationState.pageIndex); |
| | | }); |
| | | |
| | | const BaseState = { |
| | | loading: true, |
| | | }; |
| | |
| | | handleEdit: handleSettleEdit, |
| | | editForm: settleEditForm, |
| | | } = useFormDialog({ |
| | | onConfirm: goSettle, |
| | | onConfirm: handleSettle, |
| | | defaultFormParams: { |
| | | id: '', |
| | | name: '', |
| | |
| | | }, |
| | | }); |
| | | |
| | | async function handleSettle() {} |
| | | |
| | | function openSettleDialog(row?) { |
| | | handleSettleEdit({ |
| | | id: row.id, |
| | | name: row.name, |
| | | count: row.count, |
| | | }); |
| | | } |
| | | |
| | | async function goSettle() { |
| | | router.push({ |
| | | name: 'ServiceChargeSettle', |
| | | params: { |
| | | id: settleEditForm.id, |
| | | }, |
| | | }); |
| | | } |
| | | |