total
This commit is contained in:
parent
745444dafc
commit
c472787c8f
|
@ -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(() => {
|
|||
<input type="text" placeholder="Ваше имя" v-model="modal_data.name" @keyup="validate" />
|
||||
<input type="phone" placeholder="Номер телефона или e-mail" v-model="modal_data.phone"
|
||||
@keypress="validateInput" @keyup="validate" />
|
||||
Итого: {{roubleSign.format(total)}}
|
||||
Итого: {{ roubleSign.format(total) }}
|
||||
<div class="flex gap-4">
|
||||
<button class="not-prose" :disabled="modal_form.disabled" type="submit">Отправить</button>
|
||||
<button class="not-prose" type="reset" @click="toggleModal">Отмена</button>
|
||||
|
@ -144,7 +144,7 @@ const total = computed(() => {
|
|||
Цвет столба: {{ getColorNameFromRal(pillar_color) }}<br />
|
||||
Цвет ламелей: {{ getColorNameFromRal(lamelle_color) }}</p>
|
||||
<p>
|
||||
<template v-for="i in total">{{ i }}<br /></template>
|
||||
<template v-for="i in total_txt">{{ i }}<br /></template>
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex gap-4">
|
||||
|
|
Loading…
Reference in New Issue