seimin 7 місяців тому
батько
коміт
eff1acf16d
57 змінених файлів з 12954 додано та 103 видалено
  1. 1 1
      package.json
  2. 21 0
      src/app/app-routing.module.ts
  3. 22 0
      src/app/guard/Pathology.guard.ts
  4. 22 0
      src/app/guard/SpecimenRoomViewGuard.guard.ts
  5. 77 0
      src/app/services/main.service.ts
  6. 14 0
      src/app/services/tool.service.ts
  7. 11 0
      src/app/share/hs-prompt-modal/hs-prompt-modal.component.ts
  8. 365 0
      src/app/share/pathology-add/pathology-add.component.html
  9. 282 0
      src/app/share/pathology-add/pathology-add.component.less
  10. 821 0
      src/app/share/pathology-add/pathology-add.component.ts
  11. 207 0
      src/app/share/pathology-detail/pathology-detail.component.html
  12. 177 0
      src/app/share/pathology-detail/pathology-detail.component.less
  13. 691 0
      src/app/share/pathology-detail/pathology-detail.component.ts
  14. 7 0
      src/app/share/share.module.ts
  15. 18 6
      src/app/views/admin-office-prescription/admin-office-prescription.component.html
  16. 228 13
      src/app/views/dispensing-batch/dispensing-batch.component.html
  17. 12 1
      src/app/views/dispensing-batch/dispensing-batch.component.less
  18. 177 37
      src/app/views/dispensing-batch/dispensing-batch.component.ts
  19. 11 9
      src/app/views/dispensing-detail/dispensing-detail.component.html
  20. 17 0
      src/app/views/dispensing-info-detail/dispensing-info-detail-routing.module.ts
  21. 374 0
      src/app/views/dispensing-info-detail/dispensing-info-detail.component.html
  22. 238 0
      src/app/views/dispensing-info-detail/dispensing-info-detail.component.less
  23. 262 0
      src/app/views/dispensing-info-detail/dispensing-info-detail.component.ts
  24. 19 0
      src/app/views/dispensing-info-detail/dispensing-info-detail.module.ts
  25. 1 1
      src/app/views/drug-cloud/drug-cloud.component.html
  26. 8 0
      src/app/views/hushijiandan/hushijiandan.component.html
  27. 1 0
      src/app/views/hushijiandan/hushijiandan.component.less
  28. 61 3
      src/app/views/hushijiandan/hushijiandan.component.ts
  29. 24 0
      src/app/views/inspect-statistics/inspect-statistics-routing.module.ts
  30. 90 0
      src/app/views/inspect-statistics/inspect-statistics.component.html
  31. 95 0
      src/app/views/inspect-statistics/inspect-statistics.component.less
  32. 141 0
      src/app/views/inspect-statistics/inspect-statistics.component.ts
  33. 19 0
      src/app/views/inspect-statistics/inspect-statistics.module.ts
  34. 2 0
      src/app/views/login/login.component.ts
  35. 10 0
      src/app/views/main/main-routing.module.ts
  36. 3 1
      src/app/views/main/main.component.html
  37. 18 0
      src/app/views/main/main.component.ts
  38. 10 0
      src/app/views/operation-config/operation-config.component.html
  39. 13 1
      src/app/views/operation-config/operation-config.component.ts
  40. 17 0
      src/app/views/pathology/pathology-routing.module.ts
  41. 531 0
      src/app/views/pathology/pathology.component.html
  42. 1097 0
      src/app/views/pathology/pathology.component.less
  43. 1365 0
      src/app/views/pathology/pathology.component.ts
  44. 17 0
      src/app/views/pathology/pathology.module.ts
  45. 17 0
      src/app/views/pathologyScan/pathologyScan-routing.module.ts
  46. 282 0
      src/app/views/pathologyScan/pathologyScan.component.html
  47. 1290 0
      src/app/views/pathologyScan/pathologyScan.component.less
  48. 1194 0
      src/app/views/pathologyScan/pathologyScan.component.ts
  49. 17 0
      src/app/views/pathologyScan/pathologyScan.module.ts
  50. 4 5
      src/app/views/round-robin/round-robin.component.html
  51. 43 25
      src/app/views/round-robin/round-robin.component.ts
  52. 24 0
      src/app/views/specimen-room-view/specimen-room-view-routing.module.ts
  53. 709 0
      src/app/views/specimen-room-view/specimen-room-view.component.html
  54. 835 0
      src/app/views/specimen-room-view/specimen-room-view.component.less
  55. 925 0
      src/app/views/specimen-room-view/specimen-room-view.component.ts
  56. 17 0
      src/app/views/specimen-room-view/specimen-room-view.module.ts
  57. BIN
      src/assets/images/yc_logo.png

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
5 5
     "start": "ng serve --proxy-config proxy.conf.json --port 4210 --disable-host-check --public-host=dashitech.com --host 0.0.0.0",
6 6
     "build": "ng build --prod",
7 7
     "start:17": "set NODE_OPTIONS=--openssl-legacy-provider && ng serve --proxy-config proxy.conf.json --port 4210 --disable-host-check --public-host=dashitech.com --host 0.0.0.0",
8
-    "build:17": "set NODE_OPTIONS=--openssl-legacy-provider && npm run build",
8
+    "build:17": "set NODE_OPTIONS=--openssl-legacy-provider --max_old_space_size=4096 && npm run build",
9 9
     "development": "node ./upload/development.js",
10 10
     "production": "node ./upload/production.js",
11 11
     "test": "ng test",

+ 21 - 0
src/app/app-routing.module.ts

@@ -11,6 +11,10 @@ import { MainGuard } from './guard/main.guard';
11 11
 import { PharmacyGuard } from './guard/pharmacy.guard';
12 12
 // 标本视图权限
13 13
 import { SpecimenView2Guard } from './guard/SpecimenView2Guard.guard';
14
+// 标本间端权限
15
+import { SpecimenRoomViewGuard } from './guard/SpecimenRoomViewGuard.guard';
16
+// 病理科权限
17
+import { PathologyGuard } from './guard/Pathology.guard';
14 18
 // 全局业务查看权限
15 19
 import { DisinfectionSupplyGuard } from './guard/DisinfectionSupplyGuard.guard';
16 20
 // 配置中心查看权限
@@ -69,6 +73,23 @@ const routes: Routes = [
69 73
     loadChildren: () => import('./views/specimen-view2/specimen-view2.module').then(m => m.SpecimenView2Module),
70 74
     canActivate: [SpecimenView2Guard]
71 75
   },
76
+	// 标本间端
77
+	{
78
+	  path: 'specimenRoomView',
79
+	  loadChildren: () => import('./views/specimen-room-view/specimen-room-view.module').then(m => m.SpecimenRoomViewModule),
80
+	  canActivate: [SpecimenRoomViewGuard]
81
+	},
82
+	// 病理科端
83
+	{
84
+	  path: 'pathology',
85
+	  loadChildren: () => import('./views/pathology/pathology.module').then(m => m.PathologyModule),
86
+	  canActivate: [PathologyGuard]
87
+	},
88
+	// 病理科端-扫描条码
89
+	{
90
+	  path: 'pathologyScan',
91
+	  loadChildren: () => import('./views/pathologyScan/pathologyScan.module').then(m => m.PathologyScanModule),
92
+	},
72 93
   // 全局业务查看
73 94
   {
74 95
     path: 'disinfectionSupply',

+ 22 - 0
src/app/guard/Pathology.guard.ts

@@ -0,0 +1,22 @@
1
+import { Injectable } from '@angular/core';
2
+import { CanActivate, Router } from '@angular/router';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class PathologyGuard implements CanActivate {
8
+  constructor(public router: Router) { }
9
+
10
+  canActivate(): boolean {
11
+    const menus = JSON.parse(localStorage.getItem('menu'));
12
+    let can = false;
13
+    if (menus) {
14
+      can = menus.some(e => e.link == 'pathology');
15
+    }
16
+    if (!can) {
17
+      this.router.navigate(['login']);
18
+      return false
19
+    }
20
+    return true;
21
+  }
22
+}

+ 22 - 0
src/app/guard/SpecimenRoomViewGuard.guard.ts

@@ -0,0 +1,22 @@
1
+import { Injectable } from '@angular/core';
2
+import { CanActivate, Router } from '@angular/router';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class SpecimenRoomViewGuard implements CanActivate {
8
+  constructor(public router: Router) { }
9
+
10
+  canActivate(): boolean {
11
+    const menus = JSON.parse(localStorage.getItem('menu'));
12
+    let can = false;
13
+    if (menus) {
14
+      can = menus.some(e => e.link == 'specimenRoomView');
15
+    }
16
+    if (!can) {
17
+      this.router.navigate(['login']);
18
+      return false
19
+    }
20
+    return true;
21
+  }
22
+}

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

@@ -916,4 +916,81 @@ export class MainService {
916 916
 	downloadAttachment(token): any {
917 917
 	  return host.host + "/common/common/downloadAttachment/" + token;
918 918
 	}
919
+
920
+	//病理申请单打印
921
+	 pathologyPrint(data) {
922
+	   return this.http.post(host.host + `/pathology/print`, data, {
923
+	     headers: this.headers,
924
+	   });
925
+	 }
926
+
927
+	// 病理查询标本条码
928
+	pathologyScanCode(data) {
929
+	  return this.http.post(host.host + `/pathology/scanCode`, data, {
930
+	    headers: this.headers,
931
+	  });
932
+	}
933
+
934
+	// 工号搜索
935
+	jobSearch(data) {
936
+	  return this.http.post(host.host + `/data/isRepeat`, data, {
937
+	    headers: this.headers,
938
+	  });
939
+	}
940
+
941
+	// 标本间获取批次号
942
+	generateBatchNumber() {
943
+	  return this.http.post(host.host + `/pathology/generateBatchNumber/blbatch`, {}, {
944
+	    headers: this.headers,
945
+	  });
946
+	}
947
+
948
+	// 标本间获取标本接收信息
949
+	getSpecimenInfo(batchNo,deptId) {
950
+	  return this.http.post(host.host + `/pathology/getInfo/${batchNo}/${deptId}`, {}, {
951
+	    headers: this.headers,
952
+	  });
953
+	}
954
+
955
+	// 标本间标本接收-交接完成
956
+	handoverCompleted(data) {
957
+	  return this.http.post(host.host + `/pathology/handoverCompleted`, data, {
958
+	    headers: this.headers,
959
+	  });
960
+	}
961
+
962
+	// 病理科打包
963
+	pathologyPack(data) {
964
+	  return this.http.post(host.host + `/pathology/pack`, data, {
965
+	    headers: this.headers,
966
+	  });
967
+	}
968
+
969
+	// 病理科今日接收汇总
970
+	pathologyToday(data) {
971
+	  return this.http.post(host.host + `/pathology/receiveToday`, data, {
972
+	    headers: this.headers,
973
+	  });
974
+	}
975
+
976
+	// 大输液-发药批次-发药总量
977
+	drugsGross(batchId) {
978
+	  return this.http.get(host.host + `/infusion/solutions/drugsNum/${batchId}`, {
979
+	    headers: this.headers,
980
+	  });
981
+	}
982
+
983
+	// 大输液-发药批次-发药信息
984
+	drugsInfo(data) {
985
+	  return this.http.post(host.host + `/infusion/solutions/dispensing/medicine/details`,data, {
986
+	    headers: this.headers,
987
+	  });
988
+	}
989
+
990
+	// 统计分析-陪检统计
991
+	inspectionStatistics(data) {
992
+	  return this.http.post(host.host + `/report/accompanied/inspection`,data, {
993
+	    headers: this.headers,
994
+	  });
995
+	}
919 996
 }

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

@@ -51,6 +51,14 @@ export class ToolService {
51 51
       ? JSON.parse(localStorage.getItem("user")).user.currentHospital
52 52
       : JSON.parse(localStorage.getItem("user")).infoPermission.hospitals[0];
53 53
   }
54
+	//获取当前用户id
55
+	getCurrentUserId() {
56
+	  return JSON.parse(localStorage.getItem("user")).user.id;
57
+	}
58
+	//获取当前用户信息
59
+	getCurrentUserInfo() {
60
+	  return JSON.parse(localStorage.getItem("user")).user;
61
+	}
54 62
   //获取当前用户科室
55 63
   getCurrentUserDept() {
56 64
     return JSON.parse(localStorage.getItem("user")).user.dept;
@@ -223,6 +231,12 @@ export class ToolService {
223 231
         case "commonFault":
224 232
           coopBtns.commonFault = true; //常见故障
225 233
           break;
234
+				case "dispensingInfo":
235
+				  coopBtns.dispensingInfo = true; //发药信息
236
+				  break;
237
+				case "dispensingGross":
238
+				  coopBtns.dispensingGross = true; //发药总量
239
+				  break;
226 240
         case "assign":
227 241
           coopBtns.assign = true; //指派
228 242
           break;

+ 11 - 0
src/app/share/hs-prompt-modal/hs-prompt-modal.component.ts

@@ -187,6 +187,17 @@ export class HsPromptModalComponent implements OnInit {
187 187
           type: {id: "386"},
188 188
         },
189 189
       }
190
+    }else if(this.deptType === 'pathology'){
191
+      dataObj = {
192
+        idx: 0,
193
+        sum: 10,
194
+        department: {
195
+          searchType: 1,// 简单查询
196
+          hospital: { id: hosId },
197
+          dept: keywords,
198
+          type: {id: "282"},
199
+        },
200
+      }
190 201
     }
191 202
     this.mainService
192 203
       .getFetchDataList("data", "department", dataObj)

+ 365 - 0
src/app/share/pathology-add/pathology-add.component.html

@@ -0,0 +1,365 @@
1
+<div class="pathology-box display_flex align-items_center justify-content_flex-center">
2
+	<div class="pathology-content">
3
+		<div class="title">病理申请单<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
4
+		</div>
5
+		<div class="content" *ngIf="!isSpinning">
6
+			<form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
7
+				<div class="content-item boder-right">
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>
11
+					</nz-form-item>
12
+					<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
+					</nz-form-item>
16
+					<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
+					</nz-form-item>
20
+					<nz-form-item class="form-title-box">
21
+						<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
22
+						<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}</div>
23
+					</nz-form-item>
24
+					<nz-form-item>
25
+						<div class="form-title width-100 font-weight-500">诊断:</div>
26
+						<div>
27
+							{{detailsData.diagnose||'无'}}
28
+						</div>
29
+					</nz-form-item>
30
+					
31
+					<nz-form-item>
32
+						<div class="form-title width-100 font-weight-500">病历摘要:</div>
33
+						<div>{{detailsData.medicalRecords||'无'}}</div>
34
+					</nz-form-item>
35
+					
36
+					<nz-form-item>
37
+						<div class="form-title width-100 font-weight-500">手术方案:</div>
38
+						<div>{{detailsData.surgicalPlan||'无'}}</div>
39
+					</nz-form-item>
40
+					
41
+					<!-- <nz-form-item class="form-item">
42
+						<nz-form-label nzRequired nzFor="surgicalPlan" [nzSm]="24" [nzXs]="24">手术方案</nz-form-label>
43
+						<nz-form-control nzErrorTip="请输入手术方案" [nzSm]="24" [nzXs]="24">
44
+							<textarea rows="3" nz-input disabled formControlName="surgicalPlan" placeholder="请输入手术方案"></textarea>
45
+						</nz-form-control>
46
+					</nz-form-item> -->
47
+				</div>
48
+				
49
+				<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>
58
+						<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>
62
+							</nz-radio-group>
63
+						</nz-form-control>
64
+					</nz-form-item>
65
+					<nz-form-item class="form-item">
66
+						<nz-form-label nzRequired nzFor="project" [nzSm]="4" [nzXs]="24">检验项目</nz-form-label>
67
+						<nz-form-control nzErrorTip="请选择检验项目!" [nzSm]="20" [nzXs]="24">
68
+							<nz-input-group>
69
+								<nz-select nzSearch nzShowSearch nzMode="multiple" nzPlaceHolder="请选择检验项目" formControlName="project">
70
+									<ng-container *ngFor="let option of projectData">
71
+										<nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
72
+									</ng-container>
73
+								</nz-select>
74
+							</nz-input-group>
75
+						</nz-form-control>
76
+					</nz-form-item>
77
+					
78
+					<div class="df-sb">
79
+						<nz-form-item class="form-item">
80
+							<nz-form-label nzRequired nzFor="specimenGenre">标本类型</nz-form-label>
81
+							<nz-form-control nzErrorTip="请选择标本类型!">
82
+								<nz-input-group>
83
+									<nz-select nzSearch nzShowSearch nzPlaceHolder="请选择标本类型" formControlName="specimenGenre">
84
+										<ng-container *ngFor="let option of specimenData">
85
+											<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
86
+										</ng-container>
87
+										<nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
88
+											<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
89
+										</nz-option>
90
+									</nz-select>
91
+								</nz-input-group>
92
+							</nz-form-control>
93
+						</nz-form-item>
94
+						
95
+						<nz-form-item class="form-item-right">
96
+							<nz-form-label nzRequired nzFor="specimenNum">标本数量</nz-form-label>
97
+							<nz-form-control nzErrorTip="请输入标本数量!">
98
+								<input nz-input formControlName="specimenNum" disabled placeholder="请输入标本数量" nzSize="default" />
99
+							</nz-form-control>
100
+						</nz-form-item>
101
+					</div>
102
+					
103
+					
104
+					<nz-form-item class="form-item">
105
+						<nz-form-label nzRequired nzFor="takePart" [nzSm]="4" [nzXs]="24">部位</nz-form-label>
106
+						<nz-form-control nzErrorTip="请输入部位!" [nzSm]="20" [nzXs]="24">
107
+							<input nz-input formControlName="takePart"  placeholder="请输入部位" nzSize="default" />
108
+						</nz-form-control>
109
+					</nz-form-item>
110
+					
111
+					<nz-form-item class="form-item">
112
+						<nz-form-label nzRequired [nzSm]="3" [nzXs]="24">标本</nz-form-label>
113
+						<div class="add-icon-class" (click)='openSpecimen()'>
114
+							<span class="icon_transport transport-tag27fuben form-icon"></span>
115
+						</div>
116
+					</nz-form-item>
117
+					
118
+					<div class="specimen-list">
119
+						<div *ngFor="let item of specimenList;let index=index;" class="specimen-item">
120
+							<div class="specimen-name" (click)="specimenEdit($event,item,index)">
121
+							{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
122
+							</div>
123
+							<span class="icon_transport transport-lajitong specimen-icon" (click)="specimenDel($event,item,index)"></span>
124
+						</div>
125
+					</div>
126
+				</div>
127
+			</form>
128
+		</div>
129
+		<div class="mask-style" *ngIf="isSpinning">
130
+			<nz-spin nzSimple class="spin-style"></nz-spin>
131
+		</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>
134
+			<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
135
+		</div>
136
+	</div>
137
+</div>
138
+
139
+<!-- 选择标本 -->
140
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="specimenModal">
141
+	<div class="modalBody">
142
+		<div class="title">新增病理标本<i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i>
143
+		</div>
144
+		<div class="content">
145
+			<form nz-form [formGroup]="validateSpecimenForm" class="addForm" (ngSubmit)="submitSpecimen()">
146
+				<nz-form-item class="form-item">
147
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">位置来源</nz-form-label>
148
+					<div class="specimen-list">
149
+						<div>
150
+							<div *ngFor="let item of placeList;let index=index;" class="select-item"
151
+							[ngClass]="{'activeClass': index == placeIndex}" (click)="placeClick($event,item,index)" class="select-item">{{item.name}}</div>
152
+						</div>
153
+					</div>
154
+				</nz-form-item>
155
+				
156
+				<nz-form-item class="form-item">
157
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">系统</nz-form-label>
158
+					<div class="specimen-list">
159
+						<div *ngFor="let item of systemList;let index=index;" class="select-item"
160
+							[ngClass]="{'activeClass': index == systemIndex}" (click)="systemClick($event,item,index)">
161
+							{{item.name}}
162
+						</div>
163
+					</div>
164
+				</nz-form-item>
165
+				
166
+				<nz-form-item class="form-item">
167
+					<nz-form-label nzRequired [nzSm]="2" [nzXs]="24">器官</nz-form-label>
168
+					<div class="specimen-list">
169
+						<div *ngFor="let item of apparatusList;let index=index;" class="select-item"
170
+							[ngClass]="{'activeClass': index == apparatusIndex}" (click)="apparatusClick($event,item,index)">
171
+							{{item.name}}
172
+						</div>
173
+					</div>
174
+				</nz-form-item>
175
+				
176
+				<nz-form-item class="form-item">
177
+					<nz-form-label [nzSm]="4" [nzXs]="24">标本名称快捷选择</nz-form-label>
178
+					<div class="specimen-list">
179
+						<div *ngFor="let item of specimenNameList;let index=index;" class="select-item"
180
+							[ngClass]="{'activeClass': index == specimenNameIndex}" (click)="specimenNameClick($event,item,index)">
181
+							{{item.name}}
182
+						</div>
183
+					</div>
184
+				</nz-form-item>
185
+				
186
+				<nz-form-item class="form-item">
187
+					<nz-form-label nzRequired nzFor="specimenName" [nzSm]="3" [nzXs]="24">标本名称</nz-form-label>
188
+					<nz-form-control nzErrorTip="请输入标本名称" [nzSm]="21" [nzXs]="24">
189
+						<input nz-input maxlength="15" (ngModelChange)="specimenInput($event)" formControlName="specimenName" placeholder="请输入标本名称"/>
190
+					</nz-form-control>
191
+					<div class="empty-box">
192
+						<span class="name">{{specimenNameLength}}/15</span>
193
+						<span class="empty" (click)="emptData($event)">清空</span>
194
+					</div>
195
+				</nz-form-item>
196
+				
197
+				<nz-form-item class="form-item">
198
+					<nz-form-label nzFor="remark" [nzSm]="3" [nzXs]="24">备注</nz-form-label>
199
+					<nz-form-control nzErrorTip="请输入备注" [nzSm]="21" [nzXs]="24">
200
+						<textarea rows="3" nz-input formControlName="remark" placeholder="请输入备注"></textarea>
201
+					</nz-form-control>
202
+				</nz-form-item>
203
+			</form>
204
+		</div>
205
+		<div class="display_flex justify-content_flex-center bottom-btn">
206
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen(1)" [nzLoading]="btnSpLoading">确定</button>
207
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitSpecimen(2)">新增下一个标本</button>
208
+			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
209
+		</div>
210
+	</div>
211
+</div>
212
+
213
+<!-- 操作成功/失败提示框 -->
214
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
215
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
216
+	
217
+<app-prompt-modal *ngIf="specimenModalShow" [content]="promptContent" [success]="ifSuccess" [show]="specimenModalShow"
218
+  [info]="promptInfo" (closeModel)="closeSpecimenModel()"></app-prompt-modal>
219
+
220
+ <!-- 新增下一个标本 -->
221
+<app-dialog-delete [delModal]="addMadal" (hideDelModalEvent)="hideAddModal()" [btnLoading]="addSpLoading"
222
+  (confirmDelEvent)="confirmAdd()" content="您确认要新增下一个标本吗?"></app-dialog-delete>
223
+	
224
+	<!-- 删除模态框 -->
225
+	<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
226
+	  (confirmDelEvent)="confirmDel()" content="您确认要删除标本吗?"></app-dialog-delete>
227
+		
228
+<!-- 未打印 -->
229
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="notModal">
230
+	<div class="modalBody no-width">
231
+		<div class="title">未打印<i class="icon_transport transport-guanbi" (click)="hideNotModal()"></i>
232
+		</div>
233
+		<div class="content">
234
+			<form nz-form [formGroup]="validatePrintForm" class="addForm" (ngSubmit)="submitPrintForm()">
235
+				<nz-form-item>
236
+				  <nz-form-label nzRequired [nzSpan]="8" nzFor="inVitroTime">标本离体时间</nz-form-label>
237
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择标本离体时间!">
238
+				    <nz-input-group>
239
+							<nz-date-picker formControlName="inVitroTime" 
240
+							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
241
+							(ngModelChange)="formChangeDate($event)"></nz-date-picker>
242
+						</nz-input-group>
243
+				  </nz-form-control>
244
+				</nz-form-item>
245
+				<nz-form-item>
246
+				  <nz-form-label nzRequired [nzSpan]="5" nzFor="jobNumber">工号</nz-form-label>
247
+					<nz-form-control [nzSpan]="19" nzErrorTip="请输入工号!">
248
+						<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
249
+					</nz-form-control>
250
+				</nz-form-item>
251
+				<nz-form-item>
252
+				  <nz-form-label nzRequired [nzSpan]="5" nzFor="name">姓名</nz-form-label>
253
+					<nz-form-control [nzSpan]="19" nzErrorTip="请输入姓名!">
254
+						<input nz-input disabled formControlName="name" placeholder="请输入姓名" nzSize="default" />
255
+					</nz-form-control>
256
+				</nz-form-item>
257
+			</form>
258
+		</div>
259
+		<div class="display_flex justify-content_flex-center bottom-btn">
260
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitPrintForm()" [nzLoading]="printLoading">确定</button>
261
+			<button class="btn cancel" nz-button nzType="default" (click)="hideNotModal()">取消</button>
262
+		</div>
263
+	</div>
264
+</div>
265
+
266
+
267
+  <!-- 打印 -->
268
+  <div id="report" style="display: none;">
269
+		<div class="monad">
270
+			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>1" style="border: 1px solid #AAAAAA;
271
+				border-radius: 5px;font-size: 12px;">
272
+				 <div style="display: flex;">
273
+					 <img style="width: 50%;height: 70px;border-radius: 5px;" [src]="printData.applyBarCode" alt="">
274
+					 <div style="width: 50%;">
275
+						 
276
+						 <img style="width: 100%; border-radius: 5px;
277
+						 	position: relative;top: 15px;right: 7px;" [src]="tool.logoUrl" alt="">
278
+					 	<!-- <img style="width: 100%; border-radius: 5px;
279
+					 		position: relative;top: 15px;right: 7px;" src="../../../assets/images/yc_logo.png" alt=""> -->
280
+					 </div>
281
+				 </div>
282
+				
283
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
284
+					<div style="width:20%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">患者姓名</div>
285
+					<div style="width:50%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">{{printData.patientName}}</div>
286
+					<div style="width:14%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">性别</div>
287
+					<div style="width:16%;padding:1px;border-top: 1px solid #aaa;">{{printData.specimenList[0].patientGender}}</div>
288
+				</div>
289
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
290
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">住院号</div>
291
+					<div style="width:50%;border-right: 1px solid #AAAAAA;padding:1px;">{{printData.residenceNo}}</div>
292
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">年龄</div>
293
+					<div style="width:16%;padding:1px;"> {{printData.patientAge}}岁</div>
294
+				</div>
295
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
296
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">科室 </div>
297
+					<div style="width:50%;border-right: 1px solid #AAAAAA;
298
+					padding:1px;overflow: hidden;white-space: nowrap">{{printData.patientDept}}</div>
299
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">床号</div>
300
+					<div style="width:16%;padding:1px;">{{printData.patientBedNum}}床</div>
301
+				</div>
302
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
303
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">部位 </div>
304
+					<div style="width:50%;border-right: 1px solid #AAAAAA;
305
+					padding:1px;overflow: hidden;white-space: nowrap">{{printData.takePart}}</div>
306
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">标本数</div>
307
+					<div style="width:16%;padding:1px;">{{printData.specimenNum}}</div>
308
+				</div>
309
+				<div style="display: flex;">
310
+					<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">日期</div>
311
+					<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{printData.specimenList[0].inVitroTime|date:'yyyy-MM-dd'}}</div>
312
+				</div>
313
+				
314
+			</div>
315
+			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
316
+			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
317
+				<div *ngFor="let data of printData.specimenList; let index=index;">
318
+				 <div style="height: 50px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
319
+				 <div style="border: 1px solid #AAAAAA;border-radius: 5px;">
320
+					 <div style="display: flex;">
321
+					 	<img style="width: 50%;height: 70px;border-radius: 5px;" [src]="data.barCode" alt="">
322
+						<div style="width: 50%;">
323
+							<img style="width: 100%; border-radius: 5px;
324
+								position: relative;top: 15px;right: 7px;" [src]="tool.logoUrl" alt="">
325
+							<!-- <img style="width: 100%;border-radius: 5px;
326
+								position: relative;top: 15px;right: 7px;" src="../../../assets/images/yc_logo.png" alt=""> -->
327
+						</div>
328
+					 </div>
329
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
330
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">患者姓名</div>
331
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">{{data.patientName}}</div>
332
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">性别</div>
333
+						<div style="width:16%;box-sizing: border-box;padding:1px;border-top: 1px solid #aaa;">{{data.patientGender}}</div>
334
+					 </div>
335
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
336
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">住院号</div>
337
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">{{data.residenceNo}}</div>
338
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">年龄</div>
339
+						<div style="width:16%;box-sizing: border-box;padding:1px;"> {{data.patientAge}}岁</div>
340
+					 </div>
341
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
342
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">科室 </div>
343
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;
344
+						padding:1px;overflow: hidden;white-space: nowrap">{{data.patientDept}}</div>
345
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">床号</div>
346
+						<div style="width:16%;box-sizing: border-box;padding:1px;">{{data.patientBedNum}}床</div>
347
+					 </div>
348
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
349
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">标本名称</div>
350
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;
351
+						padding:1px;overflow: hidden;white-space: nowrap">({{index+1}}/{{printData.specimenList.length}}){{data.partSource}}{{data.organ}}{{data.specimenName}}</div>
352
+					 </div>
353
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
354
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">申请单号</div>
355
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{data.applyCode }}</div>
356
+					 </div>
357
+					 <div style="display: flex;">
358
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">日期</div>
359
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
360
+					 </div>
361
+				 </div>
362
+				</div>
363
+			</div>
364
+		</div>
365
+  </div>

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

@@ -0,0 +1,282 @@
1
+/* 修改垂直滚动条 */
2
+::-webkit-scrollbar {
3
+	width: 4px; /* 修改宽度 */
4
+	border-radius: 2px;
5
+}
6
+ 
7
+/* 修改滚动条轨道背景色 */
8
+::-webkit-scrollbar-track {
9
+	background-color: #f1f1f1;
10
+}
11
+ 
12
+/* 修改滚动条滑块颜色 */
13
+::-webkit-scrollbar-thumb {
14
+	background-color: #888;
15
+}
16
+ 
17
+/* 修改滚动条滑块悬停时的颜色 */
18
+::-webkit-scrollbar-thumb:hover {
19
+	background-color: #555;
20
+}
21
+
22
+.pathology-box {
23
+  position: fixed;
24
+	left: 0;
25
+	top: 0;
26
+	width: 100%;
27
+	height: 100%;
28
+	background: rgba(0, 0, 0, 0.4);
29
+	z-index: 99;
30
+	.pathology-content{
31
+		width: 80%;
32
+		background: #fff;
33
+		border-radius: 5px;
34
+		padding: 10px 20px;
35
+		color: #000;
36
+		.title {
37
+		  width: 100%;
38
+		  text-align: center;
39
+		  font-size: 18px;
40
+		  position: relative;
41
+		
42
+		  i {
43
+		    position: absolute;
44
+		    right: 0;
45
+		    top: 0;
46
+		    font-size: 20px;
47
+		    color: #666;
48
+		    cursor: pointer;
49
+		    padding: 0 5px;
50
+		  }
51
+		}
52
+		.content{
53
+			width: 100%;
54
+			background: #f9fafb;
55
+			border: 1px solid #e5e9ed;
56
+			border-radius: 5px;
57
+			// overflow: hidden;
58
+			margin-top: 12px;
59
+			// height: auto;
60
+			// // padding: 19px 14px 10px 0;
61
+			// max-height: 460px;
62
+			// overflow-y: auto;
63
+			.addForm{
64
+				display: flex;
65
+				.width-100{
66
+					width: 100%;
67
+				}
68
+				.font-weight-500{
69
+					color: #000;
70
+					font-weight: 500;
71
+				}
72
+				.ant-select{
73
+					width: 100%;
74
+				}
75
+				
76
+				.content-item{
77
+					flex: 1;
78
+					height: 460px;
79
+					overflow-y: auto;
80
+					padding: 0 15px;
81
+					.df-sb{
82
+						display: flex;
83
+						justify-content: space-between;
84
+						.form-item{
85
+							flex: 1;
86
+							display: flex;
87
+							flex-wrap: nowrap;
88
+							.ant-form-item-label{
89
+								width: 33%;
90
+							}
91
+							.ant-form-item-control-wrapper{
92
+								width: 60%;
93
+							}
94
+						}
95
+						.form-item-right{
96
+							flex: 1;
97
+							display: flex;
98
+							flex-wrap: nowrap;
99
+							.ant-form-item-label{
100
+								width: 33%;
101
+							}
102
+							.ant-form-item-control-wrapper{
103
+								width: 70%;
104
+							}
105
+						}
106
+					}
107
+					.form-title-box{
108
+						display: flex;
109
+						.form-title{
110
+							color: #333;
111
+							margin-right: 40px;
112
+						}
113
+					}
114
+					.ant-form-item {
115
+					  margin-bottom: 14px;
116
+						display: flex;
117
+						flex-wrap: wrap;
118
+					  .ant-form-item-label {
119
+					    text-align: left;
120
+							font-weight: 500;
121
+					  }
122
+						.ant-form-item-control-wrapper{
123
+							.ant-form-item-control{
124
+								width: 400px;
125
+							}
126
+						}
127
+					}
128
+					.add-icon-class{
129
+						border: 1px solid #e5e9ed;
130
+						border-radius: 3px;
131
+						width: 26px;
132
+						height: 26px;
133
+						line-height: 26px;
134
+						text-align: center;
135
+						position: relative;
136
+						top: 7px;
137
+						cursor: pointer;
138
+						.form-icon{
139
+							
140
+						}
141
+					}
142
+				}
143
+				.boder-right{
144
+					border-right: 1px solid #e5e9ed;
145
+				}
146
+				.specimen-item{
147
+					display: flex;
148
+					margin-bottom: 10px;
149
+					.specimen-name{
150
+						cursor: pointer;
151
+					}
152
+					.specimen-icon{
153
+						color: #64BD7B;
154
+						cursor: pointer;
155
+						font-size: 20px;
156
+						position: relative;
157
+						top: -4px;
158
+						left: 2px;
159
+					}
160
+				}
161
+			}
162
+		}
163
+		.mask-style{
164
+			width: 100%;
165
+			height: 100%;
166
+			position: fixed;
167
+			top: 0;
168
+			left: 0;
169
+			z-index: 999;
170
+			display: flex;
171
+			background: rgba(0,0,0,0.2);
172
+			align-items: center;
173
+			justify-content: center;
174
+		}
175
+		.spin-style{
176
+			z-index:9999;
177
+		}
178
+		.bottom-btn{
179
+			margin-top: 10px;
180
+			.btn-right{
181
+				margin-right: 10px;
182
+			}
183
+		}
184
+	}
185
+	
186
+}
187
+	// 新增
188
+	&.add {
189
+		position: fixed;
190
+		left: 0;
191
+		top: 0;
192
+		width: 100%;
193
+		height: 100%;
194
+		background: rgba(0, 0, 0, 0.4);
195
+		z-index: 999;
196
+	  .modalBody {
197
+	    width: 80%;
198
+	    height: auto;
199
+			padding: 10px 20px;
200
+			border-radius: 5px;
201
+			background: #fff;
202
+			.title {
203
+			  width: 100%;
204
+			  text-align: center;
205
+			  font-size: 18px;
206
+			  position: relative;
207
+			
208
+			  i {
209
+			    position: absolute;
210
+			    right: 0;
211
+			    top: 0;
212
+			    font-size: 20px;
213
+			    color: #666;
214
+			    cursor: pointer;
215
+			    padding: 0 5px;
216
+			  }
217
+			}
218
+	    .content {
219
+	      width: 100%;
220
+	      height: auto;
221
+	      padding: 19px 14px 0 14px;
222
+	      max-height: 500px;
223
+	      overflow-y: auto;
224
+				.ant-form-item {
225
+				  margin-bottom: 14px;
226
+					display: flex;
227
+					flex-wrap: wrap;
228
+					position: relative;
229
+				  .ant-form-item-label {
230
+				    text-align: left;
231
+						font-weight: 500;
232
+				  }
233
+					.ant-form-item-control-wrapper{
234
+						.ant-form-item-control{
235
+							width: 400px;
236
+						}
237
+					}
238
+					.empty-box{
239
+						position: absolute;
240
+						right: 6px;
241
+						top: 8px;
242
+						.name{
243
+							color: #ccc;
244
+						}
245
+						.empty{
246
+							color: #64BD7B;
247
+							cursor: pointer;
248
+						}
249
+					}
250
+				}
251
+				.specimen-list{
252
+					flex: 1;
253
+					.select-item{
254
+						margin-top: 5px;
255
+						display: flex;
256
+						flex-wrap: wrap;
257
+						padding: 3px 8px;
258
+						border: 1px solid #e5e9ed;
259
+						border-radius: 5px;
260
+						margin-right: 10px;
261
+						cursor: pointer;
262
+						display: inline-block;
263
+					}
264
+				}
265
+				
266
+				.activeClass{
267
+					color: #64BD7B;
268
+					border-color: #64BD7B !important;
269
+				}
270
+	      
271
+	    }
272
+			.bottom-btn{
273
+				margin-top: 10px;
274
+				.btn-right{
275
+					margin-right: 10px;
276
+				}
277
+			}
278
+	  }
279
+		.no-width{
280
+			width: 30% !important;
281
+		}
282
+	}

