88 lines
3.8 KiB
Plaintext
88 lines
3.8 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
|
|
@{
|
|
ViewBag.Title = "微信消息统计";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<script src="~/Scripts/op/tablegrid.sort.js"></script>
|
|
<script src="~/Scripts/op/ofixedtable.js"></script>
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@Html.ToolButton("btnExport", "icon-export", "导出", true)
|
|
@*@Html.ToolButton("btnClear","icon-clear","清除",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" id="txt_sTime" name="txt_sTime" value=@(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd")) onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" style="width: 100px;" />-@Html.WdatePickerText("txt_eTime", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"))</li>
|
|
<li>@Html.Action("UserComBoxByRole", "Control", new { controlName = "nb1", onLoadSucced = "onLoadSucced()", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid, currentRight = WX.CRM.WebHelper.InitRights.CONST_微信聊天信息统计 })</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
//var ofix1 = null;
|
|
$(function () {
|
|
$(window).resize(function () {
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
//if(ofix1 != null)
|
|
// ofix1.resize();
|
|
});
|
|
|
|
$("#btnQuery").click(function () {
|
|
//$('#tablist').tablegrid("Search");
|
|
LoadData();
|
|
});
|
|
$("#btnExport").click(function () {
|
|
BtnExportAll_Click();
|
|
});
|
|
|
|
});
|
|
function onLoadSucced() {
|
|
LoadData();
|
|
}
|
|
function LoadData() {
|
|
$("#tablist").tablegrid({
|
|
url: '/weixin/MessageCount/index',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
data: GetControlValue(),
|
|
onLoadSuccess: function (data) {
|
|
//if (ofix1 == null) {
|
|
// ofix1 = new oFixedTable('ofix1', document.getElementById('tablist'), {});
|
|
//} else {
|
|
// ofix1.resize();
|
|
//}
|
|
}
|
|
});
|
|
}
|
|
function GetControlValue() {
|
|
return {
|
|
saleDeptId: $("#nb1_uc_org_depts").val()
|
|
, groupId: $("#nb1_uc_org_groups").val()
|
|
, userId: $("#nb1_uc_org_ids").val()
|
|
};
|
|
}
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist').tablegrid("getHead");
|
|
return columns;
|
|
}
|
|
function GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
|
|
}
|
|
function BtnExportAll_Click() {
|
|
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/weixin/MessageCount/Export?" + GetQueryStr() + "&curmonth=" + $('#curmonth').prop('checked') + "&SltValueStaus=" + $("#SltValueStaus").val() + "&SltDismStatus=" + $("#SltDismStatus").val() + "&status=" + $("#SltMonStatus").val() + "&SltMonDate=" + $('#SltMonDate').val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&winrand=" + Math.random())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
</script> |