<!--
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2022-01-12 10:52:50
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-02-15 13:35:46
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\usercenter\\components\\freight\\enterprise-audit\\enterprise-audit.component.html
 * Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<page-header-wrapper [title]="'企业审核列表'" [content]="content">
  <ng-template #content>
    <nz-tabset class="tabs-wrap">
      <nz-tab *ngFor="let tab of tabs" [nzTitle]="tab.name" (nzSelect)="changeTab(tab)"> </nz-tab>
    </nz-tabset>
  </ng-template>
</page-header-wrapper>
<nz-card class="mb-md">
  <!-- 搜索表单 -->
  <div nz-row nzGutter="8">
    <div nz-col [nzXl]="_$expand ? 24 : 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
      <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
    </div>
    <div nz-col [nzXl]="_$expand ? 24 : 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right"
      [class.expend-options]="_$expand">
      <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
        [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-list']">查询</button>
      <button *ngIf="tabType == 1" nz-button nzType="primary" [disabled]="false" (click)="exportList()"
        acl [acl-ability]="['USERCENTER-FREIGHT-ENTERPRISE-export']">导出</button>
      <button nz-button (click)="resetSF()" [disabled]="false">重置</button>
      <button nz-button nzType="link" (click)="expandToggle(!_$expand)">
        {{ !_$expand ? '展开' : '收起' }}
        <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
      </button>
    </div>
  </div>
</nz-card>

<nz-card>
  <!-- 数据列表 -->
  <st #st multiSort [data]="service.$api_get_freight_list" [columns]="tabType===1?enterColumns:adminColumns"
    [req]="{  process: beforeReq }" [page]=" {}" [loading]="false" [scroll]="{ x: '1200px' }">
    <ng-template st-row="approvalStatus" let-item let-index="index">
      <ng-container [ngSwitch]="item.approvalStatus">
        <nz-badge *ngSwitchCase="10" nzColor="#108ee9" nzText="待审核"></nz-badge>
        <nz-badge *ngSwitchCase="15" nzColor="gold" nzText="已撤销"></nz-badge>
        <nz-badge *ngSwitchCase="20" nzColor="#87d068" nzText="已成功"></nz-badge>
        <ng-container *ngSwitchCase="30">
          <nz-badge nzColor="volcano" nzText="已驳回"></nz-badge><br>
          <label style="color: #ff4d4f;">（驳回原因：{{item.approvalOpinion}}）</label>
        </ng-container>

        <p *ngSwitchDefault></p>
      </ng-container>
    </ng-template>
  </st>
</nz-card>

<ng-template #approvedModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="120">
      <se [col]="1" label="公司名称">
        {{ detailData?.enterpriseName }}
      </se>
      <se [col]="1" label="网络货运人" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="networkTransporter">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of ltdId"></nz-option>
        </nz-select>
      </se>
      <se [col]="1" label="企业角色" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="roleId">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of roles"></nz-option>
        </nz-select>
      </se>
      <se [col]="1" label="客服人员" required>
        <nz-select nzPlaceHolder="请选择" [(ngModel)]="customerServiceId">
          <nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of customerServices"></nz-option>
        </nz-select>
      </se>
    </div>
  </div>
</ng-template>

<ng-template #redectModal>
  <div nz-row nzGutter="8">
    <div nz-col nzSpan="24" se-container [labelWidth]="120">
      <se [col]="1" label="公司名称">
        {{ detailData?.enterpriseName }}
      </se>
      <se [col]="1" label="备注" required>
        <textarea nz-input rows="3" style="width: 325px;margin-left: 14px;" [(ngModel)]="approvalOpinion"></textarea>
      </se>
    </div>
  </div>
</ng-template>