<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 nzWidth="10%">备件名称</th>
        <th>所属类型</th>
        <th>归属项目</th>
        <th>序列号</th>
        <th>入库数量</th>
        <th>存放库房</th>
        <th>存放位置</th>
        <th>安装地点</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of nzTable.data">
        <td>{{data.inventoryNo}}</td>
        <td>{{data.inventoryName}}</td>
        <td>{{data.inventoryType}}</td>
        <td>{{data.belongObject}}</td>
        <td>{{data.serialNo}}</td>
        <td>{{data.storageNum}}</td>
        <td>{{data.storeroom}}</td>
        <td>{{data.storageLocation}}</td>
        <td>{{data.installLocation}}</td>
        <td class="handle main-color">
            <span (click)="editData(data.id)">编辑</span>
            <span class="handle-delete" (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>
