144 lines
7.3 KiB
Plaintext
144 lines
7.3 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" />*@
|
|
<script src="~/Scripts/op/tablegrid.sort.js?t=1"></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>
|
|
|
|
<li id="theHC">
|
|
<input id="btnToday" type="button" name="btnToday" value="今日" />
|
|
<div style="display:none;"><input type="text" id="txt_Daytype" /></div>
|
|
<input id="btnWeek" type="button" name="btnWeek" value="本周" />
|
|
<input id="btnMonth" type="button" name="btnMonth" value="本月" />
|
|
</li>
|
|
|
|
@*<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "" , currentRight = WX.CRM.WebHelper.InitRights.CONST_组别坐席统计 })</li>*@
|
|
@* <li>@Html.Action("UserComBox", "Control", new { isShowDismiss = true, currentRight = WX.CRM.WebHelper.InitRights.CONST_工单统计 })</li>*@
|
|
<li>@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_工单统计 })</li>
|
|
@*<li>状态:<select name="slt_isdismiss"><option value="">全部</option><option value="0">在职</option><option value="1">离职</option></select></li>*@
|
|
<li id="InitDateLi">最后计算时间:@Html.Label("lbInitDatetime", new { id = "lbInitDatetime" })</li>
|
|
<li id="advandli" style="display:none;">开始时间:@Html.WdatePickerText("txt_STime", DateTime.Now.ToString("yyyy-MM-dd"), "", "\'#F{$dp.$D(\\\'txt_ETime\\\')}\'")-@Html.WdatePickerText("txt_ETime", DateTime.Now.ToString("yyyy-MM-dd"), "\'#F{$dp.$D(\\\'txt_STime\\\')}\'", "")</li>
|
|
<li>
|
|
<input id="txt_SearchType" name="txt_SearchType" type="hidden" value="0" />
|
|
</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_CallReportHtml?v2',
|
|
height: $(window).height() - 80,
|
|
loadNow: false,
|
|
data: GetControlValue,
|
|
onLoadSuccess: function (data) {
|
|
$("#lbInitDatetime").text(data.initTime);
|
|
},
|
|
onLoadError: function () {
|
|
$.messager.alert("警告", "数据加载失败!", "error");
|
|
}
|
|
});
|
|
function GetControlValue() {
|
|
return { dayType: $("#txt_Daytype").val() };
|
|
}
|
|
$("#btnQuery").click(function () {
|
|
getDataGridHeader();
|
|
var SearchType = $("#txt_SearchType").val();
|
|
if (SearchType == "1") {
|
|
var stime = $("#txt_STime").val();
|
|
var etime = $("#txt_ETime").val();
|
|
if (stime == "" || etime == "") {
|
|
$.messager.alert("警告", "查询时间不能为空!", "error");
|
|
return false;
|
|
}
|
|
}
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
|
|
$("#btnToday").click(function () {
|
|
$("#txt_Daytype").val("1");
|
|
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
$("#btnWeek").click(function () {
|
|
$("#txt_Daytype").val("2");
|
|
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
$("#btnMonth").click(function () {
|
|
$("#txt_Daytype").val("3");
|
|
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 80
|
|
});
|
|
});
|
|
});
|
|
|
|
function AdvanceSearch() {
|
|
var o = $("#txt_SearchType").val();
|
|
if (o == "0") {
|
|
$("#txt_SearchType").val(1);
|
|
$("#advandli").attr("style", "");
|
|
$("#theHC").attr("style", "display:none;");
|
|
$("#InitDateLi").attr("style", "display:none;");
|
|
} else {
|
|
$("#txt_SearchType").val(0);
|
|
$("#advandli").attr("style", "display:none;");
|
|
$("#theHC").attr("style", "");
|
|
$("#InitDateLi").attr("style", "");
|
|
}
|
|
}
|
|
|
|
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() + "&dayType=" + $("#txt_Daytype").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() + "&dayType=" + $("#txt_Daytype").val())));
|
|
// $("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
//}
|
|
</script>
|