0
0

index.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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-2">
  7. {if $mode!=15 && in_array($mode,$auths)}
  8. <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/{$mode}" data-title="创建{$m_name}订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建{$m_name}订单</a>
  9. {/if}
  10. &nbsp;
  11. </div>
  12. <div class="col-xs-10" style="text-align: right;">
  13. <form class="form-inline" id="form-search" action="{:url('index')}?mode={$mode}&quality_type={$quality_type}">
  14. <div class="input-group">
  15. <input type="text" class="form-control" name="sn" placeholder="订单编号">
  16. </div>
  17. <div class="input-group">
  18. <input type="text" class="form-control" name="content" 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="dep_id" class="form-control">
  41. <option value="">选择科室/部门</option>
  42. {foreach $dep_list as $k=>$v}
  43. <option value="{$v['id']}">{$v['title']}</option>
  44. {/foreach}
  45. </select>
  46. </div>
  47. <br/>
  48. <br/>
  49. <div class="input-group">
  50. <select name="order_mode" class="form-control">
  51. <option value="">选择状态</option>
  52. {foreach $order_mode_list as $k=>$v}
  53. <option value="{$v['id']}">{$v['in_content']}</option>
  54. {/foreach}
  55. </select>
  56. </div>
  57. {if $mode!=15}
  58. <div class="input-group">
  59. <select name="from" class="form-control">
  60. <option value="">来源</option>
  61. <option value="1">一键呼叫</option>
  62. <option value="4">报修</option>
  63. <option value="5">保洁</option>
  64. <option value="6">运送</option>
  65. <option value="7">应急</option>
  66. <option value="2">隐患</option>
  67. <option value="3">投诉</option>
  68. </select>
  69. </div>
  70. {/if}
  71. <!-- <div class="input-group">-->
  72. <!-- <select name="dep_cate" class="form-control">-->
  73. <!-- <option value="">部门分类</option>-->
  74. <!-- {foreach $dep_cate as $k=>$v}-->
  75. <!-- <option value="{$v['id']}">{$v['title']}</option>-->
  76. <!-- {/foreach}-->
  77. <!-- </select>-->
  78. <!-- </div>-->
  79. <div class="input-group">
  80. <span class="input-group-btn">
  81. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  82. </span> &nbsp;
  83. <span class="input-group-btn">
  84. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  85. </span>
  86. &nbsp;
  87. <span class="input-group-btn">
  88. <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>
  89. </span>
  90. </div>
  91. </form>
  92. </div>
  93. </div>
  94. </div>
  95. {if $mode==0}
  96. <div class="ibox-content">
  97. <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/1" data-title="创建报修订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建报修订单</a>
  98. <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/2" data-title="创建保洁订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建保洁订单</a>
  99. <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/3" data-title="创建运送订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建运送订单</a>
  100. <a href="javascript:;" url="{:url('dispatchAdd',[],'')}/mode/4" data-title="创建应急订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建应急订单</a>
  101. </div>
  102. {/if}
  103. <div class="ibox-content">
  104. <div class="jqGrid_wrapper">
  105. <table id="table" style="border-collapse: collapse"></table>
  106. <div id="pager"></div>
  107. </div>
  108. </div>
  109. </div>
  110. {/block}
  111. {block name="script"}
  112. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  113. <script>
  114. //导出
  115. function excel_download(_self){
  116. var url = $(_self).attr('data-url');
  117. var param = $('#form-search').serialize();
  118. window.location.href = url+'?'+param;
  119. }
  120. $(function () {
  121. laydate.render({
  122. elem: '#start',
  123. trigger: 'click' ,
  124. theme: '#148d8f'
  125. });
  126. laydate.render({
  127. elem: '#end',
  128. trigger: 'click' ,
  129. theme: '#148d8f'
  130. });
  131. $(window).bind("resize",function(){
  132. var width=$(".jqGrid_wrapper").width();
  133. $("#table").setGridWidth(width);
  134. });
  135. $.jgrid.defaults.styleUI="Bootstrap";
  136. $("#table").jqGrid({
  137. url:"{:url('index')}?mode={$mode}&quality_type={$quality_type}",
  138. datatype: "json",
  139. colModel:[
  140. {label:'编号',name:'sn',index:'sn', width:80,sortable: false},
  141. {label:'申请时间',name:'create_time',index:'create_time',width:50,sortable: true},
  142. {label:'内容',name:'content',index:'content',width:60,sortable: true},
  143. {label:'所在科室/部门',name:'dep',index:'dep',width:60,sortable: true},
  144. // {label:'部门分类',name:'dep_cate_name',index:'dep_cate_name',width:60,sortable: true},
  145. {if "$mode"==15}
  146. {label:'整改分类',name:'quality_cate_name',index:'quality_cate_name',width:60,sortable: true},
  147. {/if}
  148. {label:'来源',name:'source_type_text',index:'source_type_text',width:60,sortable: true},
  149. {label:'联系方式',name:'mobile',index:'mobile',width:60,sortable: true},
  150. {label:'状态',name:'order_mode_text',index:'order_mode_text',width:60,sortable: true,formatter:function (a, b, c) {
  151. if(c.bh_nums >0){
  152. return '<span style="color: '+c.order_mode_color+'">'+a+"(存在驳回)"+'</span>'
  153. }else{
  154. return '<span style="color: '+c.order_mode_color+'">'+a+'</span>'
  155. }
  156. }},
  157. {label:'操作',width:50,sortable: false,formatter: function (a, b, c) {
  158. var detail_url = "{:url('detail2',[],'')}/id/"+c.id;
  159. var del_url = "{:url('del',[],'')}/id/"+c.id;
  160. var reject_url = "{:url('rejectTodoList',[],'')}/orderId/"+c.id;
  161. // var btn = '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  162. var btn = '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a>&nbsp;';
  163. if(c.order_mode == 4 && c.bh_nums >0){
  164. btn += '<a url="'+reject_url+'" href="javascript:;" onclick="layer_open(this,1)" ><span class="label label-success" data-title="驳回工单">驳回工单</span></a>&nbsp;';
  165. }
  166. btn += '<a {if !btnAuth(session("user_auth.id"),"Orders/del?mode=$mode")} style="display:none" {/if} href="'+del_url+'" class="confirm ajax-get" data-confirm="确定要删除吗?" data-table="1"><span class="label label-danger" title="删除">删除</span></a>';
  167. return btn;
  168. }},
  169. ],
  170. rowNum:10,
  171. rowList:[10,20,30,50,100],
  172. pager: '#pager',
  173. sortname: 'id',
  174. viewrecords: true,
  175. autowidth:true,
  176. mtype: 'post',
  177. height: 'auto',
  178. emptyrecords: "暂无数据",
  179. sortorder: "desc",
  180. caption:"{$m_name}订单列表",
  181. loadComplete: function (xhr) {
  182. if(xhr.code==0){
  183. layer.msg(xhr.msg);
  184. return false;
  185. }
  186. },
  187. });
  188. });
  189. </script>
  190. {/block}