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()" />