rock_schedule_guan.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. var a = $('#veiw_{rand}').bootstable({
  5. tablename:'schedule',celleditor:false,fanye:true,modenum:'schedule',sort:'id',dir:'desc',modename:'日程',
  6. columns:[{
  7. text:'标题',dataIndex:'title',editor:true,align:'left'
  8. },{
  9. text:'时间',dataIndex:'startdt',sortable:true
  10. },{
  11. text:'截止时间',dataIndex:'enddt',sortable:true
  12. },{
  13. text:'重复',dataIndex:'rate'
  14. },{
  15. text:'是否提醒',dataIndex:'txsj'
  16. },{
  17. text:'提醒给',dataIndex:'recename'
  18. },{
  19. text:'添加人',dataIndex:'optname'
  20. },{
  21. text:'状态',dataIndex:'status',type:'checkbox',editor:true,sortable:true
  22. }],
  23. itemclick:function(d){
  24. btn(d.uid!=adminid);
  25. },
  26. beforeload:function(){
  27. btn(true);
  28. },
  29. itemdblclick:function(d){
  30. openxiangs(this.modename,this.modenum,d.id);
  31. }
  32. });
  33. var c = {
  34. del:function(){
  35. a.del({check:function(lx){if(lx=='yes')btn(true)}});
  36. },
  37. refresh:function(){
  38. a.reload();
  39. },
  40. clickdt:function(o1){
  41. js.changedate(o1,'dt1_{rand}');
  42. },
  43. search:function(o1){
  44. var s=get('key_{rand}').value;
  45. a.setparams({key:s,dt:get('dt1_{rand}').value},true);
  46. },
  47. clickwin:function(o1,lx){
  48. var id=0;
  49. if(lx==1)id=a.changeid;
  50. openinput('日程','schedule',id,'wfhoew{rand}');
  51. },
  52. changlx:function(o1,lx){
  53. $("button[id^='state{rand}']").removeClass('active');
  54. $('#state{rand}_'+lx+'').addClass('active');
  55. var as = ['my','rece'];
  56. a.setparams({'atype':as[lx]},true);
  57. }
  58. };
  59. wfhoew{rand}=function(){
  60. c.refresh();
  61. }
  62. function btn(bo){
  63. get('del_{rand}').disabled = bo;
  64. get('edit_{rand}').disabled = bo;
  65. }
  66. js.initbtn(c);
  67. });
  68. </script>
  69. <div>
  70. <table width="100%">
  71. <tr>
  72. <td align="left">
  73. <button class="btn btn-primary" click="clickwin,0" type="button"><i class="icon-plus"></i> 新增</button>
  74. </td>
  75. <td style="padding-left:10px">
  76. <div style="width:140px" class="input-group">
  77. <input placeholder="日期" readonly class="form-control" id="dt1_{rand}" >
  78. <span class="input-group-btn">
  79. <button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
  80. </span>
  81. </div>
  82. </td>
  83. <td style="padding-left:10px">
  84. <input class="form-control" style="width:180px" id="key_{rand}" placeholder="标题">
  85. </td>
  86. <td style="padding-left:10px">
  87. <button class="btn btn-default" click="search" type="button">搜索</button>
  88. </td>
  89. <td width="80%" style="padding-left:10px">
  90. <div id="stewwews{rand}" class="btn-group">
  91. <button class="btn btn-default active" id="state{rand}_0" click="changlx,0" type="button">我创建</button>
  92. <button class="btn btn-default" id="state{rand}_1" click="changlx,1" type="button">提醒给我的</button>
  93. </div>
  94. </td>
  95. <td align="right" width="200" nowrap>
  96. <button class="btn btn-danger" id="del_{rand}" click="del" disabled type="button"><i class="icon-trash"></i> 删除</button> &nbsp;
  97. <button class="btn btn-info" id="edit_{rand}" click="clickwin,1" disabled type="button"><i class="icon-edit"></i> 编辑 </button>
  98. </td>
  99. </tr>
  100. </table>
  101. </div>
  102. <div class="blank10"></div>
  103. <div id="veiw_{rand}"></div>
粤ICP备19079148号