<div class="list-template">
  <div class="list-template__content">
    <div class="list-template__top" nz-row>
      <div nz-col nzXl='16' class="list-template__searchBox">
        <div class="list-template__searchItem">
          <span class="label">批次号:</span>
          <input nz-input class="formItem" placeholder="请输入批次号" [(ngModel)]="searchCriteria.batchCode" />
        </div>
        <div class="list-template__searchItem">
          <span class="label">关联科室:</span>
          <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
            nzPlaceHolder="请选择关联科室" [(ngModel)]="searchCriteria.relatedDept" (nzOnSearch)="changeInp($event)"
            (nzOpenChange)="changeSearch($event)">
            <ng-container *ngFor="let data of deptList">
              <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
            </ng-container>
            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
            </nz-option>
          </nz-select>
        </div>
      </div>
      <div nz-col nzXl="8" class="list-template__btns">
        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
      </div>
    </div>
    <div class="list-template__bottom">
      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
        [nzLoading]="loading1">
        <thead>
          <tr class="thead">
            <th nzWidth="6%">序号</th>
            <th nzWidth="8%">关联科室</th>
            <th nzWidth="8%">批次号</th>
            <th nzWidth="8%">被服类型</th>
            <th nzWidth="8%">回收数量</th>
            <th nzWidth="8%">送回数量</th>
            <th nzWidth="8%">是否异常</th>
            <th nzWidth="8%">回收人</th>
            <th nzWidth="11%">回收时间</th>
            <th nzWidth="8%">送回人</th>
            <th nzWidth="11%">送回时间</th>
            <th nzWidth="8%">状态</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let i = index">
            <td>{{i+1}}</td>
            <td>{{ data.relatedDeptDTO?.dept }}</td>
            <td>{{ data.batchCode }}</td>
            <td>{{ data.clothesType?.name }}</td>
            <td>{{ data.recyclingNum }}</td>
            <td>{{ data.sendBackNum }}</td>
            <td>{{ data.exception == 1 ? '是' : '否' }}</td>
            <td>{{ data.recyclersIdDTO?.name }}</td>
            <td>{{ data.recyclingTime | date:'yyyy-MM-dd HH:mm' }}</td>
            <td>{{ data.sendBackIdDTO?.name }}</td>
            <td>{{ data.sendBackTime | date:'yyyy-MM-dd HH:mm' }}</td>
            <td>{{ data.clothesState?.name }}</td>
          </tr>
        </tbody>
      </nz-table>
      <div class="list-template__pagination">
        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
        </nz-pagination>
      </div>
    </div>
  </div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>