<!-- 药品/静配 -->
<div class="detail" *ngIf="!maskFlag">
	<div class="title">{{orderInfo.handleStatus.value==1 ? '调解' : '查看'}}<i class="icon_transport transport-guanbi" (click)="close()"></i></div>
	<div class="box">
		<div class="tab display_flex" *ngIf="!allShow">
			<div [ngClass]="{'item':true, 'flex_1':true, 'checked':tabType==1}" (click)="checkTab(1)">工单信息</div>
			<div [ngClass]="{'item':true, 'flex_1':true, 'checked':tabType==2}" (click)="checkTab(2)">评价内容</div>
			<div [ngClass]="{'item':true, 'flex_1':true, 'checked':tabType==3}" (click)="checkTab(3)">调解</div>
		</div>
		<div *ngIf="!allShow">
			<!-- 其他类型工单信息 -->
			<div *ngIf="(tabType==1)&&(orderInfo.workOrderObj.taskType.associationType.value=='other')"
				class="content orders">
				<div class="top">
					<div class="num">
						<span class="left">单号：{{orderInfo.workOrderObj.gdcode}}</span>
						<span class="right">{{orderInfo.workOrderObj.gdState?orderInfo.workOrderObj.gdState.name:''}}</span>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">工单日期：{{orderInfo.workOrderObj.startTime|date:'yyyy-MM-dd HH:mm'}}</div>
						<div nz-col nzSpan="6">总耗时：{{orderInfo.workOrderObj.showTimeNum}}</div>
						<div nz-col nzSpan="8">
							申请类型：{{orderInfo.workOrderObj.taskType?orderInfo.workOrderObj.taskType.taskName:''}}<ng-container
								*ngIf="orderInfo.workOrderObj.goodsRemark">-{{orderInfo.workOrderObj.goodsRemark}}</ng-container>
						</div>
						<div nz-col nzSpan="4">配送人员信息：{{orderInfo.workOrderObj.worker?orderInfo.workOrderObj.worker.name:''}}</div>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">
							申请科室：{{orderInfo.workOrderObj.createDeptDTO?orderInfo.workOrderObj.createDeptDTO.dept:''}}
						</div>
						<div nz-col nzSpan="6">
							目标科室：{{(orderInfo.workOrderObj.endDepts&&orderInfo.workOrderObj.endDepts[0])?orderInfo.workOrderObj.endDepts[0].dept:''}}
						</div>
						<div nz-col nzSpan="8" *ngIf="orderInfo.workOrderObj.urgentDetails">
							加急状态：{{orderInfo.workOrderObj.urgentDetails.checkStatus.name}}</div>
					</div>
					<div class="info" nz-row *ngIf="orderInfo.workOrderObj.urgentDetails">
						<div nz-col nzSpan="24" class="jiaji">加急原因：{{orderInfo.workOrderObj.urgentDetails.urgentReason}}</div>
					</div>
				</div>
				<div class="center">
					<div class="box">
						<div class="steps" *ngFor="let step of logList">
							<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?step.record.operationtime:''}}</p>
									<p *ngIf="step.record&&step.record.length&&step.record[0].dept"><span
											*ngFor="let dept of step.record">{{dept.dept}},</span></p>
									<p *ngIf="step.record&&step.record.length&&step.operationName!='申请'">耗时{{filterTime(step.record)}}</p>
								</div>
								<div class="line"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 标本类型工单信息 -->
			<div
				*ngIf="tabType==1&&(orderInfo.workOrderObj.taskType.associationType.value=='specimen'||orderInfo.workOrderObj.taskType.associationType.value=='specimenPlan')"
				class="content orders">
				<div class="top">
					<div class="num">
						<span class="left">单号：{{orderInfo.workOrderObj.gdcode}}</span>
						<span class="right">{{orderInfo.workOrderObj.gdState?orderInfo.workOrderObj.gdState.name:''}}</span>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">工单日期：{{orderInfo.workOrderObj.startTime|date:'yyyy-MM-dd HH:mm'}}</div>
						<div nz-col nzSpan="6">总耗时：{{orderInfo.workOrderObj.showTimeNum}}</div>
						<div nz-col nzSpan="8">
							申请类型：{{orderInfo.workOrderObj.taskType?orderInfo.workOrderObj.taskType.taskName:''}}<ng-container
								*ngIf="orderInfo.workOrderObj.goodsRemark">-{{orderInfo.workOrderObj.goodsRemark}}</ng-container>
						</div>
						<div nz-col nzSpan="4">配送人员信息：{{orderInfo.workOrderObj.worker?orderInfo.workOrderObj.worker.name:''}}</div>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">
							申请科室：{{orderInfo.workOrderObj.createDeptDTO?orderInfo.workOrderObj.createDeptDTO.dept:''}}
						</div>
						<div nz-col nzSpan="6">
							目标科室：{{(orderInfo.workOrderObj.endDepts&&orderInfo.workOrderObj.endDepts[0])?orderInfo.workOrderObj.endDepts[0].dept:''}}
						</div>
						<div nz-col nzSpan="4">预计接收：{{orderInfo.workOrderObj.expectReceiveNum}}</div>
						<div nz-col nzSpan="4">送达：{{orderInfo.workOrderObj.deliveryNum}}</div>
						<div nz-col nzSpan="4">实际接收：{{orderInfo.workOrderObj.actualReceiveNum}}</div>
					</div>
					<div class="info" nz-row *ngIf="orderInfo.workOrderObj.urgentDetails">
						<div nz-col nzSpan="8">
							加急状态：{{orderInfo.workOrderObj.urgentDetails.checkStatus.name}}</div>
						<div nz-col nzSpan="24" class="jiaji">加急原因：{{orderInfo.workOrderObj.urgentDetails.urgentReason}}</div>
					</div>
				</div>
				<div class="center">
					<div class="box">
						<div class="steps" *ngFor="let step of logList">
							<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?step.record.operationtime:''}}</p>
									<p *ngIf="step.record&&step.record.length&&step.record[0].dept"><span
											*ngFor="let dept of step.record">{{dept.dept}},</span></p>
									<p *ngIf="step.record&&step.record.length&&step.operationName!='申请'">耗时{{filterTime(step.record)}}</p>
								</div>
								<div class="line"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="bottom">
					<div class="table">
						<nz-table class="" [nzData]="orderInfo.workOrderObj.specimenSet" nzSize="small"
							[nzScroll]="{ y: (orderInfo.workOrderObj.urgentDetails?'124px':'153px') }" [nzShowPagination]="null">
							<thead>
								<tr class="thead">
									<th nzWidth="50px">序号</th>
									<th nzWidth="95px">检验项目</th>
									<th nzWidth="95px">标本类型</th>
									<th nzWidth="110px">标本编码</th>
									<th nzWidth="88px">患者姓名</th>
									<th nzWidth="88px">住院号</th>
									<th nzWidth="50px">床号</th>
									<th nzWidth="88px">目标科室</th>
									<!-- <th nzWidth="75px">是否接收</th> -->
									<!-- <th nzWidth="75px">是否送达</th> -->
									<th nzWidth="123px">接收扫描时间</th>
									<!-- <th nzWidth="123px">送达扫描时间</th> -->
								</tr>
							</thead>
							<tbody *ngIf="orderInfo.workOrderObj.specimenSet">
								<tr *ngFor="let data of orderInfo.workOrderObj.specimenSet;let i =index;">
									<td>{{i+1}}</td>
									<td>{{data.specimenDesc}}</td>
									<td>{{data.stype?data.stype.name:''}}</td>
									<td>{{data.scode}}</td>
									<td>{{data.patientName}}</td>
									<td>{{data.residenceNo}}</td>
									<td>{{data.bedNum}}</td>
									<td>{{data.checkDept.dept}}</td>
									<!-- <td>{{data.received?"是":"否"}}</td> -->
									<!-- <td>{{data.arrived?"是":"否"}}</td> -->
									<td>{{data.arriveTime|date:'MM-dd HH:mm'}}</td>
									<!-- <td>{{data.sendTime|date:'yyyy-MM-dd HH:mm'}}</td> -->
								</tr>
							</tbody>
						</nz-table>
					</div>
				</div>
			</div>
			<!-- 药品/静配配送类型工单信息 -->
			<div
				*ngIf="tabType==1&&(orderInfo.workOrderObj.taskType.associationType.value=='drugsBag'||orderInfo.workOrderObj.taskType.associationType.value=='jPBag')"
				class="content orders">
				<div class="top">
					<div class="num">
						<span class="left">单号：{{orderInfo.workOrderObj.gdcode}}</span>
						<span class="right">{{orderInfo.workOrderObj.gdState?orderInfo.workOrderObj.gdState.name:''}}</span>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">工单日期：{{orderInfo.workOrderObj.startTime|date:'yyyy-MM-dd HH:mm'}}</div>
						<div nz-col nzSpan="6">总耗时：{{orderInfo.workOrderObj.showTimeNum}}</div>
						<div nz-col nzSpan="8">
							申请类型：{{orderInfo.workOrderObj.taskType?orderInfo.workOrderObj.taskType.taskName:''}}<ng-container
								*ngIf="orderInfo.workOrderObj.goodsRemark">-{{orderInfo.workOrderObj.goodsRemark}}</ng-container>
						</div>
						<div nz-col nzSpan="4">配送人员信息：{{orderInfo.workOrderObj.worker?orderInfo.workOrderObj.worker.name:''}}</div>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">
							申请科室：{{orderInfo.workOrderObj.createDeptDTO?orderInfo.workOrderObj.createDeptDTO.dept:''}}
						</div>
						<div nz-col nzSpan="6">
							目标科室：{{(orderInfo.workOrderObj.endDepts&&orderInfo.workOrderObj.endDepts[0])?orderInfo.workOrderObj.endDepts[0].dept:''}}
						</div>
						<div nz-col nzSpan="8" *ngIf="orderInfo.workOrderObj.urgentDetails">
							加急状态：{{orderInfo.workOrderObj.urgentDetails.checkStatus.name}}</div>
					</div>
					<div class="info" nz-row *ngIf="orderInfo.workOrderObj.urgentDetails">
						<div nz-col nzSpan="24" class="jiaji">加急原因：{{orderInfo.workOrderObj.urgentDetails.urgentReason}}</div>
					</div>
				</div>
				<div class="center">
					<div class="box">
						<div class="steps" *ngFor="let step of logList">
							<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?step.record.operationtime:''}}</p>
									<p *ngIf="step.record&&step.record.length&&step.record[0].dept"><span
											*ngFor="let dept of step.record">{{dept.dept}},</span></p>
									<p *ngIf="step.record&&step.record.length&&step.operationName!='申请'">耗时{{filterTime(step.record)}}</p>
								</div>
								<div class="line"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="bottom">
					<div class="table">
						<!-- 静配 -->
						<nz-table *ngIf="orderInfo.workOrderObj.staticDistri" class="detailDrugTable"
							[nzData]="orderInfo.workOrderObj.staticDistri.jpdetailsFormat" nzSize="small" [nzScroll]="{ y: '125px' }"
							[nzShowPagination]="null">
							<thead>
								<tr class="thead">
									<th nzWidth="15%">患者信息</th>
									<th nzWidth="30%">药品</th>
									<th nzWidth="5%">数量</th>
									<th nzWidth="15%">患者信息</th>
									<th nzWidth="30%">药品</th>
									<th nzWidth="5%">数量</th>
								</tr>
							</thead>
							<tbody *ngIf="orderInfo.workOrderObj.staticDistri">
								<tr *ngFor="let data of orderInfo.workOrderObj.staticDistri.jpdetailsFormat">
									<td>{{data[0].bedNum}}床：{{data[0].patientInfo}}</td>
									<td>{{data[0].jpInfo}}</td>
									<td>{{data[0].jpNum}}</td>
									<td>{{data[1]?data[1].bedNum+"床："+data[1].patientInfo:''}}</td>
									<td>{{data[1]?data[1].jpInfo:''}}</td>
									<td>{{data[1]?data[1].jpNum:''}}</td>
								</tr>
							</tbody>
						</nz-table>
						<!-- 药品 -->
						<nz-table *ngIf="orderInfo.workOrderObj.drugs" class="detailDrugTable"
							[nzData]="orderInfo.workOrderObj.drugs.drugsFormat" nzSize="small" [nzScroll]="{ y: '125px' }"
							[nzShowPagination]="null">
							<thead>
								<tr class="thead">
									<th nzWidth="15%">患者信息</th>
									<th nzWidth="30%">药品</th>
									<th nzWidth="5%">数量</th>
									<th nzWidth="15%">患者信息</th>
									<th nzWidth="30%">药品</th>
									<th nzWidth="5%">数量</th>
								</tr>
							</thead>
							<tbody *ngIf="orderInfo.workOrderObj.drugs">
								<tr *ngFor="let data of orderInfo.workOrderObj.drugs.drugsFormat">
									<td>{{data[0].bedNum}}床：{{data[0].patientInfo}}</td>
									<td>{{data[0].drugsInfo}}</td>
									<td>{{data[0].drugsNum}}</td>
									<td>{{data[1]?data[1].bedNum+"床："+data[1].patientInfo:''}}</td>
									<td>{{data[1]?data[1].drugsInfo:''}}</td>
									<td>{{data[1]?data[1].drugsNum:''}}</td>
								</tr>
							</tbody>
						</nz-table>
					</div>
				</div>
			</div>
			<!-- 患者陪检/患者转运类型工单信息 -->
			<div
				*ngIf="tabType==1&&(orderInfo.workOrderObj.taskType.associationType.value=='inspect'||orderInfo.workOrderObj.taskType.associationType.value=='patientTransport')"
				class="content orders">
				<div class="top">
					<div class="num">
						<span class="left">单号：{{orderInfo.workOrderObj.gdcode}}</span>
						<span class="right">{{orderInfo.workOrderObj.gdState?orderInfo.workOrderObj.gdState.name:''}}</span>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">工单日期：{{orderInfo.workOrderObj.startTime|date:'yyyy-MM-dd HH:mm'}}</div>
						<div nz-col nzSpan="6">总耗时：{{orderInfo.workOrderObj.showTimeNum}}</div>
						<div nz-col nzSpan="8">
							申请类型：{{orderInfo.workOrderObj.taskType?orderInfo.workOrderObj.taskType.taskName:''}}<ng-container
								*ngIf="orderInfo.workOrderObj.goodsRemark">-{{orderInfo.workOrderObj.goodsRemark}}</ng-container>
						</div>
						<div nz-col nzSpan="4">配送人员信息：{{orderInfo.workOrderObj.worker?orderInfo.workOrderObj.worker.name:''}}</div>
					</div>
					<div class="info" nz-row>
						<div nz-col nzSpan="6">
							申请科室：{{orderInfo.workOrderObj.createDeptDTO?orderInfo.workOrderObj.createDeptDTO.dept:''}}
						</div>
						<div nz-col nzSpan="6">
							目标科室：{{(orderInfo.workOrderObj.endDepts&&orderInfo.workOrderObj.endDepts[0])?orderInfo.workOrderObj.endDepts[0].dept:''}}
						</div>
						<div nz-col nzSpan="8" *ngIf="orderInfo.workOrderObj.urgentDetails">
							加急状态：{{orderInfo.workOrderObj.urgentDetails.checkStatus.name}}</div>
					</div>
					<div class="info" nz-row *ngIf="orderInfo.workOrderObj.urgentDetails">
						<div nz-col nzSpan="24" class="jiaji">加急原因：{{orderInfo.workOrderObj.urgentDetails.urgentReason}}</div>
					</div>
				</div>
				<div class="center">
					<div class="box">
						<div class="steps" *ngFor="let step of logList">
							<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?step.record.operationtime:''}}</p>
									<p *ngIf="step.record&&step.record.length&&step.record[0].dept"><span
											*ngFor="let dept of step.record">{{dept.dept}},</span></p>
									<p *ngIf="step.record&&step.record.length&&step.operationName!='申请'">耗时{{filterTime(step.record)}}</p>
								</div>
								<div class="line"></div>
							</div>
						</div>
					</div>
				</div>
				<div class="bottom">
					<div class="info">
						<div nz-row class="top">
							<div class="left" nz-col nzSpan="12">
								<p>
									<span class="label">患者姓名</span>
									<span>{{orderInfo.workOrderObj.patient.patientName}}</span>
								</p>
								<p>
									<span class="label">床位</span>
									<span>{{orderInfo.workOrderObj.patient.bedNum}}</span>
								</p>
								<p *ngIf="orderInfo.workOrderObj.taskType.associationType.value=='inspect'">
									<span class="label">检查项目</span>
									<span>
										<span *ngFor="let item of orderInfo.workOrderObj.checkList;let i = index;">
											<span *ngIf="i!=orderInfo.workOrderObj.checkList.length-1">{{item.inspectName}},</span>
											<span *ngIf="i==orderInfo.workOrderObj.checkList.length-1">{{item.inspectName}}</span>
										</span>
									</span>
								</p>
							</div>
							<div class="right" nz-col nzSpan="12">
								<p>
									<span class="label">住院号</span>
									<span>{{orderInfo.workOrderObj.patient.residenceNo}}</span>
								</p>
								<p>
									<span class="label">携带设备</span>
									<span>{{orderInfo.workOrderObj.goods}}</span>
								</p>
								<p *ngIf="orderInfo.workOrderObj.taskType.associationType.value=='inspect'">
									<span class="label">预约时间</span>
									<span>{{orderInfo.workOrderObj.yyTime?orderInfo.workOrderObj.yyTime:''}}</span>
								</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- 评价内容 -->
			<div *ngIf="tabType==2" class="content pingjia">
				<div class="msg">
					<div>评价等级：{{orderInfo.evaluationLevel ? orderInfo.evaluationLevel.name:'-'}}</div>
					<div>评价人：{{orderInfo.evaluatorDTO?orderInfo.evaluatorDTO.name:''}}</div>
				</div>
				<div class="con">
					意见内容：{{orderInfo.evaluationContent}}
				</div>
			</div>
		</div>

		<!-- 调解(未调解) -->
		<div *ngIf="orderInfo.handleStatus.value==1" class="content">
			<div class="form">
				<form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
					<nz-form-item>
						<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="reason">原因及事件过程</nz-form-label>
						<nz-form-control nzErrorTip="请输入原因及事件过程!">
							<nz-input-group>
								<textarea rows="3" maxlength="500" nz-input type="reason" formControlName="reason"
									placeholder="请输入原因及事件过程"></textarea>
							</nz-input-group>
						</nz-form-control>
					</nz-form-item>
					<nz-form-item>
						<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="process">调解过程</nz-form-label>
						<nz-form-control nzErrorTip="请输入调解过程!">
							<nz-input-group>
								<textarea rows="3" maxlength="500" nz-input type="process" formControlName="process"
									placeholder="请输入调解过程"></textarea>
							</nz-input-group>
						</nz-form-control>
					</nz-form-item>
					<nz-form-item>
						<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="handleType">解决方式</nz-form-label>
						<nz-form-control nzErrorTip="请选择解决方式!">
							<nz-select [nzDropdownMatchSelectWidth]="false" type="handleType" nzShowSearch nzAllowClear
								formControlName="handleType" nzPlaceHolder="请选择解决方式">
								<nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allHandleType">
								</nz-option>
							</nz-select>
						</nz-form-control>
					</nz-form-item>
					<nz-form-item>
						<nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="improve">改进意见</nz-form-label>
						<nz-form-control nzErrorTip="请输入改进意见!">
							<nz-input-group>
								<textarea rows="3" maxlength="500" nz-input type="improve" formControlName="improve"
									placeholder="请输入改进意见"></textarea>
							</nz-input-group>
						</nz-form-control>
					</nz-form-item>
				</form>
			</div>
		</div>
		<!-- 调解(已调解) -->
		<div *ngIf="orderInfo.handleStatus.value==2" class="content">
			<div class="mediation">
				<div class="item">
					<div class="label">原因及事件过程：</div>
					<div class="info">{{orderInfo.reasonAndEventProcess}}</div>
				</div>
				<div class="item">
					<div class="label">调解过程：</div>
					<div class="info">{{orderInfo.mediationProcess}}</div>
				</div>
				<div class="item display_flex align-items_center justify-content_space-between">
					<div class="block">
						<div class="label">解决方式：</div>
						<div class="info">{{orderInfo.handleType.name}}</div>
					</div>
					<div class="block">
						<div class="label">调解人：</div>
						<div class="info">{{orderInfo.mediationUser?orderInfo.mediationUser.name:''}}</div>
					</div>
					<div class="block">
						<div class="label">调解时间：</div>
						<div class="info">{{orderInfo.mediationTime?date(orderInfo.mediationTime):''}}</div>
					</div>
				</div>
				<div class="item">
					<div class="label">改进意见：</div>
					<div class="info">{{orderInfo.advice}}</div>
				</div>
			</div>
		</div>
	</div>
	<div class="btns">
		<button *ngIf="orderInfo.handleStatus.value==1" class="candelBtn btn" nz-button nzType="primary"
			[nzLoading]="btnLoading" (click)="submitForm()">调解记录保存</button>
		<button class="candelBtn btn cancel" nz-button nzType="default" (click)="close()">关闭</button>
	</div>
</div>
<!-- 操作成功/失败提示框 -->
<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
	[info]="promptInfo" (closeModel)="close()">
	<!-- 2.父组件调用子组件时绑定到这个事件属性，并在事件发生时作出回应。(closeModel)="close()" -->
</app-prompt-modal>
<!-- 遮罩 -->
<app-mask *ngIf="maskFlag"></app-mask>