mode_hrcheckAction.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * 此文件是流程模块【hrcheck.考核评分】对应控制器接口文件。
  4. */
  5. class mode_hrcheckClassAction extends inputAction{
  6. protected function savebefore($table, $arr, $id, $addbo){
  7. }
  8. protected function saveafter($table, $arr, $id, $addbo){
  9. }
  10. public function pingfenAjax()
  11. {
  12. $mid = (int)$this->post('mid');
  13. $flow = m('flow')->initflow('hrcheck', $mid, false);
  14. return $flow->pingfen();
  15. }
  16. public function storeafter($table, $rows)
  17. {
  18. if($this->flow->atype!='tjall')return;
  19. $arr = array();
  20. $mlen= 0;
  21. foreach($rows as $k=>$rs){
  22. $rs['trbgcolor']='#fbe5d5';
  23. $basr = $this->flow->getsubdatastr($rs['id'], 1);
  24. $data = $basr['data'];
  25. $colums = $basr['colums'];
  26. $oi = 0;
  27. foreach($colums as $k3=>$v3){
  28. $rs['pfval'.$oi.''] = $v3;
  29. $oi++;
  30. }
  31. if($oi>$mlen)$mlen = $oi;
  32. $rs['itemname'] = '考核内容';
  33. $rs['fenshu'] = '分值';
  34. $arr[] = $rs;
  35. foreach($data as $k1=>$rs1){
  36. $rs1['abclex'] = 'ol';
  37. $oi1 = 0;
  38. foreach($colums as $k3=>$v3){
  39. $rs1['pfval'.$oi1.''] = $rs1['pfzd'.$k3.''];
  40. $oi1++;
  41. }
  42. $arr[] = $rs1;
  43. }
  44. }
  45. return array(
  46. 'rows' => $arr,
  47. 'mlen'=> $mlen
  48. );
  49. }
  50. }
粤ICP备19079148号