ComplianceServer/oldcode/WEB/Views/Base/Role/RoleLevel.cshtml

96 lines
3.5 KiB
Plaintext
Raw 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.

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Role";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@*@Html.ToolButton("btnQuery", "icon-search", "查询", true)*@
@*@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)*@
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.ToolButton("btnAdd", "icon-add", "新增特权", true)
@Html.ToolButton("btnUpdate", "icon-edit", "修改特权", true)
@Html.ToolButton("btnDelete", "icon-remove", "删除", true)
</div>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
<li>
权限ID<input type="text" name="txt_rightcode" />&nbsp;
<input name="txt_rolecode" value="@Html.Raw(Request.QueryString["rolecode"])" type="hidden" />
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script>
$(function () {
$('#tablist').tablegrid({
url: '/Base/Role/GetRoleLevelHtmlList',
height: $(window).height() - 110,
loadNow: true
});
///查询
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
///新增
$("#btnAdd").click(function () {
Create_Click()
});
///修改
$("#btnUpdate").click(function () {
Edit_Click()
});
///删除
$("#btnDelete").click(function () {
Delete_Click()
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").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 Create_Click() {
$("#modalwindow").html(GetIframeHtml("/Base/Role/LevelEdit?rolecode=@Html.Raw(Request.QueryString["rolecode"])"));
$("#modalwindow").window({ title: '新增', width: 700, height: 400, iconCls: 'icon-add' }).window('open');
}
function Edit_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/Base/Role/LevelEdit?rolecode=@Html.Raw(Request.QueryString["rolecode"])&id=" + row.PKID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '编辑', width: 700, height: 430, 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("/Base/Role/LevelDelete?id=" + row.PKID, function (data) {
if (data.type == 1) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
});
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
</script>