TG.WXCRM.V4/WEB/Views/Base/InnerUserRole/Index.cshtml

84 lines
3.2 KiB
Plaintext
Raw Permalink 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 = "bas_salesDepartment";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.Action("ToolBar", "Control", 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" />&nbsp;</li>
<li>名称:<input type="text" name="txt_uName" />&nbsp;</li>
<li>角色:<input type="text" id="txt_roleId" name="txt_roleId" style="width:150px;" />&nbsp;</li>
<li>
@*@Html.ToolButtonPlain("btnQuery", "icon-search", "查询", false, "")*@
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$('#List').tablegrid({
url: '/Base/InnerUserRole/GetHtmlList',
height: $(window).height() - 110,
loadNow: true,
isCheckMore: true
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#List').tablegrid("Search");
});
$("#txt_roleId").combotree({
url: "/Base/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("/Base/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>