index.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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="type" class="form-control">-->
  29. <!-- <option value="0">未超时</option>-->
  30. <!-- <option value="1">超时</option>-->
  31. <!-- </select>-->
  32. <!-- </div>-->
  33. <!-- <div class="input-group">-->
  34. <!-- <select name="from" class="form-control">-->
  35. <!-- <option value="">去向</option>-->
  36. <!-- <option value="1">一键呼叫</option>-->
  37. <!-- <option value="0">投诉</option>-->
  38. <!-- <option value="2">隐患</option>-->
  39. <!-- </select>-->
  40. <!-- </div>-->
  41. <div class="input-group">
  42. <span class="input-group-btn">
  43. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  44. </span> &nbsp;
  45. <span class="input-group-btn">
  46. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  47. </span>&nbsp;
  48. <span class="input-group-btn">
  49. <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>
  50. </span>
  51. </div>
  52. </form>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ibox-content">
  57. <div class="jqGrid_wrapper">
  58. <table id="table" style="border-collapse: collapse"></table>
  59. <div id="pager"></div>
  60. </div>
  61. </div>
  62. </div>
  63. {/block}
  64. {block name="script"}
  65. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  66. <script>
  67. laydate.render({
  68. elem: '#start',
  69. trigger: 'click' ,
  70. theme: '#148d8f'
  71. });
  72. laydate.render({
  73. elem: '#end',
  74. trigger: 'click' ,
  75. theme: '#148d8f'
  76. });
  77. //导出
  78. function excel_download(_self){
  79. var url = $(_self).attr('data-url');
  80. var param = $('#form-search').serialize();
  81. window.location.href = url+'?'+param;
  82. }
  83. $(function () {
  84. $(window).bind("resize",function(){
  85. var width=$(".jqGrid_wrapper").width();
  86. $("#table").setGridWidth(width);
  87. });
  88. $.jgrid.defaults.styleUI="Bootstrap";
  89. $("#table").jqGrid({
  90. url:"{:url('index')}",
  91. datatype: "json",
  92. colModel:[
  93. {label:'编号',name:'id',index:'id', width:30,sortable: false},
  94. {label:'时间',name:'create_time',index:'create_time',width:60,sortable: false},
  95. {label:'处理时间',name:'update_time',index:'update_time',width:60,sortable: false},
  96. {label:'完成时间',name:'finish_time',index:'finish_time',width:60,sortable: false},
  97. {label:'内容',name:'content',index:'content',width:100,sortable: false},
  98. {label:'部门',name:'depName',index:'depName',width:60,sortable: false},
  99. {label:'用户',name:'realName',index:'realName',width:40,sortable: false},
  100. {label:'状态',name:'statusTxt',index:'statusTxt',width:40,sortable: false},
  101. // {label:'来源',name:'from',index:'from',width:40,sortable: false,formatter: function (a, b, c) {
  102. // return '投诉'
  103. // }},
  104. {label:'来源',name:'fromName',index:'fromName',width:40,sortable: false},
  105. {label:'订单类型',name:'worktypemode',index:'worktypemode',width:40,sortable: false},
  106. {label:'操作',width:80,sortable: false,formatter: function (a, b, c) {
  107. var detail_url = "{:url('detail',[],'')}/id/"+c.id;
  108. var edit_url = "{:url('edit',[],'')}/id/"+c.id;
  109. var del_url = "{:url('del',[],'')}/id/"+c.id;
  110. var send_url = "{:url('send',[],'')}/id/"+c.id;
  111. var ts_send_url = "{:url('ts_send',[],'')}/id/"+c.id;
  112. var summary_url = "{:url('summary',[],'')}/id/"+c.id;
  113. var btn = '';
  114. // if(c.status===0){
  115. // btn+= '<a url="'+edit_url+'" href="javascript:;" data-title="直接处理" onclick="layer_open(this,1)"><span class="label label-primary" title="直接处理">直接处理</span></a>&nbsp;';
  116. // btn+= '<a url="'+send_url+'" href="javascript:;" data-title="转任务" onclick="layer_open(this,1)"><span class="label label-primary" title="转任务">转任务</span></a>&nbsp;';
  117. // btn+= '<a url="'+ts_send_url+'" href="javascript:;" data-title="转单" onclick="layer_open(this,1)"><span class="label label-primary" title="转单">转单</span></a>&nbsp;';
  118. //
  119. // }
  120. // btn+= '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  121. btn+= '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  122. 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;';
  123. // if((c.status== 1 && c.order_id == 0) || (c.status ==1 && c.order_mode == 3 || c.order_mode == 5 || c.order_mode == 6) ){
  124. // btn+= '<a url="'+summary_url+'" href="javascript:;" data-title="总结" onclick="layer_open(this,1)"><span class="label label-primary" title="总结">总结</span></a>&nbsp;';
  125. // }
  126. return btn;
  127. }},
  128. ],
  129. rowNum:10,
  130. rowList:[10,20,30,50,100],
  131. pager: '#pager',
  132. sortname: 'id',
  133. viewrecords: true,
  134. autowidth:true,
  135. mtype: 'post',
  136. height: 'auto',
  137. emptyrecords: "暂无数据",
  138. sortorder: "desc",
  139. caption:"投诉订单列表",
  140. loadComplete: function (xhr) {
  141. if(xhr.code==0){
  142. layer.msg(xhr.msg);
  143. return false;
  144. }
  145. },
  146. });
  147. });
  148. </script>
  149. {/block}