<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>
          <nz-range-picker nzShowTime [(ngModel)]="searchCriteria.dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
        </div>
        <div class="list-template__searchItem">
          <span class="label">操作人：</span>
          <input nz-input class="formItem" placeholder="请输入操作人" [(ngModel)]="searchCriteria.name" />
        </div>
        <div class="list-template__searchItem">
          <span class="label">批次号：</span>
          <input nz-input class="formItem" placeholder="请输入批次号" [(ngModel)]="searchCriteria.batchNo" />
        </div>
        <div class="list-template__searchItem">
          <span class="label">凭证编号：</span>
          <input nz-input class="formItem" placeholder="请输入凭证编号" [(ngModel)]="searchCriteria.credentialsNumber" />
        </div>
      </div>
      <div nz-col nzXl="8" class="list-template__btns">
        <button nz-button class="btn default" (click)='batchOutOfOtorageClick()'>批量出库</button>
        <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="11%">批次号</th>
            <th nzWidth="11%">凭证编号</th>
            <th nzWidth="11%">总重量（KG）</th>
            <th nzWidth="11%">总袋数</th>
            <th nzWidth="11%">操作人</th>
            <th nzWidth="11%">出库时间</th>
            <th nzWidth="11%">运输单位</th>
            <th nzWidth="11%">接收单位</th>
            <th nzWidth="12%">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let i = index">
            <td>{{ data.batchNo }}</td>
            <td>{{ data.credentialsNumber }}</td>
            <td>{{ data.totalWeight }}</td>
            <td>{{ data.totalBags }}</td>
            <td>{{ data.operator ? data.operator.name: '' }}</td>
            <td>{{ data.outTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
            <td>{{ data.transportCompany ? data.transportCompany.name : '' }}</td>
            <td>{{ data.receptionCompany ? data.receptionCompany.name : '' }}</td>
            <td>
              <div class="coop">
                <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看详情</span>
                <!-- <span *ngIf="coopBtns.print" (click)="showModal(data)">打印</span> -->
              </div>
            </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>

<!-- 查看详情 -->
<router-outlet></router-outlet>
