| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <!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 tr th {
- color: #fff;
- background-color: #1ab394;
- text-align: center;
- }
- .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 id="ReIndex">首页</a>>
- <a href="javaScript:;">外呼管理</a>>
- <a href="" style="color: #000;">不安全原因比例报表</a>
- </sapn>
- </div>
- </div>
- <div class="th-box">
- <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 style="width: 100%;padding: 10px;">
- <div class="table-head">
- <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th data-field="Reasons" data-align="center">原因</th>
- <th data-field="Counts" data-align="center"> 数量</th>
- <th data-field="Rates" data-align="center"> 比例(%)</th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function() {
- laydate.skin('molv');
- laydate({
- elem: '#ss_kssj',
- event: 'focus',
- });
- laydate({
- elem: '#ss_jssj',
- event: 'focus'
- });
-
- var date = getNowDate();
- $("#ss_kssj").val(date);
- $("#ss_jssj").val(date);
-
-
- IndexCategoryGe();
- $(".seach").click(function(){
- IndexCategoryGe();
- })
- //$('#ReIndex').click(function(){
- //top.home_index();
- //})
-
- })
-
- //问卷列表
- function IndexCategoryGe() {
- $.ajax({
- url: huayi.config.callcenter_url + '/Questionnaire/GetUnsafeRate',
- type: 'get',
- data: {
- startdate: $("#ss_kssj").val(),
- enddate: $("#ss_jssj").val(),
- token: $.cookie("token")
- },
- dataType: "json",
- async: true,
- success: function (returnValue) {
- //异步获取数据
- //console.log(returnValue);
- var resultData1 = returnValue.data;
- //console.log(resultData1);
- $('#Task').bootstrapTable('load',resultData1);
- }
- });
- $('#Task').bootstrapTable('destroy').bootstrapTable({striped: true});
- }
- //导出功能
- $('.export').click(function() {
- dcexcel(this);
-
- })
- function dcexcel(obj) {
- var url = huayi.config.callcenter_url + "/Questionnaire/GetUnsafeRateExpt?token=" + $.cookie("token");
- url += "&startdate=" + $("#ss_kssj").val()+"&enddate="+$("#ss_jssj").val();
- obj.href = url;
- console.log(url);
- }
- function getNowDate() {
- var NowDate;
- var myDate = new Date();
- myDate.getYear(); //获取当前年份(2位)
- var YY = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
- var MM = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
- var DD = myDate.getDate(); //获取当前日(1-31)
- myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
- myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数)
- myDate.getHours(); //获取当前小时数(0-23)
- myDate.getMinutes(); //获取当前分钟数(0-59)
- myDate.getSeconds(); //获取当前秒数(0-59)
- myDate.getMilliseconds(); //获取当前毫秒数(0-999)
- myDate.toLocaleDateString(); //获取当前日期
- var mytime = myDate.toLocaleTimeString(); //获取当前时间
- myDate.toLocaleString(); //获取日期与时间
- NowDate = YY + "-" + MM + "-" + DD;
-
- return NowDate;
- }
- </script>
- </body>
- </html>
|