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';
|
// customerFormState.value.dialogType = 'info';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function triggerDialogDeleteQuottaion(id: string) {
|
||||||
|
quotationFormStore.dialogDelete(async () => {
|
||||||
|
await quotationStore.deleteQuottaion(id);
|
||||||
|
await fetchQuotationList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function triggerCreateCustomerd(opts: { type: 'CORP' | 'PERS' }) {
|
function triggerCreateCustomerd(opts: { type: 'CORP' | 'PERS' }) {
|
||||||
setDefaultCustomerd();
|
setDefaultCustomerd();
|
||||||
customerFormState.value.dialogType = 'create';
|
customerFormState.value.dialogType = 'create';
|
||||||
|
|
@ -610,7 +617,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
||||||
@edit="quotationFormStore.assignFormData(v.id, 'edit')"
|
@edit="quotationFormStore.assignFormData(v.id, 'edit')"
|
||||||
@link="console.log('link')"
|
@link="console.log('link')"
|
||||||
@upload="console.log('upload')"
|
@upload="console.log('upload')"
|
||||||
@delete="console.log('delete')"
|
@delete="triggerDialogDeleteQuottaion(v.id)"
|
||||||
@change-status="console.log('change')"
|
@change-status="console.log('change')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
||||||
persistent: true,
|
persistent: true,
|
||||||
message: t('dialog.message.confirmDelete'),
|
message: t('dialog.message.confirmDelete'),
|
||||||
action: async () => {
|
action: async () => {
|
||||||
callback;
|
callback();
|
||||||
},
|
},
|
||||||
cancel: () => {},
|
cancel: () => {},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue