Nessuna descrizione

SafetyTable.html 5.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>不安全信息统计表</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link href="../css/init.css" rel="stylesheet" />
  8. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <link href="../css/Table/table1.css" rel="stylesheet" />
  11. <script src="../js/laydate/laydate.js"></script>
  12. <style>
  13. .LY:hover {
  14. color: #fff;
  15. }
  16. .LY:active {
  17. color: #fff!important;
  18. }
  19. #Task thead tr th {
  20. color: #fff;
  21. background-color: #1ab394;
  22. text-align: center;
  23. }
  24. .sc_btn{
  25. line-height: 34px;
  26. }
  27. </style>
  28. </head>
  29. <body class="gray-bg">
  30. <div class="wrapper wrapper-content animated fadeInRight">
  31. <div class="daoHang clearfix">
  32. <div class="dhLeft">
  33. <sapn><i class="syIcon"></i>位置:
  34. <a id="ReIndex">首页</a>&gt;
  35. <a href="javaScript:;">外呼管理</a>&gt;
  36. <a href="" style="color: #000;">不安全信息统计表</a>
  37. </sapn>
  38. </div>
  39. </div>
  40. <div class="th-box">
  41. <div class="seach-box fr">
  42. <ul>
  43. <li>
  44. <label for="">开始时间:</label>
  45. <input type="text" id="ss_kssj" class="photo laydate-icon" />
  46. </li>
  47. <li>
  48. <label for="">结束时间:</label>
  49. <input type="text" id="ss_jssj" class="photo laydate-icon" />
  50. </li>
  51. <li>
  52. <a class="sc_btn seach">搜索</a>
  53. </li>
  54. <li>
  55. <a class="sc_btn export">导出</a>
  56. </li>
  57. </ul>
  58. </div>
  59. </div>
  60. <div style="width: 100%;padding: 10px;">
  61. <div class="table-head">
  62. <table id="Task" class="table table-hover table-striped table-bordered table-condensed">
  63. <thead>
  64. <tr>
  65. <th data-field="xiangzhen" data-align="center">乡镇</th>
  66. <th data-field="dianhua" data-align="center"> 电话</th>
  67. <th data-field="zhiye" data-align="center"> 职业</th>
  68. <th data-field="yuanyin" data-align="center">原因</th>
  69. </tr>
  70. </thead>
  71. </table>
  72. </div>
  73. </div>
  74. </div>
  75. <script>
  76. $(document).ready(function() {
  77. laydate.render({
  78. elem: '#ss_kssj',
  79. //type: 'datetime',
  80. //max : 31,
  81. //min: 0,
  82. calendar: true,
  83. theme: '#1ab394',
  84. });
  85. laydate.render({
  86. elem: '#ss_jssj',
  87. //type: 'datetime',
  88. //max : 31,
  89. //min: 0,
  90. calendar: true,
  91. theme: '#1ab394',
  92. });
  93. var date = getNowDate();
  94. $("#ss_kssj").val(date);
  95. $("#ss_jssj").val(date);
  96. IndexCategoryGe();
  97. $(".seach").click(function(){
  98. IndexCategoryGe();
  99. })
  100. //$('#ReIndex').click(function(){
  101. //top.home_index();
  102. //})
  103. })
  104. //问卷列表
  105. function IndexCategoryGe() {
  106. $.ajax({
  107. url: huayi.config.callcenter_url + 'Questionnaire/GetUnsafeInfo',
  108. type: 'get',
  109. data: {
  110. startdate: $("#ss_kssj").val(),
  111. enddate: $("#ss_jssj").val(),
  112. token: $.cookie("token")
  113. },
  114. dataType: "json",
  115. async: true,
  116. success: function (returnValue) {
  117. //异步获取数据
  118. //console.log(returnValue);
  119. var resultData1 = returnValue.data;
  120. //console.log(resultData1);
  121. $('#Task').bootstrapTable('load',resultData1);
  122. }
  123. });
  124. $('#Task').bootstrapTable('destroy').bootstrapTable({striped: true});
  125. }
  126. //导出功能
  127. $('.export').click(function() {
  128. // var S= $("#ss_kssj").val();
  129. // var E=$("#ss_jssj").val();
  130. // if(!S&&!E){
  131. // layer.alert("选择时间");
  132. // }else{
  133. dcexcel(this);
  134. // }
  135. })
  136. function dcexcel(obj) {
  137. var url = huayi.config.callcenter_url + "/Questionnaire/GetUnsafeInfoExpt?token=" + $.cookie("token");
  138. url += "&startdate=" + $("#ss_kssj").val()+"&enddate="+$("#ss_jssj").val();
  139. obj.href = url;
  140. console.log(url);
  141. }
  142. function getNowDate() {
  143. var NowDate;
  144. var myDate = new Date();
  145. myDate.getYear(); //获取当前年份(2位)
  146. var YY = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
  147. var MM = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
  148. var DD = myDate.getDate(); //获取当前日(1-31)
  149. MM=MM>9?MM:"0"+MM;
  150. DD=DD>9?DD:"0"+MM;
  151. myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
  152. myDate.getTime(); //获取当前时间(从1970.1.1开始的毫秒数)
  153. myDate.getHours(); //获取当前小时数(0-23)
  154. myDate.getMinutes(); //获取当前分钟数(0-59)
  155. myDate.getSeconds(); //获取当前秒数(0-59)
  156. myDate.getMilliseconds(); //获取当前毫秒数(0-999)
  157. myDate.toLocaleDateString(); //获取当前日期
  158. var mytime = myDate.toLocaleTimeString(); //获取当前时间
  159. myDate.toLocaleString(); //获取日期与时间
  160. NowDate = YY + "-" + MM + "-" + DD;
  161. return NowDate;
  162. }
  163. </script>
  164. </body>
  165. </html>