소스 검색

拉取代码

maotao 3 달 전
부모
커밋
732977d463

+ 25 - 2
src/app/services/main.service.ts

@@ -150,7 +150,16 @@ export class MainService {
150 150
       headers: this.headers,
151 151
     });
152 152
   }
153
-
153
+	
154
+	// 通用操作configuration信息 有操作类型(新增/更新/删除)//coop:操作类型addData:新增,updData更新,rmvData删除
155
+	apiPublicData(coop, type, data): any {
156
+	  return this.http.post(
157
+	    host.host + "/data/" + coop + "/" + type,
158
+	    data,
159
+	    { headers: this.headers }
160
+	  );
161
+	}
162
+	
154 163
   // 权限相关
155 164
   getPermission(type): any {
156 165
     return this.http.get(host.host + "/permission/roleMenu/" + type, {
@@ -406,6 +415,14 @@ export class MainService {
406 415
       { headers: this.headers }
407 416
     );
408 417
   }
418
+	//data增删改查
419
+	dataPost(coop, type, data): any {
420
+	  return this.http.post(
421
+	    host.host + "/data/" + coop + "/" + type,
422
+	    data,
423
+	    { headers: this.headers }
424
+	  );
425
+	}
409 426
   //获取工单详情里的历史记录
410 427
   getWorkOrderRecord(data): any {
411 428
     return this.http.post(host.host + "/workerOrder/getWorkOrderRecord", data, {
@@ -1049,5 +1066,11 @@ export class MainService {
1049 1066
 	    headers: this.headers,
1050 1067
 	  });
1051 1068
 	}
1052
-
1069
+	// 门诊病理采样端单点登录查询
1070
+	registerOutpatient(name, value, data) {
1071
+	  return this.http.post(host.host + `/pathology/outpatient/${name}/${value}`,data, {
1072
+	    headers: this.headers,
1073
+	  });
1074
+	}
1075
+	
1053 1076
 }

+ 27 - 17
src/app/share/pathology-add/pathology-add.component.html

@@ -26,23 +26,33 @@
26 26
 						<div class="form-title"><span class="font-weight-500">性别:</span>{{detailsData.patientDTO.gender?detailsData.patientDTO.gender.name:'-'}}</div>
27 27
 						<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
28 28
 					</nz-form-item>
29
-					<nz-form-item>
30
-						<div class="form-title width-100 font-weight-500">诊断:</div>
31
-						<div>
32
-							{{detailsData.diagnose||'无'}}
29
+					<div class="tabs">
30
+						<div class="tabs-item">
31
+							<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 0}" (click)="tabClick(0)">关联信息</div>
32
+							<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 1}" (click)="tabClick(1)">快捷标本填写</div>
33 33
 						</div>
34
-					</nz-form-item>
35
-					
36
-					<nz-form-item>
37
-						<div class="form-title width-100 font-weight-500">病历摘要:</div>
38
-						<div>{{detailsData.medicalRecords||'无'}}</div>
39
-					</nz-form-item>
40
-					
41
-					<nz-form-item>
42
-						<div class="form-title width-100 font-weight-500">手术方案:</div>
43
-						<div>{{detailsData.surgicalPlan||'无'}}</div>
44
-					</nz-form-item>
45
-					
34
+					</div>
35
+					<div *ngIf="activeIndex==0" class="padding-top-10">
36
+						<nz-form-item>
37
+							<div class="form-title width-100 font-weight-500">诊断:</div>
38
+							<div>
39
+								{{detailsData.diagnose||'无'}}
40
+							</div>
41
+						</nz-form-item>
42
+						
43
+						<nz-form-item>
44
+							<div class="form-title width-100 font-weight-500">病历摘要:</div>
45
+							<div>{{detailsData.medicalRecords||'无'}}</div>
46
+						</nz-form-item>
47
+						
48
+						<nz-form-item>
49
+							<div class="form-title width-100 font-weight-500">手术方案:</div>
50
+							<div>{{detailsData.surgicalPlan||'无'}}</div>
51
+						</nz-form-item>
52
+					</div>
53
+					<div class="specimen-box" *ngIf="activeIndex==1">
54
+						<div class="specimen-list" [title]="item.specimenName" *ngFor="let item of specimenNameData; let index = index" (click)="fastSpecimenClick($event,item,index)">{{item.specimenName}}</div>
55
+					</div>
46 56
 					<!-- <nz-form-item class="form-item">
47 57
 						<nz-form-label nzRequired nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术方案</nz-form-label>
48 58
 						<nz-form-control nzErrorTip="请输入手术方案" [nzSm]="24" [nzXs]="24">
@@ -122,7 +132,7 @@
122 132
 					
123 133
 					<div class="specimen-list">
124 134
 						<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
125
-							<div class="specimen-name" (click)="specimenEdit($event,item,index)">
135
+							<div class="specimen-name" (click)="specimenEdit($event,item,index,'direct')">
126 136
 								<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
127 137
 							</div>
128 138
 							<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>

+ 49 - 0
src/app/share/pathology-add/pathology-add.component.less

@@ -145,6 +145,55 @@
145 145
 							
146 146
 						}
147 147
 					}
148
+					
149
+					.padding-top-10{
150
+						padding-top: 10px;
151
+					}
152
+					
153
+					.specimen-box{
154
+						display: flex;
155
+						// justify-content: space-between;
156
+						overflow-y: auto;
157
+						flex-wrap: wrap;
158
+						.specimen-list{
159
+							width: 25%;
160
+							margin-top: 10px;
161
+							cursor: pointer;
162
+							text-decoration: underline;
163
+							color: #64BD7B;
164
+						}
165
+					}
166
+					.tabs{
167
+						display: flex;
168
+						// justify-content: space-between;
169
+						font-size: 14px;
170
+						background: #fff;
171
+						.tabs-item{
172
+							display: flex;
173
+							align-items: center;
174
+							width: 100%;
175
+							.tabs-item-item{
176
+								width:50%;
177
+								border: 1px solid #D9D9D9;
178
+								height: 50px;
179
+								line-height: 50px;
180
+								cursor: pointer;
181
+								text-align: center;
182
+								overflow: hidden;
183
+								text-overflow: ellipsis;
184
+								white-space: nowrap;
185
+							}
186
+							.tabs-item-item:first-child{
187
+								border-right:none;
188
+							}
189
+							.red{
190
+								color: red;
191
+							}
192
+							.activeClass{
193
+								background: #F0F6ED;
194
+							}
195
+						}
196
+					}
148 197
 				}
149 198
 				.boder-right{
150 199
 					border-right: 1px solid #e5e9ed;

+ 115 - 25
src/app/share/pathology-add/pathology-add.component.ts

@@ -69,6 +69,7 @@ export class PathologyAddComponent implements OnInit {
69 69
 		this.initForm()
70 70
 		this.getTaskTypesId()
71 71
 		this.fetchDataList()
72
+		this.getSpecimenName()
72 73
 		this.getStationaryLiquid()
73 74
   }
74 75
 	
@@ -178,6 +179,65 @@ export class PathologyAddComponent implements OnInit {
178 179
 		  });
179 180
 	}
180 181
 	
