dev #84
|
@ -109,7 +109,10 @@ const changeParametres = () => {
|
|||
}
|
||||
const calc_full_section = () => (full_sections * length) + (full_sections * fence_length) + fence_length
|
||||
let total_length_calc = calc_full_section()
|
||||
if (Math.round(total_length_mm - total_length_calc) > 0 && Math.round(total_length_mm - total_length_calc) <= fence_length) {
|
||||
if (
|
||||
Math.round(total_length_mm - total_length_calc) > 0
|
||||
&& Math.round(total_length_mm - total_length_calc) <= fence_length
|
||||
) {
|
||||
full_sections -= 1
|
||||
total_length_calc = calc_full_section()
|
||||
}
|
||||
|
@ -183,7 +186,6 @@ const calc_table = computed(() => {
|
|||
</script>
|
||||
<template>
|
||||
<div class="form">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-row form-row_picker">
|
||||
<label for="lamelle_color">Цвет ламелей</label>
|
||||
|
@ -256,7 +258,12 @@ const calc_table = computed(() => {
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<template v-if="(form_state.total_length * 1000) >= parametric.length.min">
|
||||
<p v-if="form_state.total_length * 1000 < (parametric.length.min) || form_state.full_sections == 0"
|
||||
class="text-ioprim text-sm">
|
||||
Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший
|
||||
размер, чтобы продолжить.
|
||||
</p>
|
||||
<template v-else>
|
||||
<div class="grid calc_table w-full">
|
||||
<div class="grid grid-cols-4 relative">
|
||||
<template v-for="item in calc_table">
|
||||
|
@ -269,10 +276,6 @@ const calc_table = computed(() => {
|
|||
<button @click.prevent="toggleModal">Рассчитать</button>
|
||||
</div>
|
||||
</template>
|
||||
<p v-if="form_state.total_length_mm < parametric.length.min" class="text-ioprim text-sm">
|
||||
Выбранный размер забора слишком мал для расчета стоимости. Пожалуйста, выберите больший
|
||||
размер, чтобы продолжить.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
Loading…
Reference in New Issue