index.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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')}?mode={$mode}&quality_type={$quality_type}">
  8. <div class="input-group">
  9. <input type="text" class="form-control" name="sn" placeholder="工单编号">
  10. </div>
  11. <div class="input-group">
  12. <input type="text" class="form-control" name="order_sn" placeholder="订单编号">
  13. </div>
  14. <div class="input-group">
  15. <input type="text" class="form-control" name="content" placeholder="内容">
  16. </div>
  17. <div class="input-group">
  18. <input type="text" class="form-control" name="name" placeholder="执行人">
  19. </div>
  20. <div class="input-group">
  21. <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
  22. </div>
  23. <div class="input-group">
  24. <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
  25. </div>
  26. {if $is > 0}
  27. <div class="input-group">
  28. <select name="quality_type" class="form-control">
  29. <option value="">整改类型</option>
  30. <option value="0">日常工作</option>
  31. <option value="1">设备维保</option>
  32. <option value="2">巡更</option>
  33. <option value="3">巡视</option>
  34. <option value="4">巡检</option>
  35. <option value="5">巡查</option>
  36. </select>
  37. </div>
  38. {/if}
  39. <div class="input-group">
  40. <select name="todo_mode" class="form-control">
  41. <option value="">选择状态</option>
  42. {foreach $todo_mode_list as $k=>$v}
  43. <option value="{$v['id']}">{$v['in_content']}</option>
  44. {/foreach}
  45. </select>
  46. </div>
  47. <br/>
  48. <br/>
  49. {if $mode!=15}
  50. <div class="input-group">
  51. <select name="from" class="form-control">
  52. <option value="">来源</option>
  53. <option value="1">一键呼叫</option>
  54. <option value="4">报修</option>
  55. <option value="5">保洁</option>
  56. <option value="6">运送</option>
  57. <option value="7">应急</option>
  58. <option value="2">隐患</option>
  59. <option value="3">投诉</option>
  60. </select>
  61. </div>
  62. {/if}
  63. <!-- <div class="input-group">-->
  64. <!-- <select name="dep_cate" class="form-control">-->
  65. <!-- <option value="">部门分类</option>-->
  66. <!-- {foreach $dep_cate as $k=>$v}-->
  67. <!-- <option value="{$v['id']}">{$v['title']}</option>-->
  68. <!-- {/foreach}-->
  69. <!-- </select>-->
  70. <!-- </div>-->
  71. <div class="input-group">
  72. <span class="input-group-btn">
  73. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  74. </span> &nbsp;
  75. <span class="input-group-btn">
  76. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  77. </span>
  78. &nbsp;
  79. <span class="input-group-btn">
  80. <button data-url="{:url('export',[],'')}/mode/{$mode}?quality_type={$quality_type}" title="导出" class="btn-sm btn-primary" onclick="excel_download(this)" type="button" ><i class="fa fa-cloud-download"></i></button>
  81. </span>
  82. </div>
  83. </form>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="ibox-content">
  88. <div class="jqGrid_wrapper">
  89. <table id="table" style="border-collapse: collapse"></table>
  90. <div id="pager"></div>
  91. </div>
  92. </div>
  93. </div>
  94. {/block}
  95. {block name="script"}
  96. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  97. <script>
  98. //导出
  99. function excel_download(_self){
  100. var url = $(_self).attr('data-url');
  101. var param = $('#form-search').serialize();
  102. window.location.href = url+'?'+param;
  103. }
  104. $(function () {
  105. laydate.render({
  106. elem: '#start',
  107. trigger: 'click' ,
  108. theme: '#148d8f'
  109. });
  110. laydate.render({
  111. elem: '#end',
  112. trigger: 'click' ,
  113. theme: '#148d8f'
  114. });
  115. $(window).bind("resize",function(){
  116. var width=$(".jqGrid_wrapper").width();
  117. $("#table").setGridWidth(width);
  118. });
  119. $.jgrid.defaults.styleUI="Bootstrap";
  120. $("#table").jqGrid({
  121. url:"{:url('index')}?mode={$mode}&quality_type={$quality_type}",
  122. datatype: "json",
  123. colModel:[
  124. {label:'编号',name:'sn',index:'sn', width:80,sortable: false},
  125. {label:'订单编号',name:'order_sn',index:'order_sn',width:80,editable: false,sortable: false},
  126. {label:'所在科室/部门',name:'dep',index:'dep',width:60,sortable: true},
  127. {label:'来源',name:'source_type_text',index:'source_type_text',width:60,sortable: true},
  128. // {label:'部门分类',name:'dep_cate_name',index:'dep_cate_name',width:60,sortable: true},
  129. {label:'发起人',name:'real_name',index:'real_name',width:30,editable: false,sortable: false},
  130. {label:'执行人',name:'to_real_name',index:'to_real_name',width:50,sortable: true},
  131. {label:'内容',name:'content',index:'content',width:50,sortable: true},
  132. {label:'调度分派时间',name:'to_create_time',index:'to_create_time',width:50,sortable: true},
  133. {label:'接单时间',name:'confirm_time',index:'confirm_time',width:50,sortable: true},
  134. {label:'完成时间',name:'done_time',index:'done_time',width:50,sortable: true},
  135. {label:'状态',name:'todo_mode_in_content',index:'todo_mode_in_content',width:60,sortable: true,formatter:function (a, b, c) {
  136. return '<span style="color: '+c.todo_mode_color+'">'+a+'</span>'
  137. }},
  138. {label:'操作',width:150,sortable: false,formatter: function (a, b, c) {
  139. var detail_url = "{:url('detail',[],'')}/id/"+c.id;
  140. var finish_url = "{:url('finish',[],'')}/id/"+c.id;
  141. var cancel_url = "{:url('disCancel',[],'')}/id/"+c.id;
  142. // var btn = '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  143. var btn= '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  144. if(c.todo_mode==1 ||c.todo_mode==2 ) {
  145. btn += '<a href="'+finish_url+'" class="confirm ajax-get" data-confirm="确定要完成吗?" data-table="1"><span class="label label-primary" title="完成">完成</span></a>&nbsp;';
  146. }
  147. if(c.todo_mode==1 ||c.todo_mode==2 || c.todo_mode==4 ) {
  148. btn += '<a url="'+cancel_url+'" href="javascript:;" data-title="取消" onclick="layer_open(this,1)"><span class="label label-danger" title="取消">取消</span></a>';
  149. }
  150. return btn;
  151. }},
  152. ],
  153. rowNum:10,
  154. rowList:[10,20,30,50,100],
  155. pager: '#pager',
  156. sortname: 'id',
  157. viewrecords: true,
  158. autowidth:true,
  159. mtype: 'post',
  160. height: 'auto',
  161. emptyrecords: "暂无数据",
  162. sortorder: "desc",
  163. caption:"{$m_name}工单列表",
  164. loadComplete: function (xhr) {
  165. if(xhr.code==0){
  166. layer.msg(xhr.msg);
  167. return false;
  168. }
  169. },
  170. });
  171. });
  172. </script>
  173. {/block}