1
0

mode_jiabanAction.php 617 B

1234567891011121314151617181920212223
  1. <?php
  2. class mode_jiabanClassAction extends inputAction{
  3. public function totalAjax()
  4. {
  5. $start = $this->post('stime');
  6. $end = $this->post('etime');
  7. $jiatype= (int)$this->post('jiatype');
  8. $date = c('date', true);
  9. $sj = $date->datediff('H', $start, $end);
  10. $jiafee = 0;
  11. if($jiatype==1)$jiafee = m('kaoqin')->jiafee($this->adminid, $sj, $start);
  12. $this->returnjson(array($sj, '', $jiafee));
  13. }
  14. protected function savebefore($table, $arr, $id, $addbo){
  15. $msg = m('kaoqin')->leavepan($arr['uid'], '', $arr['stime'], $arr['etime'], 0, $id,'加班');
  16. return $msg;
  17. }
  18. }
粤ICP备19079148号