reject_todo_list.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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('rejectTodoList',[],'')}?orderId={$orderId}",
  33. datatype: "json",
  34. colModel:[
  35. {label:'编号',name:'id',index:'id', width:30,sortable: false},
  36. {label:'订单编号',name:'order_id',index:'order_id',width:30,editable: false,sortable: false},
  37. // {label:'发起人',name:'real_name',index:'real_name',width:30,editable: false,sortable: false},
  38. {label:'执行人',name:'to_user_name',index:'to_real_name',width:50,sortable: true},
  39. {label:'工单类型',name:'work_type_mode_text',index:'work_type_mode_text',width:50,sortable: true},
  40. {label:'内容',name:'content',index:'content',width:50,sortable: true},
  41. // {label:'调度分派时间',name:'to_create_time',index:'to_create_time',width:50,sortable: true},
  42. {label:'接单时间',name:'confirm_time',index:'confirm_time',width:50,sortable: true},
  43. {label:'完成时间',name:'done_time',index:'done_time',width:50,sortable: true},
  44. {label:'状态',name:'todo_mode_in_content',index:'todo_mode_in_content',width:60,sortable: true,formatter:function (a, b, c) {
  45. return '<span style="color: '+c.todo_mode_color+'">'+a+'</span>'
  46. }},
  47. {label:'操作',width:100,sortable: false,formatter: function (a, b, c) {
  48. var send_url = "{:url('Todo/send',[],'')}/id/"+c.id+'/mode/'+c.work_type_mode;
  49. var cancel_url = "{:url('Todo/disCancel',[],'')}/id/"+c.id;
  50. var btn = '';
  51. btn += '<a url="'+send_url+'" href="javascript:;" data-title="重新派单" onclick="layer_open(this,1)"><span class="label label-primary" title="重新派单">重新派单</span></a>&nbsp;';
  52. btn += '<a url="'+cancel_url+'" href="javascript:;" data-title="取消" onclick="layer_open(this,1)"><span class="label label-danger" title="取消">取消</span></a>';
  53. return btn;
  54. }},
  55. ],
  56. rowNum:10,
  57. rowList:[10,20,30,50,100],
  58. pager: '#pager',
  59. sortname: 'id',
  60. viewrecords: true,
  61. autowidth:true,
  62. mtype: 'post',
  63. height: 'auto',
  64. emptyrecords: "暂无数据",
  65. sortorder: "desc",
  66. caption:"驳回工单列表",
  67. loadComplete: function (xhr) {
  68. if(xhr.code==0){
  69. layer.msg(xhr.msg);
  70. return false;
  71. }
  72. },
  73. });
  74. });
  75. </script>
  76. {/block}