2026-05-22 20:21:54 +02:00
< ? php
$starttime = microtime ( true );
require_once ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /config.php " );
if ( ! $_SESSION [ 'id' ]) { header ( " location:index.php " ); die ( " Доступ запрещён! " );}
$get = clearInputData ( $_GET );
$endtime = microtime ( true );
$t = $endtime - $starttime ;
//ini_set('display_errors', 1);
//error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE);
require ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /templates/new-header.php " );
$cl = new Clients ;
$endtime = microtime ( true );
if ( ! $_SESSION [ 'clients_list_view' ] && ! $_SESSION [ 'kanban' ] && ! $_SESSION [ 'clients_table_view' ]) {
$_SESSION [ 'clients_list_view' ] = 1 ;
}
$user_view = null ;
$idAgentForView = null ;
$idManagerForView = null ;
$_SESSION [ 'event_id_temp' ] = rand ( 10000000 , 99999999 );
$_SESSION [ 'event_id_temp' ] *= - 1 ;
?>
<!-- Moment . js -->
< script src = " https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js " ></ script >
<!-- Moment Timezone with complete data -->
< script src = " https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.46/moment-timezone-with-data.min.js " ></ script >
< script type = " text/javascript " src = " /js/vue-simple-progress.min.js " ></ script >
< script type = " text/javascript " src = " /js/vuejs-datepicker.min.js " ></ script >
< script src = " /js/locale/translations/ru.js " ></ script >
< link rel = " stylesheet " href = " /css/vue-multiselect.min.css " >
< link rel = " stylesheet " href = " /css/all.min.css " >
< script type = " text/javascript " src = " /js/bootstrap.js " ></ script >
< script type = " text/javascript " src = " /js/jquery.bootgrid.js " ></ script >
< script type = " text/javascript " src = " /js/popup.js " ></ script >
< script type = " text/javascript " >
setTimeout ( function (){
var elem = document . createElement ( 'script' );
elem . type = 'text/javascript' ;
elem . src = 'https://api-maps.yandex.ru/2.1/?load=package.standard&apikey=898fc684-cdf6-4af8-af57-15e2781d68d1&lang=ru_RU' ;
document . getElementsByTagName ( 'body' )[ 0 ] . appendChild ( elem );
}, 1000 );
</ script >
< style >
. fstSingleMode . fstQueryInput {
font - size : 1.4 em ;
display : block ;
width : 100 % ;
padding : . 5 em . 35714 em ;
color : #999;
border : 1 px solid #D7D7D7;
}
__main {
background : #fff;
margin : 23 px 35 px 0 ;
/* border : 2 px solid #dea847;
- webkit - box - shadow : 0 1 px 3 px 0 rgba ( 0 , 0 , 0 , 0.33 );
box - shadow : 0 1 px 3 px 0 rgba ( 0 , 0 , 0 , 0.33 );
border - radius : 2 px ; */
}
. __main . __div {
/* padding: 17px 35px 23px;*/
}
. __main h2 {
width : 100 % ;
color : #757575;
margin : 0 0 16 px 0 ;
font - weight : normal ;
}
. __main . __div input {
width : 350 px ;
padding : 8 px 10 px 9 px ;
font - size : 15 px ;
border : 1 px solid #e0e0e0;
font - family : " Lato " ;
border - radius : 3 px ;
}
. __main . __div . __item {
padding : 6 px 57 px ;
cursor : pointer ;
background : - webkit - linear - gradient ( top , #fff, #f5f5f5);
border : 1 px solid #d0d0d0;
border - radius : 4 px ;
text - align : center ;
margin : 13 px 0 ;
width : fit - content ;
}
. __main . __div . __item p {
display : inline ;
}
. __main . __div . __item [ data - active = " 1 " ] {
background : #fff !important;
border - color : rgba ( 56 , 142 , 60 , . 6 ) ! important ;
}
. __main . __field_selection ,
#__FUNNELS,
#__TYPE,
#__ADD_DATA {
/* border-top: 1px solid #d0d0d0;*/
}
. __main . __field_selection p {
position : relative ;
padding : 0 0 5 px ;
cursor : pointer ;
width : fit - content ;
}
. __main . __field_selection p : before {
position : absolute ;
top : 1 px ;
left : - 36 px ;
box - shadow : inset 0 2 px 3 px rgba ( 0 , 0 , 0 , . 2 );
border : 1 px solid #000;
border - radius : 9 px ;
width : 30 px ;
height : 17 px ;
background : #dddddd;
content : '' ;
transition : all . 2 s ease - out ;
}
. __main . __field_selection p : after {
position : absolute ;
top : 3 px ;
left : - 34 px ;
box - shadow : 0 2 px 3 px rgba ( 0 , 0 , 0 , . 2 );
border : 1 px solid #000;
border - radius : 50 % ;
width : 13 px ;
height : 13 px ;
background : #fff;
content : '' ;
transition : all . 2 s ease - out ;
}
. __main . __field_selection div [ data - active = " 1 " ] p : before {
background : #4caf50;
content : '' ;
}
. __main . __field_selection div [ data - active = " 1 " ] p : after {
left : - 21 px ;
content : '' ;
}
. __main . __div . __step {
padding : 15 px 36 px 0 ;
}
. __main . __div . __step p {
font - size : 18 px ;
}
. __main . __div . __field {
padding : 0 46 px ;
}
. __main > div . __field p {
font - size : 16 px ;
}
. __main . __button {
background : linear - gradient ( to bottom , rgba ( 67 , 160 , 71 , 1 ) 0 % , rgba ( 56 , 142 , 60 , 1 ) 100 % );
cursor : pointer ;
}
. __main . __button p {
text - align : center ;
font - family : " Lato " ;
color : #ffffff;
font - size : 20 px ;
font - weight : bold ;
}
. completed {
border : 2 px solid #43a047;
font - size : 12 px ;
padding : 2 px 6 px 3 px ;
border - radius : 4 px ;
}
. deleted {
border : 2 px solid #EE6161;
font - size : 12 px ;
padding : 2 px 6 px 3 px ;
border - radius : 4 px ;
}
#__TABLE_LIST {
display : none ;
padding : 25 px 20 px 15 px ;
position : absolute ;
top : 40 px ;
left : 600 px ;
background : #fff;
width : fit - content ;
height : fit - content ;
box - shadow : 0 2 px 7 px rgba ( 0 , 0 , 0 , 0.13 );
}
#__TABLE_LIST_CLOSE {
position : absolute ;
top : 7 px ;
right : 7 px ;
font - size : 16 px ;
cursor : pointer ;
font - family : 'themify' ;
speak : none ;
font - style : normal ;
font - weight : normal ;
font - variant : normal ;
text - transform : none ;
line - height : 1 ;
- webkit - font - smoothing : antialiased ;
- moz - osx - font - smoothing : grayscale ;
}
#__TABLE_LIST_CLOSE::before {
content : " \ e646 " ;
}
#__TABLE_LIST div {
padding : 6 px 0 ;
max - width : 300 px ;
}
#__TABLE_LIST div > p {
cursor : pointer ;
font - size : 17 px ;
}
#__TABLE_LIST div > p:hover {
text - decoration : underline ;
}
. jw__page__tabs . __tab {
font - size : 16 px ;
}
. jw__page__tabs . __tab {
position : relative ;
display : inline - block ;
padding : 19 px 0 23 px ;
margin - right : 40 px ;
cursor : pointer ;
border : 0 ;
font - size : 17 px ;
}
. jw__page__tabs . __tab span {
border - bottom : 1 px solid #bdbdbd;
font - size : 16 px ;
}
. __tab . tab__new - object i {
position : absolute ;
left : 0 ;
top : 50 % ;
margin - top : - 12 px ;
font - size : 24 px ;
color : #4CAF50;
}
. modal - warning - already - in - work {
position : fixed ;
top : 0 ;
left : 0 ;
width : 100 % ;
height : 100 % ;
background - color : rgba ( 0 , 0 , 0 , 0.7 );
z - index : 10000 ;
display : flex ;
justify - content : center ;
align - items : center ;
}
. modal - warning - already - in - work . modal - content {
background : white ;
padding : 50 px ;
border - radius : 5 px ;
max - width : 1000 px ;
text - align : center ;
position : relative ;
font - size : 20 px ;
}
. modal - warning - already - in - work . close - modal {
position : absolute ;
top : 5 px ;
right : 10 px ;
font - size : 20 px ;
cursor : pointer ;
}
. modal - warning - already - in - work . ok - button {
margin - top : 15 px ;
padding : 10 px 25 px ;
background : #4CAF50;
color : white ;
border : none ;
border - radius : 3 px ;
cursor : pointer ;
font - size : 20 px ;
}
. no - hover {
cursor : default ;
pointer - events : none ;
}
. no - hover : hover {
background : none ! important ;
color : inherit ! important ;
text - decoration : none ! important ;
}
</ style >
< div class = " content-right " style = " min-height: 100%; " >
< div class = " inner " >
< div class = " main-title " >
< input type = " hidden " value = " <?= $_SESSION['to_send'] ?> " id = " session_to_send " />
< h1 > Заявки </ h1 >
</ div >
< div class = " crm new " >
< div class = " crm__filters " id = " req_filtr " >
< div class = " crm__filters-inner " >
< div class = " search-query " >
< div v - if = " options > 0 " class = " search-query-item-req crm_req " style = " display:none " >
< span v - html = " options+textOptions " ></ span >
< i class = " ti-close " @ click = " clearFiltr " ></ i >
</ div >
</ div >
< div class = " search-filter " >
< input type = " text " tabindex = " 1 " @ input = " get_option " v - model = " filtr.search " name = " search " placeholder = " Фильтр и поиск " class = " search-filter__filter " autocomplete = " off " >
< div class = " search-filter__icons " >
< i class = " ti-search " @ click = " search(1) " title = " Искать по всем воронкам " ></ i >
< i class = " ti-close " @ click = " clearSearch " title = " Очистить " ></ i >
</ div >
</ div >
< ? php
$searchUserId = $_SESSION [ 'id' ];
$sql_check_permissions = " SELECT `menu_all_submissions_export`, `cannot_create_req_manually` FROM user_permissions WHERE user_id = ' $searchUserId ' " ;
$q_check_permissions = mysql_query ( $sql_check_permissions );
$r_check_permissions = mysql_fetch_assoc ( $q_check_permissions );
?>
< ? php if ( $r_check_permissions [ 'cannot_create_req_manually' ] == 0 ) { ?>
< div class = " crm__new-client " >
< button class = " jw__g-button add_req_new " > Добавить </ button >
</ div >
< ? php } ?>
< ? php if ( $_SESSION [ 'agency' ] || $_SESSION [ 'users_admin' ] || $r_check_permissions [ 'menu_all_submissions_export' ] == 1 ) { ?>
< div style = " margin-left: 20px; margin-top: 3px; " class = " crm__new-client " >
< a href = " javascript: { } " id = " export_excel_req " class = " jw__g-button " > Экспорт в Excel </ a >
< div id = " __TABLE_LIST " style = " left: auto; " >
< p id = " __TABLE_LIST_CLOSE " ></ p >
< div >
< p data - table - id = " 0 " > Стандартная </ p >
</ div >
</ div >
</ div >
< div title = " Настроить отчеты " style = " margin-left: 20px; margin-top: 3px; " class = " crm__new-client " >
< a href = " javascript: { } " id = " openExportSetting " class = " jw__g-button " >
< span class = " simple-button settings " >< i class = " jw-action-icon-settings " ></ i ></ span >
</ a >
</ div >
< ? php
} ?>
< div class = " view-changer " >
< div class = " view-list " : class = " { 'active': view == 'list'} " >
< div title = " Выбрать вид отображения по умолчанию " class = " jw__group-action-button " >
< input type = " checkbox " id = " view_changer_req_list " class = " view_changer_req " >
< div class = " group-action-button item-for-check " : class = " { 'active': viewUser == 'list'} " id = " view_checked_req_list " @ click = " setViews('list') " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
< a href = " javascript: { } " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Layer_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " xml : space = " preserve " >< g >< g >< path d = " M0,74.672V224h512V74.672H0z M496,208H16V90.672h480V208z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M0,288v149.328h512V288H0z M496,421.328H16V304h480V421.328z " fill = " #757575 " /></ g ></ g ></ svg >
< span > Список </ span >
</ a >
</ div >
< div class = " view-kanban " : class = " { 'active': view == 'kanban'} " >
< div title = " Выбрать вид отображения по умолчанию " class = " jw__group-action-button " >
< input type = " checkbox " id = " view_changer_req_kanban " class = " view_changer_req " >
< div class = " group-action-button item-for-check " : class = " { 'active': viewUser == 'kanban'} " id = " view_checked_req_kanban " @ click = " setViews('kanban') " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
< a href = " javascript: { } " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Layer_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " xml : space = " preserve " >< g >< g >< path d = " M0,96v128h128V96H0z M112,208H16v-96h96V208z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M192,96v128h128V96H192z M304,208h-96v-96h96V208z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M384,96v128h128V96H384z M496,208h-96v-96h96V208z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M0,288v128h128V288H0z M112,400H16v-96h96V400z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M192,288v128h128V288H192z M304,400h-96v-96h96V400z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M384,288v128h128V288H384z M496,400h-96v-96h96V400z " fill = " #757575 " /></ g ></ g ></ svg >
< span > Канбан </ span >
</ a >
</ div >
< div class = " view-table " : class = " { 'active': view == 'table'} " >
< div title = " Выбрать вид отображения по умолчанию " class = " jw__group-action-button " >
< input type = " checkbox " id = " view_changer_req_table " class = " view_changer_req " >
< div class = " group-action-button item-for-check " : class = " { 'active': viewUser == 'table'} " id = " view_checked_req_table " @ click = " setViews('table') " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
< a href = " javascript: { } " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Layer_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " xml : space = " preserve " >< g >< g >< path d = " M0,74.672V224h512V74.672H0z M496,208H16V90.672h480V208z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M0,288v128h128V288H0z M112,400H16v-96h96V400z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M192,288v128h128V288H192z M304,400h-96v-96h96V400z " fill = " #757575 " /></ g ></ g >< g >< g >< path d = " M384,288v128h128V288H384z M496,400h-96v-96h96V400z " fill = " #757575 " /></ g ></ g ></ svg >
< span > Таблица </ span >
</ a >
</ div >
</ div >
</ div >
< div class = " crm__filter-popup " >
< span class = " pseudo-link closer " >< i class = " ti-close " ></ i ></ span >
< div class = " filter-popup-items " >
< div class = " filter-popup__left " >
< div id = " filter_stage_work " : class = " { 'active': filtr.stages.work > 0} " class = " filter-popup-type " >
< a @ click = " checkStage('work') " href = " javascript: { } " >< span > В работе </ span ></ a >
</ div >
< div id = " filter_stage_hot " class = " filter-popup-type hot " : class = " { 'active': filtr.stages.hot > 0} " >
< a @ click = " checkStage('hot') " href = " javascript: { } " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 19px " height = " 19px " class = " " >< g >< g transform = " matrix(1.25 0 0 -1.25 0 45) " >
< path style = " fill:#F4511E " d = " M398.448-179.952c0,23.5-4.18,46.008-11.847,66.843c-5.24-61.375-37.967-92.917-72.162-78.234 c-32.043,13.761-10.445,67.401-8.851,92.996C308.277-54.958,305.451-5.293,226.637,36c32.749-62.651,3.793-101.563-26.586-103.943 c-33.683-2.62-64.542,28.956-53.151,80.216c-36.884-27.179-37.967-72.925-26.586-102.52c11.869-30.847-0.467-56.477-29.423-59.325 c-32.339-3.189-50.314,34.641-33.74,94.922c-28.683-33.775-45.997-77.516-45.997-125.302C11.152-286.902,97.85-373.6,204.8-373.6 S398.448-286.902,398.448-179.952z " data - original = " #F4900C " class = " active-path " data - old_color = " #FF7043 " />
< path style = " fill:#FFB74D " d = " M277.418-279.146c-23.978,9.603-17.554,26.097-23.728,60.27 c-6.174,34.173-29.902,57.912-65.031,68.346c25.63-72.14-14.204-98.726-35.084-103.476c-21.324-4.853-42.751,0.012-45.2,45.644 c-24.867-24.764-40.267-59.028-40.267-96.893c0-4.186,0.199-8.325,0.567-12.415C103.652-352.245,151.729-373.6,204.8-373.6 s101.148,21.355,136.126,55.932c0.369,4.09,0.567,8.229,0.567,12.415c0,24.901-6.652,48.253-18.283,68.358 C324.885-272.026,294.026-285.798,277.418-279.146z " data - original = " #FFCC4D " class = " " data - old_color = " #FFCC4D " />
</ g ></ g ></ svg >
< span > Горячие </ span >
</ a >
</ div >
< div id = " filter_stage_close " class = " filter-popup-type " : class = " { 'active': filtr.stages.close > 0} " >
< a @ click = " checkStage('close') " href = " javascript: { } " >< span > Закрытые </ span ></ a >
</ div >
< div id = " filter_stage_hit " class = " filter-popup-type " : class = " { 'active': filtr.stages.hit > 0} " >
< a @ click = " checkStage('hit') " href = " javascript: { } " >< span > Успешные </ span ></ a >
</ div >
< ? php
//формируем данные по воронке
$funnelId = isset ( $_GET [ 'funnelId' ]) ? $_GET [ 'funnelId' ] : null ;
$objectId = isset ( $_GET [ 'objectId' ]) ? $_GET [ 'objectId' ] : null ;
if ( $user -> agencyId != 6841 && $user -> agencyId != 6426 && $user -> agencyId != 7384 && $user -> agencyId != 7478 && $user -> agencyId != 8353 && $user -> agencyId != 8867 && $user -> agencyId != 9588 ) {
$useCustomFunnel = true ;
} else {
$useCustomFunnel = false ;
}
$sqlCastom = " SELECT id FROM funnel_default WHERE agency_id = { $user -> agencyId } AND is_req = 0 " ;
$qCastom = mysql_query ( $sqlCastom );
if ( mysql_num_rows ( $qCastom ) > 0 ){
$useCustomFunnel = false ;
}
if ( $funnelId == null ) {
if ( $useCustomFunnel ) {
$funnelId = 0 ;
} else {
$funnelsql = " select * from funnel WHERE agency_id = { $user -> agencyId } and deleted=0 AND is_req=1 order by id " ;
if ( $user -> agencyId == 9588 ) {
$funnelsql = " select * from funnel WHERE agency_id = { $user -> agencyId } and deleted=0 order by order_number desc, id " ;
} else if ( $user -> agencyId == 11082 ) {
$funnelsql = " select * FROM funnel WHERE agency_id = { $user -> agencyId } AND deleted = 0 ORDER BY order_number ASC, id " ;
}
$funnelsData = mysql_query ( $funnelsql );
while ( $funnel = mysql_fetch_assoc ( $funnelsData )){
$funnelId = $funnel [ 'id' ];
break ;
}
}
}
?>
< div id = " filter_confirm " class = " filter-popup-type " : class = " { 'active': filtr.stages.confirm > 0} " id = " filter_confirm " >
< a @ click = " checkStage('confirm') " href = " javascript: { } " >< span > Переданные </ span ></ a >< span v - if = " filtr.confirm > 0 " class = " counter " v - html = " filtr.confirm " ></ span >
</ div >
<!--< div id = " filter_stage_send " class = " filter-popup-type " : class = " { 'active': filtr.stages.send > 0} " id = " filter_stage_send " >
< a @ click = " checkStage('send') " href = " javascript: { } " >< span > Н е назначенные </ span ></ a >< span v - if = " filtr.send > 0 " class = " counter " v - html = " filtr.send " ></ span >
</ div >-->
< div class = " filter-popup-type " : class = " { active: filtr.stages.ahency > 0} " >
< a @ click = " checkStage('ahency') " href = " javascript: { } " >< span > Общие </ span ></ a >
</ div >
</ div >
< div class = " filter-popup__right " >
< div class = " filter-popup-header-inputs " >
< h3 style = " display:inline-flex; " > Параметры </ h3 >
< button class = " top-line__button button-fl-right " @ click = " searchButtonClick() " type = " button " style = " margin-right: 50px;font-size: 14px;font-weight: normal;padding: 5px 13px;margin-top: -3px; " > Применить </ button >
</ div >
< div id = " req_filter_emp_input " >< img src = " ../images/rocket-spinner.svg " width = " 45px " ></ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " filter-req-type-input " >
< img src = " ../images/rocket-spinner.svg " width = " 45px " >
</ div >
</ div >
<!-- Отображение полей для указания диапазона цен -->
< div
v - if = " Object.values(filtr.type ?? { }).map(v => parseInt(v)).filter(v => [1, 4].includes(v) || [1, 4].includes(currentFilterTypesParents[v])).length "
style = "
display : flex ;
align - items : center ;
justify - items : center ;
justify - content : space - around ;
padding - bottom : 13 px ;
"
>
< div >
От
< input
type = " number "
placeholder = " Цена "
id = " filter-popup-price-from "
style = "
height : 26 px ;
padding : 3 px 11 px ;
border : 1 px solid #cdcdcd;
border - radius : 3 px ;
"
>
</ div >
< div >
До
< input
type = " number "
id = " filter-popup-price-to "
placeholder = " Цена "
style = "
height : 26 px ;
padding : 3 px 11 px ;
border : 1 px solid #cdcdcd;
border - radius : 3 px ;
"
>
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< v - select v - model = " filtr.property_type " multiple @ input = " checkFields " class = " text medium-input no-mrg-left vue_select " : components = " { OpenIndicator} " transition = " " : placeholder = " 'Тип недвижимости' " : options = " property_types " : reduce = " name => name.id " label = " name " />
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " req_filter_activities_input " >
< select id = " req_filter_activities " multiple = " " >
< ? php
$sql_adv = " SELECT * FROM `activities` WHERE `user_id` = ' " . $user -> id . " ' or `manager_id` = ' " . $user -> id . " ' " ;
if ( $user -> id_manager ){
$sql_adv .= " or `manager_id` = ' " . $user -> id_manager . " ' or `user_id` = ' " . $user -> id_manager . " ' " ;
}
if ( $user -> agencyId ){
$sql_adv .= " or `manager_id` = ' " . $user -> agencyId . " ' or `user_id` = ' " . $user -> agencyId . " ' " ;
}
$sql_adv .= ' order by `name`' ;
$q_adv = mysql_query ( $sql_adv );
$rows_adv = mysql_num_rows ( $q_adv );
if ( $rows_adv > 0 ){
while ( $r_adv = mysql_fetch_assoc ( $q_adv )){
?>
< option value = " <?= $r_adv['id'] ?> " >< ? = $r_adv [ 'name' ] ?> </option>
< ? php
}
}
?>
</ select >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " req_filter-source_input " >
< select id = " req_filter-source " multiple = " " >
< option value = " 0 " > Без источника </ option >
< option value = " 10000 " > Объекты нашей компании </ option >
< ? php
$sql_advg = " SELECT * FROM `advertising_sources_groups` WHERE `user_id` = ' " . $user -> id . " ' or `manager_id` = ' " . $user -> id . " ' " ;
if ( $user -> id_manager ){
$sql_advg .= " or `manager_id` = ' " . $user -> id_manager . " ' or `user_id` = ' " . $user -> id_manager . " ' " ;
}
if ( $user -> agencyId || $_SESSION [ 'users_admin' ]){
$sql_advg .= " or `manager_id` = ' " . $user -> agencyId . " ' or `user_id` = ' " . $user -> agencyId . " ' " ;
$sql_advg .= " or `user_id` in (select id from users where id= { $user -> agencyId } or id_manager= { $user -> agencyId } or id_manager in
( select id from users where id_manager = { $user -> agencyId } or id_manager in
( select id from users where id_manager = { $user -> agencyId }))) " ;
}
// echo $sql_adv;
$q_advg = mysql_query ( $sql_advg );
while ( $r_advg = mysql_fetch_assoc ( $q_advg )){ ?>
< option class = " bolt " value = " all_<?= $r_advg['id'] ?> " >< ? = $r_advg [ 'name' ] ?> </option>
< ? php
$sql_adv = " SELECT * FROM `advertising_sources` WHERE group_id= " . $r_advg [ 'id' ] . " and (`user_id` = ' " . $user -> id . " ' or `manager_id` = ' " . $user -> id . " ' " ;
if ( $user -> id_manager ){
$sql_adv .= " or `manager_id` = ' " . $user -> id_manager . " ' or `user_id` = ' " . $user -> id_manager . " ' " ;
}
if ( $user -> agencyId || $_SESSION [ 'users_admin' ]){
$sql_adv .= " or `manager_id` = ' " . $user -> agencyId . " ' or `user_id` = ' " . $user -> agencyId . " ' " ;
}
$sql_adv .= " ) order by source " ;
$q_adv = mysql_query ( $sql_adv );
$rows_adv = mysql_num_rows ( $q_adv );
if ( $rows_adv > 0 ){
while ( $r_adv = mysql_fetch_assoc ( $q_adv )){
if ( is_see ( $r_adv [ 'is_no_see' ], $r_adv [ 'users_no_see' ])) {
?>
< option value = " <?= $r_adv['id'] ?> " >< ? = $r_adv [ 'source' ] ?> </option>
< ? php
}
}
}
?>
< ? php
}
?>
< option class = " bolt " value = " all_0 " > Без группы </ option >
< ? php
$sql_adv = " SELECT * FROM `advertising_sources` WHERE group_id=0 and (`user_id` = ' " . $user -> id . " ' or `manager_id` = ' " . $user -> id . " ' " ;
if ( $user -> id_manager ){
$sql_adv .= " or `manager_id` = ' " . $user -> id_manager . " ' or `user_id` = ' " . $user -> id_manager . " ' " ;
}
if ( $user -> agencyId || $_SESSION [ 'users_admin' ]){
$sql_adv .= " or `manager_id` = ' " . $user -> agencyId . " ' or `user_id` = ' " . $user -> agencyId . " ' " ;
}
$sql_adv .= " ) order by source " ;
$q_adv = mysql_query ( $sql_adv );
$rows_adv = mysql_num_rows ( $q_adv );
if ( $rows_adv > 0 ){
while ( $r_adv = mysql_fetch_assoc ( $q_adv )){
if ( is_see ( $r_adv [ 'is_no_see' ], $r_adv [ 'users_no_see' ])) {
?>
< option value = " <?= $r_adv['id'] ?> " >< ? = $r_adv [ 'source' ] ?> </option>
< ? php
}}
}
?>
</ select >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " req_filter_partner_input " >
< select id = " req_filter_partner " multiple = " " >
< ? php $partners = new Partners ();
$partners_list = $partners -> getPartners ( false , false , true );
$sel_employees = [];
foreach ( $partners_list as $partner ) { ?>
< optgroup label = " <?= $partner['name'] ; ?> " >
< option value = " all_<?= $partner['id'] ; ?> " data - label = " <?= $partner['name'] . " ( все сотрудники ) " ; ?> " >
В с е сотрудники партнёра
</ option >
< ? php $employees_list = $partners -> getEmployees ( $partner [ 'id' ], true , false , true ); ?>
< ? php foreach ( $employees_list as $employee ) {
if ( $partner [ 'id' ] == $employee [ 'partner_id' ]) { ?>
< option value = " <?= $employee['id'] ; ?> " data - label = " <?= $partner['name'] . " ( " . $employee['name'] . (( $employee['position'] ) ? " , " . mb_strtolower( $employee['position'] , " UTF - 8 " ) : " " ). " ) " ; ?> " >
< ? = $employee [ 'name' ] . (( $employee [ 'position' ]) ? " , " . mb_strtolower ( $employee [ 'position' ], " UTF-8 " ) : " " ); ?>
</ option >
< ? php }
} ?>
</ optgroup >
< ? php
} ?>
</ select >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " req_filter_etap_input " >
< select id = " req_filter_etap " multiple = " " >
< ? php
if ( $funnelId == 0 ) {
?>
< option value = " 1 " < ? = in_array ( '1' , $arr_etap ) ? 'selected' : '' ?> >Новый</option>
< option value = " 2 " < ? = in_array ( '2' , $arr_etap ) ? 'selected' : '' ?> >В работе</option>
< option value = " 3 " < ? = in_array ( '3' , $arr_etap ) ? 'selected' : '' ?> >Презентация</option>
< option value = " 4 " < ? = in_array ( '4' , $arr_etap ) ? 'selected' : '' ?> >Показ</option>
< option value = " 5 " < ? = in_array ( '5' , $arr_etap ) ? 'selected' : '' ?> >Бронь</option>
< option value = " 6 " < ? = in_array ( '6' , $arr_etap ) ? 'selected' : '' ?> >Подаем на ипотеку</option>
< option value = " 7 " < ? = in_array ( '7' , $arr_etap ) ? 'selected' : '' ?> >Сделка</option>
< option value = " 8 " < ? = in_array ( '8' , $arr_etap ) ? 'selected' : '' ?> >Закрыт</option>
< ? php
} else {
$funnelStepsData = mysql_query ( " select * from funnel_steps WHERE deleted = 0 and funnel_id = $funnelId order by id " );
while ( $funnelStep = mysql_fetch_assoc ( $funnelStepsData )) {
?>
< option value = " <?php echo $funnelStep['id'] ?> " >< ? php echo $funnelStep [ 'name' ]; ?> </option>
< ? php
}
}
?>
</ select >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< input type = " text " placeholder = " Количество присоединенных заявок " v - model = " filtr.total_union " class = " text medium-input no-mrg-left " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " name = " is_datе _step " v - model = " filtr.is_date_step " id = " is_date_step " type = " checkbox " >
< label for = " is_date_step " > По дате закрытия </ label >
</ div >
</ div >
< div v - show = " filtr.is_date_step " >
< div class = " filter-popup-type period " style = " padding: 0px; " >
< p > Период закрытия этапов </ p >
< div id = " dates_date_step " style = " padding: 10px 5px 10px; " >
От & nbsp ; < input style = " width:100px " type = " text " id = " dateStepReqOnDate " class = " text datepicker-filter " value = " " >& nbsp ;
до & nbsp ; < input style = " width:100px " type = " text " id = " dateStepReqOffDate " class = " text datepicker-filter " value = " " >
</ div >
</ div >
< div class = " clear " ></ div >
</ div >
< ? php
$sql_d = " SELECT * FROM denial_work WHERE (agency_id = 0 or agency_id= { $user -> agencyId } ) " ;
if ( $user -> agencyId == 19895 ){
$sql_d = " SELECT * FROM denial_work WHERE agency_id= { $user -> agencyId } AND del = 0 " ;
}
$q_d = mysql_query ( $sql_d );
$row_d = mysql_num_rows ( $q_d );
?>
< div class = " filter-popup-input " >
< div class = " crm__filter-input " id = " req_denial_work_input " >
< select id = " req_denial_work " multiple = " " >
< ? php
while ( $r_d = mysql_fetch_assoc ( $q_d )){ ?>
< option value = " <?= $r_d['id'] ?> " >
< ? = $r_d [ 'name' ] ?>
</ option >
< ? php } ?>
</ select >
</ div >
</ div >
< div class = " filter-popup-input " >
< ? php
$period = 'all' ;
/* if ( isset ( $_SESSION [ 'client_period' ]))
$period = $_SESSION [ 'client_period' ]; */
if ( isset ( $_GET [ 'period' ])){
$period = $_GET [ 'period' ];
if ( $period == 'dates' ) $period = 'period' ;
} else {
unset ( $_SESSION [ 'client_period' ]);
}
?>
< div class = " crm__filter-input " id = " req_filter_period_input " >
< select id = " req_filter_period " >
< option value = " today " < ? = ( $period == 'today' ) ? 'selected' : '' ?> >Сегодня</option>
< option value = " week " < ? = ( $period == 'week' ) ? 'selected' : '' ?> >Неделя</option>
< option value = " month " < ? = ( $period == 'month' ) ? 'selected' : '' ?> >Месяц</option>
< option value = " 30days " < ? = ( $period == '30days' ) ? 'selected' : '' ?> >Последние 30 дней</option>
< option value = " quarter " < ? = ( $period == 'quarter' ) ? 'selected' : '' ?> >Квартал</option>
< option value = " 90days " < ? = ( $period == '90days' ) ? 'selected' : '' ?> >Последние 90 дней</option>
< option value = " year " < ? = ( $period == 'year' ) ? 'selected' : '' ?> >Год</option>
< option value = " all " < ? = ( $period == 'all' ) ? 'selected' : '' ?> >В с е время</option>
< option value = " period " < ? = ( $period == 'period' ) ? 'selected' : '' ?> >Период</option>
</ select >
</ div >
< div class = " filter-popup-type period <?=( $period != 'period' ) ? 'hidden' : ''?> " style = " padding: 0px; " id = " reqDates " >
< div id = " dates_period " style = " padding: 16px 5px 16px; " >
с & nbsp ; < input type = " text " id = " reqOnDate " class = " text datepicker-filter " value = " " >& nbsp ;
по & nbsp ; < input type = " text " id = " reqOffDate " class = " text datepicker-filter " value = " " >
</ div >
</ div >
</ div >
< template v - if = " filtr.stages.close > 0 " >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " v - model = " filtr.date_closer " name = " date_tasks " id = " date_closer " value = " 10 " type = " radio " checked > < label for = " date_closer " > По дате закрытия </ label >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " v - model = " filtr.date_closer " name = " date_tasks " id = " date_no_closer " value = " 11 " type = " radio " >
< label for = " date_no_closer " > По дате создания </ label >
</ div >
</ div >
</ template >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< input @ change = " checkObjectId " type = " text " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " v - model = " filtr.object_id " class = " text medium-input no-mrg-left " placeholder = " ID объекта по заявке " >
</ div >
</ div >
< template v - if = " !isEmpty(reqFields) " >
< div v - for = " (field, index) in reqFields " >
< template v - if = " field.is_filtrable > 0 " >
< template v - if = " field.is_podgroup > 0 " >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< v - select v - model = " fieldModels['model_'+field.id] " multiple @ input = " checkFields " class = " text medium-input no-mrg-left vue_select " : components = " { OpenIndicator} " transition = " " : placeholder = " field.title " : options = " field.podgroups_select " : reduce = " title => title.id " label = " title " />
</ div >
</ div >
< template v - if = " !isEmpty(field.podgroups) " >
< div v - show = " !isEmpty(fieldModels['model_'+field.id]) && fieldModels['model_'+field.id].indexOf(pg.id) != -1 " class = " filter-popup-input " v - for = " (pg, in_pd) in field.podgroups " >
< template v - if = " pg.type==0 || pg.type==5 " >
< div class = " crm__filter-input " >
< input @ change = " checkFields " type = " text " class = " text medium-input no-mrg-left " v - model = " fieldModels['modelp_'+pg.id] " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " : placeholder = " pg.title " />
</ div >
</ template >
< template v - else - if = " pg.type==1 " >
< div class = " crm__filter-input " >
< input @ change = " checkFields " type = " number " class = " text medium-input no-mrg-left " v - model = " fieldModels['modelp_'+pg.id] " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " : placeholder = " pg.title " />
</ div >
</ template >
< template v - else - if = " pg.type==3 || pg.type==2 " >
< div class = " crm__filter-input " >
< v - select : components = " { OpenIndicator} " @ input = " checkFields " v - model = " fieldModels['modelp_'+pg.id] " : placeholder = " pg.title " transition = " " class = " vue_select " multiple : options = " pg.params.items " : reduce = " name => name.value " label = " name " />
</ div >
</ template >
< template v - else - if = " pg.type==4 " >
< div class = " checkbox " >
< input @ change = " checkFields " v - model = " fieldModels['modelp_'+pg.id] " : id = " 'custom_req_filtr_'+pg.id " type = " checkbox " >
< label : for = " 'custom_req_filtr_'+pg.id " v - html = " pg.title " ></ label >
</ div >
</ template >
</ div >
< div class = " clear " ></ div >
</ template >
</ template >
< template v - else - if = " field.type==0 || field.type == 5 " >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< input @ change = " checkFields " type = " text " class = " text medium-input no-mrg-left " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " : placeholder = " field.title " v - model = " fieldModels['model_'+field.id] " />
</ div >
</ div >
< div class = " clear " ></ div >
</ template >
< template v - else - if = " field.type==1 " >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< input @ change = " checkFields " type = " number " class = " text medium-input no-mrg-left " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " : placeholder = " field.title " v - model = " fieldModels['model_'+field.id] " />
</ div >
</ div >
< div class = " clear " ></ div >
</ template >
< template v - else - if = " field.type==3 || field.type==2 " >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< v - select : components = " { OpenIndicator} " @ input = " checkFields " : placeholder = " field.title " v - model = " fieldModels['model_'+field.id] " transition = " " class = " vue_select " : options = " field.params.items " : reduce = " name => name.value " multiple label = " name " />
</ div >
</ div >
< div class = " clear " ></ div >
</ template >
< template v - else - if = " field.type==4 " >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkFields " v - model = " fieldModels['model_'+field.id] " : id = " 'custom_req_filtr_'+field.id " type = " checkbox " >
< label : for = " 'custom_req_filtr_'+field.id " v - html = " field.title " ></ label >
</ div >
</ div >
< div class = " clear " ></ div >
</ template >
</ template >
</ div >
</ template >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " name = " is_contract " v - model = " filtr.is_contract " id = " is_contract " type = " checkbox " >
< label for = " is_contract " > Договоры </ label >
</ div >
</ div >
< div v - show = " filtr.is_contract " >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< v - select : components = " { OpenIndicator} " @ input = " checkFields " : placeholder = " 'Тип договора' " v - model = " filtr.type_contract " transition = " " class = " vue_select " : options = " types_contract " : reduce = " type => type.code " multiple label = " type " />
</ div >
</ div >
< div class = " clear " ></ div >
< div class = " filter-popup-input " >
< div class = " crm__filter-input " >
< input @ change = " checkObjectId " type = " text " style = " width: 382px; height: 18px; font-size: 18px; padding: 9px; " v - model . trim = " filtr.numder_contract " class = " text medium-input no-mrg-left " placeholder = " Номер договора " >
</ div >
</ div >
< div class = " filter-popup-type period " style = " padding: 0px; " >
< p > Период окончания договора </ p >
< div id = " dates_contract_req " style = " padding: 10px 5px 10px; " >
От & nbsp ; < input style = " width:100px " type = " text " id = " contractReqOnDate " class = " text datepicker-filter " value = " " >& nbsp ;
до & nbsp ; < input style = " width:100px " type = " text " id = " contractReqOffDate " class = " text datepicker-filter " value = " " >
</ div >
</ div >
</ div >
< div @ click = " checkPriority(1) " class = " req-filter-priority1 " : class = " { active:filtr.priority[1] == 1} " title = " Категория клиентов " >
< svg x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 24px " height = " 24px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 240 " ry = " 240 " class = " priority1 " /></ svg >
</ div >
< div @ click = " checkPriority(2) " class = " req-filter-priority2 " : class = " { active:filtr.priority[2] == 1} " title = " Категория клиентов " >
< svg x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 24px " height = " 24px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 240 " ry = " 240 " class = " priority2 " /></ svg >
</ div >
< div @ click = " checkPriority(3) " class = " req-filter-priority3 " : class = " { active:filtr.priority[3] == 1} " title = " Категория клиентов " >
< svg x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 24px " height = " 24px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 240 " ry = " 240 " class = " priority3 " /></ svg >
</ div >
< div @ click = " checkPriority(4) " class = " req-filter-priority4 " : class = " { active:filtr.priority[4] == 1} " title = " Категория клиентов " >
< svg x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 24px " height = " 24px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 240 " ry = " 240 " class = " priority4 " /></ svg >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " name = " is_tasks " v - model = " filtr.is_tasks " id = " is_tasksReq " type = " checkbox " >
< label for = " is_tasksReq " > С задачами </ label >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " v - model = " filtr.noTasks " name = " noTasks " id = " noTasksReq " type = " checkbox " >
< label for = " noTasksReq " > Заявки без задач </ label >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input @ change = " checkTasks " v - model = " filtr.todayTasks " name = " todayTasks " id = " todayTasksReq " type = " checkbox " >
< label for = " todayTasksReq " > Задачи на сегодня </ label >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input name = " overTasks " @ change = " checkTasks " v - model = " filtr.overTasks " id = " overTasksReq " type = " checkbox " >
< label for = " overTasksReq " > С просроченными задачами </ label >
</ div >
</ div >
< div class = " filter-popup-input " >
< div class = " checkbox " >
< input name = " isPartner " @ change = " checkTasks " id = " isPartnerReq " v - model = " filtr.isPartner " type = " checkbox " >
< label for = " isPartnerReq " > Совместные заявки </ label >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php
$searchUserId = ( int ) $_SESSION [ 'id' ];
$depClass = new Department ;
$departments = $depClass -> getDepartments ();
$dep_user = $depClass -> getDepartment ( $searchUserId );
$user_allow_edit_all = 0 ;
$r_check_permissions = $user -> checkMenuPermissions ();
if ( $user -> agency == 1 || $user -> users_admin == 1 || $r_check_permissions [ 'menu_all_clients_edit' ] == 1 ) {
$user_allow_edit_all = 1 ;
} elseif ( $dep_user [ 'role' ] == 'admin_department' || $dep_user [ 'role' ] == 'manager_office' || $dep_user [ 'role' ] == 'manager' || $dep_user [ 'role' ] == 'manager_office_menager' ) {
$user_allow_edit_all = 1 ;
} elseif ( ! ( $dep_user [ 'role' ]) && $_SESSION [ 'manager' ] > 0 ) {
$user_allow_edit_all = 1 ;
}
?>
< div id = " app_clients " >
< div class = " funnels_client isNoLoadPage " >
<!-- agencyID для js -->
< input type = " hidden " id = " agencyIdClients " value = " <?= $user->agencyId ?> " />
< input type = " hidden " id = " funnelIdClients " value = " <?= $funnelId ?> " />
< input type = " hidden " id = " objectIdForReq " value = " <?= $objectId ?> " />
< input type = " hidden " id = " useCustomFunnel " value = " <?= $useCustomFunnel ?> " />
< input type = " hidden " id = " userIdReq " value = " <?= $_SESSION['id'] ?> " />
< input type = " hidden " id = " user_allow_edit_all " value = " <?= $user_allow_edit_all ?> " />
< ul class = " funnels_list " style = " display: inline-block; margin: 0px 0 5px 16px; " ></ ul >
< div id = " groupClients " class = " jw__objects " >
< div style = " float:left;margin:0px 0px 0px 0px; width:max-content; border: none; background: none; box-shadow: none; "
class = " f-system_pagination jw__object item " >
< div class = " object-content__actions " style = " padding: 7px 5px 5px 0px; " >
< div class = " actions-menu__icons " >
< span class = " jw__small-popup jw-action-icon-more " data - id = " reqs " ></ span >
< div class = " jw__popup actions-menu " style = " right:auto; width:200px " id = " popup__reqs " >
< div class = " actions-menu__inner " >
< a href = " javascript: { }; " class = " confirm__reqs " data - id = " <?= $_SESSION['id'] ?> " >< span > Передать сотруднику </ span ></ a >
< ? php
$daily_transfer_closed_req_left = $r_check_permissions [ 'daily_closed_transfer_limit' ] - $r_check_permissions [ 'actual_daily_closed_transfers' ];
if ( $user -> users_admin == 1 || $user -> agency == 1 || ( $r_check_permissions [ 'menu_can_transfer_closed_to_others' ] == 1 && $daily_transfer_closed_req_left > 0 )) { ?>
< a href = " javascript: { }; " class = " transfer_reqs_closed " data - id = " <?= $_SESSION['id'] ?> " >< span > Передать в работу закрытые </ span ></ a >
< ? php } ?>
< a href = " javascript: { }; " class = " funnel__reqs " >< span > Переместить в воронку </ span ></ a >
< a href = " javascript: { }; " data - req = " req " class = " closed_all " >< span > Закрыть </ span ></ a >
< a href = " javascript: { }; " class = " renew_all_reqs " >< span > Открыть </ span ></ a >
< a href = " javascript: { }; " class = " confirm_on_reqs " >< span > Принять в работу </ span ></ a >
< ? php
$daily_closed_req_left = $r_check_permissions [ 'daily_closed_req_limit' ] - $r_check_permissions [ 'actual_daily_closed_req' ];
if ( $user -> users_admin == 1 || $user -> agency == 1 || ( $r_check_permissions [ 'menu_can_take_from_closed' ] == 1 && $daily_closed_req_left > 0 )) { ?>
< a href = " javascript: { }; " class = " mass_take_from_closed " >< span > Принять в работу </ span ></ a >
< ? php } ?>
< ? php
$unisender = new UnisenderClass ( null , $user -> agencyId );
$key = $unisender -> get_key ();
if ( ! empty ( $key )) { ?>
< a href = " javascript: { }; " class = " campaign__create_req " >< span > Создать рассылку для выбранных </ span ></ a >
< ? php } ?>
< ? php
$wazzap = new Wazzap ( $user -> agencyId );
$key = $wazzap -> get_key ();
if ( ! empty ( $key ) && $user -> added_to_wazzap ) { ?>
< a href = " javascript: { }; " class = " campaign__create_req_wazzap " >< span > Создать рассылку Whatsapp </ span ></ a >
< ? php } ?>
</ div >
</ div >
</ div >
< div style = " top: 3px; margin-right: 0px; " class = " jw__group-action-button " onclick = " to_check_req_all(); " >
< input type = " checkbox " id = " changeReqAll " class = " changeClientInput " >
< div class = " tooltip tooltip-effect " style = " z-index: 750; " >
< em style = " font-style:normal; " class = " tooltip-content tt-client clear " >
< b id = " client_toltip_text " class = " tooltip-text " > Выделить все заявки на странице </ b >
</ em >
< div id = " changeReqAllDiv " class = " group-action-button item-for-check " style = " position: relative; " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
</ div >
< div style = " top: 3px; margin-left: 15px; " class = " jw__group-action-button " onclick = " to_check_req_all_filter(); " >
< input type = " checkbox " id = " changeReqAllFilter " class = " changeClientInput " >
< div class = " tooltip tooltip-effect " style = " z-index: 750; " >
< em style = " font-style:normal; " class = " tooltip-content tt-client clear " >
< b id = " client_toltip_text2 " class = " tooltip-text " > Выделить все заявки по фильтру </ b >
</ em >
< div id = " changeReqAllFilterDiv " class = " group-action-button item-for-check " style = " position: relative; " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
</ div >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
< div style = " position:relative;display:inline-block;float:right;margin-top:10px; " >
< div id = " totalCountReqComission " class = " form-block " style = " display:block;float:left;width:auto;min-width:30px;margin-right:30px; " >
< div class = " label " style = " width: 160px; white-space: nowrap; " > Ожидаемая комиссия :</ div >
< div class = " text " > 0 </ div >
</ div >
< div id = " totalCountReq " class = " form-block " style = " display:block;float:left;width:auto;min-width:30px;margin-right:30px; " >
< div class = " label " style = " width: 50px; " > В с е г о :</ div >
< div class = " text " > 0 </ div >
</ div >
< div id = " sortOrder " class = " form-block " style = " float: right; width: 360px; " >
< ? php
$sort_order = false ;
//$sort_order = 2;
if ( isset ( $_SESSION [ 'req_sort_order' ])) {
$sort_order = $_SESSION [ 'req_sort_order' ];
}
?>
< div class = " label " style = " width: 120px; " > Сортировка :</ div >
< div class = " inputs " >
< select id = " sort_order_req " name = " sort_order_req " style = " width:100%;margin-top:3px; " >
< option value = " 0 " < ? php echo (( ! $sort_order ) ? " selected " : " " ) ?> >По умолчанию </option>
< option value = " 1 " < ? php echo (( $sort_order == " 1 " ) ? " selected " : " " ) ?> >От старого к новому</option>
< option value = " 2 " < ? php echo (( $sort_order == " 2 " ) ? " selected " : " " ) ?> >От нового к старому</option>
</ select >
</ div >
</ div >
</ div >
< div class = " clear " ></ div >
</ div >
< ? php
$endtime = microtime ( true );
$t = $endtime - $starttime ;
/* if ( $_SESSION [ 'id' ] == 5238 ){
echo $t ;
// die();
} */
?>
< div id = " requisitions_list " >
< div v - show = " isPreloader===1 " style = " text-align:center; margin-top: 25px; " >
< img src = " ../images/rocket-spinner.svg " width = " 96px " >
</ div >
< template >
< div v - if = " isList " v - show = " isPreloader===0 " class = " clients " >
< div v - for = " (item, index) in req " >
< div class = " client " : id = " 'req__'+item.id " : class = " { is_new: item.is_new, 'new': (item.no_confirm==1 && item.can_see) || (item.no_conf_doer==1 && item.can_see) || (item.deleted==1 && item.can_take_from_closed && item.who_work != user_id)} " >
< div class = " client-inner " >
< div class = " additional-info " >
< div class = " date " > {{ item . date_add }} </ div >
< div class = " type " v - html = " item.name_type " ></ div >
< div class = " stagebar " v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " >
< div v - if = " item.funnel_id == 0 " class = " crm__small-stagebar " >
< table >
< tbody >
< tr >
< td v - for = " (step, id) in item.steps.bar " class = " stage " : class = " [ { active: step.id <= item.steps.stageId }, step.classF] " : title = " step.title " >
< div v - if = " item.funnel_type == 'adjacent' " : data - stage = " step.id " : data - req = " item.id " : data - adjacent = " item.steps.adjacent_id " class = " crm__small-stage " : class = " { 'not_clicked': item.deleted==1 && item.can_take_from_closed && item.who_work != user_id} " ></ div >
< div v - else : data - stage = " step.id " : data - req = " item.id " class = " crm__small-stage " : class = " { 'not_clicked': item.deleted==1 && item.can_take_from_closed && item.who_work != user_id} " ></ div >
< span class = " next-stage " v - html = " step.name " ></ span >
</ td >
</ tr >
</ tbody >
</ table >
</ div >
< div v - else - if = " item.funnel_id > 0 " class = " crm__small-stagebar " >
< table >
< tbody >
< tr >
< td v - for = " (step, id) in item.steps.bar " : class = " 'stage stage-funnel'+step.classF+' stageFunnel__'+step.id "
: title = " step.name " >
< div v - if = " item.funnel_type == 'adjacent' "
: data - stage = " step.id "
: data - req = " item.id "
: data - adjacent = " item.steps.adjacent_id "
: data - main = " step.main "
class = " crm__small-step "
: class = " { 'not_clicked': item.deleted==1 && item.can_take_from_closed && item.who_work != user_id} " >
</ div >
< div v - else : data - stage = " step.id "
: data - req = " item.id "
: data - main = " step.main "
class = " crm__small-step "
: class = " { 'not_clicked': item.deleted==1 && item.can_take_from_closed && item.who_work != user_id} " >
</ div >
< span class = " next-stage " > {{ step . name }} </ span >
</ td >
</ tr >
< tr >
< td v - if = " item.steps.bar " : colspan = " item.steps.bar.length " >
< span class = " stepError " : id = " 'step_funnel_error'+index " ></ span >
</ td >
</ tr >
</ tbody >
</ table >
</ div >
< div v - if = " funnel_id === 'all' " style = " padding-left: 5px; " class = " client-added " >
< div class = " client-added__work " v - html = " item.name_funnel " ></ div >
</ div >
</ div >
< div v - if = " item.deleted == 1 " class = " stagebar-title " v - html = " item.steps.stage+' (закрыт)' " ></ div >
< div v - else class = " stagebar-title " v - html = " item.steps.stage " ></ div >
< div class = " funnels_adjacent " v - if = " item.funnels_adjacent.length > 0 " >
< img alt = " funnel " src = " /images/funnel.svg " />
< a : class = " { 'active_show': item.is_active_funnels_adjacent} " @ click = " open_stagebars_funnels(item.id) " href = " javascript: { }; " > {{ item . funnels_adjacent_text }} </ a >
< div class = " list_funnels " v - show = " item.is_active_funnels_adjacent " >
< span @ click = " open_stagebars_funnels(item.id) " class = " pseudo-link closer " >< i class = " ti-close " ></ i ></ span >
< div class = " list_stagebars " : id = " 'funnels_adjacent_req_'+item.id " >
< img src = " ../images/rocket-spinner.svg " width = " 45px " >
</ div >
</ div >
</ div >
< div class = " type " v - html = " item.source_name " ></ div >
< div v - show = " agencyId != 19895 || userId == 19895 " class = " addTag contract_req " style = " padding-right: 0; " >
< a href = " javascript: { }; " class = " jw__small-popup " @ click = " open_add_tag_contract(index) " title = " Добавить тег или договор " >
< i class = " ti-plus " ></ i >
</ a >
< div class = " jw__popup actions-tags " : class = " { 'show': item.add_tag_contract} " >
< div class = " actions-menu__inner " >
< div class = " inputs " >
< div class = " inputs-group " >
< div >
< v - select style = " width: 260px; " : components = " { OpenIndicator} " @ input = " change_contract_tag " placeholder = " Выбрать... " transition = " " class = " vue_select " : options = " option_contract_tag " : reduce = " name => name.code " label = " name " v - model = " add_tag_contract " />
</ div >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
</ div >
< div class = " jw__popup actions-tags " : class = " { 'show': item.add_tag} " : data - id = " item.id " data - for = " reqs " >
< div class = " actions-menu__inner " >
< div class = " inputs " >
< div class = " inputs-group " >
< div >
< v - select style = " width: 260px; " : components = " { OpenIndicator} " placeholder = " Теги " v - model = " item.activities_temp " transition = " " class = " vue_select " : options = " activities " : reduce = " name => name.id " multiple label = " name " />
</ div >
< button class = " small-button " @ click = " save_activites(index) " type = " button " > Сохранить </ button >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " tags " v - if = " !isEmpty(item.activities) " >
< div class = " tags-title " @ click = " open_popup_tag(index) " >
< div v - for = " (activit, key) in item.activities_visible " class = " tag-block " : key = " key " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color:' + activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
< div v - if = " item.activities_rest > 0 " style = " margin-left: 0px; border:none " class = " tag-block " >
< div style = " margin-top: 7px; " class = " tag-name " >< span style = " color: #757575; " > и ещё {{ item . activities_rest }} шт .</ span ></ div >
</ div >
</ div >
< div class = " jw__popup actions-tags lists " : class = " { 'show': item.popup_tag} " >
< div class = " actions-menu__inner " >
< div class = " inputs " >
< div v - for = " (activit, key) in item.activities " : key = " key " class = " tag-block list-tags " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color: '+ activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div v - if = " !isEmpty(item.contracts) " class = " contracts " : title = " 'Договора: '+ item.contracts_name " >
< i class = " ti-file " ></ i >
< span v - for = " (contract, key) in item.contracts " >
< span class = " contract_href " @ click = " open_form_contract(index, contract.id) " : class = " { 'expired': contract.expired} " v - html = " contract.name " ></ span >
< span v - if = " (key+1) < item.contracts.length " v - html = " ', ' " ></ span >
</ span >
</ div >
< div class = " actions " >
< a v - if = " !isEmpty(item.union_req) " href = " javascript: { }; " : data - id = " 'req'+item.id "
class = " no-border " title = " Заявки для объединения " @ click = " open_union_req_form(item.union_req, item.id) " >
< span style = " color: #EE6161 !important; " class = " simple-button settings " >< i class = " far fa-clone " ></ i >
</ span >
</ a >
< a v - if = " item.see_info " href = " javascript: { }; " : data - id = " 'req'+item.id "
class = " req_info no-border " title = " Подробно... " >
< span class = " simple-button settings " >< i class = " far fa-eye " ></ i >
</ span >
</ a >
< a v - if = " item.deleted==0 && item.funnel_id > 0 " href = " javascript: { }; " @ click = " openCheckList(item.funnel_id, item.id, 'req') " class = " no-border " title = " Условия чек листа " >
< span class = " simple-button settings " >< i class = " fas fa-tasks " ></ i ></ span >
</ a >
< a v - if = " item.deleted==1 && item.confirm != 10 && item.allow_edit==1 " href = " javascript: { }; " @ click = " renewReq(item.id) " class = " no-border " title = " Вернуть заявку " >
< span class = " simple-button settings " >< i class = " ti-back-right " ></ i ></ span >
</ a >
< a href = " javascript: { }; " class = " openInssmartModule no-border " title = " Заказать страховку " >
< svg xmlns = " http://www.w3.org/2000/svg " width = " 20 " height = " 20 " viewBox = " 0 0 100 100 " fill = " none " >
< g clip - path = " url(#clip0_2229_22) " >
< path d = " M99.0001 44.4162L93.3334 41.9345V37.4828C93.34 36.4511 92.8609 35.4763 92.0401 34.8512L47.6901 0.351157C47.0882 -0.117052 46.2453 -0.117052 45.6434 0.351157L30.0001 12.5195V8.33282C30.0001 6.49187 28.5077 4.99949 26.6667 4.99949H16.6667C14.8258 4.99949 13.3334 6.49187 13.3334 8.33282V25.4845L1.30841 34.8328C0.477982 35.4597 -0.00715178 36.4424 7.97164e-05 37.4828V46.5995C7.97164e-05 48.4404 1.49246 49.9328 3.33341 49.9328C4.07437 49.9331 4.7933 49.6809 5.37175 49.2178L10.0001 45.6178V94.9995C10.0001 97.7609 12.2387 99.9995 15.0001 99.9995H73.3334C73.9755 99.9992 74.6011 99.7969 75.1218 99.4212L92.3984 86.9578C97.1651 83.513 99.9918 77.9923 100 72.1112V45.9445C100 45.2815 99.6077 44.6814 99.0001 44.4162ZM16.6667 8.33282H26.6667V15.1128L16.6667 22.8912V8.33282ZM3.33341 46.5995V37.4828L12.6667 30.2262L12.6917 30.2145L46.6667 3.77782L80.6434 30.2145C80.6551 30.2145 80.6701 30.2262 80.6818 30.2345L90.0001 37.4828V40.4828L74.0001 33.4828C73.6949 33.3596 73.3595 33.3323 73.0384 33.4045L47.6901 13.6828C47.0882 13.2146 46.2453 13.2146 45.6434 13.6828L3.33341 46.5995ZM13.3334 94.9995V43.0262L46.6667 17.1112L69.5001 34.8612L47.6667 44.4162C47.0597 44.6811 46.6671 45.2804 46.6667 45.9428V59.9995H35.0001C32.2387 59.9995 30.0001 62.2381 30.0001 64.9995V96.6662H15.0001C14.0796 96.6662 13.3334 95.92 13.3334 94.9995ZM33.3334 96.6662V64.9995C33.3334 64.079 34.0796 63.3328 35.0001 63.3328H46.6667V72.1112C46.6751 77.9923 49.5018 83.513 54.2684 86.9578L60.0001 91.0928V96.6662H33.3334ZM67.7251 96.6662H63.3334V93.4995L67.7251 96.6662ZM96.6668 72.1112C96.6591 76.921 94.3477 81.4361 90.4501 84.2545L73.3334 96.6012L56.2168 84.2545C52.3192 81.4361 50.0077 76.921 50.0001 72.1112V47.0328L73.3334 36.8195L96.6668 47.0328V72.1112Z " fill = " #b7bcbc " ></ path >
< path d = " M72.6673 40.7495L54.334 48.7762C53.7269 49.0411 53.3343 49.6404 53.334 50.3028V72.1112C53.3391 75.8506 55.1364 79.3609 58.1673 81.5512L72.359 91.7878C72.9412 92.2078 73.7268 92.2078 74.309 91.7878L88.5006 81.5495C91.531 79.3596 93.3283 75.85 93.334 72.1112V50.3028C93.3336 49.6404 92.9411 49.0411 92.334 48.7762L74.0007 40.7495C73.5756 40.564 73.0924 40.564 72.6673 40.7495ZM90.0007 51.3912V72.1112C89.9972 74.7795 88.7141 77.2843 86.5507 78.8462L73.334 88.3812L60.1173 78.8478C57.9551 77.2841 56.6724 74.7796 56.6673 72.1112V51.3912L73.334 44.0962L90.0007 51.3912Z " fill = " #b7bcbc " ></ path >
< path d = " M64.4487 67.7616C64.0085 67.3491 63.3797 67.2068 62.8047 67.3894C62.2297 67.5721 61.7983 68.0512 61.6768 68.6421C61.5553 69.233 61.7625 69.8435 62.2187 70.2382L68.8854 76.2382C69.1914 76.5139 69.5886 76.6664 70.0004 76.6666C70.0701 76.667 70.1397 76.6626 70.2087 76.6532C70.6886 76.5929 71.1186 76.3271 71.3871 75.9249L84.7204 55.9249C85.0509 55.4295 85.092 54.7954 84.8282 54.2615C84.5644 53.7276 84.0358 53.375 83.4415 53.3365C82.8472 53.298 82.2775 53.5795 81.9471 54.0749L69.6837 72.4716L64.4487 67.7616Z " fill = " #b7bcbc " ></ path >
</ g >
< defs >
< clipPath id = " clip0_2229_22 " >
< rect width = " 100 " height = " 100 " fill = " white " ></ rect >
</ clipPath >
</ defs >
</ svg >
</ a >
< a v - if = " item.allow_edit==1 " href = " javascript: { }; " @ click = " getReq(index) " class = " no-border " title = " Редактировать " >
< span class = " simple-button settings " >< i class = " jw-action-icon-settings " ></ i ></ span >
</ a >
< a v - if = " item.deleted==0 && item.can_del > 0 && item.allow_edit==1 " href = " javascript: { } " : data - req = " item.id " class = " delClientAgent no-border " title = " Закрыть " >
< span class = " simple-button settings " >< i class = " ti-close " ></ i ></ span >
</ a >
< ? php
if ( $user -> agency || $user -> users_admin || $user -> role_developer ) {
?>
< a href = " javascript: { }; " v - if = " item.deleted==1 " @ click = " cancelReq(item.id) "
class = " no-border " title = " Удалить " >
< span class = " simple-button delete " >< i
class = " jw-action-icon-delete " ></ i ></ span >
</ a >
< ? php
} ?>
</ div >
</ div >
< div class = " client-name " >
< div style = " top: 3px; margin-right: 20px; " class = " jw__group-action-button " @ click = " to_check_req_new(item.id) " >
< input type = " checkbox " : id = " 'changeReq'+item.id " class = " changeReqInput " : data - id = " item.id " >
< div class = " group-action-button item-for-check " : id = " 'checked-clt'+item.id " : data - id = " item.id " >
< span class = " check-button-box " ></ span >
< span class = " check " ></ span >
</ div >
</ div >
< h2 v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " >
< a class = " toggleClient " @ click = toggleClient ( index ) href = " javascript: { } " > {{ item . name }} </ a >
</ h2 >
< h2 v - else > {{ item . name }} </ h2 >
< div v - if = " item.hot > 0 " class = " client-hot " title = " Горячий " >
< svg xmlns = " http://www.w3.org/2000/svg "
xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 "
id = " Capa_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 "
style = " enable-background:new 0 0 512 512; " xml : space = " preserve "
width = " 25px " height = " 25px " class = " " >
< g >
< g transform = " matrix(1.25 0 0 -1.25 0 45) " >
< path style = " fill:#F4511E "
d = " M398.448-179.952c0,23.5-4.18,46.008-11.847,66.843c-5.24-61.375-37.967-92.917-72.162-78.234 c-32.043,13.761-10.445,67.401-8.851,92.996C308.277-54.958,305.451-5.293,226.637,36c32.749-62.651,3.793-101.563-26.586-103.943 c-33.683-2.62-64.542,28.956-53.151,80.216c-36.884-27.179-37.967-72.925-26.586-102.52c11.869-30.847-0.467-56.477-29.423-59.325 c-32.339-3.189-50.314,34.641-33.74,94.922c-28.683-33.775-45.997-77.516-45.997-125.302C11.152-286.902,97.85-373.6,204.8-373.6 S398.448-286.902,398.448-179.952z "
data - original = " #F4900C " class = " active-path " data - old_color = " #FF7043 " />
< path style = " fill:#FFB74D "
d = " M277.418-279.146c-23.978,9.603-17.554,26.097-23.728,60.27 c-6.174,34.173-29.902,57.912-65.031,68.346c25.63-72.14-14.204-98.726-35.084-103.476c-21.324-4.853-42.751,0.012-45.2,45.644 c-24.867-24.764-40.267-59.028-40.267-96.893c0-4.186,0.199-8.325,0.567-12.415C103.652-352.245,151.729-373.6,204.8-373.6 s101.148,21.355,136.126,55.932c0.369,4.09,0.567,8.229,0.567,12.415c0,24.901-6.652,48.253-18.283,68.358 C324.885-272.026,294.026-285.798,277.418-279.146z "
data - original = " #FFCC4D " class = " " data - old_color = " #FFCC4D " />
</ g >
</ g >
</ svg >
</ div >
< div v - if = " item.priority>0 " class = " client-priority " title = " Категория клиента " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_2 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 24px " height = " 24px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 144 " ry = " 144 " : class = " 'priority'+item.priority " /></ svg >
</ div >
< div v - if = " item.union_total > 0 " class = " col " style = " margin-left: 20px; " >
< div class = " jw__action-button " >
< div v - if = " item.can_see_joint == 1 " @ click = " open_joint_req(item.id) " class = " jw__g-button " title = " Количество присоединенных заявок " > {{ item . union_total }} </ div >
< div v - else class = " jw__g-button " title = " Количество присоединенных заявок " > {{ item . union_total }} </ div >
< div style = " display: inline-block; margin-left: 20px; " ></ div >
</ div >
</ div >
</ div >
<!-- < div id = " step_details_67314 " >
</ div >-->
< div class = " main-info " : class = " { hidden: !item.isMainInfo} " style = " align-items: center; " >
< div v - if = " (item.type_id == 2 || item.heir_type == 2) && !isEmpty(item.object) " class = " col client-object " style = " margin-right: 20px; " >
< a style = " border: none; " href = " javascript: { } " @ click = " openObject(item.object_id) " >
< template v - if = " item.object.photo1 " >
< img
: src = " item.object.photo1 "
alt = " Фото объекта "
style = " width: 40px; height: 40px; object-fit: cover; border-radius: 6px; "
>
</ template >
< template v - else >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_1 " x = " 0px " y = " 0px " width = " 40px " height = " 40px " viewBox = " 0 0 217.267 217.267 " style = " enable-background:new 0 0 217.267 217.267; " xml : space = " preserve " >
< g >
< path d = " M163.627,138.057c1.94,0,3.505-1.564,3.505-3.505V83.749c0-1.937-1.564-3.504-3.505-3.504 c-1.937,0-3.504,1.567-3.504,3.504v50.803C160.123,136.493,161.69,138.057,163.627,138.057z " fill = " #999999 " ></ path >
< path d = " M108.633,0C48.73,0,0,48.732,0,108.633c0,29.931,12.167,57.071,31.816,76.738c0.014,0.014,0.017,0.034,0.031,0.048 s0.032,0.018,0.046,0.031c19.666,19.646,46.807,31.815,76.74,31.815c59.901,0,108.634-48.731,108.634-108.633S168.531,0,108.633,0 z M108.633,7.009c26.758,0,51.12,10.416,69.285,27.379l-26.936,26.938H52.564c-9.661,0-17.521,7.861-17.521,17.521v59.573 c0,9.661,7.861,17.521,17.521,17.521h3.805l-21.979,21.978C17.42,159.753,7.009,135.394,7.009,108.633 C7.009,52.599,52.595,7.009,108.633,7.009z M86.196,108.63c0-12.363,10.056-22.42,22.417-22.42c4.921,0,9.466,1.615,13.172,4.313 l-1.875,1.875c-3.207-2.24-7.094-3.564-11.297-3.564c-10.913,0-19.789,8.879-19.789,19.792c0,4.195,1.321,8.09,3.559,11.3 l-1.874,1.868C87.811,118.095,86.196,113.554,86.196,108.63z M131.034,108.63c0,12.364-10.054,22.418-22.418,22.418 c-4.915,0-9.449-1.608-13.145-4.298l1.874-1.876c3.203,2.231,7.082,3.546,11.274,3.546c10.91,0,19.794-8.877,19.794-19.791 c0-4.187-1.321-8.071-3.549-11.272l1.875-1.875C129.433,99.181,131.034,103.717,131.034,108.63z M95.833,108.63 c0-7.051,5.735-12.784,12.78-12.784c2.257,0,4.347,0.639,6.184,1.668l-17.304,17.306C96.469,112.972,95.833,110.885,95.833,108.63 z M121.397,108.63c0,7.049-5.735,12.782-12.781,12.782c-2.244,0-4.322-0.633-6.158-1.652l17.29-17.289 C120.769,104.31,121.397,106.383,121.397,108.63z M90.467,131.753c5.005,3.936,11.298,6.311,18.146,6.311 c16.229,0,29.431-13.206,29.431-29.431c0-6.848-2.375-13.141-6.311-18.149l22.148-22.146h10.814 c5.797,0,10.513,4.717,10.513,10.513v59.573c0,5.797-4.716,10.513-10.513,10.513H73.289L90.467,131.753z M126.784,85.523 c-5.007-3.948-11.311-6.326-18.168-6.326c-16.23,0-29.426,13.204-29.426,29.429c0,6.858,2.375,13.158,6.321,18.172l-22.136,22.135 H52.561c-5.797,0-10.513-4.716-10.513-10.514V78.847c0-5.795,4.716-10.513,10.513-10.513h91.413L126.784,85.523z M108.633,210.257 c-26.759,0-51.12-10.417-69.287-27.377l26.934-26.939h98.422c9.66,0,17.521-7.86,17.521-17.521V78.847 c0-9.661-7.861-17.521-17.521-17.521h-3.806l21.977-21.979c16.968,18.17,27.381,42.529,27.381,69.287 C210.258,164.667,164.667,210.257,108.633,210.257z " fill = " #999999 " ></ path >
< path d = " M53.002,54.317h23.654c1.937,0,3.504-1.567,3.504-3.504s-1.567-3.504-3.504-3.504H53.002 c-1.938,0-3.504,1.567-3.504,3.504S51.064,54.317,53.002,54.317z " fill = " #999999 " ></ path >
</ g >
</ svg >
</ template >
</ a >
</ div >
< div v - if = " !isEmpty(item.object) " class = " col client-object " style = " max-width: 45%; " >
< p v - if = " item.type_id != 2 && item.heir_type != 2 " class = " small " > Тип объекта </ p >
< p >
< b class = " big " >
< a style = " word-break: normal; border: none; text-decoration: none; white-space: normal; display: inline-block; " href = " javascript: { } " @ click = " openObject(item.object_id) " >
{{ item . object . nazv }}
</ a >
<!--< template v - if = " item.type_id == 4 || item.heir_type == 4 " >
< a target = " _blank " : href = " '/object.php?id='+item.object_id " v - html = " item.object.nazv " ></ a >
</ template >
< template v - else >
< a : data - id = " item.object_id "
: data - req = " item.id "
class = " show_object "
href = " javascript: { } " v - html = " item.object.nazv "
@ click = " showObject(item.id) "
>
</ a >
</ template >-->
</ b >
</ p >
</ div >
< div v - if = " !isEmpty(item.complex_room_id) " class = " col client-object " >
< p class = " small " > Объект </ p >
< p style = " margin-top: 10px; " >
< b class = " big " >
< a style = " border: none; text-decoration: none; " : href = " `/complexes/#/apartments/ ${ item.complex_room_id } ` " target = " _blank " v - html = " item.complex_room_number " ></ a >
</ b >
</ p >
</ div >
< div v - if = " item.object.komnat && (item.type_id == 2 || item.heir_type == 2) " class = " col client-object " >
< p class = " small " > Тип объекта </ p >
< p style = " margin-top: 10px; " >
< b class = " big " >
< span >
{{ item . object . studio_flag == 1 ? 'Студия' : `${item.object.komnat}-к кв.` }}
</ span >
</ b >
</ p >
</ div >
< div v - if = " item.object.ploshad && (item.type_id == 2 || item.heir_type == 2) " class = " col client-object " >
< p class = " small " > Площадь </ p >
< p style = " margin-top: 10px; " >
< b class = " big " >
< span >
{{ item . object . ploshad }}
</ span >
</ b >
</ p >
</ div >
< div v - if = " !isEmpty(item.client) && item.see_client " class = " col client-object " >
< p class = " small " > Клиент </ p >
< p : style = " (item.type_id == 2 && item.heir_type == 2) ? 'margin-top: 9px;' : '' " >
< b class = " big " v - if = " item.see_modal_client == 1 " >
< a style = " border: none; text-decoration: none; " href = " javascript: { }; " : data - id = " item.client.value " class = " neweditClient " : title = " item.client.phone_email " >
< span v - html = " item.client.fio " ></ span >
</ a >
</ b >
< b class = " big " v - else >
< a href = " javascript: { }; " : title = " item.client.phone_email " >
< span v - html = " item.client.fio " ></ span >
</ a >
</ b >
< ? php
if ( $user -> agencyId != 19895 ) { ?>
< a style = " border-bottom: none; font-size:18px; margin-left: 5px; " @ click = " openCardClient(item.client_id) " href = " javascript: { } " title = " История и Задачи (клиент) " >< i class = " fa fa-chalkboard-teacher " ></ i ></ a >
< ? php } ?>
</ p >
</ div >
< div class = " col " >
< div class = " jw__action-button " >
< div v - if = " item.funnel_type == 'adjacent' " class = " jw__g-button req-events-new " : data - id = " item.id " : data - adjacent = " item.steps.adjacent_id " > История и задачи </ div >
< div v - else class = " jw__g-button req-events-new " : data - id = " item.id " > История и задачи </ div >
< ? php if ( $user -> can ( 'autosearch' )) : ?>
< div v - if = " !isEmpty(item.autosearch.filter) && ((item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common)) " style = " display: inline-block; margin-left: 20px; " >
< div v - if = " (item.autosearch.error || item.autosearch.active > 0 || item.autosearch.count > 0) && (item.type_id == 1 || item.heir_type == 1) " @ click = " showAutoSearchObjects(item.autosearch_id, $event ) " title = " Автопоиск объектов " class = " jw__g-button fltr-objects-list " : data - id = " item.autosearch_id " style = " z-index: 1 " >
Автопоиск
< span v - show = " item.autosearch.count > 0 " : title = " 'В с е г о объектов: ' + item.autosearch.total + ', новых: ' + item.autosearch.count " : class = " [ { 'has-error': item.autosearch.error }, 'counter'] " v - text = " '+' + item.autosearch.count " ></ span >
< span v - show = " !isEmpty(item.autosearch.error) " : title = " item.autosearch.error " : class = " [ { 'with-counter': item.autosearch.count > 0 }, 'error'] " >< i class = " ti-alert " ></ i ></ span >
</ div >
</ div >
< ? php endif ; ?>
</ div >
</ div >
< div class = " col " >
< div v - if = " item.deleted==0 && (item.deposit > 0 || item.expected_commission > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . expected_commission }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Oжида е ма я комиссия :</ span > {{ item . expected_commission }} </ div >
< div >< span class = " custom-resp " > Доплата :</ span > {{ item . expected_commission - item . deposit }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div v - else - if = " item.deleted==1 && item.confirm==10 && (item.deposit > 0 || item.summa > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . summa }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Фактическая комиссия :</ span > {{ item . summa }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div class = " clear " ></ div >
</ div >
< div class = " client-added " >
< div class = " client-added__by " v - html = " 'ID: '+item.id " ></ div >
< div class = " client-added__by " v - html = " 'Добавил '+item.manager " ></ div >
< div class = " client-added__work " v - if = " item.confirm==0 && item.who_work > 0 " v - html = " 'Должен принять в работу '+item.master_work " ></ div >
< template v - else - if = " item.confirm>0 && item.who_work && item.deleted == 1 " >
< div class = " client-added__work " v - html = " 'Был в работе у '+item.master_work " ></ div >
< div class = " client-added__work " v - html = " 'Закрыл '+item.master_delete " ></ div >
</ template >
< div v - else - if = " item.who_work > 0 " class = " client-added__work " v - html = " 'В работе у '+item.master_work " ></ div >
< div v - if = " !isEmpty(item.doer_yes) " class = " client-added__work " > Совместная работа :
< template v - for = " doer_fio in item.doer_yes " >
< span v - html = " doer_fio " ></ span >< br >
</ template >
</ div >
< div v - if = " !isEmpty(item.doer_no) " class = " client-added__work " > Приглашен к совместной работе :
< template v - for = " doer_fio in item.doer_no " >
< span v - html = " doer_fio " ></ span >< br >
</ template >
</ div >
</ div >
< div v - if = " !isEmpty(item.description) " class = " client_row row_line " : class = " { hidden: !item.isMainInfo} " >
< p class = " small " > Описание </ p >
< p class = " desc " v - html = " item.description " ></ p >
</ div >
< div v - if = " !isEmpty(item.autosearch_info) && (item.type_id==1 || item.heir_type == 1) " class = " client_row row_line " : class = " { hidden: !item.isMainInfo} " >
< p class = " small " > Параметры поиска объектов </ p >
< p class = " desc " v - html = " item.autosearch_info " ></ p >
< p class = " desc " v - html = " item.autosearch_comment " style = " display:-webkit-box;max-width:100%;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden; " ></ p >
< a style = " margin-right: 20px; " @ click = " openAutoSearchFiltr(item.id, item.asfilter_id); " title = " Редактировать параметры автопоиска " href = " javascript: { } " >
< i class = " ti-pencil " ></ i >< span > Редактировать </ span >
</ a >
</ div >
< div v - if = " item.deleted > 0 " class = " client_row row_line " : class = " { hidden: !item.isMainInfo} " >
< p class = " small " > Причина закрытия </ p >
< p class = " desc " v - html = " item.reason " ></ p >
</ div >
</ div >
</ div >
< template v - if = " item.no_confirm == 1 || item.no_conf_doer == 1 " >
< div v - show = " item.can_see " class = " client-confirm " : id = " 'req-confirm__'+item.id " >
< div class = " client-confirm__inner " >
< h3 > Взять заявку в работу </ h3 >
< div class = " client-confirm__buttons " >
< template v - if = " item.who_work != 0 " >
< a class = " unconfirmClient small-button " data - id = " 0 "
: data - tr = " item.no_conf_doer "
: data - manager = " item.user_id "
: data - req = " item.id "
href = " javascript: { }; " > Нет </ a >
< a class = " confirmClient small-green-button "
data - id = " 0 " : data - tr = " item.no_conf_doer "
: data - req = " item.id "
: data - manager = " user_id "
href = " javascript: { }; " > Да </ a >
</ template >
< template v - else >
< a v - if = " item.funnel_type == 'adjacent' "
class = " confirmClientGeneral small-green-button "
data - id = " 0 " : data - tr = " item.no_conf_doer "
: data - req = " item.id "
data - id = " 0 " : data - tr = " item.no_conf_doer "
: data - adjacent = " item.steps.adjacent_id "
: data - manager = " user_id " href = " javascript: { }; " > Да </ a >
< a v - else class = " confirmClientGeneral small-green-button "
data - id = " 0 " : data - tr = " item.no_conf_doer " : data - req = " item.id "
: data - manager = " user_id " href = " javascript: { }; " > Да </ a >
</ template >
</ div >
</ div >
< div class = " client-confirm__preloader "
: id = " 'req-confirm__preloader__'+item.id " style = " display: none; " >
< img src = " /images/ajax_preloader.gif " >
</ div >
</ div >
</ template >
< template v - else - if = " item.no_conf_doer == 1 && item.user_id == user_id " >
< div class = " client-confirm " : id = " 'req-confirm__'+item.id " >
< div class = " client-confirm__inner " >
< h3 > Вы передали , ожидает подтверждения </ h3 >
< div class = " client-confirm__buttons " >
< a class = " unconfirmClient small-button " data - id = " 0 "
: data - req = " item.id "
: data - manager = " item.user_id "
href = " javascript: { }; " > Отменить </ a >
</ div >
</ div >
< div class = " client-confirm__preloader "
: id = " 'req-confirm__preloader__'+item.id " style = " display: none; " >
< img src = " /images/ajax_preloader.gif " >
</ div >
</ div >
</ template >
< template v - else - if = " item.deleted==1 && item.can_take_from_closed && item.who_work != user_id " >
< div v - show = " item.can_see " class = " client-confirm " : id = " 'req-confirm__'+item.id " >
< div class = " client-confirm__inner " >
< h3 > Взять заявку в работу </ h3 >
< div class = " client-confirm__buttons " >
< template v - if = " item.who_work != 0 " >
< a class = " confirmClientClosed small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - manager = " user_id "
data - tr = " 0 "
data - deleted = " 1 "
href = " javascript: { }; " > Да </ a >
</ template >
< template v - else >
< a v - if = " item.funnel_type == 'adjacent' "
class = " confirmClientGeneral small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - adjacent = " item.steps.adjacent_id "
: data - manager = " user_id "
data - tr = " 0 "
data - deleted = " 1 "
href = " javascript: { }; " > Да </ a >
< a v - else class = " confirmClientGeneral small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - manager = " user_id "
href = " javascript: { }; " > Да </ a >
</ template >
</ div >
</ div >
< div class = " client-confirm__preloader "
: id = " 'req-confirm__preloader__'+item.id " style = " display: none; " >
< img src = " /images/ajax_preloader.gif " >
</ div >
</ div >
</ template >
< div class = " clear " ></ div >
</ div >
< div v - show = " all_pages > 1 " class = " f-system_pagination " style = " float: left; " >< center >< ul class = " pagination " style = " display: inline-flex; " >
< template v - if = " page==1 " >
< li class = active >< a href = 'javascript:{}' > 1 </ a ></ li >
</ template >
< template v - else >
< li >< a href = " javascript: { } " @ click = " pagin(prevPage) " : data - page = " prevPage " >& laquo ; </ a ></ li >
< li >< a href = " javascript: { } " @ click = " pagin(1) " data - page = " 1 " > 1 </ a ></ li >
</ template >
< template v - if = " all_pages > 8 && page > 4 " >
< li >< a href = " javascript: { } " >...</ a ></ li >
</ template >
< template v - for = " pp in pagePagin " >
< li : class = " { active:pp==page} " >< a href = " javascript: { } " @ click = " pagin(pp) " : data - page = " pp " > {{ pp }} </ a ></ li >
</ template >
< template v - if = " all_pages > 8 && page < all_pages - 4 " >
< li >< a href = " javascript: { } " >...</ a ></ li >
</ template >
< template v - if = " page == all_pages " >
< li class = " active " >< a href = " javascript: { } " @ click = " pagin(all_pages) " : data - page = " all_pages " > {{ all_pages }} </ a ></ li >
</ template >
< template v - else >
< li >< a href = " javascript: { } " @ click = " pagin(all_pages) " : data - page = " all_pages " > {{ all_pages }} </ a ></ li >
< li >< a href = " javascript: { } " @ click = " pagin(page+1) " data - page = " page+1 " >& raquo ; </ a ></ li >
</ template >
</ ul >
< span style = " padding-left: 15px; float: none; border: none; height: 40px; " class = " control-group kol_find " > перейти на < input id = " requisitionPageNumberInputForManualGoToPage " type = " number " maxlength = " 6 " class = " number text small-input no-mrg-left " placeholder = " № стр. " @ keypress = " goToRequisitionsPage( $event ) " /></ span >
</ center ></ div >
< div class = " clear " ></ div >
</ div >
<!--- Канбан ---->
< div class = " kanban__rails " v - if = " isKanban && !isEmpty(req) " v - show = " isPreloader===0 " >
< div class = " kanban " id = " kanban___list " ref = " kanbanList " @ scroll = " kanbanListScroll " >
< div class = " kanban__stages " v - if = " funnel_id==0 " >
< div v - for = " (step, index) in steps " class = " kanban__stage " : class = " step.classF " >
< div class = " kanban__head " >
< table class = " stage_header " >
< tr >
< td class = " title-text " v - html = " step.name " ></ td >
< td class = " task-count-holder " >
< div class = " circle-progress " ></ div >
< div class = " task-count-percent " : style = " 'color: '+step.color_step " ></ div >
< div class = " task-count " : style = " 'background-color: '+step.color_step " v - html = " req.count[step.id]||0 " ></ div >
</ td >
<!--< td v - else class = " task-count " > 0 </ td >-->
</ tr >
</ table >
</ div >
</ div >
</ div >
< div class = " kanban__stages " v - else - if = " funnel_id > 0 " >
< div v - for = " (step, index) in steps " class = " kanban__stage " : class = " 'stage-'+index+' stage-step-'+step.id " >
< div class = " kanban__head " : style = " 'border-color: '+step.color_step " >
< table class = " stage_header " >
< tr >
< td class = " title-text " v - html = " step.name " ></ td >
< template v - if = " !isEmpty(req.count[step.id]) " >
< td class = " task-count-holder " >
< div class = " circle-progress " ></ div >
< div class = " task-count-percent " : style = " 'color: '+step.color_step " ></ div >
< div class = " task-count " : style = " 'background-color: '+step.color_step " v - html = " req.count[step.id]||0 " ></ div >
</ td >
</ template >
< template v - else >
< td class = " task-count-holder " >
< div class = " circle-progress " ></ div >
< div class = " task-count-percent " : style = " 'color: '+step.color_step " ></ div >
< div class = " task-count " : style = " 'background-color: '+step.color_step " v - html = " req.count[step.id]||0 " ></ div >
</ td >
</ template >
</ tr >
</ table >
</ div >
</ div >
</ div >
< div v - if = " funnel_id==0 " class = " kanban__items-lists " >
< div v - for = " (step, index) in steps " class = " kanban__items-list " : class = " step.classF " >
< ul class = " kanban__sortable connectedSortable " : data - stage = " step.id " >
< li v - if = " req[step.id] && !isEmpty(req[step.id][index].id) "
v - for = " (item, index) in req[step.id] "
class = " kanban__item "
: class = " ['p' + item.priority,
( item . who_work !== 0 && item . deleted === 1 && ! item . can_see_contact_closed ) || ( item . who_work === 0 && ( item . deleted === 1 || ! item . can_see_contact_common ))
? 'no-drag' : ''
] "
: id = " 'kanban_item_li_'+item.id " >
< div class = " kanban__item-inner " : id = " 'client_kanban_'+item.id " >
< div class = " title-kanban " : title = " item.name " >< span v - html = " item.name " ></ span ></ div >
< div v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " style = " display: inline " >
< div class = " kanban__item-settings get_req_index " @ click = " getReq(index) " >
< i class = " jw-action-icon-settings " title = " Редактировать " ></ i >
</ div >
< div v - if = " item.hot " class = " kanban__item-icon-fire " title = " Горячий " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 19px " height = " 19px " class = " " >
< g >< g transform = " matrix(1.25 0 0 -1.25 0 45) " >
< path style = " fill:#F4511E " d = " M398.448-179.952c0,23.5-4.18,46.008-11.847,66.843c-5.24-61.375-37.967-92.917-72.162-78.234 c-32.043,13.761-10.445,67.401-8.851,92.996C308.277-54.958,305.451-5.293,226.637,36c32.749-62.651,3.793-101.563-26.586-103.943 c-33.683-2.62-64.542,28.956-53.151,80.216c-36.884-27.179-37.967-72.925-26.586-102.52c11.869-30.847-0.467-56.477-29.423-59.325 c-32.339-3.189-50.314,34.641-33.74,94.922c-28.683-33.775-45.997-77.516-45.997-125.302C11.152-286.902,97.85-373.6,204.8-373.6 S398.448-286.902,398.448-179.952z " data - original = " #F4900C " class = " active-path " data - old_color = " #FF7043 " ></ path >
< path style = " fill:#FFB74D " d = " M277.418-279.146c-23.978,9.603-17.554,26.097-23.728,60.27 c-6.174,34.173-29.902,57.912-65.031,68.346c25.63-72.14-14.204-98.726-35.084-103.476c-21.324-4.853-42.751,0.012-45.2,45.644 c-24.867-24.764-40.267-59.028-40.267-96.893c0-4.186,0.199-8.325,0.567-12.415C103.652-352.245,151.729-373.6,204.8-373.6 s101.148,21.355,136.126,55.932c0.369,4.09,0.567,8.229,0.567,12.415c0,24.901-6.652,48.253-18.283,68.358 C324.885-272.026,294.026-285.798,277.418-279.146z " data - original = " #FFCC4D " class = " " data - old_color = " #FFCC4D " ></ path >
</ g ></ g >
</ svg >
</ div >
< div v - if = " item.priority>0 " class = " kanban__item-icon2 " title = " Категория клиента " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_2 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 19px " height = " 19px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 150 " ry = " 150 " : class = " 'priority'+item.priority " /></ svg >
</ div >
< ? php if ( ! should_hide_contacts_for_current_user ()) : ?>
< div class = " kanban__item-icon " >
< a class = " whatsappBtn_mini " style = " padding-left: 6px; " target = " _blank " : href = " 'https://t.me/+'+item.phone " >
< img style = " width:16px " src = " /images/telegram.png " >
</ a >
</ div >
< div class = " kanban__item-icon " >
< a class = " whatsappBtn_mini " target = " _blank " : href = " 'https://wa.me/'+item.phone " >
< img src = " /images/whatsapp_mini.png " >
</ a >
</ div >
< ? php endif ; ?>
< div style = " margin-right: 7px; " v - if = " !isEmpty(item.union_req) " class = " kanban__item-icon " >
< a style = " color: #EE6161 !important; " href = " javascript: { }; " @ click = " open_union_req_form(item.union_req, item.id) " >< i class = " far fa-clone " ></ i ></ a >
</ div >
</ div >
< hr class = " kanban-line " >
< table class = " kanban__item-name " >
< tr >
< ? php
if ( $user -> agencyId != 19895 ) { ?>
< td class = " kanban__item-name-name "
: class = " { 'no-hover': !((item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common))} "
: data - id = " item.id "
: title = " item.fio + ' ' + item.phone " >
< span v - if = " !( (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) ) "
v - html = " item.fio " >
</ span >
< a v - else
href = " javascript: { } "
@ click = " openCardClient(item.client_id, true) "
v - html = " item.fio " >
</ a >
</ td >
< ? php } ?>
< td class = " kanban__item-name-date " v - html = " item.date_add " ></ td >
</ tr >
</ table >
< div v - if = " item.object_id>0 && (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " class = " kanban__item-object " >
< div class = " kanban-out " > Объект :</ div >
< template v - if = " item.type_id == 4 || item.heir_type == 4 " >
< a target = " _blank " : href = " '/object.php?id='+item.object_id " v - html = " item.nazv " ></ a >
</ template >
< template v - else >
< a : data - id = " item.object_id "
: data - req = " item.id "
class = " show_object "
href = " javascript: { } " v - html = " item.nazv "
@ click = " showObject(item.id) " >
</ a >
</ template >
</ div >
< div v - if = " item.complex_room_id>0 " class = " kanban__item-object " >
< div class = " kanban-out " > Объект :</ div >
< a target = " _blank " : href = " '/complexes/#/apartments/'+item.complex_room_id " v - html = " item.complex_room_number " ></ a >
</ div >
< div v - if = " item.who_work>0 " class = " kanban__item-header " : data - id = " item.id " >
< div class = " kanban-out " > Ответственный :</ div >
< span v - html = " item.master_work " ></ span >
</ div >
< div class = " kanban__item-tag " >
< div class = " kanban-out " > Тип :</ div >
< span class = " type " v - html = " item.name_type " ></ span >
</ div >
< div v - if = " item.deleted === 1 " class = " kanban__item-tag " >
< div class = " kanban-out " > Статус :</ div >
< span v - if = " item.deleted === 1 " v - html = " item.confirm === 10 ? '<span class= \ 'completed \ '>Закрыт успешно</span>' : '<span class= \ 'deleted \ '>Закрыт</span>' " ></ span >
</ div >
< div v - if = " !isEmpty(item.activities) " class = " kanban__item-tag tags tooltip-wrapper " >
< div class = " tags-title " @ click = " open_popup_tag(index) " >
< div v - for = " (activit, key) in item.activities_visible " class = " tag-block " : key = " key " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color:' + activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
< div v - if = " item.activities_rest > 0 " style = " margin-left: 0px; border:none " class = " tag-block " >
< div style = " margin-top: 7px; " class = " tag-name " >< span style = " color: #757575; " > и ещё {{ item . activities_rest }} шт .</ span ></ div >
</ div >
</ div >
< div class = " custom-tooltip " >
< div v - for = " (activit, key) in item.activities " class = " tag-block list-tags " : key = " key " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color:' + activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
</ div >
</ div >
< div class = " kanban__item-tag " >
< div class = " kanban-out " > ID :</ div >
< span class = " type " v - html = " item.id " ></ span >
</ div >
< div v - if = " item.deleted==0 && (item.deposit > 0 || item.expected_commission > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . expected_commission }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Oжида е ма я комиссия :</ span > {{ item . expected_commission }} </ div >
< div >< span class = " custom-resp " > Доплата :</ span > {{ item . expected_commission - item . deposit }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div v - else - if = " item.deleted==1 && item.confirm==10 && (item.deposit > 0 || item.summa > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . summa }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Фактическая комиссия :</ span > {{ item . summa }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php if ( $user -> can ( 'autosearch' )) : ?>
< div v - if = " !isEmpty(req['req' + item.id].autosearch.filter) && (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " style = " display: inline-block; " >
< div v - if = " (req['req' + item.id].autosearch.error || req['req' + item.id].autosearch.active > 0 || req['req' + item.id].autosearch.count > 0) && (req['req' + item.id].type_id == 1 || req['req' + item.id].heir_type == 1) " @ click = " showAutoSearchObjects(req['req' + item.id].autosearch_id, $event ) " title = " Автопоиск объектов " class = " jw__g-button fltr-objects-list " : data - id = " req['req' + item.id].autosearch_id " style = " z-index: 1; margin-top: 5px; " >
Автопоиск
< span v - show = " req['req' + item.id].autosearch.count > 0 " : title = " 'В с е г о объектов: ' + req['req' + item.id].autosearch.total + ', новых: ' + req['req' + item.id].autosearch.count " : class = " [ { 'has-error': req['req' + item.id].autosearch.error }, 'counter'] " >+ {{ req [ 'req' + item . id ] . autosearch . count }} </ span >
< span v - show = " !isEmpty(req['req' + item.id].autosearch.error) " : title = " req['req' + item.id].autosearch.error " : class = " [ { 'with-counter': req['req' + item.id].autosearch.count > 0 }, 'error'] " >< i class = " ti-alert " ></ i ></ span >
</ div >
</ div >
< ? php endif ; ?>
< div v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " class = " kanban__item-tasks " style = " flex-direction: column; " >
< div class = " kanban__item-tasks " >
< div class = " kanban__item-tasks__added " >
< a href = " javascript: { } " class = " req-events-new " : data - id = " item.id " >
< div class = " custom-all-tasks " > В с е задачи </ div >
< div v - if = " item.events_res > 0 || item.events_res1 > 0 || item.events_res2 > 0 " class = " tooltip-wrapper " >
< span v - if = " item.events_res>0 " class = " jw__tab__counter " style = " background: #dd6360 " v - html = " item.events_res " ></ span >
< span v - else - if = " item.events_res1>0 " class = " jw__tab__counter " style = " background: #efcd81 " v - html = " item.events_res1 " ></ span >
< span v - else - if = " item.events_res2>0 " class = " jw__tab__counter " style = " background: #4CAF50 " v - html = " item.events_res2 " ></ span >
< div v - if = " Array.isArray(item.tasks_data) && item.tasks_data.length > 0 " class = " custom-tooltip " >
< div class = " modal-head-text " > Задачи </ div >< br />
< div class = " custom-ul " >
< div class = " custom-li " v - for = " (task, index) in item.tasks_data " : key = " index " >
< div class = " custom-head " >
< div > {{ task . name }} </ div >
< div > {{ task . schedule_date }} </ div >
</ div >
< div >< span class = " custom-resp " > Ответственный :</ span > {{ task . responsible }} </ div >
< div >< span class = " custom-resp " > Описание :</ span > {{ task . comment }} </ div >
</ div >
</ div >
</ div >
</ div >
</ a >
</ div >
< a href = " javascript: { } " : data - id = " item.id " class = " kanban__item__add-task " >< i class = " jw-action-icon-plus " ></ i > Новая задача </ a >
< div class = " chat-history__actions_new " : id = " 'kanban_task_add_'+item.id " >
< div class = " inner " >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-call " >< span class = " simple-button call " > Звонок </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-meeting " >< span class = " simple-button meeting " > Встреча </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-showing " >< span class = " simple-button showing " > Показ </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-deal " >< span class = " simple-button deal " > Сделка </ span ></ a >
</ div >
</ div >
</ div >
< hr class = " kanban-line-b " >
< a v - if = " Array.isArray(item.tasks_data) && item.tasks_data.length > 0 " href = " javascript: { } " style = " border-bottom: unset; " class = " req-events-new " : data - id = " item.id " >
< div v - if = " item.events_res > 0 || item.events_res1 > 0 || item.events_res2 > 0 " class = " tooltip-wrapper " >
< div class = " custom-task-all " >
< div class = " custom-task " > Последняя задача </ div >
< div class = " custom-ul " >
< div class = " kanban_task_foot " : style = " { backgroundColor: item.tasks_data[item.tasks_data.length - 1].bgColor } " >
< div class = " kanban_task_head " >
< div : style = " { color: item.tasks_data[item.tasks_data.length - 1].textColor } " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . name }} </ div >
< div > {{ item . tasks_data [ item . tasks_data . length - 1 ] . schedule_date }} </ div >
</ div >
<!-- < div class = " custom-info " >< div class = " kanban_task_resp " > Ответственный :</ div >< div class = " kanban_task-text " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . responsible }} </ div ></ div > -->
< div class = " custom-info " >< div class = " kanban_task_resp " > Описание :</ div > < div class = " kanban_task-text " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . comment }} </ div ></ div >
</ div >
</ div >
</ div >
</ div >
</ div >
</ a >
</ div >
</ div >
</ li >
</ ul >
</ div >
< div v - if = " funnel_id>0 " class = " kanban__items-lists " >
< div v - for = " (step, index) in steps " class = " kanban__items-list " : class = " 'stage-'+index+' stage-step-'+step.id " >
< ul : id = " 'ul_req_step_'+step.id " class = " kanban__sortable connectedSortable " : data - stage = " step.id " >
< li v - if = " req[step.id] && !isEmpty(req[step.id][index].id) "
v - for = " (item, index) in req[step.id] "
class = " kanban__item "
: class = " ['p' + item.priority,
( item . who_work !== 0 && item . deleted === 1 && ! item . can_see_contact_closed ) || ( item . who_work === 0 && ( item . deleted === 1 || ! item . can_see_contact_common ))
? 'no-drag' : ''
] "
: id = " 'kanban_item_li_'+item.id " >
< div class = " kanban__item-inner " : id = " 'client_kanban_'+item.id " >
< div class = " title-kanban " : title = " item.name " >< span v - html = " item.name " ></ span ></ div >
< div v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " style = " display: inline " >
< div class = " kanban__item-settings get_req_index " @ click = " getReq(index) " >
< i class = " jw-action-icon-settings " title = " Редактировать " ></ i >
</ div >
< div v - if = " item.hot " class = " kanban__item-icon-fire " title = " Горячий " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_1 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 19px " height = " 19px " class = " " >
< g >< g transform = " matrix(1.25 0 0 -1.25 0 45) " >
< path style = " fill:#F4511E " d = " M398.448-179.952c0,23.5-4.18,46.008-11.847,66.843c-5.24-61.375-37.967-92.917-72.162-78.234 c-32.043,13.761-10.445,67.401-8.851,92.996C308.277-54.958,305.451-5.293,226.637,36c32.749-62.651,3.793-101.563-26.586-103.943 c-33.683-2.62-64.542,28.956-53.151,80.216c-36.884-27.179-37.967-72.925-26.586-102.52c11.869-30.847-0.467-56.477-29.423-59.325 c-32.339-3.189-50.314,34.641-33.74,94.922c-28.683-33.775-45.997-77.516-45.997-125.302C11.152-286.902,97.85-373.6,204.8-373.6 S398.448-286.902,398.448-179.952z " data - original = " #F4900C " class = " active-path " data - old_color = " #FF7043 " ></ path >
< path style = " fill:#FFB74D " d = " M277.418-279.146c-23.978,9.603-17.554,26.097-23.728,60.27 c-6.174,34.173-29.902,57.912-65.031,68.346c25.63-72.14-14.204-98.726-35.084-103.476c-21.324-4.853-42.751,0.012-45.2,45.644 c-24.867-24.764-40.267-59.028-40.267-96.893c0-4.186,0.199-8.325,0.567-12.415C103.652-352.245,151.729-373.6,204.8-373.6 s101.148,21.355,136.126,55.932c0.369,4.09,0.567,8.229,0.567,12.415c0,24.901-6.652,48.253-18.283,68.358 C324.885-272.026,294.026-285.798,277.418-279.146z " data - original = " #FFCC4D " class = " " data - old_color = " #FFCC4D " ></ path >
</ g ></ g >
</ svg >
</ div >
< div v - if = " item.priority>0 " class = " kanban__item-icon2 " title = " Категория клиента " >
< svg xmlns = " http://www.w3.org/2000/svg " xmlns : xlink = " http://www.w3.org/1999/xlink " version = " 1.1 " id = " Capa_2 " x = " 0px " y = " 0px " viewBox = " 0 0 512 512 " style = " enable-background:new 0 0 512 512; " xml : space = " preserve " width = " 19px " height = " 19px " class = " " >
< ellipse cx = " 256 " cy = " 256 " rx = " 150 " ry = " 150 " : class = " 'priority'+item.priority " /></ svg >
</ div >
< ? php if ( ! should_hide_contacts_for_current_user ()) : ?>
< div class = " kanban__item-icon " >
< a class = " whatsappBtn_mini " style = " padding-left: 6px; " target = " _blank " : href = " 'https://t.me/+'+item.phone " >
< img style = " width:16px " src = " /images/telegram.png " >
</ a >
</ div >
< div class = " kanban__item-icon " >
< a class = " whatsappBtn_mini " target = " _blank " : href = " 'https://wa.me/'+item.phone " >
< img src = " /images/whatsapp_mini.png " >
</ a >
</ div >
< ? php endif ; ?>
< div style = " margin-right: 7px; " v - if = " !isEmpty(item.union_req) " class = " kanban__item-icon " >
< a class = " whatsappBtn_mini " style = " color: #EE6161 !important; " @ click = " open_union_req_form(item.union_req, item.id) " href = " javascript: { }; " >< i class = " far fa-clone " ></ i ></ a >
</ div >
< div v - if = " item.union_total > 0 " class = " kanban__item-icon " style = " margin-right: 7px; " >
< span v - if = " item.can_see_joint == 1 " @ click = " open_joint_req(item.id) " class = " jw__tab__counter " style = " background: #757575;cursor:pointer; padding-bottom:4px " > {{ item . union_total }} </ span >
< span v - else class = " jw__tab__counter " style = " background: #757575;cursor:pointer; padding-bottom:4px " > {{ item . union_total }} </ span >
</ div >
</ div >
< hr class = " kanban-line " >
< table class = " kanban__item-name " >< tr >
< ? php
if ( $user -> agencyId != 19895 ) { ?>
< td class = " kanban__item-name-name "
: class = " { 'no-hover': !((item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common))} "
: data - id = " item.id "
: title = " item.fio + ' ' + item.phone " >
< span v - if = " !( (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) ) "
v - html = " item.fio " >
</ span >
< a v - else
href = " javascript: { } "
@ click = " openCardClient(item.client_id, true) "
v - html = " item.fio " >
</ a >
</ td >
< ? php } else { ?>
< td class = " kanban__item-name-name " ></ td >
< ? php } ?>
< td class = " kanban__item-name-date " v - html = " item.date_add " ></ td ></ tr >
</ table >
< div v - if = " item.object_id>0 && (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " class = " kanban__item-object " >
< div class = " kanban-out " > Объект :</ div >
< template v - if = " item.type_id == 4 || item.heir_type == 4 " >
< a target = " _blank " : href = " '/object.php?id='+item.object_id " v - html = " item.nazv " ></ a >
</ template >
< template v - else >
< a : data - id = " item.object_id "
: data - req = " item.id "
class = " show_object "
href = " javascript: { } " v - html = " item.nazv "
@ click = " showObject(item.id) " >
</ a >
</ template >
</ div >
< div v - if = " item.who_work>0 " class = " kanban__item-header " : data - id = " item.id " >
< div class = " kanban-out " > Ответственный :</ div >
< span v - html = " item.master_work " ></ span >
</ div >
< div class = " kanban__item-tag " >
< div class = " kanban-out " > Тип :</ div >
< span class = " type " v - html = " item.name_type " ></ span >
</ div >
< div v - if = " item.deleted === 1 " class = " kanban__item-tag " >
< div class = " kanban-out " > Статус :</ div >
< span v - if = " item.deleted === 1 " v - html = " item.confirm === 10 ? '<span class= \ 'completed \ '>Закрыт успешно</span>' : '<span class= \ 'deleted \ '>Закрыт</span>' " ></ span >
</ div >
< div v - if = " !isEmpty(item.activities) " class = " kanban__item-tag tags tooltip-wrapper " >
< div class = " tags-title " @ click = " open_popup_tag(index) " >
< div v - for = " (activit, key) in item.activities_visible " class = " tag-block " : key = " key " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color:' + activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
< div v - if = " item.activities_rest > 0 " style = " margin-left: 0px; border:none " class = " tag-block " >
< div style = " margin-top: 7px; " class = " tag-name " >< span style = " color: #757575; " > и ещё {{ item . activities_rest }} шт .</ span ></ div >
</ div >
</ div >
< div class = " custom-tooltip " >
< div v - for = " (activit, key) in item.activities " class = " tag-block list-tags " : key = " key " : style = " 'border: solid 1px ' + activit.color " >
< div class = " tag-img " : style = " 'background-color: '+ activit.color " >
< img src = " /images/tag.svg " />
</ div >
< div class = " tag-name " >< span : style = " 'color:' + activit.color " : data - id = " activit.id " > {{ activit . name }} </ span ></ div >
</ div >
</ div >
</ div >
< div class = " kanban__item-tag " >
< div class = " kanban-out " > ID :</ div >
< span class = " type " v - html = " item.id " ></ span >
</ div >
< div v - if = " item.deleted==0 && (item.deposit > 0 || item.expected_commission > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . expected_commission }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Oжида е ма я комиссия :</ span > {{ item . expected_commission }} </ div >
< div >< span class = " custom-resp " > Доплата :</ span > {{ item . expected_commission - item . deposit }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< div v - else - if = " item.deleted==1 && item.confirm==10 && (item.deposit > 0 || item.summa > 0) " class = " kanban__item-tag " style = " cursor:pointer " >
< div class = " tooltip-wrapper " >
< div class = " kanban-out " > Финансы :</ div >
< span class = " type " > {{ item . deposit }} / {{ item . summa }} </ span >
< div class = " custom-tooltip " style = " min-width: 200px; top: 80px; " >
< div class = " custom-head " >
< div > Финансы </ div >
</ div >
< div >< span class = " custom-resp " > Аванс :</ span > {{ item . deposit }} </ div >
< div >< span class = " custom-resp " > Фактическая комиссия :</ span > {{ item . summa }} </ div >
< div v - if = " item.expenses_total > 0 " class = " custom-ul " >
< div class = " custom-li " >
< div class = " custom-head " >
< div > Расходы </ div >
< div > {{ item . expenses_total }} </ div >
</ div >
< div v - for = " (expense, index) in item.expenses " : key = " index " >< span class = " custom-resp " > {{ expense . name }} </ span > {{ expense . amount }}
< span style = " width: 130px; display: inline-flex; white-space: break-spaces; " v - if = " !isEmpty(expense.comment) " v - html = " expense.comment " ></ span >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
< ? php if ( $user -> can ( 'autosearch' )) : ?>
< div v - if = " !isEmpty(req['req' + item.id].autosearch.filter) && (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " style = " display: inline-block; " >
< div v - if = " (req['req' + item.id].autosearch.error || req['req' + item.id].autosearch.active > 0 || req['req' + item.id].autosearch.count > 0) && (req['req' + item.id].type_id == 1 || req['req' + item.id].heir_type == 1) " @ click = " showAutoSearchObjects(req['req' + item.id].autosearch_id, $event ) " title = " Автопоиск объектов " class = " jw__g-button fltr-objects-list " : data - id = " req['req' + item.id].autosearch_id " style = " z-index: 1; margin-top: 5px; " >
Автопоиск
< span v - show = " req['req' + item.id].autosearch.count > 0 " : title = " 'В с е г о объектов: ' + req['req' + item.id].autosearch.total + ', новых: ' + req['req' + item.id].autosearch.count " : class = " [ { 'has-error': req['req' + item.id].autosearch.error }, 'counter'] " >+ {{ req [ 'req' + item . id ] . autosearch . count }} </ span >
< span v - show = " !isEmpty(req['req' + item.id].autosearch.error) " : title = " req['req' + item.id].autosearch.error " : class = " [ { 'with-counter': req['req' + item.id].autosearch.count > 0 }, 'error'] " >< i class = " ti-alert " ></ i ></ span >
</ div >
</ div >
< ? php endif ; ?>
< div v - if = " (item.who_work !== 0 && (item.deleted === 0 || (item.deleted === 1 && item.can_see_contact_closed))) || (item.who_work === 0 && item.deleted === 0 && item.can_see_contact_common) " class = " kanban__item-tasks " style = " flex-direction: column; " >
< div class = " kanban__item-tasks " >
< div class = " kanban__item-tasks__added " >
< a v - if = " item.funnel_type == 'adjacent' " href = " javascript: { } " class = " req-events-new " : data - id = " item.id " : data - adjacent = " item.steps.adjacent_id " >
< div class = " custom-all-tasks " > В с е задачи </ div >
< div v - if = " item.events_res > 0 || item.events_res1 > 0 || item.events_res2 > 0 " class = " tooltip-wrapper " >
< span v - if = " item.events_res>0 " class = " jw__tab__counter " style = " background: #dd6360 " v - html = " item.events_res " ></ span >
< span v - else - if = " item.events_res1>0 " class = " jw__tab__counter " style = " background: #efcd81 " v - html = " item.events_res1 " ></ span >
< span v - else - if = " item.events_res2>0 " class = " jw__tab__counter " style = " background: #4CAF50 " v - html = " item.events_res2 " ></ span >
< div v - if = " Array.isArray(item.tasks_data) && item.tasks_data.length > 0 " class = " custom-tooltip " >
< div class = " modal-head-text " > Задачи </ div >< br />
< div class = " custom-ul " >
< div class = " custom-li " v - for = " (task, index) in item.tasks_data " : key = " index " >
< div class = " custom-head " >
< div > {{ task . name }} </ div >
< div > {{ task . schedule_date }} </ div >
</ div >
< div >< span class = " custom-resp " > Ответственный :</ span > {{ task . responsible }} </ div >
< div >< span class = " custom-resp " > Описание :</ span > {{ task . comment }} </ div >
</ div >
</ div >
</ div >
</ div >
</ a >
< a v - else href = " javascript: { } " class = " req-events-new " : data - id = " item.id " >
< div class = " custom-all-tasks " > В с е задачи </ div >
< div v - if = " item.events_res > 0 || item.events_res1 > 0 || item.events_res2 > 0 " class = " tooltip-wrapper " >
< span v - if = " item.events_res>0 " class = " jw__tab__counter " style = " background: #dd6360 " v - html = " item.events_res " ></ span >
< span v - else - if = " item.events_res1>0 " class = " jw__tab__counter " style = " background: #efcd81 " v - html = " item.events_res1 " ></ span >
< span v - else - if = " item.events_res2>0 " class = " jw__tab__counter " style = " background: #4CAF50 " v - html = " item.events_res2 " ></ span >
< div v - if = " Array.isArray(item.tasks_data) && item.tasks_data.length > 0 " class = " custom-tooltip " >
< div class = " modal-head-text " > Задачи </ div >< br />
< div class = " custom-ul " >
< div class = " custom-li " v - for = " (task, index) in item.tasks_data " : key = " index " >
< div class = " custom-head " >
< div > {{ task . name }} </ div >
< div > {{ task . schedule_date }} </ div >
</ div >
< div >< span class = " custom-resp " > Ответственный :</ span > {{ task . responsible }} </ div >
< div >< span class = " custom-resp " > Описание :</ span > {{ task . comment }} </ div >
</ div >
</ div >
</ div >
</ div >
</ a >
</ div >
< a href = " javascript: { } " : data - id = " item.id " class = " kanban__item__add-task " >< i class = " jw-action-icon-plus " ></ i > Новая задача </ a >
< div class = " chat-history__actions_new actions_for_tasks " : id = " 'kanban_task_add_'+item.id " >
< div class = " inner " >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-call " >< span class = " simple-button call " > Звонок </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-meeting " >< span class = " simple-button meeting " > Встреча </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-showing " >< span class = " simple-button showing " > Показ </ span ></ a >
< a href = " javascript: { } " : data - id = " item.id " : data - req = " item.id " id = " client__new-deal " >< span class = " simple-button deal " > Сделка </ span ></ a >
</ div >
</ div >
</ div >
< hr class = " kanban-line-b " >
< a v - if = " Array.isArray(item.tasks_data) && item.tasks_data.length > 0 " href = " javascript: { } " style = " border-bottom: unset; " class = " req-events-new " : data - id = " item.id " >
< div v - if = " item.events_res > 0 || item.events_res1 > 0 || item.events_res2 > 0 " class = " tooltip-wrapper " >
< div class = " custom-task-all " >
< div class = " custom-task " > Последняя задача </ div >
< div class = " custom-ul " >
< div class = " kanban_task_foot " : style = " { backgroundColor: item.tasks_data[item.tasks_data.length - 1].bgColor } " >
< div class = " kanban_task_head " >
< div : style = " { color: item.tasks_data[item.tasks_data.length - 1].textColor } " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . name }} </ div >
< div > {{ item . tasks_data [ item . tasks_data . length - 1 ] . schedule_date }} </ div >
</ div >
<!-- < div class = " custom-info " >< div class = " kanban_task_resp " > Ответственный :</ div >< div class = " kanban_task-text " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . responsible }} </ div ></ div > -->
< div class = " custom-info " >
< div class = " kanban_task_resp " > Описание :</ div >
< div class = " kanban_task-text " > {{ item . tasks_data [ item . tasks_data . length - 1 ] . comment }} </ div >
</ div >
</ div >
</ div >
</ div >
</ div >
</ a >
</ div >
< template v - if = " item.deleted == 1 && item.can_take_from_closed && item.who_work != user_id " >
< div v - show = " item.can_see " class = " client-confirm " : id = " 'req-confirm__'+item.id " style = " margin-top: 20px; " >
< div class = " client-confirm__inner " >
< div class = " client-confirm__buttons " >
< template v - if = " item.who_work != 0 " >
< a class = " confirmClientClosed small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - manager = " user_id "
data - tr = " 0 "
data - deleted = " 1 "
href = " javascript: { }; " > Взять в работу </ a >
</ template >
< template v - else >
< a v - if = " item.funnel_type == 'adjacent' "
class = " confirmClientGeneral small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - adjacent = " item.steps.adjacent_id "
: data - manager = " user_id "
data - tr = " 0 "
data - deleted = " 1 "
href = " javascript: { }; " > Взять в работу </ a >
< a v - else
class = " confirmClientGeneral small-green-button "
data - id = " 0 "
: data - req = " item.id "
: data - manager = " user_id "
href = " javascript: { }; " > Взять в работу </ a >
</ template >
</ div >
</ div >
< div class = " client-confirm__preloader " : id = " 'req-confirm__preloader__'+item.id " style = " display: none; " >
< img src = " /images/ajax_preloader.gif " >
</ div >
</ div >
</ template >
</ div >
</ li >
</ ul >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
</ div >
<!--- Конец канбан ---->
<!-- Таблица -->
< div class = " crm__table " v - if = " isTable " style = " margin-bottom: 40px; " v - show = " isPreloader===0 " >
< link rel = " stylesheet " href = " /css/bootstrap.css?v=3 " type = " text/css " >
< link rel = " stylesheet " href = " /css/jquery.bootgrid.css " type = " text/css " >
< div class = " grid_table " >
< table id = " req_table " class = " table table-condensed table-hover table-striped " >
< thead >
< tr >
< th data - column - id = " edit " data - width = " 50 " data - formatter = " edit " data - visible - in - selection = " false " >& nbsp ; </ th >
< th data - column - id = " priority " data - formatter = " priority " data - width = " 50 " ></ th >
< th data - column - id = " name " data - formatter = " name " > Название </ th >
< th data - column - id = " type " data - width = " 300 " data - formatter = " type " > Тип </ th >
< th data - column - id = " who_work " > Ответственный </ th >
< th data - column - id = " stage " > Этап </ th >
< th data - column - id = " hot " data - formatter = " hot " data - width = " 70 " > Горячий </ th >
</ tr >
< tr >
</ tr >
</ thead >
< tbody >
< tr v - for = " (item, index) in req " >
< td v - html = " item.id " ></ td >
< td v - html = " item.priority " ></ td >
< td v - html = " item.name " ></ td >
< td v - html = " item.type_id " ></ td >
< td v - html = " item.master_work " ></ td >
< td v - html = " item.steps.stage " ></ td >
< td v - html = " item.hot " ></ td >
< td v - html = " item.deleted " ></ td >
< td v - html = " item.can_see_contact_closed ? 1 : 0 " ></ td >
< td v - html = " item.can_see_contact_common ? 1 : 0 " ></ td >
</ tr >
</ tbody >
</ table >
</ div >
< div v - show = " all_pages > 1 " class = " f-system_pagination " style = " float: left; " >< center >< ul class = " pagination " style = " display: inline-flex; " >
< template v - if = " page==1 " >
< li class = active >< a href = 'javascript:{}' > 1 </ a ></ li >
</ template >
< template v - else >
< li >< a href = " javascript: { } " @ click = " pagin(prevPage) " : data - page = " prevPage " >& laquo ; </ a ></ li >
< li >< a href = " javascript: { } " @ click = " pagin(1) " data - page = " 1 " > 1 </ a ></ li >
</ template >
< template v - if = " all_pages > 8 && page > 4 " >
< li >< a href = " javascript: { } " >...</ a ></ li >
</ template >
< template v - for = " pp in pagePagin " >
< li : class = " { active:pp==page} " >< a href = " javascript: { } " @ click = " pagin(pp) " : data - page = " pp " > {{ pp }} </ a ></ li >
</ template >
< template v - if = " all_pages > 8 && page < all_pages - 4 " >
< li >< a href = " javascript: { } " >...</ a ></ li >
</ template >
< template v - if = " page == all_pages " >
< li class = " active " >< a href = " javascript: { } " @ click = " pagin(all_pages) " : data - page = " all_pages " > {{ all_pages }} </ a ></ li >
</ template >
< template v - else >
< li >< a href = " javascript: { } " @ click = " pagin(all_pages) " : data - page = " all_pages " > {{ all_pages }} </ a ></ li >
< li >< a href = " javascript: { } " @ click = " pagin(page+1) " data - page = " page+1 " >& raquo ; </ a ></ li >
</ template >
</ ul >
< span style = " padding-left: 15px; float: none; border: none; " class = " control-group kol_find " > перейти на < input style = " height: 40px; " id = " requisitionPageNumberInputForManualTableGoToPage " type = " number " maxlength = " 6 " class = " number text small-input no-mrg-left " placeholder = " № стр. " @ keypress = " goToRequisitionsPageTable( $event ) " /></ span >
</ center ></ div >
< div class = " clear " ></ div >
</ div >
</ template >
<!-- Конец таблицы -->
</ div >
</ div >
</ div >
</ div >
< ? php
?>
</ div >
< div class = " f__modal-bg " id = " confirm__user_req_bg " style = " display: none; " >
< span class = " pseudo-link closer " >< i class = " ti-close " ></ i ></ span >
< div class = " f__modal sign " id = " confirm__user_req " style = " display: none;padding-bottom: 0; width: 600px; " >
< div class = " f-col " >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " f-col-8 " >
< div class = " bg-danger " style = " font-size:1.2em; border-radius:5px; text-align:center; " >
Выберите нового ответственного пользователя .
</ div >
< div class = " form-block " style = " padding-top: 10px; " >
< div class = " label " style = " width: 25%; " > Ответственный по клиентам :</ div >
< div class = " inputs " >
< select id = " confirm__who_work_req " class = " " style = " width: 300px " >
< optgroup >
< option value = '<?=$_SESSION[' id ']?>' > Я </ option >
< ? php
if ( $_SESSION [ 'agency' ] || $_SESSION [ 'users_admin' ] || $r_check_permissions [ 'menu_can_transfer_to_common' ] == 1 ) {
echo " <option value='0'>Всё агентство</option> " ;
} ?>
</ optgroup >
< ? php
$agentsOfAgency = User :: getAllAgents ( $user -> agencyId );
$agentsOfManager = User :: getAllManagers ( $user -> agencyId );
if ( $agentsOfManager ) {
echo " <optgroup label='Менеджеры'> " ;
foreach ( $agentsOfManager as $mngr )
{
echo " <option value=' $mngr[id] '> " . trim ( $mngr [ 'last_name' ] . ' ' . $mngr [ 'first_name' ] . ' ' . $mngr [ 'middle_name' ]) . " </option> " ;
}
echo " </optgroup> " ;
}
if ( $agentsOfAgency ) {
echo " <optgroup label='Агенты'> " ;
foreach ( $agentsOfAgency as $agent )
{
echo " <option value=' $agent[id] '> " . trim ( $agent [ 'last_name' ] . ' ' . $agent [ 'first_name' ] . ' ' . $agent [ 'middle_name' ]) . " </option> " ;
}
echo " </optgroup> " ;
}
?>
</ select >
</ div >
< div class = " clear " ></ div >
</ div >
< input type = " hidden " id = " confirm__user_id_req " value = " " >
< input type = " hidden " id = " confirm_reqs_id " value = " " >
< div style = " width:160px; margin:20px auto; " >< a href = " javascript: { }; " onclick = " confirm__User_req() " class = " fr-btn medium-button " > Подтвердить </ a ></ div >
</ div >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
< div class = " f__modal-bg " id = " transfer_reqs_closed_pick_owner_bg " style = " display: none; " >
< span class = " pseudo-link closer " >< i class = " ti-close " ></ i ></ span >
< div class = " f__modal sign " id = " transfer_reqs_closed_pick_owner " style = " display: none;padding-bottom: 0; width: 600px; " >
< div class = " f-col " >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " f-col-8 " >
< div class = " bg-danger " style = " font-size:1.2em; border-radius:5px; text-align:center; " >
Выберите нового ответственного пользователя .
</ div >
< div class = " form-block " style = " padding-top: 10px; " >
< div class = " label " style = " width: 25%; " > Ответственный :</ div >
< div class = " inputs " >
< ? php
$managerId = $_SESSION [ 'users_admin' ] ? $_SESSION [ 'agency_id' ] : $_SESSION [ 'id' ];
$json = User :: getSubordinatesJson ( $managerId );
$users = json_decode ( $json , true );
?>
< select id = " transfer_reqs_closed_pick_owner_select " style = " width: 300px " >
< ? php
$managers = array_filter ( $users , function ( $u ) {
return $u [ 'is_manager' ] && $u [ 'id' ] != $_SESSION [ 'id' ];
});
$agents = array_filter ( $users , function ( $u ) {
return ! $u [ 'is_manager' ];
});
if ( ! empty ( $managers )) {
echo " <optgroup label='Менеджеры'> " ;
foreach ( $managers as $mngr ) {
echo " <option value=' { $mngr [ 'id' ] } '> " . htmlspecialchars ( $mngr [ 'name' ]) . " </option> " ;
}
echo " </optgroup> " ;
}
if ( ! empty ( $agents )) {
echo " <optgroup label='Агенты'> " ;
foreach ( $agents as $agent ) {
echo " <option value=' { $agent [ 'id' ] } '> " . htmlspecialchars ( $agent [ 'name' ]) . " </option> " ;
}
echo " </optgroup> " ;
}
?>
</ select >
</ div >
< div class = " clear " ></ div >
</ div >
< input type = " hidden " id = " transfer_reqs_closed_pick_owner_user_id " value = " " >
< input type = " hidden " id = " transfer_reqs_closed_pick_owner_req_id " value = " " >
< div style = " width:160px; margin:20px auto; " >< a href = " javascript: { }; " onclick = " transferClosedReqs() " class = " fr-btn medium-button " > Подтвердить </ a ></ div >
</ div >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
< div class = " f__modal-bg " id = " funnel__user_bg_req " style = " display: none; " >
< span class = " pseudo-link closer " >< i class = " ti-close " ></ i ></ span >
< div class = " f__modal sign " id = " funnel__user_req " style = " display: none;padding-bottom: 0; " >
< div class = " f-col " >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " f-col-8 " >
< div class = " bg-danger " style = " font-size:1.2em; border-radius:5px; text-align:center; " >
Выберите новую воронку .
</ div >
< div class = " form-block " style = " padding-top: 10px; " >
< div class = " label " style = " width: 25%; " > Список воронок :</ div >
< div class = " inputs " >
< select id = " funnel__check_req " class = " " required style = " width: 100% " >
< ? php
if ( $user -> agencyId != 6841 && $user -> agencyId != 6426 && $user -> agencyId != 7384 && $user -> agencyId != 7478 && $user -> agencyId != 8353 && $user -> agencyId != 8867 && $user -> agencyId != 9588 ) {
$useCustomFunnel = true ;
} else {
$useCustomFunnel = false ;
}
$nameDefault = " Обычные " ;
$sqlCastom = " SELECT * FROM funnel_default WHERE agency_id = { $user -> agencyId } " ;
if ( $section == 'req' ){
$sqlCastom = " SELECT * FROM funnel_default WHERE agency_id = { $user -> agencyId } " ;
}
$qCastom = mysql_query ( $sqlCastom );
if ( mysql_num_rows ( $qCastom ) > 0 ){
$rCastom = mysql_fetch_assoc ( $qCastom );
if ( ! empty ( $rCastom [ 'name' ])){
$nameDefault = $rCastom [ 'name' ];
}
// if($section == 'req'){
if ( $rCastom [ 'is_req' ] == 0 ){
$useCustomFunnel = false ;
}
// }
}
if ( $useCustomFunnel ) { ?>
< option value = " 0 " >< ? = $nameDefault ?> </option>
< ? php
}
$sql = " select * from funnel WHERE agency_id = { $user -> agencyId } and deleted=0 " ;
$sql .= " and is_req = 1 " ;
$sql .= " order by id " ;
$funnelsData = mysql_query ( $sql );
$i = 0 ;
while ( $funnel = mysql_fetch_assoc ( $funnelsData )) {
?>
< option value = " <?= $funnel['id'] ?> " >< ? = $funnel [ 'name' ] ?> </option>
< ? php
}
?>
</ select >
</ div >
< div class = " clear " ></ div >
</ div >
< input type = " hidden " id = " funnel_reqs_id " value = " " >
< div style = " width:160px; margin:20px auto; " >< a href = " javascript: { }; " onclick = " funnel_Confirm_req(); " class = " fr-btn medium-button " > Подтвердить </ a ></ div >
</ div >
< div class = " f-col-2 " >& nbsp ; </ div >
< div class = " clear " ></ div >
</ div >
</ div >
</ div >
< ? php
2026-05-24 18:59:27 +02:00
$allowed_users_deal = [ 18388 ];
if ( in_array (( int ) $_SESSION [ 'id' ], $allowed_users_deal )) {
echo '<script type="module" src="/deal/assets/app.js"></script>' ;
echo '<link rel="stylesheet" href="/deal/assets/app.css">' ;
}
2026-05-22 20:21:54 +02:00
require ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /templates/footer.php " );
require ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /templates/modals/req_info.php " );
require ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /templates/modals/export_settings.php " );
require ( $_SERVER [ 'DOCUMENT_ROOT' ] . " /templates/modals/union_reqs_form.php " );
?>
< script type = " text/javascript " src = " /js/clients_vue.js?v=<?=filemtime( $_SERVER['DOCUMENT_ROOT'] .'/js/clients_vue.js')?> " ></ script ><!-- < script type = " text/javascript " src = " /js/jquery.bootgrid.js " ></ script > -->
< ? php
$sql = 'SELECT item_list FROM `reclame_table` WHERE id_user=' . $_SESSION [ 'id' ] . ' AND id_table=7' ;
$reSql = mysql_query ( $sql );
$res = mysql_fetch_assoc ( $reSql );
$resList = $res [ 'item_list' ];
?>
< script >
// $(document).ready(function() {
$ ( '.view-table' ) . on ( 'click' , function () {
setTimeout ( ReqTable , 1500 );
})
function ReqTable () {
let arr = '<?=$resList?>' ;
var arrayOfStrings = arr . split ( ',' );
if ( arr ) {
$ ( '.dropdown-menu input' ) . each ( function (){
arr . includes ( $ ( this ) . attr ( 'name' )) ? '' : $ ( this ) . trigger ( 'click' );
});
}
$ ( '.dropdown-menu' ) . append ( `<li class="save"><a id="saveTable">Сохранить</a></li>` );
$ ( '#saveTable' ) . on ( 'click' , function () {
let arr = [];
let idUser = < ? = $_SESSION [ 'id' ]; ?> ;
$ ( '.dropdown-menu input' ) . each ( function (){
$ ( this ) . is ( ':checked' ) ? arr . push ( $ ( this ) . attr ( 'name' )) : '' ;
})
$ . ajax ({
url : " /ajax/getReclameTable.php " ,
method : 'get' ,
dataType : 'html' ,
data : { arrPunkt : arr , idTable : 7 , idUser : idUser },
success : function ( data ) {
console . log ( data );
}
});
});
}
ReqTable ();
</ script >