100 lines
3.1 KiB
Plaintext
100 lines
3.1 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#tablist').tablegrid({
|
|
url: '/Csvr/ApplyPrimNum/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: true
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
|
|
});
|
|
//ifram 返回
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
</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">
|
|
|
|
</div>
|
|
@Html.Raw(ViewBag.List)
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
function GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
|
}
|
|
|
|
function Check_Click() {
|
|
var row = $("#tablist").tablegrid("getSelected");
|
|
if (row != null) {
|
|
|
|
$.r_ajax({
|
|
url: "/Csvr/ApplyPrimNum/Update?pkid=" + row.PKID + "&resid=" + row.RESID,
|
|
type: "POST",
|
|
data: $("#CreateForm").serialize(),
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
window.frameReturnByMes(data.message);
|
|
window.frameReturnByReload(true);
|
|
window.frameReturnByClose();
|
|
} else {
|
|
window.frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
|
|
} 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("/Csvr/ApplyPrimNum/Delete?pkid=" + row.PKID, function (data) {
|
|
if (data.type == 1) {
|
|
$('#tablist').tablegrid("Load");
|
|
$.messageBox5s('提示', data.message);
|
|
}
|
|
else {
|
|
$.messageBox5s('提示', data.message);
|
|
}
|
|
}, "json");
|
|
}
|
|
});
|
|
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
|
}
|
|
|
|
|
|
function Reload_Click() {
|
|
frameReturnByReload(true);
|
|
}
|
|
</script>
|