<!--
 * @Author: your name
 * @Date: 2021-12-13 10:47:28
 * @LastEditTime : 2022-02-15 13:59:52
 * @LastEditors  : Shiming
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\user\\user.component.html
-->
<!-- 页头 -->
<page-header-wrapper [title]="'员工列表'"></page-header-wrapper>
<nz-card>
  <!-- 搜索区 -->
  <!-- 搜索表单 -->
  <div nz-row nzGutter="8">
    <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
      <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
        [acl-ability]="['USERCENTER-FREIGHT-USER-list']">查询</button>
      <button nz-button nzType="primary" [disabled]="false" (click)="st?.load(1)">导出</button>
      <button nz-button (click)="resetSF()" [disabled]="false">重置</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 [nzSelectedIndex]="1">
    <nz-tab nzTitle="全部" (nzClick)="selectChange(null)"></nz-tab>
    <nz-tab nzTitle="待审核" (nzClick)="selectChange(0)"></nz-tab>
    <nz-tab nzTitle="已成功" (nzClick)="selectChange(1)"></nz-tab>
    <nz-tab nzTitle="已驳回" (nzClick)="selectChange(2)"></nz-tab>
  </nz-tabset>
  <!-- 数据列表 -->
  <!-- [data]="service.$api_get_supplier_page" -->

  <st #st [columns]="columns" [data]='service.$api_get_user_list' [req]="{ process: beforeReq }"
    [scroll]="{ x:'1200px',y: '400px' }" [page]="{  }" [loading]="service.http.loading">
    <ng-template st-row="enterpriseName" let-item let-index="index">
      <div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
        <div
          style="display: inline-block; max-width: 280px; margin: 0 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis">
          {{ item.enterpriseName }}
        </div>
      </div>
    </ng-template>
    <ng-template st-row="promotersTelephone" let-item let-index="index">
      <a (click)="addPromoter(item)" acl [acl-ability]="['USERCENTER-FREIGHT-USER-promoter']">
        {{ item.promotersTelephone || '添加' }}
      </a>
    </ng-template>
  </st>

</nz-card>

<ng-template #promoterModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="80">
      <se [col]="1" label="手机号">
        <input nz-input [(ngModel)]="promotersTelephone" maxlength="11" required />
      </se>
    </div>
  </div>
</ng-template>