<div class="detail">
  <div class="title">分配配送人员<i class="icon_transport transport-guanbi" (click)="close()"></i></div>
  <div class="content">
    <div nz-row class="select">
      <div nz-col nzSpan="6">
        <div class="label">人员姓名：</div>
        <input [disabled]="nameMask" nz-input placeholder="请输入人员姓名" [(ngModel)]="searchName" nzSize="default"
          (ngModelChange)="searchInp('worker')" />
      </div>
      <div nz-col nzSpan="6" class="ml8">
        <div class="label">人员分组：</div>
        <nz-select nzAllowClear [nzDisabled]="groupMask" style="width: 220px;" [nzDropdownMatchSelectWidth]="false"
          [(ngModel)]="checkedGroup" (ngModelChange)="searchInp('group')" nzPlaceHolder="请选择人员分组">
          <nz-option *ngFor="let optionData of groupList" [nzLabel]="optionData.groupName" [nzValue]="optionData.id">
          </nz-option>
        </nz-select>
      </div>
    </div>
    <div class="table">
      <div class="box">
        <nz-table class="allotWorkerTable" [nzShowPagination]="false" #rowSelectionTable [nzData]="workerList"
          nzSize="small" [nzScroll]="{ y: '270px' }" [nzLoading]="loading1">
          <thead>
            <tr class="thead">
              <th nzWidth="30px" style="text-align: center"></th>
              <th style="text-align: center">姓名</th>
              <th nzWidth="202px" style="text-align: center" *ngIf="workerDispatchUserList === 'dynamic'">分组名称</th>
              <th nzWidth="202px" style="text-align: center" *ngIf="workerDispatchUserList === 'dynamic'">工单数</th>
              <th nzWidth="202px" style="text-align: center" *ngIf="workerDispatchUserList === 'dynamic'">空闲时间</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of rowSelectionTable.data" (click)="checkAllotWorker(data.id,true)">
              <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="checkAllotWorker(data.id)">
              </td>
              <td nzAlign="center">{{ data.name }}</td>
              <td nzAlign="center" *ngIf="workerDispatchUserList === 'dynamic'">{{ data.groupDTO?.groupName }}</td>
              <td nzAlign="center" *ngIf="workerDispatchUserList === 'dynamic'">{{ data.totalCount }}</td>
              <td nzAlign="center" *ngIf="workerDispatchUserList === 'dynamic'" [ngClass]="{red: data.workStateRemark ? true : !data.freetime, green: !data.workStateRemark && data.freetime}">{{ data.workStateRemark ? '示忙-' + data.workStateRemark : (data.freetime || '忙碌中') }}</td>
            </tr>
          </tbody>
        </nz-table>
        <div class="pagination">
          <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger
            [(nzPageSize)]="pageSize" (nzPageIndexChange)="getWorkerList()" (nzPageSizeChange)="getWorkerList()">
          </nz-pagination>
        </div>
      </div>
    </div>
  </div>
  <div class="btns display_flex justify-content_flex-center">
    <button nz-button nzType="primary" [nzLoading]="btnLoading" (click)="submit()"
      *ngIf="mapOfCheckedId[worderId]">确认</button>
    <button class=" btn cancel" nz-button nzType="default" (click)="close()">取消</button>
  </div>
</div>


<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" (closeModel)="close()">
  <!-- 2.父组件调用子组件时绑定到这个事件属性，并在事件发生时作出回应。(closeModel)="close()" -->
</app-prompt-modal>
