index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-content">
  5. <div class="row">
  6. <div class="col-xs-12" style="text-align: right;">
  7. <form class="form-inline" id="form-search" action="{:url('index')}">
  8. <div class="input-group">
  9. <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
  10. </div>
  11. <div class="input-group">
  12. <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
  13. </div>
  14. <div class="input-group">
  15. <input type="text" class="form-control" name="user" placeholder="用户名称">
  16. </div>
  17. <div class="input-group">
  18. <select name="from" class="form-control">
  19. <option value="">来源</option>
  20. <option value="1">一键呼叫</option>
  21. <option value="2">投诉</option>
  22. </select>
  23. </div>
  24. <div class="input-group">
  25. <input type="text" class="form-control" name="content" placeholder="内容">
  26. </div>
  27. <!-- <div class="input-group">-->
  28. <!-- <select name="from" class="form-control">-->
  29. <!-- <option value="">去向</option>-->
  30. <!-- <option value="1">一键呼叫</option>-->
  31. <!-- <option value="0">隐患</option>-->
  32. <!-- <option value="2">投诉</option>-->
  33. <!-- </select>-->
  34. <!-- </div>-->
  35. <div class="input-group">
  36. <span class="input-group-btn">
  37. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  38. </span> &nbsp;
  39. <span class="input-group-btn">
  40. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  41. </span> &nbsp;
  42. <span class="input-group-btn">
  43. <button data-url="{:url('export',[],'')}" title="导出" class="btn-sm btn-primary" onclick="excel_download(this)" type="button" ><i class="fa fa-cloud-download"></i></button>
  44. </span>
  45. </div>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="ibox-content">
  51. <div class="jqGrid_wrapper">
  52. <table id="table" style="border-collapse: collapse"></table>
  53. <div id="pager"></div>
  54. </div>
  55. </div>
  56. </div>
  57. {/block}
  58. {block name="script"}
  59. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  60. <script>
  61. laydate.render({
  62. elem: '#start',
  63. trigger: 'click' ,
  64. theme: '#148d8f'
  65. });
  66. laydate.render({
  67. elem: '#end',
  68. trigger: 'click' ,
  69. theme: '#148d8f'
  70. });
  71. //导出
  72. function excel_download(_self){
  73. var url = $(_self).attr('data-url');
  74. var param = $('#form-search').serialize();
  75. window.location.href = url+'?'+param;
  76. }
  77. $(function () {
  78. $(window).bind("resize",function(){
  79. var width=$(".jqGrid_wrapper").width();
  80. $("#table").setGridWidth(width);
  81. });
  82. $.jgrid.defaults.styleUI="Bootstrap";
  83. $("#table").jqGrid({
  84. url:"{:url('index')}",
  85. datatype: "json",
  86. colModel:[
  87. {label:'编号',name:'id',index:'id', width:30,sortable: false},
  88. {label:'时间',name:'create_time',index:'create_time',width:80,sortable: false},
  89. {label:'内容',name:'content',index:'content',width:60,sortable: false},
  90. {label:'部门',name:'depName',index:'depName',width:60,sortable: false},
  91. {label:'用户',name:'realName',index:'realName',width:60,sortable: false},
  92. {label:'状态',name:'statusTxt',index:'statusTxt',width:60,sortable: false},
  93. // {label:'来源',name:'from',index:'from',width:40,sortable: false,formatter: function (a, b, c) {
  94. // return '隐患'
  95. // }},
  96. // {label:'去向',name:'fromName',index:'fromName',width:40,sortable: false},
  97. {label:'来源',name:'fromName',index:'fromName',width:40,sortable: false},
  98. {label:'订单类型',name:'worktypemode',index:'worktypemode',width:40,sortable: false},
  99. {label:'操作',width:80,sortable: false,formatter: function (a, b, c) {
  100. var detail_url = "{:url('detail',[],'')}/id/"+c.id;
  101. var edit_url = "{:url('edit',[],'')}/id/"+c.id;
  102. var del_url = "{:url('del',[],'')}/id/"+c.id;
  103. var send_url = "{:url('send',[],'')}/id/"+c.id;
  104. var ts_send_url = "{:url('ts_send',[],'')}/id/"+c.id;
  105. var btn = '';
  106. // if(c.status===0){
  107. // if(c.order_id < 1 && c.order_mode == 0){
  108. // btn+= '<a url="'+edit_url+'" href="javascript:;" data-title="直接处理" onclick="layer_open(this,1)"><span class="label label-primary" title="直接处理">直接处理</span></a>&nbsp;';
  109. // btn+= '<a url="'+send_url+'" href="javascript:;" data-title="转任务" onclick="layer_open(this,1)"><span class="label label-primary" title="转任务">转任务</span></a>&nbsp;';
  110. // btn+= '<a url="'+ts_send_url+'" href="javascript:;" data-title="转单" onclick="layer_open(this,1)"><span class="label label-primary" title="转单">转单</span></a>&nbsp;';
  111. // }
  112. //
  113. // }
  114. // btn+= '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  115. btn+= '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  116. btn += '<a {if !btnAuth(session("user_auth.id"),"Complain/del")} style="display:none" {/if} href="'+del_url+'" class="confirm ajax-get" data-confirm="确定要删除吗?" data-table="1"><span class="label label-danger" title="删除">删除</span></a>&nbsp;';
  117. return btn;
  118. }},
  119. ],
  120. rowNum:10,
  121. rowList:[10,20,30,50,100],
  122. pager: '#pager',
  123. sortname: 'id',
  124. viewrecords: true,
  125. autowidth:true,
  126. mtype: 'post',
  127. height: 'auto',
  128. emptyrecords: "暂无数据",
  129. sortorder: "desc",
  130. caption:"隐患预警",
  131. loadComplete: function (xhr) {
  132. if(xhr.code==0){
  133. layer.msg(xhr.msg);
  134. return false;
  135. }
  136. },
  137. });
  138. });
  139. </script>
  140. {/block}