From c472787c8fe44910e2da06ae0dbb8b3ceb5dc4ae Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 18 Jun 2024 16:41:36 +0300 Subject: [PATCH] total --- components/modal.vue | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/components/modal.vue b/components/modal.vue index 531b387..380d42e 100644 --- a/components/modal.vue +++ b/components/modal.vue @@ -91,23 +91,23 @@ const roubleSign = new Intl.NumberFormat('ru-RU', { style: 'currency', currency: 'RUB', }); -const total = computed(() => { - const { mortgage, pillar, lamella, rivets, bar, guide } = calculatorData.value - const pillar_count = (section_count.value + 1) - const pil = (parseFloat(mortgage) + parseFloat(pillar)) * pillar_count +const { mortgage, pillar, lamella, rivets, bar, guide } = calculatorData.value +const pillar_count = (section_count.value + 1) +const pil = (parseFloat(mortgage) + parseFloat(pillar)) * pillar_count - const length = fence_section.value +const length = fence_section.value - const lam_count = lamelles_count.value * section_count.value - const lam = (lam_count * length * parseFloat(lamella)) + parseFloat(rivets) +const lam_count = lamelles_count.value * section_count.value +const lam = (lam_count * length * parseFloat(lamella)) + parseFloat(rivets) - const top_count = section_count.value - const top = top_count * lamella +const top_count = section_count.value +const top = top_count * lamella - const guides_count = section_count.value * 2 - const guides = guides_count * parseFloat(guide) * lam_count * 0.115 +const guides_count = section_count.value * 2 +const guides = guides_count * parseFloat(guide) * lam_count * 0.115 - const total = (!remove_pillar.value ? pil : 0) + lam + guides + top +const total = (!remove_pillar.value ? pil : 0) + lam + guides + top +const total_txt = computed(() => { return [ !remove_pillar.value && `Столб, ${pillar_count}: (${parseFloat(mortgage)} + ${parseFloat(pillar)}) x ${pillar_count} = ${roubleSign.format(pil)}`, `Ламели, ${lam_count}: (${lam_count} x ${length} x ${lamella}) + ${rivets} = ${roubleSign.format(lam)}`, @@ -127,7 +127,7 @@ const total = computed(() => { - Итого: {{roubleSign.format(total)}} + Итого: {{ roubleSign.format(total) }}
@@ -144,7 +144,7 @@ const total = computed(() => { Цвет столба: {{ getColorNameFromRal(pillar_color) }}
Цвет ламелей: {{ getColorNameFromRal(lamelle_color) }}

- +