85 lines
3.2 KiB
Plaintext
85 lines
3.2 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)
|
||
@*@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>角色:<input type="text" id="txt_roleId" name="txt_roleId" style="width:150px;" /> </li>
|
||
<li>
|
||
@*@Html.ToolButtonPlain("btnQuery", "icon-search", "查询", false, "")*@
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.gridTable)
|
||
</div>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
$('#List').tablegrid({
|
||
url: 'InnerUserRole/GetHtmlList',
|
||
height: $(window).height() - 110,
|
||
loadNow: true,
|
||
isCheckMore: true
|
||
});
|
||
$("#btnQuery").click(function () {//搜索按钮点击事件
|
||
$('#List').tablegrid("Search");
|
||
});
|
||
$("#txt_roleId").combotree({
|
||
url: "Role/GetRoleAllTree"
|
||
});
|
||
});
|
||
function OpenWindow(opOptions) {
|
||
$("#modalwindow").html("<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + opOptions.src + "'></iframe>");
|
||
$("#modalwindow").window({ title: opOptions.title, width: opOptions.width, height: opOptions.width, iconCls: opOptions.iconCls }).window('open');
|
||
}
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
function frameReturnByReload(flag) {
|
||
$("#List").tablegrid("Load");
|
||
}
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
</script>
|
||
|
||
@*ToolBar事件处理*@
|
||
<script type="text/javascript">
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
function SettingRole_Click() {
|
||
var row = $('#List').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("InnerUserRole/SettingInnerUserRole"));
|
||
$("#modalwindow").window({ title: '分配角色', width: 700, height: 430, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
//获取员工角色ID (如果单行选中就获取角色ID,否则不取)
|
||
function GetUserRoleId() {
|
||
var selects = $("#List").tablegrid("getSelections");
|
||
if (selects.length > 1)
|
||
return null;
|
||
return selects[0].roleIds;
|
||
}
|
||
//获取员工ID (获取被选中的员工ID)
|
||
function GetUserId() {
|
||
var selects = $("#List").tablegrid("getSelections");
|
||
var pkids = "";
|
||
$(selects).each(function (i, n) {
|
||
pkids += "" + n.pkid + ",";
|
||
});
|
||
if (pkids.length > 0)
|
||
pkids = pkids.substr(0, pkids.length - 1);
|
||
return pkids;
|
||
}
|
||
</script>
|