TG.WXCRM.V4/WEB/Views/Sms/MsgTemplate/Index.cshtml

104 lines
4.5 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "a";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
var controlResource = new WX.CRM.WEB.Handler.ControlResource();
}
<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>短信类型:@Html.OptGroupSelect("slt_SubType", string.Format("{0}", "-1"), controlResource.GetOrd_MsgSubType(1))</li>
<li>
是否显示:@Html.DropDownList("slt_IsShow", new List<SelectListItem>() {
new SelectListItem(){ Text="全部",Value="-1"},
new SelectListItem(){ Text="是",Value="1"},
new SelectListItem(){ Text="否",Value="0"}
})
</li>
<li>
是否审核:@Html.DropDownList("slt_IsCheck", new List<SelectListItem>() {
new SelectListItem(){ Text="全部",Value="-1"},
new SelectListItem(){ Text="是",Value="1"},
new SelectListItem(){ Text="否",Value="0"}
})
</li>
<li>标题:<input type="text" name="txt_Title" style="width:150px"/>&nbsp;</li>
<li>参数:<input type="text" name="txt_Param" />&nbsp;</li>
<li>创建时间:@Html.WdatePickerText("txt_Stime", "")
~@Html.WdatePickerText("txt_Etime", "")</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/SMS/MsgTemplate/GetHtmlList',
height: $(window).height() - 110,
loadNow: true,
onLoadSuccess: function () {
//成功
}, onLoadError: function () {
//失败
}
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
});
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
</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("/SMS/MsgTemplate/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("/SMS/MsgTemplate/Edit?id=" + row.PKID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '编辑', width: 700, height: 430, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Audited_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/SMS/MsgTemplate/Details?id=" + row.PKID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '详细', width: 500, height: 400, 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("/SMS/MsgTemplate/Delete?id=" + row.PKID, function (data) {
if (data.type == 1) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
});
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
</script>