Commit fb9f605e authored by Samir Sadyhov's avatar Samir Sadyhov 🤔

компонент списка записей реестра, с поиском, фильтрацией, сортировкой и т.п.

parent 551bb1fc
.exp-table {
table-layout: fixed;
font-size: 14px;
}
.exp-table>thead>tr {
border: none !important;
}
.exp-table>thead>tr>th {
vertical-align: top;
text-transform: none;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
color: #222;
overflow: hidden;
font-weight: bold;
}
.exp-table>tbody>tr {
cursor: pointer;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.exp-table>tbody>tr:hover {
background-color: rgba(72, 157, 243, 0.2);
}
.exp-table th, .exp-table td {
padding: 10px !important;
}
.exp-table td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.exp-table tr.highlight {
color: red;
}
.uk-table.doc-info {
border-collapse: collapse;
width: 100%;
font-size: 12px;
font-family: sans-serif;
}
.uk-table.doc-info th,
.uk-table.doc-info td {
text-align: left;
color: #222;
}
.uk-table.doc-info td {
border-bottom: 1px solid #ddd;
padding: 5px;
}
.uk-table.doc-info th {
padding: 15px 5px;
font-weight: bold;
}
.uk-table.doc-info tbody>tr:hover {
background-color: rgba(72, 157, 243, 0.2);
}
/*пагинатор*/
.exp-pt-container {
display: flex;
justify-content: center;
background: #fff;
position: absolute;
bottom: 0px;
width: 100%;
}
.exp-pt-paginator {
margin: 10px;
height: 32px;
color: #606060;
}
.exp-pt-paginator-container {
width: 168px;
height: 32px;
display: inline-block;
float: right;
}
.exp-pt-paginator button {
height: 100%;
width: 34px;
background-color: #fff;
border: none;
float: left;
cursor: pointer;
}
.exp-pt-paginator button:hover {
border-color: orange;
}
.exp-pt-paginator button[disabled] {
opacity: 0.5;
cursor: default;
border-color: #d6d6d6;
}
.exp-pt-paginator button.exp-pt-previous {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9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752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAPJJREFUeNqk069KREEUx/HPLgomsVl8AXEFQSwWEU3qC1iEYzAZNvoeFg1ykti1KIJPYBDcIJr8EzQZTIJwLRN0Ee69eNpw5vtl5ndmOlVV+U+NNNkUEXPYQz8zX3/2ug3gaZxiAxPD/W4NPINLjGM1M+8aXyEierjAWIGvG2cQEbMFHsVKZt40DrHA52W5nJmDxlOIiAWc4QuLmflYF/JwiPOYxDs+moz4lyAzD9BHD1cRMVUn6Pz1EiNiF/u4xVpmvrQSFMkODotkPTOfWwmKZBtHGBTJUytBkWziGPdYysy3Vn8hM0+whQd8tj5BXX0PAB+FV2HorGSFAAAAAElFTkSuQmCC') no-repeat center;
}
.exp-pt-paginator button.exp-pt-next {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIe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niP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAOtJREFUeNqk061KhFEUheFnBhEsYhuDGgVxJonBKBq9A0HYGEyCl2E0GMTgjnZBEQXBZjBMMAhehMFk+iwnfPgzztHVVlgv6xzW7jRN4z+aaJuImMURDjNzOA6g+8nPYAsXEbFUDcjMZ2xiGrcRsVzbQGY+FMgUbiKiXwUokEdsYLJABlWAAhlivdjrnyDdUfUy8wlraMqfrFYBit7wih5WqgARMYc79HGQmScjh/RN+AoD7Gfm8a9LbIXncVnCe5l5OtaUS3ihhPvYzcyzUc/stI8pInq4xyK2M/O8donveMHOOOEvDf6ijwEA/0NKYA/mAUIAAAAASUVORK5CYII=') no-repeat center;
}
.exp-pt-paginator .exp-pt-paginator-content {
display: inline-block;
width: 100px;
height: 100%;
text-align: center;
vertical-align: top;
margin: 0;
padding: 0;
float: left;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.exp-pt-paginator .exp-pt-paginator-content>label {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-color: #fff;
}
.exp-pt-paginator .exp-pt-paginator-content>input {
display: none;
width: calc(100% - 4px);
height: calc(100% - 6px);
border: 0;
text-align: center;
padding-top: 3px;
background-color: #fff;
}
.exp-pt-header {
transition: 0.1s ease-in-out;
}
.exp-pt-header label {
display: block;
cursor: pointer;
}
.exp-pt-sorted-desc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAPUlEQVR4AWMYpmAU1IMxhaAEiP9DcQmlhjQCcRPMMHINaUcS6yfVMEuohn64CKZhlsQa5oxHzmW4pKJRAACybw/fRtVGcwAAAABJRU5ErkJggg==');
background-position: right top;
background-repeat: no-repeat;
}
.exp-pt-sorted-asc {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAUUlEQVR4AWMYJmAUsAJxOxDzoUtAxZohaggDMyD+BcQXgVgYSVwYKvYLrIZI4ArVcAuIxYBYCsr+BZaDAlINuwfC6IaQZRjcEAqBBxgPQzAKAMKAEQPA8SrrAAAAAElFTkSuQmCC');
background-position: right top;
background-repeat: no-repeat;
}
/*context-menu*/
.exp-context-menu {
position: absolute;
display: none;
background-color: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
padding: 0px;
min-width: 200px;
width: auto;
}
.exp-context-menu ul {
list-style: none;
margin: 0;
padding: 0;
}
.exp-context-menu ul li {
margin: 0;
padding: 0;
background-color: #fff;
display: block;
}
.exp-context-menu ul li a {
color: #555;
padding: 10px;
}
.exp-context-menu ul li a:hover {
background-color: rgb(255, 165, 0, 0.3);
}
.exp-context-menu ul .uk-disabled a {
color: #dedede;
}
::-webkit-inner-spin-button, ::-webkit-clear-button {
display: none;
}
::-webkit-calendar-picker-indicator {
cursor: pointer;
opacity: 1;
color: #1e87f0;
}
.mobile-table-header {
display: none;
font-weight: 600;
margin-right: 10px;
}
@media screen and (max-width:960px) {
.exp-table>tbody td {
display: flex;
}
.exp-table>tbody td span {
width: 50%;
display: block;
}
}
._lock {
overflow: hidden;
}
.exp-window-document {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #fff;
border-bottom: 1px solid #c3c3c3;
z-index: 1;
}
.exp-window-header {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 80px;
display: flex;
border-bottom: 1px solid #e5e5e5;
align-items: center;
justify-content: space-between;
padding: 0 20px;
z-index: 1;
}
.exp-window-body {
position: absolute;
left: 0;
top: 80px;
width: 100%;
height: calc(100% - 80px);
overflow: hidden;
}
.exp-window-content {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: calc(100% - 50px);
padding: 10px;
}
.exp-window-form-panel {
width: 100%;
height: 100%;
padding: 30px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
overflow: auto;
}
.exp-window-close-button {
color: #666;
cursor: pointer;
transition: 0.3s ease-out 0s;
}
.exp-window-close-button:hover {
transform: rotate(90deg);
color: #f0506e;
}
.exp-window-form-panel-actions {
display: flex;
min-height: 40px;
margin: 5px 0;
justify-content: flex-end;
align-items: center;
}
.exp-window-save-button,
.exp-window-nav-button {
border-radius: 3px;
margin: 0 10px;
height: 30px;
padding: 0 20px;
font-family: 'Open Sans';
font-style: normal;
font-weight: normal;
font-size: 14px;
line-height: 19px;
}
.exp-window-save-button {
background: #1E87F0;
}
.exp-window-nav-button {
background: #fff;
}
.exp-window-print-button,
.exp-window-edit-button,
.exp-window-view-button {
padding: 0 5px;
cursor: pointer;
}
.exp-window-print-button:hover,
.exp-window-edit-button:hover,
.exp-window-view-button:hover {
color: #1E87F0;
}
.exp-window-header-logo {
display: flex;
width: 100%;
align-content: center;
justify-content: flex-start;
}
.exp-window-header-logo img {
width: 35px;
height: 35px;
}
.exp-window-header-logo span {
padding: 0;
margin: 0;
margin-left: 20px;
font-size: 22px;
color: rgb(62, 62, 62);
user-select: none;
font-weight: normal;
font-family: 'Open Sans', sans-serif;
overflow: hidden;
white-space: nowrap;
}
.action-menu-item a {
display: flex !important;
gap: 10px;
color: #666 !important;
}
.action-menu-item a:hover {
color: #000 !important;
}
.action-menu-item.uk-disabled a {
color: #ccc !important;
}
@media screen and (max-width:986px) {
.exp-window-header {
height: 60px;
}
.exp-window-content {
height: calc(100% - 50px);
padding: 0;
padding-top: 10px;
}
.exp-window-body {
top: 50px;
height: calc(100% - 50px);
}
.exp-window-print-button {
display: none !important;
}
}
.draw_attention {
-webkit-animation: pulsate 2.5s linear infinite;
animation: pulsate 2.5s linear infinite;
}
@-webkit-keyframes pulsate {
50% {
background: rgba(255, 0, 0, 0.1);
text-shadow: 0 0 5px rgba(255, 0, 0, 0.2);
}
}
@keyframes pulsate {
50% {
background: rgba(255, 0, 0, 0.1);
text-shadow: 0 0 5px rgba(255, 0, 0, 0.2);
}
}
<div class="exp-registry-container">
<div class="exp-table-container"></div>
</div>
!function(i){i.widget("ih.resizableColumns",{_create:function(){this._initResizable()},_initResizable:function(){let e,t,n,s=this.element;s.find("th").resizable({handles:{e:" .resizeHelper"},minWidth:10,create:function(e,t){let n=i(this).find(".columnLabel").width();n&&(n+=i(this).find(".ui-resizable-e").width(),i(this).resizable("option","minWidth",n))},start:function(i,h){let l=h.helper.index()+1;e=s.find("colgroup > col:nth-child("+l+")"),t=parseInt(e.get(0).style.width,10),n=h.size.width},resize:function(s,h){let l=h.size.width-n,d=t+l;e.width(d),i(this).css("height","auto")}})}})}(jQuery);
$.getScript("https://cdnjs.cloudflare.com/ajax/libs/alasql/0.6.1/alasql.min.js");
const compContainer = $(`#${comp.code}`);
const tableContainer = compContainer.find('.exp-table-container');
const formatDate = () => {
let d = new Date();
return ['0' + d.getDate(), '0' + (d.getMonth() + 1), '' + d.getFullYear()].map(x => x.slice(-2)).join('.');
}
const getSystemReport = () => {
Cons.showLoader();
AS.FORMS.ApiUtils.simpleAsyncGet(`rest/api/registry/filters?registryCode=${registryTable.registryCode}&type=service`)
.then(filters => {
let filterID = filters.find(x => x.code === registryTable.filterCode);
if(filterID) filterID = filterID.id;
Cons.hideLoader();
let url = `${window.location.origin}/Synergy/rest/reg/load/xls?r=${registryTable.registryID}`;
url += `&l=ru&f=${filterID || ''}&s=&u=${AS.OPTIONS.currentUser.userid}&fn=${registryTable.registryName}_${formatDate()}`;
window.open(url);
});
}
const getRegistryList = async () => {
const {registryList} = Cons.getAppStore();
return new Promise(async resolve => {
if(registryList) {
resolve(registryList);
} else {
const list = await appAPI.getRegistryList();
list ? resolve(UTILS.parseRegistryList(list)) : resolve(null);
}
});
}
const Paginator = {
container: $('<div class="exp-pt-container">'),
paginator: $('<div class="exp-pt-paginator">'),
pContent: $('<div class="exp-pt-paginator-content">'),
bPrevious: $('<button class="exp-pt-previous" disabled="disabled" title="Назад">'),
bNext: $('<button class="exp-pt-next" disabled="disabled" title="Вперед">'),
label: $('<label>'),
input: $('<input type="text">'),
countInPart: 0,
rows: 0,
currentPage: 1,
pages: 0,
init: function(){
$('.exp-pt-container').remove();
$('.exp-registry-container').after(this.container);
this.pContent.append(this.label).append(this.input);
this.paginator.append(this.bPrevious).append(this.pContent).append(this.bNext);
this.container.append(this.paginator);
this.reset();
this.bNext.click(() => {
this.currentPage++;
this.update();
registryTable.createBody();
});
this.bPrevious.click(() => {
this.currentPage--;
this.update();
registryTable.createBody();
});
this.label.on('dblclick', e => {
e.preventDefault();
this.input.show();
this.label.hide();
this.input.on('blur', () => {
this.label.show();
this.input.hide();
});
this.input.val("" + this.currentPage);
this.input.on('keypress', e => {
if (e.which != 8 && e.which != 0 && e.which != 46 && (e.which < 48 || e.which > 57)) return false;
});
this.input.on('keydown', e => {
if(e.which === 13) {
let inputVal = +this.input.val();
if(inputVal && inputVal != this.currentPage && inputVal <= this.pages && inputVal >= 1){
this.currentPage = inputVal;
this.update();
registryTable.createBody();
}
this.label.show();
this.input.hide();
this.input.off();
}
});
this.input.focus();
});
},
update: function(){
this.pages = Math.ceil(this.rows / this.countInPart),
this.label.text(this.currentPage + ' / ' + this.pages);
if(this.pages == 0) {
this.bPrevious.attr('disabled', 'disabled');
this.bNext.attr('disabled', 'disabled');
} else {
if(this.currentPage == 1) {
this.bPrevious.attr('disabled', 'disabled');
if (this.currentPage == this.pages) {
this.bNext.attr('disabled', 'disabled');
} else {
this.bNext.removeAttr('disabled');
}
} else {
this.bPrevious.removeAttr('disabled');
if (this.currentPage == this.pages) {
this.bNext.attr('disabled', 'disabled');
} else {
this.bNext.removeAttr('disabled');
}
}
}
},
reset: function(){
this.countInPart = 15;
this.rows = 15;
this.currentPage = 1;
this.pages = 0;
}
}
const registryTable = {
registryInfo: null,
registryCode: null,
registryID: null,
registryName: '',
registryRights: [],
filterCode: null,
formCode: null,
selectedItems: [],
searchString: null,
filterSearchUrl: null,
allRights: [],
sortCmpID: null,
sortDesc: false,
searchField: null,
searchValue: null,
heads: [],
registryTable: null,
colgroup: null,
tHead: null,
tBody: null,
isDelete: false,
getNextFieldNumber: function(url) {
let p = url.substring(url.indexOf('?') + 1).split('&');
p = p.map(x => {
x = x.split('=');
if(x[0].indexOf('field') !== -1 && x[0] !== 'fields') return x[0];
}).filter(x => x).sort();
if(p.length) return Number(p[p.length - 1].substring(5)) + 1;
return '';
},
getUrl: function(all){
let url = `api/registry/data_ext?registryCode=${this.registryCode}`;
if(!all) url += `&pageNumber=${Paginator.currentPage - 1}&countInPart=${Paginator.countInPart}`;
if(this.filterCode) url+=`&filterCode=${this.filterCode}`;
if(this.heads && this.heads.length > 0) this.heads.forEach(item => url+=`&fields=${item.columnID}`);
if(this.sortCmpID) url+=`&sortCmpID=${this.sortCmpID}&sortDesc=${this.sortDesc}`;
if(this.searchString) url += `&searchString=${this.searchString}`;
if(this.filterSearchUrl) {
url += this.filterSearchUrl;
if(this.searchField && this.searchValue) {
let next = this.getNextFieldNumber(this.filterSearchUrl);
url+=`&field${next}=${this.searchField}&condition${next}=CONTAINS&value${next}=${this.searchValue}`;
}
} else {
if(this.searchField && this.searchValue) url+=`&field=${this.searchField}&condition=CONTAINS&value=${this.searchValue}`;
}
return url;
},
removeRegistryRow: function(uuid, e) {
e.preventDefault();
e.target.blur();
UIkit.modal.confirm('Вы действительно хотите удалить запись реестра?').then(() => {
Cons.showLoader();
try {
rest.synergyGet(`api/registry/delete_doc?dataUUID=${uuid}`, res => {
if(res.errorCode != '0') throw new Error(res.errorMessage);
showMessage("Запись реестра удалена", "success");
this.createBody();
Cons.hideLoader();
});
} catch (err) {
Cons.hideLoader();
showMessage("Произошла ошибка при удалении записи реестра", "error");
console.log(error);
}
}, () => null);
},
removeSelectedRow: function() {
UIkit.modal.confirm('Вы действительно хотите удалить все выделенные записи реестра?').then(() => {
Cons.showLoader();
try {
let promises = [];
this.selectedItems.forEach(docID => promises.push(deleteDoc(docID)));
Promise.all(promises).then(res => {
showMessage("Все выделенные записи реестра удалены", "success");
this.createBody();
Cons.hideLoader();
});
} catch (err) {
Cons.hideLoader();
showMessage("Произошла ошибка при удалении записей реестра", "error");
console.log(error);
}
}, () => null);
},
documentInfo: function(dataRow, e){
const createRow = (label, value) => $(`<tr><td>${label}</td><td>${value}</td></tr>`);
let dialog = $('<div class="uk-flex-top" uk-modal>');
let md = $('<div class="uk-modal-dialog uk-margin-auto-vertical">');
let modalBody = $('<div class="uk-modal-body" uk-overflow-auto>');
dialog.append(md);
md.append('<button class="uk-modal-close-default" type="button" uk-close></button>')
.append('<div class="uk-modal-header"><h2 class="uk-modal-title">Свойства документа</h2></div>')
.append(modalBody)
.append('<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-default uk-modal-close" type="button">Закрыть</button></div>');
Cons.showLoader();
try {
rest.synergyGet(`api/docflow/doc/document_info?documentID=${dataRow.documentID}`, info => {
let container = $('<div>');
let table = $('<table>', {class: 'uk-table doc-info'});
let body = $('<tbody>');
let thead = $('<thead>').append('<tr><th>Параметр</th><th>Значение</th></tr>');
body.append(createRow('Наименование реестра', info.registryName));
body.append(createRow('Наименование формы', info.formName));
body.append(createRow('Автор документа', info.author));
body.append(createRow('Дата создания', info.createDate));
body.append(createRow('documentID', info.documentID));
body.append(createRow('asfDataID', info.asfDataID));
table.append(thead).append(body);
container.append(table);
modalBody.append(container);
Cons.hideLoader();
});
} catch (err) {
Cons.hideLoader();
modalBody.append('<p>Произошла ошибка получения данных по документу</p>');
console.log(error);
}
e.preventDefault();
e.target.blur();
UIkit.modal(dialog).show();
dialog.on('hidden', () => dialog.remove());
},
openDocument: function(dataRow, updateData = false) {
Cons.setAppStore({dataRow: dataRow});
if(this.allRights.indexOf('rr_read') !== -1) {
if(updateData) {
openFormPlayer(dataRow.dataUUID, null, () => {
this.createBody();
});
} else {
openFormPlayer(dataRow.dataUUID);
}
} else {
showMessage('У вас нет прав на просмотр этого документа', 'warning');
}
},
contextMenu: function(el, dataRow){
this.isDelete = false;
if(this.allRights.indexOf('rr_delete') !== -1 && dataRow.status != 'STATE_NOT_FINISHED') {
this.isDelete = true;
}
el.on('contextmenu', event => {
$('.exp-context-menu').remove();
$('<div>', {class: 'exp-context-menu'})
.css({
"left": event.pageX + 'px',
"top": event.pageY + 'px'
})
.appendTo('body')
.append(
$('<ul class="uk-nav-default uk-nav-parent-icon" uk-nav>')
.append($(`<li ><a href="javascript:void(0);"><span class="uk-margin-small-right" uk-icon="icon: push"></span>Открыть</a></li>`)
.on('click', e => {
this.openDocument(dataRow, true);
})
)
.append($('<li><a href="javascript:void(0);"><span class="uk-margin-small-right" uk-icon="icon: info"></span>Информация</a></li>')
.on('click', e => this.documentInfo(dataRow, e))
)
.append('<li class="uk-nav-divider"></li>')
.append($(`<li ${this.isDelete ? '' : 'class="uk-disabled"'} ><a href="javascript:void(0);"><span class="uk-margin-small-right" uk-icon="icon: trash"></span>Удалить запись</a></li>`)
.on('click', e => {
this.isDelete ? this.removeRegistryRow(dataRow.dataUUID, e) : false;
})
)
)
.show('fast');
return false;
});
},
createRow: function(dataRow) {
let tr = $('<tr>');
let checkbox = $('<input/>').addClass('uk-checkbox').attr('type', 'checkbox');
let tmpTd = $('<td>');
if(this.selectedItems.indexOf(dataRow.documentID) !== -1) checkbox.prop('checked', true);
tmpTd.append(`<span class="mobile-table-header">Выбор</span>`).append(checkbox);
tr.append(tmpTd);
checkbox.on('change', e => {
if(e.target.checked) {
if(this.selectedItems.indexOf(dataRow.documentID) === -1) {
this.selectedItems.push(dataRow.documentID);
}
} else {
let index = this.selectedItems.indexOf(dataRow.documentID);
if(index !== -1) this.selectedItems.splice(index, 1);
}
if(this.selectedItems.length > 0) {
$('.action-menu-item').removeClass('uk-disabled');
if($('.action-menu-item.item-delete').length) {
if(!this.isDelete) $('.action-menu-item.item-delete').addClass('uk-disabled');
}
} else {
$('.action-menu-item').addClass('uk-disabled');
}
});
this.heads.forEach(item => {
let td = $('<td>');
if (dataRow.fieldValue.hasOwnProperty(item.columnID)) {
td.attr('title', dataRow.fieldValue[item.columnID]);
td.append(`<span class="mobile-table-header">${item.label}</span>`);
td.append(`<span>${dataRow.fieldValue[item.columnID]}</span>`);
}
tr.append(td);
});
this.contextMenu(tr, dataRow);
tr.on('click', e => {
if($(e.target).is("input")) return;
this.openDocument(dataRow, true);
});
return tr;
},
createBody: function() {
rest.synergyGet(this.getUrl(), data => {
this.tBody.empty();
if(data.errorCode && data.errorCode != 0) {
Paginator.rows = 0;
} else {
data.result.forEach(item => this.tBody.append(this.createRow(item)));
Paginator.rows = data.recordsCount;
}
this.calcSum();
Paginator.update();
tableContainer.scrollTop(0);
});
},
resetHeaderLabel: function(){
$('.exp-pt-header > label').each((i, el) => $(el).text(this.heads[i].label).css({"text-decoration": "none"}));
},
createHeader: function() {
Cons.showLoader();
this.tHead.empty();
this.colgroup.empty();
let tr = $('<tr class="colHeaders">');
this.colgroup.append(`<col style="width: 20px">`);
let th = $('<th class="ui-resizable">');
let checkbox = $('<input/>')
.addClass('uk-checkbox')
.attr('type', 'checkbox')
.on('change', e => {
this.tBody.find('td > [type="checkbox"]').each((k, x) => {
x.checked = !!e.target.checked;
});
this.tBody.find('td > [type="checkbox"]').each((k, x) => {
$(x).trigger('change');
});
});
th.append(checkbox);
tr.append(th);
let me = this;
this.heads.forEach(item => {
this.colgroup.append(`<col style="width: 80px">`);
let tmp_th = $('<th class="exp-pt-header ui-resizable">');
let tmp_label = $('<label class="columnLabel">').text(item.label);
let tmp_imput = $('<input type="text" class="uk-input">').css({'height': 'auto'}).hide();
tmp_th.append(tmp_label).append(tmp_imput)
.append(`<div class="resizeHelper ui-resizable-handle ui-resizable-e">&nbsp;</div>`);
tr.append(tmp_th);
let timeoutId;
tmp_label.on("click", function (e) {
timeoutId = setTimeout(() => {
if(!timeoutId) return;
me.tHead.find("th").not(tmp_th).find('label').removeClass("exp-pt-sorted-asc exp-pt-sorted-desc");
if (tmp_label.hasClass("exp-pt-sorted-asc") || tmp_label.hasClass("exp-pt-sorted-desc")) {
tmp_label.toggleClass("exp-pt-sorted-asc exp-pt-sorted-desc");
} else {
tmp_label.addClass("exp-pt-sorted-asc");
}
me.sortCmpID = item.columnID;
me.sortDesc = tmp_label.hasClass("exp-pt-sorted-asc") ? false : true;
me.createBody();
}, 200);
});
tmp_label.on('dblclick', e => {
clearTimeout(timeoutId);
timeoutId = null;
e.preventDefault();
tmp_imput.show();
tmp_label.hide();
tmp_imput.on('blur', () => {
tmp_label.show();
tmp_imput.hide();
});
tmp_imput.on('keydown', e => {
if(e.which === 13) {
let inputVal = tmp_imput.val();
this.resetHeaderLabel();
if(inputVal && inputVal !== '') {
tmp_label.text(inputVal).css({"text-decoration": "underline"});
this.searchField = item.columnID;
this.searchValue = inputVal;
} else {
tmp_label.text(item.label).css({"text-decoration": "none"});
this.searchField = null;
this.searchValue = null;
}
this.createBody();
tmp_label.show();
tmp_imput.hide();
tmp_imput.off();
}
});
tmp_imput.focus();
});
});
setTimeout(() => {
this.tHead.append(tr);
this.createBody();
setTimeout(() => {
this.registryTable.resizableColumns();
Cons.hideLoader();
}, 500);
}, 100);
},
reset: function(){
this.filterRights = [];
this.allRights = [];
this.filterName = null;
this.filterCode = null;
this.filterID = null;
this.sortCmpID = null;
this.sortDesc = false;
this.searchField = null;
this.searchValue = null;
this.filterSearchUrl = null;
this.selectedItems = [];
this.sum = null;
this.registryTable = $('<table class="exp-table uk-table uk-table-small uk-table-divider uk-table-responsive">');
this.colgroup = $('<colgroup>');
this.tHead = $('<thead>');
this.tBody = $('<tbody>');
this.registryTable.append(this.colgroup).append(this.tHead).append(this.tBody);
tableContainer.empty().append(this.registryTable);
},
calcSum: function(){
if(!this.sum) return;
const {formField, resultLabel} = this.sum;
let url = `api/registry/count_data?registryCode=${this.registryCode}`;
if(this.filterCode) url+=`&filterCode=${this.filterCode}`;
if(this.searchString) url += `&searchString=${this.searchString}`;
if(this.filterSearchUrl) {
url += this.filterSearchUrl;
if(this.searchField && this.searchValue) {
let next = this.getNextFieldNumber(this.filterSearchUrl);
url+=`&field${next}=${this.searchField}&condition${next}=CONTAINS&value${next}=${this.searchValue}`;
}
} else {
if(this.searchField && this.searchValue) url+=`&field=${this.searchField}&condition=CONTAINS&value=${this.searchValue}`;
}
if(formField && resultLabel) {
url += `&fieldCode=${formField}&countType=sum`;
rest.synergyGet(url, data => {
const {numericinput_sum_0} = data;
if(numericinput_sum_0) {
fire({type: 'change_label', text: localizedText(numericinput_sum_0, numericinput_sum_0, numericinput_sum_0, numericinput_sum_0)}, resultLabel);
}
});
}
},
init: async function(params){
this.reset();
const registryList = await getRegistryList();
const info = await appAPI.getRegistryInfo(params.registryCode);
this.registryInfo = info;
this.heads = info.columns.filter(item => item.visible != '0')
.sort((a, b) => {
if (a.order == 0) return 0;
return a.order - b.order;
})
.map(item => {
return {label: item.label, columnID: item.columnID}
});
this.registryID = info.registryID;
this.registryName = info.name;
this.registryCode = params.registryCode;
this.allRights = registryList.find(x => x.registryCode == this.registryCode).rights;
this.formCode = info.formCode;
if(params.filterCode) this.filterCode = params.filterCode;
if(params.searchString) this.searchString = params.searchString;
if(params.hasOwnProperty('sum') && params.sum) {
this.sum = params.sum;
fire({type: 'change_label', text: localizedText('0', '0', '0', '0')}, this.sum.resultLabel);
}
this.createHeader();
Paginator.init();
}
}
compContainer.off()
.on('renderNewTable', e => {
if(!e.hasOwnProperty('eventParam')) return;
registryTable.init(e.eventParam);
})
.on('updateTableBody', e => {
if(!registryTable.registryCode) return;
if(Paginator.currentPage != 1) return;
if(e.hasOwnProperty('eventParam')) {
let param = e.eventParam;
if(param.hasOwnProperty('filterCode')) {
registryTable.filterCode = param.filterCode;
}
if(e.eventParam.hasOwnProperty('filterSearchUrl')) {
registryTable.filterSearchUrl = null;
}
}
Paginator.currentPage = 1;
registryTable.createBody();
})
.on('searchInRegistry', e => {
if(!e.hasOwnProperty('eventParam')) return;
if(e.eventParam.searchString && e.eventParam.searchString !== "") {
registryTable.searchString = e.eventParam.searchString;
} else {
registryTable.searchString = null;
}
Paginator.currentPage = 1;
registryTable.createBody();
})
.on('filterRegistryRows', e => {
if(!e.hasOwnProperty('eventParam')) return;
if(e.eventParam.filterSearchUrl && e.eventParam.filterSearchUrl !== "") {
registryTable.filterSearchUrl = e.eventParam.filterSearchUrl;
} else {
registryTable.filterSearchUrl = null;
return;
}
Paginator.currentPage = 1;
registryTable.createBody();
});
if($('#button-print-report').length) {
$('#button-print-report').off().on('click', e => {
e.preventDefault();
e.target.blur();
if(registryTable.searchString || registryTable.filterSearchUrl || registryTable.searchField) {
Cons.showLoader();
rest.synergyGet(registryTable.getUrl(true), data => {
let excelData = [];
data.result.forEach(res => {
let tmpValues = {};
registryTable.heads.forEach(col => tmpValues[col.label] = res.fieldValue[col.columnID] || "");
excelData.push(tmpValues);
});
try {
let opts = {headers: true, column: {style:{Font:{Bold:"1"}}}};
let result = alasql(`SELECT * INTO XLS("${registryTable.registryName}_${formatDate()}.xls",?) FROM ?`, [opts, excelData]); //XLSXML ломается, скорее всего где-то косяк в данных
Cons.hideLoader();
} catch (e) {
console.log(e.message);
Cons.hideLoader();
showMessage('Произошла ошибка при выгрузке отчета', 'error');
}
});
} else {
getSystemReport();
}
});
}
$(document).off()
.on('contextmenu', () => $('.exp-context-menu').remove())
.on('click', () => $('.exp-context-menu').remove());
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment