<!-- 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="6">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8">用户手机号</nz-form-label>
                    <nz-form-control [nzSpan]="14">
                        <input nz-input formControlName="userPhone" />
                    </nz-form-control>
                </nz-form-item>
            </div>

            <div nz-col nzSpan="6">
                <nz-form-item>
                    <nz-form-label [nzSpan]="8">中奖名称</nz-form-label>
                    <nz-form-control [nzSpan]="14">
                        <input nz-input formControlName="awardName" />
                    </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" nz-row>
    <div  style="margin-top: 20px;" nz-col nzSpan="6" *ngFor="let item of numData" (click)="getAdd(item.id)">
        <nz-card nzHoverable style="width:240px">
            <P>{{item.name}}</P>
            <P>总数：{{item.num}}</P>
            <P>剩余数量：{{item.ext3}}</P>
        </nz-card>
    </div>

</div>

<div class="inner-content">
    <span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>

    <div class="operating-button"></div>

    <!--数组表格 -->
    <nz-table #basicTable
              [nzData]="dataObject.list"
              [nzTotal]="dataObject.total"
              [nzFrontPagination]="false"
              [nzLoading]="tableLoading"
              [nzPageIndex]="whereObject.pageNum"
              (nzPageIndexChange)="requestData($event)"
              [nzScroll]="{ x: '1150px'}">
        <thead>
        <tr>
            <th nzWidth="150px">用户手机号</th>
            <th nzWidth="150px">用户昵称</th>
            <th nzWidth="200px">中奖名称</th>
            <th nzWidth="200px">中奖时间</th>
<!--            <th nzWidth="80px" nzRight="0px">操作</th>-->
        </tr>
        </thead>
        <tbody>
        <tr *ngFor="let data of basicTable.data;let i = index">
            <td>{{data.userPhone}}</td>
            <td>{{data.userName}}</td>
            <td>{{data.awardName}}</td>
            <td>{{data.winLotteryTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<!--            <td nzRight="0px" class="table-td-operation">
                <a [routerLink]="['/admin/audit/pendingApprovedDetail']" [queryParams]="{id: data.id, entrance: 2, classId: data.classId, classType: data.classType, applyType: data.applyType,applyId:data.applyId}">详情</a>
            </td>-->
        </tr>
        </tbody>
    </nz-table>
</div>


<nz-modal [(nzVisible)]="isVisible" nzTitle="新增数量" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
    <div nz-row>
        <div nz-col nzSpan="20">
            <nz-form-item>
                <nz-form-label [nzSpan]="6">新增数量</nz-form-label>
                <nz-form-control [nzSpan]="16">
                    <input nz-input [(ngModel)]="num"/>
                </nz-form-control>
            </nz-form-item>
        </div>
    </div>
</nz-modal>