rock_flow_menu.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. {params};
  5. var num = params.num,mid,modeid=0,bools=false;
  6. function btn(bo){
  7. get('edit_{rand}').disabled = bo;
  8. get('del_{rand}').disabled = bo;
  9. }
  10. var a = $('#view_{rand}').bootstable({
  11. tablename:'flow_menu',celleditor:true,sort:'sort',dir:'asc',url:publicstore('{mode}','{dir}'),
  12. storeafteraction:'flowmenuafter',params:{'mid':-1},storebeforeaction:'flowmenubefore',
  13. columns:[{
  14. text:'类型',dataIndex:'type'
  15. },{
  16. text:'编号',dataIndex:'num',editor:true
  17. },{
  18. text:'显示名称',dataIndex:'name',editor:true
  19. },{
  20. text:'动作名',dataIndex:'actname',editor:true
  21. },{
  22. text:'状态名',dataIndex:'statusname',editor:true
  23. },{
  24. text:'状态值',dataIndex:'statusvalue',editor:true
  25. },{
  26. text:'状态颜色',dataIndex:'statuscolor',editor:true
  27. },{
  28. text:'说明',dataIndex:'explain',editor:true
  29. },{
  30. text:'排序号',dataIndex:'sort',editor:true
  31. },{
  32. text:'状态',dataIndex:'status',type:'checkbox',editor:true,sortable:true
  33. },{
  34. text:'写入日志',dataIndex:'islog',type:'checkbox',editor:true,sortable:true
  35. },{
  36. text:'写说明',dataIndex:'issm',type:'checkbox',editor:true,sortable:true
  37. },{
  38. text:'显示在详情页',dataIndex:'iszs',type:'checkbox',editor:true,sortable:true
  39. },{
  40. text:'ID',dataIndex:'id'
  41. }],
  42. itemclick:function(){
  43. btn(false);
  44. },
  45. beforeload:function(){
  46. btn(true);
  47. }
  48. });
  49. var c = {
  50. reload:function(){
  51. a.reload();
  52. },
  53. del:function(){
  54. a.del();
  55. },
  56. clickwin:function(o1,lx){
  57. var icon='plus',name='新增操作菜单',id=0;
  58. if(lx==1){
  59. id = a.changeid;
  60. icon='edit';
  61. name='编辑操作菜单';
  62. };
  63. guanflowmenulist = a;
  64. addtabs({num:'flowmenu'+id+'',url:'main,flow,menuedit,id='+id+',setid='+modeid+',',icons:icon,name:name});
  65. },
  66. changemode:function(sid){
  67. modeid=sid;
  68. a.setparams({mid:modeid},true);
  69. var bo = (modeid==0);
  70. get('add_{rand}').disabled = bo;
  71. },
  72. xuanmode:function(o1){
  73. js.selectmode(o1, get('modes_{rand}'), function(sna,val,d){
  74. c.changemode(val);
  75. });
  76. }
  77. };
  78. js.initbtn(c);
  79. });
  80. </script>
  81. <table width="100%">
  82. <tr>
  83. <td align="left">
  84. <button class="btn btn-primary" click="clickwin,0" disabled id="add_{rand}" type="button"><i class="icon-plus"></i> 新增操作菜单</button>
  85. </td>
  86. <td style="padding-left:10px;">
  87. <button class="btn btn-default" click="reload" type="button">刷新</button>
  88. </td>
  89. <td style="padding-left:10px;">
  90. <div class="btn-group" style="width:260px;" click="xuanmode">
  91. <input class="input" placeholder="-选择模块-" style="flex:1" id="modes_{rand}" readonly>
  92. <button class="webbtn webbtn-default">v</button>
  93. </div>
  94. </td>
  95. <td width="80%"></td>
  96. <td align="right" nowrap>
  97. <button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button> &nbsp;
  98. <button class="btn btn-danger" id="del_{rand}" disabled click="del" type="button"><i class="icon-trash"></i> 删除</button>
  99. </td>
  100. </tr>
  101. </table>
  102. <div class="blank10"></div>
  103. <div id="view_{rand}"></div>
  104. <div class="tishi">此功能设置的是对应单据操作菜单,如pc桌面版,客户端打开应用显示数据,右键显示操作菜单的。</div>
粤ICP备19079148号