rewardModel.php 971 B

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