fix: installment comma input

This commit is contained in:
puriphatt 2024-10-16 11:13:34 +07:00
parent 1e503a1e43
commit b12b410b2b
3 changed files with 7 additions and 10 deletions

View file

@ -600,8 +600,8 @@ async function searchEmployee(text: string) {
<template> <template>
<div class="fullscreen column surface-0"> <div class="fullscreen column surface-0">
<div class="color-bar"> <div class="color-bar">
<div class="blue-segment"></div>
<div class="orange-segment"></div> <div class="orange-segment"></div>
<div class="yellow-segment"></div>
<div class="gray-segment"></div> <div class="gray-segment"></div>
</div> </div>
@ -1442,12 +1442,12 @@ async function searchEmployee(text: string) {
overflow: hidden; overflow: hidden;
} }
.blue-segment { .orange-segment {
background-color: var(--yellow-7); background-color: var(--yellow-7);
flex-grow: 4; flex-grow: 4;
} }
.orange-segment { .yellow-segment {
background-color: hsla(var(--yellow-7-hsl) / 0.2); background-color: hsla(var(--yellow-7-hsl) / 0.2);
flex-grow: 0.5; flex-grow: 0.5;
} }
@ -1457,8 +1457,8 @@ async function searchEmployee(text: string) {
flex-grow: 1; flex-grow: 1;
} }
.blue-segment,
.orange-segment, .orange-segment,
.yellow-segment,
.gray-segment { .gray-segment {
transform: skewX(-60deg); transform: skewX(-60deg);
} }

View file

@ -324,10 +324,6 @@ watch(
class="col-12 text-caption" class="col-12 text-caption"
style="padding-left: 20px" style="padding-left: 20px"
> >
{{ amount4Show }}
<br />
{{ paySplit.map((i) => i.amount) }}
<template v-for="(period, i) in paySplit" :key="period.no"> <template v-for="(period, i) in paySplit" :key="period.no">
<div <div
class="row app-text-muted items-center" class="row app-text-muted items-center"
@ -351,6 +347,7 @@ watch(
); );
period.amount = precisionRound(x); period.amount = precisionRound(x);
commaInput(period.amount.toString());
calculateInstallments({ calculateInstallments({
customIndex: i, customIndex: i,
@ -559,7 +556,7 @@ watch(
</div> </div>
</div> </div>
<div class="q-pa-sm row surface-2 items-center text-weight-bold"> <div class="q-pa-sm row surface-2 items-center text-weight-bold">
{{ $t('general.totalAmount') }} {{ $t('quotation.totalPriceBaht') }}
<span class="q-ml-auto" style="color: var(--brand-1)"> <span class="q-ml-auto" style="color: var(--brand-1)">
{{ formatNumberDecimal(Math.max(summaryPrice.finalPrice, 0), 2) || 0 }} {{ formatNumberDecimal(Math.max(summaryPrice.finalPrice, 0), 2) || 0 }}