182
+	// 获取标本名称
183
+	specimenNameData:any = [];
184
+	getSpecimenName() {
185
+	  let data = {
186
+	    idx: 0,
187
+	    sum: 999,
188
+	    pathologySpecimenName: {
189
+	
190
+	    }
191
+	  };
192
+	  this.mainService
193
+	    .getFetchDataList("data", "pathologySpecimenName", data)
194
+	    .subscribe((data) => {
195
+	      this.specimenNameData = data.list;
196
+	    });
197
+	}
198
+	
199
+	//tab切换
200
+	activeIndex:any = 1;
201
+	tabClick(type){
202
+		this.activeIndex = type
203
+	}
204
+	
205
+	// 快捷标本点击
206
+	specimenEditType:any = null;
207
+	fastSpecimenClick(e, item, index){
208
+		if(item.containPosition==1){
209
+			this.isSpinning = true
210
+			let data = {
211
+				pathologyFormId:this.detailsData.id,
212
+				partSource:{
213
+					id:item.position.id
214
+				},
215
+				system:{
216
+					id:item.system.id
217
+				},
218
+				organ:{
219
+					id:item.organ.id
220
+				},
221
+				hosId:this.hosId,
222
+				specimenName:item.specimenName,
223
+			};
224
+			this.mainService
225
+			  .simplePost('addData', "pathologySpecimen", data)
226
+			  .subscribe((res) => {
227
+					this.isSpinning = false;
228
+			    if (res.status == 200) {
229
+						this.message.success('操作成功')
230
+						this.getSampleData('')
231
+			    } else {
232
+						this.message.error(res.msg)
233
+			    }
234
+			  });
235
+		}else{
236
+			this.specimenEditType = 'fast'
237
+			this.specimenEdit(e, item, index, 'fast')
238
+		}
239
+	}
240
+	
181 241
 	// 固定液类型
182 242
 	fixativeData:any = [];
183 243
 	getStationaryLiquid(){
@@ -315,15 +375,26 @@ export class PathologyAddComponent implements OnInit {
315 375
 							this.specimenModal = true
316 376
 						},50)
317 377
 					}else{
318
-						setTimeout(_=>{
319
-							this.specimenNameIndex = null
320
-							this.specimenNameName = ''
321
-							this.specimenNameId = null
322
-							this.specimenNameLength = item.specimenName.length;
323
-							this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
324
-							this.validateSpecimenForm.controls.remark.setValue(item.remark);
325
-							this.specimenModal = true
326
-						},50)
378
+						if(this.specimenEditType=='direct'){
379
+							setTimeout(_=>{
380
+								this.specimenNameIndex = null
381
+								this.specimenNameName = ''
382
+								this.specimenNameId = null
383
+								this.specimenNameLength = item.specimenName.length;
384
+								this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
385
+								this.validateSpecimenForm.controls.remark.setValue(item.remark);
386
+								this.specimenModal = true
387
+							},50)
388
+						}else{
389
+							setTimeout(_=>{
390
+								this.specimenNameIndex = null
391
+								this.specimenNameName = ''
392
+								this.specimenNameId = null
393
+								this.specimenNameLength = item.specimenName.length;
394
+								this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
395
+								this.specimenModal = true
396
+							},50)
397
+						}
327 398
 					}
328 399
 				}
329 400
 			});
@@ -352,15 +423,26 @@ export class PathologyAddComponent implements OnInit {
352 423
 								this.specimenModal = true
353 424
 							},50)
354 425
 						}else{
355
-							setTimeout(_=>{
356
-								this.specimenNameIndex = null
357
-								this.specimenNameName = ''
358
-								this.specimenNameId = null
359
-								this.specimenNameLength = item.specimenName.length;
360
-								this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
361
-								this.validateSpecimenForm.controls.remark.setValue(item.remark);
362
-								this.specimenModal = true
363
-							},50)
426
+							if(this.specimenEditType=='direct'){
427
+								setTimeout(_=>{
428
+									this.specimenNameIndex = null
429
+									this.specimenNameName = ''
430
+									this.specimenNameId = null
431
+									this.specimenNameLength = item.specimenName.length;
432
+									this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
433
+									this.validateSpecimenForm.controls.remark.setValue(item.remark);
434
+									this.specimenModal = true
435
+								},50)
436
+							}else{
437
+								setTimeout(_=>{
438
+									this.specimenNameIndex = null
439
+									this.specimenNameName = ''
440
+									this.specimenNameId = null
441
+									this.specimenNameLength = item.specimenName.length;
442
+									this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
443
+									this.specimenModal = true
444
+								},50)
445
+							}
364 446
 						}
365 447
 					}
366 448
 			  });
