total
This commit is contained in:
parent
c63b1a471f
commit
cf8908772e
|
@ -50,7 +50,7 @@ const form_refs = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeParametres = () => {
|
const changeParametres = () => {
|
||||||
if(form_state.total_length * 1000 < parametric.length.min) {
|
if (form_state.total_length * 1000 < parametric.length.min) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const lamelles = Math.floor(form_state.height / parametric.height.step)
|
const lamelles = Math.floor(form_state.height / parametric.height.step)
|
||||||
|
@ -196,7 +196,8 @@ const plurals = {
|
||||||
Забор общей длиной {{ form_state.total_length }}{{ '\xa0' }}м,
|
Забор общей длиной {{ form_state.total_length }}{{ '\xa0' }}м,
|
||||||
{{ section_count }}
|
{{ section_count }}
|
||||||
<Plural :n="section_count" :forms="plurals.section" /> по
|
<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'
|
и 1 дополнительная секция длиной {{ form_state.extra_section.toFixed(2) }}{{ '\xa0'
|
||||||
}}мм</template>.
|
}}мм</template>.
|
||||||
</p>
|
</p>
|
||||||
|
@ -207,8 +208,9 @@ const plurals = {
|
||||||
</template>
|
</template>
|
||||||
{{ section_count * lamelles_count }}
|
{{ section_count * lamelles_count }}
|
||||||
<Plural :n="section_count * lamelles_count" :forms="plurals.lamelle" />
|
<Plural :n="section_count * lamelles_count" :forms="plurals.lamelle" />
|
||||||
{{ `длиной ${parseInt(form_state.length).toFixed(2)}\xa0мм` }}<template v-if="form_state.extra_section">и
|
{{ `длиной ${parseInt(form_state.length).toFixed(2)}\xa0мм` }} <template
|
||||||
{{ ~~(!!form_state.extra_section.toFixed(2)) * lamelles_count }}
|
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" />
|
<Plural :n="~~(!!form_state.extra_section) * lamelles_count" :forms="plurals.lamelle" />
|
||||||
{{ `длиной ${form_state.extra_section}\xa0мм` }}
|
{{ `длиной ${form_state.extra_section}\xa0мм` }}
|
||||||
</template>.
|
</template>.
|
||||||
|
|
|
@ -104,13 +104,16 @@ const total = computed(() => {
|
||||||
const top_count = section_count.value
|
const top_count = section_count.value
|
||||||
const top = top_count * lamella
|
const top = top_count * lamella
|
||||||
|
|
||||||
const guides_count = section_count.value
|
const guides_count = section_count.value * 2
|
||||||
const guides = guides_count * parseFloat(guide) * lam_count * 115
|
const guides = guides_count * parseFloat(guide) * lam_count * 0.115
|
||||||
|
|
||||||
|
const total = (!remove_pillar.value ? pil : 0) + lam + guides + top
|
||||||
return [
|
return [
|
||||||
!remove_pillar.value && `Столб, ${pillar_count}: (${parseFloat(mortgage)} + ${parseFloat(pillar)}) x ${pillar_count} = ${roubleSign.format(pil)}`,
|
!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)}`,
|
`Ламели, ${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)}`,
|
`Верхняя планка, ${top_count}: ${top_count} x ${length} x ${bar} = ${roubleSign.format(top)}`,
|
||||||
|
`Итого ${roubleSign.format(total)}`
|
||||||
].filter(Boolean)
|
].filter(Boolean)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue