<!-- 标本接收 -->
<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="fixationModal">
	<div class="pathology-content">
		<div class="title">
		<!-- <i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i></div> -->
		<div class="content">
			<div class="content-item">
				<!-- <div class="center">提示：申请单含<span class="red">{{codeData.specimenNum}}</span>只标本，已扫<span class="red">{{codeData.pathologySpecimenDTOList.length}}</span>只<span *ngIf="codeData.pathologySpecimenDTOList.length < codeData.specimenNum">，请继续扫描标本。</span></div> -->
				<div class="disp-fl">
					<div class="disp-title">
						<div>
							应送申请单: <span class="weight">{{otherData.pathologyFormNum}}</span> &nbsp;
							标本: <span class="weight">{{otherData.specimenNum}}</span>&nbsp;
							已扫描申请单: <span class="weight">{{otherData.scanPathologyFormNum}}</span>&nbsp;
							标本: <span class="weight">{{otherData.scanSpecimenNum}}</span>&nbsp;
						</div>
					</div>
					
					<div *ngIf="dataType!='pathologyPack' && businessType!='packagLook'">
						<input nz-input id="specimen" [placeholder]="placeholder" [(ngModel)]="specimenCode" (ngModelChange)="codeChange($event)"/>
					</div>
					<div class="error-class">{{errorMsg}}</div>
				</div>
				<div class="tabs">
					<div class="tabs-item">
						<div class="tabs-item-item" [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="list-template">
				  <div class="list-template__content">
						<div class="list-template__bottom" style="padding: 0 !important;">
							<nz-table class="list-template__nzTable" [nzData]="codeData" nzSize="middle" [nzShowPagination]="false"
								[nzLoading]="tableLoading">
								<thead>
									<tr class="thead">
										<th nzWidth="220px">申请单号 | 申请科室</th>
										<th nzWidth="220px">患者姓名 | 住院号</th>
										<th nzWidth="120px">标本数</th>
										<th nzWidth="260px">部位</th>
										<th nzWidth="120px">产生科室</th>
										<th>离体时间</th>
										<th>固定时间</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let data of codeData let index = index">
										<td>
											<div>{{ data.applyCode}}</div>
											<div>{{ data.patientDTO.department.dept}}</div>
										</td>
										<td>
											<div>{{ data.patientDTO.patientName}}</div>
											<div>{{ data.patientDTO.residenceNo}}</div>
										</td>
										<td>{{ data.specimenNum}}</td>
										<td>{{ data.takePart}}</td>
										<td>{{ data.surgeryDeptDTO?data.surgeryDeptDTO.dept:'-'}}</td>
										<td>{{ data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
										<td>{{ data.fixationTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
									</tr>
								</tbody>
							</nz-table>
							<div class="list-template__pagination">
							  <nz-pagination [(nzPageIndex)]="pageReceptionIndex" [(nzTotal)]="listReceptionLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
							    (nzPageIndexChange)="pageChange()" (nzPageSizeChange)="pageChange()">
							  </nz-pagination>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="display_flex justify-content_flex-center bottom-btn">
			<button class="btn btn-right" [disabled]="alreadyData.length==0" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">核对完成</button>
			<!-- <button class="btn btn-right" *ngIf="dataType?dataType=='pack' : businessType == 'packaging'" [disabled]="codeData.length==0" nz-button nzType="primary" (click)="submitScanForm()" [nzLoading]="btnLoading">核对完成</button> -->
			<!-- <button class="btn btn-right" *ngIf="dataType=='pathologyPack'" nz-button nzType="primary" [disabled]="codeData.length==0" (click)="connectAccomplish()" [nzLoading]="btnMultiLoading">核对完成</button> -->
			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
<!-- 			<button class="btn cancel" *ngIf="dataType?dataType=='pack' : businessType == 'packaging'" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
			<button class="btn btn-right" *ngIf="businessType=='packagLook'" nz-button nzType="primary" (click)="hideSpecimenModal()">知道了</button> -->
		</div>
	</div>
</div>
</div>

<!-- 多支标本提示 -->
<div class="multi add display_flex align-items_center justify-content_flex-center" *ngIf="multiModal">
	<div class="pathology-content">
		<div class="title">多支标本提示
		<i class="icon_transport transport-guanbi" (click)="hideMultiModal()"></i></div>
		<div class="content border">
			<div class="content-item">
				<div class="center">提示：{{scanCodeData.patientName}}的申请单含<span>{{codeMultiData.length}}</span>支标本，您已扫描<span>{{muArr.length}}</span>支</div>
				<div class="disp-fl df-center">
					<div>
						<input nz-input id="multiSpecimen" placeholder="可扫描物理标本条码及申请单" [(ngModel)]="specimenMultiCode" (ngModelChange)="codeMultiChange($event)"/>
					</div>
					<div class="error-class">{{errorMultiMsg}}</div>
				</div>
				<div class="list-template">
				  <div class="list-template__content">
						<div class="list-template__bottom" style="padding: 0 !important;">
							<nz-table class="list-template__nzTable" [nzData]="codeMultiData" nzSize="middle" [nzShowPagination]="false"
								[nzLoading]="tableLoading">
								<thead>
									<tr class="thead">
										<th>序号</th>
										<th>条码号</th>
										<th>标本名称</th>
										<th>已扫描 | 未扫描</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let data of codeMultiData let index = index">
										<td>{{index+1}}</td>
										<td>{{ data.specimenCode}}</td>
										<td>
											<span *ngIf="data.partSource && data.partSource.value!=1">{{data.partSource?data.partSource.name:''}}</span>{{data.specimenName}}
										</td>
										<td>
											<div *ngIf="data.isScan==1">已扫描</div>
											<div *ngIf="data.isScan==0" class="red">未扫描</div>
										</td>
									</tr>
								</tbody>
							</nz-table>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="display_flex justify-content_flex-center bottom-btn">
			<button class="btn btn-right" nz-button nzType="primary" (click)="submitMultiScanForm()" [nzLoading]="btnMultiLoading">扫描完成</button>
			<button class="btn cancel" nz-button nzType="default" (click)="hideMultiModal()">取消</button>
		</div>
	</div>
</div>



<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  [info]="promptInfo" (closeModel)="hideSpecimenModal()"></app-prompt-modal>
	
<div class="mask-style" *ngIf="isSpinning">
	<nz-spin nzSimple class="spin-style"></nz-spin>
</div>

<!-- 核对 -->
<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="connectModal">
	<div class="modalBody">
		<div class="title">信息核对<i class="icon_transport transport-guanbi" (click)="hideConnectModal()"></i>
		</div>
		<div class="content">
		 <div class="title-class">
			 您本次共扫描<span class="red">{{mustReceived.pathologyFormNum}}</span>申请单 标本<span class="red">{{mustReceived.specimenNum}}</span>份
		 </div>
		 <form nz-form [formGroup]="validateConnectForm" class="addForm" (ngSubmit)="submitConnectForm()">
			<nz-form-item>
				<nz-form-label nzRequired nzFor="dispatchingNumber">配送人工号</nz-form-label>
				<nz-form-control nzErrorTip="请输入配送人工号!">
					<input nz-input (ngModelChange)="dispatchingChange($event)" formControlName="dispatchingNumber" placeholder="请输入配送人工号" nzSize="default" />
				</nz-form-control>
			</nz-form-item>
			<nz-form-item class="form-name">
				<nz-form-label style="margin-left: 12px;">配送人姓名</nz-form-label>
					<div class="job-class">{{dispatchingName}}</div>
			</nz-form-item>
			<nz-form-item>
				<nz-form-label nzRequired nzFor="receptionNumber">核对人工号</nz-form-label>
				<nz-form-control nzErrorTip="请输入核对人工号!">
					<input nz-input (ngModelChange)="receptionChange($event)" formControlName="receptionNumber" placeholder="请输入核对人工号" nzSize="default" />
				</nz-form-control>
			</nz-form-item>
			<nz-form-item class="form-name">
				<nz-form-label style="margin-left: 12px;">核对人姓名</nz-form-label>
					<div class="job-class">{{receptionName}}</div>
			</nz-form-item>
		 </form>
		</div>
		<div class="display_flex justify-content_flex-center">
			<button class="btn" nz-button nzType="primary" (click)="submitConnectForm()" [nzLoading]="btnConnectLoading">确定</button>
			<button class="btn cancel" nz-button nzType="default" (click)="hideConnectModal()">取消</button>
		</div>
	</div>
</div>
