1
0

carmModel.php 723 B

1234567891011121314151617181920212223242526
  1. <?php
  2. //车辆管理模块接口
  3. class flow_carmClassModel extends flowModel
  4. {
  5. public function initModel()
  6. {
  7. $this->statearr = c('array')->strtoarray('blue|办理中,green|可用,red|维修中,gray|报废');
  8. $this->publiarr = c('array')->strtoarray('gray|否,green|是');
  9. $this->carms = m('carms');
  10. }
  11. public function flowrsreplace($rs)
  12. {
  13. if(isset($this->statearr[$rs['state']])){
  14. $b = $this->statearr[$rs['state']];
  15. $rs['state'] = '<font color="'.$b[0].'">'.$b[1].'</font>';
  16. }
  17. $b = $this->publiarr[$rs['ispublic']];
  18. $rs['ispublic'] = '<font color="'.$b[0].'">'.$b[1].'</font>';
  19. $rs['djshu'] = $this->carms->rows('carid='.$rs['id'].'');
  20. return $rs;
  21. }
  22. }
粤ICP备19079148号