Bladeren bron

拉取代码

maotao 4 maanden geleden
bovenliggende
commit
0832242956
19 gewijzigde bestanden met toevoegingen van 1435 en 778 verwijderingen
  1. 20 10
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html
  2. 75 41
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.less
  3. 45 19
      src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts
  4. 15 1
      src/app/services/main.service.ts
  5. 33 20
      src/app/share/pathology-add/pathology-add.component.html
  6. 8 1
      src/app/share/pathology-add/pathology-add.component.less
  7. 193 54
      src/app/share/pathology-add/pathology-add.component.ts
  8. 63 19
      src/app/share/pathology-detail/pathology-detail.component.html
  9. 226 0
      src/app/share/pathology-detail/pathology-detail.component.less
  10. 30 475
      src/app/share/pathology-detail/pathology-detail.component.ts
  11. 1 1
      src/app/views/dispensing-batch/dispensing-batch.component.html
  12. 48 2
      src/app/views/hushijiandan/hushijiandan.component.html
  13. 243 2
      src/app/views/hushijiandan/hushijiandan.component.less
  14. 70 7
      src/app/views/hushijiandan/hushijiandan.component.ts
  15. 1 1
      src/app/views/repository-manage-add/repository-manage-add.component.html
  16. 3 2
      src/app/views/repository-manage-add/repository-manage-add.component.less
  17. 85 36
      src/app/views/specimen-room-view/specimen-room-view.component.html
  18. 228 2
      src/app/views/specimen-room-view/specimen-room-view.component.less
  19. 48 85
      src/app/views/specimen-room-view/specimen-room-view.component.ts

+ 20 - 10
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.html

@@ -1,4 +1,4 @@
1
-<div class="content specimen">
1
+<div class="content specimen" id="dictionary">
2 2
   <div class="contentInner">
3 3
 		<div class="address">
4 4
 		  <overlay-scrollbars #osComponentRef1 class="contentBody">
@@ -104,15 +104,25 @@
104 104
             </div>
105 105
           </div>
106 106
         </div>
107
-				<div *ngIf="activeDictionaryKey=='pathology'">
108
-					<div class="list">
109
-						<!--是否支持根据手术新建申请单 -->
110
-						<div class="display_flex align-items_center mb8">
111
-						  <nz-form-label class="label">是否支持根据手术新建申请单</nz-form-label>
112
-						  <nz-checkbox-group [(ngModel)]="support"></nz-checkbox-group>
113
-						</div>
114
-						<div class="bottom">
115
-						  <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitPathologyForm()">保存</button>
107
+				<div class="TaskTypeManagement" *ngIf="activeDictionaryKey=='pathology'">
108
+					<div class="taskTypeInfo">
109
+						<div class="list">
110
+							<!--是否支持根据手术新建申请单 -->
111
+							<div class="display_flex align-items_center mb8">
112
+								<nz-form-label class="label">是否支持根据手术新建申请单</nz-form-label>
113
+								<nz-checkbox-group [(ngModel)]="autoCreate"></nz-checkbox-group>
114
+							</div>
115
+							<div class="bottom">
116
+								<button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitPathologyForm()">保存</button>
117
+							</div>
118
+							<div class="list" *ngIf="loading">
119
+							  <div class="loadingFull display_flex justify-content_flex-center align-items_center">
120
+							    <div class="loadingFullInner">
121
+							      <img src="../../../assets/images/loading.gif" alt="">
122
+							      <div>加载中...</div>
123
+							    </div>
124
+							  </div>
125
+							</div>
116 126
 						</div>
117 127
 					</div>
118 128
 				</div>

+ 75 - 41
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.less

@@ -15,62 +15,100 @@
15 15
     width: 100%!important;
16 16
     height: 100%!important;
17 17
   }
18
+  #dictionary{
19
+    margin: 24px 16px;
20
+    .addressAssign{
21
+      flex: 7;
22
+    }
23
+    .contentItem{
24
+      margin: 0 16px;
25
+      padding: 8px;
26
+      text-align: center;
27
+      &.active{
28
+        background-color: @primary-color;
29
+        color: #fff;
30
+        border-radius: 4px;
31
+      }
32
+    }
33
+    .contentBody{
34
+      padding: 16px;
35
+      min-height: 0;
36
+      display: flex;
37
+      flex-direction: column;
38
+    }
39
+    .contentBody2{
40
+      flex: 1;
41
+    }
42
+    ::ng-deep .ant-form-item{
43
+      margin-bottom: 0;
44
+    }
45
+    .dictionaryRow{
46
+      display: flex;
47
+      align-items: center;
48
+      justify-content: center;
49
+      gap: 16px;
50
+      .orders{
51
+        flex: 1;
52
+        display: flex;
53
+        justify-content: flex-end;
54
+        align-items: center;
55
+      }
56
+      .name{
57
+        width: 100px;
58
+        display: flex;
59
+        justify-content: flex-end;
60
+        align-items: center;
61
+      }
62
+      .value{
63
+        flex: 3;
64
+        display: flex;
65
+        align-items: center;
66
+        .valueInput{
67
+          width: 600px;
68
+        }
69
+        .icon_transport{
70
+          font-size: 20px;
71
+          color: #8a8a8a;
72
+          cursor: pointer;
73
+        }
74
+      }
75
+
76
+    }
77
+  }
18 78
   .content{
19 79
     flex: 1;
20 80
     min-height: 0;
21 81
     display: flex;
22
-    // flex-direction: column;
82
+    flex-direction: column;
23 83
     justify-content: space-between;
24 84
     border: 1px solid #EEF3F9;
25
-    &.specimen{
26
-      margin: 24px 24px 0;
85
+    &.priority{
86
+      margin: 24px 118px 0;
27 87
       background-color: #fff;
28 88
       .contentInner{
29
-        // padding: 40px 158px 72px;
89
+        padding: 48px 206px;
30 90
         border: 1px solid #E8EBEF;
31
-        .addressAssign{
32
-          width: 100%;
33
-          border: none;
34
-        }
35
-        .contentBody{
36
-          // flex: 1;
37
-          // display: flex;
38
-          // flex-direction: column;
39
-          // align-items: center;
40
-          padding: 16px;
41
-          gap: 32px;
42
-        }
43
-        .hospital{
44
-          width: 100%;
45
-          text-align: left;
46
-        }
47
-        .classList{
48
-          .select{
49
-            width: 313px;
50
-          }
51
-        }
52 91
       }
53 92
     }
54 93
     .contentItem{
55
-      padding: 8px;
94
+      padding: 4px 16px;
56 95
       cursor: pointer;
57 96
       overflow: hidden;
58 97
       text-overflow: ellipsis;
59 98
       white-space: nowrap;
60
-			margin: 0 16px;
61 99
       &.active{
62
-        color: #fff;
63
-        background-color: #49b856;
100
+        color: @primary-color;
101
+        background-color: #F0F6ED;
64 102
         border-radius: 4px;
65 103
       }
66 104
     }
67 105
     .contentInner{
68 106
       flex: 1;
69 107
       display: flex;
70
-      // flex-direction: column;
108
+      justify-content: space-between;
71 109
       align-items: center;
72
-      // padding: 0 16px;
73
-      gap: 32px;
110
+      padding: 0 16px;
111
+      gap: 16px;
74 112
       .contentHead{
75 113
         height: 45px;
76 114
         display: flex;
@@ -91,24 +129,21 @@
91 129
         }
92 130
       }
93 131
       .contentBody{
94
-        padding: 0 8px 16px;
132
+        padding: 0 8px;
95 133
         margin: 4px 0;
96 134
         flex: 1;
97 135
       }
98
-      .contentBody2{
99
-        flex: 1;
100
-      }
101 136
       .address{
102 137
         flex: 1;
103 138
         height: 100%;
104 139
         background: #FFFFFF;
105
-        // border: 1px solid #E8EBEF;
140
+        border: 1px solid #E8EBEF;
106 141
         display: flex;
107
-        // flex-direction: column;
142
+        flex-direction: column;
108 143
         width: 0;
109 144
       }
110 145
       .addressAssign{
111
-        flex: 7;
146
+        flex: 3;
112 147
         height: 100%;
113 148
         background: #FFFFFF;
114 149
         border: 1px solid #E8EBEF;
@@ -140,9 +175,8 @@
140 175
       align-items: center;
141 176
     }
142 177
   }
143
-
144 178
   .TaskTypeManagement {
145
-    height: calc(100vh - 224px);
179
+    height: calc(100vh - 136px);
146 180
     background: #f9fafb;
147 181
     overflow: hidden;
148 182
     padding: 16px 20px;

+ 45 - 19
src/app/components/configurationCenter/configuration-specimen/configuration-specimen.component.ts

@@ -27,7 +27,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
27 27
 	];
28 28
 	
29 29
 	// 扫描时指定科室不提醒勾选项
30
-	support:any[] = [
30
+	autoCreate:any[] = [
31 31
 	  {label:'是否开启',value: 0}
32 32
 	];
33 33
 	
@@ -97,8 +97,12 @@ export class ConfigurationSpecimenComponent implements OnInit {
97 97
 	activeDictionaryKey:any = 'examine';
98 98
 	clickDictionaryKey(item){
99 99
 	  this.activeDictionaryKey = item.key;
100
-	  this.getDeptList();
101
-	  this.getTaskType();
100
+		if(item.key=='examine'){
101
+			this.getDeptList();
102
+			this.getTaskType();
103
+		}else{
104
+			this.getTaskTypesId()
105
+		}
102 106
 	}
103 107
 	
104 108
   // 扫描时指定科室不提醒勾选项
@@ -163,9 +167,9 @@ export class ConfigurationSpecimenComponent implements OnInit {
163 167
 	submitPathologyForm(){
164 168
 		let postData:any = {
165 169
 		  id: this.configs.id,
166
-		  taskType: this.tasktype.id,
170
+		  taskType: this.taskTypeData.id,
167 171
 		  hosId: this.hosId,
168
-		  support: this.deptNotAlert[0].checked ? 1 : 0,
172
+		  autoCreate: this.autoCreate[0].checked ? 1 : 0,
169 173
 		};
170 174
 		this.btnLoading = true;
171 175
 		this.mainService
@@ -213,7 +217,16 @@ export class ConfigurationSpecimenComponent implements OnInit {
213 217
         }
214 218
       });
215 219
   }
216
-
220
+	
221
+	// 获取任务类型(病理标本)
222
+	taskTypeData:any;
223
+	getTaskTypesId() {
224
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
225
+			this.taskTypeData = data.find(i=>i.value=='pathology')
226
+			this.getConfig();
227
+		});
228
+	}
229
+	
217 230
   //获取任务类型
