rock_kaoqin_location.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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:'location',celleditor:true,fanye:true,
  8. modedir:'{mode}:{dir}',params:{'atype':atype},modenum:'kqdw',
  9. columns:[{
  10. text:'部门',dataIndex:'deptname',align:'left'
  11. },{
  12. text:'姓名',dataIndex:'name'
  13. },{
  14. text:'打卡时间',dataIndex:'optdt',sortable:true
  15. },{
  16. text:'星期',dataIndex:'week'
  17. },{
  18. text:'定位类型',dataIndex:'type',sortable:true
  19. },{
  20. text:'地址',dataIndex:'label'
  21. },{
  22. text:'精确到',dataIndex:'precision'
  23. },{
  24. text:'说明',dataIndex:'explain',align:'left'
  25. },{
  26. text:'图片',dataIndex:'imgpath',renderer:function(v){
  27. var s='&nbsp;';
  28. if(!isempt(v))s='<img height="60" onclick="$.imgview({url:this.src})" src="'+v+'">';
  29. return s;
  30. }
  31. },{
  32. text:'',dataIndex:'opt',renderer:function(v,d){
  33. var s='&nbsp;';
  34. if(!isempt(d.location_x))s='<a onclick="js.locationshow('+d.id+')" href="javascript:;">地图上打开</a>';
  35. return s;
  36. }
  37. }]
  38. });
  39. var c = {
  40. search:function(){
  41. var s=get('key_{rand}').value;
  42. a.setparams({key:s,dt1:get('dt1_{rand}').value,dt2:get('dt2_{rand}').value},true);
  43. },
  44. clickdt:function(o1, lx){
  45. $(o1).rockdatepicker({initshow:true,view:'date',inputid:'dt'+lx+'_{rand}'});
  46. },
  47. daochu:function(o1){
  48. publicdaochuobj({
  49. 'objtable':a,
  50. 'modename':'',
  51. 'btnobj':o1
  52. });
  53. },
  54. xiashu:function(o1){
  55. if(atype=='my'){
  56. o1.value='我的记录';
  57. atype = 'down';
  58. nowtabssettext('下属定位记录');
  59. }else{
  60. o1.value='下属记录';
  61. atype = 'my';
  62. nowtabssettext('我的定位记录');
  63. }
  64. a.setparams({atype:atype}, true);
  65. }
  66. };
  67. js.initbtn(c);
  68. if(atype=='my')$('#down_{rand}').show();
  69. });
  70. </script>
  71. <div>
  72. <table width="100%"><tr>
  73. <td nowrap>日期&nbsp;</td>
  74. <td nowrap>
  75. <div style="width:140px" class="input-group">
  76. <input placeholder="" readonly class="form-control" id="dt1_{rand}" >
  77. <span class="input-group-btn">
  78. <button class="btn btn-default" click="clickdt,1" type="button"><i class="icon-calendar"></i></button>
  79. </span>
  80. </div>
  81. </td>
  82. <td nowrap>&nbsp;至&nbsp;</td>
  83. <td nowrap>
  84. <div style="width:140px" class="input-group">
  85. <input placeholder="" readonly class="form-control" id="dt2_{rand}" >
  86. <span class="input-group-btn">
  87. <button class="btn btn-default" click="clickdt,2" type="button"><i class="icon-calendar"></i></button>
  88. </span>
  89. </div>
  90. </td>
  91. <td style="padding-left:10px">
  92. <input class="form-control" style="width:150px" id="key_{rand}" placeholder="姓名/部门">
  93. </td>
  94. <td style="padding-left:10px">
  95. <button class="btn btn-default" click="search" type="button">搜索</button>
  96. </td>
  97. <td style="padding-left:10px">
  98. <input class="btn btn-default" click="xiashu" id="down_{rand}" style="display:none" value="下属记录" type="button">
  99. </td>
  100. <td width="80%"></td>
  101. <td align="right" nowrap>
  102. <button class="btn btn-default" click="daochu,1" type="button">导出 <i class="icon-angle-down"></i></button>
  103. </td>
  104. </tr></table>
  105. </div>
  106. <div class="blank10"></div>
  107. <div id="view_{rand}"></div>
  108. <div class="tishi">定位记录并不能使用做考勤打卡,目前只是用于外勤定位打卡使用。</div>
粤ICP备19079148号