75 lines
2.4 KiB
Plaintext
75 lines
2.4 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "bas_agent";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<script src="~/Scripts/op/tablegrid.sort.js"></script>
|
|
<div class="mvctool">
|
|
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
|
|
</div>
|
|
<div class="bas_datagrid">
|
|
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#tablist').tablegrid({
|
|
url: '/WeiXin/UnLineConfig/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
onLoadSuccess: function (data) {
|
|
//成功
|
|
}, onLoadError: function (ex) {
|
|
//失败
|
|
}
|
|
});
|
|
|
|
|
|
$("#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);
|
|
}
|
|
</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("/WeiXin/UnLineConfig/Create"));
|
|
$("#modalwindow").window({ title: '新增', width: 400, height: 200, iconCls: 'icon-add' }).window('open');
|
|
}
|
|
|
|
function Delete_Click() {
|
|
var row = $('#tablist').tablegrid('getSelected');
|
|
if (row != null) {
|
|
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
|
|
if (r) {
|
|
$.r_post("/WeiXin/UnLineConfig/Delete?id=" + row.PKID, function (data) {
|
|
if (data.type == 1) {
|
|
$("#tablist").tablegrid('Load');
|
|
}
|
|
$.messageBox5s('提示', data.message);
|
|
}, "json");
|
|
}
|
|
});
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
|
|
</script>
|