+ 821 - 0
src/app/share/pathology-add/pathology-add.component.ts

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

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

@@ -0,0 +1,207 @@
1
+<div class="pathology-box display_flex align-items_center justify-content_flex-center">
2
+		<div class="pathology-content" *ngIf="!isSpinning">
3
+			<div class="title">查看详情
4
+			<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
5
+			<div class="content">
6
+				<div class="content-item boder-right">
7
+					<div class="form-title-box">
8
+						<div class="form-title"><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>
15
+						<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>
18
+					
19
+					<div class="form-title-box">
20
+						<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
21
+					</div>
22
+					
23
+					<div class="form-list">
24
+						<div class="form-title font-weight-500">诊断:</div>
25
+						<div class="indent">
26
+							{{detailsData.diagnose||'无'}}
27
+						</div>
28
+					</div>
29
+					
30
+					<div class="form-list">
31
+						<div class="form-title font-weight-500">病历摘要:</div>
32
+						<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
33
+					</div>
34
+					<div class="form-list">
35
+						<div class="form-title font-weight-500">手术方案:</div>
36
+						<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
37
+					</div>
38
+			<!-- 		<div class="form-list">
39
+						<div class="form-title font-weight-500">术中所见:</div>
40
+						<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
41
+					</div> -->
42
+
43
+					<div class="form-title-box">
44
+						<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
45
+						<div class="form-title"><span class="font-weight-500">标本数量:</span>{{detailsData.specimenNum||'无'}}</div>
46
+						<div class="form-title"><span class="font-weight-500">部位:</span>{{detailsData.takePart||'无'}}</div>
47
+					</div>
48
+					
49
+					<div class="form-title-box">
50
+						<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
51
+						<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
52
+						<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
53
+					</div>
54
+					
55
+					<div class="form-list">
56
+						<div class="form-title font-weight-500">标本:</div>
57
+						<div class="form-title-box">
58
+							<div class="form-title" *ngFor="let item of specimenList">
59
+								{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
60
+							</div>
61
+						</div>
62
+					</div>
63
+				</div>
64
+				<div class="content-item-right">
65
+					<div class="step-title">病理闭环</div>
66
+					<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
67
+						<ng-container *ngFor="let item of pathologyLogs; let index = index">
68
+								<nz-step
69
+									[nzDescription]="tpl"
70
+								>
71
+								</nz-step>
72
+								<ng-template #tpl>
73
+									<div *ngIf="index==pathologyLogs.length-1" class="step-size">
74
+										<div style="color: #49B856;">{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
75
+										<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
76
+									</div>
77
+									<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
78
+										<div>{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
79
+										<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
80
+									</div>
81
+								</ng-template>
82
+							</ng-container>
83
+					</nz-steps>
84
+				</div>
85
+			</div>
86
+			<div class="display_flex justify-content_flex-center bottom-btn">
87
+				<button class="btn btn-right" *ngIf="detailsData.status.value==6 || 
88
+				detailsData.status.value==7 || detailsData.status.value==8 || 
89
+				detailsData.status.value==9 || detailsData.status.value==10"nz-button nzType="primary" (click)="closeDetailMoadl()">知道了</button>
90
+				
91
+				<button class="btn btn-right" *ngIf="detailsData.status.value==2 || 
92
+				detailsData.status.value==3 || detailsData.status.value==4 || 
93
+				detailsData.status.value==5" nz-button nzType="primary" (click)="submitPrint()" [nzLoading]="btnLoading">补打</button>
94
+				
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
+				<button class="btn cancel" *ngIf="detailsData.status.value==2 || 
101
+				detailsData.status.value==3 || detailsData.status.value==4 || 
102
+				detailsData.status.value==5" nz-button nzType="default" (click)="closeDetailMoadl()">取消</button>
103
+			</div>
104
+		</div>
105
+	<div class="mask-style" *ngIf="isSpinning">
106
+		<nz-spin nzSimple class="spin-style"></nz-spin>
107
+	</div>
108
+</div>
109
+
110
+<!-- 打印 -->
111
+  <div id="report" style="display: none;">
112
+		<div class="monad">
113
+			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>1" style="border: 1px solid #AAAAAA;
114
+				border-radius: 5px;font-size: 12px;">
115
+				 <div style="display: flex;">
116
+					 <img style="width: 50%;height: 70px;border-radius: 5px;" [src]="printData.applyBarCode" alt="">
117
+					 <div style="width: 50%;">
118
+						 <img style="width: 100%; border-radius: 5px;
119
+						 	position: relative;top: 15px;right: 7px;" [src]="tool.logoUrl" alt="">
120
+<!-- 					 	<img style="width: 100%; border-radius: 5px;
121
+					 		position: relative;top: 15px;right: 7px;" src="../../../assets/images/yc_logo.png" alt=""> -->
122
+					 </div>
123
+				 </div>
124
+				
125
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
126
+					<div style="width:20%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">患者姓名</div>
127
+					<div style="width:50%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">{{printData.patientName}}</div>
128
+					<div style="width:14%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">性别</div>
129
+					<div style="width:16%;padding:1px;border-top: 1px solid #aaa;">{{printData.specimenList[0].patientGender}}</div>
130
+				</div>
131
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
132
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">住院号</div>
133
+					<div style="width:50%;border-right: 1px solid #AAAAAA;padding:1px;">{{printData.residenceNo}}</div>
134
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">年龄</div>
135
+					<div style="width:16%;padding:1px;"> {{printData.patientAge}}岁</div>
136
+				</div>
137
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
138
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">科室 </div>
139
+					<div style="width:50%;border-right: 1px solid #AAAAAA;
140
+					padding:1px;overflow: hidden;white-space: nowrap">{{printData.patientDept}}</div>
141
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">床号</div>
142
+					<div style="width:16%;padding:1px;">{{printData.patientBedNum}}床</div>
143
+				</div>
144
+				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
145
+					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">部位 </div>
146
+					<div style="width:50%;border-right: 1px solid #AAAAAA;
147
+					padding:1px;overflow: hidden;white-space: nowrap">{{printData.takePart}}</div>
148
+					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">标本数</div>
149
+					<div style="width:16%;padding:1px;">{{printData.specimenNum}}</div>
150
+				</div>
151
+				<div style="display: flex;">
152
+					<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">日期</div>
153
+					<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{printData.specimenList[0].inVitroTime|date:'yyyy-MM-dd'}}</div>
154
+				</div>
155
+				
156
+			</div>
157
+			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
158
+			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
159
+				<div *ngFor="let data of printData.specimenList; let index=index;">
160
+				 <div style="height: 50px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
161
+				 <div style="border: 1px solid #AAAAAA;border-radius: 5px;">
162
+					 <div style="display: flex;">
163
+					 	<img style="width: 50%;height: 70px;border-radius: 5px;" [src]="data.barCode" alt="">
164
+						<div style="width: 50%;">
165
+							<img style="width: 100%; border-radius: 5px;
166
+								position: relative;top: 15px;right: 7px;" [src]="tool.logoUrl" alt="">
167
+							<!-- <img style="width: 100%;border-radius: 5px;
168
+								position: relative;top: 15px;right: 7px;" src="../../../assets/images/yc_logo.png" alt=""> -->
169
+						</div>
170
+					 </div>
171
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
172
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">患者姓名</div>
173
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">{{data.patientName}}</div>
174
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">性别</div>
175
+						<div style="width:16%;box-sizing: border-box;padding:1px;border-top: 1px solid #aaa;">{{data.patientGender}}</div>
176
+					 </div>
177
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
178
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">住院号</div>
179
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">{{data.residenceNo}}</div>
180
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">年龄</div>
181
+						<div style="width:16%;box-sizing: border-box;padding:1px;"> {{data.patientAge}}岁</div>
182
+					 </div>
183
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
184
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">科室 </div>
185
+					 	<div style="width:50%;box-sizing: border-box;border-right: 1px solid #AAAAAA;
186
+						padding:1px;overflow: hidden;white-space: nowrap">{{data.patientDept}}</div>
187
+						<div style="width:14%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">床号</div>
188
+						<div style="width:16%;box-sizing: border-box;padding:1px;">{{data.patientBedNum}}床</div>
189
+					 </div>
190
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
191
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">标本名称</div>
192
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;
193
+						padding:1px;overflow: hidden;white-space: nowrap">({{index+1}}/{{printData.specimenList.length}}){{data.partSource}}{{data.organ}}{{data.specimenName}}</div>
194
+					 </div>
195
+					 <div style="display: flex;border-bottom: 1px solid #AAAAAA;">
196
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">申请单号</div>
197
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{data.applyCode }}</div>
198
+					 </div>
199
+					 <div style="display: flex;">
200
+					 	<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">日期</div>
201
+					 	<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{data.inVitroTime|date:'yyyy-MM-dd'}}</div>
202
+					 </div>
203
+				 </div>
204
+				</div>
205
+			</div>
206
+		</div>
207
+  </div>

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

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

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

@@ -0,0 +1,691 @@
1
+import { Component, ElementRef, Output, Input, OnInit, EventEmitter } from '@angular/core';
2
+import { HttpHeaders, HttpRequest, HttpClient  } from "@angular/common/http";
3
+import host from "../../../assets/js/http";
4
+import { NzMessageService } from "ng-zorro-antd";
5
+import { MainService } from '../../services/main.service';
6
+import {
7
+  FormBuilder,
8
+  Validators,
9
+  FormGroup,
10
+  FormControl,
11
+} from "@angular/forms";
12
+import { format, startOfDay, endOfDay, subDays} from "date-fns";
13
+import { ToolService } from "../../services/tool.service";
14
+import { DomSanitizer } from '@angular/platform-browser';
15
+
16
+@Component({
17
+  selector: 'app-pathology-detail',
18
+  templateUrl: './pathology-detail.component.html',
19
+  styleUrls: ['./pathology-detail.component.less']
20
+})
21
+export class PathologyDetailComponent implements OnInit {
22
+	
23
+	@Output() pathologyCancel = new EventEmitter();
24
+	@Input() surgeryId: string;
25
+	@Input() patientId: string;
26
+	
27
+	constructor(
28
+		private http: HttpClient,
29
+		private message: NzMessageService,
30
+		private mainService: MainService,
31
+		private fb: FormBuilder,
32
+		private tool: ToolService,
33
+		private sanitizer: DomSanitizer
34
+	) { }
35
+	
36
+	specimenLookData:any=[
37
+		{
38
+			name:'通用-头颈部-口腔-黏膜活检',
39
+		},
40
+		{
41
+			name:'通用-头颈部-口腔-黏膜活检',
42
+		},
43
+		{
44
+			name:'通用-头颈部-口腔-黏膜活检',
45
+		},
46
+		{
47
+			name:'通用-头颈部-口腔-黏膜活检',
48
+		}
49
+	]
50
+	stepLength:any = 0;
51
+	btnLoading:boolean = false;
52
+	validateForm: FormGroup; //新增/编辑表单
53
+	validateSpecimenForm: FormGroup; //选择标本表单
54
+	validatePrintForm: FormGroup;
55
+	specimenData:any=[]; //标本类型
56
+	isDeptLoading:boolean = false;
57
+	specimenModal:boolean = false; //选择标本状态
58
+	isSpinning:boolean = false; //页面加载状态
59
+	detailsData:any;
60
+	specimenList:any=[]; //已选标本
61
+	placeIndex:any = null;
62
+	systemIndex:any = null;
63
+	apparatusIndex:any = null;
64
+	specimenNameIndex:any = null;
65
+	placeList:any=[]; //位置来源数据
66
+	systemList:any=[]; //系统数据
67
+	apparatusList:any=[]; //器官数据
68
+	specimenNameList:any=[]; //标本名称数据
69
+	promptContent: string; //操作提示框提示信息
70
+	ifSuccess: boolean; //操作成功/失败
71
+	promptInfo: string; //操作结果提示信息
72
+	promptModalShow: boolean; //操作提示框是否展示
73
+	specimenModalShow: boolean; //操作提示框是否展示
74
+	type:any = '未打印';
75
+	notModal:boolean = false;
76
+	hosId:any;
77
+	pathologyLogs:any //日志
78
+	printLoading:boolean = false;
79
+	printData:any = [];
80
+	project:any = [];
81
+	
82
+  ngOnInit() {
83
+		this.hosId = this.tool.getCurrentHospital().id;
84
+		// this.initForm()
85
+		this.fetchDataList()
86
+  }
87
+	
88
+	// 补打
89
+	submitPrint(){
90
+		let that = this
91
+		let data: any = {
92
+			pathologyForm:{
93
+				...this.detailsData,
94
+				surgeryId: this.surgeryId || "",
95
+				patientId: this.patientId || "",
96
+				hosId: this.hosId || "" 
97
+			}
98
+		};
99
+		delete data.pathologyForm.patientDTO
100
+		delete data.pathologyForm.surgeryDeptDTO
101
+		delete data.pathologyForm.surgeryDoctorDTO
102
+		delete data.pathologyForm.specimenGenre
103
+		this.printLoading = true;
104
+		this.mainService
105
+		  .pathologyPrint(data)
106
+		  .subscribe((res:any) => {
107
+				if(res.status==200){
108
+					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
+					if(arr.applyBarCode){
115
+						arr.applyBarCode = this.sanitizer.bypassSecurityTrustResourceUrl(arr.applyBarCode)
116
+					}
117
+					for(let i of arr.specimenList){
118
+						i.applyCode = arr.applyCode?arr.applyCode:data.pathologyForm.applyCode
119
+						i.barCode = this.sanitizer.bypassSecurityTrustResourceUrl(i.barCode)
120
+					}
121
+					that.printLoading = false;
122
+					that.printData = arr;
123
+					setTimeout(() => {
124
+					  const printContent = document.getElementById("report");
125
+					  const WindowPrt = window.open("", "", "width=100,height=1000");
126
+						WindowPrt.document.body.innerHTML = printContent.innerHTML;
127
+						setTimeout(_=>{
128
+							WindowPrt.document.close();
129
+							WindowPrt.focus();
130
+							WindowPrt.print();
131
+							WindowPrt.close();
132
+							that.hideModal();
133
+						},500)
134
+					}, 500);
135
+				}else{
136
+					this.message.error(res.msg)
137
+				}
138
+		  });
139
+	}
140
+	
141
+	// 返回
142
+	closeDetailMoadl(){
143
+		this.pathologyCancel.emit()
144
+	}
145
+	
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
+	// 获取详情
159
+	fetchDataList(){
160
+		let data = {
161
+		  idx: 0,
162
+		  sum: 9999,
163
+		  pathologyForm: {
164
+		    surgeryId: this.surgeryId || "",
165
+		    patientId: this.patientId || "",
166
+		    hosId: this.hosId || "" ,
167
+		  },
168
+		};
169
+		this.isSpinning = true;
170
+		this.mainService
171
+		  .getFetchDataList("data", "pathologyForm", data)
172
+		  .subscribe((data) => {
173
+		    this.isSpinning = false;
174
+		    this.detailsData = data.list[0];
175
+				this.pathologyLogs = data.list[0].formLogDTOS
176
+				this.stepLength = this.pathologyLogs.length
177
+				if(this.detailsData.pathologyInspectDTOS){
178
+					for(let i of this.detailsData.pathologyInspectDTOS){
179
+						this.project.push(i.inspectProject.name)
180
+					}
181
+					this.project = this.project.join('、')
182
+				}
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
+				this.getSampleData()
190
+		  });
191
+	}
192
+	
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
+	// 获取标本列表
495
+	getSampleData(){
496
+		let data={
497
+			idx: 0,
498
+			sum: 9999,
499
+			pathologySpecimen:{
500
+				pathologyFormId:this.detailsData.id
501
+			}
502
+		}
503
+		this.mainService
504
+		  .getFetchDataList("data", "pathologySpecimen", data)
505
+		  .subscribe((res) => {
506
+		    this.specimenList = res.list
507
+		  });
508
+	}
509
+	
510
+	hideSpecimenModal(){
511
+		this.specimenModal = false
512
+	}
513
+	
514
+	hideNotModal(){
515
+		this.notModal = false
516
+	}
517
+	
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
+	// }
598
+	
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
+	// }
656
+	
657
+	// 关闭标本
658
+	closeSpecimenModel(){
659
+		this.getSampleData()
660
+		this.hideSpecimenModal()
661
+	}
662
+	
663
+	closeModel(){
664
+		this.hideModal()
665
+	}
666
+	hideModal(){
667
+		this.pathologyCancel.emit()
668
+	}
669
+	
670
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
671
+	showPromptModal(con, success, promptInfo?) {
672
+	  this.promptModalShow = false;
673
+	  this.promptContent = con;
674
+	  this.ifSuccess = success;
675
+	  this.promptInfo = promptInfo;
676
+	  setTimeout(() => {
677
+	    this.promptModalShow = true;
678
+	  }, 100);
679
+	}
680
+	
681
+	showSpecimenModal(con, success, promptInfo?) {
682
+	  this.specimenModalShow = false;
683
+	  this.promptContent = con;
684
+	  this.ifSuccess = success;
685
+	  this.promptInfo = promptInfo;
686
+	  setTimeout(() => {
687
+	    this.specimenModalShow = true;
688
+	  }, 100);
689
+	}
690
+}
691
+

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

@@ -55,6 +55,9 @@ import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing
55 55
 import { InspectionExecuteDetailComponent } from './inspection-execute-detail/inspection-execute-detail.component';
56 56
 import { wangEditorComponent } from './wang-editor/wang-editor.component';
57 57
 import { StripHtmlPipe } from '../pipes/strip-html.pipe.';
58
+import { PathologyAddComponent } from './pathology-add/pathology-add.component';
59
+import { PathologyDetailComponent } from './pathology-detail/pathology-detail.component';
60
+
58 61
 @NgModule({
59 62
   declarations: [
60 63
     DetailSampleComponent,
@@ -84,6 +87,8 @@ import { StripHtmlPipe } from '../pipes/strip-html.pipe.';
84 87
     OutgoingRecordDetailComponent,
85 88
     InspectionExecuteDetailComponent,
86 89
 		wangEditorComponent,
90
+		PathologyAddComponent,
91
+		PathologyDetailComponent,
87 92
     DateTransformPipe,
88 93
     DataToNamePipe,
89 94
     DialogDeleteComponent,
@@ -148,6 +153,8 @@ import { StripHtmlPipe } from '../pipes/strip-html.pipe.';
148 153
     OutgoingRecordDetailComponent,
149 154
     InspectionExecuteDetailComponent,
150 155
 		wangEditorComponent,
156
+		PathologyAddComponent,
157
+		PathologyDetailComponent,
151 158
     CommonModule,
152 159
     NgZorroAntdModule,
153 160
     FormsModule,

+ 18 - 6
src/app/views/admin-office-prescription/admin-office-prescription.component.html

@@ -175,14 +175,21 @@
175 175
 					justify-content: center;
176 176
 					flex-wrap: wrap;
177 177
 					border-right: 1px solid #e7e7e7;
178
-					border-bottom: 1px solid #e7e7e7;">包装规格</div>
178
+					border-bottom: 1px solid #e7e7e7;">15日消耗</div>
179 179
 					
180
-					<div style="width: 10%;display: flex;font-size: 12px;
180
+					<div style="width: 8%;display: flex;font-size: 12px;
181 181
 					align-items: center;
182 182
 					justify-content: center;
183 183
 					flex-wrap: wrap;
184 184
 					border-right: 1px solid #e7e7e7;
185
-					border-bottom: 1px solid #e7e7e7;">实际消耗</div>
185
+					border-bottom: 1px solid #e7e7e7;">包规</div>
186
+					
187
+					<div style="width: 8%;display: flex;font-size: 12px;
188
+					align-items: center;
189
+					justify-content: center;
190
+					flex-wrap: wrap;
191
+					border-right: 1px solid #e7e7e7;
192
+					border-bottom: 1px solid #e7e7e7;">实消</div>
186 193
 					
187 194
 					<div style="width: 10%;display: flex;font-size: 12px;
188 195
 					align-items: center;
@@ -195,7 +202,6 @@
195 202
 					align-items: center;
196 203
 					justify-content: center;
197 204
 					flex-wrap: wrap;
198
-					border-right: 1px solid #e7e7e7;
199 205
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
200 206
 				</div>
201 207
 				<div *ngFor="let data of codes" style="display: flex;">
@@ -218,9 +224,16 @@
218 224
 					justify-content: center;
219 225
 					flex-wrap: wrap;
220 226
 					border-right: 1px solid #e7e7e7;
227
+					border-bottom: 1px solid #e7e7e7;">{{data.fifteenExpendCount}}</div>
228
+					
229
+					<div style="width: 8%;display: flex;font-size: 12px;
230
+					align-items: center;
231
+					justify-content: center;
232
+					flex-wrap: wrap;
233
+					border-right: 1px solid #e7e7e7;
221 234
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.packingSpecs }}</div>
222 235
 					
223
-					<div style="width: 10%;display: flex;font-size: 12px;
236
+					<div style="width: 8%;display: flex;font-size: 12px;
224 237
 					align-items: center;
225 238
 					justify-content: center;
226 239
 					flex-wrap: wrap;
@@ -238,7 +251,6 @@
238 251
 					align-items: center;
239 252
 					justify-content: center;
240 253
 					flex-wrap: wrap;
241
-					border-right: 1px solid #e7e7e7;
242 254
 					border-bottom: 1px solid #e7e7e7;">
243 255
 						<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
244 256
 							{{ data.cartonNum }} {{data.giveOutType && data.giveOutType.value==1?

+ 228 - 13
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -1,7 +1,7 @@
1 1
 <div class="list-template">
2 2
   <div class="list-template__content">
3 3
     <div class="list-template__top" nz-row>
4
-      <div nz-col nzLg='18' class="list-template__searchBox">
4
+      <div nz-col nzLg='16' class="list-template__searchBox">
5 5
         <div class="list-template__searchItem">
6 6
           <span class="label">批次号:</span>
7 7
           <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
@@ -12,6 +12,7 @@
12 12
 					(ngModelChange)="changeDate($event)"></nz-range-picker>
13 13
         </div>
14 14
       </div>
15
+			<div nz-col nzLg='2' class="autoUpdate">{{ logTime }}秒</div>
15 16
       <div nz-col nzLg="6" class="list-template__btns">
16 17
         <button class="btn default" (click)='search()'>搜索</button>
17 18
         <button class="btn default ml8" (click)='reset()'>重置</button>
@@ -36,7 +37,7 @@
36 37
           </tr>
37 38
         </thead>
38 39
         <tbody>
39
-          <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
40
+          <tr *ngFor="let data of listOfData">
40 41
             <td>{{ data.batchNo || '-' }}</td>
41 42
             <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm' }}</td>
42 43
             <td>
@@ -54,7 +55,10 @@
54 55
 								<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
55 56
 								<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
56 57
                 <span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
57
-                <span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
58
+								<span *ngIf="coopBtns.dispensingGross && data.batchState.name=='已发药'" (click)="dispensingGross($event, data)">发药总量</span>
59
+                <span *ngIf="coopBtns.dispensingInfo && data.batchState.name=='已发药'" (click)="dispensingInfo($event, data)">发药信息</span>
60
+								<span *ngIf="coopBtns.export && data.batchState.name=='已发药'" (click)="exportPc($event, data)">导出</span>
61
+								<span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
58 62
                 <span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
59 63
               </div>
60 64
             </td>
@@ -87,11 +91,11 @@
87 91
        	  </nz-form-control>
88 92
        	</nz-form-item>
89 93
        	<nz-form-item>
90
-       	  <nz-form-label nzRequired nzFor="department">取药科室</nz-form-label>
94
+       	  <nz-form-label nzRequired nzFor="addDepartment">取药科室</nz-form-label>
91 95
        	  <nz-form-control nzErrorTip="请选择取药科室!">
92 96
        	    <nz-input-group>
93
-       				<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzPlaceHolder="请选择申请科室" formControlName="department">
94
-       				  <ng-container *ngFor="let option of hospitals1">
97
+       				<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzPlaceHolder="请选择申请科室" formControlName="addDepartment">
98
+       				  <ng-container *ngFor="let option of addHospitals">
95 99
        				    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
96 100
        				  </ng-container>
97 101
        				  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
@@ -124,7 +128,110 @@
124 128
   <!-- 编辑模态框 -->
125 129
   <app-dialog-delete [delModal]="editModal" (hideDelModalEvent)="hideDelModal1()" [btnLoading]="saveLoading"
126 130
     (confirmDelEvent)="confirmDel1()" [content]="'保存后会重置您的发药科室的药品信息,您确认吗?'"></app-dialog-delete>
127
-
131
+	
132
+	<!-- 发药总量 -->
133
+	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="grossModal">
134
+	  <div class="modalBody modalBody-ga">
135
+	    <div class="title">发药总量<i class="icon_transport transport-guanbi" (click)="hideGrossModal()"></i>
136
+	    </div>
137
+	    <overlay-scrollbars #osComponentRef1 class="content">
138
+	      <div class="list-template__bottom">
139
+	        <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
140
+	          [nzLoading]="grossLoading">
141
+	          <thead>
142
+	            <tr class="thead">
143
+	              <th>药品名称</th>
144
+	              <th>药品规格</th>
145
+	              <th>包装规格</th>
146
+	              <th>发药总量</th>
147
+								<th>箱数合计</th>
148
+	            </tr>
149
+	          </thead>
150
+	          <tbody>
151
+	            <tr *ngFor="let data of viewData">
152
+	              <td>{{ data.drugsInfoDTO.drugName}}</td>
153
+	              <td>{{ data.drugsInfoDTO.specs}}</td>
154
+	              <td>{{ data.drugsInfoDTO.packingSpecs}}</td>
155
+								<td>{{ data.actualCount}}</td>
156
+								<td>
157
+									{{data.cartonNum}} 箱 &nbsp;
158
+									<span *ngIf="data.afterInventory>0">
159
+										{{data.afterInventory}} {{data.drugsInfoDTO.unit}}
160
+									</span>
161
+								</td>
162
+	            </tr>
163
+	          </tbody>
164
+	        </nz-table>
165
+	      </div>
166
+	    </overlay-scrollbars>
167
+	    <div class="display_flex justify-content_flex-center">
168
+	      <button class="btn" nz-button nzType="primary" (click)="hideGrossModal()">知道了</button>
169
+	    </div>
170
+	  </div>
171
+	</div>
172
+	
173
+	<!-- 发药信息 -->
174
+	<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="infoModal">
175
+	  <div class="modalBody modalBody-ga">
176
+	    <div class="title">发药信息<i class="icon_transport transport-guanbi" (click)="hideInfoModal()"></i>
177
+	    </div>
178
+			<div class="list-template__top" nz-row>
179
+			  <div nz-col nzLg='19' class="list-template__searchBox">
180
+			    <div class="list-template__searchItem">
181
+			      <span class="label">科室:</span>
182
+			      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="infoDepartment">
183
+			        <ng-container *ngFor="let option of hospitals1">
184
+			          <nz-option [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
185
+			        </ng-container>
186
+			      </nz-select>
187
+			    </div>
188
+			  </div>
189
+			  <div nz-col nzLg="5" class="list-template__btns">
190
+			    <button class="btn default" (click)='searchInfo()'>搜索</button>
191
+					<button class="btn default" (click)='resetInfo()'>重置</button>
192
+			  </div>
193
+			</div>
194
+	    <overlay-scrollbars #osComponentRef1 class="content">
195
+	      <div class="list-template__bottom">
196
+	        <nz-table class="list-template__nzTable" [nzData]="infoData" nzSize="middle" [nzShowPagination]="false"
197
+	          [nzLoading]="infoLoading">
198
+	          <thead>
199
+	            <tr class="thead">
200
+								<th>科室名称</th>
201
+								<th>药品名称</th>
202
+								<th>规格</th>
203
+								<th>消耗数量</th>
204
+								<th>原库存数</th>
205
+								<th>增发</th>
206
+								<th>包装规格</th>
207
+	              <th>发药箱数</th>
208
+	              <th>实发数量</th>
209
+	              <th>计算后库存</th>
210
+	            </tr>
211
+	          </thead>
212
+	          <tbody>
213
+	            <tr *ngFor="let data of infoData">
214
+	              <td>{{ data['0']}}</td>
215
+								<td>{{ data['1']}}</td>
216
+								<td>{{ data['2']}}</td>
217
+								<td>{{ data['3']}}</td>
218
+								<td>{{ data['4']}}</td>
219
+	              <td>{{ data['5'] }}</td>
220
+	              <td>{{ data['6'] }}</td>
221
+								<td>{{ data['7'] }}</td>
222
+								<td>{{ data['8'] }}</td>
223
+								<td>{{ data['9'] }}</td>
224
+	            </tr>
225
+	          </tbody>
226
+	        </nz-table>
227
+	      </div>
228
+	    </overlay-scrollbars>
229
+	    <div class="display_flex justify-content_flex-center">
230
+	      <button class="btn" nz-button nzType="primary" (click)="hideInfoModal()">知道了</button>
231
+	    </div>
232
+	  </div>
233
+	</div>
234
+	
128 235
   <!-- 打印 -->
129 236
   <div id="report" style="display: none">
130 237
 		<div class="monad" *ngFor="let item of printData"
@@ -167,14 +274,21 @@
167 274
 					justify-content: center;
168 275
 					flex-wrap: wrap;
169 276
 					border-right: 1px solid #e7e7e7;
170
-					border-bottom: 1px solid #e7e7e7;">包装规格</div>
277
+					border-bottom: 1px solid #e7e7e7;">15日消耗</div>
171 278
 					
172
-					<div style="width: 10%;display: flex;font-size: 12px;
279
+					<div style="width: 8%;display: flex;font-size: 12px;
280
+					align-items: center;
281
+					justify-content: center;
282
+					flex-wrap: wrap;
283
+					border-right: 1px solid #e7e7e7;
284
+					border-bottom: 1px solid #e7e7e7;">包规</div>
285
+					
286
+					<div style="width: 8%;display: flex;font-size: 12px;
173 287
 					align-items: center;
174 288
 					justify-content: center;
175 289
 					flex-wrap: wrap;
176 290
 					border-right: 1px solid #e7e7e7;
177
-					border-bottom: 1px solid #e7e7e7;">实际消耗</div>
291
+					border-bottom: 1px solid #e7e7e7;">实消</div>
178 292
 					
179 293
 					<div style="width: 10%;display: flex;font-size: 12px;
180 294
 					align-items: center;
@@ -187,7 +301,6 @@
187 301
 					align-items: center;
188 302
 					justify-content: center;
189 303
 					flex-wrap: wrap;
190
-					border-right: 1px solid #e7e7e7;
191 304
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
192 305
 					
193 306
 				</div>
@@ -211,9 +324,16 @@
211 324
 					justify-content: center;
212 325
 					flex-wrap: wrap;
213 326
 					border-right: 1px solid #e7e7e7;
327
+					border-bottom: 1px solid #e7e7e7;">{{data.fifteenExpendCount}}</div>
328
+					
329
+					<div style="width: 8%;display: flex;font-size: 12px;
330
+					align-items: center;
331
+					justify-content: center;
332
+					flex-wrap: wrap;
333
+					border-right: 1px solid #e7e7e7;
214 334
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.packingSpecs }}</div>
215 335
 					
216
-					<div style="width: 10%;display: flex;font-size: 12px;
336
+					<div style="width: 8%;display: flex;font-size: 12px;
217 337
 					align-items: center;
218 338
 					justify-content: center;
219 339
 					flex-wrap: wrap;
@@ -231,7 +351,6 @@
231 351
 					align-items: center;
232 352
 					justify-content: center;
233 353
 					flex-wrap: wrap;
234
-					border-right: 1px solid #e7e7e7;
235 354
 					border-bottom: 1px solid #e7e7e7;">
236 355
 					<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
237 356
 						{{ data.giveOutType.value==1 ? data.actualCount :data.cartonNum }}
@@ -243,6 +362,102 @@
243 362
 				</div>
244 363
 			</div>
245 364
 		</div>
365
+		
366
+		<div class="monad" 
367
+				style="padding: 10px;
368
+				border: 1px solid #e7e7e7;
369
+				border-radius: 5px;margin-bottom: 40px;">
370
+			<div class="monad-title" 
371
+				style="text-align: center;
372
+				font-size: 18px;
373
+				border-bottom: 1px solid #e7e7e7;
374
+				padding-bottom: 10px;">
375
+				大输液批次消耗汇总单
376
+			</div>
377
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
378
+				<div style="margin-right: 15px;" *ngIf="printData.length">日期:{{printData[0].createTime|date:'yyyy-MM-dd HH:mm'}}</div>
379
+				<div style="margin-right: 15px;">批次号:{{batchNo}}</div>
380
+			</div>
381
+			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
382
+				<div class="thead" style="display: flex;">
383
+					<div style="width: 40%;display: flex;font-size: 12px;
384
+					align-items: center;
385
+					justify-content: center;
386
+					flex-wrap: wrap;
387
+					border-right: 1px solid #e7e7e7;
388
+					border-bottom: 1px solid #e7e7e7;">药品名称</div>
389
+					
390
+					<div style="width: 20%;display: flex;font-size: 12px;
391
+					align-items: center;
392
+					justify-content: center;
393
+					flex-wrap: wrap;
394
+					border-right: 1px solid #e7e7e7;
395
+					border-bottom: 1px solid #e7e7e7;">药品规格</div>
396
+					
397
+					<div style="width: 13%;display: flex;font-size: 12px;
398
+					align-items: center;
399
+					justify-content: center;
400
+					flex-wrap: wrap;
401
+					border-right: 1px solid #e7e7e7;
402
+					border-bottom: 1px solid #e7e7e7;">包装规格</div>
403
+					
404
+					<div style="width: 13%;display: flex;font-size: 12px;
405
+					align-items: center;
406
+					justify-content: center;
407
+					flex-wrap: wrap;
408
+					border-right: 1px solid #e7e7e7;
409
+					border-bottom: 1px solid #e7e7e7;">发药总量</div>
410
+
411
+					<div style="width: 14%;display: flex;font-size: 12px;
412
+					align-items: center;
413
+					justify-content: center;
414
+					flex-wrap: wrap;
415
+					border-bottom: 1px solid #e7e7e7;">箱数合计</div>
416
+					
417
+				</div>
418
+				<div *ngFor="let data of summaryDataList" style="display: flex;">
419
+					<div style="width: 40%;display: flex;font-size: 12px;
420
+					align-items: center;
421
+					justify-content: center;
422
+					flex-wrap: wrap;
423
+					border-right: 1px solid #e7e7e7;
424
+					border-bottom: 1px solid #e7e7e7;">{{data.drugsInfoDTO.drugName}}</div>
425
+					
426
+					<div style="width: 20%;display: flex;font-size: 12px;
427
+					align-items: center;
428
+					justify-content: center;
429
+					flex-wrap: wrap;
430
+					border-right: 1px solid #e7e7e7;
431
+					border-bottom: 1px solid #e7e7e7;">{{data.drugsInfoDTO.specs}}</div>
432
+					
433
+					<div style="width: 13%;display: flex;font-size: 12px;
434
+					align-items: center;
435
+					justify-content: center;
436
+					flex-wrap: wrap;
437
+					border-right: 1px solid #e7e7e7;
438
+					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.packingSpecs }}</div>
439
+					
440
+					<div style="width: 13%;display: flex;font-size: 12px;
441
+					align-items: center;
442
+					justify-content: center;
443
+					flex-wrap: wrap;
444
+					border-right: 1px solid #e7e7e7;
445
+					border-bottom: 1px solid #e7e7e7;">{{data.actualCount}}</div>
446
+					
447
+					<div style="width: 14%;display: flex;font-size: 12px;
448
+					align-items: center;
449
+					justify-content: center;
450
+					flex-wrap: wrap;
451
+					border-bottom: 1px solid #e7e7e7;">
452
+					{{data.cartonNum}} 箱 &nbsp;
453
+					<span *ngIf="data.afterInventory>0">
454
+						{{data.afterInventory}} {{data.drugsInfoDTO.unit}}
455
+					</span>
456
+					</div>
457
+					
458
+				</div>
459
+			</div>
460
+		</div>
246 461
   </div>
