<div class="pharmacy">
  <!-- 头部 start -->
  <div class="pharmacy-header">
   <div class="pharmacy-logo">
			<div class="pharmacy-name__title">一站式服务管理平台</div>
    </div>
    <div class="pharmacy-name">
			<div class="pharmacy-title">门诊病理采样端</div>
      <div class="pharmacy-name__total">
				<nz-input-group nzSize="large" *ngIf="!pathologyFormCode">
					<input type="text" id="Binput" (keydown.enter)="onEnterPress()" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="请输入患者信息" />
				</nz-input-group>
				<!-- <ng-template #suffixButton>
					<button nz-button nzType="primary" nzSize="large" nzSearch (click)="searchSpecimen()">搜索</button>
				</ng-template> -->
      </div>
			<div>
				<div class="error-class">{{searchMsg}}</div>
			</div>
    </div>
    <div class="right">
      <div class="userInfo dropdown">
        <div class="user" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
          <img src="../../assets/images/icon_keshi.png" alt="">
          <span><ng-container *ngIf="loginUser.dept">{{deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept}}-</ng-container>{{loginUser.name}}</span>
          <i class="icon_transport transport-xiala1 ml8"></i>
        </div>
        <div class="dropdown-content r8" [hidden]="!showDropdown" (mouseenter)="showDropdown = true" (mouseleave)="showDropdown = false">
          <div class="dropdownItem" (click)="changeKsNow()">切换科室</div>
					<div class="dropdownItem" (click)="toMain()">回到系统管理</div>
          <div class="dropdownItem" (click)="logOut()">退出</div>
        </div>
      </div>
    </div>
  </div>
  <div class="pharmacy-main">
		<div class="left" *ngIf="adviceList">
			<div class="top" *ngIf="adviceList.patientDTO">
				<div>{{adviceList.patientDTO.patientName}} {{adviceList.patientDTO.gender?adviceList.patientDTO.gender.name:'-'}} ({{adviceList.patientDTO.age||'-'}}岁)</div>
				<div class="border">{{adviceList.patientDTO.residenceNo?adviceList.patientDTO.residenceNo:adviceList.patientDTO.patientCode}}</div>
			</div>
			<div class="left-content" [ngClass]="{'noAddAppClass': !ifAddapplication, 'beAddAppClass': ifAddapplication}">
				<div class="content" *ngFor="let item of adviceList.pathologyFormDTOS;let index=index;" (click)="listClick(item,index)" [ngClass]="{'activeLeftClass': index == leftIndex}">
					<div class="list list-df">
						<div class="code">{{item.applyCode ? item.applyCode : '无'}}</div>
						<div class="form-title">{{item.status?item.status.name:'无'}}</div>
						<div class="del-class" *ngIf="item.status.value < 7">
							<i (click)="delItem($event,item)" class="icon_transport transport-lajitong specimen-icon"></i>
						</div>
					</div>
					<div class="list">项目：{{item.project.length>0 ? item.project.join('、') :'无'}}</div>
					<div class="list">部位：{{item.takePart ? item.takePart : '无'}}</div>
					<div class="list">诊断：{{item.diagnose ? item.diagnose : '无'}}</div>
					<div class="list">开单时间：{{item.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
				</div>
			</div>
			<div *ngIf="!pathologyFormCode && ifAddapplication && adviceList" class="center-box">
				<button nz-button nzType="primary" class="btn txtC mr8" (click)="addPathology(0)" [nzLoading]="addLoading">新增病理申请单</button>
			</div>
		</div>
		<div class="center" *ngIf="adviceList && adviceList.pathologyFormDTOS.length>0 && detailsData && viewType!='add'">
			<div class="pathology-content" *ngIf="viewType=='edit'">
				<div class="title">病理检查申请单</div>
				<div class="content">
					<form nz-form [formGroup]="validateForm" class="addForm">
						<div class="content-item">
							<nz-form-item class="form-title-box">
								<div class="form-title"><span class="font-weight-500">申请单号：</span>{{detailsData.applyCode}}</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型：无</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型：术中快速病理检查申请单</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型：病理检查申请单</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==2">申请单类型：病理细胞学申请单</div>
								<div class="form-title"><span class="font-weight-500">状态：</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
							</nz-form-item>
							
							<nz-form-item>
								<div class="form-title width-100 font-weight-500">病历摘要：</div>
								<div class="indent" [ngClass]="{'height-200': isShowMove, 'height-100': !isShowMove && detailsData.medicalRecords}">{{detailsData.medicalRecords||'无'}}</div>
								<div (click)="showLook()" class="cursor" *ngIf="medicalRecordsLength>10">
									<i *ngIf="isShowMove" nz-icon nzType="caret-down" nzTheme="outline"></i>
									<i *ngIf="!isShowMove" nz-icon nzType="caret-up" nzTheme="outline"></i>
								</div>
							</nz-form-item>
							
							<nz-form-item>
								<div class="form-title width-100 font-weight-500">临床诊断：</div>
								<div>
									{{detailsData.diagnose||'无'}}
								</div>
							</nz-form-item>
							
							<nz-form-item class="form-item">
								<nz-form-label nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术诊断</nz-form-label>
								<nz-form-control nzErrorTip="请输入手术诊断" [nzSm]="24" [nzXs]="24">
									<input nz-input formControlName="surgicalPlan" placeholder="请输入手术诊断"/>
								</nz-form-control>
							</nz-form-item>
							
							<nz-form-item class="form-item">
								<nz-form-label nzFor="intraoperativeFindings" [nzSm]="24" [nzXs]="24">术中所见</nz-form-label>
								<nz-form-control nzErrorTip="请输入术中所见" [nzSm]="24" [nzXs]="24">
									<input nz-input formControlName="intraoperativeFindings" placeholder="请输入术中所见"/>
								</nz-form-control>
							</nz-form-item>
							
							<nz-form-item class="form-item" *ngIf="syncFlag==0">
								<nz-form-label nzRequired nzFor="project" [nzSm]="4" [nzXs]="24">检验项目</nz-form-label>
								<nz-form-control nzErrorTip="请选择检验项目!" [nzSm]="20" [nzXs]="24">
									<nz-input-group>
										<nz-select nzDisabled nzSearch nzShowSearch nzPlaceHolder="请选择检验项目" formControlName="project">
											<ng-container *ngFor="let option of projectData">
												<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
											</ng-container>
										</nz-select>
									</nz-input-group>
								</nz-form-control>
							</nz-form-item>
							
							<div class="form-list" *ngIf="syncFlag==1">
								<div class="form-title"><span class="font-weight-500">检验项目：</span>{{project||'无'}}</div>
							</div>
							
							<div class="df-sb">
								<nz-form-item class="form-item">
									<nz-form-label nzRequired nzFor="specimenGenre">标本类型</nz-form-label>
									<nz-form-control nzErrorTip="请选择标本类型!">
										<nz-input-group>
											<nz-select nzSearch nzShowSearch nzPlaceHolder="请选择标本类型" formControlName="specimenGenre">
												<ng-container *ngFor="let option of specimenData">
													<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
												</ng-container>
												<nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
													<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
												</nz-option>
											</nz-select>
										</nz-input-group>
									</nz-form-control>
								</nz-form-item>
								
								<nz-form-item class="form-item-right">
									<nz-form-label nzRequired nzFor="specimenNum">标本数量</nz-form-label>
									<nz-form-control nzErrorTip="请输入标本数量!">
										<input nz-input formControlName="specimenNum" placeholder="请输入标本数量" nzSize="default" />
									</nz-form-control>
								</nz-form-item>
							</div>
							
							
							<nz-form-item class="form-item">
								<nz-form-label nzRequired nzFor="takePart" [nzSm]="4" [nzXs]="24">采取部位</nz-form-label>
								<nz-form-control nzErrorTip="请输入采取部位!" [nzSm]="20" [nzXs]="24">
									<input nz-input formControlName="takePart"  placeholder="请输入采取部位" nzSize="default" />
								</nz-form-control>
							</nz-form-item>
							
							<nz-form-item class="form-item">
								<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">标本</nz-form-label>
								<div class="add-icon-class" (click)='openSpecimen()'>
									<span class="icon_transport transport-tag27fuben form-icon"></span>
								</div>
							</nz-form-item>
							
							<div class="specimen-list">
								<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
									<div class="specimen-name" (click)="specimenEdit($event,item,index,'direct')">
										<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
									</div>
									<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>
								</div>
							</div>
						</div>
					</form>
				</div>
				<div class="display_flex justify-content_flex-center bottom-btn">
					<button *ngIf="statusValue==1" class="btn btn-right" nz-button nzType="primary" (click)="submitForm('print')" [nzLoading]="btnLoading">标本打印</button>
					<button *ngIf="statusValue==2 || statusValue==3 || statusValue==4" class="btn btn-right" nz-button nzType="primary" (click)="superaddition()" [nzLoading]="zjLoading">追加打印</button>
					<button *ngIf="statusValue==2 || statusValue==3 || statusValue==4" class="btn" nz-button nzType="primary" nzGhost (click)="submitForm('all')" [nzLoading]="btnLoading">全量打印</button>
					<!-- <button class="btn btn-left" *ngIf="(statusValue==2 || statusValue==3 || statusValue==4) && specimenList.length>1" nz-button nzType="primary" (click)="coverSubmitForm()">封面打印</button> -->
				</div>
			</div>
			
			<div class="pathology-content" *ngIf="detailsData && viewType=='view'">
				<div class="title">病理检查申请单</div>
				<div class="content">
					<div class="viewForm">
						<div class="content-item">
							<div class="form-list form-title-box">
								<div class="form-title"><span class="font-weight-500">申请单号：</span>{{detailsData.applyCode}}</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型：无</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型：术中快速病理检查申请单</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型：病理检查申请单</div>
								<div class="form-title" *ngIf="detailsData.pathologyFormType==2">申请单类型：病理细胞学申请单</div>
								<div class="form-title"><span class="font-weight-500">状态：</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
							</div>
					
							<div class="form-list">
								<div class="form-title width-100 font-weight-500">病历摘要：</div>
								<div class="indent" [ngClass]="{'height-200': isShowMove, 'height-100': !isShowMove && detailsData.medicalRecords}">{{detailsData.medicalRecords||'无'}}</div>
								<div (click)="showLook()" class="cursor" *ngIf="medicalRecordsLength>10">
									<i *ngIf="isShowMove" nz-icon nzType="caret-down" nzTheme="outline"></i>
									<i *ngIf="!isShowMove" nz-icon nzType="caret-up" nzTheme="outline"></i>
								</div>
							</div>
							
							<div class="form-list">
								<div class="form-title font-weight-500">临床诊断：</div>
								<div class="indent">
									{{detailsData.diagnose||'无'}}
								</div>
							</div>
							
								<div class="form-list">
									<div class="form-title font-weight-500">手术诊断：</div>
									<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
								</div>
								<div class="form-list">
									<div class="form-title font-weight-500">术中所见：</div>
									<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
								</div>
							
								<div class="form-list">
									<div class="form-title"><span class="font-weight-500">检验项目：</span>{{project||'无'}}</div>
								</div>
								
								<div class="form-list">
									<div class="form-title"><span class="font-weight-500">标本类型：</span>{{detailsData.specimenType.name||'无'}}</div>
								</div>
								
								<div class="form-list form-title-box">
									<div class="form-title"><span class="font-weight-500">采取部位：</span>{{detailsData.takePart||'无'}}</div>
									<div class="form-title"><span class="font-weight-500">标本数量：</span>{{detailsData.specimenNum||'无'}}</div>
								</div>
								
								<div class="form-list">
									<div class="form-title font-weight-500">标本：</div>
									<div class="form-title-box-detail">
										<div class="form-title cursors" *ngFor="let item of specimenList" (click)="specimenView(item)">
											<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		
		<div class="content-item-right" *ngIf="adviceList && adviceList.pathologyFormDTOS.length>0 && pathologyLogs.length && (viewType=='view' || viewType=='edit')">
			<div class="tabs">
				<div class="tabs-item">
					<div class="tabs-item-item" *ngIf="adviceItem.status.value < 5" [ngClass]="{'activeClass': activeIndex == 0}" (click)="tabClick(0)">快捷标本填写</div>
					<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 1}" (click)="tabClick(1)">病理闭环</div>
				</div>
			</div>
			
			<div class="specimen" *ngIf="activeIndex==0">
				<div class="specimen-list" *ngFor="let item of specimenNameData; let index = index" (click)="fastSpecimenClick($event,item,index)"><span class="red" *ngIf="item.containPosition==0">* </span><span class="specimenName">{{item.specimenName}}</span></div>
			</div>
			<div class="padding-top-10" *ngIf="activeIndex==1">
				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
					<ng-container *ngFor="let item of pathologyLogs; let index = index">
							<nz-step
								[nzDescription]="tpl"
							>
							</nz-step>
							<ng-template #tpl>
								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
									<div style="color: #49B856;">{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
								</div>
								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
									<div>{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
								</div>
							</ng-template>
						</ng-container>
				</nz-steps>
			</div>
		</div>
		<div class="pathology-content-btn" *ngIf="viewType=='add'">
			<button class="btn" nz-button nzType="primary" (click)="addPathology(1)" [nzLoading]="addLoading">新增病理申请单</button>
		</div>
  </div>
</div>

<!-- 科室切换提示框 -->
<app-hs-prompt-modal
  [changeShow]="changeShow"
  [closeTime]="closeTime"
  [closeTimeFlag]="closeTimeFlag"
  [show]="hsPromptModalShow"
  (closeModelHs)="closeModelHs($event)"
  (clearModelHs)="clearModelHs($event)"
  deptType="nurse"
> 
  <!-- 返回系统按钮 -->
  <!-- 右侧悬浮框 -->
   <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>
</app-hs-prompt-modal>

<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>

<!-- 病理申请单 -->
<!-- <app-pathology-add *ngIf="pathologyModal" [surgeryId]="surgeryDataId" [patientId]="patientId" [detailId]="detailId" [applicationType]="applicationType" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add> -->

<!-- 选择标本 -->
<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenModal">
	<div class="modalBody">
		<div class="title">新增病理标本<i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i>
		</div>
		<div class="content">
			<form nz-form [formGroup]="validateSpecimenForm" class="addForm" (ngSubmit)="submitSpecimen()">
				<nz-form-item class="form-item" *ngIf="!selectType">
					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">位置来源</nz-form-label>
					<div class="specimen-list">
						<div>
							<div *ngFor="let item of placeList;let index=index;" class="select-item"
							[ngClass]="{'activeClass': index == placeIndex}" (click)="placeClick($event,item,index)" class="select-item">{{item.name}}</div>
						</div>
					</div>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="!selectType">
					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">系统</nz-form-label>
					<div class="specimen-list">
						<div *ngFor="let item of systemList;let index=index;" class="select-item"
							[ngClass]="{'activeClass': index == systemIndex}" (click)="systemClick($event,item,index)">
							{{item.name}}
						</div>
					</div>
				</nz-form-item>
				
				<nz-form-item class="form-item" *ngIf="!selectType">
					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">器官</nz-form-label>
					<div class="specimen-list">
						<div *ngFor="let item of apparatusList;let index=index;" class="select-item"
							[ngClass]="{'activeClass': index == apparatusIndex}" (click)="apparatusClick($event,item,index)">
							{{item.name}}
						</div>
					</div>
				</nz-form-item>
				
				<nz-form-item class="form-item">
					<nz-form-label [nzSm]="4" [nzXs]="24">标本名称快捷选择</nz-form-label>
					<div class="specimen-list">
						<div *ngFor="let item of specimenNameList;let index=index;" class="select-item"
							[ngClass]="{'activeClass': index == specimenNameIndex}" (click)="specimenNameClick($event,item,index)">
							{{item.name}}
						</div>
					</div>
				</nz-form-item>
				
<!-- 				<nz-form-item class="form-item">
					<nz-form-label [nzSm]="4" [nzXs]="24">快捷键入</nz-form-label>
					<div class="specimen-list">
						<div *ngFor="let item of fastList;let index=index;" class="select-item"
							[ngClass]="{'activeClass': index == fastIndex}" (click)="fastClick($event,item,index)">
							{{item.name}}
						</div>
					</div>
				</nz-form-item> -->
				
				<nz-form-item class="form-item">
					<nz-form-label nzRequired nzFor="specimenName" [nzSm]="3" [nzXs]="24">标本名称</nz-form-label>
					<div class="specimen-tip" [ngClass]="{'isSpecumen':placeName}">{{placeName?placeName:''}}</div>
					<nz-form-control nzErrorTip="请输入标本名称" [(nzSm)]="nzSmNum" [nzXs]="24">
						<input nz-input maxlength="20" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
					</nz-form-control>
					<div class="empty-box" [ngClass]="{'beSpecumenEmpty':placeName, 'noSpecumenEmpty':!placeName}">
						<span class="name">{{specimenNameLength}}/20</span>
						<span class="empty" (click)="emptData($event)">清空</span>
					</div>
				</nz-form-item>
				
				<nz-form-item class="form-item">
					<nz-form-label nzFor="remark" [nzSm]="3" [nzXs]="24">备注</nz-form-label>
					<nz-form-control nzErrorTip="请输入备注" [nzSm]="21" [nzXs]="24">
						<textarea rows="3" nz-input formControlName="remark" placeholder="请输入备注"></textarea>
					</nz-form-control>
				</nz-form-item>
			</form>
		</div>
		<div class="display_flex justify-content_flex-center bottom-btn">
			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen(1)" [nzLoading]="btnSpLoading">确定</button>
			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen(2)">新增下一个标本</button>
			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
		</div>
	</div>
</div>

<app-prompt-modal *ngIf="specimenModalShow" [content]="promptContent" [success]="ifSuccess" [show]="specimenModalShow"
  [info]="promptInfo" (closeModel)="closeSpecimenModel()"></app-prompt-modal>

 <!-- 新增下一个标本 -->
<app-dialog-delete [delModal]="addMadal" (hideDelModalEvent)="hideAddModal()" [btnLoading]="addSpLoading"
  (confirmDelEvent)="confirmAdd()" content="您确认要新增下一个标本吗？"></app-dialog-delete>
	
<!-- 删除模态框 -->
<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
	(confirmDelEvent)="confirmDel()" content="您确认要删除标本吗？"></app-dialog-delete>

<!-- 删除申请单 -->
<app-dialog-delete [delModal]="delAdviceModal" (hideDelModalEvent)="hideAdviceModal()" [btnLoading]="btnDelLoading"
	(confirmDelEvent)="confirmAdvice()" content="您确认要删除申请单吗？"></app-dialog-delete>
		
<!-- 查看标本 -->
<div class="look">
	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenViewDialog">
		<div class="modalBody modalBody-ga">
			<div class="title">查看标本<i class="icon_transport transport-guanbi" (click)="closeSpecimenModal()"></i>
			</div>
			<overlay-scrollbars #osComponentRef1 class="content">
				<div class="list-template__bottom">
					<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
					  [nzLoading]="loading1">
					  <thead>
					    <tr class="thead">
								<th>标本名称</th>
								<th>系统</th>
								<th>部位</th>
					      <th>编码</th>
					      <th>备注</th>
					      <th>离体时间</th>
					      <th>离体操作人</th>
					      <th>固定时间</th>
					      <th>固定操作人</th>
					    </tr>
					  </thead>
					  <tbody>
					    <tr *ngFor="let data of viewData">
								<td>{{ data.specimenName }}</td>
								<td>{{ data.system ? data.system.name : '-' }}</td>
								<td>{{ data.organ ? data.organ.name : '-' }}</td>
					      <td>{{ data.specimenCode }}</td>
					      <td>{{ data.remark ? data.remark : '无' }}</td>
								<td>{{ data.inVitroTime ? (data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
								<td>{{ data.inVitroOperator ? data.inVitroOperator.name : '-' }}</td>
								<td>{{ data.fixationTime ? (data.fixationTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
								<td>{{ data.fixationOperator ? data.fixationOperator.name : '-' }}</td>
					    </tr>
					  </tbody>
					</nz-table>
				</div>
			</overlay-scrollbars>
			<div class="display_flex justify-content_flex-center">
				<button class="btn" nz-button nzType="primary" (click)="closeSpecimenModal()">知道了</button>
			</div>
		</div>
	</div>
</div>

<!-- 离体并固定 -->
<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="notModal">
	<div class="modalBody no-width">
		<div class="title">{{ifImmobilization?'离体并固定':'离体'}}<i class="icon_transport transport-guanbi" (click)="hideNotModal()"></i>
		</div>
		<div class="content">
			<!-- <div class="content-title">本次需要记录离体标本<span class="reds">{{specimenNum}}</span>份，本申请单共<span class="reds">{{totalNum}}</span>份标本</div> -->
			<form nz-form [formGroup]="validatePrintForm" class="addForm" (ngSubmit)="submitPrintForm()">
				<nz-form-item>
				  <nz-form-label nzRequired [nzSpan]="6" nzFor="inVitroTime">离体时间</nz-form-label>
				  <nz-form-control style="display: flex;align-items: center;" [nzSpan]="18" nzErrorTip="请选择离体时间!">
				    <nz-input-group style="display: flex;gap: 10px">
							<!-- <nz-date-picker formControlName="inVitroTime" 
							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
							(ngModelChange)="inVitroTimeChange($event)"></nz-date-picker> -->
							<nz-date-picker formControlName="inVitroDate" (ngModelChange)="inVitroDateChange($event)"></nz-date-picker>
							
							<nz-time-picker formControlName="inVitroTimes" nzFormat="HH:mm" (ngModelChange)="inVitroTimeChange($event)"></nz-time-picker>
						</nz-input-group>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item *ngIf="ifImmobilization && detailsData && detailsData.pathologyFormType==0">
				  <nz-form-label nzRequired [nzSpan]="6" nzFor="fixationTime">固定时间</nz-form-label>
				  <nz-form-control style="display: flex;align-items: center;" [nzSpan]="18" nzErrorTip="请选择固定时间!">
				    <nz-input-group style="display: flex;gap: 10px">
							<!-- <nz-date-picker formControlName="fixationTime" 
							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
							(ngModelChange)="formChangeDate($event)"></nz-date-picker> -->
							<nz-date-picker formControlName="fixationDate" (ngModelChange)="fixationDateChange($event)"></nz-date-picker>
							
							<nz-time-picker formControlName="fixationTimes" nzFormat="HH:mm" (ngModelChange)="fixationTimeChange($event)"></nz-time-picker>
						</nz-input-group>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item *ngIf="ifImmobilization && detailsData && detailsData.pathologyFormType==0">
				  <nz-form-label nzRequired [nzSpan]="8" nzFor="fixative">固定液类型</nz-form-label>
				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择固定液类型!">
				    <nz-input-group>
							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择固定液类型" formControlName="fixative">
							  <ng-container *ngFor="let option of fixativeData">
							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
							  </ng-container>
							</nz-select>
						</nz-input-group>
				  </nz-form-control>
				</nz-form-item>
				<nz-form-item>
				  <nz-form-label nzRequired [nzSpan]="5" nzFor="jobNumber">工号</nz-form-label>
					<nz-form-control [nzSpan]="19" nzErrorTip="请输入工号!">
						<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
					</nz-form-control>
				</nz-form-item>
				<nz-form-item>
				  <nz-form-label nzRequired [nzSpan]="5" nzFor="name">姓名</nz-form-label>
					<nz-form-control [nzSpan]="19" nzErrorTip="请输入姓名!">
						<input nz-input disabled formControlName="name" placeholder="请输入姓名" nzSize="default" />
					</nz-form-control>
				</nz-form-item>
			</form>
		</div>
		<div class="display_flex justify-content_flex-center bottom-btn">
			<button class="btn btn-right" nz-button nzType="primary" (click)="submitVerificationForm()" [nzLoading]="printLoading">确定</button>
			<button class="btn cancel" nz-button nzType="default" (click)="hideNotModal()">取消</button>
		</div>
	</div>
</div>


<!-- 打印 -->
<div id="report" style="display: none;">
	<div class="monad">
		<!-- 大尺寸 80*60-->
		<div style="font-size: 12px;" *ngIf="outpatientPathologyLabelSizeType==1 && printData && printData.specimenList && printData.specimenList.length>0 && coverType==0">
			<div *ngFor="let data of printData.specimenList; let index=index;">
			 <div>
				 <div style="display: flex;align-items: center;flex-wrap: nowrap;height: 70px;padding: 0 1px;position: relative;">
					 <div style="width: 60%;height: 70px;text-align: center;">
						 <img style="max-width: 90%;height: 80%;" [src]="data.barCode" alt="">
						 <div>标本号:{{data.specimenCode}}</div>
					 </div>
					 <div style="width: 40%;height: 100%;text-align: center;display: flex;align-items: center;position: relative;top: -2px;">
						 <img style="max-width: 100%;max-height: 100%;" [src]="tool.logoUrl" alt="">
					 </div>
					 <div style="font-weight: bold;text-align: right;width: 100%;position: absolute;bottom: 3px;right: 3px;">{{printData.pathologyFormType==0?'普':'速'}}</div>
				 </div>
				 <div style="display: flex;justify-content: space-between;">
					 <div style="width: 70%;margin-right:15px;">
					 	<div style="display: flex; justify-content: space-between; margin-top:10px;">
							<div>患者: {{data.patientName}}</div>
							<div>性别: {{data.patientGender}}</div>
						</div>
						<div style="margin-top:10px;">
							<div *ngIf="data.residenceNo">住院号: {{data.residenceNo}}</div>
							<div *ngIf="!data.residenceNo">门诊号: {{data.patientNo}}</div>
						</div>
						<div style="margin-top:10px;">
							<div>科室: {{data.patientDept}}</div>
						</div>
						<div style="margin-top:10px;">
							<div>日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
						</div>
						<div style="margin-top:10px;">
							<div style="width: 98%;height: 32px;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
						</div>
					 </div>
					 <div style="width: 30%;">
						<div style="margin-top:10px;">年龄: {{data.patientAge}}岁</div>
						<div style="margin-top:10px;">床号: {{data.patientBedNum}}床</div>
						<div style="margin-top:10px;" *ngIf="operation == 'addPrint'">标本数: {{index+1}}/{{printData.specimenNum}}</div>
						<div style="margin-top:10px;" *ngIf="operation != 'addPrint'">标本数: {{index+1}}/{{printData.specimenList.length}}</div>
						<div style="width: 100%;height: 60px;display: flex;margin-top: 5px;">
						 <div style="height: 50px;width: 50px;">
							 <img style="max-width: 100%;max-height: 100%;position: relative;left: -2px;" [src]="printData.applyBarCode" alt="">
							 <div style="position: relative;left: -18px;">{{printData.applyCode}}</div>
						 </div>
						 <div style="width: 12px;position: relative; top: 2px;">申请单</div>
						</div>
					 </div>
				 </div>
			 </div>
			 <div style="height: 26px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
			</div>
		</div>
		
		<!-- 小尺寸 20*30-->
		<div style="font-size: 12px;" *ngIf="outpatientPathologyLabelSizeType==2 && printData && printData.specimenList && printData.specimenList.length>0 && coverType==0">
			<div *ngFor="let data of printData.specimenList; let index=index;">
				<div style="width: 100%;display: flex;margin-top: 5px;padding: 0 7px;">
				 <div style="width: 35%;">
					 <div style="display: flex;">
						 <div style="width: 50px;height: 50px;">
						 		<img style="max-width: 100%;max-height: 100%;position: relative;left: -2px;" [src]="data.barCode" alt="">
						 </div>
						 <!-- <div style="width: 12px;">申请单</div> -->
					 </div>
					 <div>{{printData.applyCode}}</div>
				 </div>
				 <div style="width: 5%;"></div>
				 <div style="width: 60%;position: relative;left: -5px;">
					<div style="display: flex;flex-wrap: nowrap;" *ngIf="data.residenceNo">住院号: {{data.residenceNo}}</div>
					<div style="display: flex;flex-wrap: nowrap;" *ngIf="!data.residenceNo">门诊号: {{data.patientNo}}</div>
					<div style="margin-top:9px;">患者: {{data.patientName}}</div>
					<div style="margin-top:9px;margin-left: 30px;">性别: {{data.patientGender}}</div>
				 </div>
				</div>
				<div style="margin-top:3px;padding-left: 7px;">
					<div style="width: 98%;overflow: hidden;">部位: {{data.partSource}}{{data.specimenName}}</div>
				</div>
				<div style="margin-top:3px;padding-left: 7px;">
					<div style="width: 98%;">日期: {{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
				</div>
			 <div style="height: 18px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && index+1 < printData.specimenList.length"></div>
			</div>
		</div>
		
		<!-- 封面打印 -->
		<div style="font-size: 14px;" *ngIf="coverType==1">
		 <div style="display: flex;align-items: center;flex-wrap: nowrap;height: 70px;padding: 0 1px;position: relative;">
			 <div style="width: 40%;">
				<div style="height: 60px;width: 100%;text-align: center;">
				 <img style="max-width: 100%;max-height: 100%;" [src]="detailsData.barCode" alt="">
				 <div>{{detailsData.applyCode}}</div>
				</div>
			 </div>
			 <div style="width: 60%;height: 100%;text-align: center;display: flex;align-items: center;flex-wrap: wrap;justify-content: right;">
				 <img style="max-width: 70%;max-height: 100%;" [src]="tool.logoUrl" alt="">
				 <div style="font-size: 18px;width: 100%;font-weight: bold;text-align: right;">病&nbsp;&nbsp;理&nbsp;&nbsp;申&nbsp;&nbsp;请&nbsp;&nbsp;单</div>
			 </div>
		 </div>
		 <div>
			<div style="margin-top:20px;display: flex;justify-content: space-between;">
				<div>患者: {{detailsData.patientDTO.patientName}}</div>
				<div>性别: {{detailsData.patientDTO.gender?detailsData.patientDTO.gender.name:'-'}}</div>
				<div>年龄: {{detailsData.patientDTO.age||'-'}}岁</div>
			</div>
			<div style="margin-top:10px;display: flex;justify-content: space-between;">
				<div *ngIf="detailsData.residenceNo">住院号: {{detailsData.residenceNo}}</div>
				<div *ngIf="!detailsData.residenceNo">门诊号: {{detailsData.patientDTO.patientCode}}</div>
				<div>床号: {{detailsData.patientDTO.bedNum || '-'}}床</div>
			</div>
			<div style="margin-top:10px;display: flex;justify-content: space-between;">
				<div>科室: {{detailsData.patientDTO.department.dept}}</div>
				<div>标本数: {{specimenList.length}}</div>
			</div>
			<div style="margin-top:10px;display: flex;justify-content: space-between;">
				<div>日期: {{detailsData.inVitroTime|date:'yyyy-MM-dd'}}</div>
				<div style="font-weight: bold;text-align: right;">{{detailsData.pathologyFormType==1 ? '速' : '普'}}</div>
			</div>
		 </div>
		</div>
	</div>
</div>
	
<div class="mask-style" *ngIf="isSpinning">
	<nz-spin nzSimple class="spin-style"></nz-spin>
</div>