Пример #1
0
 public function getScoredOfficeCountByScorer($scorer_id)
 {
     $count = 0;
     foreach ($this->offices as $office) {
         if (MOfficeCampaignScore::getScoreByScorer($office->office_id, $scorer_id) !== false) {
             $count++;
         }
     }
     return $count;
 }
Пример #2
0
        ?>
">
            <!--
              <img class="media-object pull-left" src="http://placehold.it/80x80">
            -->
            <div class="pull-right">
              <?php 
        $score = \app\models\MOfficeCampaignScore::getScore($model_office->office_id);
        if ($score) {
            $wx_user = \app\models\MUser::findOne(['gh_id' => $gh_id, 'openid' => $openid]);
            $staff = $wx_user->mobileStaff;
            if (empty($staff)) {
                $staff = $wx_user->staff;
            }
            if ($staff->isOfficeCampaignScorer()) {
                $myscore = \app\models\MOfficeCampaignScore::getScoreByScorer($model_office->office_id, $staff->staff_id);
                if ($myscore === false) {
                    ?>
                    <span class="icon icon-info" style="color:red"></span>
                    <?php 
                }
            }
            ?>
                <span class="badge badge-positive"><?php 
            echo number_format($score, 2);
            ?>
分</span>
              <?php 
        } else {
            if (\app\models\MOfficeCampaignDetail::getDetailReadyStatus($model_office->office_id) != \app\models\MOfficeCampaignDetail::DETAIL_COMPLETE) {
                ?>