安图前端代码

workOrderSource.html 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
  10. <!--<link href="../css/Table/table1.css" rel="stylesheet" />-->
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <!--<script src="../My97DatePicker/WdatePicker.js"></script>-->
  13. <style>
  14. table td {
  15. word-break: break-all;
  16. word-wrap: break-word;
  17. }
  18. .add_time input{
  19. width: 50%;
  20. }
  21. .laydate-icon{
  22. height: initial!important;
  23. }
  24. table#list{
  25. font-size: 12px;
  26. margin-top: 20px;
  27. }
  28. table#list thead tr td {
  29. background: #1ab394;
  30. color: #fff;
  31. }
  32. </style>
  33. </head>
  34. <body class="gray-bg">
  35. <div class="daoHang clearfix">
  36. <div class="dhLeft" >
  37. <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>&gt;<a href="javaScript:;">报表管理</a>&gt;<a href="" style="color: #000;">工单来源</a></sapn>
  38. </div>
  39. <div class="dhRight">
  40. <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
  41. </div>
  42. </div>
  43. <div class="wrapper wrapper-content animated fadeInRight">
  44. <div class="toolBox">
  45. <div class="th-bar clearfix">
  46. <div class="pull-left">
  47. <div class="form-inline">
  48. <div class="form-group">
  49. <input type="text" class="form-control laydate-icon" id="startTime" placeholder="开始时间"/>
  50. </div>
  51. <div class="form-group">
  52. <input type="text" class="form-control laydate-icon" id="endTime" placeholder="结束时间"/>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="pull-right">
  57. <button class="btns search">搜索</button>
  58. <a href="" class="btns export">导出</a>
  59. </div>
  60. </div>
  61. </div>
  62. <div style="width: 100%;padding: 10px;">
  63. <table id="list" class="table table-bordered text-center table-hover" style="width: 100%;">
  64. <thead>
  65. <tr>
  66. </tr>
  67. </thead>
  68. <tbody class="tbody">
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. <script src="../css/laydate/laydate.js"></script>
  74. <script>
  75. $(document).ready(function () {
  76. /*日期选择*/
  77. laydate.skin('molv');
  78. /*开始日期*/
  79. laydate({
  80. elem: '#startTime',
  81. event: 'focus'
  82. });
  83. laydate({
  84. elem: '#endTime',
  85. event: 'focus'
  86. });
  87. /*搜索*/
  88. $(".search").click(function () {
  89. initTable();
  90. })
  91. //导出
  92. $('.export').click(function() {
  93. dcexcel(this);
  94. })
  95. function dcexcel(obj) {
  96. var dpt = "";
  97. var url = huayi.config.callcenter_url + "GDLY/ExportExcel?token=" + $.cookie("token");
  98. url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val();
  99. obj.href = url;
  100. }
  101. initTable();
  102. })
  103. //表头
  104. $.ajax({
  105. type:'get',
  106. url:huayi.config.callcenter_url+"GDLY/GetColumnList",
  107. async:true,
  108. dataType:'json',
  109. data:{
  110. token:$.cookie("token")
  111. },
  112. success:function(res){
  113. var con=res.data;
  114. $(con).each(function(i,n){
  115. $('<td>' + n + '</td>').appendTo('#list thead tr')
  116. })
  117. }
  118. })
  119. //表内数据
  120. function initTable() {
  121. $('#list tbody').html('');
  122. $.ajax({
  123. type:"get",
  124. url:huayi.config.callcenter_url+"GDLY/GetDataList",
  125. async:true,
  126. dataType:'json',
  127. data:{
  128. stime:$('#startTime').val(),
  129. endtime: $("#endTime").val(),
  130. token:$.cookie("token")
  131. },
  132. success:function(res){
  133. var result=res.data;
  134. $(result).each(function(k,g){
  135. $('<tr><td>' + g.坐席人员 + '</td><td>' + g.微信 + '</td><td>' + g.电话 + '</td><td>' + g.邮件 + '</td><td>' + g.短信 + '</td></tr>').appendTo('#list tbody')
  136. })
  137. }
  138. });
  139. }
  140. </script>
  141. </body>
  142. </html>