<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->

<div class="inner-content">
  <form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
    <div nz-row>
      <div nz-col nzSpan="8" >
        <nz-form-item>
          <nz-form-label [nzSpan]="8">奖池编号</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <input nz-input formControlName="batchIdentifier" />
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col nzSpan="8">
        <nz-form-item>
          <nz-form-label [nzSpan]="8">奖池状态</nz-form-label>
          <nz-form-control [nzSpan]="14">
            <nz-select nzAllowClear formControlName="status">
              <!-- <nz-option nzLabel="不可用" nzValue="0"></nz-option> -->
              <nz-option nzLabel="未发放" nzValue="1"></nz-option>
              <nz-option nzLabel="已发放" nzValue="2"></nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
      </div>


    </div>

    <div nz-row>
      <div nz-col nzSpan="24" class="search-button">
        <button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
        <button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
      </div>
    </div>
  </form>
</div>


<div class="inner-content">
  <span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
  <!-- <div class="operating-button">
      <button nz-button nzType="primary" class="right-btn" (click)="exportTradeOrder()" >导出交易</button>
  </div> -->
  <!--数组表格 -->
  <nz-table #basicTable
            [nzData]="dataObject.list"
            [nzTotal]="dataObject.total"
            [nzFrontPagination]="false"
            [nzLoading]="tableLoading"
            [nzPageIndex]="whereObject.pageNum"
            [nzPageSize]="whereObject.pageSize"
            (nzPageIndexChange)="requestData($event)"
            [nzScroll]="{ x: '1150px'}">
    <thead>
    <tr>
      <th nzWidth="180px">奖池编号</th>
      <th nzWidth="150px">奖池金额</th>
      <th nzWidth="150px">参与商家数量</th>
      <th nzWidth="150px">参与交易金额</th>
      <th nzWidth="150px">活动金比例(%)</th>
      <th nzWidth="100px">状态</th>
      <th nzWidth="200px">奖池开始时间</th>
      <th nzWidth="200px">奖池结束时间</th>

      <th nzWidth="150px" nzRight="0px">操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of basicTable.data;let i = index">
      <td>{{data.batchIdentifier}}</td>
      <td>{{data.amount}}</td>
      <td>{{data.partMerNum}}</td>
      <td>{{data.partTradeAmount}}</td>
      <td>{{data.ratio}}</td>
      <td>{{data.status | activityMoneyStatus}}</td>
      <td>{{data.timeStart | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
      <td>{{data.timeEnd | date : 'yyyy-MM-dd HH:mm:ss'}}</td>

      <td nzRight="0px" class="table-td-operation">
        <a [routerLink]="['/admin/activity-money/prize-pool-detail']" [queryParams]="{batchIdentifier: data.batchIdentifier}">详情</a>
        <nz-divider *ngIf="data.status==1" nzType="vertical"></nz-divider>
        <a *ngIf="data.status==1" (click)="disbursementAmount(data.batchIdentifier)">发放</a>
      </td>
    </tr>
    </tbody>
  </nz-table>
</div>

