Merge branch 'bx-696-startproject' of https://git.svs-tech.pro/ksenia_mikhailova/mns-mini-zabor into bx-696-startproject

This commit is contained in:
commit 090eb1ae7c
2 changed files with 12 additions and 7 deletions

View File

@ -50,7 +50,7 @@ const form_refs = {
}
const changeParametres = () => {
if(form_state.total_length * 1000 < parametric.length.min) {
if (form_state.total_length * 1000 < parametric.length.min) {
return
}
const lamelles = Math.floor(form_state.height / parametric.height.step)
@ -196,7 +196,8 @@ const plurals = {
Забор общей длиной {{ form_state.total_length }}{{ '\xa0' }}м,
{{ section_count }}
<Plural :n="section_count" :forms="plurals.section" /> по
{{ parseInt(form_state.length).toFixed(2) }}{{ '\xa0' }}мм<template v-if="form_state.extra_section">
{{ parseInt(form_state.length).toFixed(2) }}{{ '\xa0' }}мм<template
v-if="form_state.extra_section">
и 1 дополнительная секция длиной {{ form_state.extra_section.toFixed(2) }}{{ '\xa0'
}}мм</template>.
</p>
@ -207,8 +208,9 @@ const plurals = {
</template>
{{ section_count * lamelles_count }}
<Plural :n="section_count * lamelles_count" :forms="plurals.lamelle" />
{{ `длиной ${parseInt(form_state.length).toFixed(2)}\xa0мм` }}<template v-if="form_state.extra_section">и
{{ ~~(!!form_state.extra_section.toFixed(2)) * lamelles_count }}
{{ `длиной ${parseInt(form_state.length).toFixed(2)}\xa0мм` }} <template
v-if="form_state.extra_section">
{{ `и ${~~(!!form_state.extra_section.toFixed(2)) * lamelles_count}` }}
<Plural :n="~~(!!form_state.extra_section) * lamelles_count" :forms="plurals.lamelle" />
{{ `длиной ${form_state.extra_section}\xa0мм` }}
</template>.

View File

@ -104,13 +104,16 @@ const total = computed(() => {
const top_count = section_count.value
const top = top_count * lamella
const guides_count = section_count.value
const guides = guides_count * parseFloat(guide) * lam_count * 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
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)}`,
`Направляющая, ${guides_count}: ${guides_count} x ${guide} x ${lam_count} x 115 = ${roubleSign.format(guides)}`,
`Направляющая, ${guides_count}: ${guides_count} x ${guide} x ${lam_count} x 0.115 = ${roubleSign.format(guides)}`,
`Верхняя планка, ${top_count}: ${top_count} x ${length} x ${bar} = ${roubleSign.format(top)}`,
`Итого ${roubleSign.format(total)}`
].filter(Boolean)
})