218 231
   getTaskType() {
219 232
     this.loading = true;
@@ -245,18 +258,31 @@ export class ConfigurationSpecimenComponent implements OnInit {
245 258
   // 获取配置
246 259
   getConfig() {
247 260
     this.loading = true;
248
-    let postData = {
249
-      idx: 0,
250
-      sum: 10,
251
-      taskTypeConfig: {
252
-        taskTypeDTO: {
253
-          hosId: {
254
-            id: this.hosId
255
-          },
256
-          associationType: this.tasktype.associationType
257
-        }
258
-      }
259
-    };
261
+		let postData = null;
262
+		if(this.activeDictionaryKey=='examine'){
263
+			postData = {
264
+			  idx: 0,
265
+			  sum: 10,
266
+			  taskTypeConfig: {
267
+			    taskTypeDTO: {
268
+			      hosId: {
269
+			        id: this.hosId
270
+			      },
271
+			      associationType: this.tasktype.associationType
272
+			    }
273
+			  }
274
+			};
275
+		}else{
276
+			postData = {
277
+			  idx: 0,
278
+			  sum: 10,
279
+			  taskTypeConfig: {
280
+					hosId:this.hosId,
281
+					taskType:this.taskTypeData.id
282
+			  }
283
+			};
284
+		}
285
+    
260 286
     this.mainService
261 287
       .getFetchDataList("simple/data", "taskTypeConfig", postData)
262 288
       .subscribe((result) => {
@@ -264,7 +290,7 @@ export class ConfigurationSpecimenComponent implements OnInit {
264 290
         if (result.status == 200) {
265 291
           this.configs = result.list[0] || {};
266 292
 					// 病理标本
267
-					this.support[0].checked = this.configs.support == 1;
293
+					this.autoCreate[0].checked = this.configs.autoCreate == 1;
268 294
 					// 检查标本
269 295
           this.deptNotAlert[0].checked = this.configs.deptNotAlert == 1;
270 296
           this.arriveScanCode[0].checked = this.configs.arriveScanCode == 1;

+ 15 - 1
src/app/services/main.service.ts

@@ -923,7 +923,21 @@ export class MainService {
923 923
 	     headers: this.headers,
924 924
 	   });
925 925
 	 }
926
-
926
+	
927
+	//病理申请单追加打印/全量打印
928
+	 pathologyCheckPrint(type,businessId) {
929
+	   return this.http.post(host.host + `/pathology/check/${type}/${businessId}`, {}, {
930
+	     headers: this.headers,
931
+	   });
932
+	 }
933
+	
934
+	// 病例申请单暂存
935
+	pathologyOperation(data,operation) {
936
+	  return this.http.post(host.host + `/pathology/${operation}`, data, {
937
+	    headers: this.headers,
938
+	  });
939
+	}
940
+	
927 941
 	// 病理查询标本条码
928 942
 	pathologyScanCode(data) {
929 943
 	  return this.http.post(host.host + `/pathology/scanCode`, data, {

+ 33 - 20
src/app/share/pathology-add/pathology-add.component.html

@@ -6,20 +6,24 @@
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-title-box">
9
-						<div class="form-title">取标本位置:{{detailsData.surgeryDeptDTO.dept}}</div>
10
-						<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
9
+						<div class="form-title" *ngIf="detailsData.pathologyFormType==null">申请单类型:无</div>
10
+						<div class="form-title" *ngIf="detailsData.pathologyFormType==1">申请单类型:术中快速病理检查申请单</div>
11
+						<div class="form-title" *ngIf="detailsData.pathologyFormType==0">申请单类型:病理检查申请单</div>
12
+						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
11 13
 					</nz-form-item>
12 14
 					<nz-form-item class="form-title-box">
13
-						<div class="form-title"><span class="font-weight-500">申请单号:</span>{{detailsData.applyCode}}</div>
14
-						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
15
+						<div class="form-title"><span class="font-weight-500">申请单号:</span>{{detailsData.applyCode}}</div>
16
+						<div class="form-title over-class"><span class="font-weight-500">申请科室:</span>{{detailsData.patientDTO.department.dept}}</div>
15 17
 					</nz-form-item>
16 18
 					<nz-form-item class="form-title-box">
17
-						<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
18
-						<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
19
+						<div class="form-title">手术间:{{detailsData.surgeryDeptDTO.dept}}</div>
20
+						<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
19 21
 					</nz-form-item>
20 22
 					<nz-form-item class="form-title-box">
21 23
 						<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
22 24
 						<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
25
+						<div class="form-title"><span class="font-weight-500">性别:</span>{{detailsData.patientDTO.gender?detailsData.patientDTO.gender.name:'-'}}</div>
26
+						<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
23 27
 					</nz-form-item>
24 28
 					<nz-form-item>
25 29
 						<div class="form-title width-100 font-weight-500">诊断:</div>
@@ -47,26 +51,26 @@
47 51
 				</div>
48 52
 				
49 53
 				<div class="content-item">
50
-<!-- 					<nz-form-item class="form-item">
51
-						<nz-form-label nzRequired nzFor="intraoperativeFindings" [nzSm]="6" [nzXs]="24">术中所见</nz-form-label>
52
-						<nz-form-control nzErrorTip="请输入术中所见" [nzSm]="24" [nzXs]="24">
53
-							<textarea rows="3" nz-input formControlName="intraoperativeFindings" placeholder="请输入术中所见"></textarea>
54
-						</nz-form-control>
55
-					</nz-form-item> -->
56
-					<nz-form-item class="form-item">
57
-						<nz-form-label nzRequired nzFor="intraoperativeRapidity" [nzSm]="6" [nzXs]="24">是否术中快速</nz-form-label>
54
+					<nz-form-item class="form-item" *ngIf="statusValue==1">
55
+						<nz-form-label nzRequired nzFor="pathologyFormType" [nzSm]="6" [nzXs]="24">申请单类型</nz-form-label>
58 56
 						<nz-form-control nzErrorTip="请选择!" [nzSm]="18" [nzXs]="24">
59
-							<nz-radio-group formControlName="intraoperativeRapidity">
60
-								<label nz-radio [nzValue]="1"></label>
61
-								<label nz-radio [nzValue]="0"></label>
57
+							<nz-radio-group formControlName="pathologyFormType">
58
+								<label nz-radio [nzValue]="1">术中快速病理检查申请单</label>
59
+								<label nz-radio [nzValue]="0">病理检查申请单</label>
62 60
 							</nz-radio-group>
63 61
 						</nz-form-control>
64 62
 					</nz-form-item>
65 63
 					<nz-form-item class="form-item">
64
+						<nz-form-label nzFor="intraoperativeFindings" [nzSm]="4" [nzXs]="24">术中所见</nz-form-label>
65
+						<nz-form-control nzErrorTip="请输入术中所见" [nzSm]="20" [nzXs]="24">
66
+							<input nz-input formControlName="intraoperativeFindings" placeholder="请输入术中所见"/>
67
+						</nz-form-control>
68
+					</nz-form-item>
69
+					<nz-form-item class="form-item">
66 70
 						<nz-form-label nzRequired nzFor="project" [nzSm]="4" [nzXs]="24">检验项目</nz-form-label>
67 71
 						<nz-form-control nzErrorTip="请选择检验项目!" [nzSm]="20" [nzXs]="24">
68 72
 							<nz-input-group>
69
-								<nz-select nzSearch nzShowSearch nzMode="multiple" nzPlaceHolder="请选择检验项目" formControlName="project">
73
+								<nz-select nzSearch nzMode="multiple" nzShowSearch nzPlaceHolder="请选择检验项目" formControlName="project">
70 74
 									<ng-container *ngFor="let option of projectData">
71 75
 										<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
72 76
 									</ng-container>
@@ -119,6 +123,7 @@
119 123
 						<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
120 124
 							<div class="specimen-name" (click)="specimenEdit($event,item,index)">
121 125
 							{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
126
+							({{item.specimenCode}})
122 127
 							</div>
123 128
 							<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>
124 129
 						</div>
@@ -129,8 +134,16 @@
129 134
 		<div class="mask-style" *ngIf="isSpinning">
130 135
 			<nz-spin nzSimple class="spin-style"></nz-spin>
131 136
 		</div>
132
-		<div class="display_flex justify-content_flex-center bottom-btn">
133
-		  <button class="btn btn-right" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">打印标本</button>
137
+		<div class="display_flex justify-content_flex-center bottom-btn" *ngIf="statusValue==1">
138
+			<button class="btn btn-right" nz-button nzType="primary" (click)="temporary('temporary')" [nzLoading]="zcLoading">暂存</button>
139
+		  <button class="btn btn-right" nz-button nzType="primary" (click)="submitForm('print')" [nzLoading]="btnLoading">打印标本</button>
140
+			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
141
+		</div>
142
+		
143
+		<div class="display_flex justify-content_flex-center bottom-btn" *ngIf="statusValue==2 || statusValue==3 || statusValue==4">
144
+			<button class="btn btn-right" nz-button nzType="primary" (click)="temporary('submit')" [nzLoading]="zcLoading">保存</button>
145
+		  <button class="btn btn-right" nz-button nzType="primary" (click)="superaddition()" [nzLoading]="zjLoading">追加打印</button>
146
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitForm('all')" [nzLoading]="btnLoading">全量打印</button>
134 147
 			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
135 148
 		</div>
136 149
 	</div>

+ 8 - 1
src/app/share/pathology-add/pathology-add.component.less

@@ -28,7 +28,7 @@
28 28
 	background: rgba(0, 0, 0, 0.4);
29 29
 	z-index: 99;
30 30
 	.pathology-content{
31
-		width: 80%;
31
+		width: 90%;
32 32
 		background: #fff;
33 33
 		border-radius: 5px;
34 34
 		padding: 10px 20px;
@@ -110,6 +110,12 @@
110 110
 							color: #333;
111 111
 							margin-right: 40px;
112 112
 						}
113
+						.over-class{
114
+							width: 310px;
115
+							overflow:hidden;
116
+							text-overflow:ellipsis;
117
+							white-space:nowrap;
118
+						}
113 119
 					}
114 120
 					.ant-form-item {
115 121
 					  margin-bottom: 14px;
@@ -142,6 +148,7 @@
142 148
 				}
143 149
 				.boder-right{
144 150
 					border-right: 1px solid #e5e9ed;
151
+					margin-top: 10px;
145 152
 				}
146 153
 				.specimen-item{
147 154
 					display: flex;

+ 193 - 54
src/app/share/pathology-add/pathology-add.component.ts

@@ -23,6 +23,7 @@ export class PathologyAddComponent implements OnInit {
23 23
 	@Output() pathologyCancel = new EventEmitter();
24 24
 	@Input() surgeryId: string;
25 25
 	@Input() patientId: string;
26
+	@Input() detailId: string;
26 27
 	
27 28
 	constructor(
28 29
 		private http: HttpClient,
@@ -71,9 +72,9 @@ export class PathologyAddComponent implements OnInit {
71 72
 	// 初始化新增form表单
72 73
 	initForm() {
73 74
 		this.validateForm = this.fb.group({
74
-		  intraoperativeRapidity: [null, [Validators.required]],
75
+		  pathologyFormType: [null, [Validators.required]],
75 76
 			specimenGenre: [null, [Validators.required]],
76
-			// intraoperativeFindings: [null, [Validators.required]],
77
+			intraoperativeFindings: [null, []],
77 78
 			project: [null, [Validators.required]],
78 79
 			// surgicalPlan: [null, [Validators.required]],
79 80
 			specimenNum: [null,[Validators.required]],
@@ -81,31 +82,36 @@ export class PathologyAddComponent implements OnInit {
81 82
 		});
82 83
 	}
83 84
 	
85
+	statusValue:any = 1;
84 86
 	fetchDataList(){
85 87
 		let data = {
86 88
 		  idx: 0,
87 89
 		  sum: 9999,
88 90
 		  pathologyForm: {
89
-		    surgeryId: this.surgeryId || "",
91
+				surgeryId: this.surgeryId || "",
90 92
 		    patientId: this.patientId || "",
91 93
 		    hosId: this.hosId || "" ,
92 94
 		  },
93 95
 		};
94 96
 		this.isSpinning = true;
95
-		this.mainService
96
-		  .getFetchDataList("data", "pathologyForm", data)
97
+		// this.mainService
98
+		//   .getFetchDataList("data", "pathologyForm", data)
99
+			this.mainService.getFetchData("data", "pathologyForm", this.detailId)
97 100
 		  .subscribe((data) => {
98 101
 		    this.isSpinning = false;
99
-		    this.detailsData = data.list[0];
100
-				// if(this.detailsData.surgicalPlan){
101
-				// 	this.validateForm.controls.surgicalPlan.setValue(this.detailsData.surgicalPlan);
102
-				// }
103
-				// if(this.detailsData.intraoperativeFindings){
104
-				// 	this.validateForm.controls.intraoperativeFindings.setValue(this.detailsData.intraoperativeFindings);
105
-				// }
102
+		    this.detailsData = data.data;
103
+				if(this.detailsData.status){
104
+					this.statusValue = this.detailsData.status.value
105
+				}
106
+				if(this.detailsData.pathologyFormType!=null){
107
+					this.validateForm.controls.pathologyFormType.setValue(this.detailsData.pathologyFormType);
108
+				}
109
+				if(this.detailsData.intraoperativeFindings){
110
+					this.validateForm.controls.intraoperativeFindings.setValue(this.detailsData.intraoperativeFindings);
111
+				}
106 112
 				this.getProDicData()
107 113
 				this.getDicData()
108
-				this.getSampleData()
114
+				this.getSampleData('load')
109 115
 				this.getSourceData()
110 116
 				this.getSysData()
111 117
 		  });
@@ -266,7 +272,7 @@ export class PathologyAddComponent implements OnInit {
266 272
 		  .subscribe((data) => {
267 273
 		    this.btnLoading = false;
268 274
 		    this.delModal = false;
269
-				this.getSampleData()
275
+				this.getSampleData('')
270 276
 		    if (data.status==200) {
271 277
 		      this.showSpecimenModal("删除", true, "");
272 278
 		    } else {
@@ -571,7 +577,7 @@ export class PathologyAddComponent implements OnInit {
571 577
 	}
572 578
 	
573 579
 	// 获取标本列表
574
-	getSampleData(){
580
+	getSampleData(type){
575 581
 		let data={
576 582
 			idx: 0,
577 583
 			sum: 9999,
@@ -583,21 +589,23 @@ export class PathologyAddComponent implements OnInit {
583 589
 		  .getFetchDataList("data", "pathologySpecimen", data)
584 590
 		  .subscribe((res) => {
585 591
 		    this.specimenList = res.list
586
-				let str = []
587
-				if(res.list.length>0){
588
-					for(let i of res.list){
589
-						str.push(i.system.name + '-' + i.organ.name)
592
+				if(type!='load'){
593
+					let str = []
594
+					if(res.list.length>0){
595
+						for(let i of res.list){
596
+							str.push(i.system.name + '-' + i.organ.name)
597
+						}
598
+						const newStr = new Set(str);
599
+						const newData = Array.from(newStr);
600
+						this.validateForm.controls.takePart.setValue(newData.join('、'));
590 601
 					}
591
-					const newStr = new Set(str);
592
-					const newData = Array.from(newStr);
593
-					this.validateForm.controls.takePart.setValue(newData.join('、'));
594 602
 				}
595 603
 				this.validateForm.controls.specimenNum.setValue(this.specimenList.length);
596 604
 		  });
597 605
 	}
598 606
 	
599 607
 	hideSpecimenModal(){
600
-		this.getSampleData()
608
+		this.getSampleData('')
601 609
 		this.specimenModal = false
602 610
 	}
603 611
 	
@@ -633,15 +641,22 @@ export class PathologyAddComponent implements OnInit {
633 641
 				specimenType:{
634 642
 					id:this.validateForm.value.specimenGenre
635 643
 				}
636
-			}
644
+			},
645
+			operation:'',
646
+			pathologySpecimenIds:'',
637 647
 		};
638 648
 		delete data.pathologyForm.patientDTO
639 649
 		delete data.pathologyForm.surgeryDeptDTO
640 650
 		delete data.pathologyForm.surgeryDoctorDTO
641 651
 		delete data.pathologyForm.specimenGenre
642 652
 		data.pathologyForm.specimenNum = this.specimenList.length
643
-		console.log(77,data.pathologyForm.specimenNum)
644
-
653
+		if(this.operation=='addPrint' || this.operation=='wholePrint'){
654
+			data.operation = this.operation
655
+			data.pathologySpecimenIds = this.pathologySpecimenIds
656
+		}else{
657
+			delete data.operation
658
+			delete data.pathologySpecimenIds
659
+		}
645 660
 		this.printLoading = true;
646 661
 		this.mainService
647 662
 		  .pathologyPrint(data)
@@ -704,8 +719,9 @@ export class PathologyAddComponent implements OnInit {
704 719
 		  });
705 720
 	}
706 721
 	
707
-	printData:any;
708
-	submitForm(): void{
722
+	// 暂存/保存
723
+	zcLoading:any = false;
724
+	temporary(type): void{
709 725
 		var that = this;
710 726
 		for (const i in that.validateForm.controls) {
711 727
 		  that.validateForm.controls[i].markAsDirty();
@@ -716,26 +732,14 @@ export class PathologyAddComponent implements OnInit {
716 732
 			this.message.error('标本不能为空')
717 733
 			return
718 734
 		}
719
-		if(this.detailsData.status.name=='未打印'){
720
-			this.notModal = true
721
-			this.validatePrintForm = this.fb.group({
722
-			  inVitroTime: [null, [Validators.required]],
723
-				jobNumber: [null, [Validators.required]],
724
-				name:[null, [Validators.required]],
725
-			});
726
-			let date = new Date();
727
-			this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
728
-			this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
729
-			return
730
-		}
731
-
732
-		let data: any = {
735
+		let data = {
733 736
 			pathologyForm:{
734
-				...this.validateForm.value,
735 737
 				...this.detailsData,
738
+				...this.validateForm.value,
736 739
 				surgeryId: this.surgeryId || "",
737 740
 				patientId: this.patientId || "",
738 741
 				hosId: this.hosId || "" ,
742
+				pathologyInspectIds: this.validateForm.value.project.join(','),
739 743
 				specimenType:{
740 744
 					id:this.validateForm.value.specimenGenre
741 745
 				}
@@ -746,17 +750,152 @@ export class PathologyAddComponent implements OnInit {
746 750
 		delete data.pathologyForm.surgeryDeptDTO
747 751
 		delete data.pathologyForm.surgeryDoctorDTO 
748 752
 		delete data.pathologyForm.specimenGenre 
749
-		that.btnLoading = true;
750
-		that.mainService
753
+		that.zcLoading = true;
754
+		this.mainService.pathologyOperation(data,'storage').subscribe((res:any) => {
755
+				that.zcLoading = false;
756
+				if(res.status==200){
757
+					this.message.success('操作成功')
758
+				}else{
759
+					this.message.error(res.msg)
760
+				}
761
+		  });
762
+	}
763
+	
764
+	// 追加打印
765
+	zjLoading:any = false;
766
+	operation:any;
767
+	pathologySpecimenIds:any;
768
+	superaddition(): void{
769
+		var that = this;
770
+		this.operation = 'addPrint'
771
+		for (const i in that.validateForm.controls) {
772
+		  that.validateForm.controls[i].markAsDirty();
773
+		  that.validateForm.controls[i].updateValueAndValidity();
774
+		}
775
+		if (that.validateForm.invalid) return;
776
+		if(this.specimenList.length==0){
777
+			this.message.error('标本不能为空')
778
+			return
779
+		}
780
+		that.mainService.pathologyCheckPrint('pathologyForm',this.detailsData.id).subscribe((res:any)=>{
781
+			if(res.ids){
782
+				this.notModal = true
783
+				this.pathologySpecimenIds = res.ids
784
+				this.validatePrintForm = this.fb.group({
785
+				  inVitroTime: [null, [Validators.required]],
786
+					jobNumber: [null, [Validators.required]],
787
+					name:[null, [Validators.required]],
788
+				});
789
+				let date = new Date();
790
+				this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
791
+				this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
792
+			}else{
793
+				this.message.info('无新标本需要打印')
794
+			}
795
+		})
796
+	}
797
+	
798
+	// 打印标本/全量
799
+	printData:any;
800
+	submitForm(type): void{
801
+		var that = this;
802
+		this.operation = 'wholePrint'
803
+		for (const i in that.validateForm.controls) {
804
+		  that.validateForm.controls[i].markAsDirty();
805
+		  that.validateForm.controls[i].updateValueAndValidity();
806
+		}
807
+		if (that.validateForm.invalid) return;
808
+		if(this.specimenList.length==0){
809
+			this.message.error('标本不能为空')
810
+			return
811
+		}
812
+		if(type=='all'){
813
+			that.mainService.pathologyCheckPrint('pathologyForm',this.detailsData.id).subscribe((res:any)=>{
814
+				if(res.ids){
815
+					this.notModal = true
816
+					this.pathologySpecimenIds = res.ids
817
+					this.validatePrintForm = this.fb.group({
818
+					  inVitroTime: [null, [Validators.required]],
819
+						jobNumber: [null, [Validators.required]],
820
+						name:[null, [Validators.required]],
821
+					});
822
+					let date = new Date();
823
+					this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
824
+					this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
825
+				}else{
826
+					let data: any = {
827
+						pathologyForm:{
828
+							...this.detailsData,
829
+							...this.validateForm.value,
830
+							surgeryId: this.surgeryId || "",
831
+							patientId: this.patientId || "",
832
+							hosId: this.hosId || "" ,
833
+							specimenType:{
834
+								id:this.validateForm.value.specimenGenre
835
+							}
836
+						},
837
+						operation:'',
838
+						pathologySpecimenIds:'',
839
+					};
840
+					data.pathologyForm.specimenNum = this.specimenList.length
841
+					if(this.operation=='addPrint' || this.operation=='wholePrint'){
842
+						data.operation = this.operation
843
+						data.pathologySpecimenIds = this.pathologySpecimenIds
844
+					}else{
845
+						delete data.operation
846
+						delete data.pathologySpecimenIds
847
+					}
848
+					delete data.pathologyForm.patientDTO
849
+					delete data.pathologyForm.surgeryDeptDTO
850
+					delete data.pathologyForm.surgeryDoctorDTO 
851
+					delete data.pathologyForm.specimenGenre 
852
+					that.btnLoading = true;
853
+					this.printFun(data)
854
+				}
855
+			})
856
+		}else{
857
+			this.operation = 'null'
858
+			if(this.statusValue==1){
859
+				this.notModal = true
860
+				this.validatePrintForm = this.fb.group({
861
+					inVitroTime: [null, [Validators.required]],
862
+					jobNumber: [null, [Validators.required]],
863
+					name:[null, [Validators.required]],
864
+				});
865
+				let date = new Date();
866
+				this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
867
+				this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
868
+				return
869
+			}
870
+			let data: any = {
871
+				pathologyForm:{
872
+					...this.validateForm.value,
873
+					...this.detailsData,
874
+					surgeryId: this.surgeryId || "",
875
+					patientId: this.patientId || "",
876
+					hosId: this.hosId || "" ,
877
+					specimenType:{
878
+						id:this.validateForm.value.specimenGenre
879
+					}
880
+				}
881
+			};
882
+			data.pathologyForm.specimenNum = this.specimenList.length
883
+			delete data.pathologyForm.patientDTO
884
+			delete data.pathologyForm.surgeryDeptDTO
885
+			delete data.pathologyForm.surgeryDoctorDTO 
886
+			delete data.pathologyForm.specimenGenre 
887
+			this.btnLoading = true;
888
+			this.printFun(data)
889
+		}
890
+	}
891
+	
892
+	// 打印
893
+	printFun(data){
894
+		this.mainService
751 895
 		  .pathologyPrint(data)
752 896
 		  .subscribe((res:any) => {
753 897
 				if(res.status==200){
754 898
 					let arr = res.data;
755
-					// if(arr.specimenList.length==1){
756
-					// 	for(let i of arr.specimenList){
757
-					// 		i.applyCode = data.pathologyForm.applyCode
758
-					// 	}
759
-					// }
760 899
 					if(arr.applyBarCode){
761 900
 						arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
762 901
 					}
@@ -764,8 +903,8 @@ export class PathologyAddComponent implements OnInit {
764 903
 						i.applyCode = arr.applyCode?arr.applyCode:data.pathologyForm.applyCode
765 904
 						i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
766 905
 					}
767
-					that.btnLoading = false;
768
-					that.printData = arr;
906
+					this.btnLoading = false;
907
+					this.printData = arr;
769 908
 					setTimeout(() => {
770 909
 					  const printContent = document.getElementById("report");
771 910
 					  const WindowPrt = window.open("", "", "width=100,height=1000");
@@ -775,7 +914,7 @@ export class PathologyAddComponent implements OnInit {
775 914
 							WindowPrt.focus();
776 915
 							WindowPrt.print();
777 916
 							WindowPrt.close();
778
-							that.hideModal();
917
+							this.hideModal();
779 918
 						},500)
780 919
 					}, 500);
781 920
 				}else{
@@ -786,7 +925,7 @@ export class PathologyAddComponent implements OnInit {
786 925
 	
787 926
 	// 关闭标本
788 927
 	closeSpecimenModel(){
789
-		this.getSampleData()
928
+		this.getSampleData('')
790 929
 		this.hideSpecimenModal()
791 930
 	}
792 931
 	

+ 63 - 19
src/app/share/pathology-detail/pathology-detail.component.html

@@ -4,17 +4,24 @@
4 4
 			<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
5 5
 			<div class="content">
6 6
 				<div class="content-item boder-right">
7
-					<div class="form-title-box">
8
-						<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{detailsData.intraoperativeRapidity==1?'是':'否'}}</div>
9
-						<div class="form-title"><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"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
7
+					<nz-form-item class="form-title-box">
8
+						<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</div>
9
+						<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
10
+					</nz-form-item>
11
+					<nz-form-item class="form-title-box">
12
+						<div class="form-title"><span class="font-weight-500">申请单号:</span>{{detailsData.applyCode}}</div>
13
+						<div class="form-title over-class"><span class="font-weight-500">申请科室:</span>{{detailsData.patientDTO.department.dept}}</div>
14
+					</nz-form-item>
15
+					<nz-form-item class="form-title-box">
16
+						<div class="form-title">手术间:{{detailsData.surgeryDeptDTO.dept}}</div>
17
+						<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
18
+					</nz-form-item>
19
+					<nz-form-item class="form-title-box">
15 20
 						<div class="form-title"><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>
21
+						<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
22
+						<div class="form-title"><span class="font-weight-500">性别:</span>{{detailsData.patientDTO.gender.name||'-'}}</div>
23
+						<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
24
+					</nz-form-item>
18 25
 					
19 26
 					<div class="form-title-box">
20 27
 						<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
@@ -35,10 +42,10 @@
35 42
 						<div class="form-title font-weight-500">手术方案:</div>
36 43
 						<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
37 44
 					</div>
38
-<!-- 					<div class="form-list">
45
+					<div class="form-list">
39 46
 						<div class="form-title font-weight-500">术中所见:</div>
40 47
 						<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
41
-					</div> -->
48
+					</div>
42 49
 
43 50
 					<div class="form-title-box">
44 51
 						<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
@@ -55,8 +62,9 @@
55 62
 					<div class="form-list">
56 63
 						<div class="form-title font-weight-500">标本:</div>
57 64
 						<div class="form-title-box">
58
-							<div class="form-title" *ngFor="let item of specimenList">
65
+							<div class="form-title cursor" *ngFor="let item of specimenList" (click)="specimenView(item)">
59 66
 								{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
67
+								({{item.specimenCode}})
60 68
 							</div>
61 69
 						</div>
62 70
 					</div>
@@ -83,6 +91,7 @@
83 91
 					</nz-steps>
84 92
 				</div>
85 93
 			</div>
94
+			
86 95
 			<div class="display_flex justify-content_flex-center bottom-btn">
87 96
 				<button class="btn btn-right" *ngIf="detailsData.status.value==6 || 
88 97
 				detailsData.status.value==7 || detailsData.status.value==8 || 
@@ -92,11 +101,6 @@
92 101
 				detailsData.status.value==3 || detailsData.status.value==4 || 
93 102
 				detailsData.status.value==5" nz-button nzType="primary" (click)="submitPrint()" [nzLoading]="btnLoading">补打</button>
94 103
 				
95
-				<!-- <button class="btn btn-right" *ngIf="detailsData.status.value==2 || 
96
-				detailsData.status.value==3 || detailsData.status.value==4 || 
97
-				detailsData.status.value==5" nz-button nzType="primary" 
98
-				(click)="immobilization()">标本固定</button> -->
99
-				
100 104
 				<button class="btn cancel" *ngIf="detailsData.status.value==2 || 
101 105
 				detailsData.status.value==3 || detailsData.status.value==4 || 
102 106
 				detailsData.status.value==5" nz-button nzType="default" (click)="closeDetailMoadl()">取消</button>
@@ -204,4 +208,44 @@
204 208
 				</div>
205 209
 			</div>
206 210
 		</div>
207
-  </div>
211
+  </div>
212
+	
213
+	<!-- 查看标本 -->
214
+	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenViewDialog">
215
+	  <div class="modalBody modalBody-ga">
216
+	    <div class="title">查看标本<i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i>
217
+	    </div>
218
+	    <overlay-scrollbars #osComponentRef1 class="content">
219
+	      <div class="list-template__bottom">
220
+	        <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
221
+	          [nzLoading]="loading1">
222
+	          <thead>
223
+	            <tr class="thead">
224
+								<th>标本名称</th>
225
+	              <th>编码</th>
226
+	              <th>备注</th>
227
+	              <th>离体时间</th>
228
+	              <th>离体操作人</th>
229
+	              <th>固定时间</th>
230
+	              <th>固定操作人</th>
231
+	            </tr>
232
+	          </thead>
233
+	          <tbody>
234
+	            <tr *ngFor="let data of viewData">
235
+								<td>{{ data.specimenName }}</td>
236
+	              <td>{{ data.specimenCode }}</td>
237
+	              <td>{{ data.remark ? data.remark : '无' }}</td>
238
+								<td>{{ data.inVitroTime ? (data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
239
+								<td>{{ data.inVitroOperator ? data.inVitroOperator.name : '-' }}</td>
240
+								<td>{{ data.fixationTime ? (data.fixationTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
241
+								<td>{{ data.fixationOperator ? data.fixationOperator.name : '-' }}</td>
242
+	            </tr>
243
+	          </tbody>
244
+	        </nz-table>
245
+	      </div>
246
+	    </overlay-scrollbars>
247
+	    <div class="display_flex justify-content_flex-center">
248
+	      <button class="btn" nz-button nzType="primary" (click)="hideSpecimenModal()">知道了</button>
249
+	    </div>
250
+	  </div>
251
+	</div>

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

@@ -1,3 +1,5 @@
1
+@import "../../../../src/theme.less";
2
+
1 3
 /* 修改垂直滚动条 */
2 4
 ::-webkit-scrollbar {
3 5
 	width: 4px; /* 修改宽度 */
@@ -101,6 +103,9 @@
101 103
 					}
102 104
 					.form-list{
103 105
 						margin-bottom: 10px;
106
+						.cursor{
107
+							cursor: pointer;
108
+						}
104 109
 						.indent{
105 110
 							text-indent: 2ch;
106 111
 							color: #333;
@@ -175,3 +180,224 @@
175 180
 	}
176 181
 	
177 182
 }
183
+
184
+.save {
185
+  position: fixed;
186
+  left: 0;
187
+  top: 0;
188
+  width: 100%;
189
+  height: 100%;
190
+  background: rgba(0, 0, 0, 0.4);
191
+  z-index: 999;
192
+	.modalBody-ga{
193
+		width: 80% !important;
194
+		.list-template__searchBox{
195
+			margin-top: 10px;
196
+		}
197
+		.ant-select{
198
+			width: 20%;
199
+		}
200
+	}
201
+  .modalBody {
202
+    width: 350px;
203
+    background: #fff;
204
+    border-radius: 5px;
205
+    padding: 10px 20px;
206
+    color: #333;
207
+
208
+    .title {
209
+      width: 100%;
210
+      text-align: center;
211
+      font-size: 18px;
212
+      position: relative;
213
+
214
+      i {
215
+        position: absolute;
216
+        right: 0;
217
+        top: 0;
218
+        font-size: 20px;
219
+        color: #666;
220
+        cursor: pointer;
221
+        padding: 0 5px;
222
+      }
223
+    }
224
+
225
+    .content {
226
+      width: 100%;
227
+      height: 117px;
228
+      background: #f9fafb;
229
+      border: 1px solid #e5e9ed;
230
+      border-radius: 5px;
231
+      overflow: hidden;
232
+      margin-top: 12px;
233
+
234
+      div {
235
+        text-align: center;
236
+        margin: 0;
237
+
238
+        &.icon {
239
+          margin-top: 17px;
240
+
241
+          i {
242
+            color: #34b349;
243
+            font-size: 30px !important;
244
+
245
+            &.transport-wenhao {
246
+              color: #f5a523;
247
+            }
248
+
249
+            &.transport-shibai {
250
+              color: #ff3a52;
251
+            }
252
+          }
253
+        }
254
+
255
+        &.defeat {
256
+          color: #333;
257
+          font-size: 18px;
258
+        }
259
+
260
+        &:nth-child(3) {
261
+          font-size: 14px;
262
+          color: #666;
263
+        }
264
+      }
265
+    }
266
+
267
+    button {
268
+      margin-top: 10px;
269
+
270
+      &.btn {
271
+        margin-left: 8px;
272
+      }
273
+    }
274
+  }
275
+
276
+  // 新增
277
+  &.add {
278
+    .modalBody {
279
+      width: 420px;
280
+      height: auto;
281
+
282
+      .content {
283
+        width: 100%;
284
+        height: auto;
285
+        padding: 19px 14px 0 14px;
286
+        max-height: 500px;
287
+        overflow-y: auto;
288
+				
289
+				.ant-select{
290
+					width: 100%;
291
+				}
292
+				.ant-calendar-picker{
293
+					width: 100% !important;
294
+				}
295
+				.list-template__bottom {
296
+				  background: #f9fafb;
297
+				  border: 1px solid #e5e9ed;
298
+				  border-radius: 8px;
299
+				  padding-bottom: 56px;
300
+				  position: relative;
301
+				  .list-template__nzTable {
302
+				    padding: 16px 16px 0;
303
+				
304
+				    .thead {
305
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
306
+				
307
+				      th {
308
+				        background: transparent;
309
+				        color: #fff;
310
+				        text-align: center;
311
+				      }
312
+				    }
313
+				
314
+				    .ant-table-body {
315
+				      border-bottom: 1px solid #e5e9ed;
316
+				    }
317
+				
318
+				    .ant-table-tbody {
319
+				      tr {
320
+				        text-align: center;
321
+				        color: #333;
322
+				
323
+				        td {
324
+				          border: none;
325
+				
326
+				          &.tab_hover:hover{
327
+				            text-decoration: underline;
328
+				            cursor: pointer;
329
+				          }
330
+				
331
+				          .coop {
332
+				            button{
333
+				              color: #333;
334
+				            }
335
+				            span,button {
336
+				              display: inline-block;
337
+				              padding: 0 8px;
338
+				              cursor: pointer;
339
+				              position: relative;
340
+				
341
+				              &::after {
342
+				                content: "|";
343
+				                position: absolute;
344
+				                top: 0;
345
+				                right: 0;
346
+				              }
347
+				
348
+				              &:hover,
349
+				              &:active {
350
+				                color: @primary-color;
351
+				              }
352
+				
353
+				              &:nth-last-child(1) {
354
+				                &::after {
355
+				                  content: "";
356
+				                }
357
+				              }
358
+				            }
359
+				          }
360
+				        }
361
+				      }
362
+				    }
363
+				  }
364
+				  .list-template__pagination {
365
+				    height: 56px;
366
+				    display: flex;
367
+				    align-items: center;
368
+				    position: absolute;
369
+				    right: 8px;
370
+				  }
371
+				}
372
+				
373
+        .addForm {
374
+          .ant-form-item {
375
+            margin-bottom: 14px;
376
+
377
+            .ant-form-item-label {
378
+              line-height: 14px;
379
+              text-align: left;
380
+            }
381
+          }
382
+        }
383
+
384
+        .editForm {
385
+          .ant-form-item {
386
+            margin-bottom: 14px;
387
+
388
+            .ant-form-item-label {
389
+              line-height: 0;
390
+              text-align: left;
391
+            }
392
+          }
393
+        }
394
+      }
395
+
396
+      button {
397
+        &:nth-child(1) {
398
+          margin-right: 20px;
399
+        }
400
+      }
401
+    }
402
+  }
403
+}

+ 30 - 475
src/app/share/pathology-detail/pathology-detail.component.ts

@@ -23,6 +23,7 @@ export class PathologyDetailComponent implements OnInit {
23 23
 	@Output() pathologyCancel = new EventEmitter();
24 24
 	@Input() surgeryId: string;
25 25
 	@Input() patientId: string;
26
+	@Input() detailId: string;
26 27
 	
27 28
 	constructor(
28 29
 		private http: HttpClient,
@@ -76,8 +77,7 @@ export class PathologyDetailComponent implements OnInit {
76 77
 	hosId:any;
77 78
 	pathologyLogs:any //日志
78 79
 	printLoading:boolean = false;
79
-	printData:any = [];
80
-	project:any = [];
80
+	project:any;
81 81
 	
82 82
   ngOnInit() {
83 83
 		this.hosId = this.tool.getCurrentHospital().id;
@@ -86,6 +86,7 @@ export class PathologyDetailComponent implements OnInit {
86 86
   }
87 87
 	
88 88
 	// 补打
89
+	printData:any;
89 90
 	submitPrint(){
90 91
 		let that = this
91 92
 		let data: any = {
@@ -106,11 +107,6 @@ export class PathologyDetailComponent implements OnInit {
106 107
 		  .subscribe((res:any) => {
107 108
 				if(res.status==200){
108 109
 					let arr = res.data;
109
-					// if(arr.specimenList.length==1){
110
-					// 	for(let i of arr.specimenList){
111
-					// 		i.applyCode = data.pathologyForm.applyCode
112
-					// 	}
113
-					// }
114 110
 					if(arr.applyBarCode){
115 111
 						arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
116 112
 					}
@@ -143,354 +139,40 @@ export class PathologyDetailComponent implements OnInit {
143 139
 		this.pathologyCancel.emit()
144 140
 	}
145 141
 	
146
-	// 初始化新增form表单
147
-	// initForm() {
148
-	// 	this.validateForm = this.fb.group({
149
-	// 	  intraoperativeRapidity: [1, [Validators.required]],
150
-	// 		specimenGenre: [null, [Validators.required]],
151
-	// 		intraoperativeFindings: [null, [Validators.required]],
152
-	// 		surgicalPlan: [null, [Validators.required]],
153
-	// 		specimenNum: [null,[Validators.required]],
154
-	// 		takePart: [null, [Validators.required]]
155
-	// 	});
156
-	// }
157
-	
158 142
 	// 获取详情
143
+	statusValue:any;
159 144
 	fetchDataList(){
160 145
 		let data = {
161 146
 		  idx: 0,
162 147
 		  sum: 9999,
163 148
 		  pathologyForm: {
164
-		    surgeryId: this.surgeryId || "",
149
+				surgeryId: this.surgeryId || "",
165 150
 		    patientId: this.patientId || "",
166 151
 		    hosId: this.hosId || "" ,
167 152
 		  },
168 153
 		};
169 154
 		this.isSpinning = true;
170
-		this.mainService
171
-		  .getFetchDataList("data", "pathologyForm", data)
155
+		// this.mainService
156
+		//   .getFetchDataList("data", "pathologyForm", data)
157
+			this.mainService.getFetchData("data", "pathologyForm", this.detailId)
172 158
 		  .subscribe((data) => {
173 159
 		    this.isSpinning = false;
174
-		    this.detailsData = data.list[0];
175
-				this.pathologyLogs = data.list[0].formLogDTOS
160
+		    this.detailsData = data.data;
161
+				if(this.detailsData.status){
162
+					this.statusValue = this.detailsData.status.value
163
+				}
164
+				this.pathologyLogs = data.data.formLogDTOS
176 165
 				this.stepLength = this.pathologyLogs.length
177 166
 				if(this.detailsData.pathologyInspectDTOS){
178
-					for(let i of this.detailsData.pathologyInspectDTOS){
179
-						this.project.push(i.inspectProject.name)
180
-					}
167
+					this.project = this.detailsData.pathologyInspectDTOS.map(i=>{
168
+						return i.inspectProject.name
169
+					})
181 170
 					this.project = this.project.join('、')
182 171
 				}
183
-				// if(this.detailsData.surgicalPlan){
184
-				// 	this.validateForm.controls.surgicalPlan.setValue(this.detailsData.surgicalPlan);
185
-				// }
186
-				// if(this.detailsData.intraoperativeFindings){
187
-				// 	this.validateForm.controls.intraoperativeFindings.setValue(this.detailsData.intraoperativeFindings);
188
-				// }
189 172
 				this.getSampleData()
190 173
 		  });
191 174
 	}
192 175
 	
193
-	// // 获取标本类型
194
-	// getDicData(){
195
-	// 	this.mainService.getDictionary("list", "pathology_specimen_type").subscribe((res) => {
196
-	// 		this.specimenData = res
197
-	// 	});
198
-	// }
199
-	
200
-	// // 获取标本-位置来源
201
-	// getSourceData(){
202
-	// 	this.mainService.getDictionary("list", "pathology_position").subscribe((res) => {
203
-	// 		this.placeList = res
204
-	// 	});
205
-	// }
206
-	
207
-	// // 获取标本-系统
208
-	// getSysData(){
209
-	// 	let postData: any = {
210
-	// 	  idx: 0,
211
-	// 	  sum: 9999,
212
-	// 	  dictionaryTree: {
213
-	// 	    level: 1,
214
-	// 	    key: 'pathology_specimen',
215
-	// 	    deleted: 0,
216
-	// 	  },
217
-	// 	};
218
-	// 	this.mainService
219
-	// 	  .getFetchDataList("simple/data", "dictionaryTree", postData)
220
-	// 	  .subscribe((data) => {
221
-	// 	    this.systemList = data.list;
222
-	// 	  });
223
-
224
-	// }
225
-	
226
-	// // 获取标本-器官
227
-	// getApparatusData(id,item,type){
228
-	// 	let postData: any = {
229
-	// 	  idx: 0,
230
-	// 	  sum: 9999,
231
-	// 	  dictionaryTree: {
232
-	// 	    level: 2,
233
-	// 			parent:id,
234
-	// 	    key: 'pathology_specimen',
235
-	// 	    deleted: 0,
236
-	// 	  },
237
-	// 	};
238
-	// 	this.mainService
239
-	// 	  .getFetchDataList("simple/data", "dictionaryTree", postData)
240
-	// 	  .subscribe((data) => {
241
-	// 			if(data.list.length>0){
242
-	// 				this.apparatusList = data.list;
243
-	// 				if(type=='edit'){
244
-	// 					setTimeout(_=>{
245
-	// 						let index3 = this.apparatusList.findIndex(i=>i.id==item.organ.id)
246
-	// 						this.apparatusIndex = index3
247
-	// 						this.apparatusId = Number(item.organ.id);
248
-	// 					},100)
249
-	// 				}
250
-	// 			}else{
251
-	// 				this.message.info('暂无数据')
252
-	// 			}
253
-	// 	  });
254
-	// }
255
-	
256
-	// // 获取标本-标本名称
257
-	// getSpNameData(id,item,type){
258
-	// 	let postData: any = {
259
-	// 	  idx: 0,
260
-	// 	  sum: 9999,
261
-	// 	  dictionaryTree: {
262
-	// 	    level: 3,
263
-	// 			parent:id,
264
-	// 	    key: 'pathology_specimen',
265
-	// 	    deleted: 0,
266
-	// 	  },
267
-	// 	};
268
-	// 	this.mainService
269
-	// 	  .getFetchDataList("simple/data", "dictionaryTree", postData)
270
-	// 	  .subscribe((data) => {
271
-	// 	    this.specimenNameList = data.list;
272
-	// 			this.specimenNameList.push({
273
-	// 				name:'其他',
274
-	// 				id:'qita'
275
-	// 			})
276
-	// 			if(type=='edit'){
277
-	// 				if(item.sample){
278
-	// 					this.validateSpecimenForm = this.fb.group({
279
-	// 					  remark: [null, [Validators.required]]
280
-	// 					});
281
-	// 					setTimeout(_=>{
282
-	// 						let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
283
-	// 						this.specimenNameIndex = index4
284
-	// 						this.specimenNameName = item.sample.name
285
-	// 						this.specimenNameId = Number(item.sample.id);
286
-	// 					},100)
287
-	// 				}else{
288
-	// 					this.validateSpecimenForm = this.fb.group({
289
-	// 					  remark: [null, [Validators.required]],
290
-	// 						specimenName: [null, [Validators.required]]
291
-	// 					});
292
-	// 					this.specimenNameIndex = this.specimenNameList.length-1
293
-	// 					this.specimenNameName = 'qita'
294
-	// 					this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
295
-	// 				}
296
-	// 				setTimeout(_=>{
297
-	// 					this.validateSpecimenForm.controls.remark.setValue(item.remark);
298
-	// 					this.specimenModal = true
299
-	// 				},50)
300
-	// 			}
301
-	// 	  });
302
-	// }
303
-	
304
-	// // 删除标本
305
-	// delModal:boolean = false
306
-	// coopId:any;
307
-	// specimenDel(e,item,index){
308
-	// 	this.delModal = true
309
-	// 	this.coopId = item.id
310
-	// }
311
-	
312
-	// // 确定删除
313
-	// confirmDel(){
314
-	// 	this.mainService
315
-	// 	  .coopTypeConfig(
316
-	// 	    "rmvData",
317
-	// 	    "pathologySpecimen",
318
-	// 	     [this.coopId]
319
-	// 	  )
320
-	// 	  .subscribe((data) => {
321
-	// 	    this.btnLoading = false;
322
-	// 	    this.delModal = false;
323
-	// 			this.getSampleData()
324
-	// 	    if (data.status==200) {
325
-	// 	      this.showSpecimenModal("删除", true, "");
326
-	// 	    } else {
327
-	// 	      this.showSpecimenModal("删除", false, data.data[0].msg);
328
-	// 	    }
329
-	// 	  });
330
-	// }
331
-	// // 确定删除
332
-	// hideDelModal() {
333
-	//   this.delModal = false;
334
-	// }
335
-	
336
-	// // 编辑标本
337
-	// specimenDetailId:any = null;
338
-	// specimenEdit(e,item,index){
339
-	// 	this.specimenDetailId = item.id
340
-	// 	let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
341
-	// 	this.placeIndex = index1
342
-	// 	this.placeId = Number(item.partSource.id)
343
-	// 	let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
344
-	// 	this.systemIndex = index2
345
-	// 	this.systemId = Number(item.system.id)
346
-	// 	this.getApparatusData(item.system.id,item,'edit')
347
-	// 	this.getSpNameData(item.organ.id,item,'edit')
348
-	// }
349
-	
350
-	// // 选择标本
351
-	// openSpecimen(){
352
-	// 	this.validateSpecimenForm = this.fb.group({
353
-	// 	  remark: [null, [Validators.required]]
354
-	// 	});
355
-	// 	this.specimenDetailId = null;
356
-	// 	this.placeIndex = null;
357
-	// 	this.systemIndex = null;
358
-	// 	this.apparatusIndex = null;
359
-	// 	this.specimenNameIndex = null;
360
-	// 	this.placeId = null;
361
-	// 	this.systemId = null;
362
-	// 	this.apparatusId = null;
363
-	// 	this.specimenNameId = null;
364
-	// 	this.placeList=[]; //位置来源数据
365
-	// 	this.systemList=[]; //系统数据
366
-	// 	this.apparatusList=[]; //器官数据
367
-	// 	this.specimenNameList=[]; //标本名称数据
368
-	// 	this.getSourceData()
369
-	// 	this.getSysData()
370
-	// 	this.specimenModal = true
371
-	// }
372
-	
373
-	// // 选择位置来源
374
-	// placeId:any = null;
375
-	// placeClick(e,item,index){
376
-	// 	this.placeId = item.id
377
-	// 	this.placeIndex = index
378
-	// }
379
-	
380
-	// // 选择系统
381
-	// systemId:any = null;
382
-	// systemClick(e,item,index){
383
-	// 	this.systemId = Number(item.id)
384
-	// 	this.systemIndex = index
385
-	// 	this.apparatusList = [];
386
-	// 	this.apparatusId = null;
387
-	// 	this.apparatusIndex = null;
388
-	// 	this.getApparatusData(item.id,{},'select')
389
-	// }
390
-	
391
-	// // 选择器官
392
-	// apparatusId:any = null;
393
-	// apparatusClick(e,item,index){
394
-	// 	this.apparatusId = Number(item.id)
395
-	// 	this.apparatusIndex = index
396
-	// 	this.specimenNameList = [];
397
-	// 	this.specimenNameId = null;
398
-	// 	this.specimenNameIndex = null;
399
-	// 	this.getSpNameData(item.id,{},'select')
400
-	// }
401
-	
402
-	// // 选择标本名称
403
-	// specimenNameId:any = null;
404
-	// specimenNameName:any = null;
405
-	// specimenNameClick(e,item,index){
406
-	// 	this.specimenNameIndex = index
407
-	// 	let remark = this.validateSpecimenForm.value.remark
408
-	// 	if(item.id == 'qita'){
409
-	// 		this.validateSpecimenForm = this.fb.group({
410
-	// 		  remark: [remark?remark:null, [Validators.required]],
411
-	// 			specimenName: [null, [Validators.required]]
412
-	// 		});
413
-	// 		this.specimenNameId = 'null'
414
-	// 		this.specimenNameName = 'qita'
415
-	// 	}else{
416
-	// 		this.validateSpecimenForm = this.fb.group({
417
-	// 		  remark: [remark?remark:null, [Validators.required]],
418
-	// 		});
419
-	// 		this.specimenNameId = item.id
420
-	// 		this.specimenNameName = item.name
421
-	// 	}
422
-	// }
423
-	
424
-	// // 保存标本
425
-	// btnSpLoading:boolean = false;
426
-	// submitSpecimen(){
427
-	// 	if(this.placeIndex==null){
428
-	// 		this.message.error('请选择位置来源')
429
-	// 		return
430
-	// 	}
431
-	// 	if(this.systemIndex==null){
432
-	// 		this.message.error('请选择系统')
433
-	// 		return
434
-	// 	}
435
-	// 	if(this.apparatusIndex==null){
436
-	// 		this.message.error('请选择器官')
437
-	// 		return
438
-	// 	}
439
-	// 	if(this.specimenNameIndex==null){
440
-	// 		this.message.error('请选择标本名称')
441
-	// 		return
442
-	// 	}
443
-	// 	for (const i in this.validateSpecimenForm.controls) {
444
-	// 	  this.validateSpecimenForm.controls[i].markAsDirty();
445
-	// 	  this.validateSpecimenForm.controls[i].updateValueAndValidity();
446
-	// 	}
447
-	// 	if (this.validateSpecimenForm.invalid) return;
448
-	// 	let data = {
449
-	// 		pathologyFormId:this.detailsData.id,
450
-	// 		partSource:{
451
-	// 			id:this.placeId
452
-	// 		},
453
-	// 		system:{
454
-	// 			id:this.systemId
455
-	// 		},
456
-	// 		organ:{
457
-	// 			id:this.apparatusId
458
-	// 		},
459
-	// 		sample:{
460
-	// 			id:this.specimenNameId
461
-	// 		},
462
-	// 		hosId:this.hosId,
463
-	// 		specimenName:null,
464
-	// 		id:'',
465
-	// 		remark:this.validateSpecimenForm.value.remark
466
-	// 	};
467
-	// 	if(this.specimenNameName == 'qita'){
468
-	// 		delete data.sample
469
-	// 		data.specimenName = this.validateSpecimenForm.value.specimenName
470
-	// 	}else{
471
-	// 		data.specimenName = this.specimenNameName
472
-	// 	}
473
-	// 	let queryType = null
474
-	// 	if(this.specimenDetailId){
475
-	// 		queryType = 'updData'
476
-	// 		data.id = this.specimenDetailId
477
-	// 	}else{
478
-	// 		queryType = 'addData'
479
-	// 		delete data.id
480
-	// 	}
481
-	// 	this.btnSpLoading = true;
482
-	// 	this.mainService
483
-	// 	  .simplePost(queryType, "pathologySpecimen", data)
484
-	// 	  .subscribe((res) => {
485
-	// 	    this.btnSpLoading = false;
486
-	// 	    if (res.status == 200) {
487
-	// 	      this.showSpecimenModal("操作", true, "");
488
-	// 	    } else {
489
-	// 	      this.showSpecimenModal("操作", false, res.msg);
490
-	// 	    }
491
-	// 	  });
492
-	// }
493
-	
494 176
 	// 获取标本列表
495 177
 	getSampleData(){
496 178
 		let data={
@@ -507,152 +189,25 @@ export class PathologyDetailComponent implements OnInit {
507 189
 		  });
508 190
 	}
509 191
 	
510
-	hideSpecimenModal(){
511
-		this.specimenModal = false
512
-	}
513
-	
514 192
 	hideNotModal(){
515 193
 		this.notModal = false
516 194
 	}
517 195
 	
518
-	// 日期选择
519
-	// startDate: string; //时间开始
520
-	// formChangeDate(result?): void {
521
-	//   this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
522
-		
523
-	// }
524
-	
525
-	//未打印提交
526
-	// submitPrintForm(): void{
527
-	// 	for (const i in this.validatePrintForm.controls) {
528
-	// 	  this.validatePrintForm.controls[i].markAsDirty();
529
-	// 	  this.validatePrintForm.controls[i].updateValueAndValidity();
530
-	// 	}
531
-	// 	if (this.validatePrintForm.invalid) return;
532
-		
533
-	// 	let data: any = {
534
-	// 		pathologyForm:{
535
-	// 			...this.validateForm.value,
536
-	// 			...this.detailsData,
537
-	// 			inVitroTime:this.validatePrintForm.value.inVitroTime,
538
-	// 			surgeryId: this.surgeryId || "",
539
-	// 			patientId: this.patientId || "",
540
-	// 			hosId: this.hosId || "" ,
541
-	// 			handoverUserId:this.handoverUserId,
542
-	// 			specimenType:{
543
-	// 				id:this.validateForm.value.specimenGenre
544
-	// 			}
545
-	// 		}
546
-	// 	};
547
-	// 	delete data.pathologyForm.patientDTO
548
-	// 	delete data.pathologyForm.surgeryDeptDTO
549
-	// 	delete data.pathologyForm.surgeryDoctorDTO
550
-	// 	delete data.pathologyForm.specimenGenre
551
-	// 	this.printLoading = true;
552
-	// 	this.mainService
553
-	// 	  .pathologyPrint(data)
554
-	// 	  .subscribe((res:any) => {
555
-	// 			console.log(5555,res)
556
-	// 			this.hideModal()
557
-	// 	    this.printData = res.data;
558
-	// 			this.printLoading = false;
559
-	// 	    setTimeout(() => {
560
-	// 	      const printContent = document.getElementById("report");
561
-	// 	      const WindowPrt = window.open("", "", "width=100,height=1000");
562
-	// 	      WindowPrt.document.write(printContent.innerHTML);
563
-	// 	      WindowPrt.document.close();
564
-	// 	      WindowPrt.focus();
565
-	// 	      WindowPrt.print();
566
-	// 	      WindowPrt.close();
567
-	// 	    }, 500);
568
-	// 	  });
569
-	// }
570
-	
571
-	// // 监听工号数据
572
-	// handoverUserId:any = null;
573
-	// numberChange(e){
574
-	// 	if(e.length < 3) {
575
-	// 		this.validatePrintForm.controls.name.setValue('');
576
-	// 		return
577
-	// 	}
578
-	// 	let data = {
579
-	// 	  idx: 0,
580
-	// 	  sum: 9999,
581
-	// 	  user: {
582
-	// 	    account: e || "",
583
-	// 	    hospital: { id: this.hosId || "" }
584
-	// 	  },
585
-	// 	};
586
-	// 	this.mainService
587
-	// 	  .getFetchDataList("data", "user", data)
588
-	// 	  .subscribe((data) => {
589
-	// 			if(data.list.length>0){
590
-	// 				this.validatePrintForm.controls.name.setValue(data.list[0].name);
591
-	// 				this.handoverUserId = data.list[0].id
592
-	// 			}else{
593
-	// 				this.validatePrintForm.controls.name.setValue('');
594
-	// 				this.handoverUserId =null
595
-	// 			}
596
-	// 	  });
597
-	// }
196
+	// 关闭查看标本
197
+	hideSpecimenModal(){
198
+		this.specimenViewDialog = false
199
+	}
598 200
 	
599
-	// printData:any;
600
-	// submitForm(): void{
601
-	// 	var that = this;
602
-	// 	for (const i in that.validateForm.controls) {
603
-	// 	  that.validateForm.controls[i].markAsDirty();
604
-	// 	  that.validateForm.controls[i].updateValueAndValidity();
605
-	// 	}
606
-	// 	if (that.validateForm.invalid) return;
607
-	// 	if(this.detailsData.status.name=='未打印'){
608
-	// 		this.notModal = true
609
-	// 		this.validatePrintForm = this.fb.group({
610
-	// 		  inVitroTime: [null, [Validators.required]],
611
-	// 			jobNumber: [null, [Validators.required]],
612
-	// 			name:[null, [Validators.required]],
613
-	// 		});
614
-	// 		let date = new Date();
615
-	// 		this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
616
-	// 		this.validatePrintForm.controls.inVitroTime.setValue(this.startDate);
617
-	// 		return
618
-	// 	}
619
-
620
-	// 	let data: any = {
621
-	// 		pathologyForm:{
622
-	// 			...this.validateForm.value,
623
-	// 			...this.detailsData,
624
-	// 			surgeryId: this.surgeryId || "",
625
-	// 			patientId: this.patientId || "",
626
-	// 			hosId: this.hosId || "" ,
627
-	// 			specimenType:{
628
-	// 				id:this.validateForm.value.specimenGenre
629
-	// 			}
630
-	// 		}
631
-	// 	};
632
-	// 	delete data.pathologyForm.patientDTO
633
-	// 	delete data.pathologyForm.surgeryDeptDTO
634
-	// 	delete data.pathologyForm.surgeryDoctorDTO 
635
-	// 	delete data.pathologyForm.specimenGenre 
636
-	// 	that.btnLoading = true;
637
-	// 	that.mainService
638
-	// 	  .pathologyPrint(data)
639
-	// 	  .subscribe((res:any) => {
640
-	// 			this.hideModal()
641
-	// 			let arr = res.data;
642
-	// 	    that.printData = arr;
643
-	// 			that.btnLoading = false;
644
-	// 	    setTimeout(() => {
645
-	// 	      const printContent = document.getElementById("report");
646
-	// 	      const WindowPrt = window.open("", "", "width=100,height=1000");
647
-	// 	      WindowPrt.document.write(printContent.innerHTML);
648
-	// 	      WindowPrt.document.close();
649
-	// 	      WindowPrt.focus();
650
-	// 	      WindowPrt.print();
651
-	// 	      WindowPrt.close();
652
-					
653
-	// 	    }, 500);
654
-	// 	  });
655
-	// }
201
+	// 查看标本
202
+	specimenViewDialog:any = false;
203
+	viewData:any = [];
204
+	specimenItem:any;
205
+	specimenView(item){
206
+		this.viewData = []
207
+		this.specimenViewDialog = true
208
+		this.specimenItem = item;
209
+		this.viewData.push(item)
210
+	}
656 211
 	
657 212
 	// 关闭标本
658 213
 	closeSpecimenModel(){

+ 1 - 1
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -138,7 +138,7 @@
138 138
 	    <overlay-scrollbars #osComponentRef1 class="content">
139 139
 	      <div class="list-template__bottom">
140 140
 	        <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
141
-	          [nzLoading]="grossLoading">
141
+	          [nzLoading]="loading">
142 142
 	          <thead>
143 143
 	            <tr class="thead">
144 144
 	              <th>药品名称</th>

+ 48 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -3772,7 +3772,53 @@
3772 3772
 <button ngxPrint printSectionId="print-section" #printBtn hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>
3773 3773
 
3774 3774
 <!-- 病理申请单 -->
3775
-<app-pathology-add *ngIf="pathologyModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add>
3775
+<app-pathology-add *ngIf="pathologyModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" [patientId]="patientDataId" [detailId]="detailId" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add>
3776 3776
 
3777 3777
 <!-- 病理详情 -->
3778
-<app-pathology-detail *ngIf="pathologyDetailModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" (pathologyCancel)="pathologyDetailCancel($event)"></app-pathology-detail>
3778
+<app-pathology-detail *ngIf="pathologyDetailModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" [detailId]="detailId" (pathologyCancel)="pathologyDetailCancel($event)"></app-pathology-detail>
3779
+
3780
+<!-- 多个申请单 -->
3781
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="multiDialog">
3782
+	<div class="modalBody modalBody-ga">
3783
+		<div class="title">多条申请单提示<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
3784
+		</div>
3785
+		<div class="content">
3786
+			<div class="weight">
3787
+				提示:查询到{{viewData[0].patientDTO.patientName}}({{viewData[0].patientDTO.patientCode}})患者有多条申请单,请选择对应申请单
3788
+			</div>
3789
+			<div class="list-template__bottom">
3790
+				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
3791
+					[nzLoading]="grossLoading">
3792
+					<thead>
3793
+						<tr class="thead">
3794
+							<th>申请单类型</th>
3795
+							<th>申请单号</th>
3796
+							<th>检验项目</th>
3797
+							<th>标本类型</th>
3798
+							<th>申请时间</th>
3799
+							<th>申请科室</th>
3800
+							<th>状态</th>
3801
+						</tr>
3802
+					</thead>
3803
+					<tbody>
3804
+						<tr *ngFor="let data of viewData">
3805
+							<td>{{ data.pathologyFormType && data.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</td>
3806
+							<td style="text-decoration: underline;cursor: pointer;" (click)="itemClick(data)">{{ data.applyCode}}</td>
3807
+							<td>{{ data.arr ? data.arr.join('、') : '无' }}</td>
3808
+							<td>{{ data.specimenType?data.specimenType.name:'无'}}</td>
3809
+							<td>{{ data.createTime | date:'yyyy-MM-dd HH:mm'}}</td>
3810
+							<td>{{ data.patientDTO.department? data.patientDTO.department.dept:'-'}}</td>
3811
+							<td>{{ data.status?data.status.name:'-'}}</td>
3812
+						</tr>
3813
+					</tbody>
3814
+				</nz-table>
3815
+			</div>
3816
+		</div>
3817
+		<div class="display_flex justify-content_flex-center mar-20 btns">
3818
+			<button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
3819
+		</div>
3820
+	</div>
3821
+</div>
3822
+<div class="mask-style" *ngIf="isSpinning">
3823
+	<nz-spin nzSimple class="spin-style"></nz-spin>
3824
+</div>

+ 243 - 2
src/app/views/hushijiandan/hushijiandan.component.less

@@ -216,6 +216,234 @@
216 216
   // }
217 217
 }
218 218
 
219
+
220
+.save {
221
+  position: fixed;
222
+  left: 0;
223
+  top: 0;
224
+  width: 100%;
225
+  height: 100%;
226
+  background: rgba(0, 0, 0, 0.4);
227
+  z-index: 99;
228
+	.modalBody-ga{
229
+		width: 80% !important;
230
+		.list-template__searchBox{
231
+			margin-top: 10px;
232
+		}
233
+		.ant-select{
234
+			width: 20%;
235
+		}
236
+	}
237
+  .modalBody {
238
+    width: 350px;
239
+    background: #fff;
240
+    border-radius: 5px;
241
+    padding: 10px 20px;
242
+    color: #333;
243
+
244
+    .title {
245
+      width: 100%;
246
+      text-align: center;
247
+      font-size: 18px;
248
+      position: relative;
249
+
250
+      i {
251
+        position: absolute;
252
+        right: 0;
253
+        top: 0;
254
+        font-size: 20px;
255
+        color: #666;
256
+        cursor: pointer;
257
+        padding: 0 5px;
258
+      }
259
+    }
260
+
261
+    .content {
262
+      width: 100%;
263
+      height: 117px;
264
+      background: #f9fafb;
265
+      border: 1px solid #e5e9ed;
266
+      border-radius: 5px;
267
+      overflow: hidden;
268
+      margin-top: 12px;
269
+			
270
+			.weight{
271
+				font-weight: 600;
272
+				position: relative;
273
+				top: -9px;
274
+			}
275
+			
276
+      div {
277
+        text-align: center;
278
+        margin: 0;
279
+
280
+        &.icon {
281
+          margin-top: 17px;
282
+
283
+          i {
284
+            color: #34b349;
285
+            font-size: 30px !important;
286
+
287
+            &.transport-wenhao {
288
+              color: #f5a523;
289
+            }
290
+
291
+            &.transport-shibai {
292
+              color: #ff3a52;
293
+            }
294
+          }
295
+        }
296
+
297
+        &.defeat {
298
+          color: #333;
299
+          font-size: 18px;
300
+        }
301
+
302
+        &:nth-child(3) {
303
+          font-size: 14px;
304
+          color: #666;
305
+        }
306
+      }
307
+    }
308
+
309
+    button {
310
+      margin-top: 10px;
311
+
312
+      &.btn {
313
+        margin-left: 8px;
314
+      }
315
+    }
316
+  }
317
+
318
+  // 新增
319
+  &.add {
320
+    .modalBody {
321
+      width: 420px;
322
+      height: auto;
323
+
324
+      .content {
325
+        width: 100%;
326
+        height: auto;
327
+        padding: 19px 14px 0 14px;
328
+        max-height: 500px;
329
+        overflow-y: auto;
330
+				
331
+				.ant-select{
332
+					width: 100%;
333
+				}
334
+				.ant-calendar-picker{
335
+					width: 100% !important;
336
+				}
337
+				.list-template__bottom {
338
+				  background: #f9fafb;
339
+				  border: 1px solid #e5e9ed;
340
+				  border-radius: 8px;
341
+				  padding-bottom: 56px;
342
+				  position: relative;
343
+				  .list-template__nzTable {
344
+				    padding: 16px 16px 0;
345
+				
346
+				    .thead {
347
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
348
+				
349
+				      th {
350
+				        background: transparent;
351
+				        color: #fff;
352
+				        text-align: center;
353
+				      }
354
+				    }
355
+				
356
+				    .ant-table-body {
357
+				      border-bottom: 1px solid #e5e9ed;
358
+				    }
359
+				
360
+				    .ant-table-tbody {
361
+				      tr {
362
+				        text-align: center;
363
+				        color: #333;
364
+				
365
+				        td {
366
+				          border: none;
367
+				
368
+				          &.tab_hover:hover{
369
+				            text-decoration: underline;
370
+				            cursor: pointer;
371
+				          }
372
+				
373
+				          .coop {
374
+				            button{
375
+				              color: #333;
376
+				            }
377
+				            span,button {
378
+				              display: inline-block;
379
+				              padding: 0 8px;
380
+				              cursor: pointer;
381
+				              position: relative;
382
+				
383
+				              &::after {
384
+				                content: "|";
385
+				                position: absolute;
386
+				                top: 0;
387
+				                right: 0;
388
+				              }
389
+				
390
+				              &:hover,
391
+				              &:active {
392
+				                color: @primary-color;
393
+				              }
394
+				
395
+				              &:nth-last-child(1) {
396
+				                &::after {
397
+				                  content: "";
398
+				                }
399
+				              }
400
+				            }
401
+				          }
402
+				        }
403
+				      }
404
+				    }
405
+				  }
406
+				  .list-template__pagination {
407
+				    height: 56px;
408
+				    display: flex;
409
+				    align-items: center;
410
+				    position: absolute;
411
+				    right: 8px;
412
+				  }
413
+				}
414
+				
415
+        .addForm {
416
+          .ant-form-item {
417
+            margin-bottom: 14px;
418
+
419
+            .ant-form-item-label {
420
+              line-height: 14px;
421
+              text-align: left;
422
+            }
423
+          }
424
+        }
425
+
426
+        .editForm {
427
+          .ant-form-item {
428
+            margin-bottom: 14px;
429
+
430
+            .ant-form-item-label {
431
+              line-height: 0;
432
+              text-align: left;
433
+            }
434
+          }
435
+        }
436
+      }
437
+
438
+      button {
439
+        &:nth-child(1) {
440
+          margin-right: 20px;
441
+        }
442
+      }
443
+    }
444
+  }
445
+}
446
+
219 447
 // 查看标本详情 start
220 448
 .noData33 {
221 449
   height: 100%;
@@ -1687,7 +1915,6 @@
1687 1915
   height: 100%;
1688 1916
   background: rgba(0, 0, 0, 0.4);
1689 1917
   z-index: 99;
1690
-
1691 1918
   .modalBody {
1692 1919
     width: 480px;
1693 1920
     min-height: 220px;
@@ -1990,7 +2217,6 @@
1990 2217
         font-size: 12px;
1991 2218
       }
1992 2219
     }
1993
-
1994 2220
     button {
1995 2221
       margin-top: 10px;
1996 2222
 
@@ -2184,3 +2410,18 @@
2184 2410
   }
2185 2411
 }
2186 2412
 
2413
+.mask-style{
2414
+	width: 100%;
2415
+	height: 100%;
2416
+	position: fixed;
2417
+	top: 0;
2418
+	left: 0;
2419
+	z-index: 999;
2420
+	display: flex;
2421
+	background: rgba(0,0,0,0.2);
2422
+	align-items: center;
2423
+	justify-content: center;
2424
+}
2425
+.spin-style{
2426
+	z-index:9999;
2427
+}

+ 70 - 7
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -267,7 +267,7 @@ export class HushijiandanComponent implements OnInit {
267 267
   specimenWorkOrderMsg: any = {}; //急标普标数量&信息
268 268
   jpDrugsWKOMsg: any = {}; //药品静配提示信息
269 269
   surgeryWKOMsg: any = {}; //手术提示信息
270
-
270
+	detailId:any = null; //病理申请单详情id
271 271
 
272 272
   getCoopBtns(){
273 273
     let menu: any = JSON.parse(localStorage.getItem("menu")) || []; //菜单
@@ -314,20 +314,38 @@ export class HushijiandanComponent implements OnInit {
314 314
 				surgeryId: item.id || "",
315 315
 				patientId: item.patientDTO.id || "",
316 316
 				hosId: this.currentHospital.id || "" ,
317
+				operationType: 'pathologyForm',
318
+				order:'createTime desc',
317 319
 			},
318 320
 		};
321
+		this.isSpinning = true
319 322
 		this.mainService
320 323
 			.getFetchDataList("data", "pathologyForm", data)
321 324
 			.subscribe((data) => {
322
-				if(data.list[0].status.value==1){
323
-					this.pathologyModal = true
325
+				this.isSpinning = false
326
+				if(data.list.length==1){
327
+					if(!data.list[0].status){
328
+						this.pathologyModal = true
329
+						return
330
+					}
331
+					if(data.list[0].status && 
332
+					(data.list[0].status.value==1 || data.list[0].status.value==2 || 
333
+					data.list[0].status.value==3 || data.list[0].status.value==4)){
334
+						this.pathologyModal = true
335
+					}else{
336
+						this.pathologyDetailModal = true
337
+					}
324 338
 				}else{
325
-					this.pathologyDetailModal = true
339
+					this.viewData = data.list
340
+					this.multiDialog = true
326 341
 				}
327 342
 			});
328 343
 	}
329 344
 
330 345
 	// 病理申请单
346
+	multiDialog:any = false;
347
+	isSpinning:any = false;
348
+	viewData:any = [];
331 349
 	pathologyAdd(e){
332 350
 		this.surgeryDataId = this.surgeryWKOMsg.id
333 351
 		this.patientDataId = this.surgeryWKOMsg.patientDTO.id
@@ -338,19 +356,64 @@ export class HushijiandanComponent implements OnInit {
338 356
 				surgeryId: this.surgeryWKOMsg.id || "",
339 357
 				patientId: this.surgeryWKOMsg.patientDTO.id || "",
340 358
 				hosId: this.currentHospital.id || "" ,
359
+				operationType: 'pathologyForm',
360
+				order:'createTime desc'
341 361
 			},
342 362
 		};
363
+		this.isSpinning = true
343 364
 		this.mainService
344 365
 		.getFetchDataList("data", "pathologyForm", data)
345 366
 		.subscribe((data) => {
346
-			if(data.list[0].status.value==1){
367
+			this.isSpinning = false
368
+			if(data.list.length==1){
369
+				this.detailId = data.list[0].id
370
+				if(!data.list[0].status){
371
+					this.pathologyModal = true
372
+					return
373
+				}
374
+				if(data.list[0].status && 
375
+				(data.list[0].status.value==1 || data.list[0].status.value==2 || 
376
+					data.list[0].status.value==3 || data.list[0].status.value==4)){
377
+					this.pathologyModal = true
378
+				}else{
379
+					this.pathologyDetailModal = true
380
+				}
381
+			}else{
382
+				this.viewData = data.list
383
+				// let arr = []
384
+				if(this.viewData.pathologyInspectDTOS){
385
+					for(let i of this.viewData.pathologyInspectDTOS){
386
+						i.arr = []
387
+						i.arr.push(i.inspectProject.name)
388
+					}
389
+				}
390
+				this.multiDialog = true
391
+			}
392
+		});
393
+	}
394
+	
395
+	// 申请单号点击
396
+	itemClick(item){
397
+		this.detailId = item.id
398
+		this.multiDialog = false
399
+		setTimeout(_=>{
400
+			if(!item.status){
401
+				this.pathologyModal = true
402
+				return
403
+			}
404
+			if(item.status && (item.status.value==1 || item.status.value==2 || 
405
+				item.status.value==3 || item.status.value==4)){
347 406
 				this.pathologyModal = true
348 407
 			}else{
349 408
 				this.pathologyDetailModal = true
350 409
 			}
351
-		});
410
+		},200)
352 411
 	}
353
-
412
+	
413
+	hideModal(){
414
+		this.multiDialog = false
415
+	}
416
+	
354 417
 	pathologyDetailCancel(){
355 418
 		this.pathologyDetailModal = false
356 419
 	}

+ 1 - 1
src/app/views/repository-manage-add/repository-manage-add.component.html

@@ -64,7 +64,7 @@
64 64
 				
65 65
 				<nz-form-item class="form-item" *ngIf="classItem==1">
66 66
 				  <nz-form-label nzRequired nzFor="malfunction" [nzSm]="6" [nzXs]="24">关联故障现象</nz-form-label>
67
-				  <nz-form-control nzErrorTip="请选择关联故障现象!" [nzSm]="16" [nzXs]="24">
67
+				  <nz-form-control nzErrorTip="请选择关联故障现象!" [nzSm]="16" [nzXs]="16">
68 68
 					<!-- 	<nz-cascader [nzOptions]="malfunctionData" 
69 69
 							formControlName="malfunction" 
70 70
 							nzPlaceHolder="请选择关联故障现象">

+ 3 - 2
src/app/views/repository-manage-add/repository-manage-add.component.less

@@ -59,6 +59,7 @@ h3{
59 59
 	position: relative;
60 60
 	overflow-x: hidden;
61 61
 	.modalBody{
62
+		width: 100%;
62 63
 		height: 100%;
63 64
 		position: relative;
64 65
 	}
@@ -76,8 +77,8 @@ h3{
76 77
 	.addForm {
77 78
 		display: flex;
78 79
 		.left-form-box{
79
-			flex: 1.5;
80
-			margin-right: 30px;
80
+			flex: 1;
81
+			// margin-right: 30px;
81 82
 		}
82 83
 		.right-form-box{
83 84
 			flex: 1;

+ 85 - 36
src/app/views/specimen-room-view/specimen-room-view.component.html

@@ -461,21 +461,24 @@
461 461
 		<i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i></div>
462 462
 		<div class="content">
463 463
 			<div class="content-item boder-right">
464
-				<div class="form-title-box">
465
-					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{codeData.intraoperativeRapidity==1?'是':'否'}}</div>
466
-				</div>
467
-				<div class="form-title-box">
468
-					<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{codeData.applyCode}}</div>
469
-					<div class="form-title"><span class="font-weight-500">状态:</span>{{codeData.status.name}}</div>
470
-				</div>
471
-				<div class="form-title-box">
472
-					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{codeData.patientDTO.department.dept}}</div>
473
-					<div class="form-title"><span class="font-weight-500">住院号:</span>{{codeData.patientDTO.patientCode}}</div>
474
-				</div>
475
-				<div class="form-title-box">
476
-					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{codeData.patientDTO.patientName}} ({{codeData.patientDTO.bedNum}}床)</div>
477
-					<div class="form-title"><span class="font-weight-500">年龄:</span>{{codeData.patientDTO.age||'-'}}岁</div>
478
-				</div>
464
+				<nz-form-item class="form-title-box">
465
+					<div class="form-title">申请单类型:{{codeData.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</div>
466
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{codeData.status?codeData.status.name:'-'}}</div>
467
+				</nz-form-item>
468
+				<nz-form-item class="form-title-box">
469
+					<div class="form-title"><span class="font-weight-500">申请单号:</span>{{codeData.applyCode}}</div>
470
+					<div class="form-title over-class"><span class="font-weight-500">申请科室:</span>{{codeData.patientDTO.department.dept}}</div>
471
+				</nz-form-item>
472
+				<nz-form-item class="form-title-box">
473
+					<div class="form-title">手术间:{{codeData.surgeryDeptDTO.dept}}</div>
474
+					<div class="form-title">取材医生:{{codeData.surgeryDoctorDTO?codeData.surgeryDoctorDTO.name : '-'}}</div>
475
+				</nz-form-item>
476
+				<nz-form-item class="form-title-box">
477
+					<div class="form-title mar-ri-20"><span class="font-weight-500">患者信息:</span>{{codeData.patientDTO.patientName}} ({{codeData.patientDTO.bedNum}}床)</div>
478
+					<div class="form-title mar-ri-20"><span class="font-weight-500">年龄:</span>{{codeData.patientDTO.age||'-'}}</div>
479
+					<div class="form-title mar-ri-20"><span class="font-weight-500">性别:</span>{{codeData.patientDTO.gender.name||'-'}}</div>
480
+					<div class="form-title mar-ri-20"><span class="font-weight-500">住院号:</span>{{codeData.patientDTO.patientCode}}</div>
481
+				</nz-form-item>
479 482
 				<div class="form-title-box">
480 483
 					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
481 484
 				</div>
@@ -494,10 +497,10 @@
494 497
 					<div class="form-title font-weight-500">手术方案:</div>
495 498
 					<div class="indent">{{codeData.surgicalPlan||'无'}}</div>
496 499
 				</div>
497
-	<!-- 			<div class="form-list">
500
+				<div class="form-list">
498 501
 					<div class="form-title font-weight-500">术中所见:</div>
499 502
 					<div class="indent">{{codeData.intraoperativeFindings||'无'}}</div>
500
-				</div> -->
503
+				</div>
501 504
 				<div class="form-title-box">
502 505
 					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{codeData.specimenType?codeData.specimenType.name:'无'}}</div>
503 506
 					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{codeData.specimenNum?codeData.specimenNum:'无'}}</div>
@@ -507,11 +510,6 @@
507 510
 					<div class="form-title"><span class="font-weight-500">取标本位置:</span>{{codeData.surgeryDeptDTO?codeData.surgeryDeptDTO.dept:''}}</div>
508 511
 					<div class="form-title"><span class="font-weight-500">取材医生:</span>{{codeData.surgeryDoctorDTO?codeData.surgeryDoctorDTO.name : '-'}}</div>
509 512
 				</div>
510
-	<!-- 			<div class="form-list">
511
-					<div class="form-title font-weight-500">标本:</div>
512
-					<div>标本1</div>
513
-					<div>标本2</div>
514
-				</div> -->
515 513
 			</div>
516 514
 			
517 515
 			<div class="content-item">
@@ -549,7 +547,8 @@
549 547
 			</div>
550 548
 		</div>
551 549
 		<div class="display_flex justify-content_flex-center bottom-btn">
552
-			<button class="btn btn-right" [disabled]="codeData.specimenNum != codeData.pathologySpecimenDTOList.length" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">确定</button>
550
+			<!-- <button class="btn btn-right" [disabled]="codeData.specimenNum != codeData.pathologySpecimenDTOList.length" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">确定</button> -->
551
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">确定</button>
553 552
 			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
554 553
 		</div>
555 554
 	</div>
@@ -616,17 +615,24 @@
616 615
 		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
617 616
 		<div class="content">
618 617
 			<div class="content-item boder-right">
619
-				<div class="form-title-box">
620
-					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{detailsData.intraoperativeRapidity==1?'是':'否'}}</div>
621
-					<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
622
-					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
623
-					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
624
-				</div>
625
-				<div class="form-title-box">
626
-					<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
618
+				<nz-form-item class="form-title-box">
619
+					<div class="form-title">申请单类型:{{detailsData.pathologyFormType==1?'术中快速病理检查申请单':'病理检查申请单'}}</div>
620
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status?detailsData.status.name:'-'}}</div>
621
+				</nz-form-item>
622
+				<nz-form-item class="form-title-box">
623
+					<div class="form-title"><span class="font-weight-500">申请单号:</span>{{detailsData.applyCode}}</div>
624
+					<div class="form-title over-class"><span class="font-weight-500">申请科室:</span>{{detailsData.patientDTO.department.dept}}</div>
625
+				</nz-form-item>
626
+				<nz-form-item class="form-title-box">
627
+					<div class="form-title">手术间:{{detailsData.surgeryDeptDTO.dept}}</div>
628
+					<div class="form-title">取材医生:{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
629
+				</nz-form-item>
630
+				<nz-form-item class="form-title-box">
627 631
 					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
628
-					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}岁</div>
629
-				</div>
632
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
633
+					<div class="form-title"><span class="font-weight-500">性别:</span>{{detailsData.patientDTO.gender?detailsData.patientDTO.gender.name:'-'}}</div>
634
+					<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
635
+				</nz-form-item>
630 636
 				
631 637
 				<div class="form-title-box">
632 638
 					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
@@ -647,10 +653,10 @@
647 653
 					<div class="form-title font-weight-500">手术方案:</div>
648 654
 					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
649 655
 				</div>
650
-	<!-- 			<div class="form-list">
656
+				<div class="form-list">
651 657
 					<div class="form-title font-weight-500">术中所见:</div>
652 658
 					<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
653
-				</div> -->
659
+				</div>
654 660
 
655 661
 				<div class="form-title-box">
656 662
 					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
@@ -667,8 +673,9 @@
667 673
 				<div class="form-list">
668 674
 					<div class="form-title font-weight-500">标本:</div>
669 675
 					<div class="form-title specimen-list">
670
-						<div *ngFor="let item of specimenList" class="specimen-item-class">
676
+						<div *ngFor="let item of specimenList" class="specimen-item-class" (click)="specimenView(item)">
671 677
 							{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
678
+							({{item.specimenCode}})
672 679
 						</div>
673 680
 					</div>
674 681
 				</div>
@@ -704,6 +711,48 @@
704 711
 	</div>
705 712
 </div>
706 713
 
714
+<!-- 查看标本 -->
715
+<div class="look">
716
+	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenViewDialog">
717
+		<div class="modalBody modalBody-ga">
718
+			<div class="title">查看标本<i class="icon_transport transport-guanbi" (click)="closeSpecimenModal()"></i>
719
+			</div>
720
+			<overlay-scrollbars #osComponentRef1 class="content">
721
+				<div class="list-template__bottom">
722
+					<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
723
+						[nzLoading]="loading1">
724
+						<thead>
725
+							<tr class="thead">
726
+								<th>标本名称</th>
727
+								<th>编码</th>
728
+								<th>备注</th>
729
+								<th>离体时间</th>
730
+								<th>离体操作人</th>
731
+								<th>固定时间</th>
732
+								<th>固定操作人</th>
733
+							</tr>
734
+						</thead>
735
+						<tbody>
736
+							<tr *ngFor="let data of viewData">
737
+								<td>{{ data.specimenName }}</td>
738
+								<td>{{ data.specimenCode }}</td>
739
+								<td>{{ data.remark ? data.remark : '无' }}</td>
740
+								<td>{{ data.inVitroTime ? (data.inVitroTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
741
+								<td>{{ data.inVitroOperator ? data.inVitroOperator.name : '-' }}</td>
742
+								<td>{{ data.fixationTime ? (data.fixationTime|date:'yyyy-MM-dd HH:mm:ss') : '-' }}</td>
743
+								<td>{{ data.fixationOperator ? data.fixationOperator.name : '-' }}</td>
744
+							</tr>
745
+						</tbody>
746
+					</nz-table>
747
+				</div>
748
+			</overlay-scrollbars>
749
+			<div class="display_flex justify-content_flex-center">
750
+				<button class="btn" nz-button nzType="primary" (click)="closeSpecimenModal()">知道了</button>
751
+			</div>
752
+		</div>
753
+	</div>
754
+</div>
755
+
707 756
 <div class="mask-style" *ngIf="isSpinning">
708 757
 	<nz-spin nzSimple class="spin-style"></nz-spin>
709 758
 </div>

+ 228 - 2
src/app/views/specimen-room-view/specimen-room-view.component.less

@@ -658,7 +658,7 @@
658 658
 	background: rgba(0, 0, 0, 0.4);
659 659
 	z-index: 99;
660 660
 	.pathology-content{
661
-		width: 80%;
661
+		width: 90%;
662 662
 		background: #fff;
663 663
 		border-radius: 5px;
664 664
 		padding: 10px 20px;
@@ -708,6 +708,9 @@
708 708
 							color: #333;
709 709
 							margin-right: 40px;
710 710
 						}
711
+						.mar-ri-20{
712
+							margin-right: 20px !important;
713
+						}
711 714
 						.width-150{
712 715
 							width: 150px;
713 716
 						}
@@ -831,4 +834,227 @@
831 834
 }
832 835
 .spin-style{
833 836
 	z-index:9999;
834
-}
837
+}
838
+
839
+.look{
840
+	.save {
841
+	  position: fixed;
842
+	  left: 0;
843
+	  top: 0;
844
+	  width: 100%;
845
+	  height: 100%;
846
+	  background: rgba(0, 0, 0, 0.4);
847
+	  z-index: 999;
848
+		.modalBody-ga{
849
+			width: 80% !important;
850
+			.list-template__searchBox{
851
+				margin-top: 10px;
852
+			}
853
+			.ant-select{
854
+				width: 20%;
855
+			}
856
+		}
857
+	  .modalBody {
858
+	    width: 350px;
859
+	    background: #fff;
860
+	    border-radius: 5px;
861
+	    padding: 10px 20px;
862
+	    color: #333;
863
+	
864
+	    .title {
865
+	      width: 100%;
866
+	      text-align: center;
867
+	      font-size: 18px;
868
+	      position: relative;
869
+	
870
+	      i {
871
+	        position: absolute;
872
+	        right: 0;
873
+	        top: 0;
874
+	        font-size: 20px;
875
+	        color: #666;
876
+	        cursor: pointer;
877
+	        padding: 0 5px;
878
+	      }
879
+	    }
880
+	
881
+	    .content {
882
+	      width: 100%;
883
+	      height: 117px;
884
+	      background: #f9fafb;
885
+	      border: 1px solid #e5e9ed;
886
+	      border-radius: 5px;
887
+	      overflow: hidden;
888
+	      margin-top: 12px;
889
+	
890
+	      div {
891
+	        text-align: center;
892
+	        margin: 0;
893
+	
894
+	        &.icon {
895
+	          margin-top: 17px;
896
+	
897
+	          i {
898
+	            color: #34b349;
899
+	            font-size: 30px !important;
900
+	
901
+	            &.transport-wenhao {
902
+	              color: #f5a523;
903
+	            }
904
+	
905
+	            &.transport-shibai {
906
+	              color: #ff3a52;
907
+	            }
908
+	          }
909
+	        }
910
+	
911
+	        &.defeat {
912
+	          color: #333;
913
+	          font-size: 18px;
914
+	        }
915
+	
916
+	        &:nth-child(3) {
917
+	          font-size: 14px;
918
+	          color: #666;
919
+	        }
920
+	      }
921
+	    }
922
+	
923
+	    button {
924
+	      margin-top: 10px;
925
+	
926
+	      &.btn {
927
+	        margin-left: 8px;
928
+	      }
929
+	    }
930
+	  }
931
+	
932
+	  // 新增
933
+	  &.add {
934
+	    .modalBody {
935
+	      width: 420px;
936
+	      height: auto;
937
+	
938
+	      .content {
939
+	        width: 100%;
940
+	        height: auto;
941
+	        padding: 19px 14px 0 14px;
942
+	        max-height: 500px;
943
+	        overflow-y: auto;
944
+					
945
+					.ant-select{
946
+						width: 100%;
947
+					}
948
+					.ant-calendar-picker{
949
+						width: 100% !important;
950
+					}
951
+					.list-template__bottom {
952
+					  background: #f9fafb;
953
+					  border: 1px solid #e5e9ed;
954
+					  border-radius: 8px;
955
+					  padding-bottom: 56px;
956
+					  position: relative;
957
+					  .list-template__nzTable {
958
+					    padding: 16px 16px 0;
959
+					
960
+					    .thead {
961
+					      background-image: linear-gradient(to right, @bg-start, @bg-end);
962
+					
963
+					      th {
964
+					        background: transparent;
965
+					        color: #fff;
966
+					        text-align: center;
967
+					      }
968
+					    }
969
+					
970
+					    .ant-table-body {
971
+					      border-bottom: 1px solid #e5e9ed;
972
+					    }
973
+					
974
+					    .ant-table-tbody {
975
+					      tr {
976
+					        text-align: center;
977
+					        color: #333;
978
+					
979
+					        td {
980
+					          border: none;
981
+					
982
+					          &.tab_hover:hover{
983
+					            text-decoration: underline;
984
+					            cursor: pointer;
985
+					          }
986
+					
987
+					          .coop {
988
+					            button{
989
+					              color: #333;
990
+					            }
991
+					            span,button {
992
+					              display: inline-block;
993
+					              padding: 0 8px;
994
+					              cursor: pointer;
995
+					              position: relative;
996
+					
997
+					              &::after {
998
+					                content: "|";
999
+					                position: absolute;
1000
+					                top: 0;
1001
+					                right: 0;
1002
+					              }
1003
+					
1004
+					              &:hover,
1005
+					              &:active {
1006
+					                color: @primary-color;
1007
+					              }
1008
+					
1009
+					              &:nth-last-child(1) {
1010
+					                &::after {
1011
+					                  content: "";
1012
+					                }
1013
+					              }
1014
+					            }
1015
+					          }
1016
+					        }
1017
+					      }
1018
+					    }
1019
+					  }
1020
+					  .list-template__pagination {
1021
+					    height: 56px;
1022
+					    display: flex;
1023
+					    align-items: center;
1024
+					    position: absolute;
1025
+					    right: 8px;
1026
+					  }
1027
+					}
1028
+					
1029
+	        .addForm {
1030
+	          .ant-form-item {
1031
+	            margin-bottom: 14px;
1032
+	
1033
+	            .ant-form-item-label {
1034
+	              line-height: 14px;
1035
+	              text-align: left;
1036
+	            }
1037
+	          }
1038
+	        }
1039
+	
1040
+	        .editForm {
1041
+	          .ant-form-item {
1042
+	            margin-bottom: 14px;
1043
+	
1044
+	            .ant-form-item-label {
1045
+	              line-height: 0;
1046
+	              text-align: left;
1047
+	            }
1048
+	          }
1049
+	        }
1050
+	      }
1051
+	
1052
+	      button {
1053
+	        &:nth-child(1) {
1054
+	          margin-right: 20px;
1055
+	        }
1056
+	      }
1057
+	    }
1058
+	  }
1059
+	}
1060
+}

+ 48 - 85
src/app/views/specimen-room-view/specimen-room-view.component.ts

@@ -180,18 +180,34 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
180 180
 			this.isSpinning = false
181 181
 			if(res.status==200){
182 182
 				this.codeData = res.data[0]
183
-				if(this.codeData.pathologyInspectDTOS){
184
-					this.project = this.codeData.pathologyInspectDTOS.map(i=>{
185
-						return i.inspectProject.name
186
-					})
187
-					this.project = this.project.join('、')
183
+				if(!this.codeData.pathologySpecimenDTOList[0].fixationTime && this.codeData.pathologyFormType==0){
184
+					if(this.codeData.status.value==2 || this.codeData.status.value==3 ||
185
+						this.codeData.status.value==4){
186
+							if(this.codeData.pathologyInspectDTOS){
187
+								this.project = this.codeData.pathologyInspectDTOS.map(i=>{
188
+									return i.inspectProject.name
189
+								})
190
+								this.project = this.project.join('、')
191
+							}
192
+							this.fixationModal = true
193
+							setTimeout(_=>{
194
+								document.getElementById('specimen').focus();
195
+							},200)
196
+						}else{
197
+							this.viewDetail(this.codeData,'4')
198
+						}
199
+					this.fixationError = null
200
+					this.searchMsg = null
201
+				}else if(this.codeData.pathologySpecimenDTOList[0].fixationTime && this.codeData.pathologyFormType==0){
202
+					this.viewDetail(this.codeData,'4')
203
+					this.fixationError = null
204
+					this.searchMsg = null
205
+				}else{
206
+					this.message.error('该申请单类型不是病理检查申请单')
207
+					this.fixationError = null
208
+					this.searchMsg = null
188 209
 				}
189
-				this.fixationError = null
190
-				this.fixationModal = true
191
-				setTimeout(_=>{
192
-					document.getElementById('specimen').focus();
193
-				},200)
194
-				this.searchMsg = null
210
+				
195 211
 			}else{
196 212
 				this.barCode = null
197 213
 				this.searchMsg = res.msg
@@ -256,7 +272,23 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
256 272
 		  this.detailMoadl = true
257 273
 		});
258 274
 	}
259
-
275
+	
276
+	// 关闭查看标本
277
+	closeSpecimenModal(){
278
+		this.specimenViewDialog = false
279
+	}
280
+	
281
+	// 查看标本
282
+	specimenViewDialog:any = false;
283
+	viewData:any = [];
284
+	specimenItem:any;
285
+	specimenView(item){
286
+		this.viewData = []
287
+		this.specimenViewDialog = true
288
+		this.specimenItem = item;
289
+		this.viewData.push(item)
290
+	}
291
+	
260 292
 	// 获取科室
261 293
 	getDept(){
262 294
 		this.setSpecimen()
@@ -443,13 +475,16 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
443 475
 		  this.validateVerificationForm.controls[i].updateValueAndValidity();
444 476
 		}
445 477
 		if (this.validateVerificationForm.invalid) return;
446
-
478
+		let str = this.codeData.pathologySpecimenDTOList.map(i=>{
479
+			return i.specimenCode
480
+		})
447 481
 		let data: any = {
448 482
 			id:this.codeData.id,
449 483
 			specimenDeptId:this.validateForm.value.specimen,
450 484
 			specimenFixingLiquid:{
451 485
 				id:this.validateVerificationForm.value.fixative
452 486
 			},
487
+			specimenCodes:str.join(','),
453 488
 			fixationTime:this.startDate,
454 489
 			hosId: this.hosId || "" ,
455 490
 			handoverUserId:this.handoverUserId
@@ -538,13 +573,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
538 573
 		this.isSpinning = true
539 574
 		this.getSampleData(item)
540 575
 		clearInterval(this.logTimer);
541
-		if(type==1){
542
-
543
-		}else if(type==2){
544
-
545
-		}else{
546
-
547
-		}
548 576
 	}
549 577
 
550 578
 	closeDetailMoadl(){
@@ -555,71 +583,6 @@ export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
555 583
 		this.autoUpdate(false);
556 584
 	}
557 585
 
558
-  // 统计
559
-  // total() {
560
-  //   let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
561
-  //   let startTime = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
562
-  //   let endTime = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
563
-  //   let postData = {
564
-  //     startTime,
565
-  //     endTime,
566
-  //     launch,
567
-  //   };
568
-
569
-  //   this.mainService.getDrugsBagStateCount(postData).subscribe((res: any) => {
570
-  //     if (res.status == 200) {
571
-  //       this.todayTotal = res.countMap.todayTotal;
572
-  //       this.todayComplete = res.countMap.todayComplete;
573
-  //     }
574
-  //   });
575
-  // }
576
-  // // 查看工单详情
577
-  // goToOrderDetail(item){
578
-  //   console.log(item);
579
-  //   this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
580
-  // }
581
-
582
-  // // 查看流程信息弹窗
583
-  // logPromptModalShow = false; //弹窗开关
584
-  // scode = ""; //查看记录携带
585
-  // showLogs(data) {
586
-  //   clearInterval(this.logTimer);
587
-  //   this.scode = data.scode;
588
-  //   this.logPromptModalShow = true;
589
-  // }
590
-  // // 关闭流程信息弹窗
591
-  // closeModelLog(e) {
592
-  //   this.logPromptModalShow = JSON.parse(e).show;
593
-  //   this.autoUpdate(false);
594
-  // }
595
-  // // 查看标本列表弹窗
596
-  // spePromptModalShow = false; //弹窗开关
597
-  // checkDeptId = ""; //检查科室id
598
-  // printDate = ""; //采集日期
599
-  // showSpeList(data) {
600
-  //   clearInterval(this.logTimer);
601
-  //   this.checkDeptId = data.check_dept_id;
602
-  //   this.printDate = data.startTime;
603
-  //   this.spePromptModalShow = true;
604
-  // }
605
-  // 关闭标本列表弹窗
606
-  // closeModelSpe(e) {
607
-  //   this.spePromptModalShow = JSON.parse(e).show;
608
-  //   this.autoUpdate(false);
609
-  // }
610
-  //  // 查看工单列表弹窗
611
-  //  orderPromptModalShow = false; //弹窗开关
612
-  //  workId = ""; //配送人员ID
613
-  //  showOrderList(data) {
614
-  //    clearInterval(this.logTimer);
615
-  //    this.workId = data.workerid;
616
-  //    this.orderPromptModalShow = true;
617
-  //  }
618
-  //  // 关闭工单列表弹窗
619
-  //  closeModelOrder(e) {
620
-  //    this.orderPromptModalShow = JSON.parse(e).show;
621
-  //    this.autoUpdate(false);
622
-  //  }
623 586
   // 自动刷新倒计时
624 587
   autoUpdate(flag = true) {
625 588
     if (flag) {