| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <!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 href="../../css/Table/table1.css" rel="stylesheet" />
- <script src="../../js/laydate/laydate.js"></script>
- <link href="../../css/init.css" rel="stylesheet" />
- <link href="../css/report.css" rel="stylesheet" />
- </head>
- <body class="gray-bg">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">外呼管理</a>>
- <a href="javaScript:;">外呼报表</a>>
- <a href="" style="color: #000;">区域排名报表</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="toolBox clearfix">
- <div class="pull-left">
- <div class="form-inline">
- <div class="time-box form-group">
- <i class="tub fa fa-calendar"></i>
- <input class="form-control search_time" type="text" id="s_time" placeholder="请选择起止时间" lay-key="1">
- </div>
- <div class="form-group">
- <select class="form-control" id="s_task"></select>
- </div>
- <div class="form-group">
- <input type="text" class="form-control" id="key" placeholder="请输入电话号码">
- </div>
- </div>
- </div>
- <div class="pull-right tool_bars">
- <button type="button" class="btns" id="sc_btns">搜索</button>
- <a href="javascript:;" class="btns" onclick="dcexcel(this)">导出</a>
- </div>
- </div>
- <div style="width: 100%;padding: 10px;">
- <div class="table-head">
- <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
- <colgroup>
- <col style="width: 80px;" />
- <col/>
- </colgroup>
- <thead>
- <tr>
- <td>排名</td>
- <td>乡镇或单位</td>
- <td>总数</td>
- </tr>
- </thead>
- </table>
- </div>
- <div class="table-body">
- <table class="thTable hwbb table table-hover table-striped table-bordered table-condensed">
- <colgroup>
- <col style="width: 80px;" />
- <col/>
- </colgroup>
- <tbody>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- /*var nt = helper.DateFormat.getNowDate();
- var pr = helper.DateFormat.getPreMonth(nt);
- var st = pr + ' ~ ' + nt;*/
- taskSelect();
- laydate.render({
- elem: '#s_time',
- range: '~',
- //value: st,
- calendar: true,
- theme: '#1ab394',
- });
- getRankList()
- $("#sc_btns").click(function() {
- getRankList();
- });
- $('#ReIndex').click(function() {
- top.home_index();
- });
- });
-
- //查询条件中获取任务列表
- function taskSelect() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Questionnaire/GetTaskList",
- dataType: 'json',
- data: {
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- if(data.state.toLowerCase() == "success") {
- var Count = data.data;
- if(Count.length > 0) {
- for(var i = 0; i < Count.length; i++) {
- $("<option value='" + Count[i].F_TaskID + "'>" + Count[i].F_TaskName + "</option>").appendTo($("#s_task"));
- }
- } else {
- $("<option value=''>--暂无数据--</option>").appendTo($("#s_task"));
- }
- }
- }
- });
- }
-
- //获取数据
- function getRankList() {
- /*var nt = helper.DateFormat.getNowDate();
- var pr = helper.DateFormat.getPreMonth(nt);
- var st = $("#s_time").val() == "" ? pr : $("#s_time").val() && $("#s_time").val().split(' ~ ')[0];
- var et = $("#s_time").val() == "" ? nt : $("#s_time").val() && $("#s_time").val().split(' ~ ')[1];*/
-
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutReport/GetRank",
- dataType: 'json',
- data: {
- taskid: $("#s_task").val(),//传任务id
- sdate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[0],
- edate: $("#s_time").val() && $("#s_time").val().split(' ~ ')[1],
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- $(".hwbb tbody").empty();
- var Count = data.data;
- var countLength = Count.length;
- for(var i = 0; i < countLength - 1; i++) {
- $('<tr>' +
- '<td>' + (i + 1) + ' </td>' +
- '<td>' + Count[i].xiangzhen + ' </td>' +
- '<td> ' + Count[i].zongshu + ' </td>' +
- '</tr>').appendTo(".hwbb tbody");
- }
- $('<tr>' +
- '<td colspan="2">' + Count[i].xiangzhen + ' </td>' +
- '<td> ' + Count[countLength - 1].zongshu + ' </td>' +
- '</tr>').appendTo(".hwbb tbody");
- }
- });
- }
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "CallOutReport/GetRankExpt?token=" + $.cookie("token");
- url += "&taskid=" + $("#s_task").val() + "&sdate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[0]) + "&edate=" + ($("#s_time").val() && $("#s_time").val().split(' ~ ')[1]);
- obj.href = url;
- }
- </script>
- </body>
- </html>
|