init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
158
KretaWeb/Areas/GRModul/Views/UzletiTervezes/Index.cshtml
Normal file
158
KretaWeb/Areas/GRModul/Views/UzletiTervezes/Index.cshtml
Normal file
|
@ -0,0 +1,158 @@
|
|||
@using Kreta.Enums.ManualEnums
|
||||
@using Kreta.Framework.Util
|
||||
@using Kreta.Resources
|
||||
@using Kreta.Web.Areas.GRModul.Models;
|
||||
|
||||
@model UzletiTervSearchModel
|
||||
|
||||
@{
|
||||
var exportFileName = ViewData[GRModulResource.IntezmenyAzonositoKey] + "-uzletitervezes.xlsx";
|
||||
}
|
||||
<style>
|
||||
.KretaJsGrid .k-filtercell > span > .k-button {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.KretaJsGrid .k-pager-wrap .k-pager-nav span {
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
a.k-button.k-button-icontext.k-grid-excel {
|
||||
display: none !important;
|
||||
}
|
||||
a.azonositoLink {
|
||||
color: @EventColorRightLineEnum.VilagosKek.GetStringValue();
|
||||
cursor: pointer;
|
||||
}
|
||||
.k-pager-wrap.k-grid-pager.k-widget.k-floatwrap {
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@section AddSearchPanel {
|
||||
@using (Html.SearchPanelSideBar("searchForm", string.Empty, postSubmitFunction: "UzletiTervezetHelper.refreshGrid"))
|
||||
{
|
||||
@Html.KretaComboBoxFor(x => x.Honap, Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new { controller = Constants.ApiControllers.ComboBoxHelperApi, action = "GetTanitasiHonapok" }), htmlAttributes: new Dictionary<string, object> {{ "id", "HonapDropDown"}}, useGroup: true).RenderSearchPanelSideBar();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
<div class="text-center displayMsg">
|
||||
<b>@GRModulResource.KerjukHasznaljaASzuroket</b>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<a class="k-button k-button-icontext" href="#" onclick="UzletiTervezetHelper.exportData()">@GRModulResource.ExportalasExcelben</a>
|
||||
<div class="KretaJsGrid" id="UzletiTervezesGrid"></div>
|
||||
|
||||
@section AddJs{
|
||||
<script type="text/javascript">
|
||||
var UzletiTervezetHelper = (function() {
|
||||
var helper = function() {};
|
||||
const gridId = "UzletiTervezesGrid";
|
||||
const urls = {
|
||||
GetUzletiTervek:
|
||||
"@Url.HttpRouteUrl(Constants.RouteKey.ActionApi, new {controller = "UzletiTervezesApi", action = "GetUzletiTervek"})",
|
||||
}
|
||||
|
||||
helper.refreshGrid = function() {
|
||||
AjaxHelper.DoGet(urls.GetUzletiTervek, KretaGridHelper.getSearchParameters('#searchForm'), setGridData);
|
||||
$(".displayMsg").hide();
|
||||
}
|
||||
|
||||
helper.exportData = () => {
|
||||
exportData();
|
||||
}
|
||||
|
||||
function initGrid() {
|
||||
$("#" + gridId).kendoGrid({
|
||||
columns: [
|
||||
{
|
||||
field: "RovatAzonosito",
|
||||
template: '<a class="azonositoLink" onclick="UzletiTervezetHelper.navigateToAlkalmazottak(this)">${RovatAzonosito}</a>',
|
||||
title: "@Html.Raw(GRModulResource.Azonosito)",
|
||||
filterable: {
|
||||
cell: {
|
||||
operator: "contains",
|
||||
suggestionOperator: "contains",
|
||||
showOperators: false
|
||||
}
|
||||
},
|
||||
headerAttributes: { style: "text-align: center; vertical-align: top;" }
|
||||
},
|
||||
{
|
||||
field: "RovatSorNev",
|
||||
title: "@Html.Raw(GRModulResource.Nev)",
|
||||
filterable: {
|
||||
cell: {
|
||||
operator: "contains",
|
||||
suggestionOperator: "contains",
|
||||
showOperators: false
|
||||
}
|
||||
},
|
||||
headerAttributes: { style: "text-align: center; vertical-align: top;" },
|
||||
|
||||
},
|
||||
{
|
||||
field: "Osszeg",
|
||||
title: "@Html.Raw(GRModulResource.Osszeg)",
|
||||
filterable: {
|
||||
cell: {
|
||||
operator: "gte",
|
||||
suggestionOperator: "gte",
|
||||
showOperators: false
|
||||
}
|
||||
},
|
||||
headerAttributes: { style: "text-align: center; vertical-align: top;" },
|
||||
},
|
||||
],
|
||||
filterable: {
|
||||
mode: "row"
|
||||
},
|
||||
pageable: true,
|
||||
sortable: {
|
||||
mode: "multiple",
|
||||
allowUnsort: true,
|
||||
},
|
||||
toolbar: ["excel"],
|
||||
excel: {
|
||||
fileName: '@exportFileName',
|
||||
filterable: true,
|
||||
allPages: true
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
function setGridData(data) {
|
||||
const dataSource = new kendo.data.DataSource({
|
||||
data: data.Data,
|
||||
pageSize: 100,
|
||||
});
|
||||
|
||||
$("#"+gridId).data("kendoGrid").setDataSource(dataSource);
|
||||
}
|
||||
|
||||
function exportData() {
|
||||
let grid = $("#" + gridId).data("kendo-grid");
|
||||
|
||||
if (grid) {
|
||||
grid.saveAsExcel();
|
||||
}
|
||||
}
|
||||
|
||||
helper.navigateToAlkalmazottak = (e) => {
|
||||
let azonosito = e.innerText;
|
||||
let honap = $("#HonapDropDown").data('kendoComboBox').value();
|
||||
|
||||
window.location.href = '@Url.Action("AlkalmazottTenyAdatok", "UzletiTervezes")/?azonosito=' + azonosito + "&honap=" + honap;
|
||||
}
|
||||
|
||||
initGrid();
|
||||
return helper;
|
||||
})();
|
||||
|
||||
</script>
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue