rock_flow_menu.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. load:function(a){
  43. if(!bools){
  44. var s = '<option value="0">-选择模块-</option>',len=a.flowarr.length,i,csd,types='';
  45. for(i=0;i<len;i++){
  46. csd = a.flowarr[i];
  47. if(types!=csd.type){
  48. if(types!='')s+='</optgroup>';
  49. s+='<optgroup label="'+csd.type+'">';
  50. }
  51. s+='<option value="'+csd.id+'">'+csd.name+'</option>';
  52. types = csd.type;
  53. }
  54. $('#mode_{rand}').html(s);
  55. }
  56. bools=true;
  57. },
  58. itemclick:function(){
  59. btn(false);
  60. },
  61. beforeload:function(){
  62. btn(true);
  63. }
  64. });
  65. var c = {
  66. reload:function(){
  67. a.reload();
  68. },
  69. del:function(){
  70. a.del();
  71. },
  72. clickwin:function(o1,lx){
  73. var icon='plus',name='新增操作菜单',id=0;
  74. if(lx==1){
  75. id = a.changeid;
  76. icon='edit';
  77. name='编辑操作菜单';
  78. };
  79. guanflowmenulist = a;
  80. addtabs({num:'flowmenu'+id+'',url:'main,flow,menuedit,id='+id+',setid='+modeid+',',icons:icon,name:name});
  81. },
  82. changemode:function(){
  83. modeid=this.value;
  84. a.setparams({mid:modeid},true);
  85. var bo = (modeid==0);
  86. get('add_{rand}').disabled = bo;
  87. }
  88. };
  89. js.initbtn(c);
  90. $('#mode_{rand}').change(c.changemode);
  91. });
  92. </script>
  93. <table width="100%">
  94. <tr>
  95. <td align="left">
  96. <button class="btn btn-primary" click="clickwin,0" disabled id="add_{rand}" type="button"><i class="icon-plus"></i> 新增操作菜单</button>
  97. </td>
  98. <td style="padding-left:10px;">
  99. <button class="btn btn-default" click="reload" type="button">刷新</button>
  100. </td>
  101. <td style="padding-left:10px;">
  102. <select style="width:200px" id="mode_{rand}" class="form-control" ><option value="0">-选择模块-</option></select>
  103. </td>
  104. <td width="80%"></td>
  105. <td align="right" nowrap>
  106. <button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button> &nbsp;
  107. <button class="btn btn-danger" id="del_{rand}" disabled click="del" type="button"><i class="icon-trash"></i> 删除</button>
  108. </td>
  109. </tr>
  110. </table>
  111. <div class="blank10"></div>
  112. <div id="view_{rand}"></div>
  113. <div class="tishi">此功能设置的是对应单据操作菜单,如pc桌面版,客户端打开应用显示数据,右键显示操作菜单的。</div>
粤ICP备19079148号