Расчет кухонного гарнитура
Узнайте точную стоимость Кухни за 1 минуту и получите гарантированный подарок
3. Укажите размеры в метрах
ОТПРАВИТЬ ЗАЯВКУ
Монтаж и доставка в стоимость не входит

<script>
$( document ).ready(function() {
    
//Ввод только цифр и точек в поля ввода    
$(document).on('input', '.uc-kitchen-calc .slaveform  input[type="text"]', function(){
	this.value = this.value.replace(/[^0-9\.]/g, '');
});    
    
    
setTimeout(function(){  
   $('input[name="kitchen-price"]').val('0 руб');
}, 1500);



function divideNumberByPieces(x, delimiter) {
  return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, delimiter || " ");
};

//Отслеживаем изменения в калькуляторе
$(document).on('input change', '.uc-kitchen-calc .slaveform  input', function(){
	
	//Получаем форму кухни
	let formIndex = $('input[name="kitchen-form"]').index( $('input[name="kitchen-form"]:checked') );
	
	//Получаем стиль
	let styleIndex = $('input[name="kitchen-form"]').index( $('input[name="kitchen-form"]:checked') );
	
	//Получаем размеры
	let sideA = +$('input[name="side-a"]').val();
	let sideB = +$('input[name="side-b"]').val();
	let sideC = +$('input[name="side-c"]').val();
	let sideD = +$('input[name="side-d"]').val();
	let sideF = +$('input[name="side-f"]').val();
	let sideE = +$('input[name="side-e"]').val();
	
	//Получаем высоту верхних модулей
	let upperIndex = $('input[name="kitchen-upper-module"]').index( $('input[name="kitchen-upper-module"]:checked') );
	
	//Если Стандартная высота 72см (дешевле)
	if(upperIndex==0) upperIndex = 100;
	//Если Высота 92 см
	if(upperIndex==1) upperIndex = 105;
	//Если Под потолок (рекомендуем)
	if(upperIndex==2) upperIndex = 120;
	//Если Под потолок с глубокими антресолями
	if(upperIndex==3) upperIndex = 120;
	
	//Получаем материал фасадов
	let materialIndex = $('input[name="kitchen-material"]').index( $('input[name="kitchen-material"]:checked') );
	//Если ЛДСП
	if(materialIndex==0) materialIndex = 34000;
	//Если МДФ пленка
	if(materialIndex==1) materialIndex = 44000;
	//Если МДФ краска
	if(materialIndex==2) materialIndex = 52980;
	//Если МДФ пластик
	if(materialIndex==3) materialIndex = 64690;
	
	let summ = (sideA+sideC+sideF)*materialIndex*(upperIndex/100);

    summ = +summ.toFixed();

    if(summ>1000){
        $('input[name="kitchen-price"]').val(divideNumberByPieces(summ)+' руб');
    };

});    
    
    
let formID='';
//При клике на нашу кнопку
$('.sendform').click(function(e) {e.preventDefault();
    formID = '#' + $(this).closest('.t-rec').attr('id');
    let fullinput=true;   
    $('.t-input-group').removeClass('js-error-control-box');
    $(formID).find('.js-tilda-rule[data-tilda-req="1"]').each(function() {
        
        if($(this).val()==''){$(this).closest('form').find('.t-submit').click(); 

            fullinput=false; 
            return false;
            
        };
    }); 
    if(fullinput){
    $(formID).find('input[type="radio"][data-tilda-req="1"].js-tilda-rule').closest('.t-input-block').each(function() {
    if(!$(this).find('input[type="radio"]').is(':checked')){$(this).closest('form').find('.t-submit').click();

    fullinput=false; return false;  
    };});};
    if(fullinput){
    $(formID).find('input[type="checkbox"][data-tilda-req="1"].js-tilda-rule').each(function() {
    if (!$(this).is(':checked')){ $(this).closest('form').find('.t-submit').click(); 

    fullinput=false; return false;};
    });};
    
    if(fullinput){
        $(formID).find('.slaveform').each(function(){
            $(this).find('.t-input-group').each(function(){
                $(this).addClass('hide-input-mode');
                $(this).clone().appendTo(formID+" .mainform .t-form__inputsbox");   
                if( $(this).hasClass('t-input-group_sb') ){
                    let selectName = $(this).find('select').attr('name');
                    $(formID+' .mainform select[name="'+selectName+'"]').val( $(formID+' .slaveform select[name="'+selectName+'"]').val() );
                };
            });
        });
    //Отправляем данные основной формы       
    setTimeout(function(){  $(formID).find('.mainform .t-submit').click() }, 500);
    };
});
$(formID+' .mainform').delegate(".t-submit", "click", function(){
    setTimeout(function(){
        if ( $(formID+' .mainform .t-form').hasClass("js-send-form-success")){
            $(formID+' .mainform .hide-input-mode').remove();
            $(formID+' .slaveform select option:first').prop('selected', true);
            $(formID+' input').prop('checked', false);
            let recID = formID.replace(/[^0-9]/g, '');t396_init(recID);
        };
    }, 1000);
});    
$(document).on("keydown", ".t-form", function(event) {return event.key != "Enter";});
});
</script>


<style>

.uc-kitchen-calc .t-img-select__container {
    display: flex;
}

.uc-kitchen-calc label.t-img-select__control {
    min-width: 132.5px;
}

.uc-kitchen-calc .t-form .js-error-control-box .t-img-select__container {
    padding: 0;
}

.uc-kitchen-calc .t-input-group_ri .t-input-block {
    width: min-content;
}

.sendform {cursor:pointer}
.mainform .hide-input-mode {
    opacity: 0;
    height: 0;
    max-height: 0;
    min-height: 0;
    pointer-events: none;
    overflow: hidden;
    position: absolute;
    z-index: -10;
}


input[name="kitchen-price"] {
    color: #734a34 !important;
    font-size: 27px !important;
    font-weight: 600 !important;
    border: none !important;
    pointer-events: none;
}

@media screen and (max-width:1200px){
.uc-kitchen-calc label.t-img-select__control {
    min-width: 180px;
}

}

@media screen and (max-width:960px){
.uc-kitchen-calc label.t-img-select__control {
    min-width: auto;
}

.uc-kitchen-calc .t-img-select__container {
    display: block;

}

.uc-kitchen-calc .t-input-group_ri .t-input-block {
    width: auto;
}

    
    
}




</style>


Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed or printed, on either display pages or blank pages.
Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed or printed, on either display pages or blank pages.
Book design is the art of incorporating the content, style, format, design, and sequence of the various components of a book into a coherent whole. In the words of Jan Tschichold, "methods and rules upon which it is impossible to improve, have been developed over centuries. To produce perfect books, these rules have to be brought back to life and applied."
Front matter, or preliminaries, is the first section of a book and is usually the smallest section in terms of the number of pages. Each page is counted, but no folio or page number is expressed or printed, on either display pages or blank pages.

Html code will be here

Made on
Tilda