<div class="team_sales_detail_wrapper">
  <div class="teamHeader">
    <div class="teamItem teamInfo">
      <!-- <span class="icon-tuandui iconfont"
        style="position: absolute;width:45px;height:45px;line-height:35px;font-size: 30px;left:0;border: 1px #dcdcdc solid; padding: 5px;border-radius: 50%;"></span> -->
        <img src="assets/images/cup_icon.png" >
        <div style="float: left;letter-spacing: 5px;margin-left: 5%;">{{subordinateSystemName?subordinateSystemName.split('').join('/'):''}}</div>
    </div>
  </div>
  <div *ngIf="showType==='teamSalesScore'">
    <div class="rankInfoWrapper">
      <div class="rankContent">
        <div style="font-size: 18px;margin: 5px auto;text-align: center;">团队成员活动量得分</div>
        <div [ngSwitch]="sortType" class="sortType">
          <span *ngSwitchCase="2" (click)="sortType=3;queryPEPScore();"><i class="glyphicon glyphicon-sort"></i>按周排序</span>
          <span *ngSwitchCase="1" (click)="sortType=2;queryPEPScore();"><i class="glyphicon glyphicon-sort"></i>按天排序</span>
          <span *ngSwitchCase="3" (click)="sortType=1;queryPEPScore();"><i class="glyphicon glyphicon-sort"></i>按月排序</span>
        </div>
        <div class="content_wrapper">
          <ul style="border: none;">
            <li class="name">姓名</li>
            <li class="day">今天</li>
            <li>本周</li>
            <li>本月</li>
            <li style="line-height: 15px;">月分效(FYC/分)</li>
            <li></li>
          </ul>
          <div style="width: 100%;text-align: center;float: left;height: 35px;"
            *ngIf="personalList?.length <=0">
            暂无团队成员，努力去增员吧
          </div>
          <ul *ngFor="let personalItem of personalList;index as i;" [routerLink]="['/scoreDeatil',personalItem.practitionerId]">
            <li>
              <span class="name"> {{i + 1}} </span> 
              <i style="margin-left: 10px;font-style: normal;"> {{personalItem.name}}</i>
            </li>
            <li class="day">{{personalItem.dayScore}}</li>
            <li>{{personalItem.weekScore}}</li>
            <li>{{personalItem.monthScore}}</li>
            <li>{{personalItem.rate}}</li>
            <li><i class="iconfont icon-ar-r" style="color: #A4A4A4FF;font-size: 12px;" ></i></li>
          </ul>
        </div>

      </div>
    </div>
  </div>
  <div *ngIf="showType==='forecast'">
    <div class="rankInfoWrapper">
      <div class="rankContent">
        <div class="tab">
          <div style="font-size: 18px;">团队销售业绩预测(预计)</div>
          <ul>
            <li [ngClass]="{selected:selectedSalseItem==='m'}" (click)="salesPerformanceForecastListQuery('m')">本月</li>
            <li [ngClass]="{selected:selectedSalseItem==='q'}" (click)="salesPerformanceForecastListQuery('q')">本季</li>
            <li [ngClass]="{selected:selectedSalseItem==='y'}" (click)="salesPerformanceForecastListQuery('y')">本年</li>
          </ul>
        </div>
        <div class="content_wrapper forecast">
          <ul style="border-bottom: none;">
            <li class="name">姓名</li>
            <li>FYP</li>
            <li>FYC</li>
            <li class="count">件数</li>
            <li>完成率</li>
          </ul>
          <div style="width: 100%;text-align: center;float: left;height: 35px;"
            *ngIf="salesPerformanceForecastInfos?.length <=0">
            暂无团队成员，努力去增员吧
          </div>
          <ul *ngFor="let forecastItem of salesPerformanceForecastInfos;index as i;">
            <li class="name">
              <span>{{i+1}}</span>
              <i>{{forecastItem.name}}</i>
             
            </li>
            <li>{{forecastItem.premium!=null?'￥'+lifeCommonService.transform(forecastItem.premium):'-'}}</li>
            <li>{{forecastItem.commission!=null?'￥'+lifeCommonService.transform(forecastItem.commission):'-'}}</li>
            <li class="count">{{forecastItem.pieces!=null?forecastItem.pieces:'-'}}</li>
            <li>{{forecastItem.achievementRate!=null?lifeCommonService.toPercent(forecastItem.achievementRate):'-' }}
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <div *ngIf="showType === 'memberList'">
    <div class="rankInfoWrapper">
      <div class="rankContent">
        <div style="font-size: 18px;margin: 5px auto;text-align: center;">团队成员</div>
        <div class="content_wrapper memberList">
          <ul style="border: none;background: #e7eef5;border-radius: 5px;">
            <li style="padding-left: 5px;">姓名/团队</li>
            <li>级别</li>
            <li class="sex">性别</li>
            <li>手机号</li>
            <li></li>
          </ul>
          <div style="width: 100%;text-align: center;float: left;height: 35px;"
            *ngIf="teamMemberList?.length <=0">
            暂无团队成员，努力去增员吧
          </div>
          <ul *ngFor="let teamMemberItem of teamList;index as i;" (click)="goToList(teamMemberItem)">
            <li>
              <span style="color:#333;font-size: 14px;font-weight: normal;">{{i+1}} </span>
              <i style="margin-left: 10px;font-style: normal;">{{teamMemberItem.system}}</i>
            </li>
            <li style="font-weight: bold;" [ngStyle]="{'color':teamMemberItem.systemType == 'S2'?'#f7484a':'#22609c'}">{{lifeCommonService.getName(teamMemberItem.systemType)}}</li>
            <li class="sex">-</li>
            <li>-</li>
            <li><i class="iconfont icon-ar-r" style="color: #a4a4a4;font-size: 12px;" ></i></li>
          </ul>
          <ul *ngFor="let teamMemberItem of teamMemberList;index as i;" [routerLink]="['/member_detail',teamMemberItem.practitionerId]">
            <li>
              <span style="color:#333;font-size: 14px;font-weight: normal;">{{teamList?.length == 0 ?i + 1:teamList?.length+i+1}} </span>
              <i style="margin-left: 10px;font-style: normal;">{{teamMemberItem.name}}</i>
            </li>
            <li>{{teamMemberItem.practitionerLevel}}{{teamMemberItem.practitionerTitle}}</li>
            <li class="sex">{{teamMemberItem.gender}}</li>
            <li>{{teamMemberItem.mobileNo}}</li>
            <li><i class="iconfont icon-ar-r" style="color: #a4a4a4;font-size: 12px;" ></i></li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>