<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>
                运维工作
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                备件管理
            </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)="addData()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>入库登记
        </button>
    </div>
    <div nz-col nzSpan="3">
        <button (click)="downLoad()" nz-button nzType="default"><i class="anticon anticon-download"></i>模版下载
        </button>
    </div>
    <div nz-col nzSpan="3">
        <button (click)="uploadFile()" nz-button nzType="default"><i class="anticon anticon-upload"></i>导入数据
        </button>
    </div>
    <div nz-col nzSpan="6"></div>
    <div nz-col nzSpan="5">
        <input type="text" nz-input [(ngModel)]="obj.keyword" placeholder="资产编号、名称">
    </div>
    <div nz-col nzSpan="2">
        <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search"></i>搜索
        </button>
    </div>
</div>

<nz-table #nzTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNum" [nzPageIndex]="pageNum"
          [nzPageSize]="pageCount" (nzPageIndexChange)="change($event)" [nzLoading]="isLoading">
    <thead>
    <tr>
        <th>编号</th>
        <th>名称</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 nzTable.data">
        <td>{{data.versionNo}}</td>
        <td>{{data.name}}</td>
        <td>{{data.brand}}</td>
        <td>{{data.model}}</td>
        <td>{{data.serialNo}}</td>
        <td>{{data.storageNum}}</td>
        <td>{{data.storeroom}}</td>
        <td>{{data.storageLocation}}</td>
        <td>{{data.installLocation}}</td>
        <td>{{data.receiveNum}}</td>
        <td>{{data.relateFacility}}</td>
        <td class="handle text-center main-color">
            <span (click)="editData(data.id)">编辑</span>
            <span (click)="deleteData(data)">删除</span>
        </td>
    </tr>
    </tbody>
</nz-table>

<!--入库登记-->
<smart-spare-parts #smartSpareParts (done)="change(1)"></smart-spare-parts>
<!--上传文件-->
<smart-upload #smartUpload (done)="change(1)"></smart-upload>
