index3.html 8.5 KB

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