<div class="wrapper">
  <ul class="tab">
    <li *ngFor="let titleItem of titleList" (click)="selectTab(titleItem.id)"
      [ngClass]="{selected:selectedId===titleItem.id}">
      <div style="position: relative;">
        <h3>{{titleItem.name}}
        </h3>
      </div>
    </li>
  </ul>
  <div class="content" *ngIf="selectedId===1">
    <i class="iconfont icon-bianji" *ngIf="readonlyFlag" (click)="editInfo()"></i>
    <i class="iconfont icon-save" *ngIf="!readonlyFlag" (click)="saveInfo()"></i>
    <div class="contentDetail">
      <div class="contentItem">
        <span><sub>*</sub>姓名</span>
        <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无姓名':'请输入姓名'}}"
          [(ngModel)]="editRecruiting.name" [disabled]="readonlyFlag" />
      </div>
      <div class="contentItem">
        <span>年龄</span>
        <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无年龄信息':'请输入年龄'}}"
          [(ngModel)]="editRecruiting.age" [disabled]="readonlyFlag" />
      </div>
      <div class="contentItem">
        <span>性别</span>
        <div class="sexWrapper">
          <button class="form-control sex" [ngClass]="{'sexBtn':editRecruiting?.gender=='1' && maleFlag && femaleFlag}"
            (click)="selectedGender('1')" [disabled]="readonlyFlag" *ngIf="sexFlag && maleFlag">男
          </button>
          <button class="form-control sex" [ngClass]="{'sexBtn':editRecruiting?.gender=='2' && maleFlag && femaleFlag}"
            (click)="selectedGender('2')" [disabled]="readonlyFlag" *ngIf="sexFlag && femaleFlag">女
          </button>
        </div>
        <input class="form-control" type="text" placeholder="暂无性别信息" *ngIf="!sexFlag" disabled />

      </div>
      <div class="contentItem">
        <span><sub>*</sub>手机</span>
        <a *ngIf="this.id!=0" style="text-decoration:none;color: #333;margin-right: 16px;"
          href="tel:{{editRecruiting.mobileNo}}">
          <i class="iconfont icon-dianhua" style="color: #e10d0d;"></i>
          {{editRecruiting.mobileNo}}
        </a>
        <input class="form-control" type="text" maxlength="11" [(ngModel)]="editRecruiting.mobileNo" *ngIf="this.id==0"
          placeholder="请输入手机号" />
      </div>
      <div class="contentItem">
        <span>微信</span>
        <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无微信':'请输入微信'}}"
          [(ngModel)]="editRecruiting.weChat" [disabled]="readonlyFlag" (blur)="inputBlur()" />

      </div>
      <div class="contentItem">
        <span>其他联系</span>
        <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无其他联系方式':'请输入其他联系方式'}}"
          [(ngModel)]="editRecruiting.otherContacts" [disabled]="readonlyFlag" (blur)="inputBlur()" />
      </div>
      <div class="contentItem">
        <span>学历</span>
        <select class="form-control" [(ngModel)]="editRecruiting.educationLevel" [disabled]="readonlyFlag"
          style=" direction: rtl;">
          <option value=''>请选择学历</option>
          <option *ngFor="let educationLevelItem of educationLevelList" [value]="educationLevelItem.id">
            {{educationLevelItem.name}}
          </option>
        </select>
      </div>
      <div class="contentItem">
        <span>招募来源</span>
        <select class="form-control" [(ngModel)]="editRecruiting.resourceDropMasterId" [disabled]="readonlyFlag"
          style=" direction: rtl;">
          <option value=''>请选择招募来源</option>
          <option *ngFor="let resourceItem of resourceList" [value]="resourceItem.id">
            {{resourceItem.dropOptionName}}
          </option>
        </select>
      </div>
      <div class="contentItem" *ngIf="this.id!=0">
        <span>增员创建时间</span>
        <input class="form-control" type="text" placeholder="增员创建时间" [(ngModel)]="editRecruiting.opportunityDate"
          disabled />
      </div>
      <div class="contentItem" *ngIf="this.id!=0">
        <span>增员状态</span>
        <div style="padding: 6px 15px;padding: 6px 15px;color: #e10d0d;font-weight: bold;">
          {{editRecruiting.mdDropOptionId}}</div>
      </div>
      <div class="contentItem">
        <span>备注</span>
        <input class="form-control" type="text" placeholder="{{readonlyFlag ?'暂无备注':'请输入备注信息'}}"
          [(ngModel)]="editRecruiting.remark" [disabled]="readonlyFlag" (blur)="inputBlur()" />
      </div>
    </div>
  </div>
  <div class="content" *ngIf="selectedId===2">
    <div style="text-align: center;font-size: 16px;margin-top: 10px;"
      *ngIf="opportunitySurveyAnswersList?.length==0 || !opportunitySurveyAnswersList">
      暂无简历</div>
  </div>
  <div class="content" *ngIf="selectedId===3;">
    <ul class="recordLists">
      <li *ngFor="let recruitTrackInfoItem of recruitTrackInfoList">
        <div style="display: flex;justify-content: space-between;">
          <div class="updatedAt">{{recruitTrackInfoItem.createAt}}</div>
          <div class="opportunityRecordItem">{{recruitTrackInfoItem.trackStatus}}</div>
        </div>
        <div class="salesNotice">{{recruitTrackInfoItem.notice}}</div>
      </li>
    </ul>
    <div class="add" (click)="this.isShow = true;">
      <i class="iconfont icon-jiahao"></i>
    </div>
  </div>
  <div class="toastWrapper toast" *ngIf="isShow" (click)="this.isShow = false;">

  </div>
  <!--编辑框-->
  <div class="editContainer" *ngIf="isShow">
    <div>
      <div>增员状态</div>
      <div style="position:relative">
        <select name="businessStatus" (onChange)="inputBlur()" id="businessStatus" class="form-control"
          [(ngModel)]="trackStatusId">
          <option value="null">请选择</option>
          <option *ngFor="let recruitingStatusItem of recruitingStatusList" value="{{recruitingStatusItem.id}}">
            {{recruitingStatusItem.dropOptionName}}
          </option>
        </select>
        <i class="iconfont icon-xiangxia" style="position: absolute;right: 50px;top: 5px;"></i>
      </div>
    </div>
    <div>
      <div>备注{{notice}}</div>
      <div><input type="text" id="remark" class="form-control" placeholder="输入备注信息" [(ngModel)]="notice"
          (blur)="inputBlur()"></div>
    </div>
    <!-- <div>
      <div>跟进时间</div>
      <div><input style="-webkit-appearance: none;" id="time" class="form-control" type="date"
          [(ngModel)]="opportunityRecordNoticeDate" (blur)="inputBlur()"></div>
    </div> -->
    <ul class="footer">
      <li (click)="addRecruitTrack()">确定</li>
      <li (click)="this.isShow = false;">取消</li>
    </ul>
  </div>
</div>
<ydlife-toast *ngIf="toastDialog" [toastInfo]="toastInfo"></ydlife-toast>