rewardModel.php 952 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. class flow_rewardClassModel extends flowModel
  3. {
  4. public function initModel(){
  5. $this->typearr = array('<font color=green>奖励</font>','<font color=red>处罚</font>');
  6. }
  7. protected function flowcheckname($num)
  8. {
  9. if($num=='objectque'){
  10. return array($this->rs['objectid'], $this->rs['object']);
  11. }
  12. }
  13. public function flowsearchfields()
  14. {
  15. $arr[] = array('name'=>'申请人...','fields'=>'uid');
  16. $arr[] = array('name'=>'奖惩对象...','fields'=>'objectid');
  17. return $arr;
  18. }
  19. public function flowrsreplace($rs){
  20. $type = $rs['type'];
  21. $rs['type'] = $this->typearr[$type];
  22. return $rs;
  23. }
  24. protected function flowbillwhere($uid, $lx)
  25. {
  26. $key = $this->rock->post('key');
  27. $where = '';
  28. if($key!='')$where.=" and (b.udeptname like '%$key%' or b.`uname` like '%$key%' or a.`object` like '%$key%')";
  29. return array(
  30. 'keywhere' => $where,
  31. 'leftbill' => 1
  32. );
  33. }
  34. }
粤ICP备19079148号