101 lines
3.8 KiB
Plaintext
101 lines
3.8 KiB
Plaintext
@using Mini.Web.WebHelper;
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Areas/Admin/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@if (ViewBag.type as string == "")
|
|
{
|
|
@*@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)*@
|
|
@await Component.InvokeAsync("ToolBar", new { ToolBar = ViewBag.ToolBar as ToolBar })
|
|
}
|
|
</div>
|
|
|
|
<div class="bas_datagrid">
|
|
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
|
<ul class="toolBar_ul">
|
|
<li>工号:<input type="text" name="txt_eID" /></li>
|
|
<li>姓名:<input type="text" name="txt_uName" /></li>
|
|
<li>是否离职:@Html.DropDownList("slt_isDismiss", new List<SelectListItem>() { new SelectListItem(){ Text="全部",Value="-1"}, new SelectListItem(){ Text="没有离职",Value="0",Selected=true}, new SelectListItem(){ Text="已经离职",Value="1"} })</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
$('#tablist').tablegrid({
|
|
url: 'Inneruser/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
isPage: true
|
|
});
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$(window).resize(function () {
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
});
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
function getPageOptions(gridID) {
|
|
var option = $("#tablist").tablepage('getPagination');
|
|
var str = "rows=" + option.rows + "&page=" + option.page + "&order=" + option.order + "&sort=" + option.sort;
|
|
return str;
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist').tablegrid("getHead");
|
|
return columns;
|
|
}
|
|
|
|
</script>
|
|
@*ToolBar事件处理*@
|
|
<script type="text/javascript">
|
|
function GetIframeHtml(src) {
|
|
return "<iframe id='ifymbc' width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
|
}
|
|
function Create_Click() {
|
|
$("#modalwindow").html(GetIframeHtml("Inneruser/Edit"));
|
|
$("#modalwindow").window({ title: '新增', width: 700, height: 400, iconCls: 'icon-add' }).window('open');
|
|
//ShoLayoutWindow();
|
|
}
|
|
function Edit_Click() {
|
|
var row = $('#tablist').tablegrid('getSelected');
|
|
if (row != null) {
|
|
$("#modalwindow").html(GetIframeHtml("Inneruser/Edit?uId=" + row.uid));
|
|
$("#modalwindow").window({ title: '编辑', width: 700, height: 400, iconCls: 'icon-edit' }).window('open');
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
function Delete_Click() {
|
|
var row = $('#tablist').tablegrid('getSelected');
|
|
if (row != null) {
|
|
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
|
|
if (r) {
|
|
$.r_post("Inneruser/Delete?uId=" + row.uid, function (data) {
|
|
if (data.type == 1) {
|
|
$("#tablist").tablegrid('Load');
|
|
}
|
|
$.messageBox5s('提示', data.message);
|
|
}, "json");
|
|
}
|
|
});
|
|
} else {
|
|
$.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords');
|
|
}
|
|
}
|
|
|
|
</script>
|