refactor: delete quotation
This commit is contained in:
parent
30c78ef269
commit
978c338ca4
2 changed files with 9 additions and 2 deletions
|
|
@ -198,6 +198,13 @@ async function submitCustomer() {
|
|||
// customerFormState.value.dialogType = 'info';
|
||||
}
|
||||
|
||||
async function triggerDialogDeleteQuottaion(id: string) {
|
||||
quotationFormStore.dialogDelete(async () => {
|
||||
await quotationStore.deleteQuottaion(id);
|
||||
await fetchQuotationList();
|
||||
});
|
||||
}
|
||||
|
||||
function triggerCreateCustomerd(opts: { type: 'CORP' | 'PERS' }) {
|
||||
setDefaultCustomerd();
|
||||
customerFormState.value.dialogType = 'create';
|
||||
|
|
@ -610,7 +617,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
|||
@edit="quotationFormStore.assignFormData(v.id, 'edit')"
|
||||
@link="console.log('link')"
|
||||
@upload="console.log('upload')"
|
||||
@delete="console.log('delete')"
|
||||
@delete="triggerDialogDeleteQuottaion(v.id)"
|
||||
@change-status="console.log('change')"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
persistent: true,
|
||||
message: t('dialog.message.confirmDelete'),
|
||||
action: async () => {
|
||||
callback;
|
||||
callback();
|
||||
},
|
||||
cancel: () => {},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue