bh_todo_list.html 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-content">
  5. <div class="jqGrid_wrapper">
  6. <table id="table" style="border-collapse: collapse"></table>
  7. <div id="pager"></div>
  8. </div>
  9. </div>
  10. </div>
  11. {/block}
  12. {block name="script"}
  13. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  14. <script>
  15. $(function () {
  16. laydate.render({
  17. elem: '#start',
  18. trigger: 'click' ,
  19. theme: '#148d8f'
  20. });
  21. laydate.render({
  22. elem: '#end',
  23. trigger: 'click' ,
  24. theme: '#148d8f'
  25. });
  26. $(window).bind("resize",function(){
  27. var width=$(".jqGrid_wrapper").width();
  28. $("#table").setGridWidth(width);
  29. });
  30. $.jgrid.defaults.styleUI="Bootstrap";
  31. $("#table").jqGrid({
  32. url:"{:url('bhTodoList',[],'')}",
  33. datatype: "json",
  34. colModel:[
  35. {label:'运送类型',name:'type_name',index:'type_name',width:60,editable: false,sortable: false},
  36. {label:'描述',name:'content',index:'content',width:50,sortable: true},
  37. {label:'始发',name:'start_name',index:'start_name',width:40,sortable: true},
  38. {label:'到达',name:'end_name',index:'end_name',width:60,sortable: true},
  39. {label:'运送员',name:'real_names',index:'real_names',width:60,sortable: true},
  40. {label:'需求',name:'xtime',index:'xtime',width:60,sortable: true},
  41. {label:'派工',name:'stime',index:'stime',width:60,sortable: true},
  42. {label:'接受',name:'ctime',index:'ctime',width:60,sortable: true},
  43. {label:'优先级',name:'priorityName',index:'priorityName',width:60,sortable: true},
  44. {label:'运送设备',name:'device_name',index:'device_name',width:60,sortable: true},
  45. {label:'创建人',name:'real_name',index:'real_name',width:60,sortable: true},
  46. {label:'延迟原因',name:'delay_reason',index:'delay_reason',width:60,sortable: true},
  47. {label:'延迟时间',name:'delay_diff',index:'delay_diff',width:60,sortable: true},
  48. {label:'剩余时间',name:'last_time',index:'last_time',width:60,sortable: true},
  49. {label:'操作',width:100,sortable: false,formatter: function (a, b, c) {
  50. var send_url = "{:url('Todo/send',[],'')}/id/"+c.id+'/mode/'+c.work_type_mode;
  51. var cancel_url = "{:url('Todo/disCancel',[],'')}/id/"+c.id;
  52. var btn = '';
  53. btn += '<a url="'+send_url+'" href="javascript:;" data-title="重新派单" onclick="layer_open(this,1)"><span class="label label-primary" title="重新派单">重新派单</span></a>&nbsp;';
  54. btn += '<a url="'+cancel_url+'" href="javascript:;" data-title="取消" onclick="layer_open(this,1)"><span class="label label-danger" title="取消">取消</span></a>';
  55. return btn;
  56. }},
  57. ],
  58. rowNum:10,
  59. rowList:[10,20,30,50,100],
  60. pager: '#pager',
  61. sortname: 'id',
  62. viewrecords: true,
  63. autowidth:true,
  64. mtype: 'post',
  65. height: 'auto',
  66. emptyrecords: "暂无数据",
  67. sortorder: "desc",
  68. caption:"驳回工单列表",
  69. loadComplete: function (xhr) {
  70. if(xhr.code==0){
  71. layer.msg(xhr.msg);
  72. return false;
  73. }
  74. },
  75. });
  76. });
  77. </script>
  78. {/block}