<div class="pharmacy">
  <!-- 头部 start -->
  <div class="pharmacy-header">
    <div class="pharmacy-logo display_flex align-items_center justify-content_flex-center flex-direction_column" style="line-height: normal;height:100%;">
      <img [src]="tool.logoUrl" class="pharmacy-logo__img">
      <h1 class="pharmacy-logo__name">{{tool.logoTitle}}</h1>
    </div>
    <div class="pharmacy-name">
      <h2 class="pharmacy-name__title">药房</h2>
    </div>
    <div class="userInfo">
      <div class="wel">欢迎您：</div>
      <div class="user">
        <img src="../../assets/images/icon_keshi.png" alt="" />
        <span *ngIf="deptDisplay" [title]="deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept">{{deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept}}</span>
      </div>
      <div class="userInfo-wrap">
        <div class="logOut" (click)="changeKsNow()">切换科室</div>
        <div class="logOut" (click)="logOut()">退出</div>
      </div>
    </div>
  </div>
  <!-- 头部 end -->
  <!-- 主体部分 start -->
  <div class="pharmacy-main">
    <!-- 待配药 start -->
    <div class="pharmacy-main__list pharmacy-main__print">
      <!-- 标题 start -->
      <div class="pharmacy-main__title">
        <strong>待配药</strong>
        <!-- <button nz-button class="pharmacy-main__printAll" (click)="print()"
          [disabled]="printPharmacyList.length===0">批量打印</button> -->
        <span class="autoUpdate">{{ logTime }}秒后自动刷新</span>
      </div>
      <!-- 标题 end -->
      <!-- 搜索框 start -->
      <div class="pharmacy-main__search">
        <div class="pharmacy-main__searchInput">
          <input nz-input placeholder="请输入关键字" [(ngModel)]="printPharmacySearchKey" />
          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(1)">
            <i nz-icon nzType="search"></i>
            <span>搜索</span>
          </div>
        </div>
      </div>
      <!-- 搜索框 end -->
      <!-- 列表 start -->
      <overlay-scrollbars #osComponentRef1 class="pharmacy-main__selectionWrap">
        <div *ngIf="!loading1" style="height: 100%;">
          <div class="pharmacy-main__selection" *ngFor="let item of printPharmacyList">
            <div class="pharmacy-main__selectionInfo">
              <div class="pharmacy-main__selectionItem">
                <strong>{{item.target?item.target.dept:''}}（{{item.packid}}）</strong>
                <span>{{item.drugsState?item.drugsState.name:''}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span class="green">配送人员：<ng-container *ngIf="item.deliveryUser">{{item.deliveryUser.name}}（{{item.deliveryUser.phone}}）</ng-container><ng-container *ngIf="!item.deliveryUser">无</ng-container></span>
                <span [ngStyle]="{color:item.isCreatOder === 'YES' ? '#49b856' : 'red'}">{{item.isCreatOder === 'YES' ? '已建单' : '未建单'}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span>记账时间：<ng-container *ngIf="item.bagTime">{{item.bagTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.bagTime">无</ng-container></span>
                <!-- <span>批次&emsp;<em>{{item.batchNo}}</em></span> -->
                <span>开始配药时间：<ng-container *ngIf="item.startDispensingTime">{{item.startDispensingTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.startDispensingTime">无</ng-container></span>
              </div>
            </div>
            <!-- <div class="pharmacy-main__selectionPrint">
              <div class="pharmacy-main__selectionPrintBtn" (click)="print(item.id)">打印</div>
            </div> -->
          </div>
          <div class="pharmacy-main__selection pharmacy-main__selection--noData" *ngIf="printPharmacyList.length === 0">
            <img src="./../../assets/images/image_kongbaiye.png" alt="">
          </div>
          <div (click)="loadMore(1)" class="pharmacy-main__selection pharmacy-main__selection--more"
            *ngIf="printPharmacyFlag">
            <div class="pharmacy-main__selectionInfo">
              <i nz-icon nzType="loading" nzTheme="outline" class="pharmacy-main__selection--icon"
                *ngIf="printPharmacyLoad"></i>查看更多
            </div>
          </div>
        </div>
        <div *ngIf="loading1" style="height: calc(100vh - 212px);min-height: 556px;">
          <div class="loadingFull display_flex justify-content_flex-center align-items_center">
            <div class="loadingFullInner">
              <img src="../../../assets/images/loading.gif" alt="">
              <div>加载中...</div>
            </div>
          </div>
        </div>
      </overlay-scrollbars>
      <!-- 列表 end -->
    </div>
    <!-- 待配药 end -->
    <!-- 配药中 start -->
    <div class="pharmacy-main__list pharmacy-main__waitDelivery">
      <!-- 标题 start -->
      <div class="pharmacy-main__title">
        <strong>配药中</strong>
        <span class="autoUpdate">{{ logTime }}秒后自动刷新</span>
      </div>
      <!-- 标题 end -->
      <!-- 搜索框 start -->
      <div class="pharmacy-main__search">
        <div class="pharmacy-main__searchInput">
          <input nz-input placeholder="请输入关键字" [(ngModel)]="waitPharmacySearchKey" />
          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(2)">
            <i nz-icon nzType="search"></i>
            <span>搜索</span>
          </div>
        </div>
      </div>
      <!-- 搜索框 end -->
      <!-- 列表 start -->
      <overlay-scrollbars #osComponentRef2 class="pharmacy-main__selectionWrap">
        <div *ngIf="!loading2" style="height: 100%;">
          <div class="pharmacy-main__selection" *ngFor="let item of waitPharmacyList">
            <div class="pharmacy-main__selectionInfo">
              <div class="pharmacy-main__selectionItem">
                <strong>{{item.target?item.target.dept:''}}（{{item.packid}}）</strong>
                <span>{{item.drugsState?item.drugsState.name:''}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span class="green">配送人员：<ng-container *ngIf="item.deliveryUser">{{item.deliveryUser.name}}（{{item.deliveryUser.phone}}）</ng-container><ng-container *ngIf="!item.deliveryUser">无</ng-container></span>
                <span [ngStyle]="{color:item.isCreatOder === 'YES' ? '#49b856' : 'red'}">{{item.isCreatOder === 'YES' ? '已建单' : '未建单'}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span>记账时间：<ng-container *ngIf="item.bagTime">{{item.bagTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.bagTime">无</ng-container></span>
                <!-- <span>批次&emsp;<em>{{item.batchNo}}</em></span> -->
                <span>开始配药时间：<ng-container *ngIf="item.startDispensingTime">{{item.startDispensingTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.startDispensingTime">无</ng-container></span>
              </div>
            </div>
            <!-- <div class="pharmacy-main__selectionPrint">
              <div class="pharmacy-main__selectionPrintBtn" (click)="replenishPrint(item.id)">补打</div>
            </div> -->
          </div>
          <div class="pharmacy-main__selection pharmacy-main__selection--noData" *ngIf="waitPharmacyList.length === 0">
            <img src="./../../assets/images/image_kongbaiye.png" alt="">
          </div>
          <div (click)="loadMore(2)" class="pharmacy-main__selection pharmacy-main__selection--more"
            *ngIf="waitPharmacyFlag">
            <div class="pharmacy-main__selectionInfo">
              <i nz-icon nzType="loading" nzTheme="outline" class="pharmacy-main__selection--icon"
                *ngIf="waitPharmacyLoad"></i>查看更多
            </div>
          </div>
        </div>
        <div *ngIf="loading2" style="height: calc(100vh - 212px);min-height: 556px;">
          <div class="loadingFull display_flex justify-content_flex-center align-items_center">
            <div class="loadingFullInner">
              <img src="../../../assets/images/loading.gif" alt="">
              <div>加载中...</div>
            </div>
          </div>
        </div>
      </overlay-scrollbars>
      <!-- 列表 end -->
    </div>
    <!-- 配药中 end -->
    <!-- 核对中 start -->
    <div class="pharmacy-main__list pharmacy-main__delivery">
      <!-- 标题 start -->
      <div class="pharmacy-main__title">
        <strong>核对中</strong>
        <span class="autoUpdate">{{ logTime }}秒后自动刷新</span>
      </div>
      <!-- 标题 end -->
      <!-- 搜索框 start -->
      <div class="pharmacy-main__search">
        <div class="pharmacy-main__searchInput">
          <input nz-input placeholder="请输入关键字" [(ngModel)]="pharmacySearchKey" />
          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
            <i nz-icon nzType="search"></i>
            <span>搜索</span>
          </div>
        </div>
      </div>
      <!-- 搜索框 end -->
      <!-- 列表 start -->
      <overlay-scrollbars #osComponentRef3 class="pharmacy-main__selectionWrap">
        <div *ngIf="!loading3" style="height: 100%;">
          <div class="pharmacy-main__selection" *ngFor="let item of pharmacyList">
            <div class="pharmacy-main__selectionInfo">
              <div class="pharmacy-main__selectionItem">
                <strong>{{item.target?item.target.dept:''}}（{{item.packid}}）</strong>
                <span>{{item.drugsState?item.drugsState.name:''}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span class="green">配送人员：<ng-container *ngIf="item.deliveryUser">{{item.deliveryUser.name}}（{{item.deliveryUser.phone}}）</ng-container><ng-container *ngIf="!item.deliveryUser">无</ng-container></span>
                <span [ngStyle]="{color:item.isCreatOder === 'YES' ? '#49b856' : 'red'}">{{item.isCreatOder === 'YES' ? '已建单' : '未建单'}}</span>
              </div>
              <div class="pharmacy-main__selectionItem">
                <span>记账时间：<ng-container *ngIf="item.bagTime">{{item.bagTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.bagTime">无</ng-container></span>
                <!-- <span>批次&emsp;<em>{{item.batchNo}}</em></span> -->
                <span>开始配药时间：<ng-container *ngIf="item.startDispensingTime">{{item.startDispensingTime|date:'MM-dd HH:mm'}}</ng-container><ng-container *ngIf="!item.startDispensingTime">无</ng-container></span>
              </div>
            </div>
          </div>
          <div class="pharmacy-main__selection pharmacy-main__selection--noData" *ngIf="pharmacyList.length === 0">
            <img src="./../../assets/images/image_kongbaiye.png" alt="">
          </div>
          <div (click)="loadMore(3)" class="pharmacy-main__selection pharmacy-main__selection--more"
            *ngIf="pharmacyFlag">
            <div class="pharmacy-main__selectionInfo">
              <i nz-icon nzType="loading" nzTheme="outline" class="pharmacy-main__selection--icon"
                *ngIf="pharmacyLoad"></i>查看更多
            </div>
          </div>
        </div>
        <div *ngIf="loading3" style="height: calc(100vh - 212px);min-height: 556px;">
          <div class="loadingFull display_flex justify-content_flex-center align-items_center">
            <div class="loadingFullInner">
              <img src="../../../assets/images/loading.gif" alt="">
              <div>加载中...</div>
            </div>
          </div>
        </div>
      </overlay-scrollbars>
      <!-- 列表 end -->
    </div>
    <!-- 核对中 end -->
  </div>
  <!-- 主体部分 end -->
  <!-- 二维码打印 -->
  <div id="report" style="display: none">
    <div style="display: inline-block;" *ngFor="let img of codes">
      <img style="width: 200px;height:200px;" [src]="img.base64" alt="">
      <div style="text-align: center;font-size: 12px;width: 200px;font-weight: bold;color: #0a0a0a;">{{img.target}}</div>
      <div style="text-align: center;font-size: 12px;width: 200px;font-weight: bold;color: #0a0a0a;">{{img.creatTime|date:'MM-dd HH:mm'}}</div>
    </div>
  </div>
</div>

<!-- 药房端科室切换提示框 -->
<app-hs-prompt-modal
  [changeShow]="changeShow"
  [closeTime]="closeTime"
  [closeTimeFlag]="closeTimeFlag"
  [show]="hsPromptModalShow"
  (closeModelHs)="closeModelHs($event)"
  (clearModelHs)="clearModelHs($event)"
  deptType="pharmacy"
>


<!-- 返回系统按钮 -->
<!-- 右侧悬浮框 -->
<div id="fixedMenu" class="fixed" *ngIf="mainRole">
  <div class="right">
    <div class="fixedMenu hujiaozhongxin">
      <div class="menuItems">
        <div class="item">快捷菜单</div>
      </div>
    </div>
    <div class="fixedMenu">
      <div class="menuItems">
        <div class="others" [ngStyle]="{'height':showLastItems?(mainRole?(35*2)+'px':(35*1)+'px'):0}">
          <div [ngClass]="{'item':true,'checked':fixedTab=='back'}" *ngIf="mainRole"
            (click)="checkFixedTab('toSystem')">
            返回系统
          </div>
        </div>
      </div>
      <div class="arrow" *ngIf="!showLastItems" (click)="fixedMenuXiala()">
        <i class="icon_transport transport-xiala2-01"></i>
      </div>
      <div class="arrow" *ngIf="showLastItems" (click)="fixedMenuShangla()">
        <i class="icon_transport transport-shangla-"></i>
      </div>
    </div>
  </div>
  <div *ngIf="showLastItems&&fixedTab!=''" (click)="fixedMenuShangla()" class="fixedMark">
  </div>
</div>
