<div nz-row class="breadcrumbs" >
  <div nz-col nzSpan="16">
    <nz-breadcrumb class="padding-8-0">
      <nz-breadcrumb-item>
        首页
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        <a>运维工作</a>
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        资产备件
      </nz-breadcrumb-item>
      <nz-breadcrumb-item>
        子分类：{{childName}}
      </nz-breadcrumb-item>
    </nz-breadcrumb>
  </div>
  <div nz-col nzSpan="8" class="text-right">
    <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
    <smart-full-screen></smart-full-screen>
  </div>
</div>
<div nz-row [nzGutter]="4" class="search-form">
  <div nz-col nzSpan="3">
    <button (click)="showAddModal()"  nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>添加资产</button>
  </div>
  <div nz-col nzSpan="18">
    <button (click)="showUploadModal()"  nz-button nzType="default"><i class="anticon anticon-upload"></i>导入资产</button>
    <button (click)="downLoad()" nz-button nzType="default"><i class="anticon anticon-download"></i>下载模版</button>
    <button (click)="downloadInventory()" nz-button nzType="default"><i class="anticon anticon-folder"></i>导出资产</button>
    <button (click)="batchDeleteInventory()" nz-button nzType="default"><i class="anticon anticon-close-circle-o"></i>删除资产</button>
  </div>
  <div nz-col nzSpan="3">

  </div>
</div>

<nz-table #nzTable [nzData]="childrenList">
  <thead>
  <tr>
    <th nzShowCheckbox [nzIndeterminate]="indeterminate" [nzChecked]="allChecked" (nzCheckedChange)="checkAll($event)"></th>
    <th>资产编号</th>
    <th>资产名称</th>
    <th>资产总数</th>
    <th>库存</th>
    <th>使用</th>
    <th>借出</th>
    <th>维修</th>
    <th>报废</th>
    <th>关联事件</th>
    <th style="text-align: center">操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of childrenList">
    <td nzShowCheckbox  [(nzChecked)]="data.checked" (nzCheckedChange)="selectItem(data,$event)"></td>
    <td class="round-tag tag-form">
      {{data.inventoryNo}}
    </td>
    <td>
      {{data.name}}
    </td>
    <td>{{data.inventorycount}}</td>
    <td>{{data.stock}}</td>
    <td>
      {{data.usedcount}}
    </td>
    <td>{{data.lendcount}}</td>
    <td>
      {{data.repaircount}}
    </td>
    <td>
      {{data.scrapcount}}
    </td>
    <td>{{data.eventSum}}</td>
    <td class="handle text-center main-color">
      <span (click)="goToDetail(data)">查看</span>
      <span (click)="deleteInVentory(data)">删除</span>
    </td>
  </tr>
  </tbody>
</nz-table>

<!--新增资产-->
<smart-assets #smartAssets (done)="getList()"></smart-assets>
<!--导入资产-->
<smart-upload #smartUpload></smart-upload>