From 5c3c8f3d6aa5b4406fe2ffd472b8c7ee4c468c10 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 23 Dec 2024 09:40:47 +0700 Subject: [PATCH] fix: quotation => handle change pay type --- src/pages/05_quotation/QuotationForm.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 504a19f3..f34b4e0e 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -732,6 +732,10 @@ function triggerProductServiceDialog() { } function handleChangePayType(type: PayCondition) { + if (type === 'Full') { + quotationFormData.value.paySplitCount = 0; + } + if ( type === 'Split' && tempPaySplitCount.value !== undefined && @@ -750,7 +754,10 @@ function handleChangePayType(type: PayCondition) { if (type === 'SplitCustom') { quotationFormData.value.paySplitCount = 1; - quotationFormData.value.paySplit.push({ no: Number(1), amount: 0 }); + if (tempPaySplit.value.length === 0) { + quotationFormData.value.paySplit = []; + quotationFormData.value.paySplit.push({ no: Number(1), amount: 0 }); + } } } @@ -1269,7 +1276,6 @@ watch( () => quotationFormState.value.inputSearchRequest, ], () => { - console.log('asdasd'); fetchRequest(); }, );