TG.WXCRM.V4/WEB/Views/Csvr/CallRecord/UserCallReport.cshtml

101 lines
4.8 KiB
Plaintext

@using System.Collections.Generic
@using System.Web.UI.WebControls
@using WX.CRM.WebHelper;
@{
ViewBag.Title = "员工坐席统计";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<link href="~/Content/main.css" rel="stylesheet" />
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
</div>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
<li>
@*<input type="button" id="btntoday" value="当天" />
<input type="button" id="btnweek" value="本周" />
<input type="button" id="btnthemonth" value="本月" />*@
<div style="display:none;"><input type="text" id="txt_Daytype"/></div>
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
//获取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 onLoadSucced() {
$('#tablist').tablegrid("Search");
}
$(function () {
$('#tablist').tablegrid({
url: '/CallRecord/Get_UserCallReportHtml?v2',
height: $(window).height() - 80,
loadNow: false,
data: GetControlValue,
onLoadError: function () {
$.messager.alert("警告", "数据加载失败!", "error");
}
});
function GetControlValue() {
return { dayType: $("#txt_Daytype").val() };
}
$("#btnQuery").click(function () {
// $("#txt_Daytype").val("1");
$('#tablist').tablegrid("Search");
});
//$("#btntoday").click(function () {
// alert("1");
// $("#txt_Daytype").val("1");
// $('#tablist').tablegrid("Search");
//});
//$("#btnweek").click(function () {
// $("#txt_Daytype").val("2");
// $('#tablist').tablegrid("Search");
//});
//$("#btnthemonth").click(function () {
// $("#txt_Daytype").val("3");
// $('#tablist').tablegrid("Search");
//});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 80
});
});
});
function PalyRecord(url, objDiv) {
alert(url);
$('#' + objDiv).show();
$('#' + objDiv).html('<object id="Player" width="300" height="50" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"hspace="5"><param name="AutoRewind" value="1"><param name="FileName" value="' + url + '"><param name="ShowControls" value="1"><param name="ShowPositionControls" value="0"><param name="ShowAudioControls" value="1"><param name="ShowTracker" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="0"><param name="ShowGotoBar" value="0"><param name="ShowCaptioning" value="0"><param name="AutoStart" value="1"><param name="Volume" value="5000"><param name="AnimationAtStart" value="0"><param name="TransparentAtStart" value="0"><param name="AllowChangeDisplaySize" value="0"><param name="AllowScan" value="0"><param name="EnableContextMenu" value="0"><param name="ClickToPlay" value="1"> </object>');
$('#' + objDiv).append('<input id="btnClose" type="button" value="关闭" onclick="StopRecord(\'' + objDiv + '\');" />')
}
function StopRecord(objDiv) {
document.getElementById("Player").stop();
$('#' + objDiv).hide();
$('#' + objDiv).html('');
}
function Export_Click() {
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Csvr/CallRecord/Export?" + GetQueryStr() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&saleDeptId=" + $("#nb1_uc_org_depts").val())));
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
}
function ExportStatis_Click() {
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Csvr/CallRecord/StatisExport?" + GetQueryStr() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&saleDeptId=" + $("#nb1_uc_org_depts").val())));
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
}
</script>