From c452f8b9156fe6ee579215201bee955700c2abdc Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Fri, 4 Oct 2024 14:39:05 +0700 Subject: [PATCH] feat: add agent price --- src/pages/05_quotation/MainPage.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index 8c3f15d8..e1dd8faf 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -90,6 +90,7 @@ const { state: employeeFormState, currentFromDataEmployee } = const { currentMyBranch } = storeToRefs(userBranch); const branchId = ref(''); +const agentPrice = ref(false); const currentCustomerId = ref(); const refreshImageState = ref(false); const emptyCreateDialog = ref(false); @@ -354,10 +355,16 @@ function triggerAddQuotationDialog() { } function triggerQuotationDialog() { - window.open( - `/quotation/add-quotation?branchId=${branchId.value}&customerBranchId=${quotationFormData.value.customerBranchId}&date=${Date.now()}`, - '_blank', - ); + const params = new URLSearchParams(); + + params.set('branchId', branchId.value); + params.set('customerBranchId', branchId.value); + params.set('date', Date.now().toString()); + params.set('agentPrice', agentPrice.value.toString()); + + const query = params.toString(); + + window.open(`/quotation/add-quotation?${query}`, '_blank'); // TODO: form and state controll } @@ -863,6 +870,7 @@ watch(() => pageState.currentTab, fetchQuotationList); on-create v-model:branch-id="branchId" v-model:customer-branch-id="quotationFormData.customerBranchId" + v-model:agent-price="agentPrice" @add-customer="triggerSelectTypeCustomerd()" />