<!--
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2022-03-30 14:00:43
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-03-31 10:31:40
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\individual-collect\\individual-collect.component.html
 * Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="''"></page-header-wrapper>

<nz-card class="search-box">
  <!-- 搜索表单 -->
  <div nz-row nzGutter="8">
    <div nz-col [nzSpan]="_$expand ? 24 : 18">
      <sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}"
        [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right">
      <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading"
        (click)="search()" acl  [acl-ability]="['TAX-COLLECT-search']">查询</button>
      <button nz-button (click)="resetSF()">重置</button>
      <button nz-button (click)="resetSF()" acl  [acl-ability]="['TAX-COLLECT-export']">导出</button>
      <button nz-button nzType="link" (click)="expandToggle()">
        {{ !_$expand ? '展开' : '收起' }}
        <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
      </button>
    </div>
  </div>
</nz-card>
<nz-card class="content-box">
  <nz-tabset [nzTabBarExtraContent]="extraTemplate" *ngIf="tabs.length > 0">
    <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="selectChange(tab)"> </nz-tab>
  </nz-tabset>
  <!-- 数据列表 -->
  <st #st [scroll]="{ x: '1200px',y:'450px'  }" [data]="service.$api_get_individual_collect_page" [columns]="columns"
    [req]="{ params: reqParams }" [page]="{ }" [loading]="false" (change)="stChange($event)">
  </st>
</nz-card>
<ng-template #extraTemplate>
  <div class="d-flex align-items-center">
    <div class="mr-md">
      已选择
      <strong class="text-red">{{ selectedRows.length }}</strong> 条数据
    </div>
    <button nz-button nzType="primary" (click)="upload()" acl  [acl-ability]="['TAX-COLLECT-report']">申报</button>
    <button nz-button nzType="primary" (click)="recall()" acl  [acl-ability]="['TAX-COLLECT-change']">更正</button>
    <button nz-button nzType="primary" (click)="uploadSetting()" acl  [acl-ability]="['TAX-COLLECT-resetData']">更新数据</button>
  </div>
</ng-template>