<page-header-wrapper [title]="''" [logo]="logo">
  <ng-template #logo>
    <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
      <i nz-icon nzType="left" nzTheme="outline"></i>
    </button>
  </ng-template>
</page-header-wrapper>
<nz-card>
  <div nz-row>
    <div nz-col nzSpan="6">
      <sv-container class="bdr">
        <sv label="货源编号" col="1">{{ dataList?.resourceCode }}</sv>
        <sv-title class="text-center text-lg">
          <span *ngIf="dataList?.resourceType === 1">待接单</span>
          <span *ngIf="dataList?.resourceType === 2">已接单</span>
          <span *ngIf="dataList?.resourceType === 3">已取消</span>
        </sv-title>
        <sv-title>
          <div class="">
            <a class="btn-size" (click)="modification()">修改单价</a>
            <a class="btn-size m-lg mr-lg">取消货源</a>
            <a class="btn-size" (click)="nextOrder()">再下一单</a>
          </div>
        </sv-title>
      </sv-container>
    </div>
    <div nz-col nzSpan="16" class="approval-status">
      <nz-steps style="width: 80%; margin: 0 auto" [nzLabelPlacement]="'vertical'">
        <nz-step nzStatus="finish" nzIcon="user" [nzDescription]="i?.createAt" nzTitle="下单"></nz-step>
        <nz-step nzStatus="finish" nzIcon="user" nzTitle="完结"></nz-step>
      </nz-steps>
    </div>
  </div>
  <nz-divider></nz-divider>
  <div sv-container >
    <sv label="项目名称">{{ dataList?.enterpriseProjectId }}</sv>
    <sv label="外部货源号">{{ dataList?.externalResourceCode }}</sv>
    <sv label="录单员">{{ dataList?.enterpriseProjectId }}</sv>
    <sv label="调度员">{{ dataList?.dispatchName }}</sv>
  </div>
  <nz-divider></nz-divider>
  <div nz-row>
    <div nz-col nzSpan="6">
      <div class="source-info">
        <div *ngFor="let item of dataList?.unLoadingPlaceList; let i = index">
          <h3 *ngIf="i === 0" style="font-weight: 700;">装卸货信息</h3>
          <div *ngIf="item?.type === 1">
            <p>装货地：{{item?.detailedAddress}}</p>
             <p>联系人：{{item?.appUserName}}/{{item?.contractTelephone}}</p>
          <p>发货日期：{{item?.createTime}}</p>
          </div>
          <div *ngIf="item.type === 2">
          <p>卸货地：{{item?.detailedAddress}}</p>
          <p>联系人：{{item?.appUserName}}/{{item?.contractTelephone}}</p>
          <p>卸货日期：{{item?.modifyTime}}</p>
        </div>
        </div>
      </div>
    </div>
    <div nz-col nzSpan="5">
      <div class="source-info bdr bdl pl-md">
        <h3 style="font-weight: 700;">货物信息</h3>
        <div *ngFor="let item of dataList?.goodsInfoList; let i = index">
        <p>货物名称：{{item?.goodsName}}</p>
        <p>货物数量：{{item?.weight}}吨/{{item?.volume}}立方</p>
        <p>剩余：{{item?.weight}}吨/{{item?.volume}}立方</p>
        <p>用车需求：{{item?.vehicleDemand}}</p>
        </div>
      </div>
    </div>
    <div nz-col nzSpan="5">
      <div class="source-info bdr pl-md">
        <h3 style="font-weight: 700;">承运信息</h3>
        <p>网络货运人：{{dataList?.carrierInformationVO?.enterpriseInfoName}}</p>
        <p>服务类型：{{dataList?.carrierInformationVO?.serviceType === 1 ? '抢单' : '指派'}}</p>
        <p><a href="javascript:;" (click)="NowAssign()">当前指派</a></p>
      </div>
    </div>
    <div nz-col nzSpan="5">
      <div class="source-info bdr pl-md">
        <h3 style="font-weight: 700;">关联运单</h3>
        <p>待发车 ({{dataList?.goodsInfoList?.goodsName}})</p>
        <p>运输中 ({{dataList?.goodsInfoList?.goodsName}})</p>
        <p>待签收 ({{dataList?.goodsInfoList?.goodsName}})</p>
        <p>已完成 ({{dataList?.goodsInfoList?.goodsName}})</p>
        <p>已取消 ({{dataList?.goodsInfoList?.goodsName}})</p>
      </div>
    </div>
    <div class="source-info pl-md">
      <h3 style="font-weight: 700;">补充信息</h3>
      <p>备注：{{dataList?.supplementaryInformationVO?.remarks}}</p>
    </div>
  </div>
  <nz-divider></nz-divider>
  <div nz-row>
    <div class="freight-info-box">
      <h3 style="font-weight: 700;">运费信息</h3>
      <div class="text-right">
        <p style="color: #f9b523;">到货后15天内支付运费</p>
        <p>以发货为准，保留小数</p>
       
      </div>
    </div>
    <nz-divider></nz-divider>
    <div class="freight-info-box" nz-row>
      <div nz-col nzSpan="24">
        <h3 class="text-right"><label>单价 :</label> <span class="text-error-dark text-xl" style="color: red;">{{dataList?.freightPrice }}</span>元/吨</h3>
      </div>

    </div>
  </div>
  <nz-divider></nz-divider>
  <div nz-row>
    <nz-card nzTitle="操作日志" style="width: 100%;">
      <st #st [data]="i?.auditRecordList" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }">
      </st>
    </nz-card>
  </div>
</nz-card>

<nz-modal [(nzVisible)]="isVisibleView"  [nzWidth]="600" [nzFooter]="nzModalFooterview" nzTitle="当前指派" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
  <ng-container *nzModalContent>
    <st
    #stFloatView
    [data]="i?.auditRecordList"
    [columns]="columnsFloatView"
    [page]="{ show: false, showSize: false }"
  >
  </st>
  </ng-container>
  <ng-template #nzModalFooterview>
    <button nz-button nzType="default" (click)="handleCancel()">取消</button>
  </ng-template>
</nz-modal>