| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>乡镇排名报表查询</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../css/init.css" rel="stylesheet" />
- <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="../css/laydate/laydate.js"></script>
- <style>
- .LY:hover {
- color: #fff;
- }
-
- .LY:active {
- color: #fff!important;
- }
-
- #Task thead td {
- color: #fff;
- background-color: #1ab394;
- text-align: center;
- }
-
- .table-head table thead {
- width: calc( 100% - 5px);
- }
-
- table thead,
- tbody tr {
- display: table;
- width: 100%;
- table-layout: fixed;
- text-align: center;
- }
-
- .table {
- margin-bottom: 0;
- }
-
- .table-body {
- width: 100%;
- height: 515px;
- overflow-y: scroll;
- overflow-x: scroll;
- }
- .sc_btn{
- line-height: 34px;
- }
- </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="" style="color: #000;">乡镇排名报表查询</a>
- </sapn>
- </div>
- </div>
- <div class="th-box">
- <div class="th-bar">
- <div class="seach-box fr">
- <ul>
- <li>
- <label for="">开始时间:</label>
- <input type="text" id="ss_kssj" class="photo laydate-icon" />
- </li>
- <li>
- <label for="">结束时间:</label>
- <input type="text" id="ss_jssj" class="photo laydate-icon" />
- </li>
- <li>
- <a class="sc_btn seach">搜索</a>
- </li>
- <li>
- <a class="sc_btn export">导出</a>
- </li>
- </ul>
- </div>
- </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>
- <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>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- laydate.skin('molv');
- laydate({
- elem: '#ss_kssj',
- event: 'focus'
- });
- laydate({
- elem: '#ss_jssj',
- event: 'focus'
- });
- getBeforeDate();
- GetColumnList();
- $(".seach").click(function() {
- GetColumnList();
- });
- $('#ReIndex').click(function(){
- top.home_index();
- });
- });
- //任务查询获取表头
- function GetColumnList() {
- $(".hwbb tbody").empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "/Questionnaire/GetRank",
- dataType: 'json',
- data: {
- startdate:$("#ss_kssj").val(),
- enddate:$("#ss_jssj").val(),
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- $(".hwbb tbody").empty();
- var Count = data.data;
- //debugger;
- 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>' +
- '<td> ' + Count[i].buanquan + ' </td>' +
- '<td> ' + Count[i].zhishu + '% </td>' +
- '</tr>').appendTo(".hwbb tbody");
- }
- $('<tr>'+
- '<td colspan="2">' + Count[i].xiangzhen + ' </td>' +
- '<td> ' + Count[countLength-1].zongshu + ' </td>' +
- '<td> ' + Count[countLength-1].buanquan + ' </td>' +
- '<td> ' + Count[countLength-1].zhishu + '% </td>' +
- '</tr>').appendTo(".hwbb tbody");
- console.log(Count)
- }
- });
- }
-
- //导出功能
- $('.export').click(function() {
- // var S= $("#ss_kssj").val();
- // var E=$("#ss_jssj").val()
- // if(!S&&!E){
- // layer.alert("选择时间");
- // }else{
- dcexcel(this);
- // }
-
- })
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "/Questionnaire/GetRankExpt?token=" + $.cookie("token");
- url += "&startdate=" + $("#ss_kssj").val()+"&enddate="+$("#ss_jssj").val();
- obj.href = url;
- console.log(url);
- }
- //获取时间
- function getBeforeDate(n) {
- var n = n;
- var d = new Date();
- var year = d.getFullYear();
- var mon = d.getMonth() + 1;
- var day = d.getDate();
- if(day <= n) {
- if(mon > 1) {
- mon = mon - 1;
- } else {
- year = year - 1;
- mon = 12;
- }
- }
- d.setDate(d.getDate() - n);
- year = d.getFullYear();
- mon = d.getMonth() + 1;
- day = d.getDate();
- s = year + "-" + (mon < 10 ? ('0' + mon) : mon) + "-" + (day < 10 ? ('0' + day) : day);
- return s;
- }
- $("#ss_kssj").val(getBeforeDate(0));
- $("#ss_jssj").val(getBeforeDate(0));
- //音频
- </script>
- </body>
- </html>
|