maotao vor 8 Monaten
Ursprung
Commit
e48b6762c5

+ 14 - 0
src/app/services/main.service.ts

@@ -858,4 +858,18 @@ export class MainService {
858 858
 	    headers: this.headers,
859 859
 	  });
860 860
 	}
861
+	
862
+	//病理申请单打印
863
+	 pathologyPrint(data) {
864
+	   return this.http.post(host.host + `/pathology/print`, data, {
865
+	     headers: this.headers,
866
+	   });
867
+	 }
868
+	
869
+	// 病理查询标本条码
870
+	pathologyScanCode(data) {
871
+	  return this.http.post(host.host + `/pathology/scanCode`, data, {
872
+	    headers: this.headers,
873
+	  });
874
+	}
861 875
 }

+ 4 - 0
src/app/services/tool.service.ts

@@ -47,6 +47,10 @@ export class ToolService {
47 47
       ? JSON.parse(localStorage.getItem("user")).user.currentHospital
48 48
       : JSON.parse(localStorage.getItem("user")).infoPermission.hospitals[0];
49 49
   }
50
+	//获取当前用户id
51
+	getCurrentUserId() {
52
+	  return JSON.parse(localStorage.getItem("user")).user.id;
53
+	}
50 54
   //获取当前用户科室
51 55
   getCurrentUserDept() {
52 56
     return JSON.parse(localStorage.getItem("user")).user.dept;

+ 124 - 44
src/app/share/pathology-add/pathology-add.component.html

@@ -2,65 +2,63 @@
2 2
 	<div class="pathology-content">
3 3
 		<div class="title">病理申请单<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4 4
 		</div>
5
-		<div class="content">
5
+		<div class="content" *ngIf="!isSpinning">
6 6
 			<form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
7 7
 				<div class="content-item boder-right">
8 8
 					<nz-form-item class="form-item">
9
-						<nz-form-label nzRequired nzFor="knowledgeClass" [nzSm]="6" [nzXs]="24">是否术中快速</nz-form-label>
9
+						<nz-form-label nzRequired nzFor="intraoperativeRapidity" [nzSm]="6" [nzXs]="24">是否术中快速</nz-form-label>
10 10
 						<nz-form-control nzErrorTip="请选择!" [nzSm]="18" [nzXs]="24">
11
-							<nz-radio-group formControlName="knowledgeClass">
11
+							<nz-radio-group formControlName="intraoperativeRapidity">
12 12
 								<label nz-radio [nzValue]="1">是</label>
13 13
 								<label nz-radio [nzValue]="0">否</label>
14 14
 							</nz-radio-group>
15 15
 						</nz-form-control>
16 16
 					</nz-form-item>
17 17
 					<nz-form-item class="form-title-box">
18
-						<div class="form-title"><span class="font-weight-500">申请单编号:</span>1008611</div>
19
-						<div class="form-title"><span class="font-weight-500">状态:</span>未打印</div>
18
+						<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
19
+						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
20 20
 					</nz-form-item>
21 21
 					<nz-form-item class="form-title-box">
22
-						<div class="form-title"><span class="font-weight-500">科室名称:</span>科室111</div>
23
-						<div class="form-title"><span class="font-weight-500">住院号:</span>008622</div>
22
+						<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
23
+						<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
24 24
 					</nz-form-item>
25 25
 					<nz-form-item class="form-title-box">
26
-						<div class="form-title"><span class="font-weight-500">患者信息:</span>张三</div>
27
-						<div class="form-title"><span class="font-weight-500">年龄:</span>18</div>
26
+						<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
27
+						<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
28 28
 					</nz-form-item>
29 29
 					<nz-form-item>
30 30
 						<div class="form-title width-100 font-weight-500">诊断:</div>
31 31
 						<div>
32
-							<div>1.有病</div>
33
-							<div>2.有病</div>
32
+							{{detailsData.diagnose||'无'}}
34 33
 						</div>
35 34
 					</nz-form-item>
36 35
 					
37 36
 					<nz-form-item>
38
-						<div class="form-title font-weight-500">病理摘要:</div>
39
-						<div>患者因“胆囊息肉4月余”于2024-08-05入院。
40
-						患者4月前我院彩超提示胆囊息肉,大小约1.3*cds  0.7cm,无腹痛腹胀,无恶心呕吐,无发热,无胸闷、无返酸,无呕血、黑便,无腹泻,无尿频、尿急、尿痛。未进一步处理,今患者再次来我院,要求进一步治疗住院,</div>
37
+						<div class="form-title width-100 font-weight-500">病理摘要:</div>
38
+						<div>{{detailsData.medicalRecords||'无'}}</div>
41 39
 					</nz-form-item>
42 40
 					
43 41
 					<nz-form-item class="form-item">
44
-						<nz-form-label nzRequired nzFor="scheme" [nzSm]="24" [nzXs]="24">手术方案</nz-form-label>
42
+						<nz-form-label nzRequired nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术方案</nz-form-label>
45 43
 						<nz-form-control nzErrorTip="请输入手术方案" [nzSm]="24" [nzXs]="24">
46
-							<textarea rows="3" nz-input formControlName="scheme" placeholder="请输入手术方案"></textarea>
44
+							<textarea rows="3" nz-input formControlName="surgicalPlan" placeholder="请输入手术方案"></textarea>
47 45
 						</nz-form-control>
48 46
 					</nz-form-item>
49 47
 				</div>
50 48
 				
51 49
 				<div class="content-item">
52 50
 					<nz-form-item class="form-item">
53
-						<nz-form-label nzRequired nzFor="sees" [nzSm]="6" [nzXs]="24">术中所见</nz-form-label>
51
+						<nz-form-label nzRequired nzFor="intraoperativeFindings" [nzSm]="6" [nzXs]="24">术中所见</nz-form-label>
54 52
 						<nz-form-control nzErrorTip="请输入术中所见" [nzSm]="24" [nzXs]="24">
55
-							<textarea rows="3" nz-input formControlName="sees" placeholder="请输入术中所见"></textarea>
53
+							<textarea rows="3" nz-input formControlName="intraoperativeFindings" placeholder="请输入术中所见"></textarea>
56 54
 						</nz-form-control>
57 55
 					</nz-form-item>
58 56
 					
59 57
 					<nz-form-item class="form-item">
60
-						<nz-form-label nzRequired nzFor="specimen" [nzSm]="5" [nzXs]="24">标本类型</nz-form-label>
58
+						<nz-form-label nzRequired nzFor="specimenGenre" [nzSm]="5" [nzXs]="24">标本类型</nz-form-label>
61 59
 						<nz-form-control nzErrorTip="请选择标本类型!" [nzSm]="19" [nzXs]="24">
62 60
 							<nz-input-group>
63
-								<nz-select nzSearch nzShowSearch nzPlaceHolder="请选择标本类型" formControlName="specimen">
61
+								<nz-select nzSearch nzShowSearch nzPlaceHolder="请选择标本类型" formControlName="specimenGenre">
64 62
 									<ng-container *ngFor="let option of specimenData">
65 63
 										<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
66 64
 									</ng-container>
@@ -73,22 +71,22 @@
73 71
 					</nz-form-item>
74 72
 					
75 73
 					<nz-form-item class="form-item">
76
-						<nz-form-label nzRequired nzFor="number" [nzSm]="5" [nzXs]="24">标本件数</nz-form-label>
74
+						<nz-form-label nzRequired nzFor="specimenNum" [nzSm]="5" [nzXs]="24">标本件数</nz-form-label>
77 75
 						<nz-form-control nzErrorTip="请输入标本件数!" [nzSm]="19" [nzXs]="24">
78
-							<input nz-input formControlName="number"  placeholder="请输入标本件数" nzSize="default" />
76
+							<input nz-input formControlName="specimenNum"  placeholder="请输入标本件数" nzSize="default" />
79 77
 						</nz-form-control>
80 78
 					</nz-form-item>
81 79
 					
82 80
 					<nz-form-item class="form-item">
83
-						<nz-form-label nzRequired nzFor="part" [nzSm]="5" [nzXs]="24">采取部位</nz-form-label>
81
+						<nz-form-label nzRequired nzFor="takePart" [nzSm]="5" [nzXs]="24">采取部位</nz-form-label>
84 82
 						<nz-form-control nzErrorTip="请输入采取部位!" [nzSm]="19" [nzXs]="24">
85
-							<input nz-input formControlName="part"  placeholder="请输入采取部位" nzSize="default" />
83
+							<input nz-input formControlName="takePart"  placeholder="请输入采取部位" nzSize="default" />
86 84
 						</nz-form-control>
87 85
 					</nz-form-item>
88 86
 					
89 87
 					<nz-form-item class="form-title-box">
90
-						<div class="form-title">取标本位置:A01</div>
91
-						<div class="form-title">取材医生:王医生</div>
88
+						<div class="form-title">取标本位置:{{detailsData.surgeryDeptDTO.dept}}</div>
89
+						<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
92 90
 					</nz-form-item>
93 91
 					
94 92
 					<nz-form-item class="form-item">
@@ -100,13 +98,21 @@
100 98
 					
101 99
 					<div class="specimen-list">
102 100
 						<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
103
-							<div>{{item.name}}</div>
101
+							<div class="specimen-name" (click)="specimenEdit($event,item,index)">
102
+							{{item.partSource?item.partSource.name:''}} <span *ngIf="item.system">-</span>
103
+							{{item.system?item.system.name:''}} <span *ngIf="item.organ">-</span>
104
+							{{item.organ?item.organ.name:''}} <span *ngIf="item.sample">-</span>
105
+							{{item.sample?item.sample.name:''}}
106
+							</div>
104 107
 							<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>
105 108
 						</div>
106 109
 					</div>
107 110
 				</div>
108 111
 			</form>
109 112
 		</div>
113
+		<div class="mask-style" *ngIf="isSpinning">
114
+			<nz-spin nzSimple class="spin-style"></nz-spin>
115
+		</div>
110 116
 		<div class="display_flex justify-content_flex-center bottom-btn">
111 117
 		  <button class="btn btn-right" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">打印标本</button>
112 118
 			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
@@ -122,7 +128,7 @@
122 128
 		<div class="content">
123 129
 			<form nz-form [formGroup]="validateSpecimenForm" class="addForm" (ngSubmit)="submitSpecimen()">
124 130
 				<nz-form-item class="form-item">
125
-					<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">位置来源</nz-form-label>
131
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">位置来源</nz-form-label>
126 132
 					<div class="specimen-list">
127 133
 						<div>
128 134
 							<div *ngFor="let item of placeList;let index=index;" class="select-item"
@@ -132,35 +138,42 @@
132 138
 				</nz-form-item>
133 139
 				
134 140
 				<nz-form-item class="form-item">
135
-					<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">系统</nz-form-label>
141
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">系统</nz-form-label>
136 142
 					<div class="specimen-list">
137
-						<div *ngFor="let item of systemList;let index=index;" class="select-box"
143
+						<div *ngFor="let item of systemList;let index=index;" class="select-item"
138 144
 							[ngClass]="{'activeClass': index == systemIndex}" (click)="systemClick($event,item,index)">
139
-							<div class="select-item">{{item.name}}</div>
145
+							{{item.name}}
140 146
 						</div>
141 147
 					</div>
142 148
 				</nz-form-item>
143 149
 				
144 150
 				<nz-form-item class="form-item">
145
-					<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">器官</nz-form-label>
151
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">器官</nz-form-label>
146 152
 					<div class="specimen-list">
147
-						<div *ngFor="let item of apparatusList;let index=index;" class="select-box"
153
+						<div *ngFor="let item of apparatusList;let index=index;" class="select-item"
148 154
 							[ngClass]="{'activeClass': index == apparatusIndex}" (click)="apparatusClick($event,item,index)">
149
-							<div class="select-item">{{item.name}}</div>
155
+							{{item.name}}
150 156
 						</div>
151 157
 					</div>
152 158
 				</nz-form-item>
153 159
 				
154 160
 				<nz-form-item class="form-item">
155
-					<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">标本名称</nz-form-label>
161
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">标本名称</nz-form-label>
156 162
 					<div class="specimen-list">
157
-						<div *ngFor="let item of specimenNameList;let index=index;" class="select-box"
163
+						<div *ngFor="let item of specimenNameList;let index=index;" class="select-item"
158 164
 							[ngClass]="{'activeClass': index == specimenNameIndex}" (click)="specimenNameClick($event,item,index)">
159
-							<div class="select-item">{{item.name}}</div>
165
+							{{item.name}}
160 166
 						</div>
161 167
 					</div>
162 168
 				</nz-form-item>
163 169
 				
170
+				<nz-form-item class="form-item" *ngIf="specimenNameName=='qita'">
171
+					<nz-form-label nzRequired nzFor="specimenName" [nzSm]="3" [nzXs]="24">其他标本名称</nz-form-label>
172
+					<nz-form-control nzErrorTip="请输入其他标本名称" [nzSm]="21" [nzXs]="24">
173
+						<input nz-input formControlName="specimenName" placeholder="请输入其他标本名称"/>
174
+					</nz-form-control>
175
+				</nz-form-item>
176
+				
164 177
 				<nz-form-item class="form-item">
165 178
 					<nz-form-label nzRequired nzFor="remark" [nzSm]="3" [nzXs]="24">备注</nz-form-label>
166 179
 					<nz-form-control nzErrorTip="请输入备注" [nzSm]="21" [nzXs]="24">
@@ -170,7 +183,7 @@
170 183
 			</form>
171 184
 		</div>
172 185
 		<div class="display_flex justify-content_flex-center bottom-btn">
173
-			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen()" [nzLoading]="btnLoading">确定</button>
186
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen()" [nzLoading]="btnSpLoading">确定</button>
174 187
 			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
175 188
 		</div>
176 189
 	</div>
@@ -178,8 +191,15 @@
178 191
 
179 192
 <!-- 操作成功/失败提示框 -->
180 193
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
181
-  [info]="promptInfo" (closeModel)="closeModel"></app-prompt-modal>
194
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
182 195
 	
196
+<app-prompt-modal *ngIf="specimenModalShow" [content]="promptContent" [success]="ifSuccess" [show]="specimenModalShow"
197
+  [info]="promptInfo" (closeModel)="closeSpecimenModel()"></app-prompt-modal>
198
+
199
+ <!-- 删除模态框 -->
200
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
201
+  (confirmDelEvent)="confirmDel()" content="您确认要删除标本吗?"></app-dialog-delete>
202
+		
183 203
 <!-- 未打印 -->
184 204
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="notModal">
185 205
 	<div class="modalBody no-width">
@@ -188,10 +208,10 @@
188 208
 		<div class="content">
189 209
 			<form nz-form [formGroup]="validatePrintForm" class="addForm" (ngSubmit)="submitPrintForm()">
190 210
 				<nz-form-item>
191
-				  <nz-form-label nzRequired [nzSpan]="8" nzFor="time">标本离体时间</nz-form-label>
211
+				  <nz-form-label nzRequired [nzSpan]="8" nzFor="inVitroTime">标本离体时间</nz-form-label>
192 212
 				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择标本离体时间!">
193 213
 				    <nz-input-group>
194
-							<nz-date-picker formControlName="time" 
214
+							<nz-date-picker formControlName="inVitroTime" 
195 215
 							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
196 216
 							(ngModelChange)="formChangeDate($event)"></nz-date-picker>
197 217
 						</nz-input-group>
@@ -200,7 +220,7 @@
200 220
 				<nz-form-item>
201 221
 				  <nz-form-label nzRequired [nzSpan]="5" nzFor="jobNumber">工号</nz-form-label>
202 222
 					<nz-form-control [nzSpan]="19" nzErrorTip="请输入工号!">
203
-						<input nz-input (input)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
223
+						<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
204 224
 					</nz-form-control>
205 225
 				</nz-form-item>
206 226
 				<nz-form-item>
@@ -212,8 +232,68 @@
212 232
 			</form>
213 233
 		</div>
214 234
 		<div class="display_flex justify-content_flex-center bottom-btn">
215
-			<button class="btn btn-right" nz-button nzType="primary" (click)="submitPrintForm()" [nzLoading]="btnLoading">确定</button>
235
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitPrintForm()" [nzLoading]="printLoading">确定</button>
216 236
 			<button class="btn cancel" nz-button nzType="default" (click)="hideNotModal()">取消</button>
217 237
 		</div>
218 238
 	</div>
219
-</div>
239
+</div>
240
+
241
+
242
+  <!-- 打印 -->
243
+  <div id="report" style="display: none;">
244
+		<div class="monad">
245
+			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>1" style="border: 1px solid #AAAAAA;
246
+				border-radius: 5px;font-size: 12px;">
247
+				<img style="width: 100%;height: 90px;border-radius: 5px;" [src]="printData.applyBarCode" alt="">
248
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;border-top: 1px solid #aaa;">
249
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">患者</div>
250
+					<div style="width:70%;padding:1px;">{{printData.patientName}}({{printData.patientAge}}岁)</div>
251
+				</div>
252
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
253
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">住院信息</div>
254
+					<div style="width:70%;padding:1px;">{{printData.patientBedNum}}床/{{printData.residenceNo}}</div>
255
+				</div>
256
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
257
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">科室</div>
258
+					<div style="width:70%;padding:1px;">{{printData.patientDept}}</div>
259
+				</div>
260
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
261
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">部位</div>
262
+					<div style="width:70%;padding:1px;">{{printData.takePart}}</div>
263
+				</div>
264
+				<div style="display: flex;">
265
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">标本数</div>
266
+					<div style="width:70%;padding:1px;">{{printData.specimenNum}}</div>
267
+				</div>
268
+			</div>
269
+			<div style="height: 10px;"></div>
270
+			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
271
+				<div *ngFor="let data of printData.specimenList; let index=index;">
272
+					<div style="height: 30px;"></div>
273
+					<div style="border: 1px solid #AAAAAA;border-radius: 5px;">
274
+						<img style="width: 100%;height: 90px;border-radius: 5px;" [src]="data.barCode" alt="">
275
+						<div class="monad-sign" style="border-bottom: 1px solid #AAAAAA;padding-left:1px;">
276
+							<div>{{data.system}}-{{data.organ}}</div>
277
+							<div>({{index+1}}/{{printData.specimenList.length}}) {{data.partSource}}-{{data.specimenName}}</div>
278
+						</div>
279
+						<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
280
+							<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">患者</div>
281
+							<div style="width:70%;padding:1px;">{{data.patientName}}({{data.patientAge}}岁)</div>
282
+						</div>
283
+						<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
284
+							<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">住院信息</div>
285
+							<div style="width:70%;padding:1px;">{{data.patientBedNum}}床/{{data.residenceNo}}</div>
286
+						</div>
287
+						<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
288
+							<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">科室</div>
289
+							<div style="width:70%;padding:1px;">{{data.patientDept}}</div>
290
+						</div>
291
+						<div style="display: flex;">
292
+							<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">离体时间</div>
293
+							<div style="width:70%;padding:1px;">{{data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
294
+						</div>
295
+					</div>
296
+				</div>
297
+			</div>
298
+		</div>
299
+  </div>

+ 32 - 11
src/app/share/pathology-add/pathology-add.component.less

@@ -96,6 +96,9 @@
96 96
 				.specimen-item{
97 97
 					display: flex;
98 98
 					margin-bottom: 10px;
99
+					.specimen-name{
100
+						cursor: pointer;
101
+					}
99 102
 					.specimen-icon{
100 103
 						color: #64BD7B;
101 104
 						cursor: pointer;
@@ -107,6 +110,21 @@
107 110
 				}
108 111
 			}
109 112
 		}
113
+		.mask-style{
114
+			width: 100%;
115
+			height: 100%;
116
+			position: fixed;
117
+			top: 0;
118
+			left: 0;
119
+			z-index: 999;
120
+			display: flex;
121
+			background: rgba(0,0,0,0.2);
122
+			align-items: center;
123
+			justify-content: center;
124
+		}
125
+		.spin-style{
126
+			z-index:9999;
127
+		}
110 128
 		.bottom-btn{
111 129
 			margin-top: 10px;
112 130
 			.btn-right{
@@ -167,21 +185,24 @@
167 185
 						}
168 186
 					}
169 187
 				}
170
-				.select-item{
171
-					margin-top: 5px;
172
-					display: flex;
173
-					flex-wrap: wrap;
174
-					padding: 3px 8px;
175
-					border: 1px solid #e5e9ed;
176
-					border-radius: 5px;
177
-					margin-right: 10px;
178
-					cursor: pointer;
179
-					display: inline-block;
188
+				.specimen-list{
189
+					flex: 1;
190
+					.select-item{
191
+						margin-top: 5px;
192
+						display: flex;
193
+						flex-wrap: wrap;
194
+						padding: 3px 8px;
195
+						border: 1px solid #e5e9ed;
196
+						border-radius: 5px;
197
+						margin-right: 10px;
198
+						cursor: pointer;
199
+						display: inline-block;
200
+					}
180 201
 				}
181 202
 				
182 203
 				.activeClass{
183 204
 					color: #64BD7B;
184
-					border-color: #64BD7B;
205
+					border-color: #64BD7B !important;
185 206
 				}
186 207
 	      
187 208
 	    }

+ 492 - 104
src/app/share/pathology-add/pathology-add.component.ts

@@ -3,6 +3,7 @@ import { HttpHeaders, HttpRequest, HttpClient  } from "@angular/common/http";
3 3
 import host from "../../../assets/js/http";
4 4
 import { NzMessageService } from "ng-zorro-antd";
5 5
 import { MainService } from '../../services/main.service';
6
+import { DomSanitizer } from '@angular/platform-browser';
6 7
 import {
7 8
   FormBuilder,
8 9
   Validators,
@@ -10,6 +11,7 @@ import {
10 11
   FormControl,
11 12
 } from "@angular/forms";
12 13
 import { format, startOfDay, endOfDay, subDays} from "date-fns";
14
+import { ToolService } from "../../services/tool.service";
13 15
 
14 16
 @Component({
15 17
   selector: 'app-pathology-add',
@@ -19,13 +21,16 @@ import { format, startOfDay, endOfDay, subDays} from "date-fns";
19 21
 export class PathologyAddComponent implements OnInit {
20 22
 	
21 23
 	@Output() pathologyCancel = new EventEmitter();
22
-	@Input() content: string;
23
-
24
+	@Input() surgeryId: string;
25
+	@Input() patientId: string;
26
+	
24 27
 	constructor(
25 28
 		private http: HttpClient,
26 29
 		private message: NzMessageService,
27 30
 		private mainService: MainService,
28 31
 		private fb: FormBuilder,
32
+		private tool: ToolService,
33
+		private sanitizer: DomSanitizer
29 34
 	) { }
30 35
 	
31 36
 	btnLoading:boolean = false;
@@ -35,50 +40,14 @@ export class PathologyAddComponent implements OnInit {
35 40
 	specimenData:any=[]; //标本类型
36 41
 	isDeptLoading:boolean = false;
37 42
 	specimenModal:boolean = false; //选择标本状态
38
-	specimenList:any=[
39
-		{
40
-			name:'aaa'
41
-		},
42
-		{
43
-			name:'bbbb'
44
-		}
45
-	]; //已选标本
46
-	placeIndex:any;
47
-	systemIndex:any;
48
-	apparatusIndex:any;
49
-	specimenNameIndex:any;
50
-	placeList:any=[
51
-		{
52
-			name:'通用'
53
-		},
54
-		{
55
-			name:'左侧'
56
-		},
57
-		{
58
-			name:'通用'
59
-		},
60
-		{
61
-			name:'左侧'
62
-		},
63
-		{
64
-			name:'通用'
65
-		},
66
-		{
67
-			name:'左侧'
68
-		},
69
-		{
70
-			name:'通用'
71
-		},
72
-		{
73
-			name:'左侧'
74
-		},
75
-		{
76
-			name:'通用'
77
-		},
78
-		{
79
-			name:'左侧'
80
-		},
81
-	]; //位置来源数据
43
+	isSpinning:boolean = false; //页面加载状态
44
+	detailsData:any;
45
+	specimenList:any=[]; //已选标本
46
+	placeIndex:any = null;
47
+	systemIndex:any = null;
48
+	apparatusIndex:any = null;
49
+	specimenNameIndex:any = null;
50
+	placeList:any=[]; //位置来源数据
82 51
 	systemList:any=[]; //系统数据
83 52
 	apparatusList:any=[]; //器官数据
84 53
 	specimenNameList:any=[]; //标本名称数据
@@ -86,26 +55,221 @@ export class PathologyAddComponent implements OnInit {
86 55
 	ifSuccess: boolean; //操作成功/失败
87 56
 	promptInfo: string; //操作结果提示信息
88 57
 	promptModalShow: boolean; //操作提示框是否展示
58
+	specimenModalShow: boolean; //操作提示框是否展示
89 59
 	type:any = '未打印';
90 60
 	notModal:boolean = false;
61
+	hosId:any;
91 62
   ngOnInit() {
63
+		this.hosId = this.tool.getCurrentHospital().id;
92 64
 		this.initForm()
65
+		this.fetchDataList()
93 66
   }
94 67
 	
95 68
 	// 初始化新增form表单
96 69
 	initForm() {
97 70
 		this.validateForm = this.fb.group({
98
-		  knowledgeClass: [1, [Validators.required]],
99
-			specimen: [null, [Validators.required]],
100
-			sees: [null, [Validators.required]],
101
-			scheme: [null, [Validators.required]],
102
-			number: [null,[Validators.required]],
103
-			part: [null, [Validators.required]]
71
+		  intraoperativeRapidity: [1, [Validators.required]],
72
+			specimenGenre: [null, [Validators.required]],
73
+			intraoperativeFindings: [null, [Validators.required]],
74
+			surgicalPlan: [null, [Validators.required]],
75
+			specimenNum: [null,[Validators.required]],
76
+			takePart: [null, [Validators.required]]
77
+		});
78
+	}
79
+	
80
+	fetchDataList(){
81
+		let data = {
82
+		  idx: 0,
83
+		  sum: 9999,
84
+		  pathologyForm: {
85
+		    surgeryId: this.surgeryId || "",
86
+		    patientId: this.patientId || "",
87
+		    hosId: this.hosId || "" ,
88
+		  },
89
+		};
90
+		this.isSpinning = true;
91
+		this.mainService
92
+		  .getFetchDataList("data", "pathologyForm", data)
93
+		  .subscribe((data) => {
94
+		    this.isSpinning = false;
95
+		    this.detailsData = data.list[0];
96
+				if(this.detailsData.surgicalPlan){
97
+					this.validateForm.controls.surgicalPlan.setValue(this.detailsData.surgicalPlan);
98
+				}
99
+				if(this.detailsData.intraoperativeFindings){
100
+					this.validateForm.controls.intraoperativeFindings.setValue(this.detailsData.intraoperativeFindings);
101
+				}
102
+				this.getDicData()
103
+				this.getSampleData()
104
+				this.getSourceData()
105
+				this.getSysData()
106
+		  });
107
+	}
108
+	
109
+	// 获取标本类型
110
+	getDicData(){
111
+		this.mainService.getDictionary("list", "specimen_type").subscribe((res) => {
112
+			this.specimenData = res.filter(i=>i.extra1 == 'pathologySpecimen')
113
+			if(this.detailsData.specimenType){
114
+				this.validateForm.controls.specimenGenre.setValue(this.detailsData.specimenType.id);
115
+			}
116
+			if(this.detailsData.specimenNum){
117
+				this.validateForm.controls.specimenNum.setValue(this.detailsData.specimenNum);
118
+			}
119
+			if(this.detailsData.takePart){
120
+				this.validateForm.controls.takePart.setValue(this.detailsData.takePart);
121
+			}
104 122
 		});
105 123
 	}
106 124
 	
125
+	// 获取标本-位置来源
126
+	getSourceData(){
127
+		this.mainService.getDictionary("list", "pathology_position").subscribe((res) => {
128
+			this.placeList = res
129
+		});
130
+	}
131
+	
132
+	// 获取标本-系统
133
+	getSysData(){
134
+		let postData: any = {
135
+		  idx: 0,
136
+		  sum: 9999,
137
+		  dictionaryTree: {
138
+		    level: 1,
139
+		    key: 'pathology_specimen',
140
+		    deleted: 0,
141
+		  },
142
+		};
143
+		this.mainService
144
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
145
+		  .subscribe((data) => {
146
+		    this.systemList = data.list;
147
+		  });
148
+
149
+	}
150
+	
151
+	// 获取标本-器官
152
+	getApparatusData(id,item,type){
153
+		let postData: any = {
154
+		  idx: 0,
155
+		  sum: 9999,
156
+		  dictionaryTree: {
157
+		    level: 2,
158
+				parent:id,
159
+		    key: 'pathology_specimen',
160
+		    deleted: 0,
161
+		  },
162
+		};
163
+		this.mainService
164
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
165
+		  .subscribe((data) => {
166
+				if(data.list.length>0){
167
+					this.apparatusList = data.list;
168
+					if(type=='edit'){
169
+						setTimeout(_=>{
170
+							let index3 = this.apparatusList.findIndex(i=>i.id==item.organ.id)
171
+							this.apparatusIndex = index3
172
+							this.apparatusId = Number(item.organ.id);
173
+						},100)
174
+					}
175
+				}else{
176
+					this.message.info('暂无数据')
177
+				}
178
+		  });
179
+	}
180
+	
181
+	// 获取标本-标本名称
182
+	getSpNameData(id,item,type){
183
+		let postData: any = {
184
+		  idx: 0,
185
+		  sum: 9999,
186
+		  dictionaryTree: {
187
+		    level: 3,
188
+				parent:id,
189
+		    key: 'pathology_specimen',
190
+		    deleted: 0,
191
+		  },
192
+		};
193
+		this.mainService
194
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
195
+		  .subscribe((data) => {
196
+		    this.specimenNameList = data.list;
197
+				this.specimenNameList.push({
198
+					name:'其他',
199
+					id:'qita'
200
+				})
201
+				if(type=='edit'){
202
+					if(item.sample){
203
+						this.validateSpecimenForm = this.fb.group({
204
+						  remark: [null, [Validators.required]]
205
+						});
206
+						setTimeout(_=>{
207
+							let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
208
+							this.specimenNameIndex = index4
209
+							this.specimenNameName = item.sample.name
210
+							this.specimenNameId = Number(item.sample.id);
211
+						},100)
212
+					}else{
213
+						this.validateSpecimenForm = this.fb.group({
214
+						  remark: [null, [Validators.required]],
215
+							specimenName: [null, [Validators.required]]
216
+						});
217
+						this.specimenNameIndex = this.specimenNameList.length-1
218
+						this.specimenNameName = 'qita'
219
+						this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
220
+					}
221
+					setTimeout(_=>{
222
+						this.validateSpecimenForm.controls.remark.setValue(item.remark);
223
+						this.specimenModal = true
224
+					},50)
225
+				}
226
+		  });
227
+	}
228
+	
229
+	// 删除标本
230
+	delModal:boolean = false
231
+	coopId:any;
107 232
 	specimenDel(e,item,index){
108
-		this.specimenList.splice(index,1)
233
+		this.delModal = true
234
+		this.coopId = item.id
235
+	}
236
+	
237
+	// 确定删除
238
+	confirmDel(){
239
+		this.mainService
240
+		  .coopTypeConfig(
241
+		    "rmvData",
242
+		    "pathologySpecimen",
243
+		     [this.coopId]
244
+		  )
245
+		  .subscribe((data) => {
246
+		    this.btnLoading = false;
247
+		    this.delModal = false;
248
+				this.getSampleData()
249
+		    if (data.status==200) {
250
+		      this.showSpecimenModal("删除", true, "");
251
+		    } else {
252
+		      this.showSpecimenModal("删除", false, data.data[0].msg);
253
+		    }
254
+		  });
255
+	}
256
+	// 确定删除
257
+	hideDelModal() {
258
+	  this.delModal = false;
259
+	}
260
+	
261
+	// 编辑标本
262
+	specimenDetailId:any = null;
263
+	specimenEdit(e,item,index){
264
+		this.specimenDetailId = item.id
265
+		let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
266
+		this.placeIndex = index1
267
+		this.placeId = Number(item.partSource.id)
268
+		let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
269
+		this.systemIndex = index2
270
+		this.systemId = Number(item.system.id)
271
+		this.getApparatusData(item.system.id,item,'edit')
272
+		this.getSpNameData(item.organ.id,item,'edit')
109 273
 	}
110 274
 	
111 275
 	// 选择标本
@@ -113,43 +277,159 @@ export class PathologyAddComponent implements OnInit {
113 277
 		this.validateSpecimenForm = this.fb.group({
114 278
 		  remark: [null, [Validators.required]]
115 279
 		});
280
+		this.specimenDetailId = null;
281
+		this.placeIndex = null;
282
+		this.systemIndex = null;
283
+		this.apparatusIndex = null;
284
+		this.specimenNameIndex = null;
285
+		this.placeId = null;
286
+		this.systemId = null;
287
+		this.apparatusId = null;
288
+		this.specimenNameId = null;
289
+		this.placeList=[]; //位置来源数据
290
+		this.systemList=[]; //系统数据
291
+		this.apparatusList=[]; //器官数据
292
+		this.specimenNameList=[]; //标本名称数据
293
+		this.getSourceData()
294
+		this.getSysData()
116 295
 		this.specimenModal = true
117 296
 	}
118 297
 	
119 298
 	// 选择位置来源
299
+	placeId:any = null;
120 300
 	placeClick(e,item,index){
301
+		this.placeId = item.id
121 302
 		this.placeIndex = index
122 303
 	}
123 304
 	
124 305
 	// 选择系统
306
+	systemId:any = null;
125 307
 	systemClick(e,item,index){
308
+		this.systemId = Number(item.id)
126 309
 		this.systemIndex = index
127
-		this.getApparatus(item)
310
+		this.apparatusList = [];
311
+		this.apparatusId = null;
312
+		this.apparatusIndex = null;
313
+		this.getApparatusData(item.id,{},'select')
128 314
 	}
129 315
 	
130 316
 	// 选择器官
317
+	apparatusId:any = null;
131 318
 	apparatusClick(e,item,index){
319
+		this.apparatusId = Number(item.id)
132 320
 		this.apparatusIndex = index
133
-		this.getSpecimenName(item)
321
+		this.specimenNameList = [];
322
+		this.specimenNameId = null;
323
+		this.specimenNameIndex = null;
324
+		this.getSpNameData(item.id,{},'select')
134 325
 	}
135 326
 	
136 327
 	// 选择标本名称
328
+	specimenNameId:any = null;
329
+	specimenNameName:any = null;
137 330
 	specimenNameClick(e,item,index){
138 331
 		this.specimenNameIndex = index
332
+		let remark = this.validateSpecimenForm.value.remark
333
+		if(item.id == 'qita'){
334
+			this.validateSpecimenForm = this.fb.group({
335
+			  remark: [remark?remark:null, [Validators.required]],
336
+				specimenName: [null, [Validators.required]]
337
+			});
338
+			this.specimenNameId = 'null'
339
+			this.specimenNameName = 'qita'
340
+		}else{
341
+			this.validateSpecimenForm = this.fb.group({
342
+			  remark: [remark?remark:null, [Validators.required]],
343
+			});
344
+			this.specimenNameId = item.id
345
+			this.specimenNameName = item.name
346
+		}
139 347
 	}
140 348
 	
141
-	// 获取器官
142
-	getApparatus(item){
143
-		
144
-	}
145
-	
146
-	// 获取标本名称
147
-	getSpecimenName(item){
148
-		
349
+	// 保存标本
350
+	btnSpLoading:boolean = false;
351
+	submitSpecimen(){
352
+		if(this.placeIndex==null){
353
+			this.message.error('请选择位置来源')
354
+			return
355
+		}
356
+		if(this.systemIndex==null){
357
+			this.message.error('请选择系统')
358
+			return
359
+		}
360
+		if(this.apparatusIndex==null){
361
+			this.message.error('请选择器官')
362
+			return
363
+		}
364
+		if(this.specimenNameIndex==null){
365
+			this.message.error('请选择标本名称')
366
+			return
367
+		}
368
+		for (const i in this.validateSpecimenForm.controls) {
369
+		  this.validateSpecimenForm.controls[i].markAsDirty();
370
+		  this.validateSpecimenForm.controls[i].updateValueAndValidity();
371
+		}
372
+		if (this.validateSpecimenForm.invalid) return;
373
+		let data = {
374
+			pathologyFormId:this.detailsData.id,
375
+			partSource:{
376
+				id:this.placeId
377
+			},
378
+			system:{
379
+				id:this.systemId
380
+			},
381
+			organ:{
382
+				id:this.apparatusId
383
+			},
384
+			sample:{
385
+				id:this.specimenNameId
386
+			},
387
+			hosId:this.hosId,
388
+			specimenName:null,
389
+			id:'',
390
+			remark:this.validateSpecimenForm.value.remark
391
+		};
392
+		if(this.specimenNameName == 'qita'){
393
+			delete data.sample
394
+			data.specimenName = this.validateSpecimenForm.value.specimenName
395
+		}else{
396
+			data.specimenName = this.specimenNameName
397
+		}
398
+		let queryType = null
399
+		if(this.specimenDetailId){
400
+			queryType = 'updData'
401
+			data.id = this.specimenDetailId
402
+		}else{
403
+			queryType = 'addData'
404
+			delete data.id
405
+		}
406
+		this.btnSpLoading = true;
407
+		this.mainService
408
+		  .simplePost(queryType, "pathologySpecimen", data)
409
+		  .subscribe((res) => {
410
+		    this.btnSpLoading = false;
411
+		    if (res.status == 200) {
412
+		      this.showSpecimenModal("操作", true, "");
413
+		    } else {
414
+		      this.showSpecimenModal("操作", false, res.msg);
415
+		    }
416
+		  });
149 417
 	}
150 418
 	
151
-	submitSpecimen(){
152
-		this.hideSpecimenModal()
419
+	// 获取标本列表
420
+	getSampleData(){
421
+		let data={
422
+			idx: 0,
423
+			sum: 9999,
424
+			pathologySpecimen:{
425
+				pathologyFormId:this.detailsData.id
426
+			}
427
+		}
428
+		this.mainService
429
+		  .getFetchDataList("data", "pathologySpecimen", data)
430
+		  .subscribe((res) => {
431
+		    this.specimenList = res.list
432
+		  });
153 433
 	}
154 434
 	
155 435
 	hideSpecimenModal(){
@@ -167,62 +447,160 @@ export class PathologyAddComponent implements OnInit {
167 447
 		
168 448
 	}
169 449
 	
450
+	//未打印提交
451
+	printLoading:boolean = false;
170 452
 	submitPrintForm(): void{
171
-		// for (const i in that.validateForm.controls) {
172
-		//   that.validateForm.controls[i].markAsDirty();
173
-		//   that.validateForm.controls[i].updateValueAndValidity();
174
-		// }
175
-		// if (that.validateForm.invalid) return;
176
-		this.hideNotModal()
453
+		let that = this
454
+		for (const i in this.validatePrintForm.controls) {
455
+		  this.validatePrintForm.controls[i].markAsDirty();
456
+		  this.validatePrintForm.controls[i].updateValueAndValidity();
457
+		}
458
+		if (this.validatePrintForm.invalid) return;
459
+		
460
+		let data: any = {
461
+			pathologyForm:{
462
+				...this.validateForm.value,
463
+				...this.detailsData,
464
+				inVitroTime:this.validatePrintForm.value.inVitroTime,
465
+				surgeryId: this.surgeryId || "",
466
+				patientId: this.patientId || "",
467
+				hosId: this.hosId || "" ,
468
+				handoverUserId:this.handoverUserId,
469
+				specimenType:{
470
+					id:this.validateForm.value.specimenGenre
471
+				}
472
+			}
473
+		};
474
+		delete data.pathologyForm.patientDTO
475
+		delete data.pathologyForm.surgeryDeptDTO
476
+		delete data.pathologyForm.surgeryDoctorDTO
477
+		delete data.pathologyForm.specimenGenre
478
+		this.printLoading = true;
479
+		this.mainService
480
+		  .pathologyPrint(data)
481
+		  .subscribe((res:any) => {
482
+				
483
+				let arr = res.data;
484
+		    if(arr.applyBarCode){
485
+		    	arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
486
+		    }
487
+		    for(let i of arr.specimenList){
488
+		    	i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
489
+		    }
490
+		    that.printLoading = false;
491
+		    that.printData = arr;
492
+		    setTimeout(() => {
493
+		      const printContent = document.getElementById("report");
494
+		      const WindowPrt = window.open("", "", "width=100,height=1000");
495
+		    	WindowPrt.document.body.innerHTML = printContent.innerHTML;
496
+		    	setTimeout(_=>{
497
+		    		WindowPrt.document.close();
498
+		    		WindowPrt.focus();
499
+		    		WindowPrt.print();
500
+		    		WindowPrt.close();
501
+		    		that.hideModal();
502
+		    	},500)
503
+		    }, 500);
504
+		  });
177 505
 	}
178 506
 	
179 507
 	// 监听工号数据
508
+	handoverUserId:any = null;
180 509
 	numberChange(e){
181
-		console.log(555,e)
510
+		if(e.length < 3) {
511
+			this.validatePrintForm.controls.name.setValue('');
512
+			return
513
+		}
514
+		let data = {
515
+		  idx: 0,
516
+		  sum: 9999,
517
+		  user: {
518
+		    account: e || "",
519
+		    hospital: { id: this.hosId || "" }
520
+		  },
521
+		};
522
+		this.mainService
523
+		  .getFetchDataList("data", "user", data)
524
+		  .subscribe((data) => {
525
+				if(data.list.length>0){
526
+					this.validatePrintForm.controls.name.setValue(data.list[0].name);
527
+					this.handoverUserId = data.list[0].id
528
+				}else{
529
+					this.validatePrintForm.controls.name.setValue('');
530
+					this.handoverUserId =null
531
+				}
532
+		  });
182 533
 	}
183 534
 	
535
+	printData:any;
184 536
 	submitForm(): void{
185
-		if(this.type=='未打印'){
537
+		var that = this;
538
+		for (const i in that.validateForm.controls) {
539
+		  that.validateForm.controls[i].markAsDirty();
540
+		  that.validateForm.controls[i].updateValueAndValidity();
541
+		}
542
+		if (that.validateForm.invalid) return;
543
+		if(this.detailsData.status.name=='未打印'){
186 544
 			this.notModal = true
187 545
 			this.validatePrintForm = this.fb.group({
188
-			  time: [null, [Validators.required]],
546
+			  inVitroTime: [null, [Validators.required]],
189 547
 				jobNumber: [null, [Validators.required]],
190 548
 				name:[null, [Validators.required]],
191 549
 			});
192 550
 			let date = new Date();
193 551
 			this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
194
-			console.log(444,this.startDate)
195
-			this.validatePrintForm.controls.time.setValue(this.startDate);
552
+			this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
196 553
 			return
197 554
 		}
198
-		var that = this;
199
-		// for (const i in that.validateForm.controls) {
200
-		//   that.validateForm.controls[i].markAsDirty();
201
-		//   that.validateForm.controls[i].updateValueAndValidity();
202
-		// }
203
-		// if (that.validateForm.invalid) return;
204
-		// let data: any = {
205
-		// 	startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
206
-		// 	endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
207
-		// 	hosId:this.hosId,
208
-		// 	pharmacy:this.validateForm.value.department,
209
-		// 	loadAllConsumeDept:this.validateForm.value.loadAllConsumeDept?1:0
210
-		// };
211
-		  
212
-		// that.btnLoading = true;
213
-		// that.mainService
214
-		//   .simplePost("addData", "drugsBatch", data)
215
-		//   .subscribe((data) => {
216
-		//     that.btnLoading = false;
217
-		//     that.hideModal();
218
-		//     that.initForm();
219
-		//     if (data.status == 200) {
220
-		//       that.showPromptModal("操作", true, "");
221
-		//     } else {
222
-		//       that.showPromptModal("操作", false, data.msg);
223
-		//     }
224
-		//   });
225
-		this.hideModal()
555
+
556
+		let data: any = {
557
+			pathologyForm:{
558
+				...this.validateForm.value,
559
+				...this.detailsData,
560
+				surgeryId: this.surgeryId || "",
561
+				patientId: this.patientId || "",
562
+				hosId: this.hosId || "" ,
563
+				specimenType:{
564
+					id:this.validateForm.value.specimenGenre
565
+				}
566
+			}
567
+		};
568
+		delete data.pathologyForm.patientDTO
569
+		delete data.pathologyForm.surgeryDeptDTO
570
+		delete data.pathologyForm.surgeryDoctorDTO 
571
+		delete data.pathologyForm.specimenGenre 
572
+		that.btnLoading = true;
573
+		that.mainService
574
+		  .pathologyPrint(data)
575
+		  .subscribe((res:any) => {
576
+				let arr = res.data;
577
+				if(arr.applyBarCode){
578
+					arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
579
+				}
580
+				for(let i of arr.specimenList){
581
+					i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
582
+				}
583
+				that.btnLoading = false;
584
+				that.printData = arr;
585
+		    setTimeout(() => {
586
+		      const printContent = document.getElementById("report");
587
+		      const WindowPrt = window.open("", "", "width=100,height=1000");
588
+					WindowPrt.document.body.innerHTML = printContent.innerHTML;
589
+					setTimeout(_=>{
590
+						WindowPrt.document.close();
591
+						WindowPrt.focus();
592
+						WindowPrt.print();
593
+						WindowPrt.close();
594
+						that.hideModal();
595
+					},500)
596
+		    }, 500);
597
+		  });
598
+	}
599
+	
600
+	// 关闭标本
601
+	closeSpecimenModel(){
602
+		this.getSampleData()
603
+		this.hideSpecimenModal()
226 604
 	}
227 605
 	
228 606
 	closeModel(){
@@ -242,5 +620,15 @@ export class PathologyAddComponent implements OnInit {
242 620
 	    this.promptModalShow = true;
243 621
 	  }, 100);
244 622
 	}
623
+	
624
+	showSpecimenModal(con, success, promptInfo?) {
625
+	  this.specimenModalShow = false;
626
+	  this.promptContent = con;
627
+	  this.ifSuccess = success;
628
+	  this.promptInfo = promptInfo;
629
+	  setTimeout(() => {
630
+	    this.specimenModalShow = true;
631
+	  }, 100);
632
+	}
245 633
 }
246 634
 

+ 167 - 0
src/app/share/pathology-detail/pathology-detail.component.html

@@ -0,0 +1,167 @@
1
+<div class="pathology-box display_flex align-items_center justify-content_flex-center">
2
+	<div class="pathology-content" *ngIf="!isSpinning">
3
+		<div class="title">查看详情
4
+		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
5
+		<div class="content">
6
+			<div class="content-item boder-right">
7
+				<div class="form-title-box">
8
+					<div class="form-title width-150"><span class="font-weight-500">是否术中快速:</span>{{detailsData.intraoperativeRapidity==1?'是':'否'}}</div>
9
+					<div class="form-title width-200"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
10
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
11
+					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
12
+				</div>
13
+				<div class="form-title-box">
14
+					<div class="form-title width-150"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
15
+					<div class="form-title width-200"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
16
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}岁</div>
17
+				</div>
18
+
19
+				<div class="form-list">
20
+					<div class="form-title font-weight-500">诊断:</div>
21
+					<div class="indent">
22
+						{{detailsData.diagnose||'无'}}
23
+					</div>
24
+				</div>
25
+				
26
+				<div class="form-list">
27
+					<div class="form-title font-weight-500">病理摘要:</div>
28
+					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
29
+				</div>
30
+				<div class="form-list">
31
+					<div class="form-title font-weight-500">手术方案:</div>
32
+					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
33
+				</div>
34
+				<div class="form-list">
35
+					<div class="form-title font-weight-500">术中所见:</div>
36
+					<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
37
+				</div>
38
+
39
+				<div class="form-title-box">
40
+					<div class="form-title width-150"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
41
+					<div class="form-title width-200"><span class="font-weight-500">标本件数:</span>{{detailsData.specimenNum||'无'}}</div>
42
+					<div class="form-title"><span class="font-weight-500">采取部位:</span>{{detailsData.takePart||'无'}}</div>
43
+					<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
44
+				</div>
45
+				
46
+				<div class="form-title-box">
47
+					<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
48
+					<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
49
+				</div>
50
+				
51
+				<div class="form-list">
52
+					<div class="form-title font-weight-500">标本:</div>
53
+					<div class="form-title-box">
54
+						<div class="form-title" *ngFor="let item of specimenList">
55
+							{{item.partSource?item.partSource.name:''}} <span *ngIf="item.system">-</span>
56
+							{{item.system?item.system.name:''}} <span *ngIf="item.organ">-</span>
57
+							{{item.organ?item.organ.name:''}} <span *ngIf="item.sample">-</span>
58
+							{{item.sample?item.sample.name:''}}
59
+						</div>
60
+					</div>
61
+				</div>
62
+
63
+			</div>
64
+			
65
+			<div class="content-item-right">
66
+				<div class="step-title">病理闭环</div>
67
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
68
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
69
+							<nz-step
70
+								[nzDescription]="tpl"
71
+							>
72
+							</nz-step>
73
+							<ng-template #tpl>
74
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
75
+									<div style="color: #49B856;">{{item.operationType.name}}</div>
76
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
77
+								</div>
78
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
79
+									<div>{{item.operationType.name}}</div>
80
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
81
+								</div>
82
+							</ng-template>
83
+						</ng-container>
84
+				</nz-steps>
85
+			</div>
86
+		</div>
87
+		<div class="display_flex justify-content_flex-center bottom-btn">
88
+			<button class="btn btn-right" *ngIf="detailsData.status.value==6 || 
89
+			detailsData.status.value==7 || detailsData.status.value==8 || 
90
+			detailsData.status.value==9 || detailsData.status.value==10"nz-button nzType="primary" (click)="closeDetailMoadl()">确定</button>
91
+			
92
+			<button class="btn btn-right" *ngIf="detailsData.status.value==2 || 
93
+			detailsData.status.value==3 || detailsData.status.value==4 || 
94
+			detailsData.status.value==5" nz-button nzType="primary" (click)="submitPrint()" [nzLoading]="btnLoading">补打</button>
95
+			
96
+			<!-- <button class="btn btn-right" *ngIf="detailsData.status.value==2 || 
97
+			detailsData.status.value==3 || detailsData.status.value==4 || 
98
+			detailsData.status.value==5" nz-button nzType="primary" 
99
+			(click)="immobilization()">标本固定</button> -->
100
+			
101
+			<button class="btn cancel" nz-button nzType="default" (click)="closeDetailMoadl()">取消</button>
102
+		</div>
103
+	</div>
104
+	
105
+	<div class="mask-style" *ngIf="isSpinning">
106
+		<nz-spin nzSimple class="spin-style"></nz-spin>
107
+	</div>
108
+</div>
109
+
110
+<!-- 打印 -->
111
+  <div id="report" style="display: none;">
112
+		<div class="monad">
113
+			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>1" style="border: 1px solid #AAAAAA;
114
+				border-radius: 5px;font-size: 12px;">
115
+				<img style="width: 100%;height: 90px;border-radius: 5px;" [src]="printData.applyBarCode" alt="">
116
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;border-top: 1px solid #aaa;">
117
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">患者</div>
118
+					<div style="width:70%;padding:1px;">{{printData.patientName}}({{printData.patientAge}}岁)</div>
119
+				</div>
120
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
121
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">住院信息</div>
122
+					<div style="width:70%;padding:1px;">{{printData.patientBedNum}}床/{{printData.residenceNo}}</div>
123
+				</div>
124
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
125
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">科室</div>
126
+					<div style="width:70%;padding:1px;">{{printData.patientDept}}</div>
127
+				</div>
128
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
129
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">部位</div>
130
+					<div style="width:70%;padding:1px;">{{printData.takePart}}</div>
131
+				</div>
132
+				<div style="display: flex;">
133
+					<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">标本数</div>
134
+					<div style="width:70%;padding:1px;">{{printData.specimenNum}}</div>
135
+				</div>
136
+			</div>
137
+			 <div style="height: 10px;"></div>
138
+			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
139
+				<div *ngFor="let data of printData.specimenList; let index=index;">
140
+				 <div style="height: 30px;"></div>
141
+				 <div style="border: 1px solid #AAAAAA;border-radius: 5px;">
142
+					 <img style="width: 100%;height: 90px;border-radius: 5px;" [src]="data.barCode" alt="">
143
+					 <div class="monad-sign" style="border-bottom: 1px solid #AAAAAA; padding-left:1px;">
144
+					 	<div>{{data.system}}-{{data.organ}}</div>
145
+					 	<div>({{index+1}}/{{printData.specimenList.length}}) {{data.partSource}}-{{data.specimenName}}</div>
146
+					 </div>
147
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
148
+					 	<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">患者</div>
149
+					 	<div style="width:70%;padding:1px;">{{data.patientName}}({{data.patientAge}}岁)</div>
150
+					 </div>
151
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
152
+					 	<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">住院信息</div>
153
+					 	<div style="width:70%;padding:1px;">{{data.patientBedNum}}床/{{data.residenceNo}}</div>
154
+					 </div>
155
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
156
+					 	<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">科室</div>
157
+					 	<div style="width:70%;padding:1px;">{{data.patientDept}}</div>
158
+					 </div>
159
+					 <div style="display: flex;">
160
+					 	<div style="width:30%;border-right: 1px solid #AAAAAA;padding:1px;">离体时间</div>
161
+					 	<div style="width:70%;padding:1px;">{{data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
162
+					 </div>
163
+				 </div>
164
+				</div>
165
+			</div>
166
+		</div>
167
+  </div>

+ 155 - 0
src/app/share/pathology-detail/pathology-detail.component.less

@@ -0,0 +1,155 @@
1
+.pathology-box {
2
+  position: fixed;
3
+	left: 0;
4
+	top: 0;
5
+	width: 100%;
6
+	height: 100%;
7
+	background: rgba(0, 0, 0, 0.4);
8
+	z-index: 99;
9
+	.pathology-content{
10
+		width: 80%;
11
+		background: #fff;
12
+		border-radius: 5px;
13
+		padding: 10px 20px;
14
+		color: #000;
15
+		.title {
16
+		  width: 100%;
17
+		  text-align: center;
18
+		  font-size: 18px;
19
+		  position: relative;
20
+		
21
+		  i {
22
+		    position: absolute;
23
+		    right: 0;
24
+		    top: 0;
25
+		    font-size: 20px;
26
+		    color: #666;
27
+		    cursor: pointer;
28
+		    padding: 0 5px;
29
+		  }
30
+		}
31
+		.content{
32
+			width: 100%;
33
+			background: #f9fafb;
34
+			border: 1px solid #e5e9ed;
35
+			border-radius: 5px;
36
+			overflow: hidden;
37
+			margin-top: 12px;
38
+			display: flex;
39
+			// .addForm{
40
+				// display: flex;
41
+				.font-weight-500{
42
+					color: #000;
43
+					font-weight: 500;
44
+				}
45
+				.ant-select{
46
+					width: 100%;
47
+				}
48
+				.content-item{
49
+					height: auto;
50
+					max-height: 460px;
51
+					overflow-y: auto;
52
+					width: 75%;
53
+					padding: 15px;
54
+					.form-title-box{
55
+						display: flex;
56
+						margin-bottom: 10px;
57
+						.form-title{
58
+							color: #333;
59
+							margin-right: 40px;
60
+						}
61
+						.width-150{
62
+							width: 150px;
63
+						}
64
+						.width-200{
65
+							width: 200px;
66
+						}
67
+					}
68
+					.center{
69
+						text-align: center;
70
+						padding: 10px 0;
71
+					}
72
+					.disp-fl{
73
+						display: flex;
74
+						align-items: center;
75
+						.width-120{
76
+							width: 85px;
77
+						}
78
+						.ant-input{
79
+							width: 300px;
80
+						}
81
+					}
82
+					.form-list{
83
+						margin-bottom: 10px;
84
+						.indent{
85
+							text-indent: 2ch;
86
+							color: #333;
87
+						}
88
+					}
89
+					.ant-form-item {
90
+					  margin-bottom: 14px;
91
+						display: flex;
92
+						flex-wrap: wrap;
93
+					  .ant-form-item-label {
94
+					    text-align: left;
95
+							font-weight: 500;
96
+					  }
97
+						.ant-form-item-control-wrapper{
98
+							.ant-form-item-control{
99
+								width: 400px;
100
+							}
101
+						}
102
+					}
103
+					.add-icon-class{
104
+						border: 1px solid #e5e9ed;
105
+						border-radius: 3px;
106
+						width: 26px;
107
+						height: 26px;
108
+						line-height: 26px;
109
+						text-align: center;
110
+						position: relative;
111
+						top: 7px;
112
+						cursor: pointer;
113
+						.form-icon{
114
+							
115
+						}
116
+					}
117
+				}
118
+				.content-item-right{
119
+					width: 25%;
120
+					height: auto;
121
+					max-height: 460px;
122
+					overflow-y: auto;
123
+					padding: 15px;
124
+					.step-title{
125
+						font-size: 16px;
126
+						font-weight: 500;
127
+						margin-bottom: 10px;
128
+					}
129
+				}
130
+				.boder-right{
131
+					border-right: 1px solid #e5e9ed;
132
+				}
133
+				.specimen-item{
134
+					display: flex;
135
+					margin-bottom: 10px;
136
+					.specimen-icon{
137
+						color: #64BD7B;
138
+						cursor: pointer;
139
+						font-size: 20px;
140
+						position: relative;
141
+						top: -4px;
142
+						left: 2px;
143
+					}
144
+				}
145
+			// }
146
+		}
147
+		.bottom-btn{
148
+			margin-top: 10px;
149
+			.btn-right{
150
+				margin-right: 10px;
151
+			}
152
+		}
153
+	}
154
+	
155
+}

+ 672 - 0
src/app/share/pathology-detail/pathology-detail.component.ts

@@ -0,0 +1,672 @@
1
+import { Component, ElementRef, Output, Input, OnInit, EventEmitter } from '@angular/core';
2
+import { HttpHeaders, HttpRequest, HttpClient  } from "@angular/common/http";
3
+import host from "../../../assets/js/http";
4
+import { NzMessageService } from "ng-zorro-antd";
5
+import { MainService } from '../../services/main.service';
6
+import {
7
+  FormBuilder,
8
+  Validators,
9
+  FormGroup,
10
+  FormControl,
11
+} from "@angular/forms";
12
+import { format, startOfDay, endOfDay, subDays} from "date-fns";
13
+import { ToolService } from "../../services/tool.service";
14
+import { DomSanitizer } from '@angular/platform-browser';
15
+
16
+@Component({
17
+  selector: 'app-pathology-detail',
18
+  templateUrl: './pathology-detail.component.html',
19
+  styleUrls: ['./pathology-detail.component.less']
20
+})
21
+export class PathologyDetailComponent implements OnInit {
22
+	
23
+	@Output() pathologyCancel = new EventEmitter();
24
+	@Input() surgeryId: string;
25
+	@Input() patientId: string;
26
+	
27
+	constructor(
28
+		private http: HttpClient,
29
+		private message: NzMessageService,
30
+		private mainService: MainService,
31
+		private fb: FormBuilder,
32
+		private tool: ToolService,
33
+		private sanitizer: DomSanitizer
34
+	) { }
35
+	
36
+	specimenLookData:any=[
37
+		{
38
+			name:'通用-头颈部-口腔-黏膜活检',
39
+		},
40
+		{
41
+			name:'通用-头颈部-口腔-黏膜活检',
42
+		},
43
+		{
44
+			name:'通用-头颈部-口腔-黏膜活检',
45
+		},
46
+		{
47
+			name:'通用-头颈部-口腔-黏膜活检',
48
+		}
49
+	]
50
+	stepLength:any = 0;
51
+	btnLoading:boolean = false;
52
+	validateForm: FormGroup; //新增/编辑表单
53
+	validateSpecimenForm: FormGroup; //选择标本表单
54
+	validatePrintForm: FormGroup;
55
+	specimenData:any=[]; //标本类型
56
+	isDeptLoading:boolean = false;
57
+	specimenModal:boolean = false; //选择标本状态
58
+	isSpinning:boolean = false; //页面加载状态
59
+	detailsData:any;
60
+	specimenList:any=[]; //已选标本
61
+	placeIndex:any = null;
62
+	systemIndex:any = null;
63
+	apparatusIndex:any = null;
64
+	specimenNameIndex:any = null;
65
+	placeList:any=[]; //位置来源数据
66
+	systemList:any=[]; //系统数据
67
+	apparatusList:any=[]; //器官数据
68
+	specimenNameList:any=[]; //标本名称数据
69
+	promptContent: string; //操作提示框提示信息
70
+	ifSuccess: boolean; //操作成功/失败
71
+	promptInfo: string; //操作结果提示信息
72
+	promptModalShow: boolean; //操作提示框是否展示
73
+	specimenModalShow: boolean; //操作提示框是否展示
74
+	type:any = '未打印';
75
+	notModal:boolean = false;
76
+	hosId:any;
77
+	pathologyLogs:any //日志
78
+  ngOnInit() {
79
+		this.hosId = this.tool.getCurrentHospital().id;
80
+		// this.initForm()
81
+		this.fetchDataList()
82
+  }
83
+	
84
+	// 补打
85
+	submitPrint(){
86
+		let that = this
87
+		let data: any = {
88
+			pathologyForm:{
89
+				...this.detailsData,
90
+				surgeryId: this.surgeryId || "",
91
+				patientId: this.patientId || "",
92
+				hosId: this.hosId || "" 
93
+			}
94
+		};
95
+		delete data.pathologyForm.patientDTO
96
+		delete data.pathologyForm.surgeryDeptDTO
97
+		delete data.pathologyForm.surgeryDoctorDTO
98
+		delete data.pathologyForm.specimenGenre
99
+		this.printLoading = true;
100
+		this.mainService
101
+		  .pathologyPrint(data)
102
+		  .subscribe((res:any) => {
103
+		    let arr = res.data;
104
+		    if(arr.applyBarCode){
105
+		    	arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
106
+		    }
107
+		    for(let i of arr.specimenList){
108
+		    	i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
109
+		    }
110
+		    that.printLoading = false;
111
+		    that.printData = arr;
112
+		    setTimeout(() => {
113
+		      const printContent = document.getElementById("report");
114
+		      const WindowPrt = window.open("", "", "width=100,height=1000");
115
+		    	WindowPrt.document.body.innerHTML = printContent.innerHTML;
116
+		    	setTimeout(_=>{
117
+		    		WindowPrt.document.close();
118
+		    		WindowPrt.focus();
119
+		    		WindowPrt.print();
120
+		    		WindowPrt.close();
121
+		    		that.hideModal();
122
+		    	},500)
123
+		    }, 500);
124
+		  });
125
+	}
126
+	
127
+	// 返回
128
+	closeDetailMoadl(){
129
+		this.pathologyCancel.emit()
130
+	}
131
+	
132
+	// 初始化新增form表单
133
+	initForm() {
134
+		this.validateForm = this.fb.group({
135
+		  intraoperativeRapidity: [1, [Validators.required]],
136
+			specimenGenre: [null, [Validators.required]],
137
+			intraoperativeFindings: [null, [Validators.required]],
138
+			surgicalPlan: [null, [Validators.required]],
139
+			specimenNum: [null,[Validators.required]],
140
+			takePart: [null, [Validators.required]]
141
+		});
142
+	}
143
+	
144
+	// 获取详情
145
+	fetchDataList(){
146
+		let data = {
147
+		  idx: 0,
148
+		  sum: 9999,
149
+		  pathologyForm: {
150
+		    surgeryId: this.surgeryId || "",
151
+		    patientId: this.patientId || "",
152
+		    hosId: this.hosId || "" ,
153
+		  },
154
+		};
155
+		this.isSpinning = true;
156
+		this.mainService
157
+		  .getFetchDataList("data", "pathologyForm", data)
158
+		  .subscribe((data) => {
159
+		    this.isSpinning = false;
160
+		    this.detailsData = data.list[0];
161
+				this.pathologyLogs = data.list[0].formLogDTOS
162
+				this.stepLength = this.pathologyLogs.length
163
+				// if(this.detailsData.surgicalPlan){
164
+				// 	this.validateForm.controls.surgicalPlan.setValue(this.detailsData.surgicalPlan);
165
+				// }
166
+				// if(this.detailsData.intraoperativeFindings){
167
+				// 	this.validateForm.controls.intraoperativeFindings.setValue(this.detailsData.intraoperativeFindings);
168
+				// }
169
+				this.getSampleData()
170
+		  });
171
+	}
172
+	
173
+	// 获取标本类型
174
+	getDicData(){
175
+		this.mainService.getDictionary("list", "pathology_specimen_type").subscribe((res) => {
176
+			this.specimenData = res
177
+		});
178
+	}
179
+	
180
+	// 获取标本-位置来源
181
+	getSourceData(){
182
+		this.mainService.getDictionary("list", "pathology_position").subscribe((res) => {
183
+			this.placeList = res
184
+		});
185
+	}
186
+	
187
+	// 获取标本-系统
188
+	getSysData(){
189
+		let postData: any = {
190
+		  idx: 0,
191
+		  sum: 9999,
192
+		  dictionaryTree: {
193
+		    level: 1,
194
+		    key: 'pathology_specimen',
195
+		    deleted: 0,
196
+		  },
197
+		};
198
+		this.mainService
199
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
200
+		  .subscribe((data) => {
201
+		    this.systemList = data.list;
202
+		  });
203
+
204
+	}
205
+	
206
+	// 获取标本-器官
207
+	getApparatusData(id,item,type){
208
+		let postData: any = {
209
+		  idx: 0,
210
+		  sum: 9999,
211
+		  dictionaryTree: {
212
+		    level: 2,
213
+				parent:id,
214
+		    key: 'pathology_specimen',
215
+		    deleted: 0,
216
+		  },
217
+		};
218
+		this.mainService
219
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
220
+		  .subscribe((data) => {
221
+				if(data.list.length>0){
222
+					this.apparatusList = data.list;
223
+					if(type=='edit'){
224
+						setTimeout(_=>{
225
+							let index3 = this.apparatusList.findIndex(i=>i.id==item.organ.id)
226
+							this.apparatusIndex = index3
227
+							this.apparatusId = Number(item.organ.id);
228
+						},100)
229
+					}
230
+				}else{
231
+					this.message.info('暂无数据')
232
+				}
233
+		  });
234
+	}
235
+	
236
+	// 获取标本-标本名称
237
+	getSpNameData(id,item,type){
238
+		let postData: any = {
239
+		  idx: 0,
240
+		  sum: 9999,
241
+		  dictionaryTree: {
242
+		    level: 3,
243
+				parent:id,
244
+		    key: 'pathology_specimen',
245
+		    deleted: 0,
246
+		  },
247
+		};
248
+		this.mainService
249
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
250
+		  .subscribe((data) => {
251
+		    this.specimenNameList = data.list;
252
+				this.specimenNameList.push({
253
+					name:'其他',
254
+					id:'qita'
255
+				})
256
+				if(type=='edit'){
257
+					if(item.sample){
258
+						this.validateSpecimenForm = this.fb.group({
259
+						  remark: [null, [Validators.required]]
260
+						});
261
+						setTimeout(_=>{
262
+							let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
263
+							this.specimenNameIndex = index4
264
+							this.specimenNameName = item.sample.name
265
+							this.specimenNameId = Number(item.sample.id);
266
+						},100)
267
+					}else{
268
+						this.validateSpecimenForm = this.fb.group({
269
+						  remark: [null, [Validators.required]],
270
+							specimenName: [null, [Validators.required]]
271
+						});
272
+						this.specimenNameIndex = this.specimenNameList.length-1
273
+						this.specimenNameName = 'qita'
274
+						this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
275
+					}
276
+					setTimeout(_=>{
277
+						this.validateSpecimenForm.controls.remark.setValue(item.remark);
278
+						this.specimenModal = true
279
+					},50)
280
+				}
281
+		  });
282
+	}
283
+	
284
+	// 删除标本
285
+	delModal:boolean = false
286
+	coopId:any;
287
+	specimenDel(e,item,index){
288
+		this.delModal = true
289
+		this.coopId = item.id
290
+	}
291
+	
292
+	// 确定删除
293
+	confirmDel(){
294
+		this.mainService
295
+		  .coopTypeConfig(
296
+		    "rmvData",
297
+		    "pathologySpecimen",
298
+		     [this.coopId]
299
+		  )
300
+		  .subscribe((data) => {
301
+		    this.btnLoading = false;
302
+		    this.delModal = false;
303
+				this.getSampleData()
304
+		    if (data.status==200) {
305
+		      this.showSpecimenModal("删除", true, "");
306
+		    } else {
307
+		      this.showSpecimenModal("删除", false, data.data[0].msg);
308
+		    }
309
+		  });
310
+	}
311
+	// 确定删除
312
+	hideDelModal() {
313
+	  this.delModal = false;
314
+	}
315
+	
316
+	// 编辑标本
317
+	specimenDetailId:any = null;
318
+	specimenEdit(e,item,index){
319
+		this.specimenDetailId = item.id
320
+		let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
321
+		this.placeIndex = index1
322
+		this.placeId = Number(item.partSource.id)
323
+		let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
324
+		this.systemIndex = index2
325
+		this.systemId = Number(item.system.id)
326
+		this.getApparatusData(item.system.id,item,'edit')
327
+		this.getSpNameData(item.organ.id,item,'edit')
328
+	}
329
+	
330
+	// 选择标本
331
+	openSpecimen(){
332
+		this.validateSpecimenForm = this.fb.group({
333
+		  remark: [null, [Validators.required]]
334
+		});
335
+		this.specimenDetailId = null;
336
+		this.placeIndex = null;
337
+		this.systemIndex = null;
338
+		this.apparatusIndex = null;
339
+		this.specimenNameIndex = null;
340
+		this.placeId = null;
341
+		this.systemId = null;
342
+		this.apparatusId = null;
343
+		this.specimenNameId = null;
344
+		this.placeList=[]; //位置来源数据
345
+		this.systemList=[]; //系统数据
346
+		this.apparatusList=[]; //器官数据
347
+		this.specimenNameList=[]; //标本名称数据
348
+		this.getSourceData()
349
+		this.getSysData()
350
+		this.specimenModal = true
351
+	}
352
+	
353
+	// 选择位置来源
354
+	placeId:any = null;
355
+	placeClick(e,item,index){
356
+		this.placeId = item.id
357
+		this.placeIndex = index
358
+	}
359
+	
360
+	// 选择系统
361
+	systemId:any = null;
362
+	systemClick(e,item,index){
363
+		this.systemId = Number(item.id)
364
+		this.systemIndex = index
365
+		this.apparatusList = [];
366
+		this.apparatusId = null;
367
+		this.apparatusIndex = null;
368
+		this.getApparatusData(item.id,{},'select')
369
+	}
370
+	
371
+	// 选择器官
372
+	apparatusId:any = null;
373
+	apparatusClick(e,item,index){
374
+		this.apparatusId = Number(item.id)
375
+		this.apparatusIndex = index
376
+		this.specimenNameList = [];
377
+		this.specimenNameId = null;
378
+		this.specimenNameIndex = null;
379
+		this.getSpNameData(item.id,{},'select')
380
+	}
381
+	
382
+	// 选择标本名称
383
+	specimenNameId:any = null;
384
+	specimenNameName:any = null;
385
+	specimenNameClick(e,item,index){
386
+		this.specimenNameIndex = index
387
+		let remark = this.validateSpecimenForm.value.remark
388
+		if(item.id == 'qita'){
389
+			this.validateSpecimenForm = this.fb.group({
390
+			  remark: [remark?remark:null, [Validators.required]],
391
+				specimenName: [null, [Validators.required]]
392
+			});
393
+			this.specimenNameId = 'null'
394
+			this.specimenNameName = 'qita'
395
+		}else{
396
+			this.validateSpecimenForm = this.fb.group({
397
+			  remark: [remark?remark:null, [Validators.required]],
398
+			});
399
+			this.specimenNameId = item.id
400
+			this.specimenNameName = item.name
401
+		}
402
+	}
403
+	
404
+	// 保存标本
405
+	btnSpLoading:boolean = false;
406
+	submitSpecimen(){
407
+		if(this.placeIndex==null){
408
+			this.message.error('请选择位置来源')
409
+			return
410
+		}
411
+		if(this.systemIndex==null){
412
+			this.message.error('请选择系统')
413
+			return
414
+		}
415
+		if(this.apparatusIndex==null){
416
+			this.message.error('请选择器官')
417
+			return
418
+		}
419
+		if(this.specimenNameIndex==null){
420
+			this.message.error('请选择标本名称')
421
+			return
422
+		}
423
+		for (const i in this.validateSpecimenForm.controls) {
424
+		  this.validateSpecimenForm.controls[i].markAsDirty();
425
+		  this.validateSpecimenForm.controls[i].updateValueAndValidity();
426
+		}
427
+		if (this.validateSpecimenForm.invalid) return;
428
+		let data = {
429
+			pathologyFormId:this.detailsData.id,
430
+			partSource:{
431
+				id:this.placeId
432
+			},
433
+			system:{
434
+				id:this.systemId
435
+			},
436
+			organ:{
437
+				id:this.apparatusId
438
+			},
439
+			sample:{
440
+				id:this.specimenNameId
441
+			},
442
+			hosId:this.hosId,
443
+			specimenName:null,
444
+			id:'',
445
+			remark:this.validateSpecimenForm.value.remark
446
+		};
447
+		if(this.specimenNameName == 'qita'){
448
+			delete data.sample
449
+			data.specimenName = this.validateSpecimenForm.value.specimenName
450
+		}else{
451
+			data.specimenName = this.specimenNameName
452
+		}
453
+		let queryType = null
454
+		if(this.specimenDetailId){
455
+			queryType = 'updData'
456
+			data.id = this.specimenDetailId
457
+		}else{
458
+			queryType = 'addData'
459
+			delete data.id
460
+		}
461
+		this.btnSpLoading = true;
462
+		this.mainService
463
+		  .simplePost(queryType, "pathologySpecimen", data)
464
+		  .subscribe((res) => {
465
+		    this.btnSpLoading = false;
466
+		    if (res.status == 200) {
467
+		      this.showSpecimenModal("操作", true, "");
468
+		    } else {
469
+		      this.showSpecimenModal("操作", false, res.msg);
470
+		    }
471
+		  });
472
+	}
473
+	
474
+	// 获取标本列表
475
+	getSampleData(){
476
+		let data={
477
+			idx: 0,
478
+			sum: 9999,
479
+			pathologySpecimen:{
480
+				pathologyFormId:this.detailsData.id
481
+			}
482
+		}
483
+		this.mainService
484
+		  .getFetchDataList("data", "pathologySpecimen", data)
485
+		  .subscribe((res) => {
486
+		    this.specimenList = res.list
487
+		  });
488
+	}
489
+	
490
+	hideSpecimenModal(){
491
+		this.specimenModal = false
492
+	}
493
+	
494
+	hideNotModal(){
495
+		this.notModal = false
496
+	}
497
+	
498
+	// 日期选择
499
+	startDate: string; //时间开始
500
+	formChangeDate(result?): void {
501
+	  this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
502
+		
503
+	}
504
+	
505
+	//未打印提交
506
+	printLoading:boolean = false;
507
+	submitPrintForm(): void{
508
+		for (const i in this.validatePrintForm.controls) {
509
+		  this.validatePrintForm.controls[i].markAsDirty();
510
+		  this.validatePrintForm.controls[i].updateValueAndValidity();
511
+		}
512
+		if (this.validatePrintForm.invalid) return;
513
+		
514
+		let data: any = {
515
+			pathologyForm:{
516
+				...this.validateForm.value,
517
+				...this.detailsData,
518
+				inVitroTime:this.validatePrintForm.value.inVitroTime,
519
+				surgeryId: this.surgeryId || "",
520
+				patientId: this.patientId || "",
521
+				hosId: this.hosId || "" ,
522
+				handoverUserId:this.handoverUserId,
523
+				specimenType:{
524
+					id:this.validateForm.value.specimenGenre
525
+				}
526
+			}
527
+		};
528
+		delete data.pathologyForm.patientDTO
529
+		delete data.pathologyForm.surgeryDeptDTO
530
+		delete data.pathologyForm.surgeryDoctorDTO
531
+		delete data.pathologyForm.specimenGenre
532
+		this.printLoading = true;
533
+		this.mainService
534
+		  .pathologyPrint(data)
535
+		  .subscribe((res:any) => {
536
+				console.log(5555,res)
537
+				this.hideModal()
538
+		    this.printData = res.data;
539
+				this.printLoading = false;
540
+		    setTimeout(() => {
541
+		      const printContent = document.getElementById("report");
542
+		      const WindowPrt = window.open("", "", "width=100,height=1000");
543
+		      WindowPrt.document.write(printContent.innerHTML);
544
+		      WindowPrt.document.close();
545
+		      WindowPrt.focus();
546
+		      WindowPrt.print();
547
+		      WindowPrt.close();
548
+		    }, 500);
549
+		  });
550
+	}
551
+	
552
+	// 监听工号数据
553
+	handoverUserId:any = null;
554
+	numberChange(e){
555
+		if(e.length < 3) {
556
+			this.validatePrintForm.controls.name.setValue('');
557
+			return
558
+		}
559
+		let data = {
560
+		  idx: 0,
561
+		  sum: 9999,
562
+		  user: {
563
+		    account: e || "",
564
+		    hospital: { id: this.hosId || "" }
565
+		  },
566
+		};
567
+		this.mainService
568
+		  .getFetchDataList("data", "user", data)
569
+		  .subscribe((data) => {
570
+				if(data.list.length>0){
571
+					this.validatePrintForm.controls.name.setValue(data.list[0].name);
572
+					this.handoverUserId = data.list[0].id
573
+				}else{
574
+					this.validatePrintForm.controls.name.setValue('');
575
+					this.handoverUserId =null
576
+				}
577
+		  });
578
+	}
579
+	
580
+	printData:any;
581
+	submitForm(): void{
582
+		var that = this;
583
+		for (const i in that.validateForm.controls) {
584
+		  that.validateForm.controls[i].markAsDirty();
585
+		  that.validateForm.controls[i].updateValueAndValidity();
586
+		}
587
+		if (that.validateForm.invalid) return;
588
+		if(this.detailsData.status.name=='未打印'){
589
+			this.notModal = true
590
+			this.validatePrintForm = this.fb.group({
591
+			  inVitroTime: [null, [Validators.required]],
592
+				jobNumber: [null, [Validators.required]],
593
+				name:[null, [Validators.required]],
594
+			});
595
+			let date = new Date();
596
+			this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
597
+			this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
598
+			return
599
+		}
600
+
601
+		let data: any = {
602
+			pathologyForm:{
603
+				...this.validateForm.value,
604
+				...this.detailsData,
605
+				surgeryId: this.surgeryId || "",
606
+				patientId: this.patientId || "",
607
+				hosId: this.hosId || "" ,
608
+				specimenType:{
609
+					id:this.validateForm.value.specimenGenre
610
+				}
611
+			}
612
+		};
613
+		delete data.pathologyForm.patientDTO
614
+		delete data.pathologyForm.surgeryDeptDTO
615
+		delete data.pathologyForm.surgeryDoctorDTO 
616
+		delete data.pathologyForm.specimenGenre 
617
+		that.btnLoading = true;
618
+		that.mainService
619
+		  .pathologyPrint(data)
620
+		  .subscribe((res:any) => {
621
+				this.hideModal()
622
+				let arr = res.data;
623
+		    that.printData = arr;
624
+				that.btnLoading = false;
625
+		    setTimeout(() => {
626
+		      const printContent = document.getElementById("report");
627
+		      const WindowPrt = window.open("", "", "width=100,height=1000");
628
+		      WindowPrt.document.write(printContent.innerHTML);
629
+		      WindowPrt.document.close();
630
+		      WindowPrt.focus();
631
+		      WindowPrt.print();
632
+		      WindowPrt.close();
633
+					
634
+		    }, 500);
635
+		  });
636
+	}
637
+	
638
+	// 关闭标本
639
+	closeSpecimenModel(){
640
+		this.getSampleData()
641
+		this.hideSpecimenModal()
642
+	}
643
+	
644
+	closeModel(){
645
+		this.hideModal()
646
+	}
647
+	hideModal(){
648
+		this.pathologyCancel.emit()
649
+	}
650
+	
651
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
652
+	showPromptModal(con, success, promptInfo?) {
653
+	  this.promptModalShow = false;
654
+	  this.promptContent = con;
655
+	  this.ifSuccess = success;
656
+	  this.promptInfo = promptInfo;
657
+	  setTimeout(() => {
658
+	    this.promptModalShow = true;
659
+	  }, 100);
660
+	}
661
+	
662
+	showSpecimenModal(con, success, promptInfo?) {
663
+	  this.specimenModalShow = false;
664
+	  this.promptContent = con;
665
+	  this.ifSuccess = success;
666
+	  this.promptInfo = promptInfo;
667
+	  setTimeout(() => {
668
+	    this.specimenModalShow = true;
669
+	  }, 100);
670
+	}
671
+}
672
+

+ 3 - 0
src/app/share/share.module.ts

@@ -55,6 +55,7 @@ import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing
55 55
 import { InspectionExecuteDetailComponent } from './inspection-execute-detail/inspection-execute-detail.component';
56 56
 import { wangEditorComponent } from './wang-editor/wang-editor.component';
57 57
 import { PathologyAddComponent } from './pathology-add/pathology-add.component';
58
+import { PathologyDetailComponent } from './pathology-detail/pathology-detail.component';
58 59
 
59 60
 @NgModule({
60 61
   declarations: [
@@ -86,6 +87,7 @@ import { PathologyAddComponent } from './pathology-add/pathology-add.component';
86 87
     InspectionExecuteDetailComponent,
87 88
 		wangEditorComponent,
88 89
 		PathologyAddComponent,
90
+		PathologyDetailComponent,
89 91
     DateTransformPipe,
90 92
     DataToNamePipe,
91 93
     DialogDeleteComponent,
@@ -150,6 +152,7 @@ import { PathologyAddComponent } from './pathology-add/pathology-add.component';
150 152
     InspectionExecuteDetailComponent,
151 153
 		wangEditorComponent,
152 154
 		PathologyAddComponent,
155
+		PathologyDetailComponent,
153 156
     CommonModule,
154 157
     NgZorroAntdModule,
155 158
     FormsModule,

+ 4 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -3956,4 +3956,7 @@
3956 3956
 
3957 3957
 <!-- 病理申请单 -->
3958 3958
 
3959
-<app-pathology-add *ngIf="pathologyModal" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add>
3959
+<app-pathology-add *ngIf="pathologyModal" [surgeryId]="surgeryWKOMsg.id" [patientId]="surgeryWKOMsg.patientDTO.id" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add>
3960
+
3961
+<!-- 病理详情 -->
3962
+<app-pathology-detail *ngIf="pathologyDetailModal" [surgeryId]="surgeryWKOMsg.id" [patientId]="surgeryWKOMsg.patientDTO.id" (pathologyCancel)="pathologyDetailCancel($event)"></app-pathology-detail>

+ 23 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -165,6 +165,7 @@ export class HushijiandanComponent implements OnInit {
165 165
   orderListTimeConst = 60; //工单列表自动刷新秒数
166 166
   deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
167 167
 	pathologyModal:boolean = false; //病理申请单
168
+	pathologyDetailModal:boolean = false; //病理详情
168 169
   // 初始化权限按钮
169 170
   coopBtns: any = {};
170 171
 
@@ -308,7 +309,28 @@ export class HushijiandanComponent implements OnInit {
308 309
 	
309 310
 	// 病理申请单
310 311
 	pathologyAdd(e){
311
-		this.pathologyModal = true
312
+	let data = {
313
+		idx: 0,
314
+		sum: 9999,
315
+		pathologyForm: {
316
+			surgeryId: this.surgeryWKOMsg.id || "",
317
+			patientId: this.surgeryWKOMsg.patientDTO.id || "",
318
+			hosId: this.currentHospital.id || "" ,
319
+		},
320
+	};
321
+	this.mainService
322
+		.getFetchDataList("data", "pathologyForm", data)
323
+		.subscribe((data) => {
324
+			if(data.list[0].status.value==1){
325
+				this.pathologyModal = true
326
+			}else{
327
+				this.pathologyDetailModal = true
328
+			}
329
+		});
330
+	}
331
+	
332
+	pathologyDetailCancel(){
333
+		this.pathologyDetailModal = false
312 334
 	}
313 335
 	
314 336
 	pathologyCancel(){

+ 183 - 69
src/app/views/specimen-room-view/specimen-room-view.component.html

@@ -57,7 +57,7 @@
57 57
             placeholder="请输入关键字"
58 58
             [(ngModel)]="printPharmacySearchKey"
59 59
           />
60
-          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('delegation')">
60
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('surgeryDept')">
61 61
             <i nz-icon nzType="search"></i>
62 62
             <span>搜索</span>
63 63
           </div>
@@ -70,23 +70,23 @@
70 70
           <div
71 71
             class="pharmacy-main__selection noPointer"
72 72
             *ngFor="let item of printPharmacyList"
73
-						(click)="viewDetail(item)"
73
+						(click)="viewDetail(item,1)"
74 74
           >
75 75
             <div class="pharmacy-main__selectionInfo">
76 76
               <div class="pharmacy-main__selectionItem">
77 77
                 <span title="住院号" class="weight">
78
-									<span class="sign-red">速冻</span>
79
-									{{item.code || '无'}}
78
+									<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
79
+									{{item.applyCode || '无'}}
80 80
 								</span>
81
-                <span title="姓名" class="weight">{{item.name || '无'}}</span>
81
+                <span title="姓名" class="weight">{{item.patientDTO.patientName || '无'}}</span>
82 82
               </div>
83 83
               <div class="pharmacy-main__selectionItem">
84
-                <span title="部位">部位:{{item.bw || '无'}}</span>
85
-                <span title="标本数">标本数:{{item.bbs || '无'}}</span>
84
+                <span title="部位">部位:{{item.takePart || '无'}}</span>
85
+                <span title="标本数">标本数:{{item.specimenNum || '无'}}</span>
86 86
               </div>
87 87
               <div class="pharmacy-main__selectionItem">
88
-                <span title="手术间">手术间:{{item.ssj || '无'}}</span>
89
-                <span title="离体时间">离体时间:{{item.time || '无'}}</span>
88
+                <span title="手术间">手术间:{{item.surgeryDeptDTO.dept || '无'}}</span>
89
+                <span title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
90 90
               </div>
91 91
             </div>
92 92
           </div>
@@ -146,7 +146,7 @@
146 146
             placeholder="请输入关键字"
147 147
             [(ngModel)]="waitPharmacySearchKey"
148 148
           />
149
-          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('take')">
149
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('specimenDept')">
150 150
             <i nz-icon nzType="search"></i>
151 151
             <span>搜索</span>
152 152
           </div>
@@ -157,14 +157,25 @@
157 157
       <overlay-scrollbars #osComponentRef2 class="pharmacy-main__selectionWrap">
158 158
         <div *ngIf="!loading2" style="height: 100%">
159 159
           <div
160
-            (click)="showOrderList(item)"
161 160
             class="pharmacy-main__selection"
162 161
             *ngFor="let item of waitPharmacyList; let i = index"
162
+						(click)="viewDetail(item,2)"
163 163
           >
164 164
             <div class="pharmacy-main__selectionInfo">
165 165
               <div class="pharmacy-main__selectionItem">
166
-                <span title="执行人姓名">{{item.userName || '无'}}</span>
167
-                <span title="工单数量">{{item.orderNum || '无'}}</span>
166
+                <span title="住院号" class="weight">
167
+            			<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
168
+            			{{item.applyCode || '无'}}
169
+            		</span>
170
+                <span title="姓名" class="weight">{{item.patientDTO.patientName || '无'}}</span>
171
+              </div>
172
+              <div class="pharmacy-main__selectionItem">
173
+                <span title="部位">部位:{{item.takePart || '无'}}</span>
174
+                <span title="标本数">标本数:{{item.specimenNum || '无'}}</span>
175
+              </div>
176
+              <div class="pharmacy-main__selectionItem">
177
+                <span title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
178
+								<span title="固定时间">固定时间:{{item.fixationTime?(item.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
168 179
               </div>
169 180
             </div>
170 181
           </div>
@@ -224,7 +235,7 @@
224 235
             placeholder="请输入关键字"
225 236
             [(ngModel)]="pharmacySearchKey"
226 237
           />
227
-          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('trans')">
238
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('leavedDept')">
228 239
             <i nz-icon nzType="search"></i>
229 240
             <span>搜索</span>
230 241
           </div>
@@ -235,15 +246,30 @@
235 246
       <overlay-scrollbars #osComponentRef3 class="pharmacy-main__selectionWrap">
236 247
         <div *ngIf="!loading3" style="height: 100%">
237 248
           <div
238
-            (click)="showSpeList(item)"
239 249
             class="pharmacy-main__selection"
240 250
             *ngFor="let item of pharmacyList; let i = index"
251
+						(click)="viewDetail(item,3)"
241 252
           >
242 253
             <div class="pharmacy-main__selectionInfo">
243 254
               <div class="pharmacy-main__selectionItem">
244
-                <span title="检验科室名称" class="moreContent left">{{item.check_dept || '无'}}</span>
245
-                <span title="配送标本数量">{{item.count || '无'}}</span>
255
+                <span title="住院号" class="weight">
256
+            			<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
257
+            			{{item.applyCode || '无'}}
258
+            		</span>
259
+                <span title="姓名" class="weight">{{item.patientDTO.patientName || '无'}}</span>
260
+              </div>
261
+              <div class="pharmacy-main__selectionItem">
262
+                <span title="部位">部位:{{item.takePart || '无'}}</span>
263
+                <span title="标本数">标本数:{{item.specimenNum || '无'}}</span>
246 264
               </div>
265
+              <div class="pharmacy-main__selectionItem">
266
+                <span title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
267
+            		<span title="固定时间">固定时间:{{item.fixationTime?(item.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
268
+              </div>
269
+							<div class="pharmacy-main__selectionItem">
270
+							  <span title="配送人">配送人:{{item.deliveryUserDTO?item.deliveryUserDTO.name:'无'}}</span>
271
+								<span title="离科时间">离科时间:{{item.leaveDeptTime?(item.leaveDeptTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
272
+							</div>
247 273
             </div>
248 274
           </div>
249 275
           <div
@@ -384,11 +410,8 @@
384 410
 					<nz-input-group>
385 411
 						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择标本间" formControlName="specimen">
386 412
 							<ng-container *ngFor="let option of specimenData">
387
-								<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
413
+								<nz-option [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
388 414
 							</ng-container>
389
-							<nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
390
-								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
391
-							</nz-option>
392 415
 						</nz-select>
393 416
 					</nz-input-group>
394 417
 				</nz-form-control>
@@ -400,11 +423,8 @@
400 423
 					<nz-input-group>
401 424
 						<nz-select class="formItem" nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择请选择手术间" formControlName="operation">
402 425
 							<ng-container *ngFor="let option of operationData">
403
-								<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
426
+								<nz-option [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
404 427
 							</ng-container>
405
-							<nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
406
-								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
407
-							</nz-option>
408 428
 						</nz-select>
409 429
 					</nz-input-group>
410 430
 				</nz-form-control>
@@ -436,72 +456,66 @@
436 456
 		<div class="content">
437 457
 			<div class="content-item boder-right">
438 458
 				<div class="form-title-box">
439
-					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>是</div>
459
+					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{codeData.intraoperativeRapidity==1?'':'否'}}</div>
440 460
 				</div>
441 461
 				<div class="form-title-box">
442
-					<div class="form-title"><span class="font-weight-500">申请单编号:</span>1008611</div>
443
-					<div class="form-title"><span class="font-weight-500">状态:</span>未打印</div>
462
+					<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{codeData.applyCode}}</div>
463
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{codeData.status.name}}</div>
444 464
 				</div>
445 465
 				<div class="form-title-box">
446
-					<div class="form-title"><span class="font-weight-500">科室名称:</span>科室111</div>
447
-					<div class="form-title"><span class="font-weight-500">住院号:</span>008622</div>
466
+					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{codeData.patientDTO.department.dept}}</div>
467
+					<div class="form-title"><span class="font-weight-500">住院号:</span>{{codeData.patientDTO.patientCode}}</div>
448 468
 				</div>
449 469
 				<div class="form-title-box">
450
-					<div class="form-title"><span class="font-weight-500">患者信息:</span>张三</div>
451
-					<div class="form-title"><span class="font-weight-500">年龄:</span>18</div>
470
+					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{codeData.patientDTO.patientName}} ({{codeData.patientDTO.bedNum}}床)</div>
471
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{codeData.patientDTO.age||'-'}}岁</div>
452 472
 				</div>
453 473
 				<div class="form-list">
454 474
 					<div class="form-title font-weight-500">诊断:</div>
455
-					<div>
456
-						<div>1.有病</div>
457
-						<div>2.有病</div>
475
+					<div class="indent">
476
+						{{codeData.diagnose||'无'}}
458 477
 					</div>
459 478
 				</div>
460 479
 				
461 480
 				<div class="form-list">
462 481
 					<div class="form-title font-weight-500">病理摘要:</div>
463
-					<div>患者因“胆囊息肉4月余”于2024-08-05入院。
464
-					患者4月前我院彩超提示胆囊息肉,大小约1.3*cds  0.7cm,无腹痛腹胀,无恶心呕吐,无发热,无胸闷、无返酸,无呕血、黑便,无腹泻,无尿频、尿急、尿痛。未进一步处理,今患者再次来我院,要求进一步治疗住院,</div>
482
+					<div class="indent">{{codeData.medicalRecords||'无'}}</div>
465 483
 				</div>
466 484
 				<div class="form-list">
467 485
 					<div class="form-title font-weight-500">手术方案:</div>
468
-					<div>患者因“胆囊息肉4月余”于2024-08-05入院。
469
-					患者4月前我院彩超提示胆囊息肉,大小约1.3*cds  0.7cm,无腹痛腹胀,无恶心呕吐,无发热,无胸闷、无返酸,无呕血、黑便,无腹泻,无尿频、尿急、尿痛。未进一步处理,今患者再次来我院,要求进一步治疗住院,</div>
486
+					<div class="indent">{{codeData.surgicalPlan||'无'}}</div>
470 487
 				</div>
471 488
 				<div class="form-list">
472 489
 					<div class="form-title font-weight-500">术中所见:</div>
473
-					<div>患者因“胆囊息肉4月余”于2024-08-05入院。
474
-					患者4月前我院彩超提示胆囊息肉,大小约1.3*cds  0.7cm,无腹痛腹胀,无恶心呕吐,无发热,无胸闷、无返酸,无呕血、黑便,无腹泻,无尿频、尿急、尿痛。未进一步处理,今患者再次来我院,要求进一步治疗住院,</div>
490
+					<div class="indent">{{codeData.intraoperativeFindings||'无'}}</div>
475 491
 				</div>
476 492
 				<div class="form-title-box">
477
-					<div class="form-title"><span class="font-weight-500">标本类型:</span>张三</div>
478
-					<div class="form-title"><span class="font-weight-500">标本件数:</span>18</div>
479
-					<div class="form-title"><span class="font-weight-500">采取部位:</span>张三</div>
493
+					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{codeData.specimenType.name||'无'}}</div>
494
+					<div class="form-title"><span class="font-weight-500">标本件数:</span>{{codeData.specimenNum||'无'}}</div>
495
+					<div class="form-title"><span class="font-weight-500">采取部位:</span>{{codeData.takePart||'无'}}</div>
480 496
 				</div>
481 497
 				<div class="form-title-box">
482
-					<div class="form-title"><span class="font-weight-500">取标本位置:</span>张三</div>
483
-					<div class="form-title"><span class="font-weight-500">取材医生:</span>18</div>
498
+					<div class="form-title"><span class="font-weight-500">取标本位置:</span>{{codeData.surgeryDeptDTO?codeData.surgeryDeptDTO.dept:''}}</div>
499
+					<div class="form-title"><span class="font-weight-500">取材医生:</span>{{codeData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
484 500
 				</div>
485
-				<div class="form-list">
501
+	<!-- 			<div class="form-list">
486 502
 					<div class="form-title font-weight-500">标本:</div>
487 503
 					<div>标本1</div>
488 504
 					<div>标本2</div>
489
-				</div>
505
+				</div> -->
490 506
 			</div>
491 507
 			
492 508
 			<div class="content-item">
493
-				<div class="center">提示:申请单含2只标本,已扫1只,请继续扫描标本。</div>
509
+				<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>
494 510
 				<div class="disp-fl">
495 511
 					<div class="width-120">标本条码:</div>
496
-					<!-- <nz-input-group autofocus> -->
497
-						<input nz-input id="specimen" [(ngModel)]="specimenCode" />
498
-					<!-- </nz-input-group> -->
512
+					<input nz-input id="specimen" [(ngModel)]="specimenCode" (ngModelChange)="codeChange($event)"/>
499 513
 				</div>
500 514
 				<div class="list-template">
501 515
 				  <div class="list-template__content">
502 516
 						<div class="list-template__bottom" style="padding: 0 !important;">
503
-							<nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
504
-								[nzLoading]="loading1">
517
+							<nz-table class="list-template__nzTable" [nzData]="codeData.pathologySpecimenDTOList" nzSize="middle" [nzShowPagination]="false"
518
+								[nzLoading]="tableLoading">
505 519
 								<thead>
506 520
 									<tr class="thead">
507 521
 										<th nzWidth="10%">序号</th>
@@ -510,10 +524,15 @@
510 524
 									</tr>
511 525
 								</thead>
512 526
 								<tbody>
513
-									<tr *ngFor="let data of listOfData let index = index">
527
+									<tr *ngFor="let data of codeData.pathologySpecimenDTOList let index = index">
514 528
 										<td>{{index+1}}</td>
515
-										<td>{{ data.code}}</td>
516
-										<td>{{ data.name}}</td>
529
+										<td>{{ data.specimenCode}}</td>
530
+										<td>
531
+											{{data.partSource?data.partSource.name:''}} <span *ngIf="data.system">-</span>
532
+											{{data.system?data.system.name:''}} <span *ngIf="data.organ">-</span>
533
+											{{data.organ?data.organ.name:''}} <span *ngIf="data.sample">-</span>
534
+											{{data.sample?data.sample.name:''}}
535
+										</td>
517 536
 									</tr>
518 537
 								</tbody>
519 538
 							</nz-table>
@@ -523,7 +542,7 @@
523 542
 			</div>
524 543
 		</div>
525 544
 		<div class="display_flex justify-content_flex-center bottom-btn">
526
-			<button class="btn btn-right" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">确定</button>
545
+			<button class="btn btn-right" [disabled]="codeData.specimenNum != codeData.pathologySpecimenDTOList.length" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">确定</button>
527 546
 			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
528 547
 		</div>
529 548
 	</div>
@@ -531,20 +550,20 @@
531 550
 
532 551
 <!-- 操作成功/失败提示框 -->
533 552
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
534
-  [info]="promptInfo" (closeModel)="closeModel"></app-prompt-modal>
553
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
535 554
 	
536
-<!-- 标本核验 -->
555
+<!-- 标本固定信息 -->
537 556
 <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="verificationMoadl">
538 557
 	<div class="modalBody no-width">
539
-		<div class="title">标本核验<i class="icon_transport transport-guanbi" (click)="hideVerificationModal()"></i>
558
+		<div class="title">标本固定信息<i class="icon_transport transport-guanbi" (click)="hideVerificationModal()"></i>
540 559
 		</div>
541 560
 		<div class="content">
542 561
 			<form nz-form [formGroup]="validateVerificationForm" class="addForm" (ngSubmit)="submitVerificationForm()">
543 562
 				<nz-form-item>
544
-				  <nz-form-label nzRequired [nzSpan]="6" nzFor="time">固定时间</nz-form-label>
563
+				  <nz-form-label nzRequired [nzSpan]="6" nzFor="fixationTime">固定时间</nz-form-label>
545 564
 				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择固定时间!">
546 565
 				    <nz-input-group>
547
-							<nz-date-picker formControlName="time" 
566
+							<nz-date-picker formControlName="fixationTime" 
548 567
 							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
549 568
 							(ngModelChange)="formChangeDate($event)"></nz-date-picker>
550 569
 						</nz-input-group>
@@ -553,7 +572,7 @@
553 572
 				<nz-form-item>
554 573
 				  <nz-form-label nzRequired [nzSpan]="6" nzFor="jobNumber">工号</nz-form-label>
555 574
 					<nz-form-control [nzSpan]="18" nzErrorTip="请输入工号!">
556
-						<input nz-input (input)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
575
+						<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
557 576
 					</nz-form-control>
558 577
 				</nz-form-item>
559 578
 				<nz-form-item>
@@ -568,11 +587,8 @@
568 587
 				    <nz-input-group>
569 588
 							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择固体液类型" formControlName="fixative">
570 589
 							  <ng-container *ngFor="let option of fixativeData">
571
-							    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
590
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
572 591
 							  </ng-container>
573
-							  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
574
-							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
575
-							  </nz-option>
576 592
 							</nz-select>
577 593
 						</nz-input-group>
578 594
 				  </nz-form-control>
@@ -580,8 +596,106 @@
580 596
 			</form>
581 597
 		</div>
582 598
 		<div class="display_flex justify-content_flex-center bottom-btn">
583
-			<button class="btn btn-right" nz-button nzType="primary" (click)="submitVerificationForm()" [nzLoading]="btnLoading">确定</button>
599
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitVerificationForm()" [nzLoading]="btnInfoLoading">确定</button>
584 600
 			<button class="btn cancel" nz-button nzType="default" (click)="hideVerificationModal()">取消</button>
585 601
 		</div>
586 602
 	</div>
603
+</div>
604
+
605
+<!-- 标本查看详情-->
606
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="detailMoadl">
607
+	<div class="pathology-content">
608
+		<div class="title">查看详情
609
+		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
610
+		<div class="content">
611
+			<div class="content-item boder-right">
612
+				<div class="form-title-box">
613
+					<div class="form-title width-150"><span class="font-weight-500">是否术中快速:</span>{{detailsData.intraoperativeRapidity==1?'是':'否'}}</div>
614
+					<div class="form-title width-200"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
615
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
616
+					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
617
+				</div>
618
+				<div class="form-title-box">
619
+					<div class="form-title width-150"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
620
+					<div class="form-title width-200"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
621
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}岁</div>
622
+				</div>
623
+
624
+				<div class="form-list">
625
+					<div class="form-title font-weight-500">诊断:</div>
626
+					<div class="indent">
627
+						{{detailsData.diagnose||'无'}}
628
+					</div>
629
+				</div>
630
+				
631
+				<div class="form-list">
632
+					<div class="form-title font-weight-500">病理摘要:</div>
633
+					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
634
+				</div>
635
+				<div class="form-list">
636
+					<div class="form-title font-weight-500">手术方案:</div>
637
+					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
638
+				</div>
639
+				<div class="form-list">
640
+					<div class="form-title font-weight-500">术中所见:</div>
641
+					<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
642
+				</div>
643
+
644
+				<div class="form-title-box">
645
+					<div class="form-title width-150"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
646
+					<div class="form-title width-200"><span class="font-weight-500">标本件数:</span>{{detailsData.specimenNum||'无'}}</div>
647
+					<div class="form-title"><span class="font-weight-500">采取部位:</span>{{detailsData.takePart||'无'}}</div>
648
+					<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
649
+				</div>
650
+				
651
+				<div class="form-title-box">
652
+					<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
653
+					<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
654
+				</div>
655
+				
656
+				<div class="form-list">
657
+					<div class="form-title font-weight-500">标本:</div>
658
+					<div class="form-title specimen-list">
659
+						<div *ngFor="let item of specimenList" class="specimen-item-class">
660
+							{{item.partSource?item.partSource.name:''}} <span *ngIf="item.system">-</span>
661
+							{{item.system?item.system.name:''}} <span *ngIf="item.organ">-</span>
662
+							{{item.organ?item.organ.name:''}} <span *ngIf="item.sample">-</span>
663
+							{{item.sample?item.sample.name:''}}
664
+						</div>
665
+					</div>
666
+				</div>
667
+
668
+			</div>
669
+			
670
+			<div class="content-item-right">
671
+				<div class="step-title">病理闭环</div>
672
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
673
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
674
+							<nz-step
675
+								[nzDescription]="tpl"
676
+							>
677
+							</nz-step>
678
+							<ng-template #tpl>
679
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
680
+									<div style="color: #49B856;">{{item.operationType.name}}</div>
681
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
682
+								</div>
683
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
684
+									<div>{{item.operationType.name}}</div>
685
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
686
+								</div>
687
+							</ng-template>
688
+						</ng-container>
689
+				</nz-steps>
690
+			</div>
691
+		</div>
692
+		<div class="display_flex justify-content_flex-center bottom-btn">
693
+			<button class="btn btn-right" nz-button nzType="primary" (click)="closeDetailMoadl()">确定</button>
694
+			<button class="btn cancel" nz-button nzType="default" (click)="closeDetailMoadl()">取消</button>
695
+		</div>
696
+	</div>
697
+</div>
698
+
699
+<div class="mask-style" *ngIf="isSpinning">
700
+	<nz-spin nzSimple class="spin-style"></nz-spin>
587 701
 </div>

+ 49 - 3
src/app/views/specimen-room-view/specimen-room-view.component.less

@@ -273,7 +273,7 @@
273 273
           display: flex;
274 274
           cursor: pointer;
275 275
           &.noPointer{
276
-            cursor: default;
276
+            cursor: pointer;
277 277
           }
278 278
           &.pharmacy-main__selection--more {
279 279
             color: @primary-color;
@@ -657,8 +657,8 @@
657 657
 					height: auto;
658 658
 					max-height: 460px;
659 659
 					overflow-y: auto;
660
-					flex: 1;
661
-					padding: 0 15px;
660
+					width: 75%;
661
+					padding: 15px;
662 662
 					.form-title-box{
663 663
 						display: flex;
664 664
 						margin-bottom: 10px;
@@ -666,6 +666,12 @@
666 666
 							color: #333;
667 667
 							margin-right: 40px;
668 668
 						}
669
+						.width-150{
670
+							width: 150px;
671
+						}
672
+						.width-200{
673
+							width: 200px;
674
+						}
669 675
 					}
670 676
 					.center{
671 677
 						text-align: center;
@@ -683,6 +689,18 @@
683 689
 					}
684 690
 					.form-list{
685 691
 						margin-bottom: 10px;
692
+						.specimen-list{
693
+							display: flex;
694
+							flex-wrap: wrap;
695
+							.specimen-item-class{
696
+								margin-right: 40px;
697
+								color:#333;
698
+							}
699
+						}
700
+						.indent{
701
+							text-indent: 2ch;
702
+							color: #333;
703
+						}
686 704
 					}
687 705
 					.ant-form-item {
688 706
 					  margin-bottom: 14px;
@@ -713,6 +731,18 @@
713 731
 						}
714 732
 					}
715 733
 				}
734
+				.content-item-right{
735
+					width: 25%;
736
+					height: auto;
737
+					max-height: 460px;
738
+					overflow-y: auto;
739
+					padding: 10px;
740
+					.step-title{
741
+						font-size: 16px;
742
+						font-weight: 500;
743
+						margin-bottom: 10px;
744
+					}
745
+				}
716 746
 				.boder-right{
717 747
 					border-right: 1px solid #e5e9ed;
718 748
 				}
@@ -738,4 +768,20 @@
738 768
 		}
739 769
 	}
740 770
 	
771
+}
772
+
773
+.mask-style{
774
+	width: 100%;
775
+	height: 100%;
776
+	position: fixed;
777
+	top: 0;
778
+	left: 0;
779
+	z-index: 999;
780
+	display: flex;
781
+	background: rgba(0,0,0,0.2);
782
+	align-items: center;
783
+	justify-content: center;
784
+}
785
+.spin-style{
786
+	z-index:9999;
741 787
 }

+ 338 - 185
src/app/views/specimen-room-view/specimen-room-view.component.ts

@@ -4,6 +4,10 @@ import { Router } from "@angular/router";
4 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5 5
 import { startOfDay, format, endOfDay } from "date-fns";
6 6
 import { ToolService } from 'src/app/services/tool.service';
7
+import { NzMessageService } from "ng-zorro-antd";
8
+import { debounceTime } from 'rxjs/operators';
9
+import { Subject } from 'rxjs';
10
+
7 11
 import {
8 12
   FormBuilder,
9 13
   Validators,
@@ -47,44 +51,27 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
47 51
 	public router: Router, 
48 52
 	public tool: ToolService,
49 53
 	private fb: FormBuilder,
54
+	private message: NzMessageService,
50 55
 	) {}
51 56
   // 今日药单量
52 57
   todayTotal: undefined;
53 58
   // 今日已完成
54 59
   todayComplete: undefined;
55
-  //待配药数据
56
-  // 待配药
57
-  printPharmacyList = [
58
-		{
59
-			code:'222',
60
-			name:'张珊',
61
-			bw:'肺部',
62
-			bbs:'8',
63
-			ssj:'手术间5',
64
-			time:'08-15 10:00'
65
-		},
66
-		{
67
-			code:'222',
68
-			name:'张珊',
69
-			bw:'肺部',
70
-			bbs:'8',
71
-			ssj:'手术间5',
72
-			time:'08-15 10:00'
73
-		},
74
-	]; //数据列表
60
+  //手术间数据
61
+  printPharmacyList = []; //数据列表
75 62
   printPharmacyIdx = 0; //页码
76 63
   printPharmacyTotal = 0; //总数
77 64
   printPharmacyFlag = false; //是否查看更多
78 65
   printPharmacySearchKey = ""; //搜索的内容
79 66
   printPharmacyLoad = false; //按钮的loading
80
-  // 配药中列表
67
+  // 标本间列表
81 68
   waitPharmacyList = [];
82 69
   waitPharmacyIdx = 0;
83 70
   waitPharmacyTotal = 0;
84 71
   waitPharmacyFlag = false;
85 72
   waitPharmacySearchKey = "";
86 73
   waitPharmacyLoad = false;
87
-  // 核对中列表
74
+  // 今日离科列表
88 75
   pharmacyList = [];
89 76
   pharmacyIdx = 0;
90 77
   pharmacyTotal = 0;
@@ -126,32 +113,33 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
126 113
 	fixationModal:boolean = false //标本接收固定
127 114
 	verificationMoadl:boolean = false //标本核验
128 115
 	specimenCode:any; //标本条码
129
-	listOfData:any=[
130
-		{
131
-			code:'222',
132
-			name:'张珊',
133
-		},
134
-	]; 
116
+	listOfData:any=[]; 
135 117
 	fixativeData:any = []; //固体液类型
118
+	hosId:any;
119
+	userId:any;
120
+	detailsData:any;
121
+	isSpinning:boolean = false; //全屏加载状态
122
+	codeData:any; //标本条码数据
123
+	btnInfoLoading :boolean = false; //标本加固加载
124
+	changeInpSubject = new Subject(); //防抖
136 125
   ngOnDestroy() {
137 126
     clearTimeout(this.timer);
138 127
     clearTimeout(this.logTimer);
139 128
   }
140 129
 
141 130
   ngOnInit() {
131
+		this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
132
+		  this.tableLoading = true
133
+		  this.searchSpecimenData(v[0])
134
+		});
135
+		this.hosId = this.tool.getCurrentHospital().id;
136
+		this.userId = this.tool.getCurrentUserId()
142 137
     this.runTime();
143 138
     // 统计
144 139
     this.total();
145
-		
146
-		this.setSpecimen()
140
+		this.getDept()
147 141
     // 切换科室
148 142
     // this.changeKs();
149
-    // 手术间列表
150
-    // this.getPharmacyList(this.printPharmacyIdx, 'delegation', this.printPharmacySearchKey);
151
-    // // 标本间列表
152
-    // this.getPharmacyList(this.waitPharmacyIdx, 'take', this.waitPharmacySearchKey);
153
-    // // 今日离科标本列表
154
-    // this.getPharmacyList(this.pharmacyIdx, 'trans', this.pharmacySearchKey);
155 143
 
156 144
     this.initRole();
157 145
     // 自动刷新倒计时 start
@@ -167,33 +155,129 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
167 155
     }, 500);
168 156
   }
169 157
 	
170
-	// 标本搜索
158
+	// 标本条码搜索
171 159
 	searchSpecimen(){
172
-		this.fixationModal = true
173
-		setTimeout(_=>{
174
-			document.getElementById('specimen').focus();
175
-		},200)
160
+		if(!this.barCode){
161
+			this.message.error('请输入标本条码')
162
+			return
163
+		}
164
+		let data={
165
+			barcode:this.barCode
166
+		}
167
+		this.isSpinning = true
168
+		clearInterval(this.logTimer);
169
+		this.mainService.pathologyScanCode(data)
170
+		.subscribe((res:any) => {
171
+			this.isSpinning = false
172
+			if(res.status==200){
173
+				this.codeData = res.data[0]
174
+				this.fixationModal = true
175
+				setTimeout(_=>{
176
+					document.getElementById('specimen').focus();
177
+				},200)
178
+			}else{
179
+				this.message.error(res.msg)
180
+			}
181
+		})
176 182
 	}
177 183
 	
178 184
 	// 确定接受固定标本
179 185
 	startDate:any;
180 186
 	submitFixationForm(){
181 187
 		this.validateVerificationForm = this.fb.group({
182
-		  time: [null, [Validators.required]],
188
+		  fixationTime: [null, [Validators.required]],
183 189
 			jobNumber: [null, [Validators.required]],
184 190
 			name:[null, [Validators.required]],
185
-			immobilization:[null, [Validators.required]],
191
+			fixative:[null, [Validators.required]],
186 192
 		});
187 193
 		let date = new Date();
188 194
 		this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
189
-		this.validateVerificationForm.controls.time.setValue(this.startDate);
190
-		this.verificationMoadl = true
191
-		// this.fixationModal = false
195
+		this.validateVerificationForm.controls.fixationTime.setValue(this.startDate);
196
+		this.btnLoading = true
197
+		this.mainService.getDictionary("list", "fixing_liquid_type").subscribe((res) => {
198
+			this.fixativeData = res
199
+			this.btnLoading = false
200
+			this.verificationMoadl = true
201
+		});
192 202
 	}
193 203
 	
194 204
 	// 关闭接受固定标本
195 205
 	hideSpecimenModal(){
196
-		this.fixationModal = false
206
+		this.autoUpdate()
207
+		this.barCode = null;
208
+		this.specimenCode = null;
209
+		this.fixationModal = false;
210
+	}
211
+	
212
+	// 获取标本详情
213
+	getSampleData(item){
214
+		this.mainService.getFetchData("data", "pathologyForm", item.id)
215
+		.subscribe((data) => {
216
+			this.isSpinning = false
217
+			this.detailsData = data.data
218
+		  this.specimenList = data.data.pathologySpecimenDTOList||[]
219
+			this.pathologyLogs = data.data.formLogDTOS
220
+			this.stepLength = this.pathologyLogs.length
221
+		  this.detailMoadl = true
222
+		});
223
+	}
224
+	
225
+	// 获取科室
226
+	getDept(){
227
+		this.setSpecimen()
228
+		var that = this;
229
+		that.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
230
+			let item1 = res2.find(i=>i.name=='手术室科室')
231
+			let item2 = res2.find(i=>i.name=='标本间科室')
232
+			let data1 = {
233
+			  idx: 0,
234
+			  sum: 9999,
235
+			  department: {
236
+			    hospital: { id: that.hosId || "" },
237
+			    type: { id: item1.id || "" },
238
+			  },
239
+			};
240
+			let data2 = {
241
+			  idx: 0,
242
+			  sum: 9999,
243
+			  department: {
244
+			    hospital: { id: that.hosId || "" },
245
+			    type: { id: item2.id || "" },
246
+			  },
247
+			};
248
+			that.mainService
249
+			  .getFetchDataList("data", "department", data1)
250
+			  .subscribe((res) => {
251
+			    that.operationData = res.list;
252
+			  });
253
+				
254
+			that.mainService
255
+			  .getFetchDataList("data", "department", data2)
256
+			  .subscribe((res) => {
257
+					that.specimenData = res.list
258
+					this.getDeptDetail()
259
+			  });
260
+		});
261
+	}
262
+	
263
+	// 获取关联科室详情
264
+	getDeptDetail(){
265
+		this.mainService
266
+		  .transfusionPrint("user", this.userId)
267
+		  .subscribe((res) => {
268
+				let data = res.data;
269
+				if(data.surgeryDepts){
270
+					let deptArr = []
271
+					for(let i of data.surgeryDepts){
272
+						deptArr.push(i.id)
273
+					}
274
+					this.validateForm.controls.operation.setValue(deptArr);
275
+				}
276
+				this.validateForm.controls.specimen.setValue(data.dept.id);
277
+				if(data.autoCreateOrder){
278
+					this.validateForm.controls.generate.setValue(data.autoCreateOrder);
279
+				}
280
+		  });
197 281
 	}
198 282
 	
199 283
 	// 获取是否关联标本间
@@ -201,37 +285,173 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
201 285
 		this.validateForm = this.fb.group({
202 286
 		  specimen: [null, [Validators.required]],
203 287
 			operation: [null, [Validators.required]],
204
-			generate:[null, [Validators.required]],
288
+			generate:[1, [Validators.required]],
205 289
 		});
206 290
 		this.relevanceModal = true
207 291
 	}
208 292
 	
293
+	// 确定关联科室
294
+	btnLoading:boolean = false;
209 295
 	submitForm(){
210
-		// for (const i in that.validateForm.controls) {
211
-		//   that.validateForm.controls[i].markAsDirty();
212
-		//   that.validateForm.controls[i].updateValueAndValidity();
213
-		// }
214
-		// if (that.validateForm.invalid) return;
215
-		this.relevanceModal = false
296
+		for (const i in this.validateForm.controls) {
297
+		  this.validateForm.controls[i].markAsDirty();
298
+		  this.validateForm.controls[i].updateValueAndValidity();
299
+		}
300
+		if (this.validateForm.invalid) return;
301
+		let deptArr = this.validateForm.value.operation.join(',')
302
+		let data = {
303
+		  user: {
304
+		    autoCreateOrder: this.validateForm.value.generate,
305
+				dept:{
306
+					id:this.validateForm.value.specimen
307
+				},
308
+				surgeryDeptIds:deptArr,
309
+				id:this.userId
310
+		  },
311
+		};
312
+		this.btnLoading = true
313
+		this.mainService
314
+		  .coopData("updData", "user", data)
315
+		  .subscribe((data) => {
316
+				// 手术间列表
317
+				this.getPharmacyList(this.printPharmacyIdx, 'surgeryDept', this.printPharmacySearchKey);
318
+				// 标本间列表
319
+				this.getPharmacyList(this.waitPharmacyIdx, 'specimenDept', this.waitPharmacySearchKey);
320
+				// 今日离科标本列表
321
+				this.getPharmacyList(this.pharmacyIdx, 'leavedDept', this.pharmacySearchKey);
322
+				this.btnLoading = false
323
+				this.relevanceModal = false
324
+		    if (data.status == 200) {
325
+		      this.showPromptModal("操作", true, "");
326
+		    } else {
327
+		      this.showPromptModal("操作", false, data.msg);
328
+		    }
329
+		  });
216 330
 	}
217 331
 	
218 332
 	// 输入工号查询姓名
333
+	handoverUserId:any = null;
219 334
 	numberChange(e){
220
-		
335
+		if(e.length < 3) {
336
+			this.validateVerificationForm.controls.name.setValue('');
337
+			return
338
+		}
339
+		let data = {
340
+			idx: 0,
341
+			sum: 9999,
342
+			user: {
343
+				account: e || "",
344
+				hospital: { id: this.hosId || "" }
345
+			},
346
+		};
347
+		this.mainService
348
+			.getFetchDataList("data", "user", data)
349
+			.subscribe((data) => {
350
+				if(data.list.length>0){
351
+					this.validateVerificationForm.controls.name.setValue(data.list[0].name);
352
+					this.handoverUserId = data.list[0].id
353
+				}else{
354
+					this.validateVerificationForm.controls.name.setValue('');
355
+					this.handoverUserId =null
356
+				}
357
+			});
221 358
 	}
222 359
 	
223 360
 	// 提交固定标本接收
224 361
 	submitVerificationForm(){
225
-		// for (const i in that.validateForm.controls) {
226
-		//   that.validateForm.controls[i].markAsDirty();
227
-		//   that.validateForm.controls[i].updateValueAndValidity();
228
-		// }
229
-		// if (that.validateForm.invalid) return;
230
-		this.hideVerificationModal()
362
+		for (const i in this.validateVerificationForm.controls) {
363
+		  this.validateVerificationForm.controls[i].markAsDirty();
364
+		  this.validateVerificationForm.controls[i].updateValueAndValidity();
365
+		}
366
+		if (this.validateVerificationForm.invalid) return;
367
+		
368
+		let data: any = {
369
+			id:this.codeData.id,
370
+			specimenDeptId:this.validateForm.value.specimen,
371
+			specimenFixingLiquid:{
372
+				id:this.validateVerificationForm.value.fixative
373
+			},
374
+			fixationTime:this.validateVerificationForm.value.fixationTime,
375
+			hosId: this.hosId || "" ,
376
+			handoverUserId:this.handoverUserId
377
+		};
378
+		this.btnInfoLoading = true;
379
+		this.mainService
380
+		.simplePost("addData", "pathologyForm", data)
381
+		.subscribe((res) => {
382
+			this.autoUpdate(false)
383
+			this.btnInfoLoading = false;
384
+			this.barCode = null;
385
+			// 手术间列表
386
+			this.getPharmacyList(this.printPharmacyIdx, 'surgeryDept', this.printPharmacySearchKey);
387
+			// 标本间列表
388
+			this.getPharmacyList(this.waitPharmacyIdx, 'specimenDept', this.waitPharmacySearchKey);
389
+			// 今日离科标本列表
390
+			this.getPharmacyList(this.pharmacyIdx, 'leavedDept', this.pharmacySearchKey);
391
+			if (res.status == 200) {
392
+				this.showPromptModal("操作", true, "");
393
+			} else {
394
+				this.showPromptModal("操作", false, res.msg);
395
+			}
396
+		});
397
+	}
398
+	
399
+	closeModel(){
400
+		this.verificationMoadl = false
401
+		this.fixationModal = false
231 402
 	}
403
+	
404
+	// 关闭固定接受标本
232 405
 	hideVerificationModal(){
233 406
 		this.verificationMoadl = false
234 407
 	}
408
+	
409
+	// 监听接受固定标本条码
410
+	tableLoading:boolean = false;
411
+	codeChange(e){
412
+		this.changeInpSubject.next([e]);
413
+	}
414
+	
415
+	searchSpecimenData(e){
416
+		this.mainService.pathologyScanCode({
417
+			barcode:e,
418
+			pathologyFormId:this.codeData.id
419
+		})
420
+		.subscribe((res:any) => {
421
+			this.autoUpdate(false)
422
+			this.tableLoading = false
423
+			this.specimenCode = null
424
+			if(res.status==200){
425
+				this.codeData = res.data[0]
426
+			}else{
427
+				this.message.error(res.msg)
428
+			}
429
+		})
430
+	}
431
+	
432
+	// 查看详情
433
+	detailMoadl:boolean = false;
434
+	pathologyLogs:any=[];
435
+	specimenList:any=[]
436
+	stepLength:any = 0;
437
+	viewDetail(item,type){
438
+		this.isSpinning = true
439
+		this.getSampleData(item)
440
+		clearInterval(this.logTimer);
441
+		if(type==1){
442
+			
443
+		}else if(type==2){
444
+			
445
+		}else{
446
+			
447
+		}
448
+	}
449
+	
450
+	closeDetailMoadl(){
451
+		this.detailMoadl = false
452
+		this.autoUpdate(false);
453
+	}
454
+	
235 455
   // 统计
236 456
   total() {
237 457
     let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
@@ -255,10 +475,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
255 475
     console.log(item);
256 476
     this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
257 477
   }
258
-	// 查看详情
259
-	viewDetail(item){
260
-		
261
-	}
262 478
 	
263 479
   // 查看流程信息弹窗
264 480
   logPromptModalShow = false; //弹窗开关
@@ -312,15 +528,12 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
312 528
       if (this.logTime === 0) {
313 529
         this.logTime = this.logTimeConst;
314 530
         // 代收急查标本(标本信息)列表
315
-        // this.getPharmacyList(0, 'delegation', this.printPharmacySearchKey);
316
-        // // 已收取(工单信息)列表
317
-        // this.getPharmacyList(0, 'take', this.waitPharmacySearchKey);
318
-        // // 中转标本(标本统计信息)列表
319
-        // this.getPharmacyList(0, 'trans', this.pharmacySearchKey);
320
-        // // 中转配送中(工单信息)列表
321
-        // this.getPharmacyList(0, 'trans_send', this.distributionSearchKey);
322
-        // // 异常标本(标本信息)列表
323
-        // this.getPharmacyList(0, 'error', this.completedSearchKey);
531
+        this.getPharmacyList(0, 'surgeryDept', this.printPharmacySearchKey);
532
+        // 已收取(工单信息)列表
533
+        this.getPharmacyList(0, 'specimenDept', this.waitPharmacySearchKey);
534
+        // 中转标本(标本统计信息)列表
535
+        this.getPharmacyList(0, 'leavedDept', this.pharmacySearchKey);
536
+
324 537
       }
325 538
     }, 1000);
326 539
   }
@@ -335,144 +548,97 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
335 548
   getPharmacyList(idx, type, searchKey) {
336 549
     let hosId = JSON.parse(localStorage.getItem("user")).user.currentHospital.id;
337 550
     switch (type) {
338
-      case 'delegation':
551
+      case 'surgeryDept':
339 552
         this.loading1 = true;
340 553
         break;
341
-      case 'take':
554
+      case 'specimenDept':
342 555
         this.loading2 = true;
343 556
         break;
344
-      case 'trans':
557
+      case 'leavedDept':
345 558
         this.loading3 = true;
346 559
         break;
347
-      case 'trans_send':
348
-        this.loading4 = true;
349
-        break;
350
-      case 'error':
351
-        this.loading5 = true;
352
-        break;
353 560
     }
354 561
     let postData = {
355
-      viewType: type,
356
-      keyWord: searchKey,
357
-      hosId,
562
+			idx: 0,
563
+			sum: 9999,
564
+			pathologyForm:{
565
+				detailsType: type,
566
+				keyWords:searchKey,
567
+				hosId,
568
+			}
358 569
     };
359 570
     this.mainService
360
-      .specimenView2(postData)
571
+      .getFetchDataList("data", "pathologyForm", postData)
361 572
       .subscribe((result) => {
362 573
         switch (type) {
363
-          case 'delegation':
574
+          case 'surgeryDept':
364 575
             this.loading1 = false;
365 576
             break;
366
-          case 'take':
577
+          case 'specimenDept':
367 578
             this.loading2 = false;
368 579
             break;
369
-          case 'trans':
580
+          case 'leavedDept':
370 581
             this.loading3 = false;
371 582
             break;
372
-          case 'trans_send':
373
-            this.loading4 = false;
374
-            break;
375
-          case 'error':
376
-            this.loading5 = false;
377
-            break;
378 583
         }
379
-        if (result["state"] == 200) {
584
+        if (result["status"] == 200) {
380 585
           switch (type) {
381
-            case 'delegation':
586
+            case 'surgeryDept':
382 587
               // 总数
383 588
               this.printPharmacyTotal = result.totalNum;
384 589
               // 隐藏按钮的loading
385 590
               this.printPharmacyLoad = false;
386 591
               // 查看更多,是否显示
387
-              if (result["data"].length < 10) {
592
+              if (result["list"].length < 10) {
388 593
                 this.printPharmacyFlag = false;
389
-              } else if (result["data"].length === 0 && idx === 0) {
594
+              } else if (result["list"].length === 0 && idx === 0) {
390 595
                 this.printPharmacyFlag = false;
391 596
               } else {
392 597
                 this.printPharmacyFlag = true;
393 598
               }
394 599
               // 列表数据合并
395 600
               if (idx === 0) {
396
-                this.printPharmacyList = result["data"];
601
+                this.printPharmacyList = result["list"];
397 602
               } else {
398 603
                 this.printPharmacyList = [
399 604
                   ...this.printPharmacyList,
400
-                  ...result["data"],
605
+                  ...result["list"],
401 606
                 ];
402 607
               }
403 608
               break;
404
-            case 'take':
609
+            case 'specimenDept':
405 610
               this.waitPharmacyTotal = result.totalNum;
406 611
               this.waitPharmacyLoad = false;
407
-              if (result["data"].length < 10) {
612
+              if (result["list"].length < 10) {
408 613
                 this.waitPharmacyFlag = false;
409
-              } else if (result["data"].length === 0 && idx === 0) {
614
+              } else if (result["list"].length === 0 && idx === 0) {
410 615
                 this.waitPharmacyFlag = false;
411 616
               } else {
412 617
                 this.waitPharmacyFlag = true;
413 618
               }
414 619
               if (idx === 0) {
415
-                this.waitPharmacyList = result["data"];
620
+                this.waitPharmacyList = result["list"];
416 621
               } else {
417 622
                 this.waitPharmacyList = [
418 623
                   ...this.waitPharmacyList,
419
-                  ...result["data"],
624
+                  ...result["list"],
420 625
                 ];
421 626
               }
422 627
               break;
423
-            case 'trans':
628
+            case 'leavedDept':
424 629
               this.pharmacyTotal = result.totalNum;
425 630
               this.pharmacyLoad = false;
426
-              if (result["data"].length < 10) {
631
+              if (result["list"].length < 10) {
427 632
                 this.pharmacyFlag = false;
428
-              } else if (result["data"].length === 0 && idx === 0) {
633
+              } else if (result["list"].length === 0 && idx === 0) {
429 634
                 this.pharmacyFlag = false;
430 635
               } else {
431 636
                 this.pharmacyFlag = true;
432 637
               }
433 638
               if (idx === 0) {
434
-                this.pharmacyList = result["data"];
639
+                this.pharmacyList = result["list"];
435 640
               } else {
436
-                this.pharmacyList = [...this.pharmacyList, ...result["data"]];
437
-              }
438
-              break;
439
-            case 'trans_send':
440
-              this.distributionTotal = result.totalNum;
441
-              this.distributionLoad = false;
442
-              if (result["data"].length < 10) {
443
-                this.distributionFlag = false;
444
-              } else if (result["data"].length === 0 && idx === 0) {
445
-                this.distributionFlag = false;
446
-              } else {
447
-                this.distributionFlag = true;
448
-              }
449
-              // 处理数据
450
-              result["data"].forEach(v=>{
451
-                v.deptList = v.deptList?v.deptList.join(','):'';
452
-              })
453
-              if (idx === 0) {
454
-                this.distributionList = result["data"];
455
-              } else {
456
-                this.distributionList = [
457
-                  ...this.distributionList,
458
-                  ...result["data"],
459
-                ];
460
-              }
461
-              break;
462
-            case 'error':
463
-              this.completedTotal = result.totalNum;
464
-              this.completedLoad = false;
465
-              if (result["data"].length < 10) {
466
-                this.completedFlag = false;
467
-              } else if (result["data"].length === 0 && idx === 0) {
468
-                this.completedFlag = false;
469
-              } else {
470
-                this.completedFlag = true;
471
-              }
472
-              if (idx === 0) {
473
-                this.completedList = result["data"];
474
-              } else {
475
-                this.completedList = [...this.completedList, ...result["data"]];
641
+                this.pharmacyList = [...this.pharmacyList, ...result["list"]];
476 642
               }
477 643
               break;
478 644
           }
@@ -482,7 +648,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
482 648
   // 加载更多
483 649
   loadMore(type) {
484 650
     switch (type) {
485
-      case 'delegation':
651
+      case 'surgeryDept':
486 652
         this.printPharmacyIdx++;
487 653
         this.printPharmacyLoad = true;
488 654
         this.getPharmacyList(
@@ -491,7 +657,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
491 657
           this.printPharmacySearchKey
492 658
         );
493 659
         break;
494
-      case 'take':
660
+      case 'specimenDept':
495 661
         this.waitPharmacyIdx++;
496 662
         this.waitPharmacyLoad = true;
497 663
         this.getPharmacyList(
@@ -500,31 +666,17 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
500 666
           this.waitPharmacySearchKey
501 667
         );
502 668
         break;
503
-      case 'trans':
669
+      case 'leavedDept':
504 670
         this.pharmacyIdx++;
505 671
         this.pharmacyLoad = true;
506 672
         this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
507 673
         break;
508
-      case 'trans_send':
509
-        this.distributionIdx++;
510
-        this.distributionLoad = true;
511
-        this.getPharmacyList(
512
-          this.distributionIdx,
513
-          type,
514
-          this.distributionSearchKey
515
-        );
516
-        break;
517
-      case 'error':
518
-        this.completedIdx++;
519
-        this.completedLoad = true;
520
-        this.getPharmacyList(this.completedIdx, type, this.completedSearchKey);
521
-        break;
522 674
     }
523 675
   }
524 676
   // 搜索关键词
525 677
   searchKeyHandle(type) {
526 678
     switch (type) {
527
-      case 'delegation':
679
+      case 'surgeryDept':
528 680
         this.printPharmacyIdx = 0; //页码重置
529 681
         this.printPharmacyList = []; //列表重置
530 682
         this.getPharmacyList(
@@ -533,7 +685,7 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
533 685
           this.printPharmacySearchKey
534 686
         );
535 687
         break;
536
-      case 'take':
688
+      case 'specimenDept':
537 689
         this.waitPharmacyIdx = 0; //页码重置
538 690
         this.waitPharmacyList = []; //列表重置
539 691
         this.getPharmacyList(
@@ -542,25 +694,11 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
542 694
           this.waitPharmacySearchKey
543 695
         );
544 696
         break;
545
-      case 'trans':
697
+      case 'leavedDept':
546 698
         this.pharmacyIdx = 0; //页码重置
547 699
         this.pharmacyList = []; //列表重置
548 700
         this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
549 701
         break;
550
-      case 'trans_send':
551
-        this.distributionIdx = 0; //页码重置
552
-        this.distributionList = []; //列表重置
553
-        this.getPharmacyList(
554
-          this.distributionIdx,
555
-          type,
556
-          this.distributionSearchKey
557
-        );
558
-        break;
559
-      case 'error':
560
-        this.completedIdx = 0; //页码重置
561
-        this.completedList = []; //列表重置
562
-        this.getPharmacyList(this.completedIdx, type, this.completedSearchKey);
563
-        break;
564 702
     }
565 703
   }
566 704
   // 退出
@@ -673,5 +811,20 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
673 811
       }
674 812
     }, 1000);
675 813
   }
814
+	
815
+	promptModalShow:boolean = false;
816
+	promptContent:any = null;
817
+	ifSuccess:any = null;
818
+	promptInfo:any = null;
819
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
820
+	showPromptModal(con, success, promptInfo?) {
821
+	  this.promptModalShow = false;
822
+	  this.promptContent = con;
823
+	  this.ifSuccess = success;
824
+	  this.promptInfo = promptInfo;
825
+	  setTimeout(() => {
826
+	    this.promptModalShow = true;
827
+	  }, 100);
828
+	}
676 829
 }
677 830