<div class="salesWrapper">
  <div class="search_wrapper" *ngIf="pageType=='linkbusiness'">
    <div class="am-demo-page">
      <div class="am-demo-bd" >
          <SearchBar [placeholder]="'搜索你的商机'" [maxLength]="8"
          (onChange)="change($event)"
          ></SearchBar>
      </div>
    </div>
  </div>
  <div class="salesContent" [ngStyle]="{'padding-bottom':pageType=='business'?'0px':'50px'}">
    <div style="text-align: center;margin: 20px auto;font-size: 20px;" *ngIf="businessList?.length==0">暂无商机</div>
    <!-- <div class="line" *ngFor="let businessItem of businessList" [queryParams]="{orderId:businessItem.orderId}">
      <div></div>
      <div>手机号：{{businessItem.mobileNo}}</div>
      <div>商机来源：{{businessItem.opportunityFrom}}</div>
      <div></div>
    </div> -->
    <div class="salesItem" *ngFor="let businessItem of showBusinessList" 
    (click)="isJumpToDetail(businessItem.opportunityId,businessItem.orderId,businessItem.leadsAssignedId,businessItem)">
      <div *ngIf="pageType=='business'" class="icon_bolck" [ngStyle]="{'background':businessItem.expertType=='1'? '#ddd' : 'none'}">
        <span class="iconfont icon-xiansuo1" *ngIf="businessItem.expertType=='0'"></span>
        <span class="iconfont icon-zhuanjia" style="color: #093d9b;" *ngIf="businessItem.expertType=='1'"></span>
      </div>
      <div *ngIf="pageType=='linkbusiness'" class="linkbusinessRadius">
        <span class='circlebtn' *ngIf="selectedBusiness?.leadsAssignedId != businessItem.leadsAssignedId"></span>
        <img src="assets/images/gou_icon.png" style="position: absolute;width: 100%;" *ngIf="selectedBusiness?.leadsAssignedId == businessItem.leadsAssignedId">
      </div>
      <div class="line">
        <div>姓名：{{businessItem.name}}</div>
        <span class="iconfont icon-ar-r" style="font-size: 10px;position: relative; right: -2px;" *ngIf="pageType=='business'"></span>
      </div>
      <div class="line">
        <div>{{businessItem.mobileNo ? '手机号：'+businessItem.mobileNo :'微信号：'+businessItem.wechatNo}}</div>
        <div>{{businessItem.mdDropOptionName ? businessItem.mdDropOptionName:'待跟进'}}</div>
      </div>
      <div class="line">
        <div>商机来源：{{businessItem.opportunityFrom}}</div>
        <div>{{(businessItem.opportunityDate).substr(0,10)}}</div>
      </div>
      <div class="line">
        <div></div>
        <div><span (click)="del(businessItem.leadsAssignedId)">
          <i class="iconfont icon-shanchu" style="color: red;font-size: 16px;"></i>
        </span></div>
      </div>
    </div>
  </div>
  <div class="footer" *ngIf="pageType=='linkbusiness'" (click)="returnAddTask()">
      确认
  </div>
  <div class="add" *ngIf="pageType=='business'">
    <i class="iconfont icon-jiahao" (click)="addBussiness()"></i>
  </div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>

<!-- 删除确认弹窗 -->
<ydlife-alert *ngIf="isDelFlag" [dialogInfo]="dialogInfo" (popInfo)="popInfo($event)"></ydlife-alert>
