TG.WXCRM.V4/WEB/Views/Res/CustomerLabel/Index.cshtml

81 lines
2.9 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;
@using WX.CRM.Model.DTO;
@{
ViewBag.Title = "资源类型";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.ToolButton("btnImport", "icon-export", "导入", false)
@Html.ToolButton("btnDelete", "icon-delete", "删除", false)
</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_resId" /></li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Res/CustomerLabel/Index',
height: $(window).height() - 110,
loadNow: true
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnDelete").click(function () {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
if (r) {
$.r_post("/Res/CustomerLabel/Delete?resid=" + row.RESID, function (rsp) {
if (rsp.result) {
$("#tablist").tablegrid('Load');
$.messageBox5s('提示', "删除成功!");
}
else {
$.messageBox5s('提示', "删除失败,请稍后再试!");
}
}, "json");
}
});
} else {
$.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords');
}
});
$("#btnImport").click(function () {
$("#modalwindow").html(GetIframeHtml("/Res/CustomerLabel/Import"));
$("#modalwindow").window({ title: '批量导入', width: 500, height: 500, iconCls: 'icon-edit' }).window('open');
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
</script>
@*ToolBar事件处理*@
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
</script>