convey_cate_todo.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .combined{
  5. width: 100%;
  6. height: auto;
  7. font-size: 22px;
  8. padding: 10px;
  9. background: #fff;
  10. }
  11. </style>
  12. <div class="ibox">
  13. <div class="ibox-content">
  14. <div class="row">
  15. <div class="col-xs-3">
  16. <div class="btn-group pull-left">
  17. <a href="javascript:;" onclick="printer()" class="btn btn-sm btn btn-primary"><i class="glyphicon glyphicon-print"></i> 打印</a>&nbsp;&nbsp;
  18. <a href="{:url('conveyCateTodoExport',['start'=>$start,'end'=>$end])}" class="btn btn-sm btn-danger"><i class="fa fa-cloud-download"> 导出</i></a>
  19. </div>
  20. </div>
  21. <div class="col-xs-9" style="text-align: right;">
  22. <form class="form-inline" id="form-search" action="{:url('conveyCateTodo')}">
  23. <div class="input-group">
  24. <input class="form-control" value="{$start}" id="start" readonly placeholder="开始时间" name="start" >
  25. </div>
  26. <div class="input-group">
  27. <input class="form-control" value="{$end}" id="end" readonly placeholder="结束时间" name="end" >
  28. </div>
  29. <div class="input-group">
  30. <span class="input-group-btn">
  31. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  32. </span> &nbsp;
  33. <span class="input-group-btn">
  34. <button class="btn-sm btn-warning" type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  35. </span>
  36. </div>
  37. </form>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="ibox-content">
  42. <div class="jqGrid_wrapper" id="printer">
  43. <table id="table" style="border-collapse: collapse"></table>
  44. <div id="pager"></div>
  45. </div>
  46. <!-- <div class="combined">合计:</div>-->
  47. </div>
  48. </div>
  49. {/block}
  50. {block name="script"}
  51. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  52. <script src="/static/browser.js"></script>
  53. <script src="/static/jquery.jqprint-0.3.js"></script>
  54. <script>
  55. $(function () {
  56. laydate.render({
  57. elem: '#start',
  58. trigger: 'click' ,
  59. theme: '#148d8f'
  60. });
  61. laydate.render({
  62. elem: '#end',
  63. trigger: 'click' ,
  64. theme: '#148d8f'
  65. });
  66. });
  67. function printer(){
  68. $('#printer').jqprint();
  69. }
  70. $(function () {
  71. $(window).bind("resize",function(){
  72. var width=$(".jqGrid_wrapper").width();
  73. $("#table").setGridWidth(width);
  74. });
  75. $.jgrid.defaults.styleUI="Bootstrap";
  76. $("#table").jqGrid({
  77. url:"{:url('conveyCateTodo')}",
  78. datatype: "json",
  79. colModel:[
  80. {label:'运送类型',name:'title',index:'title', width:80,sortable: false},
  81. {label:'工单数',name:'count',index:'count', width:80,sortable: false},
  82. {label:'总时长(分)',name:'total_time',index:'total_time', width:80,sortable: false},
  83. {label:'平均时长(分)',name:'ave_time',index:'ave_time', width:80,sortable: false},
  84. ],
  85. sortname: 'id',
  86. viewrecords: true,
  87. autowidth:true,
  88. mtype: 'post',
  89. height: 'auto',
  90. emptyrecords: "暂无数据",
  91. sortorder: "asc",
  92. caption:"运送类型工单统计",
  93. loadComplete: function (xhr) {
  94. if(xhr.code==0){
  95. layer.msg(xhr.msg);
  96. return false;
  97. }
  98. },
  99. });
  100. });
  101. </script>
  102. {/block}