ComplianceServer/oldcode/WEB/Views/Level2/L2UserKicked/Index.cshtml

101 lines
3.1 KiB
Plaintext

@using System.Collections;
@using System.Web.UI.WebControls;
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script type="text/javascript">
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
$(function () {
var search = -1;
$('#tablist').tablegrid({
url: '/Level2/L2UserKicked/GetHtmlList',
height: $(window).height() - 110,
loadNow: true,
onloadsuccess: function (data) {
//成功
},
onloaderror: function () {
//失败
$.messager.alert("警告", "信息加载失败!", "error");
}
});
//$('#tablist').tablegrid("Load");
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
});
//设置是否禁止互踢
function btnSet_Click() {
$("#modalwindow").html(GetIframeHtml("/Level2/L2UserKicked/SetIsCanKicked"));
$("#modalwindow").window({ title: '设置', width: 480, height: 200, iconCls: 'icon-lookup' }).window('open');
}
//取消订单
function btnCancel_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
if (confirm("确认取消禁止互踢吗?")) {
$.r_post("/Level2/L2UserKicked/CancelKicked?uname=" + row.hid_username, function (data) {
if (data.type) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
}
}
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
//ifram 返回
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>
<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_userName" />&nbsp;</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>