<div class="list-template">
  <div class="list-template__content">
    <div class="list-template__top" nz-row>
      <div nz-col nzXl='18' class="list-template__searchBox"></div>
      <div nz-col nzLg="6" class="list-template__btns"></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="5%">序号</th>
            <th nzWidth="13%">批次号</th>
            <th nzWidth="13%">生成时间</th>
            <th nzWidth="13%">科室数量</th>
            <th nzWidth="13%">被服数量</th>
            <th nzWidth="13%">总费用</th>
            <th nzWidth="13%">状态</th>
            <th nzWidth="17%">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of listOfData;let index = index">
            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
            <td>{{data.batchCode || ''}}</td>
            <td>{{data.createTime | date: 'yyyy-MM-dd HH:mm' }}</td>
            <td>{{data.deptNum || ''}}</td>
            <td>{{data.clothesNum || ''}}</td>
            <td>{{data.totalPrice || ''}}</td>
            <td>{{data.batchState?.name}}</td>
            <td>
              <div class="coop">
                <span *ngIf="coopBtns.view" (click)="openRecallModal(data)">查看视图</span>
                <span *ngIf="coopBtns.recount" (click)="showDelModal(data,'您需要重新统计本批次的数据吗？','','recount')">重新统计</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>

  <!-- 删除模态框 -->
  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
    (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo">
</app-prompt-modal>

<!-- 撤回工单 -->
<div class="recallOrder display_flex justify-content_flex-center align-items_center" *ngIf="recallOrderShow">
  <div class="modalBody">
    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeRecallOrderModal()"></i></div>
    <div class="content">
      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
      <div class="defeat">是否回收完毕，可将本批次设置为“洗涤中”？</div>
    </div>
    <div class="btns display_flex justify-content_flex-center align-items_center">
      <button class="btn" nz-button nzType="primary" [nzLoading]='recLoading' (click)="recAndDel()">立即查看</button>
      <button class="btn" style="width: 120px;" nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmRec()">设置为洗涤中</button>
      <button class="btn cancel" nz-button nzType="default" (click)="closeRecallOrderModal()">取消</button>
    </div>
  </div>
</div>

