From 40d0f4f2dca0915e458313f9183101508799fc40 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 23 Dec 2024 11:56:06 +0700 Subject: [PATCH] fix: quotation => handle change pay type --- src/pages/05_quotation/QuotationForm.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 4116b10f..c8aa2242 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -671,15 +671,12 @@ function triggerProductServiceDialog() { } function handleChangePayType(type: PayCondition) { - if (type === 'Full') { - quotationFormData.value.paySplitCount = 0; - } - if ( - type === 'Split' && - tempPaySplitCount.value !== undefined && - tempPaySplit.value && - tempTableProduct.value + type === 'Split' || + (type === 'Full' && + tempPaySplitCount.value !== undefined && + tempPaySplit.value && + tempTableProduct.value) ) { quotationFormData.value.paySplitCount = tempPaySplitCount.value; quotationFormData.value.paySplit = JSON.parse(