<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>
  </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="2">

  </div>
  <div nz-col nzSpan="2">

  </div>
  <div nz-col nzSpan="3">
    <nz-select nzAllowClear style="width: 100%;" [(ngModel)]="obj.source" nzPlaceHolder="事件来源">
      <nz-option nzLabel="系统警告" nzValue="0"></nz-option>
      <nz-option nzLabel="手动新增" nzValue="1"></nz-option>
    </nz-select>
  </div>
  <div nz-col nzSpan="8">
    <nz-date-picker
            [nzFormat]="timeFormat"
            [(ngModel)]="startTime"
            nzPlaceHolder="开始时间"></nz-date-picker>
    <nz-date-picker
            [nzFormat]="timeFormat"
            [(ngModel)]="endTime"
            nzPlaceHolder="结束时间"></nz-date-picker>
  </div>
  <div nz-col nzSpan="4">
    <input type="text" nz-input [(ngModel)]="obj.searchStr" placeholder="填报人">
  </div>
  <div nz-col nzSpan="2">
    <button (click)="search()" nz-button nzType="default"><i class="anticon anticon-search" style="color: #6097b7"></i>搜索</button>
  </div>
</div>

<nz-table #nzTable [nzData]="recordList" [nzLoading]="isLoading" [nzFrontPagination]="false"
          [nzTotal]="totalNum" [nzPageIndex]="pageNum" [nzPageSize]="pageCount"
          (nzPageIndexChange)="change($event)">
  <thead>
  <tr>
    <th>费用名称</th>
    <th>填报时间</th>
    <th>填报人</th>
    <th>费用说明</th>
    <th>总费用</th>
    <th>备件采购</th>
    <th nzWidth="15%">委外费用</th>
    <th>其他费用</th>
    <th style="text-align: center">操作</th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let data of nzTable.data">
    <td class="round-tag tag-form">{{data.name}}</td>
    <td>{{data.time | date:'yyyy-MM-dd HH:mm:ss'}}</td>
    <td>{{data.people}}</td>
    <td>{{data.costdescribe}}</td>
    <td>{{data.total}}</td>
    <td>{{data.outsourcingmoney}}</td>
    <td>{{data.othermoney}}</td>
    <td>{{data.othermoney}}</td>
    <td class="handle text-center main-color">
      <span *ngIf="data.status == 1" (click)="lookRecord(data)">查看</span>
    </td>
  </tr>
  </tbody>
</nz-table>
<!--转派-->
<smart-transfor #smartTransfor (done)="getList()"></smart-transfor>
<!--新增事件-->
<smart-event #smartEvent (done)="getList()"></smart-event>
