<!--
 * @Description  : 
 * @Version      : 1.0
 * @Author       : Shiming
 * @Date         : 2021-12-01 14:58:57
 * @LastEditors  : Shiming
 * @LastEditTime : 2022-01-18 17:25:47
 * @FilePath     : \\tms-obc-web\\src\\app\\routes\\supply-goods\\components\\large-amount\\large-amount.component.html
 * Copyright (C) 2022 huzhenhong. All rights reserved.
-->

<nz-card>
  <!-- 搜索区 -->
  <!-- 搜索表单 -->
  <div nz-row nzGutter="8">
    <!-- 查询字段小于或等于3个时，不显示伸缩按钮 -->
    <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
      <sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" (formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
    </div>
    <!-- [loading]="false" -->

    <!-- 查询字段大于3个时，根据展开状态调整布局 -->
    <ng-container *ngIf="queryFieldCount > 4">
      <div nz-col [nzSpan]="_$expand ? 24 : 18">
        <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
      </div>
      <div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
        <button nz-button nzType="primary" [disabled]="!sf.valid" (click)="st?.load(1)">查询</button>
        <button nz-button (click)="resetSF()">重置</button>
        <button nz-button nzType="link" (click)="expandToggle()">
          {{ !_$expand ? '展开' : '收起' }}
          <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
        </button>
      </div>
    </ng-container>
  </div>
</nz-card>
<nz-card>
  <!-- <div class="actionAreaWrap">
    <button nz-button (click)="orderExport()" nzType="primary">导入货源</button>
  </div> -->
  <nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" class="table" [nzSelectedIndex]="nzSelectedIndex">
    <nz-tab *ngFor="let tab of tabs; let i = index" [nzTitle]="tab" (nzClick)="tabChange(i)">
      <nz-table
        #nzTable
        [nzData]="listData"
        nzTableLayout="fixed"
        [nzLoading]="loading"
        [nzTotal]="total"
        [nzBordered]="true"
        [nzScroll]="{ x: '1400px' }"
        [nzFrontPagination]="false"
        [nzPageSize]="pageSize"
        [nzPageIndex]="pageIndex"
        (nzPageIndexChange)="changePageIndex($event)"
        [nzShowTotal]="totalTemplate"
        [nzShowSizeChanger]="true"
        (nzPageSizeChange)="changePageSize($event)"
        [nzPageSizeOptions]="[10, 20, 30, 50, 100, 200, 300, 500, 1000]"
      >
        <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
        <thead>
          <tr>
            <th nzAlign="center" nzWidth="100px">货源编号</th>
            <th nzWidth="100px" nzAlign="center">货源类型</th>
            <th nzWidth="100px" nzAlign="center">货主</th>
            <th nzWidth="100px" nzAlign="center">项目名称</th>
            <th nzWidth="100px" nzAlign="center">关联运单</th>
            <th nzWidth="100px" nzAlign="center">货物信息</th>
            <th nzWidth="100px" nzAlign="center">装货地</th>
            <th nzWidth="100px" nzAlign="center">卸货地</th>
            <th nzWidth="100px" nzAlign="center">用车需求</th>
            <th nzWidth="100px" nzAlign="center">运费单价</th>
            <th nzWidth="160px" nzAlign="center">结算重量</th>
            <th nzWidth="160px" nzAlign="center">录单员</th>
            <th nzWidth="160px" nzAlign="center">调度员</th>
            <th nzWidth="160px" nzAlign="center">货源状态</th>
            <th nzWidth="160px" nzAlign="center">截止时间</th>
            <th nzWidth="160px" nzAlign="center">创建时间</th>
            <th nzWidth="120px" nzAlign="center">审核状态</th>
            <th nzWidth="120px" nzAlign="center">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of nzTable.data">
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              {{ data.id3 }}
            </td>
            <td>
              <div><span style="color: #52c41a">●</span>已接单</div>
              <div><span>●</span>已取消</div>
              <div><span style="color: #f59a23">●</span>待接单</div>
            </td>
            <td>
              {{ data.id3 }}
            </td>

            <td>
              {{ data.id3 }}
            </td>
            <td>
              <div>
                <div><span style="color: #52c41a">●</span>审核通过</div>
                <div><span style="color: #d9001b">●</span>不通过</div>
                <div><span style="color: #f59a23">●</span>待审核</div>
                <!-- <span>待审核</span> -->
              </div>
            </td>
            <td>
              <div>
                <a nz-button nzType="link" (click)="showApply()">货源审核</a>
                <a nz-button nzType="link" (click)="showApply()">修改运费</a>
                <!-- <a  nz-button nzType="link" nzDanger (click)="showApply()">指派熟车</a> -->
                <a nz-button nzType="link" nzDanger (click)="showApply()">修改单价</a>
              </div>
            </td>
          </tr>
        </tbody>
      </nz-table>
    </nz-tab>
  </nz-tabset>
</nz-card>