@@ -401,16 +483,24 @@ export class PathologyAddComponent implements OnInit {
401 483
 	
402 484
 	// 编辑标本
403 485
 	specimenDetailId:any = null;
404
-	specimenEdit(e,item,index){
405
-		this.specimenDetailId = item.id
486
+	specimenEdit(e,item,index,type){
487
+		this.specimenEditType = type
406 488
 		this.fastIndex = null
489
+		if(type=='fast'){
490
+			this.specimenDetailId = null
491
+		}else{
492
+			this.specimenDetailId = item.id
493
+		}
407 494
 		if(item.system && item.organ){
408 495
 			this.selectType = false
409
-			let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
410
-			this.placeIndex = index1
411
-			this.placeId = Number(item.partSource.id)
412
-			this.placeName = item.partSource.value==1?'':item.partSource.name
413
-			this.nzSmNum = item.partSource.value==1 ? 21 : 20
496
+			let index1 = null
497
+			if(item.partSource){
498
+				index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
499
+				this.placeIndex = index1
500
+				this.placeId = Number(item.partSource.id)
501
+				this.placeName = item.partSource.value==1?'':item.partSource.name
502
+				this.nzSmNum = item.partSource.value==1 ? 21 : 20
503
+			}
414 504
 			let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
415 505
 			this.systemIndex = index2
416 506
 			this.systemId = Number(item.system.id)

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

@@ -2628,7 +2628,7 @@
2628 2628
 		</div>
2629 2629
 		<div class="display_flex justify-content_flex-center mar-20 btns">
2630 2630
 			<button class="btn" style="margin-right: 0;" *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(0)">新增普通病理</button>
2631
-			<button class="btn" *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(1)">新增术中快速</button>
2631
+			<button class="btn" nzGhost *ngIf="autoCreate==1" nz-button nzType="primary" (click)="addPathologyType(1)">新增术中快速</button>
2632 2632
 			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">知道了</button>
2633 2633
 		</div>
2634 2634
 	</div>

+ 13 - 2
src/app/views/login/login.component.ts

@@ -256,13 +256,24 @@ export class LoginComponent implements OnInit {
256 256
     });
257 257
 		localStorage.setItem("bookBatchNo",'')
258 258
 		localStorage.setItem("specimenBatchNo",'')
259
-		if(this.paramsData.toPage1 && this.paramsData.cardNO1){
259
+		if(this.paramsData.toPage1 && (this.paramsData.cardNO1 || this.paramsData.pathologyFormCode1)){
260 260
 			this.msg.success("登录成功!", {
261 261
 			  nzDuration: 1000,
262 262
 			});
263 263
 			successLoginMsg = false;
264 264
 			localStorage.setItem("user", JSON.stringify(data.user));
265
-			this.router.navigate([`/${this.paramsData.toPage1}`, { param: this.paramsData.cardNO1 }])
265
+			let query = {
266
+				cardNO:'',
267
+				pathologyFormCode:''
268
+			}
269
+			if(this.paramsData.cardNO1){
270
+				query.cardNO = this.paramsData.cardNO1
271
+				delete query.pathologyFormCode
272
+			}else{
273
+				query.pathologyFormCode = this.paramsData.pathologyFormCode1
274
+				delete query.cardNO
275
+			}
276
+			this.router.navigate([`/${this.paramsData.toPage1}`, query])
266 277
 			return
267 278
 		}
268 279
     if (fwt) {

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -617,6 +617,11 @@ const routes: Routes = [
617 617
 			{
618 618
 			  path: "batchDistribution",
619 619
 			  loadChildren: () => import("../batch-distribution/batch-distribution.module").then((m) => m.BatchDistributionModule),
620
+			},
621
+			// 病理管理-常用标本名称
622
+			{
623
+			  path: "shareSpecimen",
624
+			  loadChildren: () => import("../share-specimen/share-specimen.module").then((m) => m.ShareSpecimenModule),
620 625
 			}
621 626
     ],
622 627
   },

+ 6 - 6
src/app/views/pathology-communication-book/pathology-communication-book.component.html

@@ -109,7 +109,7 @@
109 109
 			      [nzLoading]="loading1">
110 110
 			      <thead>
111 111
 			        <tr class="thead">
112
-			          <th>申请单号</th>
112
+			          <th nzWidth="14%">申请单号</th>
113 113
 								<th>状态</th>
114 114
 			          <th>患者姓名</th>
115 115
 			          <th>住院号</th>
@@ -125,8 +125,8 @@
125 125
 			      </thead>
126 126
 			      <tbody>
127 127
 			        <tr *ngFor="let data of listOneData">
128
-			          <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
129
-								<td>{{ data.status?data.status.name : '-' }}</td>
128
+			          <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速 </span>{{ data.applyCode || '-' }}</td>
129
+								<td> <span *ngIf="data.deleteFlag==1" class="orange">删 </span>{{ data.status?data.status.name : '-' }}</td>
130 130
 								<td>{{ data.patientDTO.patientName}}</td>
131 131
 			          <td>{{ data.patientDTO.residenceNo}}</td>
132 132
 			          <td>{{ data.takePart}}</td>
@@ -163,7 +163,7 @@
163 163
 								[(nzChecked)]="isAllDisplayDataChecked"
164 164
 								[nzIndeterminate]="isIndeterminate"
165 165
 								(nzCheckedChange)="checkAll($event)"></th>
166
-				        <th>申请单号</th>
166
+				        <th nzWidth="14%">申请单号</th>
167 167
 								<th>状态</th>
168 168
 				        <th>患者姓名</th>
169 169
 				        <th>住院号</th>
@@ -185,8 +185,8 @@
185 185
 									[(nzChecked)]="mapOfCheckedId[data.id]"
186 186
 									(nzCheckedChange)="refreshStatus()"
187 187
 								></td>
188
-				        <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
189
-								<td>{{ data.status?data.status.name : '-' }}</td>
188
+				        <td><span *ngIf="data.pathologyFormType==1" style="color: red;">速 </span>{{ data.applyCode || '-' }}</td>
189
+				        <td> <span *ngIf="data.deleteFlag==1" class="orange">删 </span>{{ data.status?data.status.name : '-' }}</td>
190 190
 								<td>{{ data.patientDTO.patientName}}</td>
191 191
 				        <td>{{ data.patientDTO.residenceNo}}</td>
192 192
 				        <td>{{ data.takePart}}</td>

+ 3 - 1
src/app/views/pathology-communication-book/pathology-communication-book.component.less

@@ -14,7 +14,9 @@
14 14
     color: @primary-color!important;
15 15
     font-weight: bold !important;
16 16
   }
17
-
17
+	.orange{
18
+		color: #ff9e00;
19
+	}
18 20
   h1,
19 21
   h2,
20 22
   h3,

+ 32 - 21
src/app/views/pathology-sample/pathology-sample.component.html

@@ -7,7 +7,7 @@
7 7
     <div class="pharmacy-name">
8 8
 			<div class="pharmacy-title">门诊病理采样端</div>
9 9
       <div class="pharmacy-name__total">
10
-				<nz-input-group nzSize="large">
10
+				<nz-input-group nzSize="large" *ngIf="!pathologyFormCode">
11 11
 					<input type="text" id="Binput" (keydown.enter)="onEnterPress()" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="请输入患者信息" />
12 12
 				</nz-input-group>
13 13
 				<!-- <ng-template #suffixButton>
@@ -162,7 +162,7 @@
162 162
 							
163 163
 							<div class="specimen-list">
164 164
 								<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
165
-									<div class="specimen-name" (click)="specimenEdit($event,item,index)">
165
+									<div class="specimen-name" (click)="specimenEdit($event,item,index,'direct')">
166 166
 										<span *ngIf="item.partSource && item.partSource.value!=1">{{item.partSource?item.partSource.name:''}}</span>{{item.specimenName}}({{item.specimenCode}})
167 167
 									</div>
168 168
 									<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>
@@ -245,25 +245,36 @@
245 245
 			</div>
246 246
 		
247 247
 		<div class="content-item-right" *ngIf="adviceList && adviceList.pathologyFormDTOS.length>0 && pathologyLogs.length && (viewType=='view' || viewType=='edit')">
248
-			<div class="step-title">病理闭环</div>
249
-			<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
250
-				<ng-container *ngFor="let item of pathologyLogs; let index = index">
251
-						<nz-step
252
-							[nzDescription]="tpl"
253
-						>
254
-						</nz-step>
255
-						<ng-template #tpl>
256
-							<div *ngIf="index==pathologyLogs.length-1" class="step-size">
257
-								<div style="color: #49B856;">{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
258
-								<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
259
-							</div>
260
-							<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
261
-								<div>{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
262
-								<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
263
-							</div>
264
-						</ng-template>
265
-					</ng-container>
266
-			</nz-steps>
248
+			<div class="tabs">
249
+				<div class="tabs-item">
250
+					<div class="tabs-item-item" *ngIf="adviceItem.status.value < 7" [ngClass]="{'activeClass': activeIndex == 0}" (click)="tabClick(0)">快捷标本填写</div>
251
+					<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 1}" (click)="tabClick(1)">病理闭环</div>
252
+				</div>
253
+			</div>
254
+			
255
+			<div class="specimen" *ngIf="activeIndex==0">
256
+				<div class="specimen-list" *ngFor="let item of specimenNameData; let index = index" (click)="fastSpecimenClick($event,item,index)">{{item.specimenName}}</div>
257
+			</div>
258
+			<div class="padding-top-10" *ngIf="activeIndex==1">
259
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
260
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
261
+							<nz-step
262
+								[nzDescription]="tpl"
263
+							>
264
+							</nz-step>
265
+							<ng-template #tpl>
266
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
267
+									<div style="color: #49B856;">{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
268
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
269
+								</div>
270
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
271
+									<div>{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
272
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto?item.operationUserDto.name:''}}</div>
273
+								</div>
274
+							</ng-template>
275
+						</ng-container>
276
+				</nz-steps>
277
+			</div>
267 278
 		</div>
268 279
 		<div class="pathology-content-btn" *ngIf="viewType=='add'">
269 280
 			<button class="btn" nz-button nzType="primary" (click)="addPathology(1)" [nzLoading]="addLoading">新增病理申请单</button>

+ 43 - 15
src/app/views/pathology-sample/pathology-sample.component.less

@@ -736,20 +736,7 @@
736 736
 								height: 64px;
737 737
 								overflow: hidden;
738 738
 							}
739
-						}
740
-									
741
-						
742
-						.content-item-right{
743
-							// height: calc(100vh - 48px);
744
-							overflow-y: auto;
745
-							padding: 15px;
746
-							.step-title{
747
-								font-size: 16px;
748
-								font-weight: 500;
749
-								margin-bottom: 10px;
750
-							}
751
-						}
752
-						
739
+						}	
753 740
 						
754 741
 						.boder-right{
755 742
 							border-right: 1px solid #e5e9ed;
@@ -782,6 +769,47 @@
782 769
 			// height: calc(100vh - 48px);
783 770
 			overflow-y: auto;
784 771
 			padding: 15px;
772
+			.specimen{
773
+				overflow-y: auto;
774
+				.specimen-list{
775
+					margin-top: 10px;
776
+					cursor: pointer;
777
+					text-decoration: underline;
778
+					color: #64BD7B;
779
+				}
780
+			}
781
+			.tabs{
782
+				display: flex;
783
+				justify-content: space-between;
784
+				font-size: 14px;
785
+				background: #fff;
786
+				border-bottom: 1px solid #e5e9ed;
787
+				margin-right: 13px;
788
+				.tabs-item{
789
+					display: flex;
790
+					align-items: center;
791
+					width: 100%;
792
+					.tabs-item-item{
793
+						width:50%;
794
+						padding: 0px 10px 10px 10px;
795
+						border-bottom: 2px solid #f9fafb;
796
+						cursor: pointer;
797
+						text-align: center;
798
+					}
799
+					.red{
800
+						color: red;
801
+					}
802
+					.activeClass{
803
+						color: #64BD7B;
804
+						border-bottom: 2px solid #64BD7B;
805
+					}
806
+				}
807
+			}
808
+			
809
+			.padding-top-10{
810
+				padding-top: 10px;
811
+			}
812
+			
785 813
 			.step-title{
786 814
 				font-size: 16px;
787 815
 				font-weight: 500;
@@ -977,7 +1005,7 @@
977 1005
 .spin-style{
978 1006
 	z-index:9999;
979 1007
 }
980
-
1008
+	
981 1009
 .look{
982 1010
 	.save {
983 1011
 	  position: fixed;

+ 153 - 52
src/app/views/pathology-sample/pathology-sample.component.ts

@@ -85,6 +85,10 @@ export class PathologySampleComponent implements OnInit {
85 85
 	mainRole:any;
86 86
 	deptId:any = null;
87 87
 	btnDelLoading:any = false;
88
+	activeIndex:any = 0;
89
+	pathologyFormCode:any = null;
90
+	cardNO:any = null;
91
+	
88 92
   ngOnInit() {
89 93
 		this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
90 94
 		  this.searchSpecimenData(v[0])
@@ -102,6 +106,7 @@ export class PathologySampleComponent implements OnInit {
102 106
 		this.getSysData()
103 107
 		this.getTaskTypesId();
104 108
 		this.getStationaryLiquid();
109
+		this.getSpecimenName();
105 110
 		this.validateForm = this.fb.group({
106 111
 			specimenGenre: [null, [Validators.required]],
107 112
 			intraoperativeFindings: [null, []],
@@ -110,9 +115,11 @@ export class PathologySampleComponent implements OnInit {
110 115
 			specimenNum: [{value: null, disabled: true},[Validators.required]],
111 116
 			takePart: [null, [Validators.required]]
112 117
 		});
113
-		if(this.route.snapshot.params && this.route.snapshot.params.param){
114
-			this.barCode = this.route.snapshot.params.param
115
-			this.searchSpecimen(this.barCode,'search','new')
118
+		if(this.route.snapshot.params && (this.route.snapshot.params.cardNO 
119
+			|| this.route.snapshot.params.pathologyFormCode)){
120
+			this.cardNO = this.route.snapshot.params.cardNO
121
+			this.pathologyFormCode = this.route.snapshot.params.pathologyFormCode
122
+			this.searchSpecimen('','load','new')
116 123
 		}
117 124
 		setTimeout(_=>{
118 125
 			document.getElementById('Binput').focus();
@@ -205,6 +212,64 @@ export class PathologySampleComponent implements OnInit {
205 212
 		},0)
206 213
 	}
207 214
 	
215
+	// 获取标本名称
216
+	specimenNameData:any = [];
217
+	getSpecimenName() {
218
+	  let data = {
219
+	    idx: 0,
220
+	    sum: 999,
221
+	    pathologySpecimenName: {
222
+
223
+	    }
224
+	  };
225
+	  this.mainService
226
+	    .getFetchDataList("data", "pathologySpecimenName", data)
227
+	    .subscribe((data) => {
228
+	      this.specimenNameData = data.list;
229
+	    });
230
+	}
231
+	
232
+	//tab切换
233
+	tabClick(type){
234
+		this.activeIndex = type
235
+	}
236
+	
237
+	// 快捷标本点击
238
+	specimenEditType:any = null;
239
+	fastSpecimenClick(e, item, index){
240
+		if(item.containPosition==1){
241
+			this.isSpinning = true
242
+			let data = {
243
+				pathologyFormId:this.detailsData.id,
244
+				partSource:{
245
+					id:item.position.id
246
+				},
247
+				system:{
248
+					id:item.system.id
249
+				},
250
+				organ:{
251
+					id:item.organ.id
252
+				},
253
+				hosId:this.hosId,
254
+				specimenName:item.specimenName,
255
+			};
256
+			this.mainService
257
+			  .simplePost('addData', "pathologySpecimen", data)
258
+			  .subscribe((res) => {
259
+					this.isSpinning = false;
260
+			    if (res.status == 200) {
261
+						this.message.success('操作成功')
262
+						this.getSampleData('')
263
+			    } else {
264
+						this.message.error(res.msg)
265
+			    }
266
+			  });
267
+		}else{
268
+			this.specimenEditType = 'fast'
269
+			this.specimenEdit(e, item, index, 'fast')
270
+		}
271
+	}
272
+	
208 273
 	// 新增申请单
209 274
 	applicationType:any;
210 275
 	addLoading:any = false;
@@ -323,6 +388,9 @@ export class PathologySampleComponent implements OnInit {
323 388
 	listClick(item,index){
324 389
 		this.leftIndex = index
325 390
 		this.adviceItem = item
391
+		if(item.status.value > 6){
392
+			this.activeIndex = 1
393
+		}
326 394
 		if(item.id){
327 395
 			this.fetchDataList(item.id);
328 396
 		}else{
@@ -348,17 +416,33 @@ export class PathologySampleComponent implements OnInit {
348 416
 			}
349 417
 		}
350 418
 		let data:any = {
351
-			idx: 0,
352
-			sum: 10,
353
-			pathologyForm:{
419
+			// idx: 0,
420
+			// sum: 10,
421
+			// pathologyForm:{
354 422
 				order: "createTime desc",
355
-				patientNo:this.barCode?this.barCode:e,
423
+				// patientNo:this.barCode?this.barCode:e,
356 424
 				surgeryDeptId:this.deptId,
357
-				operationType:'outpatientPathologyForm'
358
-			}
425
+				// operationType:'outpatientPathologyForm'
426
+			// }
427
+		}
428
+		let name = null
429
+		let value = null
430
+		if(this.cardNO){
431
+			name = 'cardNO'
432
+			value = this.cardNO
433
+			delete data.surgeryDeptId
434
+		} else if (this.pathologyFormCode){
435
+			name = 'pathologyFormCode'
436
+			value = this.pathologyFormCode
437
+			delete data.surgeryDeptId
438
+		} else if (this.barCode || this.residenceNo){
439
+			name = 'patientNo'
440
+			value = this.barCode ? this.barCode : this.residenceNo
441
+			data.surgeryDeptId = this.deptId
359 442
 		}
360 443
 		this.isSpinning = true
361
-		this.mainService.getFetchDataList("data", "pathologyForm", data)
444
+		// this.mainService.getFetchDataList("data", "pathologyForm", data)
445
+		this.mainService.registerOutpatient(name, value, data)
362 446
 		.subscribe((res:any) => {
363 447
 			this.isSpinning = false
364 448
 			if(res.status==200){
@@ -374,16 +458,18 @@ export class PathologySampleComponent implements OnInit {
374 458
 					this.stepLength = 0
375 459
 					this.viewType = 'no';
376 460
 				}
377
-				if(res.list.length>0){
378
-					for(let i of res.list[0].pathologyFormDTOS){
379
-						i.project = []
380
-						if(i.pathologyInspectDTOS){
381
-							for(let x of i.pathologyInspectDTOS){
382
-								i.project.push(x.inspectProject.name)
461
+				if(res.data.length>0){
462
+					if(res.data[0].pathologyFormDTOS.length>0){
463
+						for(let i of res.data[0].pathologyFormDTOS){
464
+							i.project = []
465
+							if(i.pathologyInspectDTOS){
466
+								for(let x of i.pathologyInspectDTOS){
467
+									i.project.push(x.inspectProject.name)
468
+								}
383 469
 							}
384 470
 						}
385 471
 					}
386
-					this.adviceList = res.list[0]
472
+					this.adviceList = res.data[0]
387 473
 					this.residenceNo = this.adviceList.patientDTO.residenceNo?this.adviceList.patientDTO.residenceNo:this.adviceList.patientDTO.patientCode
388 474
 					this.patientId = this.adviceList.patientDTO.id
389 475
 					if(optType=='bottom'){
@@ -673,22 +759,23 @@ export class PathologySampleComponent implements OnInit {
673 759
 			this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData).subscribe((res) => {
674 760
 				this.specimenNameList = res.list;
675 761
 				if(type=='edit'){
676
-					if(item.sample){
677
-						this.validateSpecimenForm = this.fb.group({
678
-						  remark: [null, []],
679
-							specimenName: [null, [Validators.required]]
680
-						});
681
-						setTimeout(_=>{
682
-							let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
683
-							this.specimenNameIndex = index4
684
-							this.specimenNameName = item.sample.name
685
-							this.specimenNameId = Number(item.sample.id);
686
-							this.specimenNameLength = item.specimenName.length;
687
-							this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
688
-						},100)
762
+					this.validateSpecimenForm = this.fb.group({
763
+					  remark: [null, []],
764
+						specimenName: [null, [Validators.required]]
765
+					});
766
+					if(item.sample && this.specimenEditType=='direct'){
767
+						let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
768
+						this.specimenNameIndex = index4
769
+						this.specimenNameName = item.sample.name
770
+						this.specimenNameId = Number(item.sample.id);
771
+						this.specimenNameLength = item.specimenName.length;
772
+						this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
773
+						this.validateSpecimenForm.controls.remark.setValue(item.remark);
774
+					}else{
775
+						this.specimenNameLength = item.specimenName.length;
776
+						this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
689 777
 					}
690 778
 					setTimeout(_=>{
691
-						this.validateSpecimenForm.controls.remark.setValue(item.remark);
692 779
 						this.specimenModal = true
693 780
 					},50)
694 781
 				}
@@ -702,22 +789,23 @@ export class PathologySampleComponent implements OnInit {
702 789
 			  .subscribe((data) => {
703 790
 			    this.specimenNameList = data.list;
704 791
 					if(type=='edit'){
705
-						if(item.sample){
706
-							this.validateSpecimenForm = this.fb.group({
707
-							  remark: [null, []],
708
-								specimenName: [null, [Validators.required]]
709
-							});
710
-							setTimeout(_=>{
711
-								let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
712
-								this.specimenNameIndex = index4
713
-								this.specimenNameName = item.sample.name
714
-								this.specimenNameId = Number(item.sample.id);
715
-								this.specimenNameLength = item.specimenName.length;
716
-								this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
717
-							},100)
792
+						this.validateSpecimenForm = this.fb.group({
793
+						  remark: [null, []],
794
+							specimenName: [null, [Validators.required]]
795
+						});
796
+						if(item.sample && this.specimenEditType=='direct'){
797
+							let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
798
+							this.specimenNameIndex = index4
799
+							this.specimenNameName = item.sample.name
800
+							this.specimenNameId = Number(item.sample.id);
801
+							this.specimenNameLength = item.specimenName.length;
802
+							this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
803
+							this.validateSpecimenForm.controls.remark.setValue(item.remark);
804
+						}else{
805
+							this.specimenNameLength = item.specimenName.length;
806
+							this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
718 807
 						}
719 808
 						setTimeout(_=>{
720
-							this.validateSpecimenForm.controls.remark.setValue(item.remark);
721 809
 							this.specimenModal = true
722 810
 						},50)
723 811
 					}
@@ -761,16 +849,24 @@ export class PathologySampleComponent implements OnInit {
761 849
 	
762 850
 	// 编辑标本
763 851
 	specimenDetailId:any = null;
764
-	specimenEdit(e,item,index){
852
+	specimenEdit(e,item,index,type){
853
+		this.specimenEditType = type
765 854
 		this.fastIndex = null
766
-		this.specimenDetailId = item.id
855
+		if(type=='fast'){
856
+			this.specimenDetailId = null
857
+		}else{
858
+			this.specimenDetailId = item.id
859
+		}
767 860
 		if(item.system && item.organ){
768 861
 			this.selectType = false
769
-			let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
770
-			this.placeIndex = index1
771
-			this.placeId = Number(item.partSource.id)
772
-			this.placeName = item.partSource.value==1?'':item.partSource.name
773
-			this.nzSmNum = item.partSource.value==1 ? 21 : 20
862
+			let index1 = null
863
+			if(item.partSource){
864
+				index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
865
+				this.placeIndex = index1
866
+				this.placeId = Number(item.partSource.id)
867
+				this.placeName = item.partSource.value==1?'':item.partSource.name
868
+				this.nzSmNum = item.partSource.value==1 ? 21 : 20
869
+			}
774 870
 			let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
775 871
 			this.systemIndex = index2
776 872
 			this.systemId = Number(item.system.id)
@@ -973,6 +1069,11 @@ export class PathologySampleComponent implements OnInit {
973 1069
 			id:'',
974 1070
 			remark:this.validateSpecimenForm.value.remark
975 1071
 		};
1072
+		if(this.specimenNameId){
1073
+			data.sample.id = this.specimenNameId
1074
+		}else{
1075
+			delete data.sample
1076
+		}
976 1077
 		let queryType = null
977 1078
 		if(this.specimenDetailId){
978 1079
 			queryType = 'updData'

+ 15 - 0
src/app/views/share-specimen/share-specimen-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { ShareSpecimenComponent } from './share-specimen.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: ShareSpecimenComponent
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class ShareSpecimenRoutingModule { }

+ 182 - 0
src/app/views/share-specimen/share-specimen.component.html

@@ -0,0 +1,182 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">科室:</span>
7
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'dept')" nzServerSearch nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="dept">
8
+            <ng-container *ngFor="let option of hospitals1">
9
+              <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
10
+            </ng-container>
11
+            <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
12
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
13
+            </nz-option>
14
+          </nz-select>
15
+        </div>
16
+        <div class="list-template__searchItem">
17
+          <span class="label">标本名称</span>:
18
+          <input nz-input class="formItem" [(ngModel)]="specimenName" placeholder="请输入标本名称" nzSize="default" />
19
+        </div>
20
+				<div class="list-template__searchItem">
21
+				  <span class="label label--big">是否包含位置</span>:
22
+					<nz-radio-group [(ngModel)]="containPosition">
23
+						<label nz-radio nzValue="1">是</label>
24
+						<label nz-radio nzValue="0">否</label>
25
+					</nz-radio-group>
26
+				</div>
27
+      </div>
28
+      <div nz-col nzXl='6' class="list-template__btns">
29
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
30
+        <button nz-button class="btn ml8 default" (click)='reset()'>重置</button>
31
+        <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
32
+      </div>
33
+    </div>
34
+    <div class="list-template__bottom">
35
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
36
+        [nzLoading]="loading1">
37
+        <thead>
38
+          <tr class="thead">
39
+            <th nzWidth="5%">序号</th>
40
+            <th>标本名称</th>
41
+            <th>位置</th>
42
+            <th>系统</th>
43
+            <th>部位</th>
44
+            <th>是否包含位置</th>
45
+            <th>关联科室</th>
46
+            <th nzWidth="120px">操作</th>
47
+          </tr>
48
+        </thead>
49
+        <tbody>
50
+          <tr *ngFor="let data of listOfData;let index=index;">
51
+            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
52
+            <td>{{ data.specimenName||'-' }}</td>
53
+            <td>{{ data.position && data.position.name||'-' }}</td>
54
+            <td>{{ data.system && data.system.name||'-'}}</td>
55
+            <td>{{ data.organ && data.organ.name||'-' }}</td>
56
+            <td>{{ data.containPosition==1?'是':'否' }}</td>
57
+            <td>{{ data.dept && data.dept.dept }}</td>
58
+            <td>
59
+              <div class="coop">
60
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
61
+                <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
62
+              </div>
63
+            </td>
64
+          </tr>
65
+        </tbody>
66
+      </nz-table>
67
+      <div class="list-template__pagination">
68
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
69
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
70
+        </nz-pagination>
71
+      </div>
72
+    </div>
73
+  </div>
74
+</div>
75
+<!-- 新增/编辑模态框 -->
76
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal" (click)="clickExtra($event)">
77
+  <div class="modalBody">
78
+    <div class="title">常用标本名称 - {{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
79
+    </div>
80
+    <overlay-scrollbars #osComponentRef1 class="content">
81
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
82
+        <nz-form-item>
83
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptId">关联科室</nz-form-label>
84
+          <nz-form-control nzErrorTip="请选择关联科室!">
85
+            <nz-input-group>
86
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'dept')" nzServerSearch nzShowSearch nzPlaceHolder="请选择关联科室" formControlName="deptId">
87
+							  <ng-container *ngFor="let option of hospitals1">
88
+							    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
89
+							  </ng-container>
90
+							  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
91
+							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
92
+							  </nz-option>
93
+							</nz-select>
94
+            </nz-input-group>
95
+          </nz-form-control>
96
+        </nz-form-item>
97
+				<nz-form-item>
98
+          <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="containPosition">是否包含位置</nz-form-label>
99
+          <nz-form-control nzErrorTip="请选择是否包含位置!">
100
+            <nz-input-group>
101
+              <nz-radio-group formControlName="containPosition" (ngModelChange)="radioChange()">
102
+              	<label nz-radio nzValue="1">是</label>
103
+              	<label nz-radio nzValue="0">否</label>
104
+              </nz-radio-group>
105
+            </nz-input-group>
106
+          </nz-form-control>
107
+        </nz-form-item>
108
+				<nz-form-item *ngIf="validateForm.value.containPosition==1">
109
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="positionId">位置</nz-form-label>
110
+				  <nz-form-control nzErrorTip="请填写位置!">
111
+				    <nz-input-group>
112
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择位置" formControlName="positionId">
113
+							  <ng-container *ngFor="let option of placeList">
114
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
115
+							  </ng-container>
116
+							</nz-select>
117
+				    </nz-input-group>
118
+				  </nz-form-control>
119
+				</nz-form-item>
120
+        <nz-form-item>
121
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="systemId">系统</nz-form-label>
122
+          <nz-form-control nzErrorTip="请填写系统!">
123
+            <nz-input-group>
124
+							<nz-select class="formItem" (ngModelChange)="systemChange()" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择系统" formControlName="systemId">
125
+							  <ng-container *ngFor="let option of systemList">
126
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
127
+							  </ng-container>
128
+							</nz-select>
129
+            </nz-input-group>
130
+          </nz-form-control>
131
+        </nz-form-item>
132
+        <nz-form-item>
133
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="organId">部位</nz-form-label>
134
+          <nz-form-control nzErrorTip="请填写部位!">
135
+            <nz-input-group>
136
+        			<nz-select class="formItem" (ngModelChange)="apparatusChange()" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择部位" formControlName="organId">
137
+        			  <ng-container *ngFor="let option of apparatusList">
138
+        			    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
139
+        			  </ng-container>
140
+        			</nz-select>
141
+            </nz-input-group>
142
+          </nz-form-control>
143
+        </nz-form-item>
144
+				<nz-form-item>
145
+				  <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="specimenName">标本名称</nz-form-label>
146
+						<nz-form-control nzErrorTip="请填写标本名称!" style="display: inline-block;width:100%;" class="address">
147
+						  <nz-input-group>
148
+						    <input class="formItem addressFocus" nz-input formControlName="specimenName" placeholder="请选择标本名称" (focus)="focusAddress()" />
149
+						    <div class="addressList" *ngIf="validateForm.value.organId && isShowAddressList">
150
+						      <ng-container *ngIf="!addressLoading && specimenNameList.length">
151
+						        <div class="addressItem ellipsis-oneline" *ngFor="let item of specimenNameList" [title]="item.name" (click)="selectAddress(item.name)">{{item.name}}</div>
152
+						      </ng-container>
153
+						      <div *ngIf="!addressLoading && !specimenNameList.length" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
154
+						        <nz-empty></nz-empty>
155
+						      </div>
156
+						      <div *ngIf="addressLoading" class="w100 h100 padding8 display_flex justify-content_flex-center align-items_center">
157
+						        <nz-spin nzSimple></nz-spin>
158
+						      </div>
159
+						    </div>
160
+						  </nz-input-group>
161
+				  </nz-form-control>
162
+				</nz-form-item>
163
+      </form>
164
+    </overlay-scrollbars>
165
+    <div class="display_flex justify-content_flex-center">
166
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
167
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
168
+    </div>
169
+  </div>
170
+</div>
171
+<!-- 删除模态框 -->
172
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" 
173
+  (confirmDelEvent)="confirmDel()" (cancelDelEvent)="cancelDel()" content="您确认要删除吗?" confirmTxt="是" cancelTxt="否">
174
+</app-dialog-delete>
175
+
176
+<!-- 操作成功/失败提示框 -->
177
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
178
+  [info]="promptInfo"></app-prompt-modal>
179
+
180
+<!-- 查看详情 -->
181
+<router-outlet (deactivate)="getList()"></router-outlet>
182
+

+ 155 - 0
src/app/views/share-specimen/share-specimen.component.less

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

+ 420 - 0
src/app/views/share-specimen/share-specimen.component.ts

@@ -0,0 +1,420 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup, FormControl } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
7
+import { ToolService } from "../../services/tool.service";
8
+import { forkJoin, Subject } from "rxjs";
9
+import { debounceTime } from "rxjs/operators";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+
12
+@Component({
13
+  selector: "app-share-specimen",
14
+  templateUrl: "./share-specimen.component.html",
15
+  styleUrls: ["./share-specimen.component.less"],
16
+})
17
+export class ShareSpecimenComponent implements OnInit {
18
+  @ViewChild("osComponentRef1", {
19
+    read: OverlayScrollbarsComponent,
20
+    static: false,
21
+  })
22
+  osComponentRef1: OverlayScrollbarsComponent;
23
+  constructor(
24
+    private message: NzMessageService,
25
+    private fb: FormBuilder,
26
+    private route: ActivatedRoute,
27
+    private router: Router,
28
+    private mainService: MainService,
29
+    private tool: ToolService
30
+  ) {}
31
+
32
+  listOfData: any[] = []; //表格数据
33
+
34
+  modal: boolean = false; //新增/编辑模态框
35
+  add: boolean; //true:新增;false:编辑
36
+  validateForm: FormGroup; //新增/编辑表单
37
+  coopId: number; //表格中执行操作的id
38
+  dept: any; //所属科室
39
+  drugCode; //编号
40
+  name; //名称
41
+  userType: any; //用户类型
42
+  hosId: any; //院区(搜索)
43
+  userGroup; //所属组
44
+  userGroup1; //所属组(搜索)
45
+  userTypes: Array<any>; //所有用户类型
46
+  alldepart: any = []; //所有所属科室
47
+  alldepart1: any = []; //所有所属科室(搜索)
48
+  hospitals1: any = []; //院区列表(搜索)
49
+	drugTypeData: any = []; //药品类型
50
+  allUserGroup: Array<any>; //所有用户组
51
+  allUserGroup1: Array<any>; //用户组(搜索)
52
+  allUserRole: Array<any>; //所有角色
53
+  pageIndex: number = 1; //页码
54
+  listLength: number = 10; //总条数
55
+  pageSize: number = 10; //每页条数
56
+
57
+  promptContent: string; //操作提示框提示信息
58
+  ifSuccess: boolean; //操作成功/失败
59
+  promptInfo: string; //操作结果提示信息
60
+  promptModalShow: boolean; //操作提示框是否展示
61
+
62
+  btnLoading: boolean = false; //提交按钮loading状态
63
+  wxRequired = false; //新增或编辑用户的时候,微信号是否必填
64
+  changeInpSubject = new Subject(); //防抖
65
+	searchParentDeptSubject = new Subject();
66
+	specimenName:any = null;
67
+	containPosition:any = null;
68
+	placeList:any = [];
69
+	systemList:any = [];
70
+	apparatusList:any = [];
71
+	specimenNameList:any = [];
72
+	addressLoading:any = false;
73
+	
74
+  ngOnInit() {
75
+    this.coopBtns = this.tool.initCoopBtns(this.route);
76
+		this.hosId = this.tool.getCurrentHospital().id;
77
+		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
78
+			this.isDeptLoading = true;
79
+			this.getDeparts(e[0])
80
+		});
81
+    this.initForm();
82
+		this.getDeparts('');
83
+		this.getList();
84
+		this.getSourceData();
85
+		this.getSysData();
86
+  }
87
+
88
+  // 初始化增删改按钮
89
+  coopBtns: any = {};
90
+  // 搜索
91
+  search() {
92
+    this.pageIndex = 1;
93
+    this.getList();
94
+  }
95
+  // 重置
96
+  reset() {
97
+    this.pageIndex = 1;
98
+    this.dept = null;
99
+    this.containPosition = null;
100
+		this.specimenName = null
101
+    this.getList();
102
+  }
103
+	
104
+  // 表格数据
105
+  loading1 = false;
106
+  getList() {
107
+    let data = {
108
+      idx: this.pageIndex - 1,
109
+      sum: this.pageSize,
110
+      pathologySpecimenName: {
111
+        deptId: this.dept,
112
+				specimenName: this.specimenName,
113
+        containPosition: this.containPosition
114
+      },
115
+    };
116
+    this.loading1 = true;
117
+    this.mainService
118
+      .getFetchDataList("data", "pathologySpecimenName", data)
119
+      .subscribe((data) => {
120
+        this.loading1 = false;
121
+        this.listOfData = data.list;
122
+        this.listLength = data.totalNum;
123
+      });
124
+  }
125
+	
126
+	// 获取科室
127
+	getDeparts(dept) {
128
+	  let data:any = {
129
+	    department: {
130
+				dept,
131
+	      hosIds: this.hosId,
132
+	    },
133
+	    idx: 0,
134
+	    sum: 20,
135
+	  };
136
+	  this.mainService
137
+	    .getFetchDataList("data", "department", data)
138
+	    .subscribe((data) => {
139
+				this.isDeptLoading = false
140
+				this.hospitals1 = data.list
141
+	    });
142
+	}
143
+	
144
+	// 搜索科室
145
+	isDeptLoading = false;
146
+	changeInp(e,type) {
147
+	  this.searchParentDeptSubject.next([e,type]);
148
+	}
149
+	
150
+	// 获取标本-位置来源
151
+	getSourceData(){
152
+		this.mainService.getDictionary("list", "pathology_position").subscribe((res) => {
153
+			this.placeList = res
154
+		});
155
+	}
156
+	
157
+	// 获取标本-系统
158
+	getSysData(){
159
+		let postData: any = {
160
+		  idx: 0,
161
+		  sum: 9999,
162
+		  dictionaryTree: {
163
+		    level: 1,
164
+		    key: 'pathology_specimen',
165
+		    deleted: 0,
166
+		  },
167
+		};
168
+		this.mainService
169
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
170
+		  .subscribe((data) => {
171
+		    this.systemList = data.list;
172
+		  });
173
+	
174
+	}
175
+	
176
+	// 获取标本-器官
177
+	getApparatusData(id,item,type){
178
+		let postData: any = {
179
+		  idx: 0,
180
+		  sum: 9999,
181
+		  dictionaryTree: {
182
+		    level: 2,
183
+				parent:id,
184
+		    key: 'pathology_specimen',
185
+		    deleted: 0,
186
+		  },
187
+		};
188
+		this.mainService
189
+		  .getFetchDataList("simple/data", "dictionaryTree", postData)
190
+		  .subscribe((data) => {
191
+				this.apparatusList = data.list;
192
+				if(type=='edit'){
193
+					this.validateForm.controls.organId.setValue(item.organ.id)
194
+					setTimeout(_=>{
195
+						this.loading1 = false
196
+						this.modal = true
197
+					},50)
198
+				}
199
+		  });
200
+	}
201
+	
202
+	// 获取标本-标本名称
203
+	getSpNameData(id,item,type){
204
+		let postData: any = {
205
+		  idx: 0,
206
+		  sum: 9999,
207
+		  dictionaryTree: {
208
+		    level: 3,
209
+				parent:id,
210
+		    key: 'pathology_specimen',
211
+		    deleted: 0,
212
+		  },
213
+		};
214
+		this.addressLoading = true;
215
+		postData.dictionaryTree.key = 'pathology_specimen'
216
+		postData.dictionaryTree.parent = id
217
+		postData.dictionaryTree.level = 3
218
+		this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData)
219
+		.subscribe((data) => {
220
+			this.addressLoading = false;
221
+			this.specimenNameList = data.list;
222
+			if(type=='edit'){
223
+				this.validateForm.controls.specimenName.setValue(item.specimenName);
224
+			}
225
+		});
226
+	}
227
+	
228
+	// 点击其他位置
229
+	clickExtra(e){
230
+	  if(document.documentElement.contains(document.querySelector('.addressList')) && e.target !== document.querySelector('.addressFocus')){
231
+	    this.isShowAddressList = false;
232
+	  }
233
+	}
234
+	
235
+	// 标本名称获取焦点
236
+	isShowAddressList:boolean = false;
237
+	focusAddress(){
238
+	  this.isShowAddressList = true;
239
+	  this.getSpNameData(this.validateForm.value.organId,{},'select')
240
+	}
241
+	
242
+	// 选择标本名称
243
+	selectAddress(name){
244
+	  this.validateForm.controls.specimenName.setValue(name)
245
+	  this.isShowAddressList = false;
246
+	}
247
+	
248
+	// 编辑标本
249
+	specimenDetailId:any = null;
250
+	specimenEdit(e,item,index){
251
+		this.specimenDetailId = item.id
252
+		if(item.system && item.organ){
253
+			this.getApparatusData(item.system.id,item,'edit')
254
+			this.getSpNameData(item.organ.id,item,'edit')
255
+		}else{
256
+			this.getSpNameData(item.specimenId,item,'edit')
257
+		}
258
+	}
259
+	
260
+	// 选择系统
261
+	systemChange(){
262
+		if(this.validateForm.value.organId){
263
+			this.validateForm.controls.organId.reset()
264
+			this.validateForm.controls.organId.markAsPristine();
265
+			this.validateForm.controls.organId.updateValueAndValidity()
266
+		}
267
+		this.getApparatusData(this.validateForm.value.systemId,{},'select')
268
+	}
269
+	
270
+	// 选择器官
271
+	apparatusChange(){
272
+		if(this.validateForm.value.specimenName){
273
+			this.validateForm.controls.specimenName.reset()
274
+			this.validateForm.controls.specimenName.markAsPristine();
275
+			this.validateForm.controls.specimenName.updateValueAndValidity()
276
+		}
277
+		this.getSpNameData(this.validateForm.value.organId,{},'select')
278
+	}
279
+	
280
+  // 新增弹框
281
+  showModal() {
282
+    this.add = true;
283
+		this.modal = true
284
+    this.initForm();
285
+  }
286
+  hideModal() {
287
+    this.modal = false;
288
+    this.initForm();
289
+  }
290
+	
291
+	// 新增/编辑选择是否包含位置
292
+	radioChange(e:any){
293
+		if(this.validateForm.value.containPosition==1){
294
+			this.validateForm.addControl(
295
+				'positionId',
296
+				new FormControl('1', Validators.required)
297
+			);
298
+		}else{
299
+			this.validateForm.removeControl('positionId')
300
+		}
301
+	}
302
+	
303
+  // 初始化新增form表单
304
+  initForm() {
305
+    this.validateForm = this.fb.group({
306
+			deptId: [null, [Validators.required]],
307
+			containPosition:['1', [Validators.required]],
308
+      specimenName: [null, [Validators.required]],
309
+      organId: [null, [Validators.required]],
310
+      systemId: [null, [Validators.required]],
311
+      positionId: [null, [Validators.required]],
312
+    });
313
+  }
314
+	
315
+  // 表单提交
316
+  submitForm(): void {
317
+    var that = this;
318
+		for (const i in that.validateForm.controls) {
319
+		  that.validateForm.controls[i].markAsDirty();
320
+		  that.validateForm.controls[i].updateValueAndValidity();
321
+		}
322
+		if (that.validateForm.invalid) return;
323
+    let data = {
324
+			pathologySpecimenName:{
325
+				...this.validateForm.value,
326
+				id:0,
327
+			}
328
+    };
329
+    if (!that.add) {
330
+      data.pathologySpecimenName.id = that.coopId;
331
+    }else{
332
+			delete data.pathologySpecimenName.id
333
+		}
334
+		that.btnLoading = true;
335
+    that.mainService
336
+      .dataPost("addData", "pathologySpecimenName", data)
337
+      .subscribe((data) => {
338
+        that.btnLoading = false;
339
+        that.hideModal();
340
+        that.initForm();
341
+        if (data.status == 200) {
342
+          that.showPromptModal(that.add ? "新增" : "编辑", true, "");
343
+        } else {
344
+          that.showPromptModal(that.add ? "新增" : "编辑", false, data.msg);
345
+        }
346
+      });
347
+  }
348
+
349
+  // 编辑
350
+  edit(data) {
351
+		this.add = false
352
+		this.loading1 = true
353
+		this.coopId = data.id;
354
+		if(data.containPosition==1){
355
+			this.validateForm.addControl(
356
+				'positionId',
357
+				new FormControl('1', Validators.required)
358
+			);
359
+			this.validateForm.controls.positionId.setValue(data.position.id);
360
+		}else{
361
+			this.validateForm.removeControl('positionId')
362
+		}
363
+		this.validateForm.controls.deptId.setValue(data.dept.id);
364
+    this.validateForm.controls.containPosition.setValue(data.containPosition + '');
365
+    this.validateForm.controls.specimenName.setValue(data.specimenName);
366
+		this.validateForm.controls.systemId.setValue(data.system.id)
367
+		if(data.system && data.organ){
368
+			this.getApparatusData(data.system.id,data,'edit')
369
+			this.getSpNameData(data.organ.id,data,'edit')
370
+		}
371
+  }
372
+
373
+  // 删除
374
+  delModal: boolean = false; //删除模态框
375
+  del(data) {
376
+    let that = this;
377
+    that.coopId = data.id;
378
+    that.delModal = true;
379
+  }
380
+	
381
+	// 取消删除弹框
382
+	cancelDel(){
383
+		this.hideDelModal();
384
+	}
385
+	
386
+  // 确认删除
387
+  confirmDel() {
388
+    let that = this;
389
+    that.btnLoading = true;
390
+    that.mainService
391
+      .apiPublicData('rmvData', 'pathologySpecimenName', [this.coopId])
392
+      .subscribe((data) => {
393
+        that.btnLoading = false;
394
+        that.hideDelModal();
395
+        if (data["status"] == 200) {
396
+          that.showPromptModal("删除", true, "");
397
+        } else {
398
+          that.showPromptModal("删除", false, data["msg"]);
399
+        }
400
+      });
401
+  }
402
+	
403
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
404
+	showPromptModal(con, success, promptInfo?) {
405
+	  this.promptModalShow = false;
406
+	  this.promptContent = con;
407
+	  this.ifSuccess = success;
408
+	  this.promptInfo = promptInfo;
409
+	  setTimeout(() => {
410
+	    this.promptModalShow = true;
411
+	  }, 100);
412
+	  this.getList();
413
+	}
414
+	
415
+  // 关闭删除模态框
416
+  hideDelModal() {
417
+    this.delModal = false;
418
+  }
419
+}
420
+

+ 19 - 0
src/app/views/share-specimen/share-specimen.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { ShareSpecimenRoutingModule } from './share-specimen-routing.module';
5
+import { ShareSpecimenComponent } from './share-specimen.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    ShareSpecimenComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    ShareSpecimenRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class ShareSpecimenModule { }