Решение:
"use strict";
(function($){
$(function(){
var elem;
$('body').on('mouseover','.search_btn',function(){
$('main').removeClass('custom_no_blur').addClass('custom_blur');
$('.pmc').css({'display':'block'});
$('.popup').fadeIn(800);
$('.block_label__item input[checked="checked"]:radio').parent().parent().css({'background-color':'rgba(0,128,0,0.3)','border-radius':'5px','color':'darkgreen'});
$('.block_label__item').on('mouseover',function(){
$(this).css({'background-color':'rgba(0, 128, 0, 0.3)','border-radius':'5px','color':'darkgreen'});
});
$('.block_label__item').on('mouseout',function(){
elem=$(this).children().children();
if ($(elem[1]).attr('checked')!='checked'){
$(this).css({'background-color':'white','color':'#ccc'});
}
});
$('.block_label__item').on('click',function(){
elem=$(this).children().children();
var name=$(elem[1]).attr('name');
var mas_input=$('.block_label__item input[name="'+name+'"]');
for(let i=0; i<mas_input.length;i++){
$(mas_input[i]).attr('checked',false);
}
$('.block_label__item input[name="'+name+'"]').parent().parent().css({'background-color':'white','color':'#ccc'});
$(elem[1]).attr('checked',true);
$('.block_label__item input[checked="checked"]:radio').parent().parent().css({'background-color':'rgba(0,128,0,0.3)','border-radius':'5px','color':'darkgreen'});
});
function sendPostAndAnimate(){
var input=$('.block_label__item input[checked="checked"]:radio');
var searchStr=$('.search_input').val();
var searchField=$(input[0]).val();
var searchStatusId=$(input[1]).val();
var searchSort=$(input[2]).val();
if (searchField=='none'&searchStatusId=='0'){
$('main').removeClass('custom_blur').addClass('custom_no_blur');
$('.popup').fadeOut(800,function(){$('.pmc').css({'display':'none'});});
$('.loader-container').fadeIn(300);
let url='/project/searchAjax/';
$.post(url,{searchStr:searchStr,searchField:searchField,searchStatusId:searchStatusId,searchSort:searchSort},function(data){
$('.blocks .table tbody').html(data);
$('.pagination').hide();
$('.loader-container').fadeOut(300,function(){$('.blocks .table tbody').ready().ajaxComplete();});
});
}else{
if(searchStr.length>2){
$('main').removeClass('custom_blur').addClass('custom_no_blur');
$('.popup').fadeOut(800,function(){$('.pmc').css({'display':'none'});});
$('.loader-container').fadeIn(300);
let url = '/project/searchAjax/';
$.post(url,{searchStr:searchStr,searchField:searchField,searchStatusId:searchStatusId,searchSort:searchSort},function(data){
$('.blocks .table tbody').html(data);
$('.pagination').hide();
$('.loader-container').fadeOut(300,function(){$('.blocks .table tbody').ready().ajaxComplete();});
});
}else{alert('Запрос должен быть не менее 3-х символов!');}
}
}
$('.search_input').keydown(function(event){if(event.keyCode===13){sendPostAndAnimate();}});
$('.popup__footer__submit').on('click',function(){sendPostAndAnimate();});
function setDefaultPropClosePopup(){
$('main').removeClass('custom_blur').addClass('custom_no_blur');
$('.popup').fadeOut(800,function () {$('.pmc').css({'display':'none'});});
$('.search_input').off();
$('.popup__footer__submit').off();
}
$('.pmc_close').on('click',function(){setDefaultPropClosePopup();});
$('.popup_close').on('click',function (){setDefaultPropClosePopup();});
});
});
})(jQuery);