<!-- start 面包屑 -->
<nz-breadcrumb [nzAutoGenerate]="true" [nzRouteLabel]="'customBreadcrumb'"></nz-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
  <nz-tabset [(nzSelectedIndex)]="selectedIndex">
    <nz-tab nzTitle="奖池详情">
      <nz-descriptions *ngIf="prizePoolDetailsObject.rebateReward" nzBordered [nzColumn]="{ xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
        <nz-descriptions-item nzTitle="奖池编号">{{prizePoolDetailsObject.rebateReward.batchIdentifier }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="奖池金额">{{prizePoolDetailsObject.rebateReward.amount }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="参与商家数量">{{prizePoolDetailsObject.rebateReward.partMerNum }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="参与交易金额">{{prizePoolDetailsObject.rebateReward.partTradeAmount }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="活动金比例(%)">{{prizePoolDetailsObject.rebateReward.ratio }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="状态">{{prizePoolDetailsObject.rebateReward.status | activityMoneyStatus }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="奖池开始时间">{{prizePoolDetailsObject.rebateReward.timeStart | date : 'yyyy-MM-dd HH:mm:ss' }}</nz-descriptions-item>
        <nz-descriptions-item nzTitle="奖池结束时间">{{prizePoolDetailsObject.rebateReward.timeEnd | date : 'yyyy-MM-dd HH:mm:ss' }}</nz-descriptions-item>
      </nz-descriptions>
    </nz-tab>
    <nz-tab nzTitle="奖池名单">
      <div class="btr">
        <button nz-button nzType="primary" (click)="exportTradeOrder(batchIdentifier) ">
          <i nz-icon nzType="upload" nzTheme="outline"></i>
          导出
        </button>
      </div>
      <nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
        <nz-table
          #basicTable2
          [nzData]="prizePoolDetailsObject.rebateRewardRoster || [] "
          [nzScroll]="{ x: '1350px'}"
          [nzPageSize]="10"
        >
          <thead>
          <tr>
            <th nzWidth="150px">奖池编号</th>
            <th nzWidth="150px">业务员名称</th>
            <th nzWidth="180px">商户号</th>
            <th nzWidth="180px">商户名称</th>
            <th nzWidth="150px">商户简称</th>
            <th nzWidth="150px">商户账户</th>
            <th nzWidth="150px">奖池占比(%)</th>
            <th nzWidth="150px">返利金额</th>
            <th nzWidth="150px" nzRight="0px">状态</th>
          </tr>
          </thead>
          <tbody>
          <tr *ngFor="let data of basicTable2.data">
            <td>{{data.batchIdentifier}}</td>
            <td>{{data.salesmanName}}</td>
            <td>{{data.merNo}}</td>
            <td>{{data.merName}}</td>
            <td>{{data.merAbbreviate}}</td>
            <td>{{data.merAccountNumber}}</td>
            <td>{{data.rewardRatio}}</td>
            <td>{{data.amount}}</td>
            <td nzRight="0px" class="table-td-operation">{{data.status | activityMoneyStatus}}</td>
          </tr>
          </tbody>
        </nz-table>
      </nz-spin>
    </nz-tab>
  </nz-tabset>

</div>
