From 3e7755f6dc04f759d06c4f5021aee6910b747c13 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 11 Oct 2024 11:54:22 +0700 Subject: [PATCH] chore: clean --- src/pages/05_quotation/QuotationForm.vue | 40 ++++-------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index fc504de6..c278656f 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -2,17 +2,8 @@ import { useI18n } from 'vue-i18n'; import { storeToRefs } from 'pinia'; import { useQuasar } from 'quasar'; -import { useRouter } from 'vue-router'; -import { - computed, - nextTick, - onBeforeMount, - onMounted, - reactive, - ref, - watch, -} from 'vue'; -import { dialog, dialogCheckData } from 'stores/utils'; +import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue'; +import { dialogCheckData } from 'stores/utils'; import { quotationProductTree } from './utils'; // NOTE: Import stores @@ -21,7 +12,6 @@ import { useEmployeeForm } from 'src/pages/03_customer-management/form'; import useProductServiceStore from 'stores/product-service'; import { baseUrl, waitAll } from 'src/stores/utils'; import useCustomerStore from 'stores/customer'; -import useEmployeeStore from 'stores/employee'; import useOptionStore from 'stores/options'; import { useQuotationForm } from './form'; import useOcrStore from 'stores/ocr'; @@ -36,12 +26,10 @@ import { ProductGroup, Product, Service, - Work, } from 'src/stores/product-service/types'; // NOTE: Import Components import FormEmployeePassport from 'components/03_customer-management/FormEmployeePassport.vue'; -import BasicInformation from 'components/03_customer-management/employee/BasicInformation.vue'; import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa.vue'; import FormReferDocument from 'src/components/05_quotation/FormReferDocument.vue'; import { UploadFileGroup, noticeJobEmployment } from 'components/upload-file'; @@ -63,12 +51,10 @@ import ProductServiceForm from './ProductServiceForm.vue'; import QuotationFormInfo from './QuotationFormInfo.vue'; import ProfileBanner from 'components/ProfileBanner.vue'; import DialogForm from 'components/DialogForm.vue'; -import SideMenu from 'components/SideMenu.vue'; import { uploadFileListEmployee, columnsAttachment, } from 'src/pages/03_customer-management/constant'; -import { group } from 'node:console'; import { precisionRound } from 'src/utils/arithmetic'; import { useConfigStore } from 'src/stores/config'; @@ -87,18 +73,15 @@ type Node = { }; type ProductGroupId = string; -type Id = string; const configStore = useConfigStore(); const productServiceStore = useProductServiceStore(); const employeeFormStore = useEmployeeForm(); const customerStore = useCustomerStore(); const quotationForm = useQuotationForm(); -const employeeStore = useEmployeeStore(); const optionStore = useOptionStore(); -const { t, locale } = useI18n(); +const { locale } = useI18n(); const ocrStore = useOcrStore(); -const router = useRouter(); const $q = useQuasar(); const { @@ -113,10 +96,7 @@ const { data: config } = storeToRefs(configStore); const refSelectZoneEmployee = ref>(); const mrz = ref>>(); -const selectedBranchIssuer = ref(''); -const selectedCustomer = ref(''); const toggleWorker = ref(true); -const rows = ref([]); const branchId = ref(''); const currentQuotationId = ref(undefined); const date = ref(); @@ -172,7 +152,6 @@ const summaryPrice = computed(() => ), ); -const quotationNo = ref(''); const payBank = ref(''); const pageState = reactive({ @@ -197,14 +176,7 @@ const productGroup = ref([]); const { state: employeeFormState, currentFromDataEmployee } = storeToRefs(employeeFormStore); -const product = ref>({}); -const service = ref>({}); - const selectedGroupSub = ref<'product' | 'service' | null>(null); -const selectedGroup = ref(null); - -const selectedProductServiceId = ref(''); - const formDataEmployee = ref< EmployeeWorker & { attachment?: { @@ -249,7 +221,7 @@ async function assignToProductServiceList() { vat: v.vat || 0, pricePerUnit: v.pricePerUnit || 0, discount: v.discount || 0, - amount: v.discount || 0, + amount: v.amount || 0, product: v.product, work: v.work || null, service: v.service || null, @@ -623,7 +595,7 @@ watch( v-model:branch-id="branchId" v-model:customer-branch-id="quotationFormData.customerBranchId" :readonly="readonly" - @add-customer="triggerSelectTypeCustomerd()" + @add-customer="" /> @@ -824,7 +796,7 @@ watch( :class="{ 'full-height': $q.screen.gt.xs }" >