diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index dabe88dd..fd7d1d95 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -705,7 +705,7 @@ function handleUpdateProductTable( newInstallmentNo: number; }, ) { - handleChangePayType(quotationFormData.value.payCondition); + // handleChangePayType(quotationFormData.value.payCondition); // calc price const calc = (c: QuotationPayload['productServiceList'][number]) => { const originalPrice = c.pricePerUnit || 0; diff --git a/src/pages/05_quotation/QuotationFormInfo.vue b/src/pages/05_quotation/QuotationFormInfo.vue index daa997c3..d0ae7e2e 100644 --- a/src/pages/05_quotation/QuotationFormInfo.vue +++ b/src/pages/05_quotation/QuotationFormInfo.vue @@ -145,7 +145,17 @@ function calculateInstallments(param: { // }); if (param.newCount === param.oldCount) { if (param.customIndex !== undefined && param.customAmount !== undefined) { - paySplit.value[param.customIndex].amount = param.customAmount; + // paySplit.value[param.customIndex].amount = param.customAmount; + paySplit.value[param.customIndex].amount = Number( + amount4Show.value[param.customIndex]?.replace(/,/g, ''), + ); + if (paySplit.value[param.customIndex].amount % 1 === 0) { + const [, dec] = amount4Show.value[param.customIndex].split('.'); + if (!dec) { + amount4Show.value[param.customIndex] += '.00'; + } + } + // amount4Show.value[param.customIndex] = param.customAmount.toString(); } } @@ -191,6 +201,7 @@ watch( commaInput(payment.amount.toString()), ); }, + { deep: true }, ); @@ -322,16 +333,6 @@ watch( amount4Show[i] += '.00'; } } - } - " - @update:model-value=" - (v) => { - if (readonly) return; - - amount4Show[i] = commaInput( - v?.toString() || '0', - 'string', - ); calculateInstallments({ customIndex: i, @@ -353,6 +354,16 @@ watch( } } " + @update:model-value=" + (v) => { + if (readonly) return; + + amount4Show[i] = commaInput( + v?.toString() || '0', + 'string', + ); + } + " >