refactor: create submitAccepted
This commit is contained in:
parent
2bd7ceca32
commit
af453c93ed
1 changed files with 23 additions and 1 deletions
|
|
@ -10,7 +10,12 @@ import { ProductTree, quotationProductTree } from './utils';
|
||||||
import { setLocale, dateFormat, calculateAge } from 'src/utils/datetime';
|
import { setLocale, dateFormat, calculateAge } from 'src/utils/datetime';
|
||||||
import { useEmployeeForm } from 'src/pages/03_customer-management/form';
|
import { useEmployeeForm } from 'src/pages/03_customer-management/form';
|
||||||
import useProductServiceStore from 'stores/product-service';
|
import useProductServiceStore from 'stores/product-service';
|
||||||
import { baseUrl, waitAll, calculateDaysUntilExpire } from 'src/stores/utils';
|
import {
|
||||||
|
baseUrl,
|
||||||
|
waitAll,
|
||||||
|
calculateDaysUntilExpire,
|
||||||
|
dialog,
|
||||||
|
} from 'src/stores/utils';
|
||||||
import useCustomerStore from 'stores/customer';
|
import useCustomerStore from 'stores/customer';
|
||||||
import useOptionStore from 'stores/options';
|
import useOptionStore from 'stores/options';
|
||||||
import { useQuotationForm } from './form';
|
import { useQuotationForm } from './form';
|
||||||
|
|
@ -260,6 +265,23 @@ async function assignToProductServiceList() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function submitAccepted(id: string) {
|
||||||
|
dialog({
|
||||||
|
color: 'info',
|
||||||
|
icon: 'mdi-account-check',
|
||||||
|
title: t('dialog.title.confirmQuotationAccept'),
|
||||||
|
actionText: t('general.confirm'),
|
||||||
|
persistent: true,
|
||||||
|
message: t('dialog.message.quotationAccept'),
|
||||||
|
action: async () => {
|
||||||
|
if (!quotationFormData.value.id) return;
|
||||||
|
|
||||||
|
const rse = await quotationForm.accepted(quotationFormData.value.id);
|
||||||
|
},
|
||||||
|
cancel: () => {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function convertDataToFormSubmit() {
|
async function convertDataToFormSubmit() {
|
||||||
quotationFormData.value.productServiceList = JSON.parse(
|
quotationFormData.value.productServiceList = JSON.parse(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue