<!-- 标本 -->
<div class="detail" *ngIf="!maskFlag">
  <div class="title">工单信息<i class="icon_transport transport-guanbi" (click)="close()"></i></div>
  <overlay-scrollbars #osComponentRef1 style="height: 90%; flex: 1">
    <div class="content">
      <div class="top" *ngIf="amplificationShow">
        <div class="num">
          <span class="left">单号：{{orderInfo.gdcode}}</span>
          <span class="right">{{orderInfo.gdState.name}}</span>
        </div>
        <div class="info" nz-row>
          <div nz-col nzSpan="8">工单日期：{{orderInfo.startTime}}</div>
          <div nz-col nzSpan="8">总耗时：{{orderInfo.showTimeNum}}</div>
          <div nz-col nzSpan="8">申请类型：{{orderInfo.taskType.taskName}}<ng-container *ngIf="orderInfo.goodsRemark">-{{orderInfo.goodsRemark}}</ng-container></div>
          <div nz-col nzSpan="8">
            申请科室：{{orderInfo.createDeptDTO?(!showCoop&&deptDisplay==2?orderInfo.createDeptDTO.deptalias:orderInfo.createDeptDTO.dept):'-'}}
          </div>
          <div nz-col nzSpan="8">起点科室：{{orderInfo.startDept?(!showCoop&&deptDisplay==2?orderInfo.startDept.deptalias:orderInfo.startDept.dept):''}}</div>
          <div nz-col nzSpan="8">目标科室：{{endDepts}}</div>
          <div nz-col nzSpan="8" *ngIf="orderInfo.worker">配送人员信息：{{orderInfo.worker.name}}</div>
          <div nz-col nzSpan="8">预计接收：{{orderInfo.expectReceiveNum?orderInfo.expectReceiveNum:''}}</div>
          <div nz-col nzSpan="8">实际接收：{{orderInfo.actualReceiveNum?orderInfo.actualReceiveNum:''}}</div>
          <div nz-col nzSpan="24" *ngIf="orderInfo.workOrderRemark">备注信息：{{orderInfo.workOrderRemark}}
          </div>
          <div nz-col nzSpan="24" *ngIf="orderInfo.specialCloseReason">
            特殊情况关闭原因：{{orderInfo.specialCloseReason}}
          </div>
        </div>
      </div>
      <div class="center" *ngIf="amplificationShow">
        <div class="box display_flex justify-content_flex-center">
          <div class="steps" *ngFor="let step of logList;let i=index;">
            <div class="step">
              <div class="info">
                <i
                  [ngClass]="{'icon_transport':true, 'transport-icon_liucheng':true,'green':(step.record&&step.record[0]&&step.record[0].operationTime)}"></i>
                <p>{{step.operationName}}</p>
                <p>{{step.record.length>=1?(step.record[0].operationTime|date:'MM-dd HH:mm'):''}}</p>
                <p *ngIf="step.record[0]&&step.record[0].dept">
                  <span *ngFor="let dept of step.record">{{!showCoop&&deptDisplay==2?dept.deptalias:dept.dept}},</span>
                </p>
                <p *ngIf="i!=0&&step.record&&step.record.length">耗时{{filterTime(step.record)}}</p>
              </div>
              <div class="line"></div>
            </div>
          </div>
        </div>
      </div>
      <div class="bottom">
        <div class="urgent">
          <div>
            <ng-container *ngIf="amplificationShow&&orderInfo.urgentDetails&&showCoop">
                加急原因：{{orderInfo.urgentDetails.urgentReason}}
              <button *ngIf="orderInfo.urgentDetails.checkStatus.id==329" class=" btn default" nz-button nzType="primary"
                [nzLoading]="urgentLoading" nzGhost (click)="urgent()">确认加急</button>
            </ng-container>
          </div>
        </div>
      </div>
    </div>
  </overlay-scrollbars>
  <div class="btns display_flex justify-content_flex-center align-items_center">
    <!-- <button *ngIf="showCoop&&orderInfo.gdState.value==2" nz-button nzType="primary" (click)='allotWorker()'>派单</button>
    <button *ngIf="showCoop&&(orderInfo.gdState.value==3||orderInfo.gdState.value==4)" nz-button nzType="primary" nzGhost
      (click)="openRecallModal()">撤回</button>
    <button *ngIf="showCoop&&(orderInfo.gdState.value==2||orderInfo.gdState.value==3||orderInfo.gdState.value==4)" nz-button
      nzType="danger" (click)="openDelModal()">删除</button> -->
    <button class="btn default" nz-button nzType="default" (click)="viewDetail(orderInfo, 'specimen')">
      业务数据
    </button>
    <button class=" btn cancel" nz-button nzType="default" (click)="close()">取消</button>
  </div>
</div>
<!-- 撤回工单 -->
<div class="recallOrder display_flex justify-content_flex-center align-items_center" *ngIf="recallOrderShow">
  <div class="modalBody">
    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeRecallOrderModal()"></i></div>
    <div class="content">
      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
      <div class="defeat">您确认要撤回此工单吗？</div>
    </div>
    <div class="btns display_flex justify-content_flex-center align-items_center">
      <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmRec()">确认</button>
      <button nz-button nzType="primary" [nzLoading]='recLoading' nzGhost (click)="recAndDel()">撤回并删除</button>
      <button class=" btn cancel" nz-button nzType="default" (click)="closeRecallOrderModal()">关闭</button>
    </div>
  </div>
</div>

<!-- 删除工单 -->
<div class="recallOrder display_flex justify-content_flex-center align-items_center delModel" *ngIf="delOrderShow">
  <div class="modalBody">
    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="closeDelOrderModal()"></i></div>
    <div class="content">
      <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
      <div class="defeat">您确认要删除此工单吗？</div>
    </div>
    <div class="btns display_flex justify-content_flex-center">
      <button nz-button nzType="primary" [nzLoading]='btnLoading' (click)="confirmDel()">确认</button>
      <!-- <button class="candelBtn btn display_flex justify-content_flex-center" nz-button nzType="primary" nzGhost>撤回并删除</button> -->
      <button class=" btn cancel" nz-button nzType="default" (click)="closeDelOrderModal()">取消</button>
    </div>
  </div>
</div>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" (closeModel)="close()">
  <!-- 2.父组件调用子组件时绑定到这个事件属性，并在事件发生时作出回应。(closeModel)="close()" -->
</app-prompt-modal>

<!-- 业务数据查看 -->
<app-businessData-detail-modal
  *ngIf="businessDataModalShow"
  [show]="businessDataModalShow"
  [type]="businessDataModalType"
  [orderId]="orderId"
  (closeModelHs)="closeModelBlood($event)"
></app-businessData-detail-modal>


<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>