247 462
 
248 463
 </div>

+ 12 - 1
src/app/views/dispensing-batch/dispensing-batch.component.less

@@ -24,6 +24,9 @@
24 24
   }
25 25
 }
26 26
 
27
+.autoUpdate{
28
+	text-align: right;
29
+}
27 30
 .save {
28 31
   position: fixed;
29 32
   left: 0;
@@ -32,7 +35,15 @@
32 35
   height: 100%;
33 36
   background: rgba(0, 0, 0, 0.4);
34 37
   z-index: 99;
35
-
38
+	.modalBody-ga{
39
+		width: 80% !important;
40
+		.list-template__searchBox{
41
+			margin-top: 10px;
42
+		}
43
+		.ant-select{
44
+			width: 20%;
45
+		}
46
+	}
36 47
   .modalBody {
37 48
     width: 350px;
38 49
     background: #fff;

+ 177 - 37
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -1,4 +1,4 @@
1
-import { Component, OnInit, ViewChild } from "@angular/core";
1
+import { Component, OnInit, ViewChild, OnDestroy } from "@angular/core";
2 2
 import { ActivatedRoute, Router } from "@angular/router";
3 3
 import {
4 4
   FormBuilder,
@@ -22,7 +22,8 @@ import { HttpRequest, HttpResponse, HttpClient } from '@angular/common/http';
22 22
   templateUrl: "./dispensing-batch.component.html",
23 23
   styleUrls: ["./dispensing-batch.component.less"],
24 24
 })
25
-export class DispensingBatchComponent implements OnInit {
25
+
26
+export class DispensingBatchComponent implements OnInit, OnDestroy {
26 27
   @ViewChild("osComponentRef1", {
27 28
     read: OverlayScrollbarsComponent,
28 29
     static: false,
@@ -37,17 +38,22 @@ export class DispensingBatchComponent implements OnInit {
37 38
     private tool: ToolService,
38 39
     private http: HttpClient,
39 40
   ) {}
40
-
41
+	
42
+	ngOnDestroy() {
43
+		clearInterval(this.logTimer)
44
+	}
45
+	
41 46
   ngOnInit() {
42
-    this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
43
-			this.isDeptLoading = true;
44
-			this.getDeparts(e);
45
-    });
47
+		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
48
+			this.getAddDeparts(e);
49
+		});
46 50
 		this.hosId = this.tool.getCurrentHospital().id;
47 51
     this.coopBtns = this.tool.initCoopBtns(this.route);
48 52
     this.initForm();
53
+		this.getAddDeparts('')
49 54
     this.getAllHospital();
50 55
     this.getDeptHandoverType();
56
+		this.autoUpdate(true)
51 57
   }
52 58
   listOfData: any[] = []; //表格数据
53 59
   promptContent: string; //操作提示框提示信息
@@ -59,6 +65,7 @@ export class DispensingBatchComponent implements OnInit {
59 65
   validateForm: FormGroup; //新增/编辑表单
60 66
   coopId: number; //表格中执行操作的id
61 67
   department: number; //所属科室
68
+	infoDepartment: number; //所属科室
62 69
 	hosId: number; 
63 70
 	dateRange;//时间
64 71
 	loadAllConsumeDept: boolean = true;//是否加载所有消耗科室
@@ -77,7 +84,8 @@ export class DispensingBatchComponent implements OnInit {
77 84
   deptsPhoneId = 1; //科室电话自增id
78 85
   allParentdepart: any = []; //所有的父级科室列表
79 86
   hospitals1: any = []; //科室列表(搜索)
80
-	rowData: object = {}; //打印选择列表
87
+	addHospitals: any = [];
88
+	rowData: any = null; //打印选择列表
81 89
 	editModal:boolean = false; //编辑时弹框
82 90
   searchParentDeptSubject = new Subject();
83 91
   // 初始化增删改按钮
@@ -89,6 +97,7 @@ export class DispensingBatchComponent implements OnInit {
89 97
   //搜索父级科室
90 98
 	isDeptLoading = false;
91 99
   changeInp(e) {
100
+		this.isDeptLoading = true;
92 101
     this.searchParentDeptSubject.next(e);
93 102
   }
94 103
   // 配送建单
@@ -105,6 +114,24 @@ export class DispensingBatchComponent implements OnInit {
105 114
     this.editModal = false;
106 115
   }
107 116
 	
117
+	// 30s倒计时
118
+	logTimer = null; //定时器
119
+	logTime = 0; //自动刷新秒数
120
+	logTimeConst = 30; //自动刷新秒数
121
+	autoUpdate(flag = true) {
122
+	  if (flag) {
123
+	    this.logTime = this.logTimeConst;
124
+	  }
125
+	  clearInterval(this.logTimer);
126
+	  this.logTimer = setInterval(() => {
127
+	    this.logTime--;
128
+	    if (this.logTime === 0) {
129
+	      this.logTime = this.logTimeConst;
130
+				this.getList()
131
+	    }
132
+	  }, 1000);
133
+	}
134
+	
108 135
   // 编辑保存
109 136
   confirmDel1() {
110 137
     var that = this;
@@ -117,7 +144,7 @@ export class DispensingBatchComponent implements OnInit {
117 144
 			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
118 145
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
119 146
 			hosId:this.hosId,
120
-			pharmacy:this.validateForm.value.department,
147
+			pharmacy:this.validateForm.value.addDepartment,
121 148
 			id:that.coopId,
122 149
 			loadAllConsumeDept:this.validateForm.value.loadAllConsumeDept?1:0
123 150
     };
@@ -205,40 +232,50 @@ export class DispensingBatchComponent implements OnInit {
205 232
 	}
206 233
 	
207 234
 	// 获取所有科室
208
-  getDeparts(dept) {
209
-    var that = this;
210
-    let data = {
211
-      department: {
212
-        dept,
213
-        hospital: {
214
-          id: this.hosId
215
-        },
235
+  getDeparts() {
236
+		let data = {
237
+		  batchId:this.rowData.id
238
+		};
239
+		this.mainService
240
+		  .getConsumeDept(data)
241
+		  .subscribe((res) => {
242
+				this.isDeptLoading = false;
243
+				this.hospitals1 = res.data
244
+		  });
245
+  }
246
+	
247
+	// 获取药房科室
248
+	getAddDeparts(dept) {
249
+		var that = this;
250
+		let data = {
251
+			department: {
252
+				dept,
253
+				hospital: {
254
+					id: this.hosId
255
+				},
216 256
 				type:{
217 257
 					id:''
218 258
 				}
219
-      },
220
-      idx: 0,
221
-      sum: 20,
222
-    };
259
+			},
260
+			idx: 0,
261
+			sum: 20,
262
+		};
223 263
 		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
224
-		  let typeData = res.find(i=>i.value=='pharmacyRoom');
264
+			let typeData = res.find(i=>i.value=='pharmacyRoom');
225 265
 			if(typeData){
226 266
 				data.department.type.id = typeData.id
227 267
 			}
228 268
 			that.mainService
229
-			  .getFetchDataList("data", "department", data)
230
-			  .subscribe((data) => {
231
-					setTimeout(_=>{
232
-						this.hospitals1 = data.list
233
-						that.isDeptLoading = false;
234
-					},500)
235
-			  });
269
+				.getFetchDataList("data", "department", data)
270
+				.subscribe((data) => {
271
+					this.addHospitals = data.list
272
+					that.isDeptLoading = false;
273
+				});
236 274
 		});
237
-  }
238
-	
275
+	}
276
+		
239 277
   // 获取所有院区
240 278
   getAllHospital() {
241
-		this.getDeparts('')
242 279
     this.getList();
243 280
   }
244 281
 
@@ -275,7 +312,7 @@ export class DispensingBatchComponent implements OnInit {
275 312
 		.subscribe((result) => {
276 313
 			if (result.status == 200) {
277 314
 				let data = result.list[0] || {};
278
-				this.validateForm.controls.department.setValue(data.pharmacyDept || '');
315
+				this.validateForm.controls.addDepartment.setValue(data.pharmacyDept || '');
279 316
 				this.add = true;
280 317
 				this.modal = true;
281 318
 				this.isAddDeptsPhone = true;
@@ -299,7 +336,7 @@ export class DispensingBatchComponent implements OnInit {
299 336
   initForm() {
300 337
     this.validateForm = this.fb.group({
301 338
       dispensingTime: [null, [Validators.required]],
302
-      department: [null, [Validators.required]],
339
+      addDepartment: [null, [Validators.required]],
303 340
 			loadAllConsumeDept: [true,[]]
304 341
     });
305 342
 		let date = new Date();
@@ -320,7 +357,7 @@ export class DispensingBatchComponent implements OnInit {
320 357
 			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
321 358
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
322 359
 			hosId:this.hosId,
323
-			pharmacy:this.validateForm.value.department,
360
+			pharmacy:this.validateForm.value.addDepartment,
324 361
 			loadAllConsumeDept:this.validateForm.value.loadAllConsumeDept?1:0
325 362
     };
326 363
   
@@ -350,7 +387,7 @@ export class DispensingBatchComponent implements OnInit {
350 387
     this.add = false;
351 388
     this.coopId = data.id;
352 389
     this.coopItem = data;
353
-    this.validateForm.controls.department.setValue(data.pharmacy);
390
+    this.validateForm.controls.addDepartment.setValue(data.pharmacy);
354 391
     this.validateForm.controls.dispensingTime.setValue([data.startTime,data.endTime]);
355 392
 		if(data.loadAllConsumeDept==1){
356 393
 			this.validateForm.controls.loadAllConsumeDept.setValue(true);
@@ -411,7 +448,106 @@ export class DispensingBatchComponent implements OnInit {
411 448
         }
412 449
       });
413 450
   }
414
-
451
+	
452
+	// 发药总量
453
+	grossModal:boolean = false;
454
+	grossLoading:boolean = false;
455
+	viewData:any = [];
456
+	dispensingGross(e,data){
457
+		this.grossModal = true
458
+		this.grossLoading = true
459
+		this.mainService
460
+		  .drugsGross(data.id)
461
+		  .subscribe((res:any) => {
462
+		    this.grossLoading = false;
463
+				this.viewData = res.data
464
+		  });
465
+	}
466
+	
467
+	// 关闭发药总量
468
+	hideGrossModal(){
469
+		this.grossModal = false
470
+	}
471
+	
472
+	// 发药信息
473
+	infoModal:boolean = false;
474
+	infoLoading:boolean = false;
475
+	infoData:any = [];
476
+	dispensingInfo(e,data){
477
+		this.rowData = data
478
+		this.getDeparts()
479
+		this.infoModal = true
480
+		this.infoLoading = true
481
+		this.mainService
482
+		  .drugsInfo({
483
+				batchId:data.id,
484
+				dataType:'batchDispensingMedicine'
485
+			}).subscribe((res:any) => {
486
+		    this.infoLoading = false;
487
+				this.infoData = res.list
488
+		  });
489
+	}
490
+	
491
+	// 关闭发药信息
492
+	hideInfoModal(){
493
+		this.infoModal = false
494
+	}
495
+	// 发药信息搜索
496
+	searchInfo(){
497
+		this.getInfo()
498
+	}
499
+	
500
+	getInfo(){
501
+		this.infoLoading = true
502
+		this.mainService
503
+		  .drugsInfo({
504
+				deptId:this.infoDepartment,
505
+				batchId:this.rowData.id,
506
+				dataType:'batchDispensingMedicine'
507
+			}).subscribe((res:any) => {
508
+		    this.infoLoading = false;
509
+				this.infoData = res.list
510
+		  });
511
+	}
512
+	
513
+	// 发药信息重置
514
+	resetInfo(){
515
+		this.infoDepartment = null
516
+		this.getInfo()
517
+	}
518
+	
519
+	// 导出
520
+	maskFlag:any = null;
521
+	exportPc(e,data){
522
+		this.maskFlag = this.message.loading("正在导出..", {
523
+		  nzDuration: 0,
524
+		}).messageId;
525
+		this.mainService.exportReport("drugsBatch", {
526
+			batchId:data.id
527
+		}).subscribe(
528
+		  (res:any) => {
529
+		    this.message.remove(this.maskFlag);
530
+		    this.maskFlag = false;
531
+		    this.message.success('导出成功');
532
+		    var file = new Blob([res], {
533
+		      type: "application/vnd.ms-excel",
534
+		    });
535
+		    var fileURL = URL.createObjectURL(file);
536
+		    var a = document.createElement("a");
537
+		    a.href = fileURL;
538
+		    a.target = "_blank";
539
+		    a.download = `发药批次数据-${data.batchNo}.xls`;
540
+		    document.body.appendChild(a);
541
+		    a.click();
542
+		  },
543
+		  (err) => {
544
+		    this.message.remove(this.maskFlag);
545
+		    this.maskFlag = false;
546
+		    this.message.error('导出失败');
547
+		  }
548
+		);
549
+	}
550
+	
415 551
   // 查看
416 552
   detail(e, data) {
417 553
     e.stopPropagation();
@@ -420,6 +556,8 @@ export class DispensingBatchComponent implements OnInit {
420 556
 
421 557
 	// 发药并打印
422 558
 	printData = []; 
559
+	summaryDataList = [];
560
+	batchNo:any = null;
423 561
 	print(e, data, id){
424 562
 		this.rowData = data
425 563
 		e.stopPropagation();
@@ -428,7 +566,9 @@ export class DispensingBatchComponent implements OnInit {
428 566
 		that.mainService
429 567
 		  .transfusionPrint("drugsBatch", id)
430 568
 		  .subscribe((res) => {
569
+				this.batchNo = res.data.batchNo
431 570
 				let arr = res.data.drugsListDTOS;
571
+				this.summaryDataList = res.data.summaryDataList;
432 572
 				for(let i of arr){
433 573
 					for(let t of i.drugsConfigureDTOS){
434 574
 						t.deptName = i.pharmacyDTO?i.pharmacyDTO.dept:'-'

+ 11 - 9
src/app/views/dispensing-detail/dispensing-detail.component.html

@@ -10,15 +10,16 @@
10 10
         <thead>
11 11
           <tr class="thead">
12 12
             <th nzWidth="25%">药品名称</th>
13
-            <th nzWidth="16%">规格</th>
14
-						<th nzWidth="8%">消耗量</th>
15
-						<th nzWidth="6%">原库存</th>
16
-						<th nzWidth="8%">包装规格</th>
17
-						<th nzWidth="8%">发药箱数</th>
18
-						<th nzWidth="5%">实发</th>
19
-            <th nzWidth="6%">新库存</th>
20
-						<th nzWidth="5%">增减</th>
21
-            <th nzWidth="13%">操作</th>
13
+            <th>规格</th>
14
+						<th>实消</th>
15
+						<th>15日消耗</th>
16
+						<th>原库存</th>
17
+						<th>包规</th>
18
+						<th>发药箱数</th>
19
+						<th>实发</th>
20
+            <th>新库存</th>
21
+						<th>增减</th>
22
+            <th>操作</th>
22 23
           </tr>
23 24
         </thead>
24 25
         <tbody>
@@ -29,6 +30,7 @@
29 30
 						</td>
30 31
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
31 32
             <td>{{ data.expendCount||'0' }}</td>
33
+						<td>{{ data.fifteenExpendCount||'0' }}</td>
32 34
             <td>{{ data.formerInventory || '0' }}</td>
33 35
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
34 36
 						<td>{{ data.cartonNum || 0 }}</td> 

+ 17 - 0
src/app/views/dispensing-info-detail/dispensing-info-detail-routing.module.ts

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

+ 374 - 0
src/app/views/dispensing-info-detail/dispensing-info-detail.component.html

@@ -0,0 +1,374 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzLg='18' class="list-template__searchBox">
5
+        <div class="list-template__searchItem searchItem-100">
6
+          <span class="label">发药时间区间:</span>
7
+          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd HH:mm:ss"
8
+					(ngModelChange)="changeDate($event)"></nz-range-picker>
9
+        </div>
10
+				<div class="list-template__searchItem">
11
+				  <span class="label">科室名称:</span>
12
+				  <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'dept')" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择申请科室" [(ngModel)]="department">
13
+				    <ng-container *ngFor="let option of hospitals1">
14
+				      <nz-option *ngIf="!loading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
15
+				    </ng-container>
16
+				    <nz-option *ngIf="loading" nzDisabled nzCustomContent>
17
+				      <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+				    </nz-option>
19
+				  </nz-select>
20
+				</div>
21
+				<div class="list-template__searchItem">
22
+				  <span class="label">药品名称:</span>
23
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'commodity')" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择商品名称" [(ngModel)]="commodity">
24
+					  <ng-container *ngFor="let option of commodityData">
25
+					    <nz-option *ngIf="!loading" [nzLabel]="option.drugName + '('+option.specs+')'" [nzValue]="option.id"></nz-option>
26
+					  </ng-container>
27
+					  <nz-option *ngIf="loading" nzDisabled nzCustomContent>
28
+					    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
29
+					  </nz-option>
30
+					</nz-select>
31
+				</div>
32
+				
33
+				<div class="list-template__searchItem">
34
+				  <span class="label">批次号:</span>
35
+					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'batch')" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择批次号" [(ngModel)]="batch">
36
+					  <ng-container *ngFor="let option of batchData">
37
+					    <nz-option *ngIf="!loading" [nzLabel]="option.batchNo" [nzValue]="option.id"></nz-option>
38
+					  </ng-container>
39
+					  <nz-option *ngIf="loading" nzDisabled nzCustomContent>
40
+					    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
41
+					  </nz-option>
42
+					</nz-select>
43
+				</div>
44
+      </div>
45
+      <div nz-col nzLg="6" class="list-template__btns">
46
+        <button class="btn default" (click)='search()'>搜索</button>
47
+        <button class="btn default ml8" (click)='reset()'>重置</button>
48
+				<button *ngIf="coopBtns.export" class="btn default ml8" (click)='excelExport()'>导出</button>
49
+      </div>
50
+    </div>
51
+    <div class="list-template__bottom">
52
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
53
+        [nzLoading]="loading1">
54
+        <thead>
55
+          <tr class="thead">
56
+            <th>批次号|科室</th>
57
+						<th>商品名称|规格</th>
58
+            <th>消耗量+增发+原库存=实发量</th>
59
+            <th>包装规格</th>
60
+            <th>发药箱数</th>
61
+            <th>新库存</th>
62
+            <th>发药日期</th>
63
+          </tr>
64
+        </thead>
65
+        <tbody v-if="listOfData && listOfData.length>0">
66
+          <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
67
+            <td>
68
+							<div>{{ data['0'] }}</div>
69
+							<div>{{ data['1'] }}</div>
70
+						</td>
71
+						<td>
72
+							<div>{{ data['2']}}</div>
73
+							<div>{{ data['3']}}</div>
74
+						</td>
75
+            <td>{{ data['4']}} + {{data['5']}} +
76
+						 {{data['6'] }} = {{data.num}}</td>
77
+						 
78
+            <td>{{ data['7']}}</td>
79
+            <td>{{ data['8']==0 ? '-' : data['8']}}</td>
80
+						<td>{{ data['9']}}</td>
81
+						<td>{{ data['10']}}</td>
82
+          </tr>
83
+        </tbody>
84
+      </nz-table>
85
+      <div class="list-template__pagination">
86
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
87
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
88
+        </nz-pagination>
89
+      </div>
90
+    </div>
91
+  </div>
92
+
93
+  <!-- 新增/编辑模态框 -->
94
+  <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
95
+    <div class="modalBody">
96
+      <div class="title">科室发药单-查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
97
+      </div>
98
+      <overlay-scrollbars #osComponentRef1 class="content">
99
+        <div class="list-template__bottom">
100
+          <nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
101
+            [nzLoading]="loading1">
102
+            <thead>
103
+              <tr class="thead">
104
+								<th nzWidth="10%">药品标识</th>
105
+                <th nzWidth="10%">药品名称</th>
106
+                <th nzWidth="10%">规格</th>
107
+                <th nzWidth="10%">消耗数量</th>
108
+                <th nzWidth="10%">实发数量</th>
109
+                <th nzWidth="10%">包装规格</th>
110
+                <th nzWidth="10%">发药药箱</th>
111
+                <th nzWidth="10%">原库存数</th>
112
+                <th nzWidth="10%">计算后库存</th>
113
+        				<th nzWidth="10%">增减</th>
114
+              </tr>
115
+            </thead>
116
+            <tbody>
117
+              <tr *ngFor="let data of viewData">
118
+								<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'无' }}</td>
119
+                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'无' }}</td>
120
+                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'无' }}</td>
121
+                <td>{{ data.expendCount||'0' }}</td>
122
+                <td>{{ data.actualCount||'0' }}</td>
123
+                <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
124
+                <td>{{ data.cartonNum || '0' }}</td>
125
+                <td>{{ data.formerInventory || '0' }}</td>
126
+                <td>{{ data.afterInventory || '0'}}</td>
127
+        				<td>{{ data.addSub || '0' }}</td>
128
+              </tr>
129
+            </tbody>
130
+          </nz-table>
131
+        </div>
132
+      </overlay-scrollbars>
133
+      <div class="display_flex justify-content_flex-center">
134
+        <button class="btn" nz-button nzType="primary" (click)="hideModal()">知道了</button>
135
+      </div>
136
+    </div>
137
+  </div>
138
+
139
+  <!-- 打印 -->
140
+  <div id="report" style="display: none;">
141
+		<div class="monad" 
142
+				*ngIf="rowData"
143
+				style="padding: 10px;
144
+				border: 1px solid #e7e7e7;
145
+				border-radius: 5px;">
146
+			<div class="monad-title" 
147
+				style="text-align: center;
148
+				font-size: 18px;
149
+				border-bottom: 1px solid #e7e7e7;
150
+				padding-bottom: 10px;">
151
+				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
152
+			</div>
153
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
154
+				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
155
+				<div style="margin-right: 15px;">批次号:{{rowData.batch?rowData.batch.batchNo:'-'}}</div>
156
+				<div style="margin-right: 15px;">单号:{{rowData.packingNo}}</div>
157
+			</div>
158
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
159
+				<div style="margin-right: 15px;">取药药房:{{rowData.pharmacyDTO?rowData.pharmacyDTO.dept:'-'}}</div>
160
+			</div>
161
+			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
162
+				<div class="thead" style="display: flex;">
163
+					<div style="width: 40%;display: flex;font-size: 12px;
164
+					align-items: center;
165
+					justify-content: center;
166
+					flex-wrap: wrap;
167
+					border-right: 1px solid #e7e7e7;
168
+					border-bottom: 1px solid #e7e7e7;">药品名称</div>
169
+					
170
+					<div style="width: 20%;display: flex;font-size: 12px;
171
+					align-items: center;
172
+					justify-content: center;
173
+					flex-wrap: wrap;
174
+					border-right: 1px solid #e7e7e7;
175
+					border-bottom: 1px solid #e7e7e7;">规格</div>
176
+					
177
+					<div style="width: 10%;display: flex;font-size: 12px;
178
+					align-items: center;
179
+					justify-content: center;
180
+					flex-wrap: wrap;
181
+					border-right: 1px solid #e7e7e7;
182
+					border-bottom: 1px solid #e7e7e7;">15日消耗</div>
183
+					
184
+					<div style="width: 8%;display: flex;font-size: 12px;
185
+					align-items: center;
186
+					justify-content: center;
187
+					flex-wrap: wrap;
188
+					border-right: 1px solid #e7e7e7;
189
+					border-bottom: 1px solid #e7e7e7;">包规</div>
190
+					
191
+					<div style="width: 8%;display: flex;font-size: 12px;
192
+					align-items: center;
193
+					justify-content: center;
194
+					flex-wrap: wrap;
195
+					border-right: 1px solid #e7e7e7;
196
+					border-bottom: 1px solid #e7e7e7;">实消</div>
197
+					
198
+					<div style="width: 10%;display: flex;font-size: 12px;
199
+					align-items: center;
200
+					justify-content: center;
201
+					flex-wrap: wrap;
202
+					border-right: 1px solid #e7e7e7;
203
+					border-bottom: 1px solid #e7e7e7;">临时增发</div>
204
+					
205
+					<div style="width: 10%;display: flex;font-size: 12px;
206
+					align-items: center;
207
+					justify-content: center;
208
+					flex-wrap: wrap;
209
+					border-bottom: 1px solid #e7e7e7;">箱数</div>
210
+				</div>
211
+				<div *ngFor="let data of codes" style="display: flex;">
212
+					<div style="width: 40%;display: flex;font-size: 12px;
213
+					align-items: center;
214
+					justify-content: center;
215
+					flex-wrap: wrap;
216
+					border-right: 1px solid #e7e7e7;
217
+					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
218
+					
219
+					<div style="width: 20%;display: flex;font-size: 12px;
220
+					align-items: center;
221
+					justify-content: center;
222
+					flex-wrap: wrap;
223
+					border-right: 1px solid #e7e7e7;
224
+					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
225
+					
226
+					<div style="width: 10%;display: flex;font-size: 12px;
227
+					align-items: center;
228
+					justify-content: center;
229
+					flex-wrap: wrap;
230
+					border-right: 1px solid #e7e7e7;
231
+					border-bottom: 1px solid #e7e7e7;">15日消耗</div>
232
+					
233
+					<div style="width: 8%;display: flex;font-size: 12px;
234
+					align-items: center;
235
+					justify-content: center;
236
+					flex-wrap: wrap;
237
+					border-right: 1px solid #e7e7e7;
238
+					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.packingSpecs }}</div>
239
+					
240
+					<div style="width: 8%;display: flex;font-size: 12px;
241
+					align-items: center;
242
+					justify-content: center;
243
+					flex-wrap: wrap;
244
+					border-right: 1px solid #e7e7e7;
245
+					border-bottom: 1px solid #e7e7e7;">{{ data.expendCount }}</div>
246
+					
247
+					<div style="width: 10%;display: flex;font-size: 12px;
248
+					align-items: center;
249
+					justify-content: center;
250
+					flex-wrap: wrap;
251
+					border-right: 1px solid #e7e7e7;
252
+					border-bottom: 1px solid #e7e7e7;">{{ data.addSub || 0 }}</div>
253
+					
254
+					<div style="width: 10%;display: flex;font-size: 12px;
255
+					align-items: center;
256
+					justify-content: center;
257
+					flex-wrap: wrap;
258
+					border-bottom: 1px solid #e7e7e7;">
259
+						<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
260
+							{{ data.cartonNum }} {{data.giveOutType && data.giveOutType.value==1?
261
+							data.drugsInfoDTO.unit:'箱'}}
262
+						</span>
263
+					</div>
264
+					
265
+				</div>
266
+			</div>
267
+		</div>
268
+		
269
+		<div class="monad"
270
+				style="padding: 10px;
271
+				border: 1px solid #e7e7e7;
272
+				border-radius: 5px;margin-bottom: 40px;">
273
+			<div class="monad-title" 
274
+				style="text-align: center;
275
+				font-size: 18px;
276
+				border-bottom: 1px solid #e7e7e7;
277
+				padding-bottom: 10px;">
278
+				大输液批次消耗汇总单
279
+			</div>
280
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
281
+				<div style="margin-right: 15px;">日期:666</div>
282
+				<div style="margin-right: 15px;">批次号:777</div>
283
+			</div>
284
+			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
285
+				<div class="thead" style="display: flex;">
286
+					<div style="width: 40%;display: flex;font-size: 12px;
287
+					align-items: center;
288
+					justify-content: center;
289
+					flex-wrap: wrap;
290
+					border-right: 1px solid #e7e7e7;
291
+					border-bottom: 1px solid #e7e7e7;">药品名称</div>
292
+					
293
+					<div style="width: 20%;display: flex;font-size: 12px;
294
+					align-items: center;
295
+					justify-content: center;
296
+					flex-wrap: wrap;
297
+					border-right: 1px solid #e7e7e7;
298
+					border-bottom: 1px solid #e7e7e7;">药品规格</div>
299
+					
300
+					<div style="width: 13%;display: flex;font-size: 12px;
301
+					align-items: center;
302
+					justify-content: center;
303
+					flex-wrap: wrap;
304
+					border-right: 1px solid #e7e7e7;
305
+					border-bottom: 1px solid #e7e7e7;">包装规格</div>
306
+					
307
+					<div style="width: 13%;display: flex;font-size: 12px;
308
+					align-items: center;
309
+					justify-content: center;
310
+					flex-wrap: wrap;
311
+					border-right: 1px solid #e7e7e7;
312
+					border-bottom: 1px solid #e7e7e7;">发药总量</div>
313
+		
314
+					<div style="width: 14%;display: flex;font-size: 12px;
315
+					align-items: center;
316
+					justify-content: center;
317
+					flex-wrap: wrap;
318
+					border-bottom: 1px solid #e7e7e7;">箱数合计</div>
319
+					
320
+				</div>
321
+				<div style="display: flex;">
322
+					<div style="width: 40%;display: flex;font-size: 12px;
323
+					align-items: center;
324
+					justify-content: center;
325
+					flex-wrap: wrap;
326
+					border-right: 1px solid #e7e7e7;
327
+					border-bottom: 1px solid #e7e7e7;">葡萄胎</div>
328
+					
329
+					<div style="width: 20%;display: flex;font-size: 12px;
330
+					align-items: center;
331
+					justify-content: center;
332
+					flex-wrap: wrap;
333
+					border-right: 1px solid #e7e7e7;
334
+					border-bottom: 1px solid #e7e7e7;">100ml*1</div>
335
+					
336
+					<div style="width: 13%;display: flex;font-size: 12px;
337
+					align-items: center;
338
+					justify-content: center;
339
+					flex-wrap: wrap;
340
+					border-right: 1px solid #e7e7e7;
341
+					border-bottom: 1px solid #e7e7e7;">100</div>
342
+					
343
+					<div style="width: 13%;display: flex;font-size: 12px;
344
+					align-items: center;
345
+					justify-content: center;
346
+					flex-wrap: wrap;
347
+					border-right: 1px solid #e7e7e7;
348
+					border-bottom: 1px solid #e7e7e7;">200</div>
349
+					
350
+					
351
+					<div style="width: 14%;display: flex;font-size: 12px;
352
+					align-items: center;
353
+					justify-content: center;
354
+					flex-wrap: wrap;
355
+					border-bottom: 1px solid #e7e7e7;">
356
+					<span>
357
+						20箱
358
+					</span>
359
+					</div>
360
+					
361
+				</div>
362
+			</div>
363
+		</div>
364
+  </div>
365
+
366
+</div>
367
+<!-- 操作成功/失败提示框 -->
368
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
369
+  [info]="promptInfo"></app-prompt-modal>
370
+
371
+<!-- 查看详情 -->
372
+<router-outlet></router-outlet>
373
+<!-- 遮罩 -->
374
+<app-mask *ngIf="maskFlag"></app-mask>

+ 238 - 0
src/app/views/dispensing-info-detail/dispensing-info-detail.component.less

@@ -0,0 +1,238 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  .add-button {
4
+    margin: 0 auto 16px !important;
5
+  }
6
+  .targetDept {
7
+    overflow: hidden;
8
+    // width: 90px;
9
+    text-overflow: ellipsis;
10
+    white-space: nowrap;
11
+  }
12
+  .dynamic {
13
+    margin-bottom: 16px;
14
+    display: flex;
15
+    align-items: center;
16
+    input {
17
+      width: 90%;
18
+    }
19
+    i {
20
+      margin-left: 8px;
21
+      cursor: pointer;
22
+      font-size: 18px;
23
+    }
24
+  }
25
+}
26
+
27
+.searchItem-100{
28
+	.label{
29
+		width: 100px !important;
30
+	}
31
+}
32
+.save {
33
+  position: fixed;
34
+  left: 0;
35
+  top: 0;
36
+  width: 100%;
37
+  height: 100%;
38
+  background: rgba(0, 0, 0, 0.4);
39
+  z-index: 99;
40
+
41
+  .modalBody {
42
+    width: 350px;
43
+    background: #fff;
44
+    border-radius: 5px;
45
+    padding: 10px 20px;
46
+    color: #333;
47
+
48
+    .title {
49
+      width: 100%;
50
+      text-align: center;
51
+      font-size: 18px;
52
+      position: relative;
53
+
54
+      i {
55
+        position: absolute;
56
+        right: 0;
57
+        top: 0;
58
+        font-size: 20px;
59
+        color: #666;
60
+        cursor: pointer;
61
+        padding: 0 5px;
62
+      }
63
+    }
64
+
65
+    .content {
66
+      width: 100%;
67
+      height: 117px;
68
+      background: #f9fafb;
69
+      border: 1px solid #e5e9ed;
70
+      border-radius: 5px;
71
+      overflow: hidden;
72
+      margin-top: 12px;
73
+
74
+      div {
75
+        text-align: center;
76
+        margin: 0;
77
+
78
+        &.icon {
79
+          margin-top: 17px;
80
+
81
+          i {
82
+            color: #34b349;
83
+            font-size: 30px !important;
84
+
85
+            &.transport-wenhao {
86
+              color: #f5a523;
87
+            }
88
+
89
+            &.transport-shibai {
90
+              color: #ff3a52;
91
+            }
92
+          }
93
+        }
94
+
95
+        &.defeat {
96
+          color: #333;
97
+          font-size: 18px;
98
+        }
99
+
100
+        &:nth-child(3) {
101
+          font-size: 14px;
102
+          color: #666;
103
+        }
104
+      }
105
+    }
106
+
107
+    button {
108
+      margin-top: 10px;
109
+
110
+      &.btn {
111
+        margin-left: 8px;
112
+      }
113
+    }
114
+  }
115
+
116
+  // 新增
117
+  &.add {
118
+    .modalBody {
119
+      width: 80%;
120
+      height: auto;
121
+
122
+      .content {
123
+        width: 100%;
124
+        height: auto;
125
+        padding: 19px 14px 0 14px;
126
+        max-height: 500px;
127
+        overflow-y: auto;
128
+				
129
+				.list-template__bottom {
130
+				  background: #f9fafb;
131
+				  border: 1px solid #e5e9ed;
132
+				  border-radius: 8px;
133
+				  padding-bottom: 56px;
134
+				  position: relative;
135
+				  .list-template__nzTable {
136
+				    padding: 16px 16px 0;
137
+				
138
+				    .thead {
139
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
140
+				
141
+				      th {
142
+				        background: transparent;
143
+				        color: #fff;
144
+				        text-align: center;
145
+				      }
146
+				    }
147
+				
148
+				    .ant-table-body {
149
+				      border-bottom: 1px solid #e5e9ed;
150
+				    }
151
+				
152
+				    .ant-table-tbody {
153
+				      tr {
154
+				        text-align: center;
155
+				        color: #333;
156
+				
157
+				        td {
158
+				          border: none;
159
+				
160
+				          &.tab_hover:hover{
161
+				            text-decoration: underline;
162
+				            cursor: pointer;
163
+				          }
164
+				
165
+				          .coop {
166
+				            button{
167
+				              color: #333;
168
+				            }
169
+				            span,button {
170
+				              display: inline-block;
171
+				              padding: 0 8px;
172
+				              cursor: pointer;
173
+				              position: relative;
174
+				
175
+				              &::after {
176
+				                content: "|";
177
+				                position: absolute;
178
+				                top: 0;
179
+				                right: 0;
180
+				              }
181
+				
182
+				              &:hover,
183
+				              &:active {
184
+				                color: @primary-color;
185
+				              }
186
+				
187
+				              &:nth-last-child(1) {
188
+				                &::after {
189
+				                  content: "";
190
+				                }
191
+				              }
192
+				            }
193
+				          }
194
+				        }
195
+				      }
196
+				    }
197
+				  }
198
+				  .list-template__pagination {
199
+				    height: 56px;
200
+				    display: flex;
201
+				    align-items: center;
202
+				    position: absolute;
203
+				    right: 8px;
204
+				  }
205
+				}
206
+				
207
+        .addForm {
208
+          .ant-form-item {
209
+            margin-bottom: 14px;
210
+
211
+            .ant-form-item-label {
212
+              line-height: 14px;
213
+              text-align: left;
214
+            }
215
+          }
216
+        }
217
+
218
+        .editForm {
219
+          .ant-form-item {
220
+            margin-bottom: 14px;
221
+
222
+            .ant-form-item-label {
223
+              line-height: 0;
224
+              text-align: left;
225
+            }
226
+          }
227
+        }
228
+      }
229
+
230
+      button {
231
+        &:nth-child(1) {
232
+          margin-right: 20px;
233
+        }
234
+      }
235
+    }
236
+  }
237
+}
238
+

+ 262 - 0
src/app/views/dispensing-info-detail/dispensing-info-detail.component.ts

@@ -0,0 +1,262 @@
1
+import { Component, OnInit, ViewChild} from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import {
4
+  FormBuilder,
5
+  Validators,
6
+  FormGroup,
7
+  FormControl,
8
+} from "@angular/forms";
9
+
10
+import { MainService } from "../../services/main.service";
11
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
12
+import { ToolService } from "../../services/tool.service";
13
+import { format, startOfDay, endOfDay } from "date-fns";
14
+import { NzMessageService } from "ng-zorro-antd";
15
+import { Subject } from "rxjs";
16
+import { debounceTime, filter } from "rxjs/operators";
17
+import host from "../../../assets/js/http";
18
+import { HttpRequest, HttpResponse, HttpClient } from '@angular/common/http';
19
+
20
+@Component({
21
+  selector: "app-dispensing-info-detail",
22
+  templateUrl: "./dispensing-info-detail.component.html",
23
+  styleUrls: ["./dispensing-info-detail.component.less"],
24
+})
25
+export class DispensingInfoDetailComponent implements OnInit{
26
+  @ViewChild("osComponentRef1", {
27
+    read: OverlayScrollbarsComponent,
28
+    static: false,
29
+  })
30
+  osComponentRef1: OverlayScrollbarsComponent;
31
+  constructor(
32
+    private message: NzMessageService,
33
+    private fb: FormBuilder,
34
+    private route: ActivatedRoute,
35
+    private router: Router,
36
+    private mainService: MainService,
37
+    private tool: ToolService,
38
+    private http: HttpClient,
39
+  ) {}
40
+	
41
+  ngOnInit() {
42
+    this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
43
+     if(e[1]=='dept'){
44
+			 this.getDeparts(e[0]);
45
+		 }else if(e[1]=='commodity'){
46
+			 this.getCommodityData(e[0])
47
+		 }else{
48
+			 this.getBathData(e[0])
49
+		 }
50
+
51
+    });
52
+		this.hosId = this.tool.getCurrentHospital().id;
53
+    this.coopBtns = this.tool.initCoopBtns(this.route);
54
+    this.getAllquest();
55
+  }
56
+  listOfData: any[] = []; //表格数据
57
+  promptContent: string; //操作提示框提示信息
58
+  ifSuccess: boolean; //操作成功/失败
59
+  promptInfo: string; //操作结果提示信息
60
+  promptModalShow: boolean; //操作提示框是否展示
61
+  modal: boolean = false; //新增/编辑模态框
62
+  add: boolean; //true:新增;false:编辑
63
+  validateForm: FormGroup; //新增/编辑表单
64
+  coopId: number; //表格中执行操作的id
65
+  department: ""; //所属科室
66
+	batch:any = null;
67
+	commodity:any = null;
68
+	hosId: number; 
69
+	dateRange;//时间
70
+  batchNumber; //批次号
71
+  num; //编码
72
+  deptalias; //别名
73
+  type; //类型
74
+  deptHandoverType; //类型
75
+  pageIndex: number = 1; //页码
76
+  listLength: number = 10; //总条数
77
+  pageSize: number = 10; //每页条数
78
+  btnLoading: boolean = false; //确认按钮loading状态
79
+  printLoading: boolean = false; //批量打印按钮loading状态
80
+  deptPhones: any = []; //新添加的科室电话列表
81
+  isAddDeptsPhone = true; //添加新的科室电话是否禁用
82
+  deptsPhoneId = 1; //科室电话自增id
83
+  allParentdepart: any = []; //所有的父级科室列表
84
+  hospitals1: any = []; //科室列表(搜索)
85
+	rowData: object = {}; //打印选择列表
86
+  searchParentDeptSubject = new Subject();
87
+  // 初始化增删改按钮
88
+  coopBtns: any = {};
89
+	viewData: any = []; //科室单查看数据
90
+	commodityData:any = [];
91
+	batchData:any = [];
92
+	maskFlag:any = null;
93
+	
94
+	
95
+  // 导出
96
+  excelExport(){
97
+    this.maskFlag = this.message.loading("正在导出..", {
98
+      nzDuration: 0,
99
+    }).messageId;
100
+    this.mainService.exportReport("dispensingMedicine", {
101
+			deptId:this.department,
102
+			batchId:this.batch,
103
+			startTime: this.startDate,
104
+			endTime: this.endDate,
105
+			drugId:this.commodity,
106
+			hosId:this.hosId
107
+		}).subscribe(
108
+      (data) => {
109
+        this.message.remove(this.maskFlag);
110
+        this.maskFlag = false;
111
+        this.message.success('导出成功');
112
+        var file = new Blob([data], {
113
+          type: "application/vnd.ms-excel",
114
+        });
115
+        var fileURL = URL.createObjectURL(file);
116
+        var a = document.createElement("a");
117
+        a.href = fileURL;
118
+        a.target = "_blank";
119
+        a.download = "发药信息详情.xls";
120
+        document.body.appendChild(a);
121
+        a.click();
122
+      },
123
+      (err) => {
124
+        this.message.remove(this.maskFlag);
125
+        this.maskFlag = false;
126
+        this.message.error('导出失败');
127
+      }
128
+    );
129
+  }
130
+
131
+  //搜索父级科室
132
+	loading = false;
133
+  changeInp(e,type) {
134
+		this.loading = true
135
+    this.searchParentDeptSubject.next([e,type]);
136
+  }
137
+
138
+  // 搜索
139
+  search() {
140
+    this.pageIndex = 1;
141
+    this.getList();
142
+  }
143
+  // 重置
144
+  reset() {
145
+    this.pageIndex = 1;
146
+    this.department = null;
147
+		this.batch = null;
148
+		this.commodity = null;
149
+    this.batchNumber = "";
150
+		this.dateRange = [];
151
+		this.startDate = "";
152
+		this.endDate = "";
153
+    this.getList();
154
+  }
155
+  // 表格数据
156
+  loading1 = false;
157
+  getList() {
158
+    var that = this;
159
+    let data = {
160
+      idx: that.pageIndex - 1,
161
+      sum: that.pageSize,
162
+			deptId:this.department,
163
+			batchId:this.batch,
164
+			startTime: this.startDate,
165
+			endTime: this.endDate,
166
+			drugId:this.commodity,
167
+			hosId:this.hosId
168
+    };
169
+		this.loading1 = true;
170
+		this.mainService
171
+			.drugsInfo(data).subscribe((res:any) => {
172
+				this.loading1 = false;
173
+				for(let i of res.list){
174
+					i.num = i['4'] + i['5'] + i['6']
175
+				}
176
+				this.listOfData = res.list
177
+				that.listLength = res.totalNum;
178
+			});
179
+  }
180
+	
181
+	// 日期选择
182
+	startDate: string; //发起时间开始
183
+	endDate: string; //发起时间结束
184
+	changeDate(result?): void {
185
+	  if (result.length==0) {
186
+	    this.startDate = this.endDate = null;
187
+	    return;
188
+	  }
189
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
190
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
191
+		this.dateRange = [this.startDate,this.endDate]
192
+	}
193
+	
194
+	// 获取所有科室
195
+  getDeparts(dept) {
196
+    var that = this;
197
+    let data = {
198
+      department: {
199
+        dept,
200
+        hospital: {
201
+          id: this.hosId
202
+        },
203
+      },
204
+      idx: 0,
205
+      sum: 20,
206
+    };
207
+    that.mainService
208
+		.getFetchDataList("data", "department", data)
209
+		.subscribe((data) => {
210
+			this.loading = false
211
+			this.hospitals1 = data.list
212
+		});
213
+  }
214
+	
215
+	// 获取药品
216
+	getCommodityData(name) {
217
+	  let data = {
218
+	    drugsInfo: {
219
+	      drugName: name || "",
220
+	      hosId: this.hosId || "" ,
221
+	    	drugType:{
222
+	    		id:'20327'
223
+	    	}
224
+	    },
225
+	    idx: 0,
226
+	    sum: 10,
227
+	  };
228
+	  this.mainService
229
+		.getFetchDataList("data", "drugsInfo", data)
230
+		.subscribe((data) => {
231
+			this.loading = false
232
+			this.commodityData = data.list
233
+		});
234
+	}
235
+	
236
+	// 获取批次号
237
+	getBathData(name) {
238
+	  let data = {
239
+	    drugsBatch: {
240
+	    	batchNo:name,
241
+	    	hosId: this.hosId,
242
+				batchStatus:{
243
+					value:2
244
+				}
245
+	    },
246
+	    idx: 0,
247
+	    sum: 10,
248
+	  };
249
+	  this.mainService
250
+		.getFetchDataList("data", "drugsBatch", data)
251
+		.subscribe((data) => {
252
+			this.loading = false
253
+			this.batchData = data.list
254
+		});
255
+	}
256
+  getAllquest() {
257
+		this.getDeparts('')
258
+		this.getCommodityData('')
259
+		this.getBathData('')
260
+    this.getList();
261
+  }
262
+}

+ 19 - 0
src/app/views/dispensing-info-detail/dispensing-info-detail.module.ts

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

+ 1 - 1
src/app/views/drug-cloud/drug-cloud.component.html

@@ -17,7 +17,7 @@
17 17
           <span class="label">药品:</span>
18 18
 					<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event,'drug')" nzServerSearch nzShowSearch nzPlaceHolder="请选择药品" [(ngModel)]="drug">
19 19
 					  <ng-container *ngFor="let option of drugData">
20
-					    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.drugName" [nzValue]="option.id"></nz-option>
20
+					    <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.drugName + '('+option.specs+')'" [nzValue]="option.id"></nz-option>
21 21
 					  </ng-container>
22 22
 					  <nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
23 23
 					    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...

+ 8 - 0
src/app/views/hushijiandan/hushijiandan.component.html

@@ -566,6 +566,7 @@
566 566
                       nzSpan="8"
567 567
                       class="borderL alignC display_flex justify-content_flex-center align-items_center h100p"
568 568
                     >
569
+											<button *ngIf="surgeryWKOMsg.patientDTO && surgeryConfigs && surgeryConfigs.isPathologyForm == 1" nz-button nzType="primary" class="btn txtC mr8" (click)="pathologyAdd($event)">病理申请单</button>
569 570
                       <button *ngIf="surgeryWKOMsg.patientDTO && surgeryConfigs && surgeryConfigs.remandClinical == 1" nz-button nzType="primary" class="btn txtC mr8" (click)="sendWard($event, surgeryWKOMsg)">送回病房</button>
570 571
                       <button *ngIf="surgeryWKOMsg.patientDTO && surgeryConfigs && surgeryConfigs.remandRecovery == 1" nz-button nzType="primary" class="btn txtC" (click)="sendAwakeningRoom($event, surgeryWKOMsg)">送回苏醒间</button>
571 572
                     </div>
@@ -1665,6 +1666,7 @@
1665 1666
                             <!-- 【是否开启手术即将开始通知】开启 -->
1666 1667
                             <button class="btn1 mr8 mb8 mt8" (click)="pickUpPatient($event, item)" *ngIf="item.state && item.state.value == 3">一键接患者</button>
1667 1668
                             <!-- 手术状态是【手术中】,并且【是否开通送回病房】开启 -->
1669
+														<button *ngIf="item.patientDTO && surgeryConfigs && surgeryConfigs.isPathologyForm == 1" class="btn1 mr8 mb8 mt8" (click)="pathologyAddItem($event,item)">病理申请单</button>
1668 1670
                             <button class="btn1 mr8 mb8 mt8" (click)="sendWard($event, item)" *ngIf="item.patientDTO && surgeryConfigs && surgeryConfigs.remandClinical == 1 && item.state && item.state.value == 8">送回病房</button>
1669 1671
                             <!-- 手术状态是【手术中】,并且【是否开通送回苏醒室】开启 -->
1670 1672
                             <button class="btn1 mr8 mb8 mt8" (click)="sendAwakeningRoom($event, item)" *ngIf="item.patientDTO && surgeryConfigs && surgeryConfigs.remandRecovery == 1 && item.state && item.state.value == 8">送回苏醒间</button>
@@ -4021,3 +4023,9 @@
4021 4023
   </div>
4022 4024
 </div>
4023 4025
 <button ngxPrint printSectionId="print-section" #printBtn hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>
4026
+
4027
+<!-- 病理申请单 -->
4028
+<app-pathology-add *ngIf="pathologyModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" (pathologyCancel)="pathologyCancel($event)"></app-pathology-add>
4029
+
4030
+<!-- 病理详情 -->
4031
+<app-pathology-detail *ngIf="pathologyDetailModal" [surgeryId]="surgeryDataId" [patientId]="patientDataId" (pathologyCancel)="pathologyDetailCancel($event)"></app-pathology-detail>

+ 1 - 0
src/app/views/hushijiandan/hushijiandan.component.less

@@ -1625,6 +1625,7 @@
1625 1625
 
1626 1626
 .alignC {
1627 1627
   display: flex;
1628
+	flex-wrap: wrap;
1628 1629
   justify-content: center;
1629 1630
   align-items: center;
1630 1631
 }

+ 61 - 3
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -164,10 +164,13 @@ export class HushijiandanComponent implements OnInit {
164 164
   orderListTime = 0; //工单列表自动刷新秒数
165 165
   orderListTimeConst = 60; //工单列表自动刷新秒数
166 166
   deptDisplay; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
167
-
167
+	pathologyModal:boolean = false; //病理申请单
168
+	pathologyDetailModal:boolean = false; //病理详情
168 169
   // 初始化权限按钮
169 170
   coopBtns: any = {};
170
-
171
+	surgeryDataId: any; //手术id
172
+	patientDataId: any; //病人id
173
+	
171 174
   ngOnInit() {
172 175
     this.getCoopBtns();
173 176
     this.currentHospital = this.tool.getCurrentHospital();
@@ -308,7 +311,62 @@ export class HushijiandanComponent implements OnInit {
308 311
     this.coopBtns = coopBtns;
309 312
     console.log(this.coopBtns);
310 313
   }
311
-
314
+	
315
+	// 手术排程-病理申请单
316
+	pathologyAddItem(e,item){
317
+		this.surgeryDataId = item.id
318
+		this.patientDataId = item.patientDTO.id
319
+		let data = {
320
+			idx: 0,
321
+			sum: 9999,
322
+			pathologyForm: {
323
+				surgeryId: item.id || "",
324
+				patientId: item.patientDTO.id || "",
325
+				hosId: this.currentHospital.id || "" ,
326
+			},
327
+		};
328
+		this.mainService
329
+			.getFetchDataList("data", "pathologyForm", data)
330
+			.subscribe((data) => {
331
+				if(data.list[0].status.value==1){
332
+					this.pathologyModal = true
333
+				}else{
334
+					this.pathologyDetailModal = true
335
+				}
336
+			});
337
+	}
338
+	
339
+	// 病理申请单
340
+	pathologyAdd(e){
341
+		this.surgeryDataId = this.surgeryWKOMsg.id
342
+		this.patientDataId = this.surgeryWKOMsg.patientDTO.id
343
+		let data = {
344
+			idx: 0,
345
+			sum: 9999,
346
+			pathologyForm: {
347
+				surgeryId: this.surgeryWKOMsg.id || "",
348
+				patientId: this.surgeryWKOMsg.patientDTO.id || "",
349
+				hosId: this.currentHospital.id || "" ,
350
+			},
351
+		};
352
+		this.mainService
353
+		.getFetchDataList("data", "pathologyForm", data)
354
+		.subscribe((data) => {
355
+			if(data.list[0].status.value==1){
356
+				this.pathologyModal = true
357
+			}else{
358
+				this.pathologyDetailModal = true
359
+			}
360
+		});
361
+	}
362
+	
363
+	pathologyDetailCancel(){
364
+		this.pathologyDetailModal = false
365
+	}
366
+	
367
+	pathologyCancel(){
368
+		this.pathologyModal = false
369
+	}
312 370
   // 切换综合日志和一键报修
313 371
   smallTabs = [];
314 372
   smallTabId = 2; //默认显示一键报修

+ 24 - 0
src/app/views/inspect-statistics/inspect-statistics-routing.module.ts

@@ -0,0 +1,24 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { InspectStatisticsComponent } from './inspect-statistics.component';
4
+import { OrderDetailComponent } from '../../share/order-detail/order-detail.component';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: InspectStatisticsComponent,
10
+		children: [
11
+		  {
12
+		    // 查看详情
13
+		    path: 'orderDetail/:id',
14
+		    component: OrderDetailComponent,
15
+		  }
16
+		]
17
+  }
18
+];
19
+
20
+@NgModule({
21
+  imports: [RouterModule.forChild(routes)],
22
+  exports: [RouterModule]
23
+})
24
+export class InspectStatisticsRoutingModule { }

+ 90 - 0
src/app/views/inspect-statistics/inspect-statistics.component.html

@@ -0,0 +1,90 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl="18" class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">完成时间区间</span>:
7
+					<nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd HH:mm:ss"
8
+					(ngModelChange)="changeDate($event)"></nz-range-picker>
9
+        </div>
10
+      </div>
11
+      <div nz-col nzXl="6" class="list-template__btns">
12
+        <button nz-button class="btn default" (click)="search()">搜索</button>
13
+        <button nz-button class="btn default ml8" (click)="reset()">
14
+          重置
15
+        </button>
16
+				<button nz-button class="btn default ml8" (click)="excelExport()">
17
+				  导出
18
+				</button>
19
+      </div>
20
+    </div>
21
+    <div class="list-template__bottom">
22
+      <nz-table
23
+        class="list-template__nzTable"
24
+        [nzData]="listOfData"
25
+        nzSize="middle"
26
+        [nzShowPagination]="false"
27
+        [nzLoading]="loading1"
28
+      >
29
+        <thead>
30
+          <tr class="thead">
31
+						<th nzWidth="50px">序号</th>
32
+						<th>发起时间</th>
33
+						<th>完成时间</th>
34
+						<th>起点科室</th>
35
+						<th>目标科室</th>
36
+						<th nzWidth="30%">工单备注</th>
37
+						<th>患者住院号</th>
38
+						<th>姓名</th>
39
+						<th>转运人员</th>
40
+            <th nzWidth="70px">操作</th>
41
+          </tr>
42
+        </thead>
43
+        <tbody>
44
+          <tr *ngFor="let data of listOfData; let index = index">
45
+						<td>{{ index+(pageIndex-1) * pageSize + 1 }}</td>
46
+            <td>{{ data['1'] | date:'yyyy-MM-dd HH:mm:ss' }}</td>
47
+            <td>{{ data['2'] | date:'yyyy-MM-dd HH:mm:ss' }}</td>
48
+            <td>{{ data['3']}}</td>
49
+            <td>{{ data['4'] }}</td>
50
+            <td>{{ data['5'] }}</td>
51
+            <td>{{ data['6'] }}</td>
52
+            <td>{{ data['7'] }}</td>
53
+						<td>{{ data['8'] }}</td>
54
+            <td>
55
+              <div class="coop">
56
+                <span
57
+                  *ngIf="coopBtns.look"
58
+                  (click)="personDetail(data)"
59
+                  >查看</span
60
+                >
61
+              </div>
62
+            </td>
63
+          </tr>
64
+        </tbody>
65
+      </nz-table>
66
+      <div class="list-template__pagination">
67
+        <nz-pagination
68
+          [(nzPageIndex)]="pageIndex"
69
+          [(nzTotal)]="listLength"
70
+          nzShowSizeChanger
71
+          [(nzPageSize)]="pageSize"
72
+          (nzPageIndexChange)="getList()"
73
+          (nzPageSizeChange)="getList()"
74
+        >
75
+        </nz-pagination>
76
+      </div>
77
+    </div>
78
+  </div>
79
+</div>
80
+<!-- 操作成功/失败提示框 -->
81
+<app-prompt-modal
82
+  *ngIf="promptModalShow"
83
+  [content]="promptContent"
84
+  [success]="ifSuccess"
85
+  [show]="promptModalShow"
86
+  [info]="promptInfo"
87
+></app-prompt-modal>
88
+
89
+<!-- 查看详情 -->
90
+<router-outlet></router-outlet>

+ 95 - 0
src/app/views/inspect-statistics/inspect-statistics.component.less

@@ -0,0 +1,95 @@
1
+@import "../../../../src/theme.less";
2
+.list-template__searchItem{
3
+	.label{
4
+		width: 100px !important;
5
+	}
6
+}
7
+.save {
8
+  position: fixed;
9
+  left: 0;
10
+  top: 0;
11
+  width: 100%;
12
+  height: 100%;
13
+  background: rgba(0, 0, 0, 0.4);
14
+  z-index: 99;
15
+
16
+  .modalBody {
17
+    width: 1000px;
18
+    background: #fff;
19
+    border-radius: 5px;
20
+    padding: 10px 20px;
21
+    color: #333;
22
+
23
+    .title {
24
+      width: 100%;
25
+      text-align: center;
26
+      font-size: 18px;
27
+      position: relative;
28
+
29
+      i {
30
+        position: absolute;
31
+        right: 0;
32
+        top: 0;
33
+        font-size: 20px;
34
+        color: #666;
35
+        cursor: pointer;
36
+        padding: 0 5px;
37
+      }
38
+    }
39
+
40
+    .content {
41
+      width: 100%;
42
+      border: 1px solid #e5e9ed;
43
+      border-radius: 5px;
44
+      overflow: hidden;
45
+      margin-top: 12px;
46
+
47
+      .conItem {
48
+        color: #333;
49
+
50
+        .jiTit {
51
+          height: 50px;
52
+          line-height: 50px;
53
+          border-bottom: 1px solid #e5e9ed;
54
+          padding: 0 32px;
55
+        }
56
+
57
+        .defeat {
58
+          font-size: 14px;
59
+          color: #333;
60
+          padding: 15px 32px;
61
+          min-height: 125px;
62
+        }
63
+
64
+        &.noCon {
65
+          background: #f9fafb;
66
+          padding: 16px 32px 24px 32px;
67
+          border-top: 1px solid #e5e9ed;
68
+
69
+          .title {
70
+            text-align: left;
71
+            font-size: 14px;
72
+            margin-bottom: 8px;
73
+          }
74
+
75
+          textarea {
76
+            min-height: 210px;
77
+          }
78
+        }
79
+      }
80
+    }
81
+
82
+    button {
83
+      margin-top: 10px;
84
+      margin-left: 10px;
85
+    }
86
+  }
87
+
88
+  .txtL {
89
+    text-align: left !important;
90
+  }
91
+
92
+  .txtR {
93
+    text-align: right !important;
94
+  }
95
+}

+ 141 - 0
src/app/views/inspect-statistics/inspect-statistics.component.ts

@@ -0,0 +1,141 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+
4
+import { MainService } from "../../services/main.service";
5
+import { DateService } from "../../services/date.service";
6
+import { MyServiceService } from "../../services/my-service.service";
7
+import { ToolService } from "../../services/tool.service";
8
+import { format, startOfDay, endOfDay, startOfToday } from 'date-fns';
9
+import { NzMessageService } from "ng-zorro-antd";
10
+
11
+@Component({
12
+  selector: "app-inspect-statistics",
13
+  templateUrl: "./inspect-statistics.component.html",
14
+  styleUrls: ["./inspect-statistics.component.less"],
15
+})
16
+export class InspectStatisticsComponent implements OnInit {
17
+  constructor(
18
+		private message: NzMessageService,
19
+    private route: ActivatedRoute,
20
+    private router: Router,
21
+    private mainService: MainService,
22
+    private dateService: DateService,
23
+    private myService: MyServiceService,
24
+    private tool: ToolService
25
+  ) {}
26
+
27
+  ngOnInit() {
28
+		const todayStart = startOfToday();
29
+		const formattedTodayStart = format(todayStart, 'yyyy-MM-dd');
30
+		this.startDate = formattedTodayStart+' '+'00:00:00';
31
+		this.endDate = formattedTodayStart+' '+'23:59:59';
32
+		this.dateRange = [this.startDate,this.endDate];
33
+		this.hosId = this.tool.getCurrentHospital().id;
34
+    this.coopBtns = this.tool.initCoopBtns(this.route);
35
+		this.getList();
36
+  }
37
+	hosId:any = null;
38
+  listOfData: any[] = []; //表格数据
39
+  pageIndex: number = 1; //表格当前页码
40
+  pageSize: number = 10; //表格每页展示条数
41
+  listLength: number = 10; //表格总数据量
42
+
43
+  dateRange: any = []; //发起时间区间 天
44
+
45
+  promptContent: string; //操作提示框提示信息
46
+  ifSuccess: boolean; //操作成功/失败
47
+  promptInfo: string; //操作结果提示信息
48
+  promptModalShow: boolean; //操作提示框是否展示
49
+
50
+
51
+  // 初始化增删改按钮
52
+  coopBtns: any = {};
53
+  searchData: any = {}; // 综合统计页面带过来的参数
54
+
55
+ // 搜索
56
+ search() {
57
+   this.pageIndex = 1;
58
+   this.getList();
59
+ }
60
+ // 重置
61
+ reset() {
62
+  this.pageIndex = 1;
63
+  this.startDate = null;
64
+ 	this.endDate = null;
65
+ 	this.dateRange = [];
66
+  this.getList();
67
+ }
68
+ // 表格数据
69
+ loading1 = false;
70
+ getList() {
71
+   var that = this;
72
+   let data = {
73
+     idx: that.pageIndex - 1,
74
+     sum: that.pageSize,
75
+     startTime: this.startDate,
76
+     endTime: this.endDate,
77
+     // hosId: this.hosId
78
+   };
79
+
80
+   this.loading1 = true;
81
+   that.mainService
82
+     .inspectionStatistics(data)
83
+     .subscribe((res:any) => {
84
+       this.loading1 = false;
85
+       that.listOfData = res.list;
86
+       that.listLength = res.totalNum;
87
+     });
88
+ }
89
+ 
90
+ // 日期选择
91
+ startDate: string; //发起时间开始
92
+ endDate: string; //发起时间结束
93
+ changeDate(result?): void {
94
+   if (result.length==0) {
95
+     this.startDate = this.endDate = null;
96
+     return;
97
+   }
98
+   this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
99
+   this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
100
+	 this.dateRange = [this.startDate,this.endDate]
101
+ }
102
+
103
+// 导出
104
+	maskFlag:any = null;
105
+	excelExport(){
106
+		this.maskFlag = this.message.loading("正在导出..", {
107
+		  nzDuration: 0,
108
+		}).messageId;
109
+		this.mainService.exportReport("accompaniedInspection", {
110
+			startTime: this.startDate,
111
+			endTime: this.endDate,
112
+		}).subscribe(
113
+		  (data) => {
114
+		    this.message.remove(this.maskFlag);
115
+		    this.maskFlag = false;
116
+		    this.message.success('导出成功');
117
+		    var file = new Blob([data], {
118
+		      type: "application/vnd.ms-excel",
119
+		    });
120
+		    var fileURL = URL.createObjectURL(file);
121
+		    var a = document.createElement("a");
122
+		    a.href = fileURL;
123
+		    a.target = "_blank";
124
+		    a.download = `陪检统计数据.xls`;
125
+		    document.body.appendChild(a);
126
+		    a.click();
127
+		  },
128
+		  (err) => {
129
+		    this.message.remove(this.maskFlag);
130
+		    this.maskFlag = false;
131
+		    this.message.error('导出失败');
132
+		  }
133
+		);
134
+	}
135
+	
136
+  //查看
137
+  personDetail(data) {
138
+		this.router.navigateByUrl("/main/inspectStatistics/orderDetail/" + data['0']);
139
+  }
140
+
141
+}

+ 19 - 0
src/app/views/inspect-statistics/inspect-statistics.module.ts

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

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

@@ -37,6 +37,8 @@ export class LoginComponent implements OnInit {
37 37
   ngOnInit() {
38 38
     this.http = http;
39 39
     this.isSingleSignOn = location.href.includes("?");
40
+		localStorage.removeItem("scanCodeData");
41
+		localStorage.removeItem("pathologyActiveIndex");
40 42
     if (this.isSingleSignOn) {
41 43
       this.singleSignOn();
42 44
     } else {

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

@@ -593,6 +593,16 @@ const routes: Routes = [
593 593
         path: "incidentManagement",
594 594
         loadChildren: () => import("../incident-management/incident-management.module").then((m) => m.IncidentManagementModule),
595 595
       },
596
+			// 陪检统计
597
+			{
598
+			  path: "inspectStatistics",
599
+			  loadChildren: () => import("../inspect-statistics/inspect-statistics.module").then((m) => m.InspectStatisticsModule),
600
+			},
601
+			// 发药信息详情
602
+			{
603
+			  path: "dispensingInfoDetail",
604
+			  loadChildren: () => import("../dispensing-info-detail/dispensing-info-detail.module").then((m) => m.DispensingInfoDetailModule),
605
+			},
596 606
     ],
597 607
   },
598 608
 ];

+ 3 - 1
src/app/views/main/main.component.html

@@ -41,7 +41,9 @@
41 41
           <button nz-button nzType="primary" *ngIf="largeScreenRole2" (click)="toBigScreen('largeScreen2')">大屏端2</button>
42 42
           <button nz-button nzType="primary" *ngIf="specimenViewRole" (click)="toBigScreen('specimenView')" [nzLoading]="deptTypeLoading">业务视图</button>
43 43
           <button nz-button nzType="primary" *ngIf="specimenViewRole2" (click)="toSpecimenView2()">标本视图</button>
44
-          <button nz-button nzType="primary" *ngIf="disinfectionSupplyRole" (click)="toDisinfectionSupply()">全局业务查看</button>
44
+					<button nz-button nzType="primary" *ngIf="specimenRoomView" (click)="toSpecimenRoomView()">标本间端</button>
45
+					<button nz-button nzType="primary" *ngIf="pathology" (click)="toPathology()">病理科端</button>
46
+					<button nz-button nzType="primary" *ngIf="disinfectionSupplyRole" (click)="toDisinfectionSupply()">全局业务查看</button>
45 47
           <button nz-button nzType="primary" *ngIf="configurationCenterRole" (click)="toConfigurationCenter()">配置中心</button>
46 48
         </div>
47 49
         <div class="right">

+ 18 - 0
src/app/views/main/main.component.ts

@@ -29,6 +29,8 @@ export class MainComponent implements OnInit {
29 29
   largeScreenRole2: boolean = false; //大屏端权限
30 30
   specimenViewRole: boolean = false; //业务视图权限
31 31
   specimenViewRole2: boolean = false; //标本视图权限
32
+	specimenRoomView: boolean = false; //标本间权限
33
+	pathology: boolean = false; //病理科权限
32 34
   disinfectionSupplyRole: boolean = false; //全局业务查看权限
33 35
   configurationCenterRole: boolean = false; //配置中心权限
34 36
   PCCommutesToWork: boolean = false; //PC上下班权限
@@ -289,6 +291,14 @@ export class MainComponent implements OnInit {
289 291
         this.specimenViewRole2 = true;
290 292
         console.log("标本视图权限");
291 293
       }
294
+			if (e.link == "specimenRoomView") {
295
+			  this.specimenRoomView = true;
296
+			  console.log("标本间权限");
297
+			}
298
+			if (e.link == "pathology") {
299
+			  this.pathology = true;
300
+			  console.log("病理科权限");
301
+			}
292 302
       if (e.link == "disinfectionSupply") {
293 303
         this.disinfectionSupplyRole = true;
294 304
         console.log("全局业务查看权限");
@@ -408,6 +418,14 @@ export class MainComponent implements OnInit {
408 418
   toSpecimenView2(): void {
409 419
     this.router.navigateByUrl("specimenView2");
410 420
   }
421
+	// 标本间
422
+	toSpecimenRoomView(): void {
423
+	  this.router.navigateByUrl("specimenRoomView");
424
+	}
425
+	// 病理科
426
+	toPathology(): void {
427
+	  this.router.navigateByUrl("pathology");
428
+	}
411 429
   // 全局业务查看
412 430
   toDisinfectionSupply(): void {
413 431
     this.router.navigateByUrl("disinfectionSupply");

+ 10 - 0
src/app/views/operation-config/operation-config.component.html

@@ -84,6 +84,11 @@
84 84
           <nz-form-label class="label">是否开启手术即将开始通知</nz-form-label>
85 85
           <nz-checkbox-group [(ngModel)]="surgeryBegin"></nz-checkbox-group>
86 86
         </div>
87
+				<!-- 是否开启病理申请单 -->
88
+				<div class="display_flex align-items_center mb8">
89
+				  <nz-form-label class="label">是否开启病理申请单</nz-form-label>
90
+				  <nz-checkbox-group [(ngModel)]="isPathologyForm"></nz-checkbox-group>
91
+				</div>
87 92
       </div>
88 93
       <!-- 自动建单配置 -->
89 94
       <div *ngIf="tabModalName=='automaticOrderCreation'">
@@ -93,6 +98,11 @@
93 98
           <nz-checkbox-group [(ngModel)]="autoCreateOrders" (ngModelChange)="changeAutoCreateOrders($event)"></nz-checkbox-group>
94 99
           <nz-time-picker [(ngModel)]="autoTime" nzFormat="HH:mm" *ngIf="autoCreateOrders[0].checked"></nz-time-picker>
95 100
         </div>
101
+				<!-- 是否开启速冻标本自动建单 -->
102
+				<div class="display_flex align-items_center mb8">
103
+				  <nz-form-label class="label">是否开启速冻标本自动建单</nz-form-label>
104
+				  <nz-checkbox-group [(ngModel)]="isFrozenSpecimen"></nz-checkbox-group>
105
+				</div>
96 106
       </div>
97 107
       <div class="bottom">
98 108
         <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

+ 13 - 1
src/app/views/operation-config/operation-config.component.ts

@@ -44,6 +44,14 @@ export class OperationConfigComponent implements OnInit {
44 44
   surgeryBegin:any[] = [
45 45
     {label:'是否开启',value: 0}
46 46
   ];
47
+	// 是否开启病理申请单
48
+	isPathologyForm:any[] = [
49
+	  {label:'是否开启',value: 0}
50
+	];
51
+	// 是否开启速冻标本自动建单
52
+	isFrozenSpecimen:any[] = [
53
+	  {label:'是否开启',value: 0}
54
+	];
47 55
   // 建单时间
48 56
   autoTime:Date | null = null;
49 57
   tasktype1Id:any;
@@ -143,6 +151,8 @@ export class OperationConfigComponent implements OnInit {
143 151
       recoveryTypeId: this.tasktype2Id || undefined,
144 152
       remandClean: this.autoRemandClean[0].checked ? 1 : 0,
145 153
       surgeryBegin: this.surgeryBegin[0].checked ? 1 : 0,
154
+			isPathologyForm: this.isPathologyForm[0].checked ? 1 : 0,
155
+			isFrozenSpecimen: this.isFrozenSpecimen[0].checked ? 1 : 0,
146 156
       cleanTypeId: this.cleanTypeId || undefined,
147 157
     };
148 158
     let postData = Object.assign({}, this.configs, editData);
@@ -331,7 +341,9 @@ export class OperationConfigComponent implements OnInit {
331 341
                 }
332 342
 
333 343
                 this.surgeryBegin[0].checked = this.configs.surgeryBegin == 1;
334
-              }
344
+								this.isPathologyForm[0].checked = this.configs.isPathologyForm == 1;
345
+								this.isFrozenSpecimen[0].checked = this.configs.isFrozenSpecimen == 1;
346
+							}
335 347
             });
336 348
         }else{
337 349
           this.loading = false;

+ 17 - 0
src/app/views/pathology/pathology-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { PathologyComponent } from "./pathology.component";
4
+import { DetailSampleComponent } from 'src/app/share/detail-sample/detail-sample.component';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: PathologyComponent
10
+  },
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class PathologyRoutingModule {}

+ 531 - 0
src/app/views/pathology/pathology.component.html

@@ -0,0 +1,531 @@
1
+<div class="pharmacy">
2
+  <!-- 头部 start -->
3
+  <div class="pharmacy-header">
4
+   <div class="pharmacy-logo">
5
+		<h2 class="pharmacy-name__title">
6
+			<span>病理科</span>
7
+		</h2>
8
+    </div>
9
+    <div class="pharmacy-name">
10
+			<div class="mar-ri-30" *ngIf="toDayData">
11
+				今日接收:
12
+				申请单 <span class="weight">{{toDayData.pathologyFormNum}}</span> &nbsp;
13
+				标本 <span class="weight">{{toDayData.specimenNum}}</span>&nbsp;
14
+				速冻 <span class="weight">{{toDayData.rapidityNum}}</span>&nbsp;
15
+				送出申请单 <span class="weight">{{toDayData.sendOut}}</span>&nbsp;
16
+			</div>
17
+      <div class="pharmacy-name__total">
18
+				<nz-input-group nzSize="large">
19
+					<input type="text" id="Binput" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="可扫描物理标本条码及包码" />
20
+				</nz-input-group>
21
+      </div>
22
+			<div class="error-class">{{errorcODEMsg}}</div>
23
+    </div>
24
+    <div class="userInfo">
25
+      <div class="wel">欢迎您:</div>
26
+      <div class="user">
27
+        <img src="../../assets/images/icon_keshi.png" alt="" />
28
+        <span *ngIf="deptDisplay">{{
29
+          deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept
30
+        }}</span>
31
+      </div>
32
+      <div class="userInfo-wrap">
33
+        <div class="logOut" (click)="changeKsNow()">切换科室</div>
34
+        <div class="logOut" (click)="logOut()">退出</div>
35
+      </div>
36
+    </div>
37
+  </div>
38
+	<div class="tabs">
39
+		<div class="tabs-item">
40
+			<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 0}" (click)="tabClick(0)">交接本</div>
41
+			<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 1}" (click)="tabClick(1)">实时术中快速<span class="red" *ngIf="toDayData">({{toDayData.unReceiveRapidityNum?toDayData.unReceiveRapidityNum:0}})</span></div>
42
+			<div class="tabs-item-item" [ngClass]="{'activeClass': activeIndex == 2}" (click)="tabClick(2)">打包配送</div>
43
+		</div>
44
+		<div class="tabs-btn">
45
+			<button class="btn default" nz-button nzType="primary" nzSize="small" (click)='connect()'>接收</button>
46
+			<button class="btn default" nz-button nzType="primary" nzSize="small" (click)='packaging()'>打包</button>
47
+		</div>
48
+	</div>
49
+  <!-- 头部 end -->
50
+  <div class="pharmacy-main">
51
+    <div *ngIf="activeIndex==0" class="list-template pharmacy-main__list pharmacy-main__print">
52
+			<div class="list-template__content">
53
+			  <div class="list-template__top" nz-row>
54
+			    <div nz-col nzLg='18' class="list-template__searchBox">
55
+			      <div class="list-template__searchItem">
56
+			        <span class="label">接收时间:</span>
57
+			        <nz-range-picker [(ngModel)]="acceptTime" nzFormat="yyyy-MM-dd HH:mm:ss"
58
+							(ngModelChange)="changeDate($event)"></nz-range-picker>
59
+			      </div>
60
+						<div class="list-template__searchItem">
61
+						  <span class="label">配送人:</span>
62
+							<nz-select class="formItem" (nzOnSearch)="changeUserInp($event)"
63
+							  [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear nzPlaceHolder="请选择配送人"
64
+							  [(ngModel)]="deliveryUser">
65
+							  <ng-container *ngFor="let option of userData">
66
+							    <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
67
+							  </ng-container>
68
+							  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
69
+							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
70
+							  </nz-option>
71
+							</nz-select>
72
+						</div>
73
+						<div class="list-template__searchItem">
74
+						  <span class="label">术中快速:</span>
75
+							<nz-radio-group [(ngModel)]="intraoperativeRapidity">
76
+								<label nz-radio nzValue="1">是</label>
77
+								<label nz-radio nzValue="0">否</label>
78
+							</nz-radio-group>
79
+						</div>
80
+			    </div>
81
+			    <div nz-col nzLg="6" class="list-template__btns">
82
+			      <button class="btn default" (click)='search()'>搜索</button>
83
+			      <button class="btn default ml8" (click)='reset()'>重置</button>
84
+			    </div>
85
+			  </div>
86
+			  <div class="list-template__bottom">
87
+			    <nz-table class="list-template__nzTable" [nzData]="listOneData" nzSize="middle" [nzShowPagination]="false"
88
+			      [nzLoading]="loading1">
89
+			      <thead>
90
+			        <tr class="thead">
91
+			          <th>申请单号</th>
92
+			          <th>患者姓名</th>
93
+			          <th>住院号</th>
94
+			          <th>部位</th>
95
+			          <th>标本数</th>
96
+			          <th>申请科室</th>
97
+			          <th>配送人</th>
98
+			          <th>接收人</th>
99
+								<th>接收时间</th>
100
+			          <th>操作</th>
101
+			        </tr>
102
+			      </thead>
103
+			      <tbody>
104
+			        <tr *ngFor="let data of listOneData">
105
+			          <td><span *ngIf="data.intraoperativeRapidity==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
106
+								<td>{{ data.patientDTO?data.patientDTO.patientName : '-' }}</td>
107
+			          <td>{{ data.patientDTO.patientCode}}</td>
108
+			          <td>{{ data.takePart}}</td>
109
+			          <td>{{ data.specimenNum}}</td>
110
+			          <td>{{ data.patientDTO?data.patientDTO.department.dept : '-'}}</td>
111
+								<td>{{ data.deliveryUserDTO?data.deliveryUserDTO.name : '-' }}</td>
112
+								<td>{{ data.receiveUserDTO?data.receiveUserDTO.name : '-' }}</td>
113
+								<td>{{ data.receiveTime|date:'yyyy-MM-dd HH:mm:ss'  }}</td>
114
+			          <td>
115
+			            <div class="coop">
116
+										<span (click)="oneLook($event,data)">查看</span>
117
+			            </div>
118
+			          </td>
119
+			        </tr>
120
+			      </tbody>
121
+			    </nz-table>
122
+			    <div class="list-template__pagination">
123
+			      <nz-pagination [(nzPageIndex)]="pageOneIndex" [(nzTotal)]="listOneLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
124
+			        (nzPageIndexChange)="getConnectList()" (nzPageSizeChange)="getConnectList()">
125
+			      </nz-pagination>
126
+			    </div>
127
+			  </div>
128
+			</div>
129
+    </div>
130
+
131
+    <div class="pharmacy-main__list pharmacy-main__waitDelivery">
132
+      <div *ngIf="activeIndex==1" class="list-template pharmacy-main__list pharmacy-main__print">
133
+      	<div class="list-template__content">
134
+      	  <div class="list-template__bottom">
135
+      	    <nz-table class="list-template__nzTable" [nzData]="listTwoData" nzSize="middle" [nzShowPagination]="false"
136
+      	      [nzLoading]="loading2">
137
+      	      <thead>
138
+      	        <tr class="thead">
139
+      	          <th>申请单号</th>
140
+      	          <th>患者姓名</th>
141
+      	          <th>住院号</th>
142
+      	          <th>部位</th>
143
+      	          <th>标本数</th>
144
+      	          <th>申请科室</th>
145
+      	          <th>配送人</th>
146
+      	          <th>状态</th>
147
+      	          <th>操作</th>
148
+      	        </tr>
149
+      	      </thead>
150
+      	      <tbody>
151
+      	        <tr *ngFor="let data of listTwoData">
152
+      	         <td><span *ngIf="data.intraoperativeRapidity==1" style="color: red;">速</span>{{ data.applyCode || '-' }}</td>
153
+      	         <td>{{ data.patientDTO?data.patientDTO.patientName : '-' }}</td>
154
+      	         <td>{{ data.patientDTO.patientCode}}</td>
155
+      	         <td>{{ data.takePart}}</td>
156
+      	         <td>{{ data.specimenNum}}</td>
157
+      	         <td>{{ data.patientDTO?data.patientDTO.department.dept : '-'}}</td>
158
+      	         <td>{{ data.deliveryUserDTO?data.deliveryUserDTO.name : '-' }}</td>
159
+      	         <td>{{ data.status?data.status.name:'-' }}</td>
160
+      	         <td>
161
+      	           <div class="coop">
162
+      	         		<span (click)="oneLook($event,data)">查看</span>
163
+      	           </div>
164
+      	         </td>
165
+      	        </tr>
166
+      	      </tbody>
167
+      	    </nz-table>
168
+      	    <div class="list-template__pagination">
169
+      	      <nz-pagination [(nzPageIndex)]="pageTwoIndex" [(nzTotal)]="listTwoLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
170
+      	        (nzPageIndexChange)="getSpeedinessList()" (nzPageSizeChange)="getSpeedinessList()">
171
+      	      </nz-pagination>
172
+      	    </div>
173
+      	  </div>
174
+      	</div>
175
+      </div>
176
+    </div>
177
+
178
+    <div class="pharmacy-main__list pharmacy-main__delivery">
179
+			<div *ngIf="activeIndex==2" class="list-template pharmacy-main__list pharmacy-main__print">
180
+				<div class="list-template__content">
181
+				  <div class="list-template__bottom">
182
+				    <nz-table class="list-template__nzTable" [nzData]="listThreeData" nzSize="middle" [nzShowPagination]="false"
183
+				      [nzLoading]="loading3">
184
+				      <thead>
185
+				        <tr class="thead">
186
+				          <th>包号</th>
187
+				          <th>打包人 | 打包时间</th>
188
+				          <th>申请单数</th>
189
+				          <th>标本数</th>
190
+									<th>配送人 | 配送时间</th>
191
+									<th>接收人 | 接收时间</th>
192
+				          <th>状态</th>
193
+				          <th>操作</th>
194
+				        </tr>
195
+				      </thead>
196
+				      <tbody>
197
+				        <tr *ngFor="let data of listThreeData">
198
+				          <td>{{ data.packCode || '-' }}</td>
199
+									<td>
200
+										<div>{{data.packUserDTO.name }}</div>
201
+										<div>{{data.packTime|date:'yyyy-MM-dd HH:mm' }}</div>
202
+									</td>
203
+				          <td>{{ data.pathologyFormNum }}</td>
204
+				          <td>{{ data.specimenNum }}</td>
205
+				          <td>
206
+				          	<div>{{data.deliveryUserDTO?data.deliveryUserDTO.name:'-' }}</div>
207
+				          	<div>{{data.deliveryTime|date:'yyyy-MM-dd HH:mm' || '-' }}</div>
208
+				          </td>
209
+				          <td>
210
+				          	<div>{{data.receiveUserDTO?data.receiveUserDTO.name:'-' }}</div>
211
+				          	<div>{{data.receiveTime|date:'yyyy-MM-dd HH:mm' || '-' }}</div>
212
+				          </td>
213
+									<td>{{ data.status.name }}</td>
214
+				          <td>
215
+				            <div class="coop">
216
+											<span (click)="threeLook($event,data)">查看标本</span>
217
+											<span (click)="reprint($event,data)">补打</span>
218
+											<span *ngIf="data.status.value==1" (click)="distribution($event,data)">配送</span>
219
+				            </div>
220
+				          </td>
221
+				        </tr>
222
+				      </tbody>
223
+				    </nz-table>
224
+				    <div class="list-template__pagination">
225
+				      <nz-pagination [(nzPageIndex)]="pageThreeIndex" [(nzTotal)]="listThreeLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
226
+				        (nzPageIndexChange)="getPackList()" (nzPageSizeChange)="getPackList()">
227
+				      </nz-pagination>
228
+				    </div>
229
+				  </div>
230
+				</div>
231
+			</div>
232
+    </div>
233
+  </div>
234
+  <!-- 主体部分 end -->
235
+  <!-- <router-outlet></router-outlet> -->
236
+</div>
237
+
238
+<!-- 科室切换提示框 -->
239
+<app-hs-prompt-modal
240
+  [changeShow]="changeShow"
241
+  [closeTime]="closeTime"
242
+  [closeTimeFlag]="closeTimeFlag"
243
+  [show]="hsPromptModalShow"
244
+  (closeModelHs)="closeModelHs($event)"
245
+  (clearModelHs)="clearModelHs($event)"
246
+  deptType="pathology"
247
+> 
248
+  <!-- 返回系统按钮 -->
249
+  <!-- 右侧悬浮框 -->
250
+   <div id="fixedMenu" class="fixed" *ngIf="mainRole">
251
+    <div class="right">
252
+      <div class="fixedMenu hujiaozhongxin">
253
+        <div class="menuItems">
254
+          <div class="item">快捷菜单</div>
255
+        </div>
256
+      </div>
257
+      <div class="fixedMenu">
258
+        <div class="menuItems">
259
+          <div
260
+            class="others"
261
+            [ngStyle]="{
262
+              height: showLastItems
263
+                ? mainRole
264
+                  ? 35 * 2 + 'px'
265
+                  : 35 * 1 + 'px'
266
+                : 0
267
+            }"
268
+          >
269
+            <div
270
+              [ngClass]="{ item: true, checked: fixedTab == 'back' }"
271
+              *ngIf="mainRole"
272
+              (click)="checkFixedTab('toSystem')"
273
+            >
274
+              返回系统
275
+            </div>
276
+          </div>
277
+        </div>
278
+        <div class="arrow" *ngIf="!showLastItems" (click)="fixedMenuXiala()">
279
+          <i class="icon_transport transport-xiala2-01"></i>
280
+        </div>
281
+        <div class="arrow" *ngIf="showLastItems" (click)="fixedMenuShangla()">
282
+          <i class="icon_transport transport-shangla-"></i>
283
+        </div>
284
+      </div>
285
+    </div>
286
+    <div
287
+      *ngIf="showLastItems && fixedTab != ''"
288
+      (click)="fixedMenuShangla()"
289
+      class="fixedMark"
290
+    ></div>
291
+  </div>
292
+</app-hs-prompt-modal>
293
+
294
+
295
+<!-- 查看详情 -->
296
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="detailMoadl">
297
+	<div class="pathology-content">
298
+		<div class="title">查看详情
299
+		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
300
+		<div class="content border">
301
+			<div class="content-item boder-right">
302
+				<div class="form-title-box">
303
+					<div class="form-title"><span class="font-weight-500">是否术中快速:</span>{{detailsData.intraoperativeRapidity==1?'是':'否'}}</div>
304
+					<div class="form-title"><span class="font-weight-500">申请单编号:</span>{{detailsData.applyCode}}</div>
305
+					<div class="form-title"><span class="font-weight-500">状态:</span>{{detailsData.status.name}}</div>
306
+					<div class="form-title"><span class="font-weight-500">科室名称:</span>{{detailsData.patientDTO.department.dept}}</div>
307
+				</div>
308
+				<div class="form-title-box">
309
+					<div class="form-title"><span class="font-weight-500">住院号:</span>{{detailsData.patientDTO.patientCode}}</div>
310
+					<div class="form-title"><span class="font-weight-500">患者信息:</span>{{detailsData.patientDTO.patientName}} ({{detailsData.patientDTO.bedNum}}床)</div>
311
+					<div class="form-title"><span class="font-weight-500">年龄:</span>{{detailsData.patientDTO.age||'-'}}岁</div>
312
+				</div>
313
+				
314
+				<div class="form-title-box">
315
+					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
316
+				</div>
317
+				
318
+				<div class="form-list">
319
+					<div class="form-title font-weight-500">诊断:</div>
320
+					<div class="indent">
321
+						{{detailsData.diagnose||'无'}}
322
+					</div>
323
+				</div>
324
+				
325
+				<div class="form-list">
326
+					<div class="form-title font-weight-500">病历摘要:</div>
327
+					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
328
+				</div>
329
+				<div class="form-list">
330
+					<div class="form-title font-weight-500">手术方案:</div>
331
+					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
332
+				</div>
333
+
334
+				<div class="form-title-box">
335
+					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
336
+					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{detailsData.specimenNum||'无'}}</div>
337
+					<div class="form-title"><span class="font-weight-500">部位:</span>{{detailsData.takePart||'无'}}</div>
338
+				</div>
339
+				
340
+				<div class="form-title-box">
341
+					<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
342
+					<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
343
+					<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
344
+				</div>
345
+				
346
+				<div class="form-list">
347
+					<div class="form-title font-weight-500">标本:</div>
348
+					<div class="form-title specimen-list">
349
+						<div *ngFor="let item of specimenList" class="specimen-item-class">
350
+							{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
351
+						</div>
352
+					</div>
353
+				</div>
354
+
355
+			</div>
356
+			
357
+			<div class="content-item-right">
358
+				<div class="step-title">病理闭环</div>
359
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
360
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
361
+							<nz-step
362
+								[nzDescription]="tpl"
363
+							>
364
+							</nz-step>
365
+							<ng-template #tpl>
366
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
367
+									<div style="color: #49B856;">{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
368
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
369
+								</div>
370
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
371
+									<div>{{item.operationType.name}} {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
372
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
373
+								</div>
374
+							</ng-template>
375
+						</ng-container>
376
+				</nz-steps>
377
+			</div>
378
+		</div>
379
+		<div class="display_flex justify-content_flex-center bottom-btn">
380
+			<button class="btn btn-right" nz-button nzType="primary" (click)="closeDetailMoadl()">知道了</button>
381
+		</div>
382
+	</div>
383
+</div>
384
+
385
+<!-- 操作成功/失败提示框 -->
386
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
387
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
388
+	
389
+
390
+<div class="mask-style" *ngIf="isSpinning">
391
+	<nz-spin nzSimple class="spin-style"></nz-spin>
392
+</div>
393
+
394
+<!-- 补打 -->
395
+<app-dialog-delete [delModal]="printModal" (hideDelModalEvent)="hidePrintModal()" [btnLoading]="parintLoading"
396
+  (confirmDelEvent)="confirmPrintDel()" [content]="'您确认要重新打印条码吗?'"></app-dialog-delete>
397
+	
398
+<!-- 配送 -->
399
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="distributionModal">
400
+	<div class="modalBody">
401
+		<div class="title">配送信息填写<i class="icon_transport transport-guanbi" (click)="hideDistributionModal()"></i>
402
+		</div>
403
+		<div class="content">
404
+		 <div class="title-class">包内含申请单{{rowData.pathologyFormNum}}张、标本{{rowData.specimenNum}}支,请填写配送人员工号。</div>
405
+		 <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitDistributionForm()">
406
+			<nz-form-item>
407
+				<nz-form-label nzRequired nzFor="jobNumber">配送人工号</nz-form-label>
408
+				<nz-form-control nzErrorTip="请输入配送人工号!">
409
+					<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入配送人工号" nzSize="default" />
410
+				</nz-form-control>
411
+			</nz-form-item>
412
+			<nz-form-item class="form-name">
413
+				<nz-form-label style="margin-left: 12px;">配送人姓名</nz-form-label>
414
+				<!-- <nz-form-control nzErrorTip="请输入配送人工号!"> -->
415
+					<div class="job-class">{{distributionName}}</div>
416
+				<!-- </nz-form-control> -->
417
+			</nz-form-item>
418
+			<nz-form-item>
419
+				<nz-form-label nzRequired nzFor="gurop">接收院区</nz-form-label>
420
+				<nz-form-control nzErrorTip="请选择接收院区!">
421
+					<nz-input-group>
422
+						<nz-select class="formItem" (ngModelChange)="changeHospDate($event)" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择接收院区" formControlName="gurop">
423
+							<ng-container *ngFor="let option of hospital">
424
+								<nz-option [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
425
+							</ng-container>
426
+						</nz-select>
427
+					</nz-input-group>
428
+				</nz-form-control>
429
+			</nz-form-item>
430
+			<nz-form-item>
431
+				<nz-form-label nzRequired nzFor="department">接收科室</nz-form-label>
432
+				<nz-form-control nzErrorTip="请选择接收科室!">
433
+					<nz-input-group>
434
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择接收科室" formControlName="department">
435
+							<ng-container *ngFor="let option of department">
436
+								<nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
437
+							</ng-container>
438
+							<nz-option *ngIf="isDeptLoading" nzDisabled nzCustomContent>
439
+								<i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
440
+							</nz-option>
441
+						</nz-select>
442
+					</nz-input-group>
443
+				</nz-form-control>
444
+			</nz-form-item>
445
+		 </form>
446
+		</div>
447
+		<div class="display_flex justify-content_flex-center">
448
+			<button class="btn" nz-button nzType="primary" (click)="submitDistributionForm()" [nzLoading]="btnLoading">确定配送</button>
449
+			<button class="btn cancel" nz-button nzType="default" (click)="hideDistributionModal()">取消</button>
450
+		</div>
451
+	</div>
452
+</div>
453
+
454
+<!-- 配送接收 -->
455
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="receptionModal">
456
+	<div class="modalBody">
457
+		<div class="title">配送接收<i class="icon_transport transport-guanbi" (click)="hideReceptionModal()"></i>
458
+		</div>
459
+		<div class="content">
460
+		 <div class="title-class">
461
+			 包内含申请单12张、标本100,请确认接收。
462
+			</div>
463
+		 <form nz-form [formGroup]="validateConnectForm" class="addForm" (ngSubmit)="submitReceptionForm()">
464
+			<nz-form-item>
465
+				<nz-form-label nzRequired nzFor="receptionNumber">接收人工号</nz-form-label>
466
+				<nz-form-control nzErrorTip="请输入接收人工号!">
467
+					<input nz-input (ngModelChange)="receptionChange($event)" formControlName="receptionNumber" placeholder="请输入接收人工号" nzSize="default" />
468
+				</nz-form-control>
469
+			</nz-form-item>
470
+			<nz-form-item class="form-name">
471
+				<nz-form-label style="margin-left: 12px;">接收人姓名</nz-form-label>
472
+				<!-- <nz-form-control nzErrorTip="请输入接收人工号!"> -->
473
+					<div class="job-class">{{receptionName}}</div>
474
+				<!-- </nz-form-control> -->
475
+			</nz-form-item>
476
+			<nz-form-item>
477
+				<nz-form-label nzRequired nzFor="dispatchingNumber">配送人工号</nz-form-label>
478
+				<nz-form-control nzErrorTip="请输入配送人工号!">
479
+					<input nz-input (ngModelChange)="dispatchingChange($event)" formControlName="dispatchingNumber" placeholder="请输入配送人工号" nzSize="default" />
480
+				</nz-form-control>
481
+			</nz-form-item>
482
+			<nz-form-item class="form-name">
483
+				<nz-form-label style="margin-left: 12px;">配送人姓名</nz-form-label>
484
+				<!-- <nz-form-control nzErrorTip="请输入配送人工号!"> -->
485
+					<div class="job-class">{{dispatchingName}}</div>
486
+				<!-- </nz-form-control> -->
487
+			</nz-form-item>
488
+		 </form>
489
+		</div>
490
+		<div class="display_flex justify-content_flex-center">
491
+			<button class="btn" nz-button nzType="primary" (click)="submitReceptionForm()" [nzLoading]="btnConnectLoading">确定接收</button>
492
+			<button class="btn cancel" nz-button nzType="default" (click)="hideReceptionModal()">取消</button>
493
+		</div>
494
+	</div>
495
+</div>
496
+
497
+<!-- 打包并打印 -->
498
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="packModal">
499
+	<div class="modalBody">
500
+		<div class="title">打包并打印<i class="icon_transport transport-guanbi" (click)="hidePackModal()"></i>
501
+		</div>
502
+		<div class="content-modal">
503
+			 本次共扫描单据50张、标本40,是否打包并打印?
504
+		</div>
505
+		<div class="display_flex justify-content_flex-center">
506
+			<button class="btn" nz-button nzType="primary" (click)="submitPackForm()" [nzLoading]="btnPackLoading">打包并打印</button>
507
+			<button class="btn cancel" nz-button nzType="default" (click)="hidePackModal()">取消</button>
508
+		</div>
509
+	</div>
510
+</div>
511
+
512
+<!-- 打印 -->
513
+<div id="report" style="display: none;" *ngIf="printData">
514
+	<div class="monad">
515
+		<div style="font-size: 10px;padding: 2px;">
516
+			<!-- <div> -->
517
+				<div style="display: flex;align-items: center;justify-content: center;">
518
+					<img style="width: 100%;height: 60px;" [src]="printData.qrCode" alt="">
519
+				</div>
520
+				<div style="padding: 1px;">
521
+					<div style="display: flex;flex-wrap: nowrap;margin-bottom:3px;">包码:{{printData.packCode}}</div>
522
+					<div style="display: flex;">打包时间:{{printData.packTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
523
+					<!-- <div style="display: flex;">打包人:{{printData.packUserDTO?printData.packUserDTO.name:'-'}}</div> -->
524
+					<!-- <div style="display: flex;margin-bottom:6px;">申请单数:{{printData.pathologyFormNum}}</div> -->
525
+					<!-- <div style="display: flex;margin-bottom:6px;">标本数:{{printData.specimenNum}}</div> -->
526
+				</div>
527
+			<!-- </div> -->
528
+			<!-- <div style="display: flex;">打包时间:{{printData.packTime|date:'yyyy-MM-dd HH:mm:ss'}}</div> -->
529
+		</div>
530
+	</div>
531
+</div>

Різницю між файлами не показано, бо вона завелика
+ 1097 - 0
src/app/views/pathology/pathology.component.less


Різницю між файлами не показано, бо вона завелика
+ 1365 - 0
src/app/views/pathology/pathology.component.ts


+ 17 - 0
src/app/views/pathology/pathology.module.ts

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

+ 17 - 0
src/app/views/pathologyScan/pathologyScan-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { PathologyScanComponent } from "./pathologyScan.component";
4
+import { DetailSampleComponent } from 'src/app/share/detail-sample/detail-sample.component';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: PathologyScanComponent
10
+  },
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class PathologyScanRoutingModule {}

+ 282 - 0
src/app/views/pathologyScan/pathologyScan.component.html

@@ -0,0 +1,282 @@
1
+<!-- 标本接收 -->
2
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="fixationModal">
3
+	<div class="pathology-content">
4
+		<div class="title">
5
+		<!-- <i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i></div> -->
6
+		<div class="content">
7
+			<div class="content-item">
8
+				<!-- <div class="center">提示:申请单含<span class="red">{{codeData.specimenNum}}</span>只标本,已扫<span class="red">{{codeData.pathologySpecimenDTOList.length}}</span>只<span *ngIf="codeData.pathologySpecimenDTOList.length < codeData.specimenNum">,请继续扫描标本。</span></div> -->
9
+				<div class="disp-fl">
10
+					<div class="disp-title">
11
+						<div *ngIf="dataType=='receive'" class="title-weight">标本接收</div>
12
+						<div *ngIf="dataType=='pack'" class="title-weight">标本打包</div>
13
+						<div *ngIf="dataType?dataType=='receive' : businessType == 'connect'">
14
+							接收申请单数: <span class="weight">{{otherData.pathologyFormNum}}</span>  &nbsp;
15
+							接收标本数: <span class="weight">{{otherData.specimenNum}}</span>  
16
+						</div>
17
+						<div *ngIf="dataType?dataType=='pack' : businessType == 'packaging'">
18
+							打包申请单数: <span class="weight">{{otherData.pathologyFormNum}}</span>  &nbsp;
19
+							打包标本数: <span class="weight">{{otherData.specimenNum}}</span>  
20
+						</div>
21
+					</div>
22
+					
23
+					<div *ngIf="dataType!='pathologyPack' && businessType!='packagLook'">
24
+						<input nz-input id="specimen" [placeholder]="placeholder" [(ngModel)]="specimenCode" (ngModelChange)="codeChange($event)"/>
25
+					</div>
26
+					<div class="error-class">{{errorMsg}}</div>
27
+				</div>
28
+				<div class="list-template">
29
+				  <div class="list-template__content">
30
+						<div class="list-template__bottom" style="padding: 0 !important;">
31
+							<nz-table class="list-template__nzTable" [nzData]="codeData" nzSize="middle" [nzShowPagination]="false"
32
+								[nzLoading]="tableLoading">
33
+								<thead>
34
+									<tr class="thead">
35
+										<th>申请单号 | 申请科室</th>
36
+										<th>患者姓名 | 住院号</th>
37
+										<th>标本数</th>
38
+										<th>部位</th>
39
+										<th>标本名称</th>
40
+									</tr>
41
+								</thead>
42
+								<tbody>
43
+									<tr *ngFor="let data of codeData let index = index">
44
+										<td>
45
+											<div>{{ data.applyCode}}</div>
46
+											<div>{{ data.patientDTO.department.dept}}</div>
47
+										</td>
48
+										<td>
49
+											<div>{{ data.patientDTO.patientName}}</div>
50
+											<div>{{ data.patientDTO.residenceNo}}</div>
51
+										</td>
52
+										<td>{{ data.specimenNum}}</td>
53
+										<td>{{ data.takePart}}</td>
54
+										<td>
55
+											<div *ngFor="let item of data.pathologySpecimenDTOList">
56
+												{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
57
+											</div>
58
+										</td>
59
+									</tr>
60
+								</tbody>
61
+							</nz-table>
62
+							<div class="list-template__pagination">
63
+							  <nz-pagination [(nzPageIndex)]="pageReceptionIndex" [(nzTotal)]="listReceptionLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
64
+							    (nzPageIndexChange)="pageChange()" (nzPageSizeChange)="pageChange()">
65
+							  </nz-pagination>
66
+							</div>
67
+						</div>
68
+					</div>
69
+				</div>
70
+			</div>
71
+		</div>
72
+		<div class="display_flex justify-content_flex-center bottom-btn">
73
+			<button class="btn btn-right" *ngIf="dataType?dataType=='receive' : businessType == 'connect'" [disabled]="codeData.length==0" nz-button nzType="primary" (click)="submitFixationForm()" [nzLoading]="btnLoading">交接完成</button>
74
+			<button class="btn btn-right" *ngIf="dataType?dataType=='pack' : businessType == 'packaging'" [disabled]="codeData.length==0" nz-button nzType="primary" (click)="submitScanForm()" [nzLoading]="btnLoading">扫描完成</button>
75
+			<button class="btn btn-right" *ngIf="dataType=='pathologyPack'" nz-button nzType="primary" [disabled]="codeData.length==0" (click)="connectAccomplish()" [nzLoading]="btnMultiLoading">交接完成</button>
76
+			<button class="btn cancel" *ngIf="dataType=='pathologyPack'" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
77
+			<button class="btn cancel" *ngIf="dataType?dataType=='pack' : businessType == 'packaging'" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
78
+			<button class="btn btn-right" *ngIf="businessType=='packagLook'" nz-button nzType="primary" (click)="hideSpecimenModal()">知道了</button>
79
+		</div>
80
+	</div>
81
+</div>
82
+</div>
83
+
84
+<!-- 多支标本提示 -->
85
+<div class="multi add display_flex align-items_center justify-content_flex-center" *ngIf="multiModal">
86
+	<div class="pathology-content">
87
+		<div class="title">多支标本提示
88
+		<i class="icon_transport transport-guanbi" (click)="hideMultiModal()"></i></div>
89
+		<div class="content border">
90
+			<div class="content-item">
91
+				<div class="center">提示:{{scanCodeData.patientName}}的申请单含<span>{{codeMultiData.length}}</span>支标本,您已扫描<span>{{muArr.length}}</span>支</div>
92
+				<div class="disp-fl df-center">
93
+					<div>
94
+						<input nz-input id="multiSpecimen" placeholder="可扫描物理标本条码及包码" [(ngModel)]="specimenMultiCode" (ngModelChange)="codeMultiChange($event)"/>
95
+					</div>
96
+					<div class="error-class">{{errorMultiMsg}}</div>
97
+				</div>
98
+				<div class="list-template">
99
+				  <div class="list-template__content">
100
+						<div class="list-template__bottom" style="padding: 0 !important;">
101
+							<nz-table class="list-template__nzTable" [nzData]="codeMultiData" nzSize="middle" [nzShowPagination]="false"
102
+								[nzLoading]="tableLoading">
103
+								<thead>
104
+									<tr class="thead">
105
+										<th>序号</th>
106
+										<th>条码号</th>
107
+										<th>标本名称</th>
108
+										<th *ngIf="dataType=='receive'">已接收 | 未接收</th>
109
+										<th *ngIf="dataType=='pack'">已扫描 | 未扫描</th>
110
+									</tr>
111
+								</thead>
112
+								<tbody>
113
+									<tr *ngFor="let data of codeMultiData let index = index">
114
+										<td>{{index+1}}</td>
115
+										<td>{{ data.specimenCode}}</td>
116
+										<td>
117
+											{{data.partSource?data.partSource.name:''}}{{data.organ?data.organ.name:''}}{{data.specimenName}}
118
+										</td>
119
+										<td *ngIf="dataType=='receive'">
120
+											<div *ngIf="data.isScan==1">已接收</div>
121
+											<div *ngIf="data.isScan==0" class="red">未接收</div>
122
+										</td>
123
+										<td *ngIf="dataType=='pack'">
124
+											<div *ngIf="data.isScan==1">已扫描</div>
125
+											<div *ngIf="data.isScan==0" class="red">未扫描</div>
126
+										</td>
127
+									</tr>
128
+								</tbody>
129
+							</nz-table>
130
+						</div>
131
+					</div>
132
+				</div>
133
+			</div>
134
+		</div>
135
+		<div class="display_flex justify-content_flex-center bottom-btn">
136
+			<button class="btn btn-right" *ngIf="dataType=='receive'" nz-button nzType="primary" (click)="submitMultiForm()" [nzLoading]="btnMultiLoading">确认接收</button>
137
+			<button class="btn btn-right" *ngIf="dataType=='pack'" nz-button nzType="primary" (click)="submitMultiScanForm()" [nzLoading]="btnMultiLoading">扫描完成</button>
138
+			<button class="btn cancel" nz-button nzType="default" (click)="hideMultiModal()">取消</button>
139
+		</div>
140
+	</div>
141
+</div>
142
+
143
+
144
+
145
+<!-- 操作成功/失败提示框 -->
146
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
147
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
148
+	
149
+
150
+<div class="mask-style" *ngIf="isSpinning">
151
+	<nz-spin nzSimple class="spin-style"></nz-spin>
152
+</div>
153
+
154
+<!-- 人员交接 -->
155
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="connectModal">
156
+	<div class="modalBody">
157
+		<div class="title">人员交接<i class="icon_transport transport-guanbi" (click)="hideConnectModal()"></i>
158
+		</div>
159
+		<div class="content">
160
+		 <div class="title-class">
161
+			 <div>配送人应送达:单据{{mustReceived.pathologyFormNum}}张、
162
+			 标本{{mustReceived.specimenNum}}、速冻标本{{mustReceived.rapidityNum}}</div>
163
+			 <div>本次共接收单据
164
+			 <span [ngClass]="{'red': currReceived.pathologyFormNum < mustReceived.pathologyFormNum}">
165
+				 {{currReceived.pathologyFormNum}}
166
+			 </span>张、
167
+			 标本<span [ngClass]="{'red': currReceived.specimenNum<mustReceived.specimenNum}">{{currReceived.specimenNum}}</span>、速冻标本
168
+			 <span [ngClass]="{'red': currReceived.rapidityNum<mustReceived.rapidityNum}">{{currReceived.rapidityNum}}</span>
169
+			 </div>
170
+			</div>
171
+		 <form nz-form [formGroup]="validateConnectForm" class="addForm" (ngSubmit)="submitConnectForm()">
172
+			<nz-form-item>
173
+				<nz-form-label nzRequired nzFor="receptionNumber">接收人工号</nz-form-label>
174
+				<nz-form-control nzErrorTip="请输入接收人工号!">
175
+					<input nz-input (ngModelChange)="receptionChange($event)" formControlName="receptionNumber" placeholder="请输入接收人工号" nzSize="default" />
176
+				</nz-form-control>
177
+			</nz-form-item>
178
+			<nz-form-item class="form-name">
179
+				<nz-form-label style="margin-left: 12px;">接收人姓名</nz-form-label>
180
+				<!-- <nz-form-control nzErrorTip="请输入接收人工号!"> -->
181
+					<div class="job-class">{{receptionName}}</div>
182
+				<!-- </nz-form-control> -->
183
+			</nz-form-item>
184
+			<nz-form-item>
185
+				<nz-form-label nzRequired nzFor="dispatchingNumber">配送人工号</nz-form-label>
186
+				<nz-form-control nzErrorTip="请输入配送人工号!">
187
+					<input nz-input (ngModelChange)="dispatchingChange($event)" formControlName="dispatchingNumber" placeholder="请输入配送人工号" nzSize="default" />
188
+				</nz-form-control>
189
+			</nz-form-item>
190
+			<nz-form-item class="form-name">
191
+				<nz-form-label style="margin-left: 12px;">配送人姓名</nz-form-label>
192
+				<!-- <nz-form-control nzErrorTip="请输入配送人工号!"> -->
193
+					<div class="job-class">{{dispatchingName}}</div>
194
+				<!-- </nz-form-control> -->
195
+			</nz-form-item>
196
+		 </form>
197
+		</div>
198
+		<div class="display_flex justify-content_flex-center">
199
+			<button class="btn" nz-button nzType="primary" (click)="submitConnectForm()" [nzLoading]="btnConnectLoading">确定</button>
200
+			<button class="btn cancel" nz-button nzType="default" (click)="hideConnectModal()">取消</button>
201
+		</div>
202
+	</div>
203
+</div>
204
+
205
+<!-- 配送接收 -->
206
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="receptionModal">
207
+	<div class="modalBody">
208
+		<div class="title">配送接收<i class="icon_transport transport-guanbi" (click)="hideReceptionModal()"></i>
209
+		</div>
210
+		<div class="content">
211
+		 <div class="title-class">
212
+			 包内含申请单{{otherData.pathologyFormNum}}张、标本{{otherData.specimenNum}},请确认接收。
213
+			</div>
214
+		 <form nz-form [formGroup]="validateConnectForm" class="addForm" (ngSubmit)="submitReceptionForm()">
215
+			<nz-form-item>
216
+				<nz-form-label nzRequired nzFor="receptionNumber">接收人工号</nz-form-label>
217
+				<nz-form-control nzErrorTip="请输入接收人工号!">
218
+					<input nz-input (ngModelChange)="receptionChange($event)" formControlName="receptionNumber" placeholder="请输入接收人工号" nzSize="default" />
219
+				</nz-form-control>
220
+			</nz-form-item>
221
+			<nz-form-item class="form-name">
222
+				<nz-form-label style="margin-left: 12px;">接收人姓名</nz-form-label>
223
+				<!-- <nz-form-control nzErrorTip="请输入接收人工号!"> -->
224
+					<div class="job-class">{{receptionName}}</div>
225
+				<!-- </nz-form-control> -->
226
+			</nz-form-item>
227
+			<nz-form-item>
228
+				<nz-form-label nzRequired nzFor="dispatchingNumber">配送人工号</nz-form-label>
229
+				<nz-form-control nzErrorTip="请输入配送人工号!">
230
+					<input nz-input (ngModelChange)="dispatchingChange($event)" formControlName="dispatchingNumber" placeholder="请输入配送人工号" nzSize="default" />
231
+				</nz-form-control>
232
+			</nz-form-item>
233
+			<nz-form-item class="form-name">
234
+				<nz-form-label style="margin-left: 12px;">配送人姓名</nz-form-label>
235
+				<!-- <nz-form-control nzErrorTip="请输入配送人工号!"> -->
236
+					<div class="job-class">{{dispatchingName}}</div>
237
+				<!-- </nz-form-control> -->
238
+			</nz-form-item>
239
+		 </form>
240
+		</div>
241
+		<div class="display_flex justify-content_flex-center">
242
+			<button class="btn" nz-button nzType="primary" (click)="submitReceptionForm()" [nzLoading]="btnConnectLoading">确定接收</button>
243
+			<button class="btn cancel" nz-button nzType="default" (click)="hideReceptionModal()">取消</button>
244
+		</div>
245
+	</div>
246
+</div>
247
+
248
+<!-- 打包并打印 -->
249
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="packModal">
250
+	<div class="modalBody">
251
+		<div class="title">打包并打印<i class="icon_transport transport-guanbi" (click)="hidePackModal()"></i>
252
+		</div>
253
+		<div class="content-modal">
254
+			 本次共扫描单据{{otherData.pathologyFormNum}}张、标本{{otherData.specimenNum}},是否打包并打印?
255
+		</div>
256
+		<div class="display_flex justify-content_flex-center">
257
+			<button class="btn" nz-button nzType="primary" (click)="submitPackForm()" [nzLoading]="btnPackLoading">打包并打印</button>
258
+			<button class="btn cancel" nz-button nzType="default" (click)="hidePackModal()">取消</button>
259
+		</div>
260
+	</div>
261
+</div>
262
+
263
+<!-- 打印 -->
264
+<div id="report" style="display: none;">
265
+	<div class="monad">
266
+		<div style="font-size: 10px;padding: 2px;">
267
+			<!-- <div> -->
268
+				<div style="display: flex;align-items: center;justify-content: center;">
269
+					<img style="width: 100%;height: 60px;" [src]="printData.qrCode" alt="">
270
+				</div>
271
+				<div style="padding: 1px;">
272
+					<div style="display: flex;flex-wrap: nowrap;margin-bottom:3px;">包码:{{printData.packCode}}</div>
273
+					<div style="display: flex;">打包时间:{{printData.packTime|date:'yyyy-MM-dd HH:mm:ss'}}</div>
274
+					<!-- <div style="display: flex;">打包人:{{printData.packUserDTO?printData.packUserDTO.name:'-'}}</div> -->
275
+					<!-- <div style="display: flex;margin-bottom:6px;">申请单数:{{printData.pathologyFormNum}}</div> -->
276
+					<!-- <div style="display: flex;margin-bottom:6px;">标本数:{{printData.specimenNum}}</div> -->
277
+				</div>
278
+			<!-- </div> -->
279
+			<!-- <div style="display: flex;">打包时间:{{printData.packTime|date:'yyyy-MM-dd HH:mm:ss'}}</div> -->
280
+		</div>
281
+	</div>
282
+</div>

Різницю між файлами не показано, бо вона завелика
+ 1290 - 0
src/app/views/pathologyScan/pathologyScan.component.less


Різницю між файлами не показано, бо вона завелика
+ 1194 - 0
src/app/views/pathologyScan/pathologyScan.component.ts


+ 17 - 0
src/app/views/pathologyScan/pathologyScan.module.ts

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

+ 4 - 5
src/app/views/round-robin/round-robin.component.html

@@ -191,9 +191,9 @@
191 191
             </nz-form-control>
192 192
           </nz-form-item>
193 193
           <ng-container *ngIf="selectedTasktype">
194
-            <nz-form-item *ngIf="selectedTasktype.associationType.value=='specimenPlan'">
194
+            <nz-form-item *ngIf="selectedTasktype.associationType.value=='specimenPlan' || selectedTasktype.associationType.value=='specimen'">
195 195
               <nz-form-label [nzSm]="6" [nzXs]="24"
196
-                [nzRequired]="selectedTasktype.associationType.value=='specimenPlan'" nzFor="endDepartment">终点科室
196
+                [nzRequired]="selectedTasktype.associationType.value=='specimenPlan' || selectedTasktype.associationType.value=='specimen'" nzFor="endDepartment">终点科室
197 197
               </nz-form-label>
198 198
               <nz-form-control nzErrorTip="请选择终点科室!">
199 199
                 <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false" formControlName="endDepartment"
@@ -220,9 +220,8 @@
220 220
           </ng-container>
221 221
         </form>
222 222
         <ng-container *ngIf="selectedTasktype">
223
-          <p *ngIf="selectedTasktype.associationType.value=='specimenPlan'" class="roundRobinTips">
224
-            提示:起点科室即为标本开通科室;执行人即为科室绑定人员设定;前往设置<a [routerLink]="['/main','officeManagement']">开通科室</a>、<a
225
-              [routerLink]="['/main','workAssignment']">工作分配</a>>>
223
+          <p *ngIf="selectedTasktype.associationType.value=='specimenPlan' || selectedTasktype.associationType.value=='specimen'" class="roundRobinTips">
224
+            提示:起点科室即为标本开通科室;执行人即为科室绑定人员设定;前往设置开通科室、工作分配
226 225
           </p>
227 226
           <p *ngIf="selectedTasktype.associationType.value=='other'&&(selectedTasktype.carryingCourses[0].departmentStrategy.value==1||selectedTasktype.carryingCourses[1].departmentStrategy.value==1)"
228 227
             class="roundRobinTips">

+ 43 - 25
src/app/views/round-robin/round-robin.component.ts

@@ -114,7 +114,6 @@ export class RoundRobinComponent implements OnInit {
114 114
         this.validateForm.controls.endDepartment.setValue(null);
115 115
       }
116 116
     }
117
-
118 117
     let data = {
119 118
       department: {
120 119
         hospital: { id },
@@ -190,17 +189,23 @@ export class RoundRobinComponent implements OnInit {
190 189
   depting = "";
191 190
   searchDepartment(dept, type) {
192 191
     this.depting = dept;
193
-    let postData = {
194
-      department: {
195
-        dept,
196
-        type: { id: 383 },
197
-        hospital: {
198
-          id: this.hosId,
199
-        },
200
-      },
201
-      idx: 0,
202
-      sum: 5,
203
-    };
192
+		let postData={
193
+			department: {
194
+				dept,
195
+				hospital: { id: this.hosId },
196
+				cascadeHosId: this.hosId,
197
+				type: { id: null },
198
+			},
199
+			idx: 0,
200
+			sum: 5,
201
+		}
202
+		if(this.selectedTasktype.associationType.value == "specimen"){
203
+			postData.department.type.id = 282
204
+			delete postData.department.hospital
205
+		}else{
206
+			postData.department.type.id = 383
207
+			delete postData.department.cascadeHosId
208
+		}
204 209
     this.mainService
205 210
       .getFetchDataList("data", "department", postData)
206 211
       .subscribe((result) => {
@@ -288,7 +293,7 @@ export class RoundRobinComponent implements OnInit {
288 293
       sum: 5,
289 294
       taskType: {
290 295
         hosIds: this.hosId + "",
291
-        associationTypeIds: "380,259",
296
+        associationTypeIds: "380,259,256",
292 297
         taskName,
293 298
       },
294 299
     };
@@ -308,6 +313,7 @@ export class RoundRobinComponent implements OnInit {
308 313
   addModal() {
309 314
     this.add = true; //新增
310 315
     this.modal = true;
316
+		this.selectedTasktype = null;
311 317
     this.initForm();
312 318
   }
313 319
   //关闭新增/编辑弹框
@@ -441,7 +447,8 @@ export class RoundRobinComponent implements OnInit {
441 447
           executeTime: new Date(this.validateForm.value.executeTime).getTime(),
442 448
         },
443 449
       };
444
-      if (this.selectedTasktype.associationType.value == "specimenPlan") {
450
+      if (this.selectedTasktype.associationType.value == "specimenPlan"||
451
+					this.selectedTasktype.associationType.value == "specimen") {
445 452
         //标本轮巡
446 453
         postData.orderPlan.targetDept =
447 454
           this.validateForm.value.endDepartment.join();
@@ -475,7 +482,8 @@ export class RoundRobinComponent implements OnInit {
475 482
         dayType: this.validateForm.value.datesType,
476 483
         executeTime: new Date(this.validateForm.value.executeTime).getTime(),
477 484
       };
478
-      if (this.selectedTasktype.associationType.value == "specimenPlan") {
485
+      if (this.selectedTasktype.associationType.value == "specimenPlan"||
486
+				this.selectedTasktype.associationType.value == "specimen") {
479 487
         //标本轮巡
480 488
         postData.targetDept = this.validateForm.value.endDepartment.join();
481 489
       } else if (this.selectedTasktype.associationType.value == "other") {
@@ -541,7 +549,7 @@ export class RoundRobinComponent implements OnInit {
541 549
         sum: 5,
542 550
         taskType: {
543 551
           hosIds: this.hosId + "",
544
-          associationTypeIds: "380,259",
552
+          associationTypeIds: "380,259,256",
545 553
           taskName: "",
546 554
         },
547 555
       };
@@ -585,7 +593,8 @@ export class RoundRobinComponent implements OnInit {
585 593
     }
586 594
     //轮巡策略(时间)end
587 595
     // --------终点科室---
588
-    if (data.taskType.associationType.value == "specimenPlan") {
596
+    if (data.taskType.associationType.value == "specimenPlan" ||
597
+			this.selectedTasktype.associationType.value == "specimen") {
589 598
       //标本轮巡,则回显
590 599
       let targetDeptArr = [];
591 600
       let targetDept = data.targetDept.split(",");
@@ -593,15 +602,24 @@ export class RoundRobinComponent implements OnInit {
593 602
       targetDept.forEach((item, index) => {
594 603
         targetDeptArr.push({ id: item, dept: targetDeptShow[index] });
595 604
       });
605
+			let query={
606
+				department: {
607
+					hospital: { id: data.hospital },
608
+					cascadeHosId:data.hospital,
609
+					type: { id: null },
610
+				},
611
+				idx: 0,
612
+				sum: 20,
613
+			}
614
+			if(this.selectedTasktype.associationType.value == "specimen"){
615
+				query.department.type.id = 282
616
+				delete query.department.hospital
617
+			}else{
618
+				query.department.type.id = 383
619
+				delete query.department.cascadeHosId
620
+			}
596 621
       this.mainService
597
-        .getFetchDataList("data", "department", {
598
-          department: {
599
-            hospital: { id: data.hospital },
600
-            type: { id: 383 },
601
-          },
602
-          idx: 0,
603
-          sum: 20,
604
-        })
622
+        .getFetchDataList("data", "department", query)
605 623
         .subscribe((data) => {
606 624
           this.maskFlagLoading2 = false;
607 625
           if (!this.maskFlagLoading1 && !this.maskFlagLoading2) {

+ 24 - 0
src/app/views/specimen-room-view/specimen-room-view-routing.module.ts

@@ -0,0 +1,24 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { SpecimenRoomViewComponent } from "./specimen-room-view.component";
4
+import { DetailSampleComponent } from 'src/app/share/detail-sample/detail-sample.component';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: "",
9
+    component: SpecimenRoomViewComponent,
10
+    // children: [
11
+    //   {
12
+    //     // 工单详情-标本
13
+    //     path: "detailSample/:id",
14
+    //     component: DetailSampleComponent,
15
+    //   },
16
+    // ],
17
+  },
18
+];
19
+
20
+@NgModule({
21
+  imports: [RouterModule.forChild(routes)],
22
+  exports: [RouterModule],
23
+})
24
+export class SpecimenRoomViewRoutingModule {}

+ 709 - 0
src/app/views/specimen-room-view/specimen-room-view.component.html

@@ -0,0 +1,709 @@
1
+<div class="pharmacy">
2
+  <!-- 头部 start -->
3
+  <div class="pharmacy-header">
4
+   <div class="pharmacy-logo">
5
+<!--      <img
6
+        [src]="tool.logoUrl"
7
+        class="pharmacy-logo__img"
8
+        [alt]="tool.logoTitle"
9
+      />
10
+      <h1 class="pharmacy-logo__name">{{tool.logoTitle}}</h1> -->
11
+			<h2 class="pharmacy-name__title">
12
+			  <span>标本间</span>
13
+			  <!-- <span class="currentDate">{{ time | date: "yyyy年MM月dd日" }}</span> -->
14
+			</h2>
15
+    </div>
16
+    <div class="pharmacy-name">
17
+      <div class="pharmacy-name__total">
18
+				<div class="pharmacy-title">标本条码:</div>
19
+				<nz-input-group nzSize="large">
20
+					<input type="text" id="Binput" (ngModelChange)="specimenCodeChange($event)" [(ngModel)]="barCode" nz-input placeholder="请输入条码" />
21
+				</nz-input-group>
22
+				<!-- <ng-template #suffixButton>
23
+					<button nz-button nzType="primary" nzSize="large" nzSearch (click)="searchSpecimen()">搜索</button>
24
+				</ng-template> -->
25
+      </div>
26
+			<div>
27
+				<div class="error-class">{{searchMsg}}</div>
28
+			</div>
29
+    </div>
30
+    <div class="userInfo">
31
+      <div class="wel">欢迎您:</div>
32
+      <div class="user">
33
+        <img src="../../assets/images/icon_keshi.png" alt="" />
34
+        <span *ngIf="deptDisplay">{{
35
+          deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept
36
+        }}</span>
37
+      </div>
38
+      <div class="userInfo-wrap">
39
+        <div class="logOut" (click)="changeKsNow()">切换科室</div>
40
+        <div class="logOut" (click)="logOut()">退出</div>
41
+      </div>
42
+    </div>
43
+  </div>
44
+  <!-- 头部 end -->
45
+  <!-- 主体部分 start -->
46
+  <div class="pharmacy-main">
47
+    <!-- 手术间标本start -->
48
+    <div class="pharmacy-main__list pharmacy-main__print">
49
+      <!-- 标题 start -->
50
+      <div class="pharmacy-main__title">
51
+        <strong>手术间标本</strong>
52
+				<span *ngIf="printPharmacyList.length>0">共 {{printPharmacyList.length}} 条</span>
53
+        <span class="autoUpdate">{{ logTime }}秒</span>
54
+      </div>
55
+      <!-- 标题 end -->
56
+      <!-- 搜索框 start -->
57
+      <div class="pharmacy-main__search">
58
+        <div class="pharmacy-main__searchInput">
59
+          <input
60
+            nz-input
61
+            placeholder="请输入关键字"
62
+            [(ngModel)]="printPharmacySearchKey"
63
+          />
64
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('surgeryDept')">
65
+            <i nz-icon nzType="search"></i>
66
+            <span>搜索</span>
67
+          </div>
68
+        </div>
69
+      </div>
70
+      <!-- 搜索框 end -->
71
+      <!-- 列表 start -->
72
+      <overlay-scrollbars #osComponentRef1 class="pharmacy-main__selectionWrap">
73
+        <div *ngIf="!loading1" style="height: 100%">
74
+          <div
75
+            class="pharmacy-main__selection noPointer"
76
+            *ngFor="let item of printPharmacyList"
77
+						(click)="viewDetail(item,1)"
78
+          >
79
+            <div class="pharmacy-main__selectionInfo">
80
+              <div class="pharmacy-main__selectionItem">
81
+                <span title="住院号" class="weight">
82
+									<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
83
+									{{item.applyCode || '无'}}
84
+								</span>
85
+                <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
86
+              </div>
87
+              <div class="pharmacy-main__selectionItem">
88
+                <span class="text-left" [title]="item.takePart">部位:{{item.takePart || '无'}}</span>
89
+                <span class="text-right" title="标本数">标本数:{{item.specimenNum || '无'}}</span>
90
+              </div>
91
+              <div class="pharmacy-main__selectionItem">
92
+                <span title="手术间">手术间:{{item.surgeryDeptDTO.dept || '无'}}</span>
93
+                <span class="text-right" title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
94
+              </div>
95
+            </div>
96
+          </div>
97
+          <div
98
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
99
+            *ngIf="printPharmacyList.length === 0"
100
+          >
101
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
102
+          </div>
103
+          <!-- <div
104
+            (click)="loadMore(1)"
105
+            class="pharmacy-main__selection pharmacy-main__selection--more"
106
+            *ngIf="printPharmacyFlag"
107
+          >
108
+            <div class="pharmacy-main__selectionInfo">
109
+              <i
110
+                nz-icon
111
+                nzType="loading"
112
+                nzTheme="outline"
113
+                class="pharmacy-main__selection--icon"
114
+                *ngIf="printPharmacyLoad"
115
+              ></i
116
+              >查看更多
117
+            </div>
118
+          </div> -->
119
+        </div>
120
+        <div
121
+          *ngIf="loading1"
122
+          style="height: calc(100vh - 212px); min-height: 556px"
123
+        >
124
+          <div
125
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
126
+          >
127
+            <div class="loadingFullInner">
128
+              <img src="../../../assets/images/loading.gif" alt="" />
129
+              <div>加载中...</div>
130
+            </div>
131
+          </div>
132
+        </div>
133
+      </overlay-scrollbars>
134
+      <!-- 列表 end -->
135
+    </div>
136
+
137
+    <!-- 标本间标本 start -->
138
+    <div class="pharmacy-main__list pharmacy-main__waitDelivery">
139
+      <!-- 标题 start -->
140
+      <div class="pharmacy-main__title">
141
+        <strong>标本间标本</strong>
142
+				<span *ngIf="waitPharmacyList.length>0">共 {{waitPharmacyList.length}} 条</span>
143
+        <span class="autoUpdate">{{ logTime }}秒</span>
144
+      </div>
145
+      <!-- 标题 end -->
146
+      <!-- 搜索框 start -->
147
+      <div class="pharmacy-main__search">
148
+        <div class="pharmacy-main__searchInput">
149
+          <input
150
+            nz-input
151
+            placeholder="请输入关键字"
152
+            [(ngModel)]="waitPharmacySearchKey"
153
+          />
154
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('specimenDept')">
155
+            <i nz-icon nzType="search"></i>
156
+            <span>搜索</span>
157
+          </div>
158
+        </div>
159
+      </div>
160
+      <!-- 搜索框 end -->
161
+      <!-- 列表 start -->
162
+      <overlay-scrollbars #osComponentRef2 class="pharmacy-main__selectionWrap">
163
+        <div *ngIf="!loading2" style="height: 100%">
164
+          <div
165
+            class="pharmacy-main__selection"
166
+            *ngFor="let item of waitPharmacyList; let i = index"
167
+						(click)="viewDetail(item,2)"
168
+          >
169
+            <div class="pharmacy-main__selectionInfo">
170
+              <div class="pharmacy-main__selectionItem">
171
+                <span title="住院号" class="weight">
172
+            			<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
173
+            			{{item.applyCode || '无'}}
174
+            		</span>
175
+                <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
176
+              </div>
177
+              <div class="pharmacy-main__selectionItem">
178
+                <span class="text-left" [title]="item.takePart">部位:{{item.takePart || '无'}}</span>
179
+                <span class="text-right" title="标本数">标本数:{{item.specimenNum || '无'}}</span>
180
+              </div>
181
+              <div class="pharmacy-main__selectionItem">
182
+                <span title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
183
+								<span class="text-right" title="固定时间">固定时间:{{item.fixationTime?(item.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
184
+              </div>
185
+            </div>
186
+          </div>
187
+          <div
188
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
189
+            *ngIf="waitPharmacyList.length === 0"
190
+          >
191
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
192
+          </div>
193
+          <!-- <div
194
+            (click)="loadMore(2)"
195
+            class="pharmacy-main__selection pharmacy-main__selection--more"
196
+            *ngIf="waitPharmacyFlag"
197
+          >
198
+            <div class="pharmacy-main__selectionInfo">
199
+              <i
200
+                nz-icon
201
+                nzType="loading"
202
+                nzTheme="outline"
203
+                class="pharmacy-main__selection--icon"
204
+                *ngIf="waitPharmacyLoad"
205
+              ></i
206
+              >查看更多
207
+            </div>
208
+          </div> -->
209
+        </div>
210
+        <div
211
+          *ngIf="loading2"
212
+          style="height: calc(100vh - 212px); min-height: 556px"
213
+        >
214
+          <div
215
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
216
+          >
217
+            <div class="loadingFullInner">
218
+              <img src="../../../assets/images/loading.gif" alt="" />
219
+              <div>加载中...</div>
220
+            </div>
221
+          </div>
222
+        </div>
223
+      </overlay-scrollbars>
224
+      <!-- 列表 end -->
225
+    </div>
226
+
227
+    <!-- 今日离科标本 start -->
228
+    <div class="pharmacy-main__list pharmacy-main__delivery">
229
+      <!-- 标题 start -->
230
+      <div class="pharmacy-main__title">
231
+        <strong>今日离科标本</strong>
232
+				<span *ngIf="pharmacyList.length>0">共 {{pharmacyList.length}} 条</span>
233
+        <span class="autoUpdate">{{ logTime }}秒</span>
234
+      </div>
235
+      <!-- 标题 end -->
236
+      <!-- 搜索框 start -->
237
+      <div class="pharmacy-main__search">
238
+        <div class="pharmacy-main__searchInput">
239
+          <input
240
+            nz-input
241
+            placeholder="请输入关键字"
242
+            [(ngModel)]="pharmacySearchKey"
243
+          />
244
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle('leavedDept')">
245
+            <i nz-icon nzType="search"></i>
246
+            <span>搜索</span>
247
+          </div>
248
+        </div>
249
+      </div>
250
+      <!-- 搜索框 end -->
251
+      <!-- 列表 start -->
252
+      <overlay-scrollbars #osComponentRef3 class="pharmacy-main__selectionWrap">
253
+        <div *ngIf="!loading3" style="height: 100%">
254
+          <div
255
+            class="pharmacy-main__selection"
256
+            *ngFor="let item of pharmacyList; let i = index"
257
+						(click)="viewDetail(item,3)"
258
+          >
259
+            <div class="pharmacy-main__selectionInfo">
260
+              <div class="pharmacy-main__selectionItem">
261
+                <span title="住院号" class="weight">
262
+            			<span class="sign-red" *ngIf="item.intraoperativeRapidity==1">速冻</span>
263
+            			{{item.applyCode || '无'}}
264
+            		</span>
265
+                <span title="姓名" class="weight text-right">{{item.patientDTO.patientName || '无'}}</span>
266
+              </div>
267
+              <div class="pharmacy-main__selectionItem">
268
+                <span class="text-left" [title]="item.takePart">部位:{{item.takePart || '无'}}</span>
269
+                <span class="text-right" title="标本数">标本数:{{item.specimenNum || '无'}}</span>
270
+              </div>
271
+              <div class="pharmacy-main__selectionItem">
272
+                <span title="离体时间">离体时间:{{item.inVitroTime?(item.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
273
+            		<span class="text-right" title="固定时间">固定时间:{{item.fixationTime?(item.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
274
+              </div>
275
+							<div class="pharmacy-main__selectionItem">
276
+							  <span title="配送人">配送人:{{item.deliveryUserDTO?item.deliveryUserDTO.name:'无'}}</span>
277
+								<span class="text-right" title="离科时间">离科时间:{{item.leaveDeptTime?(item.leaveDeptTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</span>
278
+							</div>
279
+            </div>
280
+          </div>
281
+          <div
282
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
283
+            *ngIf="pharmacyList.length === 0"
284
+          >
285
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
286
+          </div>
287
+          <!-- <div
288
+            (click)="loadMore(3)"
289
+            class="pharmacy-main__selection pharmacy-main__selection--more"
290
+            *ngIf="pharmacyFlag"
291
+          >
292
+            <div class="pharmacy-main__selectionInfo">
293
+              <i
294
+                nz-icon
295
+                nzType="loading"
296
+                nzTheme="outline"
297
+                class="pharmacy-main__selection--icon"
298
+                *ngIf="pharmacyLoad"
299
+              ></i
300
+              >查看更多
301
+            </div>
302
+          </div> -->
303
+        </div>
304
+        <div
305
+          *ngIf="loading3"
306
+          style="height: calc(100vh - 212px); min-height: 556px"
307
+        >
308
+          <div
309
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
310
+          >
311
+            <div class="loadingFullInner">
312
+              <img src="../../../assets/images/loading.gif" alt="" />
313
+              <div>加载中...</div>
314
+            </div>
315
+          </div>
316
+        </div>
317
+      </overlay-scrollbars>
318
+      <!-- 列表 end -->
319
+    </div>
320
+  </div>
321
+  <!-- 主体部分 end -->
322
+  <router-outlet></router-outlet>
323
+</div>
324
+
325
+<!-- 科室切换提示框 -->
326
+<app-hs-prompt-modal
327
+  [changeShow]="changeShow"
328
+  [closeTime]="closeTime"
329
+  [closeTimeFlag]="closeTimeFlag"
330
+  [show]="hsPromptModalShow"
331
+  (closeModelHs)="closeModelHs($event)"
332
+  (clearModelHs)="clearModelHs($event)"
333
+  deptType="nurse"
334
+> 
335
+  <!-- 返回系统按钮 -->
336
+  <!-- 右侧悬浮框 -->
337
+   <div id="fixedMenu" class="fixed" *ngIf="mainRole">
338
+    <div class="right">
339
+      <div class="fixedMenu hujiaozhongxin">
340
+        <div class="menuItems">
341
+          <div class="item">快捷菜单</div>
342
+        </div>
343
+      </div>
344
+      <div class="fixedMenu">
345
+        <div class="menuItems">
346
+          <div
347
+            class="others"
348
+            [ngStyle]="{
349
+              height: showLastItems
350
+                ? mainRole
351
+                  ? 35 * 2 + 'px'
352
+                  : 35 * 1 + 'px'
353
+                : 0
354
+            }"
355
+          >
356
+            <div
357
+              [ngClass]="{ item: true, checked: fixedTab == 'back' }"
358
+              *ngIf="mainRole"
359
+              (click)="checkFixedTab('toSystem')"
360
+            >
361
+              返回系统
362
+            </div>
363
+          </div>
364
+        </div>
365
+        <div class="arrow" *ngIf="!showLastItems" (click)="fixedMenuXiala()">
366
+          <i class="icon_transport transport-xiala2-01"></i>
367
+        </div>
368
+        <div class="arrow" *ngIf="showLastItems" (click)="fixedMenuShangla()">
369
+          <i class="icon_transport transport-shangla-"></i>
370
+        </div>
371
+      </div>
372
+    </div>
373
+    <div
374
+      *ngIf="showLastItems && fixedTab != ''"
375
+      (click)="fixedMenuShangla()"
376
+      class="fixedMark"
377
+    ></div>
378
+  </div>
379
+</app-hs-prompt-modal>
380
+
381
+<!-- 标本历史记录查看 -->
382
+<!-- <app-history-prompt-modal
383
+  *ngIf="logPromptModalShow"
384
+  [show]="logPromptModalShow"
385
+  [scode]="scode"
386
+  (closeModelHs)="closeModelLog($event)"
387
+></app-history-prompt-modal> -->
388
+
389
+<!-- 标本列表查看 -->
390
+<!-- <app-spe-prompt-modal
391
+  *ngIf="spePromptModalShow"
392
+  [show]="spePromptModalShow"
393
+  [checkDeptId]="checkDeptId"
394
+  [pharmacySearchKey]="pharmacySearchKey"
395
+  [printDate]="printDate"
396
+  (closeModelHs)="closeModelSpe($event)"
397
+></app-spe-prompt-modal> -->
398
+
399
+<!-- 工单列表查看 -->
400
+<!-- <app-order-prompt-modal
401
+  *ngIf="orderPromptModalShow"
402
+  [show]="orderPromptModalShow"
403
+  [workId]="workId"
404
+  (closeModelHs)="closeModelOrder($event)"
405
+></app-order-prompt-modal> -->
406
+
407
+<!-- 关联标本/手术室 -->
408
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="relevanceModal">
409
+	<div class="modalBody">
410
+		<div class="title">关联科室</div>
411
+		<overlay-scrollbars #osComponentRef1 class="content">
412
+		 <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
413
+			<nz-form-item>
414
+				<nz-form-label nzRequired nzFor="specimen" [nzSm]="5" [nzXs]="24">关联标本间</nz-form-label>
415
+				<nz-form-control nzErrorTip="请选择标本间!" [nzSm]="19" [nzXs]="24">
416
+					<nz-input-group>
417
+						<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择标本间" formControlName="specimen">
418
+							<ng-container *ngFor="let option of specimenData">
419
+								<nz-option [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
420
+							</ng-container>
421
+						</nz-select>
422
+					</nz-input-group>
423
+				</nz-form-control>
424
+			</nz-form-item>
425
+			
426
+			<nz-form-item>
427
+				<nz-form-label nzRequired nzFor="operation" [nzSm]="5" [nzXs]="24">关联手术间</nz-form-label>
428
+				<nz-form-control nzErrorTip="请选择手术间!" [nzSm]="19" [nzXs]="24">
429
+					<nz-input-group>
430
+						<nz-select class="formItem" nzMode="multiple" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择请选择手术间" formControlName="operation">
431
+							<ng-container *ngFor="let option of operationData">
432
+								<nz-option [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
433
+							</ng-container>
434
+						</nz-select>
435
+					</nz-input-group>
436
+				</nz-form-control>
437
+			</nz-form-item>
438
+			
439
+			<nz-form-item>
440
+				<nz-form-label nzRequired nzFor="generate">标本是否直接生成配送单</nz-form-label>
441
+				<nz-form-control nzErrorTip="请选择!">
442
+					<nz-radio-group formControlName="generate">
443
+						<label nz-radio [nzValue]="1">是</label>
444
+						<label nz-radio [nzValue]="0">否</label>
445
+					</nz-radio-group>
446
+				</nz-form-control>
447
+			</nz-form-item>
448
+		 </form>
449
+		</overlay-scrollbars>
450
+		<div class="display_flex justify-content_flex-center">
451
+			<button class="btn" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">确定</button>
452
+		</div>
453
+	</div>
454
+</div>
455
+
456
+
457
+<!-- 标本接收 -->
458
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="fixationModal">
459
+	<div class="pathology-content">
460
+		<div class="title">标本接收固定
461
+		<i class="icon_transport transport-guanbi" (click)="hideSpecimenModal()"></i></div>
462
+		<div class="content">
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>
479
+				<div class="form-title-box">
480
+					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
481
+				</div>
482
+				<div class="form-list">
483
+					<div class="form-title font-weight-500">诊断:</div>
484
+					<div class="indent">
485
+						{{codeData.diagnose||'无'}}
486
+					</div>
487
+				</div>
488
+				
489
+				<div class="form-list">
490
+					<div class="form-title font-weight-500">病历摘要:</div>
491
+					<div class="indent">{{codeData.medicalRecords||'无'}}</div>
492
+				</div>
493
+				<div class="form-list">
494
+					<div class="form-title font-weight-500">手术方案:</div>
495
+					<div class="indent">{{codeData.surgicalPlan||'无'}}</div>
496
+				</div>
497
+	<!-- 			<div class="form-list">
498
+					<div class="form-title font-weight-500">术中所见:</div>
499
+					<div class="indent">{{codeData.intraoperativeFindings||'无'}}</div>
500
+				</div> -->
501
+				<div class="form-title-box">
502
+					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{codeData.specimenType?codeData.specimenType.name:'无'}}</div>
503
+					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{codeData.specimenNum?codeData.specimenNum:'无'}}</div>
504
+				</div>
505
+				<div class="form-title-box">
506
+					<div class="form-title"><span class="font-weight-500">部位:</span>{{codeData.takePart||'无'}}</div>
507
+					<div class="form-title"><span class="font-weight-500">取标本位置:</span>{{codeData.surgeryDeptDTO?codeData.surgeryDeptDTO.dept:''}}</div>
508
+					<div class="form-title"><span class="font-weight-500">取材医生:</span>{{codeData.surgeryDoctorDTO?codeData.surgeryDoctorDTO.name : '-'}}</div>
509
+				</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
+			</div>
516
+			
517
+			<div class="content-item">
518
+				<div class="center">提示:申请单含<span class="red">{{codeData.specimenNum}}</span>只标本,已扫<span class="red">{{codeData.pathologySpecimenDTOList.length}}</span>只<span *ngIf="codeData.pathologySpecimenDTOList.length < codeData.specimenNum">,请继续扫描标本。</span></div>
519
+				<div class="disp-fl">
520
+					<div class="width-120">标本条码:</div>
521
+					<input nz-input id="specimen" [(ngModel)]="specimenCode" (ngModelChange)="codeChange($event)"/>
522
+				</div>
523
+				<div class="error-fix">{{fixationError}}</div>
524
+				<div class="list-template">
525
+				  <div class="list-template__content">
526
+						<div class="list-template__bottom" style="padding: 0 !important;">
527
+							<nz-table class="list-template__nzTable" [nzData]="codeData.pathologySpecimenDTOList" nzSize="middle" [nzShowPagination]="false"
528
+								[nzLoading]="tableLoading">
529
+								<thead>
530
+									<tr class="thead">
531
+										<th nzWidth="10%">序号</th>
532
+										<th>条码号</th>
533
+										<th>标本名称</th>
534
+									</tr>
535
+								</thead>
536
+								<tbody>
537
+									<tr *ngFor="let data of codeData.pathologySpecimenDTOList let index = index">
538
+										<td>{{index+1}}</td>
539
+										<td>{{ data.specimenCode}}</td>
540
+										<td>
541
+											{{data.partSource?data.partSource.name:''}}{{data.organ?data.organ.name:''}}{{data.specimenName}}
542
+										</td>
543
+									</tr>
544
+								</tbody>
545
+							</nz-table>
546
+						</div>
547
+					</div>
548
+				</div>
549
+			</div>
550
+		</div>
551
+		<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>
553
+			<button class="btn cancel" nz-button nzType="default" (click)="hideSpecimenModal()">取消</button>
554
+		</div>
555
+	</div>
556
+</div>
557
+
558
+<!-- 操作成功/失败提示框 -->
559
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
560
+  [info]="promptInfo" (closeModel)="closeModel()"></app-prompt-modal>
561
+	
562
+<!-- 标本固定信息 -->
563
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="verificationMoadl">
564
+	<div class="modalBody no-width">
565
+		<div class="title">标本固定信息<i class="icon_transport transport-guanbi" (click)="hideVerificationModal()"></i>
566
+		</div>
567
+		<div class="content">
568
+			<form nz-form [formGroup]="validateVerificationForm" class="addForm" (ngSubmit)="submitVerificationForm()">
569
+				<nz-form-item>
570
+				  <nz-form-label nzRequired [nzSpan]="6" nzFor="fixationTime">固定时间</nz-form-label>
571
+				  <nz-form-control [nzSpan]="18" nzErrorTip="请选择固定时间!">
572
+				    <nz-input-group>
573
+							<nz-date-picker formControlName="fixationTime" 
574
+							[nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" nzFormat="yyyy-MM-dd HH:mm:ss"
575
+							(ngModelChange)="formChangeDate($event)"></nz-date-picker>
576
+						</nz-input-group>
577
+				  </nz-form-control>
578
+				</nz-form-item>
579
+				<nz-form-item>
580
+				  <nz-form-label nzRequired [nzSpan]="6" nzFor="jobNumber">工号</nz-form-label>
581
+					<nz-form-control [nzSpan]="18" nzErrorTip="请输入工号!">
582
+						<input nz-input (ngModelChange)="numberChange($event)" formControlName="jobNumber" placeholder="请输入工号" nzSize="default" />
583
+					</nz-form-control>
584
+				</nz-form-item>
585
+				<nz-form-item>
586
+				  <nz-form-label nzRequired [nzSpan]="6" nzFor="name">姓名</nz-form-label>
587
+					<nz-form-control [nzSpan]="18" nzErrorTip="请输入姓名!">
588
+						<input nz-input disabled formControlName="name" placeholder="请输入姓名" nzSize="default" />
589
+					</nz-form-control>
590
+				</nz-form-item>
591
+				<nz-form-item>
592
+				  <nz-form-label nzRequired [nzSpan]="8" nzFor="fixative">固体液类型</nz-form-label>
593
+				  <nz-form-control [nzSpan]="16" nzErrorTip="请选择固体液类型!">
594
+				    <nz-input-group>
595
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择固体液类型" formControlName="fixative">
596
+							  <ng-container *ngFor="let option of fixativeData">
597
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
598
+							  </ng-container>
599
+							</nz-select>
600
+						</nz-input-group>
601
+				  </nz-form-control>
602
+				</nz-form-item>
603
+			</form>
604
+		</div>
605
+		<div class="display_flex justify-content_flex-center bottom-btn">
606
+			<button class="btn btn-right" nz-button nzType="primary" (click)="submitVerificationForm()" [nzLoading]="btnInfoLoading">确定</button>
607
+			<button class="btn cancel" nz-button nzType="default" (click)="hideVerificationModal()">取消</button>
608
+		</div>
609
+	</div>
610
+</div>
611
+
612
+<!-- 标本查看详情-->
613
+<div class="pathology-box display_flex align-items_center justify-content_flex-center" *ngIf="detailMoadl">
614
+	<div class="pathology-content">
615
+		<div class="title">查看详情
616
+		<i class="icon_transport transport-guanbi" (click)="closeDetailMoadl()"></i></div>
617
+		<div class="content">
618
+			<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>
627
+					<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>
630
+				
631
+				<div class="form-title-box">
632
+					<div class="form-title"><span class="font-weight-500">检验项目:</span>{{project||'无'}}</div>
633
+				</div>
634
+				
635
+				<div class="form-list">
636
+					<div class="form-title font-weight-500">诊断:</div>
637
+					<div class="indent">
638
+						{{detailsData.diagnose||'无'}}
639
+					</div>
640
+				</div>
641
+				
642
+				<div class="form-list">
643
+					<div class="form-title font-weight-500">病历摘要:</div>
644
+					<div class="indent">{{detailsData.medicalRecords||'无'}}</div>
645
+				</div>
646
+				<div class="form-list">
647
+					<div class="form-title font-weight-500">手术方案:</div>
648
+					<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
649
+				</div>
650
+	<!-- 			<div class="form-list">
651
+					<div class="form-title font-weight-500">术中所见:</div>
652
+					<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
653
+				</div> -->
654
+
655
+				<div class="form-title-box">
656
+					<div class="form-title"><span class="font-weight-500">标本类型:</span>{{detailsData.specimenType.name||'无'}}</div>
657
+					<div class="form-title"><span class="font-weight-500">标本数量:</span>{{detailsData.specimenNum||'无'}}</div>
658
+					<div class="form-title"><span class="font-weight-500">部位:</span>{{detailsData.takePart||'无'}}</div>
659
+				</div>
660
+				
661
+				<div class="form-title-box">
662
+					<div class="form-title"><span class="font-weight-500">送检医生:</span>{{detailsData.surgeryDoctorDTO?detailsData.surgeryDoctorDTO.name : '-'}}</div>
663
+					<div class="form-title"><span class="font-weight-500">离体时间:</span>{{detailsData.inVitroTime?(detailsData.inVitroTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
664
+					<div class="form-title"><span class="font-weight-500">固定时间:</span>{{detailsData.fixationTime?(detailsData.fixationTime|date:'yyyy-MM-dd HH:mm:ss'):'无'}}</div>
665
+				</div>
666
+				
667
+				<div class="form-list">
668
+					<div class="form-title font-weight-500">标本:</div>
669
+					<div class="form-title specimen-list">
670
+						<div *ngFor="let item of specimenList" class="specimen-item-class">
671
+							{{item.partSource?item.partSource.name:''}}{{item.organ?item.organ.name:''}}{{item.specimenName}}
672
+						</div>
673
+					</div>
674
+				</div>
675
+
676
+			</div>
677
+			
678
+			<div class="content-item-right">
679
+				<div class="step-title">病理闭环</div>
680
+				<nz-steps [nzCurrent]="stepLength" nzDirection="vertical" nzSize="small">
681
+					<ng-container *ngFor="let item of pathologyLogs; let index = index">
682
+							<nz-step
683
+								[nzDescription]="tpl"
684
+							>
685
+							</nz-step>
686
+							<ng-template #tpl>
687
+								<div *ngIf="index==pathologyLogs.length-1" class="step-size">
688
+									<div style="color: #49B856;">{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
689
+									<div style="color:#333;">{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
690
+								</div>
691
+								<div *ngIf="index!=pathologyLogs.length-1" class="step-size">
692
+									<div>{{item.operationType.name}}  {{item.handoverUserDto?item.handoverUserDto.name:''}}</div>
693
+									<div>{{item.createTime|date:'yyyy-MM-dd HH:mm:ss'}} {{item.operationUserDto.name}}</div>
694
+								</div>
695
+							</ng-template>
696
+						</ng-container>
697
+				</nz-steps>
698
+			</div>
699
+		</div>
700
+		<div class="display_flex justify-content_flex-center bottom-btn">
701
+			<button class="btn btn-right" nz-button nzType="primary" (click)="closeDetailMoadl()">知道了</button>
702
+			<!-- <button class="btn cancel" nz-button nzType="default" (click)="closeDetailMoadl()">取消</button> -->
703
+		</div>
704
+	</div>
705
+</div>
706
+
707
+<div class="mask-style" *ngIf="isSpinning">
708
+	<nz-spin nzSimple class="spin-style"></nz-spin>
709
+</div>

+ 835 - 0
src/app/views/specimen-room-view/specimen-room-view.component.less

@@ -0,0 +1,835 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  width: 100%;
4
+  background-color: #f9fafb;
5
+  .ant-btn[disabled] {
6
+    color: rgba(0, 0, 0, 0.25) !important;
7
+    background-color: #f5f5f5 !important;
8
+  }
9
+  .red {
10
+    color: red !important;
11
+    font-weight: bold !important;
12
+  }
13
+  .green {
14
+    color: @primary-color!important;
15
+    font-weight: bold !important;
16
+  }
17
+
18
+  h1,
19
+  h2,
20
+  h3,
21
+  p {
22
+    margin: 0;
23
+  }
24
+  em {
25
+    font-style: normal;
26
+  }
27
+	
28
+	
29
+	/* 修改垂直滚动条 */
30
+	::-webkit-scrollbar {
31
+		width: 4px; /* 修改宽度 */
32
+		border-radius: 2px;
33
+	}
34
+	 
35
+	/* 修改滚动条轨道背景色 */
36
+	::-webkit-scrollbar-track {
37
+		background-color: #f1f1f1;
38
+	}
39
+	 
40
+	/* 修改滚动条滑块颜色 */
41
+	::-webkit-scrollbar-thumb {
42
+		background-color: #888;
43
+	}
44
+	 
45
+	/* 修改滚动条滑块悬停时的颜色 */
46
+	::-webkit-scrollbar-thumb:hover {
47
+		background-color: #555;
48
+	}
49
+	
50
+  .pharmacy {
51
+    display: flex;
52
+    flex-direction: column;
53
+    height: 100%;
54
+  }
55
+
56
+  // 头部 start
57
+  .pharmacy-header {
58
+    // height: 88px;
59
+    background-color: #fff;
60
+    border-bottom: 1px solid #e5e9ed;
61
+    box-sizing: border-box;
62
+    display: flex;
63
+		color: #000;
64
+    .pharmacy-logo {
65
+      width: 221px;
66
+      background-color: #fff;
67
+      display: flex;
68
+      flex-direction: column;
69
+      justify-content: center;
70
+      align-items: center;
71
+
72
+      .pharmacy-logo__img {
73
+        max-width: 100%;
74
+        max-height: 50%;
75
+      }
76
+
77
+      .pharmacy-logo__name {
78
+        font-size: 14px;
79
+        color: @primary-color;
80
+        margin-top: 8px;
81
+      }
82
+    }
83
+
84
+    .pharmacy-name {
85
+      // flex: 1;
86
+      // border-right: 1px solid #e5e9ed;
87
+      display: flex;
88
+      // justify-content: space-between;
89
+      align-items: center;
90
+			width: 60%;
91
+			justify-content: center;
92
+      .pharmacy-name__title {
93
+        font-size: 22px;
94
+        color: #333;
95
+        margin-left: 43px;
96
+        line-height: 87px;
97
+        .currentDate {
98
+          margin-left: 24px;
99
+          font-size: 16px;
100
+        }
101
+      }
102
+      .pharmacy-name__total {
103
+        margin-right: 16px;
104
+        font-size: 16px;
105
+				display: flex;
106
+				.pharmacy-title{
107
+					width: 170px;
108
+					font-weight: 600;
109
+					font-size: 22px;
110
+				}
111
+      }
112
+			.error-class{
113
+				color: red;
114
+			}
115
+    }
116
+
117
+    .pharmacy-operate {
118
+      width: 211px;
119
+      display: flex;
120
+      justify-content: center;
121
+      align-items: center;
122
+      position: relative;
123
+      .pharmacy-operatePop {
124
+        cursor: pointer;
125
+        border: 1px solid #e5e9ed;
126
+        background-color: #fff;
127
+        position: absolute;
128
+        left: 0;
129
+        top: 100%;
130
+        width: 100%;
131
+        height: 34px;
132
+        line-height: 34px;
133
+        text-align: center;
134
+        font-size: 14px;
135
+        color: @primary-color;
136
+      }
137
+
138
+      &:after {
139
+        content: "";
140
+        display: block;
141
+        width: 0;
142
+        height: 0;
143
+        border-left: 7px solid transparent;
144
+        border-right: 7px solid transparent;
145
+        border-top: 10px solid #666;
146
+      }
147
+
148
+      .pharmacy-operate__img {
149
+        max-height: 40px;
150
+        margin-right: 8px;
151
+      }
152
+
153
+      .pharmacy-operate__title {
154
+        font-size: 20px;
155
+        color: #666;
156
+        padding-right: 24px;
157
+        cursor: pointer;
158
+      }
159
+    }
160
+  }
161
+  .userInfo {
162
+    // display: none;
163
+    width: 336px;
164
+    // height: 100%;
165
+    // float: right;
166
+    padding: 8px;
167
+    box-sizing: border-box;
168
+    font-size: 14px;
169
+    // border-left: 1px solid #e5e9ed;
170
+
171
+    .wel {
172
+      line-height: 15px;
173
+    }
174
+
175
+    .user {
176
+      font-size: 20px;
177
+      height: 36px;
178
+      display: flex;
179
+      justify-content: center;
180
+      align-items: center;
181
+      line-height: normal;
182
+
183
+      img {
184
+        height: 100%;
185
+        margin-right: 8px;
186
+      }
187
+    }
188
+    .userInfo-wrap {
189
+      display: flex;
190
+      justify-content: flex-end;
191
+      .logOut {
192
+        display: inline-block;
193
+        text-align: right;
194
+        color: @primary-color;
195
+        line-height: 20px;
196
+        cursor: pointer;
197
+        margin-right: 8px;
198
+      }
199
+    }
200
+  }
201
+  // 头部 end
202
+  // 主体部分 start
203
+  .pharmacy-main {
204
+    height: calc(100vh - 88px);
205
+    min-height: 680px;
206
+    flex: 1;
207
+    padding: 16px;
208
+    display: flex;
209
+    justify-content: space-between;
210
+    .pharmacy-main__list {
211
+      display: flex;
212
+      flex-direction: column;
213
+      background-color: #f9fafb;
214
+      // flex: 1;
215
+			width: 33%;
216
+      // margin: 0 4px;
217
+      box-sizing: border-box;
218
+      border: 1px solid #e5e9ed;
219
+      // 标题 start
220
+      .pharmacy-main__title {
221
+        height: 40px;
222
+        background-color: #fff;
223
+        font-size: 16px;
224
+        color: #333;
225
+        font-weight: 700;
226
+        padding-left: 8px;
227
+        display: flex;
228
+        justify-content: space-between;
229
+        align-items: center;
230
+        border-bottom: 1px solid #e5e9ed;
231
+        .autoUpdate {
232
+          font-size: 14px;
233
+          color: #49b856;
234
+          margin-right: 8px;
235
+        }
236
+        .pharmacy-main__printAll {
237
+          // width: 80px;
238
+          height: 28px;
239
+          line-height: 28px;
240
+          margin-right: 16px;
241
+          background-color: @primary-color;
242
+          font-size: 14px;
243
+          color: #fff;
244
+          border-radius: 4px;
245
+          text-align: center;
246
+          display: flex;
247
+          justify-content: center;
248
+        }
249
+      }
250
+      // 标题 end
251
+      // 搜索框 start
252
+      .pharmacy-main__search {
253
+        padding: 8px;
254
+        position: relative;
255
+				border-bottom: 1px solid #e5e9ed;
256
+        .pharmacy-main__searchInput {
257
+          border-radius: 100px;
258
+          padding-right: 82px;
259
+          border: 1px solid #e5e9ed;
260
+          background-color: #fff;
261
+          overflow: hidden;
262
+          input {
263
+            border: none;
264
+          }
265
+          .ant-input:focus {
266
+            border-color: #fff;
267
+            outline: 0;
268
+            box-shadow: 0 0 0 2px #fff;
269
+          }
270
+          .pharmacy-main__searchText {
271
+            cursor: pointer;
272
+            position: absolute;
273
+            top: 13px;
274
+            right: 8px;
275
+            width: 74px;
276
+            height: 22px;
277
+            border-left: 1px solid #e5e9ed;
278
+            color: #999;
279
+            padding-left: 8px;
280
+            box-sizing: border-box;
281
+            span {
282
+              color: @primary-color;
283
+              margin-left: 8px;
284
+            }
285
+          }
286
+        }
287
+      }
288
+      // 搜索框 end
289
+      // 列表 start
290
+      .pharmacy-main__selectionWrap {
291
+        flex: 1;
292
+        // height: 630px;
293
+        overflow: auto;
294
+        &:first-child {
295
+          border-top: 1px solid #e5e9ed;
296
+        }
297
+        .pharmacy-main__selection {
298
+          box-sizing: border-box;
299
+          border-bottom: 1px solid #e5e9ed;
300
+          display: flex;
301
+          cursor: pointer;
302
+          &.noPointer{
303
+            cursor: pointer;
304
+          }
305
+          &.pharmacy-main__selection--more {
306
+            color: @primary-color;
307
+            height: 34px;
308
+            cursor: pointer;
309
+            .pharmacy-main__selectionInfo {
310
+              justify-content: center;
311
+              align-items: center;
312
+              flex-direction: row;
313
+              .pharmacy-main__selection--icon {
314
+                margin-right: 8px;
315
+              }
316
+            }
317
+          }
318
+          &.pharmacy-main__selection--noData {
319
+            height: calc(100vh - 212px);
320
+            min-height: 556px;
321
+            display: flex;
322
+            justify-content: center;
323
+            align-items: center;
324
+            img {
325
+              width: 100px;
326
+            }
327
+          }
328
+          .pharmacy-main__selectionInfo {
329
+            padding: 8px;
330
+            flex: 1;
331
+            display: flex;
332
+            flex-direction: column;
333
+            justify-content: space-between;
334
+            .pharmacy-main__selectionItem {
335
+              display: flex;
336
+              justify-content: space-between;
337
+              padding: 0 8px;
338
+							margin-bottom: 5px;
339
+							// &:nth-of-typespan(1){
340
+							// 	text-align: left;
341
+							// }
342
+							// &:nth-of-typespan(2){
343
+							// 	text-align: right;
344
+							// }
345
+							.weight{
346
+								font-weight: 500;
347
+								.sign-red{
348
+									color: red;
349
+									margin-right: 10px;
350
+								}
351
+							}
352
+              .moreContent{
353
+                width: 150px;
354
+                display: flex;
355
+                justify-content: flex-end;
356
+                text-align: justify;
357
+                &.left{
358
+                  justify-content: flex-start;
359
+                }
360
+              }
361
+							.text-left{
362
+								text-align: left;
363
+							}
364
+							.text-right{
365
+								text-align: right;
366
+							}
367
+              span {
368
+                color: #666;
369
+                font-size: 14px;
370
+								width: 50%;
371
+								white-space: nowrap;
372
+								overflow: hidden;
373
+								text-overflow: ellipsis;
374
+								// flex: 1;
375
+              }
376
+              strong {
377
+                color: #333;
378
+                font-weight: 700;
379
+                font-size: 14px;
380
+              }
381
+            }
382
+          }
383
+          .pharmacy-main__selectionPrint {
384
+            width: 90px;
385
+            display: flex;
386
+            justify-content: center;
387
+            align-items: center;
388
+            border-left: 1px solid #e5e9ed;
389
+            .pharmacy-main__selectionPrintBtn {
390
+              width: 60px;
391
+              height: 28px;
392
+              line-height: 28px;
393
+              border-radius: 4px;
394
+              border: 1px solid @primary-color;
395
+              color: @primary-color;
396
+              text-align: center;
397
+              cursor: pointer;
398
+            }
399
+          }
400
+        }
401
+      }
402
+      // 列表 end
403
+    }
404
+  }
405
+  // 主体部分 end
406
+
407
+  // 右侧悬浮菜单
408
+  .fixed {
409
+    position: fixed;
410
+    top: 40%;
411
+    right: 0;
412
+    z-index: 99;
413
+    border-radius: 5px 0 0 5px;
414
+
415
+    .fixedMark {
416
+      position: fixed;
417
+      left: 0;
418
+      top: 0;
419
+      width: 100%;
420
+      height: 100%;
421
+      background: rgba(0, 0, 0, 0.2);
422
+      z-index: 88;
423
+    }
424
+
425
+    // overflow: hidden;
426
+    & > .left {
427
+      width: 480px;
428
+      // height: 280px;
429
+      float: left;
430
+      background: #fff;
431
+      padding: 16px;
432
+      border-radius: 5px;
433
+      border: 1px solid #e5e9ed;
434
+      // box-shadow: -8px 5px 15px #eae9e9;
435
+      position: relative;
436
+      z-index: 98;
437
+
438
+      .con {
439
+        background: #f9fafb;
440
+        width: 100%;
441
+        height: 100%;
442
+        border-radius: 5px;
443
+        border: 1px solid #e5e9ed;
444
+        padding: 16px 20px;
445
+
446
+        &.tableCon {
447
+          padding: 0;
448
+
449
+          .table {
450
+            font-size: 14px;
451
+
452
+            tr {
453
+              td {
454
+                padding: 15px 6px;
455
+                text-align: center;
456
+
457
+                & > .tdiv {
458
+                  overflow: hidden;
459
+
460
+                  .name {
461
+                    float: left;
462
+                  }
463
+
464
+                  .num {
465
+                    float: right;
466
+                    font-size: 12px;
467
+
468
+                    span {
469
+                      color: @primary-color;
470
+                      font-size: 14px;
471
+                    }
472
+                  }
473
+                }
474
+
475
+                .notOpen {
476
+                  color: #666;
477
+                  font-size: 12px;
478
+
479
+                  img {
480
+                    margin-bottom: 8px;
481
+                  }
482
+                }
483
+              }
484
+            }
485
+          }
486
+        }
487
+
488
+        .title {
489
+          color: #333;
490
+          text-align: center;
491
+        }
492
+
493
+        .conditions {
494
+          & > .ant-row {
495
+            margin: 8px 0;
496
+
497
+            .ant-row {
498
+              .ant-col-6 {
499
+                margin: 2px 0;
500
+              }
501
+            }
502
+
503
+            .checkAll {
504
+              width: 100%;
505
+              border-bottom: 1px solid rgb(233, 233, 233);
506
+              color: @primary-color;
507
+            }
508
+          }
509
+        }
510
+
511
+        .btns {
512
+          padding: 5px 20px 0 20px;
513
+        }
514
+      }
515
+    }
516
+
517
+    .right {
518
+      // opacity: .5;
519
+      width: 80px;
520
+      float: left;
521
+      background: rgba(255, 255, 255, 0.5);
522
+      border-radius: 5px 0 0 5px;
523
+      position: relative;
524
+      z-index: 98;
525
+
526
+      .fixedMenu {
527
+        border: 1px solid #e5e9ed;
528
+        color: rgba(0, 128, 0, 0.5);
529
+        background: rgba(255, 255, 255, 0.5);
530
+        text-align: center;
531
+        border-radius: 5px 0 0 5px;
532
+        // box-shadow: -3px 4px 15px rgba(234, 233, 233, .5);
533
+
534
+        &.hujiaozhongxin {
535
+          margin-bottom: 5px;
536
+        }
537
+
538
+        .menuItems {
539
+          .item {
540
+            height: 35px;
541
+            line-height: 35px;
542
+            padding: 0 6px;
543
+            cursor: default;
544
+            border-bottom: 1px solid #e5e9ed;
545
+            user-select: none;
546
+
547
+            &.checked {
548
+              background: #fff;
549
+              color: #52ab77;
550
+              opacity: 1;
551
+              box-shadow: -3px 4px 7px #eae9e9;
552
+            }
553
+          }
554
+
555
+          .others {
556
+            transition: height 0.4s linear;
557
+            overflow: hidden;
558
+          }
559
+        }
560
+
561
+        .arrow {
562
+          cursor: pointer;
563
+        }
564
+      }
565
+    }
566
+  }
567
+}
568
+
569
+	// 新增
570
+	&.add {
571
+		position: fixed;
572
+		left: 0;
573
+		top: 0;
574
+		width: 100%;
575
+		height: 100%;
576
+		background: rgba(0, 0, 0, 0.4);
577
+		z-index: 999;
578
+	  .modalBody {
579
+	    width: 40%;
580
+	    height: auto;
581
+			padding: 10px 20px;
582
+			border-radius: 5px;
583
+			background: #fff;
584
+			.title {
585
+			  width: 100%;
586
+			  text-align: center;
587
+			  font-size: 18px;
588
+			  position: relative;
589
+			
590
+			  i {
591
+			    position: absolute;
592
+			    right: 0;
593
+			    top: 0;
594
+			    font-size: 20px;
595
+			    color: #666;
596
+			    cursor: pointer;
597
+			    padding: 0 5px;
598
+			  }
599
+			}
600
+	    .content {
601
+	      width: 100%;
602
+	      // height: auto;
603
+	      padding: 19px 14px 0 14px;
604
+	      // max-height: 500px;
605
+	      // overflow-y: auto;
606
+				.ant-select{
607
+					width: 100%;
608
+				}
609
+				.ant-form-item {
610
+				  margin-bottom: 14px;
611
+					display: flex;
612
+					flex-wrap: wrap;
613
+				  .ant-form-item-label {
614
+				    text-align: left;
615
+						font-weight: 500;
616
+				  }
617
+					.ant-form-item-control-wrapper{
618
+						.ant-form-item-control{
619
+							width: 400px;
620
+						}
621
+					}
622
+				}
623
+				.select-item{
624
+					margin-top: 5px;
625
+					display: flex;
626
+					flex-wrap: wrap;
627
+					padding: 3px 8px;
628
+					border: 1px solid #e5e9ed;
629
+					border-radius: 5px;
630
+					margin-right: 10px;
631
+					cursor: pointer;
632
+					display: inline-block;
633
+				}
634
+				
635
+				.activeClass{
636
+					color: #64BD7B;
637
+					border-color: #64BD7B;
638
+				}
639
+	      
640
+	    }
641
+			.bottom-btn{
642
+				margin-top: 10px;
643
+				.btn-right{
644
+					margin-right: 10px;
645
+				}
646
+			}
647
+	  }
648
+		.no-width{
649
+			width: 30% !important;
650
+		}
651
+	}
652
+
653
+.pathology-box {
654
+  position: fixed;
655
+	left: 0;
656
+	top: 0;
657
+	width: 100%;
658
+	height: 100%;
659
+	background: rgba(0, 0, 0, 0.4);
660
+	z-index: 99;
661
+	.pathology-content{
662
+		width: 80%;
663
+		background: #fff;
664
+		border-radius: 5px;
665
+		padding: 10px 20px;
666
+		color: #000;
667
+		.title {
668
+		  width: 100%;
669
+		  text-align: center;
670
+		  font-size: 18px;
671
+		  position: relative;
672
+		
673
+		  i {
674
+		    position: absolute;
675
+		    right: 0;
676
+		    top: 0;
677
+		    font-size: 20px;
678
+		    color: #666;
679
+		    cursor: pointer;
680
+		    padding: 0 5px;
681
+		  }
682
+		}
683
+		.content{
684
+			width: 100%;
685
+			background: #f9fafb;
686
+			border: 1px solid #e5e9ed;
687
+			border-radius: 5px;
688
+			margin-top: 12px;
689
+			display: flex;
690
+			// .addForm{
691
+				// display: flex;
692
+				.font-weight-500{
693
+					color: #000;
694
+					font-weight: 500;
695
+				}
696
+				.ant-select{
697
+					width: 100%;
698
+				}
699
+				.content-item{
700
+					height: auto;
701
+					max-height: 460px;
702
+					overflow-y: auto;
703
+					width: 78%;
704
+					padding: 15px;
705
+					.form-title-box{
706
+						display: flex;
707
+						margin-bottom: 10px;
708
+						.form-title{
709
+							color: #333;
710
+							margin-right: 40px;
711
+						}
712
+						.width-150{
713
+							width: 150px;
714
+						}
715
+						.width-200{
716
+							width: 200px;
717
+						}
718
+					}
719
+					.center{
720
+						text-align: center;
721
+						padding: 10px 0;
722
+					}
723
+					.disp-fl{
724
+						display: flex;
725
+						align-items: center;
726
+						.width-120{
727
+							width: 85px;
728
+						}
729
+						.ant-input{
730
+							width: 300px;
731
+						}
732
+					}
733
+					.error-fix{
734
+						margin-top: 10px;
735
+						color: red;
736
+						text-align: center;
737
+					}
738
+					.form-list{
739
+						margin-bottom: 10px;
740
+						.specimen-list{
741
+							display: flex;
742
+							flex-wrap: wrap;
743
+							.specimen-item-class{
744
+								margin-right: 40px;
745
+								color:#333;
746
+							}
747
+						}
748
+						.indent{
749
+							text-indent: 2ch;
750
+							color: #333;
751
+						}
752
+					}
753
+					.ant-form-item {
754
+					  margin-bottom: 14px;
755
+						display: flex;
756
+						flex-wrap: wrap;
757
+					  .ant-form-item-label {
758
+					    text-align: left;
759
+							font-weight: 500;
760
+					  }
761
+						.ant-form-item-control-wrapper{
762
+							.ant-form-item-control{
763
+								width: 400px;
764
+							}
765
+						}
766
+					}
767
+					.add-icon-class{
768
+						border: 1px solid #e5e9ed;
769
+						border-radius: 3px;
770
+						width: 26px;
771
+						height: 26px;
772
+						line-height: 26px;
773
+						text-align: center;
774
+						position: relative;
775
+						top: 7px;
776
+						cursor: pointer;
777
+						.form-icon{
778
+							
779
+						}
780
+					}
781
+				}
782
+				.content-item-right{
783
+					width: 25%;
784
+					height: auto;
785
+					max-height: 460px;
786
+					overflow-y: auto;
787
+					padding: 10px;
788
+					.step-title{
789
+						font-size: 16px;
790
+						font-weight: 500;
791
+						margin-bottom: 10px;
792
+					}
793
+				}
794
+				.boder-right{
795
+					border-right: 1px solid #e5e9ed;
796
+				}
797
+				.specimen-item{
798
+					display: flex;
799
+					margin-bottom: 10px;
800
+					.specimen-icon{
801
+						color: #64BD7B;
802
+						cursor: pointer;
803
+						font-size: 20px;
804
+						position: relative;
805
+						top: -4px;
806
+						left: 2px;
807
+					}
808
+				}
809
+			// }
810
+		}
811
+		.bottom-btn{
812
+			margin-top: 10px;
813
+			.btn-right{
814
+				margin-right: 10px;
815
+			}
816
+		}
817
+	}
818
+	
819
+}
820
+
821
+.mask-style{
822
+	width: 100%;
823
+	height: 100%;
824
+	position: fixed;
825
+	top: 0;
826
+	left: 0;
827
+	z-index: 999;
828
+	display: flex;
829
+	background: rgba(0,0,0,0.2);
830
+	align-items: center;
831
+	justify-content: center;
832
+}
833
+.spin-style{
834
+	z-index:9999;
835
+}

+ 925 - 0
src/app/views/specimen-room-view/specimen-room-view.component.ts

@@ -0,0 +1,925 @@
1
+import { Component, OnInit, ViewChild, OnDestroy } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { Router } from "@angular/router";
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { startOfDay, format, endOfDay } from "date-fns";
6
+import { ToolService } from 'src/app/services/tool.service';
7
+import { NzMessageService } from "ng-zorro-antd";
8
+import { debounceTime } from 'rxjs/operators';
9
+import { Subject } from 'rxjs';
10
+
11
+import {
12
+  FormBuilder,
13
+  Validators,
14
+  FormGroup,
15
+  FormControl,
16
+} from "@angular/forms";
17
+
18
+@Component({
19
+  selector: "app-specimen-room-view",
20
+  templateUrl: "./specimen-room-view.component.html",
21
+  styleUrls: ["./specimen-room-view.component.less"],
22
+})
23
+export class SpecimenRoomViewComponent implements OnInit, OnDestroy {
24
+  @ViewChild("osComponentRef1", {
25
+    read: OverlayScrollbarsComponent,
26
+    static: false,
27
+  })
28
+  osComponentRef1: OverlayScrollbarsComponent;
29
+  @ViewChild("osComponentRef2", {
30
+    read: OverlayScrollbarsComponent,
31
+    static: false,
32
+  })
33
+  osComponentRef2: OverlayScrollbarsComponent;
34
+  @ViewChild("osComponentRef3", {
35
+    read: OverlayScrollbarsComponent,
36
+    static: false,
37
+  })
38
+  osComponentRef3: OverlayScrollbarsComponent;
39
+  @ViewChild("osComponentRef4", {
40
+    read: OverlayScrollbarsComponent,
41
+    static: false,
42
+  })
43
+  osComponentRef4: OverlayScrollbarsComponent;
44
+  @ViewChild("osComponentRef5", {
45
+    read: OverlayScrollbarsComponent,
46
+    static: false,
47
+  })
48
+  osComponentRef5: OverlayScrollbarsComponent;
49
+  constructor(
50
+	private mainService: MainService, 
51
+	public router: Router, 
52
+	public tool: ToolService,
53
+	private fb: FormBuilder,
54
+	private message: NzMessageService,
55
+	) {}
56
+  // 今日药单量
57
+  todayTotal: undefined;
58
+  // 今日已完成
59
+  todayComplete: undefined;
60
+  //手术间数据
61
+  printPharmacyList = []; //数据列表
62
+  printPharmacyIdx = 0; //页码
63
+  printPharmacyTotal = 0; //总数
64
+  printPharmacyFlag = false; //是否查看更多
65
+  printPharmacySearchKey = ""; //搜索的内容
66
+  printPharmacyLoad = false; //按钮的loading
67
+  // 标本间列表
68
+  waitPharmacyList = [];
69
+  waitPharmacyIdx = 0;
70
+  waitPharmacyTotal = 0;
71
+  waitPharmacyFlag = false;
72
+  waitPharmacySearchKey = "";
73
+  waitPharmacyLoad = false;
74
+  // 今日离科列表
75
+  pharmacyList = [];
76
+  pharmacyIdx = 0;
77
+  pharmacyTotal = 0;
78
+  pharmacyFlag = false;
79
+  pharmacySearchKey = "";
80
+  pharmacyLoad = false;
81
+  // 配送中列表
82
+  distributionList = [];
83
+  distributionIdx = 0;
84
+  distributionTotal = 0;
85
+  distributionFlag = false;
86
+  distributionSearchKey = "";
87
+  distributionLoad = false;
88
+  // 已完成列表
89
+  completedList = [];
90
+  completedIdx = 0;
91
+  completedTotal = 0;
92
+  completedFlag = false;
93
+  completedSearchKey = "";
94
+  completedLoad = false;
95
+	
96
+	barCode:any; //条码搜索
97
+  // other
98
+  loginUser: any = localStorage.getItem("user")
99
+    ? JSON.parse(localStorage.getItem("user")).user
100
+    : null; //登录人信息
101
+
102
+  logTimer = null; //定时器
103
+  logTime = 0; //自动刷新秒数
104
+  logTimeConst = 60; //自动刷新秒数
105
+
106
+  time = new Date().getTime(); // 时间戳
107
+  timer = null; // 时间定时器
108
+	relevanceModal:boolean = false //关联标本和手术室
109
+	validateForm: FormGroup; //关联标本和手术室表单
110
+	validateVerificationForm: FormGroup; //核验标本
111
+	specimenData:any = []; //标本间数据
112
+	operationData:any = []; //手术间数据
113
+	fixationModal:boolean = false //标本接收固定
114
+	verificationMoadl:boolean = false //标本核验
115
+	specimenCode:any; //标本条码
116
+	listOfData:any=[]; 
117
+	fixativeData:any = []; //固体液类型
118
+	hosId:any;
119
+	userId:any;
120
+	detailsData:any;
121
+	isSpinning:boolean = false; //全屏加载状态
122
+	codeData:any; //标本条码数据
123
+	btnInfoLoading :boolean = false; //标本加固加载
124
+	searchMsg:any = null;
125
+	changeInpSubject = new Subject(); //防抖
126
+	changeInpSubjectSpecimen = new Subject(); //防抖
127
+  ngOnDestroy() {
128
+    clearTimeout(this.timer);
129
+    clearTimeout(this.logTimer);
130
+  }
131
+
132
+  ngOnInit() {
133
+		this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
134
+		  this.searchSpecimenData(v[0])
135
+		});
136
+		this.changeInpSubjectSpecimen.pipe(debounceTime(500)).subscribe((v) => {
137
+		  this.searchSpecimen(v[0])
138
+		});
139
+		this.hosId = this.tool.getCurrentHospital().id;
140
+		this.userId = this.tool.getCurrentUserId()
141
+    this.runTime();
142
+    // 统计
143
+    // this.total();
144
+		this.getDept()
145
+    // 切换科室
146
+    // this.changeKs();
147
+
148
+    this.initRole();
149
+    // 自动刷新倒计时 start
150
+    this.autoUpdate();
151
+    // 自动刷新倒计时 end
152
+		setTimeout(_=>{
153
+			document.getElementById('Binput').focus();
154
+		},200)
155
+  }
156
+  // 当前时间日期
157
+  runTime() {
158
+    clearTimeout(this.timer);
159
+    this.timer = setTimeout(() => {
160
+      this.time = Date.now();
161
+      this.runTime();
162
+    }, 500);
163
+  }
164
+	
165
+	// 标本条码搜索
166
+	searchSpecimen(e){
167
+		if(!this.barCode){
168
+			return
169
+		}
170
+		if(this.barCode.length < 10) {
171
+			return
172
+		}
173
+		let data={
174
+			barcode:e
175
+		}
176
+		this.isSpinning = true
177
+		clearInterval(this.logTimer);
178
+		this.mainService.pathologyScanCode(data)
179
+		.subscribe((res:any) => {
180
+			this.isSpinning = false
181
+			if(res.status==200){
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('、')
188
+				}
189
+				this.fixationError = null
190
+				this.fixationModal = true
191
+				setTimeout(_=>{
192
+					document.getElementById('specimen').focus();
193
+				},200)
194
+				this.searchMsg = null
195
+			}else{
196
+				this.barCode = null
197
+				this.searchMsg = res.msg
198
+				// this.message.error(res.msg)
199
+			}
200
+		})
201
+	}
202
+	
203
+	// 选择固定时间
204
+	formChangeDate(result){
205
+	  this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
206
+	}
207
+	
208
+	// 确定接受固定标本
209
+	startDate:any;
210
+	submitFixationForm(){
211
+		this.validateVerificationForm = this.fb.group({
212
+		  fixationTime: [null, [Validators.required]],
213
+			jobNumber: [null, [Validators.required]],
214
+			name:[null, [Validators.required]],
215
+			fixative:[null, [Validators.required]],
216
+		});
217
+		let date = new Date();
218
+		this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
219
+		this.validateVerificationForm.controls.fixationTime.setValue(this.startDate);
220
+		this.btnLoading = true
221
+		this.mainService.getDictionary("list", "fixing_liquid_type").subscribe((res) => {
222
+			this.fixativeData = res
223
+			this.btnLoading = false
224
+			this.verificationMoadl = true
225
+		});
226
+	}
227
+	
228
+	// 关闭接受固定标本
229
+	hideSpecimenModal(){
230
+		this.autoUpdate()
231
+		this.barCode = null;
232
+		this.specimenCode = null;
233
+		this.fixationError = null
234
+		this.fixationModal = false;
235
+		setTimeout(_=>{
236
+			document.getElementById('Binput').focus();
237
+		},200)
238
+	}
239
+	
240
+	// 获取标本详情
241
+	project:any = [];
242
+	getSampleData(item){
243
+		this.mainService.getFetchData("data", "pathologyForm", item.id)
244
+		.subscribe((data) => {
245
+			this.isSpinning = false
246
+			this.detailsData = data.data
247
+		  this.specimenList = data.data.pathologySpecimenDTOList||[]
248
+			this.pathologyLogs = data.data.formLogDTOS
249
+			this.stepLength = this.pathologyLogs.length
250
+			if(this.detailsData.pathologyInspectDTOS){
251
+				this.project = this.detailsData.pathologyInspectDTOS.map(i=>{
252
+					return i.inspectProject.name
253
+				})
254
+				this.project = this.project.join('、')
255
+			}
256
+		  this.detailMoadl = true
257
+		});
258
+	}
259
+	
260
+	// 获取科室
261
+	getDept(){
262
+		this.setSpecimen()
263
+		var that = this;
264
+		that.mainService.getDictionary("list", "dept_type").subscribe((res2) => {
265
+			let item1 = res2.find(i=>i.name=='手术室科室')
266
+			let item2 = res2.find(i=>i.name=='标本间科室')
267
+			let data1 = {
268
+			  idx: 0,
269
+			  sum: 9999,
270
+			  department: {
271
+			    hospital: { id: that.hosId || "" },
272
+			    type: { id: item1.id || "" },
273
+			  },
274
+			};
275
+			let data2 = {
276
+			  idx: 0,
277
+			  sum: 9999,
278
+			  department: {
279
+			    hospital: { id: that.hosId || "" },
280
+			    type: { id: item2.id || "" },
281
+			  },
282
+			};
283
+			that.mainService
284
+			  .getFetchDataList("data", "department", data1)
285
+			  .subscribe((res) => {
286
+			    that.operationData = res.list;
287
+			  });
288
+				
289
+			that.mainService
290
+			  .getFetchDataList("data", "department", data2)
291
+			  .subscribe((res) => {
292
+					that.specimenData = res.list
293
+					this.getDeptDetail()
294
+			  });
295
+		});
296
+	}
297
+	
298
+	// 获取关联科室详情
299
+	getDeptDetail(){
300
+		this.mainService
301
+		  .transfusionPrint("user", this.userId)
302
+		  .subscribe((res) => {
303
+				let data = res.data;
304
+				if(data.surgeryDepts){
305
+					let deptArr = []
306
+					for(let i of data.surgeryDepts){
307
+						deptArr.push(i.id)
308
+					}
309
+					this.validateForm.controls.operation.setValue(deptArr);
310
+				}
311
+				this.validateForm.controls.specimen.setValue(data.dept.id);
312
+				if(data.autoCreateOrder){
313
+					this.validateForm.controls.generate.setValue(data.autoCreateOrder);
314
+				}
315
+		  });
316
+	}
317
+	
318
+	// 获取是否关联标本间
319
+	setSpecimen(){
320
+		this.validateForm = this.fb.group({
321
+		  specimen: [null, [Validators.required]],
322
+			operation: [null, [Validators.required]],
323
+			generate:[1, [Validators.required]],
324
+		});
325
+		this.relevanceModal = true
326
+	}
327
+	
328
+	// 确定关联科室
329
+	btnLoading:boolean = false;
330
+	submitForm(){
331
+		for (const i in this.validateForm.controls) {
332
+		  this.validateForm.controls[i].markAsDirty();
333
+		  this.validateForm.controls[i].updateValueAndValidity();
334
+		}
335
+		if (this.validateForm.invalid) return;
336
+		let deptArr = this.validateForm.value.operation.join(',')
337
+		let data = {
338
+		  user: {
339
+		    autoCreateOrder: this.validateForm.value.generate,
340
+				dept:{
341
+					id:this.validateForm.value.specimen
342
+				},
343
+				surgeryDeptIds:deptArr,
344
+				id:this.userId
345
+		  },
346
+		};
347
+		this.btnLoading = true
348
+		this.mainService
349
+		  .coopData("updData", "user", data)
350
+		  .subscribe((data) => {
351
+				this.getNewDept()
352
+				// 手术间列表
353
+				this.getPharmacyList(this.printPharmacyIdx, 'surgeryDept', this.printPharmacySearchKey);
354
+				// 标本间列表
355
+				this.getPharmacyList(this.waitPharmacyIdx, 'specimenDept', this.waitPharmacySearchKey);
356
+				// 今日离科标本列表
357
+				this.getPharmacyList(this.pharmacyIdx, 'leavedDept', this.pharmacySearchKey);
358
+				this.btnLoading = false
359
+				this.relevanceModal = false
360
+		    if (data.status == 200) {
361
+		      this.showPromptModal("操作", true, "");
362
+		    } else {
363
+		      this.showPromptModal("操作", false, data.msg);
364
+		    }
365
+		  });
366
+	}
367
+	
368
+	getNewDept(){
369
+		let postData = {
370
+		  currentHosId: this.hosId,
371
+		  loginType: "PC",
372
+		};
373
+		this.mainService.changeHospital(postData).subscribe((result) => {
374
+		  if (result.status == 200) {
375
+		    let dataObj = {
376
+		      user: {
377
+		        dept: {
378
+		          id: this.validateForm.value.specimen,
379
+		        },
380
+		        id: JSON.parse(localStorage.getItem("user")).user.id,
381
+		      },
382
+		    };
383
+		    this.mainService
384
+		      .coopData("updData", "user", dataObj)
385
+		      .subscribe((data) => {
386
+		        if (data.status == 200) {
387
+		          this.getCurrentUserNow();
388
+		        }
389
+		      });
390
+		  }
391
+		});
392
+	}
393
+	
394
+	// 获取当前用户信息
395
+	getCurrentUserNow() {
396
+	  this.mainService.getCurrentUser1().subscribe((data:any) => {
397
+	    if (data["status"] == 200) {
398
+				this.loginUser = data.data 
399
+	      let user = JSON.parse(localStorage.getItem("user"));
400
+	      user.user.dept = data["data"].dept;
401
+	      user.user.currentHospital = data["data"].currentHospital;
402
+	      localStorage.setItem("user", JSON.stringify(user));
403
+	    }
404
+	  });
405
+	}
406
+	
407
+	// 输入工号查询姓名
408
+	handoverUserId:any = null;
409
+	numberChange(e){
410
+		if(e.length < 3) {
411
+			this.validateVerificationForm.controls.name.setValue('');
412
+			return
413
+		}
414
+		let query = {
415
+		  account: e
416
+		};
417
+		this.mainService
418
+		  .jobSearch(query)
419
+		  .subscribe((data:any) => {
420
+				if(data.status==200){
421
+					this.validateVerificationForm.controls.name.setValue(data.userName);
422
+					this.handoverUserId = data.userId
423
+				}else{
424
+					this.validateVerificationForm.controls.name.setValue('');
425
+					this.handoverUserId =null
426
+					// this.message.error(data.data)
427
+				}
428
+		  });
429
+	}
430
+	
431
+	// 提交固定标本接收
432
+	submitVerificationForm(){
433
+		for (const i in this.validateVerificationForm.controls) {
434
+		  this.validateVerificationForm.controls[i].markAsDirty();
435
+		  this.validateVerificationForm.controls[i].updateValueAndValidity();
436
+		}
437
+		if (this.validateVerificationForm.invalid) return;
438
+		
439
+		let data: any = {
440
+			id:this.codeData.id,
441
+			specimenDeptId:this.validateForm.value.specimen,
442
+			specimenFixingLiquid:{
443
+				id:this.validateVerificationForm.value.fixative
444
+			},
445
+			fixationTime:this.startDate,
446
+			hosId: this.hosId || "" ,
447
+			handoverUserId:this.handoverUserId
448
+		};
449
+		this.btnInfoLoading = true;
450
+		this.mainService
451
+		.simplePost("addData", "pathologyForm", data)
452
+		.subscribe((res) => {
453
+			this.autoUpdate(false)
454
+			this.btnInfoLoading = false;
455
+			this.barCode = null;
456
+			// 手术间列表
457
+			this.getPharmacyList(this.printPharmacyIdx, 'surgeryDept', this.printPharmacySearchKey);
458
+			// 标本间列表
459
+			this.getPharmacyList(this.waitPharmacyIdx, 'specimenDept', this.waitPharmacySearchKey);
460
+			// 今日离科标本列表
461
+			this.getPharmacyList(this.pharmacyIdx, 'leavedDept', this.pharmacySearchKey);
462
+			if (res.status == 200) {
463
+				this.showPromptModal("操作", true, "");
464
+			} else {
465
+				this.showPromptModal("操作", false, res.msg);
466
+			}
467
+		});
468
+	}
469
+	
470
+	closeModel(){
471
+		this.verificationMoadl = false
472
+		this.fixationModal = false
473
+		setTimeout(_=>{
474
+			document.getElementById('Binput').focus();
475
+		},200)
476
+	}
477
+	
478
+	// 关闭固定接受标本
479
+	hideVerificationModal(){
480
+		this.verificationMoadl = false
481
+		setTimeout(_=>{
482
+			document.getElementById('Binput').focus();
483
+		},200)
484
+	}
485
+	
486
+
487
+	// 监听标本条码
488
+	specimenCodeChange(e){
489
+		this.changeInpSubjectSpecimen.next([e]);
490
+	}
491
+	
492
+	// 监听接受固定标本条码
493
+	tableLoading:boolean = false;
494
+	codeChange(e){
495
+		this.changeInpSubject.next([e]);
496
+	}
497
+	
498
+	fixationError:any;
499
+	searchSpecimenData(e){
500
+		if(!e){
501
+			return
502
+		}
503
+		if(e.length < 10) {
504
+			return
505
+		}
506
+		this.tableLoading = true
507
+		this.mainService.pathologyScanCode({
508
+			barcode:e,
509
+			pathologyFormId:this.codeData.id
510
+		})
511
+		.subscribe((res:any) => {
512
+			this.autoUpdate(false)
513
+			this.tableLoading = false
514
+			this.specimenCode = null
515
+			if(res.status==200){
516
+				this.codeData = res.data[0]
517
+				this.fixationError = null 
518
+			}else{
519
+				this.fixationError = res.msg 
520
+			}
521
+		})
522
+	}
523
+	
524
+	// 查看详情
525
+	detailMoadl:boolean = false;
526
+	pathologyLogs:any=[];
527
+	specimenList:any=[]
528
+	stepLength:any = 0;
529
+	viewDetail(item,type){
530
+		this.isSpinning = true
531
+		this.getSampleData(item)
532
+		clearInterval(this.logTimer);
533
+		if(type==1){
534
+			
535
+		}else if(type==2){
536
+			
537
+		}else{
538
+			
539
+		}
540
+	}
541
+	
542
+	closeDetailMoadl(){
543
+		setTimeout(_=>{
544
+			document.getElementById('Binput').focus();
545
+		},200)
546
+		this.detailMoadl = false
547
+		this.autoUpdate(false);
548
+	}
549
+	
550
+  // 统计
551
+  // total() {
552
+  //   let launch = JSON.parse(localStorage.getItem("user")).user.dept.id;
553
+  //   let startTime = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
554
+  //   let endTime = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
555
+  //   let postData = {
556
+  //     startTime,
557
+  //     endTime,
558
+  //     launch,
559
+  //   };
560
+
561
+  //   this.mainService.getDrugsBagStateCount(postData).subscribe((res: any) => {
562
+  //     if (res.status == 200) {
563
+  //       this.todayTotal = res.countMap.todayTotal;
564
+  //       this.todayComplete = res.countMap.todayComplete;
565
+  //     }
566
+  //   });
567
+  // }
568
+  // // 查看工单详情
569
+  // goToOrderDetail(item){
570
+  //   console.log(item);
571
+  //   this.router.navigateByUrl(`specimenView2/detailSample/${item.id}`);
572
+  // }
573
+	
574
+  // // 查看流程信息弹窗
575
+  // logPromptModalShow = false; //弹窗开关
576
+  // scode = ""; //查看记录携带
577
+  // showLogs(data) {
578
+  //   clearInterval(this.logTimer);
579
+  //   this.scode = data.scode;
580
+  //   this.logPromptModalShow = true;
581
+  // }
582
+  // // 关闭流程信息弹窗
583
+  // closeModelLog(e) {
584
+  //   this.logPromptModalShow = JSON.parse(e).show;
585
+  //   this.autoUpdate(false);
586
+  // }
587
+  // // 查看标本列表弹窗
588
+  // spePromptModalShow = false; //弹窗开关
589
+  // checkDeptId = ""; //检查科室id
590
+  // printDate = ""; //采集日期
591
+  // showSpeList(data) {
592
+  //   clearInterval(this.logTimer);
593
+  //   this.checkDeptId = data.check_dept_id;
594
+  //   this.printDate = data.startTime;
595
+  //   this.spePromptModalShow = true;
596
+  // }
597
+  // 关闭标本列表弹窗
598
+  // closeModelSpe(e) {
599
+  //   this.spePromptModalShow = JSON.parse(e).show;
600
+  //   this.autoUpdate(false);
601
+  // }
602
+  //  // 查看工单列表弹窗
603
+  //  orderPromptModalShow = false; //弹窗开关
604
+  //  workId = ""; //配送人员ID
605
+  //  showOrderList(data) {
606
+  //    clearInterval(this.logTimer);
607
+  //    this.workId = data.workerid;
608
+  //    this.orderPromptModalShow = true;
609
+  //  }
610
+  //  // 关闭工单列表弹窗
611
+  //  closeModelOrder(e) {
612
+  //    this.orderPromptModalShow = JSON.parse(e).show;
613
+  //    this.autoUpdate(false);
614
+  //  }
615
+  // 自动刷新倒计时
616
+  autoUpdate(flag = true) {
617
+    if (flag) {
618
+      this.logTime = this.logTimeConst;
619
+    }
620
+    clearInterval(this.logTimer);
621
+    this.logTimer = setInterval(() => {
622
+      this.logTime--;
623
+      if (this.logTime === 0) {
624
+        this.logTime = this.logTimeConst;
625
+        // 代收急查标本(标本信息)列表
626
+        this.getPharmacyList(0, 'surgeryDept', this.printPharmacySearchKey);
627
+        // 已收取(工单信息)列表
628
+        this.getPharmacyList(0, 'specimenDept', this.waitPharmacySearchKey);
629
+        // 中转标本(标本统计信息)列表
630
+        this.getPharmacyList(0, 'leavedDept', this.pharmacySearchKey);
631
+
632
+      }
633
+    }, 1000);
634
+  }
635
+  // 药房端药房列表查询、搜索
636
+  // 1为pc待打印状态、2为pc配药中、3为pc核对中、4为pc配送中
637
+  // searchKey  为搜索的关键字,没有就不传
638
+  loading1 = false;
639
+  loading2 = false;
640
+  loading3 = false;
641
+  loading4 = false;
642
+  loading5 = false;
643
+  getPharmacyList(idx, type, searchKey) {
644
+    let hosId = JSON.parse(localStorage.getItem("user")).user.currentHospital.id;
645
+    switch (type) {
646
+      case 'surgeryDept':
647
+        this.loading1 = true;
648
+        break;
649
+      case 'specimenDept':
650
+        this.loading2 = true;
651
+        break;
652
+      case 'leavedDept':
653
+        this.loading3 = true;
654
+        break;
655
+    }
656
+    let postData = {
657
+			idx: 0,
658
+			sum: 50,
659
+			pathologyForm:{
660
+				detailsType: type,
661
+				keyWords:searchKey,
662
+				hosId,
663
+			}
664
+    };
665
+    this.mainService
666
+      .getFetchDataList("data", "pathologyForm", postData)
667
+      .subscribe((result) => {
668
+        switch (type) {
669
+          case 'surgeryDept':
670
+            this.loading1 = false;
671
+            break;
672
+          case 'specimenDept':
673
+            this.loading2 = false;
674
+            break;
675
+          case 'leavedDept':
676
+            this.loading3 = false;
677
+            break;
678
+        }
679
+        if (result["status"] == 200) {
680
+          switch (type) {
681
+            case 'surgeryDept':
682
+              // 总数
683
+              this.printPharmacyTotal = result.totalNum;
684
+              // 隐藏按钮的loading
685
+              this.printPharmacyLoad = false;
686
+              // 查看更多,是否显示
687
+              if (result["list"].length < 10) {
688
+                this.printPharmacyFlag = false;
689
+              } else if (result["list"].length === 0 && idx === 0) {
690
+                this.printPharmacyFlag = false;
691
+              } else {
692
+                this.printPharmacyFlag = true;
693
+              }
694
+              // 列表数据合并
695
+              if (idx === 0) {
696
+                this.printPharmacyList = result["list"];
697
+              } else {
698
+                this.printPharmacyList = [
699
+                  ...this.printPharmacyList,
700
+                  ...result["list"],
701
+                ];
702
+              }
703
+              break;
704
+            case 'specimenDept':
705
+              this.waitPharmacyTotal = result.totalNum;
706
+              this.waitPharmacyLoad = false;
707
+              if (result["list"].length < 10) {
708
+                this.waitPharmacyFlag = false;
709
+              } else if (result["list"].length === 0 && idx === 0) {
710
+                this.waitPharmacyFlag = false;
711
+              } else {
712
+                this.waitPharmacyFlag = true;
713
+              }
714
+              if (idx === 0) {
715
+                this.waitPharmacyList = result["list"];
716
+              } else {
717
+                this.waitPharmacyList = [
718
+                  ...this.waitPharmacyList,
719
+                  ...result["list"],
720
+                ];
721
+              }
722
+              break;
723
+            case 'leavedDept':
724
+              this.pharmacyTotal = result.totalNum;
725
+              this.pharmacyLoad = false;
726
+              if (result["list"].length < 10) {
727
+                this.pharmacyFlag = false;
728
+              } else if (result["list"].length === 0 && idx === 0) {
729
+                this.pharmacyFlag = false;
730
+              } else {
731
+                this.pharmacyFlag = true;
732
+              }
733
+              if (idx === 0) {
734
+                this.pharmacyList = result["list"];
735
+              } else {
736
+                this.pharmacyList = [...this.pharmacyList, ...result["list"]];
737
+              }
738
+              break;
739
+          }
740
+        }
741
+      });
742
+  }
743
+  // 加载更多
744
+  // loadMore(type) {
745
+  //   switch (type) {
746
+  //     case 'surgeryDept':
747
+  //       this.printPharmacyIdx++;
748
+  //       this.printPharmacyLoad = true;
749
+  //       this.getPharmacyList(
750
+  //         this.printPharmacyIdx,
751
+  //         type,
752
+  //         this.printPharmacySearchKey
753
+  //       );
754
+  //       break;
755
+  //     case 'specimenDept':
756
+  //       this.waitPharmacyIdx++;
757
+  //       this.waitPharmacyLoad = true;
758
+  //       this.getPharmacyList(
759
+  //         this.waitPharmacyIdx,
760
+  //         type,
761
+  //         this.waitPharmacySearchKey
762
+  //       );
763
+  //       break;
764
+  //     case 'leavedDept':
765
+  //       this.pharmacyIdx++;
766
+  //       this.pharmacyLoad = true;
767
+  //       this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
768
+  //       break;
769
+  //   }
770
+  // }
771
+  // 搜索关键词
772
+  searchKeyHandle(type) {
773
+    switch (type) {
774
+      case 'surgeryDept':
775
+        this.printPharmacyIdx = 0; //页码重置
776
+        this.printPharmacyList = []; //列表重置
777
+        this.getPharmacyList(
778
+          this.printPharmacyIdx,
779
+          type,
780
+          this.printPharmacySearchKey
781
+        );
782
+        break;
783
+      case 'specimenDept':
784
+        this.waitPharmacyIdx = 0; //页码重置
785
+        this.waitPharmacyList = []; //列表重置
786
+        this.getPharmacyList(
787
+          this.waitPharmacyIdx,
788
+          type,
789
+          this.waitPharmacySearchKey
790
+        );
791
+        break;
792
+      case 'leavedDept':
793
+        this.pharmacyIdx = 0; //页码重置
794
+        this.pharmacyList = []; //列表重置
795
+        this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
796
+        break;
797
+    }
798
+  }
799
+  // 退出
800
+  logOut(): void {
801
+    // 假退出
802
+    let hospital = this.tool.getCurrentHospital();
803
+    if(hospital){
804
+      this.router.navigate(["login", hospital.id]);
805
+    }else{
806
+      this.router.navigateByUrl("login");
807
+    }
808
+    localStorage.removeItem("user");
809
+    localStorage.removeItem("menu");
810
+    localStorage.removeItem("phones");
811
+    localStorage.removeItem("index");
812
+    // 假退出
813
+    this.mainService.logOut().subscribe((data) => {
814
+      if (data.status == 200) {
815
+        if(hospital){
816
+          this.router.navigate(["login", hospital.id]);
817
+        }else{
818
+          this.router.navigateByUrl("login");
819
+        }
820
+        localStorage.removeItem("user");
821
+        localStorage.removeItem("menu");
822
+        localStorage.removeItem("phones");
823
+        localStorage.removeItem("index");
824
+      }
825
+    });
826
+
827
+  }
828
+
829
+  // 右侧菜单
830
+  showLastItems: boolean = false;
831
+  // 下拉
832
+  fixedMenuXiala() {
833
+    this.showLastItems = true;
834
+  }
835
+
836
+  // 上拉
837
+  fixedMenuShangla() {
838
+    this.showLastItems = false;
839
+  }
840
+
841
+  mainRole: boolean = false; //回到系统管理权限
842
+  initRole() {
843
+    let menus = JSON.parse(localStorage.getItem("menu"));
844
+    console.log("菜单数量" + menus.length);
845
+    if (menus.length >= 2) {
846
+      this.mainRole = true;
847
+      return;
848
+    }
849
+  }
850
+
851
+  // 切换右侧菜单Tab
852
+  fixedTab: string = "";
853
+  checkFixedTab(type: string) {
854
+    if (type == "toSystem") {
855
+      this.router.navigateByUrl("main");
856
+    }
857
+    if (this.fixedTab == type) {
858
+      this.fixedTab = "";
859
+    } else {
860
+      this.fixedTab = type;
861
+    }
862
+  }
863
+  //药房端科室切换
864
+  changeShow = true;
865
+  closeTime = 3;
866
+  closeTimeFlag = 0;
867
+  hsPromptModalShow: boolean = false; //科室切换提示框是否展示
868
+  timerCloseTime = null;
869
+  deptDisplay = 1; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
870
+  //子传父接收
871
+  closeModelHs(e) {
872
+    this.hsPromptModalShow = JSON.parse(e).show;
873
+    this.changeShow = JSON.parse(e).changeShow;
874
+  }
875
+  //子传父接收
876
+  clearModelHs(e) {
877
+    if (JSON.parse(e).clear === true) {
878
+      clearInterval(this.timerCloseTime);
879
+    }
880
+    this.changeShow = JSON.parse(e).changeShow;
881
+  }
882
+  // 头部切换科室
883
+  changeKsNow() {
884
+    this.hsPromptModalShow = true;
885
+    clearInterval(this.timerCloseTime);
886
+    this.changeShow = false;
887
+  }
888
+  // 切换科室
889
+  changeKs() {
890
+    this.hsPromptModalShow = true;
891
+    // (1)	当用户设置为正数时,用户必须查看此窗体指定秒数。
892
+    // (2)	当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
893
+    // (3)	如果用户填写0则为无自动关闭和强制查看时间。
894
+    if (this.closeTimeFlag === 0) {
895
+      return;
896
+    }
897
+    this.closeTime = Math.abs(this.closeTimeFlag);
898
+    clearInterval(this.timerCloseTime);
899
+    this.timerCloseTime = setInterval(() => {
900
+      this.closeTime = Math.max(--this.closeTime, 0);
901
+      if (this.closeTime === 0) {
902
+        if (this.closeTimeFlag <= 0) {
903
+          this.hsPromptModalShow = false;
904
+        }
905
+        clearInterval(this.timerCloseTime);
906
+      }
907
+    }, 1000);
908
+  }
909
+	
910
+	promptModalShow:boolean = false;
911
+	promptContent:any = null;
912
+	ifSuccess:any = null;
913
+	promptInfo:any = null;
914
+	// 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
915
+	showPromptModal(con, success, promptInfo?) {
916
+	  this.promptModalShow = false;
917
+	  this.promptContent = con;
918
+	  this.ifSuccess = success;
919
+	  this.promptInfo = promptInfo;
920
+	  setTimeout(() => {
921
+	    this.promptModalShow = true;
922
+	  }, 100);
923
+	}
924
+}
925
+

+ 17 - 0
src/app/views/specimen-room-view/specimen-room-view.module.ts

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

BIN
src/assets/images/yc_logo.png