| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>电话中心受话情况统计表</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/WorkOrder/Search.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link rel="stylesheet" href="../css/bootstrap-select.css" />
- <script src="../js/laydate/laydate.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script src="../js/bootstrap-select.js"></script>
- <style>
- table td {
- word-break: break-all;
- word-wrap: break-word;
- }
- .Shows {
- display: block !important;
- }
- .complain {
- display: none;
- }
- .toolLeft input {
- width: 200px;
- }
- th {
- padding: 5px;
- text-align: center;
- }
- td {
- padding: 5px;
- }
- .Borders {
- border: 1px solid #d7d7d7;
- }
- .daoHang {
- margin-bottom: 15px;
- }
- .Content_box .title {
- font-size: 24px;
- text-align: center;
- }
- .Content_box h5 {
- font-size: 16px;
- text-align: center;
- }
- .select {
- width: 200px;
- height: 32px;
- border: 1px solid rgb(229, 230, 231);
- }
- .footerDataStatistics {
- /* padding: 0 0 0 20px; */
- margin: 10px 0 0 10px;
- font-size: 18px;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">业务统计</a>>
- <a href="" class="nowPosition">电话中心受话情况统计表</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="Content_box">
- <div class="complain Shows">
- <div class="toolBar clearfix">
- <div class="toolLeft">
- 开始日期:
- <input class="photo x-color inputs laydate-icon" type="text" id="squeryTime"
- autocomplete="off" />
- 结束时间:
- <input class="photo x-color inputs laydate-icon" type="text" id="equeryTime"
- autocomplete="off" />
- 坐席组:
- <select id="agentGroup" name="select" class="selectpicker show-tick" multiple data-live-search="true">
- <option value="">请选择</option>
- </select>
- 受话坐席:
- <select id="ZX" name="select" class="selectpicker show-tick" multiple data-live-search="true">
- <option value="">请选择坐席</option>
- </select>
- <button class="btns search">查询</button>
- <a class="btns" id="exportReport">导出</a>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <table id="workorderlist" class="tables" data-row-style="rowStyle" data-query-params="queryParams"
- data-pagination="true">
- <thead>
- <tr>
- <th data-field="" data-formatter="serialNumber" data-align="center">序号</th>
- <th data-field="groupname" data-align="center">班组</th>
- <th data-field="username" data-align="center">坐席人员</th>
- <th data-field="telcount" data-align="center">通话量</th>
- <th data-field="hrcount" data-align="center">呼入接通量</th>
- <th data-field="hccount" data-align="center">呼出接通量</th>
- <th data-field="hcwjtcount" data-align="center">呼出未接通量</th>
- <th data-field="callTotal" data-align="center">来电总量</th>
- <th data-field="notConnectedAmount" data-align="center">未接通量</th>
- <th data-field="staybackDialQuantity" data-align="center">待回拨量</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function () {
- laydate.render({
- elem: '#squeryTime',
- theme: '#00a1cb',
- type: 'datetime'
- });
- laydate.render({
- elem: '#equeryTime',
- theme: '#00a1cb',
- type: 'datetime'
- });
- initTable();
- //获取坐席组
- getAgentGroup($("#agentGroup"));
- //获取坐席
- getAgent($("#ZX"))
- });
- //表格
- function initTable() {
- $.ajax({
- url: huayi.config.callcenter_url + 'WorkOrderReport/CenterReception',
- type: 'get',
- data: {
- starttime: $('#squeryTime').val(),
- endtime: $('#equeryTime').val(),
- group: getBootstrapSelectValue($("#agentGroup")), // 坐席组
- usercode: getBootstrapSelectValue($("#ZX")), // 坐席工号
- token: $.cookie("token")
- },
- dataType: "json",
- async: true,
- success: function (returnValue) {
- var resultData = [];
- if (returnValue.data.CenterReception.length > 0) {
- resultData = returnValue.data.CenterReception;
- resultData[0].callTotal = returnValue.data.CenterReception1[0].telcount;
- resultData[0].notConnectedAmount = returnValue.data.CenterReception2[0].wjtcount;
- resultData[0].staybackDialQuantity = returnValue.data.CenterReception3[0].dhbcount;
- }
- $('#workorderlist').bootstrapTable('load', resultData);
- $('#workorderlist').bootstrapTable('mergeCells', {
- index: 0,
- field: 'callTotal',
- colspan: 0,
- rowspan: resultData.length
- });
- $('#workorderlist').bootstrapTable('mergeCells', {
- index: 0,
- field: 'notConnectedAmount',
- colspan: 0,
- rowspan: resultData.length
- });
- $('#workorderlist').bootstrapTable('mergeCells', {
- index: 0,
- field: 'staybackDialQuantity',
- colspan: 0,
- rowspan: resultData.length
- });
- }
- });
- $('#workorderlist').bootstrapTable('destroy').bootstrapTable({
- striped: true,
- pagination: false,
- });
- }
- //搜索
- $(".search").click(function () {
- initTable();
- });
- //编号
- function serialNumber(val, row, index) {
- return index + 1;
- }
- // 坐席组
- function getAgentGroup(obj) {
- obj.empty();
- $.getJSON(
- huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById", {
- token: $.cookie("token"),
- id: 2522,
- },
- function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $(
- "<option value='" +
- n.F_Value +
- "'>" +
- n.F_Value +
- "</option>"
- ).appendTo(obj);
- });
- obj.selectpicker({
- noneSelectedText: "请选择", //默认显示内容
- });
- obj.selectpicker("refresh");
- }
- }
- );
- }
- ///坐席
- function getAgent(obj) {
- obj.empty();
- $.getJSON(
- huayi.config.callcenter_url + "UserAccount/GetSeatList", {
- token: $.cookie("token"),
- },
- function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $(
- "<option value='" +
- n.F_UserCode +
- "'>" +
- n.F_UserName +
- "</option>"
- ).appendTo(obj);
- });
- obj.selectpicker({
- noneSelectedText: "请选择", //默认显示内容
- });
- obj.selectpicker("refresh");
- }
- }
- );
- }
- //导出
- $('#exportReport').click(function () {
- dcexcelDispath(this);
- });
- function dcexcelDispath(obj) {
- var starttime = $('#squeryTime').val();
- var endtime = $('#equeryTime').val();
- var group = getBootstrapSelectValue($("#agentGroup")); // 坐席组
- var usercode = getBootstrapSelectValue($("#ZX")); // 受话坐席
- var url = huayi.config.callcenter_url + "WorkOrderReport/CenterReception?token=" + $.cookie("token");
- url += "&starttime=" + starttime + "&endtime=" + endtime + "&group=" + group + "&usercode=" + usercode + "&isExport=true";
- obj.href = url;
- }
- // 获取多选框的值
- function getBootstrapSelectValue(obj) {
- var selectedId = "";
- var selectedCode = obj.val();
- if (selectedCode != null) {
- selectedCode.forEach(function(element, index) {
- if (element !== "") {
- selectedId += element + ",";
- }
- });
- selectedId = selectedId.slice(0, -1);
- }
- return selectedId;
- }
- </script>
- </body>
- </html>
|