Joywork/ajax/getGridTableStatisticsObjects.php
2026-05-22 21:21:54 +03:00

128 lines
7.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require_once($_SERVER['DOCUMENT_ROOT']."/config.php");
?>
<div class="">
<div class="buttons-toolbar" style="padding-top: 15px">
</div>
<!-- <div id="table-sources-keep-selection-fixed" class="bootstrap-table bootstrap4" style="display:none; position:absolute;z-index: 999;">
<div class="fixed-table-container fixed-height" style="border-bottom: 0;">
<table style="border-bottom: 0px;" class="table table-bordered table-hover">
<thead style="border-bottom: 0px;"></thead>
</table>
</div>
<div class="fixed-table-body">
<table class="table table-bordered table-hover">
<tbody>
</tbody>
</table>
</div>
</div> -->
<table
id="obj-stat-grid-full"
class="table"
data-locale="ru-RU"
data-height="650"
data-show-refresh="true"
data-show-columns="true"
data-buttons-toolbar=".buttons-toolbar"
data-show-columns-toggle-all="true"
data-ajax="ajaxRequestStatisticsObjects"
data-loading-template="loadingTemplate"
data-show-footer="true"
>
<thead>
<tr>
<th data-field="fio" data-formatter="sourceFormatter" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-switchable="false" data-footer-formatter="Итого">ФИО</th>
<th data-field="added" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Было создано за период</th>
<th data-field="adv_in_period" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Было в рекламе за период</th>
<th data-field="adv_before_period" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Было в рекламе к началу периода</th>
<th data-field="not_adv_in_period" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Не рекламировались за период</th>
<!-- Grouped header for Advertising Costs -->
<th data-field="adv_costs" data-cell-style="cellStyleForObject" colspan="8" data-class="table_white">Затраты на рекламу</th>
<th data-field="requests" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Заявок по объектам</th>
<th data-field="presentation" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Кол-во отправленных презентаций</th>
<th data-field="meet" data-sortable="true" data-cell-style="cellStyleForObject" rowspan="2" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Встречи на объекте</th>
<th data-field="tasks" data-cell-style="cellStyleForObject" colspan="4" data-class="table_white">Задачи</th>
</tr>
<tr>
<!-- Group for Advertising Costs -->
<th data-field="adv_costs_period" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Всего</th>
<th data-field="adv_costs_avito" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Avito</th>
<th data-field="adv_costs_cian" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">ЦИАН</th>
<th data-field="adv_costs_domclick" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">ДомКлик</th>
<th data-field="adv_costs_jcat" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">JCat</th>
<th data-field="adv_costs_yandex" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Я.Недвижимость</th>
<th data-field="adv_costs_zipal" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Зипал</th>
<th data-field="adv_costs_promo" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Продвижение</th>
<th data-field="task" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Всего</th>
<th data-field="task_new" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Запланированных</th>
<th data-field="task_old" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Просроченных</th>
<th data-field="task_slung" data-sortable="true" data-cell-style="cellStyleForObject" data-class="table_white" data-footer-formatter="footerPriceFormatterForObject" data-sorter="ObjectSorter">Выполненные</th>
</tr>
</thead>
</table>
</div>
<style>
#stats_sources_list-obj-stat-grid .keep-open.btn-group
{
margin: 0;
}
#stats_sources_list-obj-stat-grid .fixed-table-loading
{
z-index: 1;
}
#obj-stat-grid-full .table_white:hover {
border: 0 !important;
border-bottom: solid 1px rgb(67, 160, 71) !important;
}
</style>
<?php
$sql = 'SELECT item_list FROM `reclame_table` WHERE id_user='.$_SESSION['id']. ' AND id_table=10';
$reSql = mysql_query($sql);
$res = mysql_fetch_assoc($reSql);
$resList = $res['item_list'];
?>
<script>
function resList() {
let res = '<?=$resList?>';
console.log('res', res);
return res;
}
// resList('<?=$resList?>');
function saveTableColumn(_this) {
let arr = [];
let idUser = <?= $_SESSION['id'];?>;
_this.closest('.dropdown-menu').find('input').each(function(){
$(this).is(':checked') ? arr.push($(this).attr('data-field')) : '';
})
$.ajax({
url:"/ajax/getReclameTable.php",
method: 'get',
dataType: 'html',
data: {arrPunkt: arr, idTable: 10, idUser: idUser},
success: function(data) {}
});
}
</script>