rock_kaoqin_kqinfo.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php if(!defined('HOST'))die('not access');?>
  2. <script >
  3. $(document).ready(function(){
  4. {params}
  5. var atype=params.atype;
  6. var a = $('#view_{rand}').bootstable({
  7. tablename:'kqinfo',params:{'atype':atype},celleditor:true,fanye:true,modedir:'{mode}:{dir}',
  8. storeafteraction:'kqinfoaftershow',storebeforeaction:'kqinfobeforeshow',
  9. columns:[{
  10. text:'部门',dataIndex:'deptname',align:'left'
  11. },{
  12. text:'姓名',dataIndex:'name'
  13. },{
  14. text:'操作时间',dataIndex:'optdt',sortable:true
  15. },{
  16. text:'类型',dataIndex:'kind',sortable:true
  17. },{
  18. text:'请假类型',dataIndex:'qjkind'
  19. },{
  20. text:'开始时间',dataIndex:'stime',sortable:true
  21. },{
  22. text:'截止时间',dataIndex:'etime',sortable:true
  23. },{
  24. text:'时间',dataIndex:'totals',sortable:true
  25. },{
  26. text:'加班兑换',dataIndex:'jiatype'
  27. },{
  28. text:'说明',dataIndex:'explain',align:'left'
  29. },{
  30. text:'状态',dataIndex:'status'
  31. },{
  32. text:'操作人',dataIndex:'optname'
  33. },{
  34. text:'截止使用',dataIndex:'enddt',sortable:true
  35. },{
  36. text:'',dataIndex:'caozuo'
  37. }],
  38. load:function(d){
  39. $('#kqtong{rand}').html(d.totalstr);
  40. },
  41. itemdblclick:function(d){
  42. openxiangs(d.modename,d.modenum,d.id);
  43. }
  44. });
  45. var c = {
  46. search:function(){
  47. var s=get('key_{rand}').value;
  48. a.setparams({key:s,dt1:get('dt1_{rand}').value,dt2:get('dt2_{rand}').value,keys:get('keys_{rand}').value},true);
  49. },
  50. clickdt:function(o1, lx){
  51. $(o1).rockdatepicker({initshow:true,view:'month',inputid:'dt'+lx+'_{rand}'});
  52. },
  53. daochu:function(){
  54. a.exceldown();
  55. },
  56. clickwin:function(o1, lx){
  57. if(lx==0)openinput('请假条','leave');
  58. if(lx==1)openinput('加班单','jiaban');
  59. },
  60. xiashu:function(o1){
  61. if(atype=='my'){
  62. o1.value='我的考勤';
  63. atype = 'down';
  64. nowtabssettext('下属考勤信息');
  65. }else{
  66. o1.value='下属考勤';
  67. atype = 'my';
  68. nowtabssettext('我的考勤信息');
  69. }
  70. a.setparams({atype:atype}, true);
  71. }
  72. };
  73. if(atype=='my')$('#down_{rand}').show();
  74. js.initbtn(c);
  75. });
  76. </script>
  77. <div>
  78. <table width="100%"><tr>
  79. <td style="padding-right:10px">
  80. <button class="btn btn-primary" click="clickwin,0" type="button">新增请假条</button>
  81. </td>
  82. <td style="padding-right:10px">
  83. <button class="btn btn-primary" click="clickwin,1" type="button">新增加班单</button>
  84. </td>
  85. <td nowrap>日期从&nbsp;</td>
  86. <td nowrap>
  87. <input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt1_{rand}" >
  88. </td>
  89. <td nowrap>&nbsp;至&nbsp;</td>
  90. <td nowrap>
  91. <input style="width:110px" onclick="js.changedate(this)" readonly class="form-control datesss" id="dt2_{rand}" >
  92. </td>
  93. <td style="padding-left:10px">
  94. <input class="form-control" style="width:150px" id="key_{rand}" placeholder="姓名/部门">
  95. </td>
  96. <td style="padding-left:10px">
  97. <input class="form-control" style="width:100px" id="keys_{rand}" placeholder="类型">
  98. </td>
  99. <td style="padding-left:10px">
  100. <button class="btn btn-default" click="search" type="button">搜索</button>
  101. </td>
  102. <td width="80%" style="padding-left:10px">
  103. <input class="btn btn-default" click="xiashu" id="down_{rand}" style="display:none" value="下属考勤" type="button">
  104. </td>
  105. <td align="right" nowrap>
  106. <button class="btn btn-default" click="daochu,1" type="button">导出</button>
  107. </td>
  108. </tr></table>
  109. </div>
  110. <div class="blank10"></div>
  111. <div>我考勤信息统计:<span id="kqtong{rand}"></span></div>
  112. <div class="blank10"></div>
  113. <div id="view_{rand}"></div>
粤ICP备19079148号