custsaleModel.php 809 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. class agent_custsaleClassModel extends agentModel
  3. {
  4. public function gettotal()
  5. {
  6. $stotal = $this->gettotalss($this->adminid);
  7. $titles = '';
  8. return array('stotal'=>$stotal,'titles'=> $titles);
  9. }
  10. private function gettotalss($uid)
  11. {
  12. $to = m('custsale')->rows('`uid`='.$uid.' and `state`=0');
  13. return $to;
  14. }
  15. protected function agenttotals($uid)
  16. {
  17. return array(
  18. 'gen' => $this->gettotalss($uid)
  19. );
  20. }
  21. protected function agentrows($rows, $rowd, $uid)
  22. {
  23. $statea = $this->flow->statearr;
  24. foreach($rowd as $k=>$rs){
  25. $state = $rs['statess'];
  26. if($state==2){
  27. $rows[$k]['ishui'] =1;
  28. }
  29. $ztarr = $statea[$state];
  30. $rows[$k]['statustext'] = $ztarr[0];
  31. $rows[$k]['statuscolor'] = $ztarr[1];
  32. }
  33. return $rows;
  34. }
  35. }
粤ICP备19079148号