<div>
  <div nz-row>
    <div nz-col nzSpan="18">
      <sf #sf [schema]="schema" mode="search" [ui]="ui" [compact]="true" (formSubmit)="st.load(1)"
        (formReset)="reset()"></sf>
    </div>
    <!-- <div nz-col nzSpan="6">
      <button nz-button nzType="primary" style="margin-bottom: 24px" (click)="addDriver()"><i nz-icon
          nzType="plus"></i>添加司机</button>
    </div> -->
  </div>

  <div>
    <st #st [data]="service.$api_get_practice_car_list"
      [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
      [columns]="columns" [res]="{ reName: { list: 'data.records', total: 'data.total' },process:dataProcess }"
      [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
      (change)="changeSt($event)">
      <ng-template st-row="carId" let-item let-index="index">
        <nz-select [(ngModel)]="item.carId" style="width: 280px;">
          <nz-option [nzValue]="''" nzLabel="不限"></nz-option>
          <nz-option [nzValue]="car.carId" [nzLabel]="car.carNo"
            *ngFor="let car of item.userCarLicenseDesensitizationVOList" [nzCustomContent]="true">
            <span>{{car.carNo}} -</span>
            <span>{{car.carLength}}米,{{car.carLoad}}吨 -</span>
            <span *ngIf="car?.approvalStatus === 20 && !car.carStatus " class="text-success-dark">空闲</span>
            <span *ngIf="car?.approvalStatus === 20 && car.carStatus " class="text-warning-dark">在途</span>
            <span *ngIf="car?.approvalStatus !== 20" class="text-red-dark">未认证</span>
            <!-- <span [ngClass]="cardBADGE[car.carStatus]?.color">{{cardBADGE[car.carStatus]?.text}}</span> -->
          </nz-option>
        </nz-select>
      </ng-template>
      <ng-template st-row="carCaptain" let-item let-index>
        <span>{{item.captainName}} {{item.captainPhone}}</span>
        <a (click)="verifyCanSetCarCaptain(item)">设置</a>
      </ng-template>
      <ng-template st-row="driverStatus" let-item let-index>
        <span *ngIf="item?.certificationStatus === 1 && item.driverStatus === 0" class="text-success-dark">空闲</span>
        <span *ngIf="item?.certificationStatus === 1 && item.driverStatus === 1" class="text-warning-dark">在途</span>
        <span *ngIf="item?.certificationStatus !== 1" class="text-red-dark">未认证</span>
      </ng-template>
    </st>
  </div>
  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">关闭</button>
    <button nz-button type="submit" nzType="primary" (click)="verifyVechicleStatus(params)" [disabled]="!selectedRows"
      [nzLoading]="service.http.loading">发布并指派给司机</button>
  </div>
</div>
