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

108 lines
4.4 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Base/InnerGroup/GetHtmlList',
height: $(window).height() - 110,
loadNow: true
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
$(function () {
$("[name='txt_saleDeptId']").combotree({
required: true,
height: 28,
url: "/Base/salesDepartment/GetTreeList"
});
});
});
//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">
<ul class="toolBar_ul">
<li>销售部门:<input type="text" name="txt_saleDeptId" style="width:200px;" />&nbsp;</li>
<li>组名称:<input type="text" name="txt_gName" />&nbsp;</li>
<li>
是否隐藏:@Html.DropDownList("slt_isHide", new List<SelectListItem>() {
new SelectListItem(){ Text="全部",Value="-1"},
new SelectListItem(){ Text="是",Value="1"},
new SelectListItem(){ Text="否",Value="0",Selected=true}
})
</li>
<li style="display:none;">创建时间:@Html.WdatePickerText("txt_ctime1", "")~@Html.WdatePickerText("txt_ctime2", "")</li>
<li>
@*@Html.ToolButtonPlain("btnQuery", "icon-search", "查询", false, "")*@
@Html.ToolButtonPlain("btnMore", "", "更多↓", false, "nstatus='hidden'")
</li>
</ul>
</div>
@Html.Raw(ViewBag.List)
</div>
@*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("/Base/InnerGroup/Edit"));
$("#modalwindow").window({ title: '新增', width: 700, height: 400, iconCls: 'icon-add' }).window('open');
}
function Edit_Click() {
var row = $("#tablist").tablegrid("getSelected");
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/Base/InnerGroup/Edit?id=" + row.GID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '编辑', width: 700, height: 430, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Details_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/Base/InnerGroup/Details?id=" + row.GID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '详细', width: 500, height: 300, iconCls: 'icon-details' }).window('open');
} 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("/Base/InnerGroup/Delete?id=" + row.GID, function (data) {
if (data.type == 1) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
});
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
</script>