From bead74e0b7f4fcd0c702f7bdabfadae0f1f8df4f Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Tue, 25 Feb 2025 11:48:22 +0700 Subject: [PATCH] fix: product node not updated --- src/pages/05_quotation/QuotationForm.vue | 15 ++++++++++----- src/pages/12_debit-note/FormPage.vue | 21 +++++++++++++++------ 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 1b3def41..6d14d322 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -673,6 +673,7 @@ async function triggerSelectEmployeeDialog() { } function triggerProductServiceDialog() { + covertToNode(); pageState.productServiceModal = true; } @@ -1067,11 +1068,7 @@ const productServiceNodes = ref([]); watch( () => productServiceList.value, () => { - productServiceNodes.value = quotationProductTree( - productServiceList.value, - agentPrice.value, - config.value?.vat, - ); + covertToNode(); }, ); @@ -1302,6 +1299,14 @@ async function formDownload() { a.click(); a.remove(); } + +function covertToNode() { + productServiceNodes.value = quotationProductTree( + productServiceList.value, + agentPrice.value, + config.value?.vat, + ); +}