maotao пре 6 месеци
родитељ
комит
a2ae9aa1de
20 измењених фајлова са 1299 додато и 131 уклоњено
  1. 2 1
      src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts
  2. 13 1
      src/app/services/main.service.ts
  3. 1 1
      src/app/share/pathology-add/pathology-add.component.html
  4. 1 1
      src/app/share/pathology-detail/pathology-detail.component.html
  5. 5 1
      src/app/views/admin-office-prescription/admin-office-prescription.component.html
  6. 34 7
      src/app/views/admin-office-prescription/admin-office-prescription.component.ts
  7. 4 0
      src/app/views/big-transfusion-set/big-transfusion-set.component.html
  8. 50 14
      src/app/views/big-transfusion-set/big-transfusion-set.component.ts
  9. 17 0
      src/app/views/dept-all-statistics/dept-all-statistics-routing.module.ts
  10. 379 0
      src/app/views/dept-all-statistics/dept-all-statistics.component.html
  11. 238 0
      src/app/views/dept-all-statistics/dept-all-statistics.component.less
  12. 353 0
      src/app/views/dept-all-statistics/dept-all-statistics.component.ts
  13. 19 0
      src/app/views/dept-all-statistics/dept-all-statistics.module.ts
  14. 81 77
      src/app/views/dispensing-batch/dispensing-batch.component.html
  15. 3 0
      src/app/views/dispensing-batch/dispensing-batch.component.less
  16. 24 13
      src/app/views/dispensing-batch/dispensing-batch.component.ts
  17. 33 6
      src/app/views/dispensing-info-detail/dispensing-info-detail.component.ts
  18. 32 6
      src/app/views/drug-cloud/drug-cloud.component.ts
  19. 5 3
      src/app/views/inspect-statistics/inspect-statistics.component.ts
  20. 5 0
      src/app/views/main/main-routing.module.ts

+ 2 - 1
src/app/components/configurationCenter/configuration-deptUser/configuration-deptUser.component.ts

@@ -146,7 +146,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
146 146
 		let groupData = {
147 147
 		  group2: {
148 148
 		    hospitals: this.hosId,
149
-		    type:1
149
+		    type:3
150 150
 		  },
151 151
 		  idx: 0,
152 152
 		  sum: 9999,
@@ -196,6 +196,7 @@ export class ConfigurationDeptUserComponent implements OnInit {
196 196
     this.validatePriorityForm.controls.department.setValue(deptArr);
197 197
     this.validatePriorityForm.controls.handleGroup.setValue(data.handleGroupDTO.id);
198 198
 		this.validatePriorityForm.controls.binding.setValue(data.handleUserDTO?'1':'0')
199
+		this.getUser(data.handleGroupDTO.id)
199 200
 		if(data.handleUserDTO){
200 201
 			this.validatePriorityForm.controls.handleUser.setValue(data.handleUserDTO.id);
201 202
 		}

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

@@ -993,11 +993,23 @@ export class MainService {
993 993
 	    headers: this.headers,
994 994
 	  });
995 995
 	}
996
-
996
+	
997 997
 	// 调度台工单列表
998 998
 	orderList(data) {
999 999
 	  return this.http.post(host.host + `/ser/merge/orderList`,data, {
1000 1000
 	    headers: this.headers,
1001 1001
 	  });
1002 1002
 	}
1003
+  // 调度台头部运维分组
1004
+	incidentUserTaskCount(data) {
1005
+	  return this.http.post(host.host + `/incident/incidentUserTaskCount`,data, {
1006
+      headers: this.headers,
1007
+	  });
1008
+	}
1009
+	// 大输液-科室汇总统计
1010
+	summaryData(data) {
1011
+	  return this.http.post(host.host + `/infusion/solutions/dept/summary`,data, {
1012
+	    headers: this.headers,
1013
+	  });
1014
+	}
1003 1015
 }

+ 1 - 1
src/app/share/pathology-add/pathology-add.component.html

@@ -47,7 +47,7 @@
47 47
 				</div>
48 48
 				
49 49
 				<div class="content-item">
50
-	<!-- 				<nz-form-item class="form-item">
50
+<!-- 					<nz-form-item class="form-item">
51 51
 						<nz-form-label nzRequired nzFor="intraoperativeFindings" [nzSm]="6" [nzXs]="24">术中所见</nz-form-label>
52 52
 						<nz-form-control nzErrorTip="请输入术中所见" [nzSm]="24" [nzXs]="24">
53 53
 							<textarea rows="3" nz-input formControlName="intraoperativeFindings" placeholder="请输入术中所见"></textarea>

+ 1 - 1
src/app/share/pathology-detail/pathology-detail.component.html

@@ -35,7 +35,7 @@
35 35
 						<div class="form-title font-weight-500">手术方案:</div>
36 36
 						<div class="indent">{{detailsData.surgicalPlan||'无'}}</div>
37 37
 					</div>
38
-			<!-- 		<div class="form-list">
38
+<!-- 					<div class="form-list">
39 39
 						<div class="form-title font-weight-500">术中所见:</div>
40 40
 						<div class="indent">{{detailsData.intraoperativeFindings||'无'}}</div>
41 41
 					</div> -->

+ 5 - 1
src/app/views/admin-office-prescription/admin-office-prescription.component.html

@@ -253,9 +253,13 @@
253 253
 					flex-wrap: wrap;
254 254
 					border-bottom: 1px solid #e7e7e7;">
255 255
 						<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
256
-							{{ data.cartonNum }} {{data.giveOutType && data.giveOutType.value==1?
256
+							{{ data.giveOutType.value==1 ? data.actualCount :data.cartonNum }}
257
+							{{data.giveOutType && data.giveOutType.value==1?
257 258
 							data.drugsInfoDTO.unit:'箱'}}
258 259
 						</span>
260
+						<span *ngIf="data.drugsInfoDTO.drugName=='合计'">
261
+							{{ data.cartonActual}}
262
+						</span>
259 263
 					</div>
260 264
 					
261 265
 				</div>

+ 34 - 7
src/app/views/admin-office-prescription/admin-office-prescription.component.ts

@@ -323,16 +323,22 @@ export class AdminOfficePrescriptionComponent implements OnInit{
323 323
   // snum = 0;
324 324
   getDeparts(dept) {
325 325
     var that = this;
326
-    let data = {
326
+    let data:any = {
327 327
       department: {
328 328
         dept,
329
-        hospital: {
330
-          id: this.hosId
331
-        },
329
+        hosIds: this.hosId,
332 330
       },
333 331
       idx: 0,
334 332
       sum: 20,
335 333
     };
334
+		if(this.isParentData==1){
335
+			if(this.tool.getCurrentUserInfo().currentHospital &&
336
+			this.tool.getCurrentUserInfo().currentHospital.parent){
337
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
338
+			}else{
339
+				data.department.hosIds = this.hosId
340
+			}
341
+		}
336 342
     that.mainService
337 343
 		.getFetchDataList("data", "department", data)
338 344
 		.subscribe((data) => {
@@ -344,9 +350,29 @@ export class AdminOfficePrescriptionComponent implements OnInit{
344 350
   }
345 351
 
346 352
   // 获取所有院区
353
+	isParentData:any = null;
347 354
   getAllHospital() {
348
-		this.getDeparts('')
349
-    this.getList();
355
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
356
+			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
357
+			let postData = {
358
+			  idx: 0,
359
+			  sum: 10,
360
+			  taskTypeConfig: {
361
+					hosId:this.hosId,
362
+					taskType:taskTypeData.id
363
+			  }
364
+			};
365
+			this.mainService
366
+			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
367
+			  .subscribe((result) => {
368
+			    if (result.status == 200) {
369
+						let data = result.list[0] || {};
370
+						this.isParentData = data.quoteParentData;
371
+						this.getDeparts('')
372
+						this.getList();
373
+			    }
374
+			  });
375
+		});
350 376
   }
351 377
 
352 378
   // 切换院区选项
@@ -850,7 +876,8 @@ export class AdminOfficePrescriptionComponent implements OnInit{
850 876
 					},
851 877
 					expendCount:res.data.totalExpendCount,
852 878
 					addSub:res.data.totalAddSub,
853
-					deptName:''
879
+					deptName:'',
880
+					cartonActual:res.data.cartonActual
854 881
 				})
855 882
         that.codes = arr
856 883
         that.printLoading = false;

+ 4 - 0
src/app/views/big-transfusion-set/big-transfusion-set.component.html

@@ -11,6 +11,10 @@
11 11
     <div class="list" *ngIf="!loading">
12 12
       <!-- 特性配置 -->
13 13
       <div *ngIf="tabModalName=='characteristics'">
14
+				<div class="display_flex align-items_center mb8">
15
+					<nz-form-label class="label">是否引用父级院区数据</nz-form-label>
16
+					<nz-checkbox-group [(ngModel)]="quoteParentData" (ngModelChange)="parentChange($event)"></nz-checkbox-group>
17
+				</div>
14 18
        <!-- 任务类型 -->
15 19
        <div class="display_flex align-items_center mb8">
16 20
          <nz-form-label class="label" nzRequired>任务类型</nz-form-label>

+ 50 - 14
src/app/views/big-transfusion-set/big-transfusion-set.component.ts

@@ -25,6 +25,9 @@ export class BigTransfusionSetComponent implements OnInit {
25 25
   // 苏醒室科室
26 26
   recoveryDeptId:any;
27 27
   recoveryDepts:any[] = [];
28
+	quoteParentData:any[] = [
29
+    {label:'是否开启',value: 0}
30
+  ];
28 31
   // 自动建单
29 32
   autoCreateOrders:any[] = [
30 33
     {label:'是否开启',value: 0}
@@ -79,6 +82,7 @@ export class BigTransfusionSetComponent implements OnInit {
79 82
 	];
80 83
   // 配置
81 84
   configs:any = {};
85
+	isParentData:any = null;
82 86
   searchTimerSubject = new Subject();
83 87
 	searchParentDeptSubject = new Subject();
84 88
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
@@ -94,9 +98,8 @@ export class BigTransfusionSetComponent implements OnInit {
94 98
 			this.isLoading = true;
95 99
 			this.getDeparts(e,'search');
96 100
 		});
97
-		
98
-    this.getTaskTypes('', true, 'load');
99
-		this.getDeparts('','load')
101
+		this.getTaskTypesId()
102
+
100 103
   }
101 104
 
102 105
   // 切换tab
@@ -110,6 +113,10 @@ export class BigTransfusionSetComponent implements OnInit {
110 113
       this.msg.create("warning", "请选择任务类型!");
111 114
       return;
112 115
     }
116
+		if(!this.pharmacyDept){
117
+		  this.msg.create("warning", "请选择默认发药科室!");
118
+		  return;
119
+		}
113 120
     let editData = {
114 121
 			id:'',
115 122
 			taskType:this.taskTypeData.id,
@@ -119,7 +126,8 @@ export class BigTransfusionSetComponent implements OnInit {
119 126
 			timingOrder:0,//定时建单
120 127
 			printOrder:0,// 打印并建单
121 128
 			executeTime:'',// 定时建单-选择时分
122
-			autoCreate:0
129
+			autoCreate:0,
130
+			quoteParentData:0
123 131
     };
124 132
 		if(this.editId){
125 133
 			editData.id = this.editId
@@ -133,6 +141,11 @@ export class BigTransfusionSetComponent implements OnInit {
133 141
 			delete editData.autoCreate
134 142
 		}
135 143
 		
144
+		if(this.quoteParentData[0].checked){
145
+			editData.quoteParentData = 1
146
+		}else{
147
+			delete editData.quoteParentData
148
+		}
136 149
 		if(this.radioValue=='1'){
137 150
 			editData.timingOrder = 1
138 151
 			editData.executeTime = this.executeTime ? format(startOfMinute(this.executeTime), "yyyy-MM-dd HH:mm:ss") : undefined
@@ -190,11 +203,17 @@ export class BigTransfusionSetComponent implements OnInit {
190 203
 					key: 'association_types',
191 204
 					value: 'other'
192 205
 				},
193
-        hosId: {
194
-          id: this.hosId
195
-        }
206
+        hosIds: this.hosId
196 207
       }
197 208
     };
209
+		if(this.quoteParentData[0].checked){
210
+			if(this.tool.getCurrentUserInfo().currentHospital &&
211
+			this.tool.getCurrentUserInfo().currentHospital.parent){
212
+				postData.taskType.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
213
+			}else{
214
+				postData.taskType.hosIds = this.hosId
215
+			}
216
+		}
198 217
     this.isLoading = true;
199 218
     this.mainService
200 219
       .getFetchDataList("simple/data", "taskType", postData)
@@ -202,9 +221,9 @@ export class BigTransfusionSetComponent implements OnInit {
202 221
         this.isLoading = false;
203 222
         if (result.status == 200) {
204 223
           this.taskTypes1 = result.list || [];
205
-					if(type=='load'){
206
-						this.getTaskTypesId();
207
-					}
224
+					// if(type=='load'){
225
+					// 	this.getTaskTypesId();
226
+					// }
208 227
         }
209 228
       });
210 229
   }
@@ -223,9 +242,7 @@ export class BigTransfusionSetComponent implements OnInit {
223 242
 	  let data = {
224 243
 	    department: {
225 244
 	      dept,
226
-	      hospital: {
227
-	        id: this.hosId
228
-	      },
245
+	      hosIds: this.hosId,
229 246
 				type:{
230 247
 					id:''
231 248
 				}
@@ -233,6 +250,14 @@ export class BigTransfusionSetComponent implements OnInit {
233 250
 	    idx: 0,
234 251
 	    sum: 20,
235 252
 	  };
253
+		if(this.quoteParentData[0].checked){
254
+			if(this.tool.getCurrentUserInfo().currentHospital &&
255
+			this.tool.getCurrentUserInfo().currentHospital.parent){
256
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
257
+			}else{
258
+				data.department.hosIds = this.hosId
259
+			}
260
+		}
236 261
 		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
237 262
 		  let typeData = res.find(i=>i.value=='pharmacyRoom');
238 263
 			if(typeData){
@@ -248,12 +273,19 @@ export class BigTransfusionSetComponent implements OnInit {
248 273
 						},500)
249 274
 					}else{
250 275
 						this.hospitals = data.list
251
-						that.isLoading = false;
276
+						that.loading  = false;
252 277
 					}
253 278
 			  });
254 279
 		});
255 280
 	}
256 281
 	
282
+	parentChange(e){
283
+		this.getTaskTypes('', true, 'load');
284
+		this.getDeparts('','load');
285
+		this.infusionSolutionsTypeId = null;
286
+		this.pharmacyDept = null;
287
+	}
288
+	
257 289
   // 获取配置
258 290
   getConfig() {
259 291
     this.loading = true;
@@ -271,10 +303,14 @@ export class BigTransfusionSetComponent implements OnInit {
271 303
         this.loading = false;
272 304
         if (result.status == 200) {
273 305
     			let data = result.list[0] || {};
306
+					this.isParentData = data.quoteParentData;
274 307
 					this.editId = data.id
275 308
 					this.autoCreateOrders[0].checked = data.autoCreate == 1;
309
+					this.quoteParentData[0].checked = data.quoteParentData == 1;
276 310
     			this.infusionSolutionsTypeId = data.infusionSolutionsTypeId
277 311
 					this.pharmacyDept = data.pharmacyDept
312
+					this.getTaskTypes('', true, 'load');
313
+					this.getDeparts('','load')
278 314
 					if(data.timingOrder=='1'){
279 315
 						this.radioValue = '1'
280 316
 						this.executeTime = data.executeTime ? new Date(data.executeTime) : null;

+ 17 - 0
src/app/views/dept-all-statistics/dept-all-statistics-routing.module.ts

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

+ 379 - 0
src/app/views/dept-all-statistics/dept-all-statistics.component.html

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

+ 238 - 0
src/app/views/dept-all-statistics/dept-all-statistics.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
+

+ 353 - 0
src/app/views/dept-all-statistics/dept-all-statistics.component.ts

@@ -0,0 +1,353 @@
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-dept-all-statistics",
22
+  templateUrl: "./dept-all-statistics.component.html",
23
+  styleUrls: ["./dept-all-statistics.component.less"],
24
+})
25
+export class DeptAllStatisticsComponent 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
+	pageDetailIndex: number = 1; //页码
76
+  pageIndex: number = 1; //页码
77
+  listLength: number = 10; //总条数
78
+  pageSize: number = 10; //每页条数
79
+  btnLoading: boolean = false; //确认按钮loading状态
80
+  printLoading: boolean = false; //批量打印按钮loading状态
81
+  deptPhones: any = []; //新添加的科室电话列表
82
+  isAddDeptsPhone = true; //添加新的科室电话是否禁用
83
+  deptsPhoneId = 1; //科室电话自增id
84
+  allParentdepart: any = []; //所有的父级科室列表
85
+  hospitals1: any = []; //科室列表(搜索)
86
+	rowData: object = {}; //打印选择列表
87
+  searchParentDeptSubject = new Subject();
88
+  // 初始化增删改按钮
89
+  coopBtns: any = {};
90
+	viewData: any = []; //科室单查看数据
91
+	commodityData:any = [];
92
+	batchData:any = [];
93
+	maskFlag:any = null;
94
+	
95
+	
96
+  // 导出
97
+  excelExport(){
98
+		if(!this.startDate && !this.endDate){
99
+			this.message.error('您必须填写发药日期,才能执行导出')
100
+			return
101
+		}
102
+    this.maskFlag = this.message.loading("正在导出..", {
103
+      nzDuration: 0,
104
+    }).messageId;
105
+    this.mainService.exportReport("infusionSolutionsDeptSummary", {
106
+			deptId:this.department,
107
+			startTime: this.startDate,
108
+			endTime: this.endDate,
109
+			drugId:this.commodity,
110
+			hosId:this.hosId
111
+		}).subscribe(
112
+      (data) => {
113
+        this.message.remove(this.maskFlag);
114
+        this.maskFlag = false;
115
+        this.message.success('导出成功');
116
+        var file = new Blob([data], {
117
+          type: "application/vnd.ms-excel",
118
+        });
119
+        var fileURL = URL.createObjectURL(file);
120
+        var a = document.createElement("a");
121
+        a.href = fileURL;
122
+        a.target = "_blank";
123
+        a.download = "科室汇总统计.xls";
124
+        document.body.appendChild(a);
125
+        a.click();
126
+      },
127
+      (err) => {
128
+        this.message.remove(this.maskFlag);
129
+        this.maskFlag = false;
130
+        this.message.error('导出失败');
131
+      }
132
+    );
133
+  }
134
+
135
+  //搜索父级科室
136
+	loading = false;
137
+  changeInp(e,type) {
138
+		this.loading = true
139
+    this.searchParentDeptSubject.next([e,type]);
140
+  }
141
+	
142
+	// 查看
143
+	detailsLoading:Boolean = false;
144
+	listDetailLength:any;
145
+	detailDeptId:any;
146
+	detailDrugId:any;
147
+	detail(id1,id2) {
148
+		this.detailDeptId = id1
149
+		this.detailDrugId = id2
150
+		let data = {
151
+			idx: this.pageDetailIndex - 1,
152
+			sum: this.pageSize,
153
+			deptId:id1,
154
+			startTime: this.startDate,
155
+			endTime: this.endDate,
156
+			drugId:id2,
157
+			hosId:this.hosId
158
+		};
159
+		this.detailsLoading = true;
160
+		this.mainService
161
+		.drugsInfo(data).subscribe((res:any) => {
162
+			this.detailsLoading = false;
163
+			for(let i of res.list){
164
+				i.num = i['4'] + i['5'] + i['6']
165
+			}
166
+			this.modal = true
167
+			this.viewData = res.list;
168
+			this.listDetailLength = res.totalNum;
169
+		});
170
+	}
171
+	
172
+	// 详情分页
173
+	detailList(){
174
+		let data = {
175
+			idx: this.pageDetailIndex - 1,
176
+			sum: this.pageSize,
177
+			deptId:this.detailDeptId,
178
+			startTime: this.startDate,
179
+			endTime: this.endDate,
180
+			drugId:this.detailDrugId,
181
+			hosId:this.hosId
182
+		};
183
+		this.detailsLoading = true;
184
+		this.mainService
185
+		.drugsInfo(data).subscribe((res:any) => {
186
+			this.detailsLoading = false;
187
+			for(let i of res.list){
188
+				i.num = i['4'] + i['5'] + i['6']
189
+			}
190
+			this.viewData = res.list;
191
+			this.listDetailLength = res.totalNum;
192
+		});
193
+	}
194
+	
195
+	hideModal(){
196
+		this.pageDetailIndex = 1
197
+		this.modal = false
198
+	}
199
+	
200
+  // 搜索
201
+  search() {
202
+		if(!this.startDate && !this.endDate){
203
+			this.message.error('您必须填写发药日期,才能执行搜索')
204
+			return
205
+		}
206
+    this.pageIndex = 1;
207
+    this.getList();
208
+  }
209
+  // 重置
210
+  reset() {
211
+    this.pageIndex = 1;
212
+    this.department = null;
213
+		// this.batch = null;
214
+		this.commodity = null;
215
+    this.batchNumber = "";
216
+		this.dateRange = [];
217
+		this.startDate = "";
218
+		this.endDate = "";
219
+		this.listOfData = [];
220
+		this.listLength = 0;
221
+    // this.getList();
222
+  }
223
+  // 表格数据
224
+  loading1 = false;
225
+  getList() {
226
+    var that = this;
227
+    let data = {
228
+      idx: that.pageIndex - 1,
229
+      sum: that.pageSize,
230
+			deptId:this.department,
231
+			startTime: this.startDate,
232
+			endTime: this.endDate,
233
+			drugId:this.commodity,
234
+			hosId:this.hosId
235
+    };
236
+		this.loading1 = true;
237
+		this.mainService
238
+			.summaryData(data).subscribe((res:any) => {
239
+				this.loading1 = false;
240
+				this.listOfData = res.list
241
+				that.listLength = res.totalNum;
242
+			});
243
+  }
244
+	
245
+	// 日期选择
246
+	startDate: string; //发起时间开始
247
+	endDate: string; //发起时间结束
248
+	changeDate(result?): void {
249
+	  if (result.length==0) {
250
+	    this.startDate = this.endDate = null;
251
+	    return;
252
+	  }
253
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
254
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
255
+		this.dateRange = [this.startDate,this.endDate]
256
+	}
257
+	
258
+	// 获取所有科室
259
+  getDeparts(dept) {
260
+    var that = this;
261
+    let data:any = {
262
+      department: {
263
+        dept,
264
+        hosIds: this.hosId,
265
+      },
266
+      idx: 0,
267
+      sum: 20,
268
+    };
269
+		if(this.isParentData==1){
270
+			if(this.tool.getCurrentUserInfo().currentHospital &&
271
+			this.tool.getCurrentUserInfo().currentHospital.parent){
272
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
273
+			}else{
274
+				data.department.hosIds = this.hosId
275
+			}
276
+		}
277
+    that.mainService
278
+		.getFetchDataList("data", "department", data)
279
+		.subscribe((data) => {
280
+			this.loading = false
281
+			this.hospitals1 = data.list
282
+		});
283
+  }
284
+	
285
+	// 获取药品
286
+	getCommodityData(name) {
287
+	  let data = {
288
+	    drugsInfo: {
289
+	      drugName: name || "",
290
+	      hosId: this.hosId || "" ,
291
+	    	drugType:{
292
+	    		id:'20327'
293
+	    	}
294
+	    },
295
+	    idx: 0,
296
+	    sum: 10,
297
+	  };
298
+	  this.mainService
299
+		.getFetchDataList("data", "drugsInfo", data)
300
+		.subscribe((data) => {
301
+			this.loading = false
302
+			this.commodityData = data.list
303
+		});
304
+	}
305
+	
306
+	// 获取批次号
307
+	getBathData(name) {
308
+	  let data = {
309
+	    drugsBatch: {
310
+	    	batchNo:name,
311
+	    	hosId: this.hosId,
312
+				batchStatus:{
313
+					value:2
314
+				}
315
+	    },
316
+	    idx: 0,
317
+	    sum: 10,
318
+	  };
319
+	  this.mainService
320
+		.getFetchDataList("data", "drugsBatch", data)
321
+		.subscribe((data) => {
322
+			this.loading = false
323
+			this.batchData = data.list
324
+		});
325
+	}
326
+	
327
+	isParentData:any = null;
328
+  getAllquest() {
329
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
330
+			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
331
+			let postData = {
332
+			  idx: 0,
333
+			  sum: 10,
334
+			  taskTypeConfig: {
335
+					hosId:this.hosId,
336
+					taskType:taskTypeData.id
337
+			  }
338
+			};
339
+			this.mainService
340
+			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
341
+			  .subscribe((result) => {
342
+			    if (result.status == 200) {
343
+						let data = result.list[0] || {};
344
+						this.isParentData = data.quoteParentData;
345
+						this.getDeparts('')
346
+			    }
347
+			  });
348
+		});
349
+		this.getCommodityData('')
350
+		// this.getBathData('')
351
+    // this.getList();
352
+  }
353
+}

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

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

+ 81 - 77
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -1,84 +1,85 @@
1
-<div class="list-template">
2
-  <div class="list-template__content">
3
-    <div class="list-template__top" nz-row>
4
-      <div nz-col nzLg='16' class="list-template__searchBox">
5
-        <div class="list-template__searchItem">
6
-          <span class="label">批次号:</span>
7
-          <input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
8
-        </div>
9
-        <div class="list-template__searchItem">
10
-          <span class="label">创建时间:</span>
11
-          <nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
12
-					(ngModelChange)="changeDate($event)"></nz-range-picker>
13
-        </div>
14
-      </div>
15
-			<div nz-col nzLg='2' class="autoUpdate">{{ logTime }}秒</div>
16
-      <div nz-col nzLg="6" class="list-template__btns">
17
-        <button class="btn default" (click)='search()'>搜索</button>
18
-        <button class="btn default ml8" (click)='reset()'>重置</button>
19
-				<button *ngIf="coopBtns.add" class="btn default ml8" (click)='showModal()'>新增</button>
20
-      </div>
21
-    </div>
22
-    <div class="list-template__bottom">
23
-      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
24
-        [nzLoading]="loading1">
25
-        <thead>
26
-          <tr class="thead">
27
-            <th nzWidth="13%">批次号</th>
28
-            <th nzWidth="13%">创建时间</th>
29
-            <th nzWidth="13%">发药时间区间</th>
30
-            <th nzWidth="7%">发药科室</th>
31
-            <th nzWidth="7%">科室数</th>
32
-            <th nzWidth="7%">发药量</th>
33
-            <th nzWidth="7%">箱数</th>
34
-            <th nzWidth="10%">药品总价</th>
35
-						<th nzWidth="7%">状态</th>
36
-            <th nzWidth="16%">操作</th>
37
-          </tr>
38
-        </thead>
39
-        <tbody>
40
-          <tr *ngFor="let data of listOfData">
41
-            <td>{{ data.batchNo || '-' }}</td>
42
-            <td>{{ data.createTime|date:'yyyy-MM-dd HH:mm' }}</td>
43
-            <td>
44
-							<div>{{ data.startTime|date:'yyyy-MM-dd HH:mm' }}至</div>
45
-							<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
46
-						</td>
47
-            <td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
48
-            <td>{{ data.deptNum || '0' }}</td>
49
-            <td>{{ data.drugNum || '0'}}</td>
50
-						<td>{{ data.cartonNum || '0' }}</td>
51
-						<td>{{ data.totalPrice || '0' }}</td>
52
-						<td>{{ data.batchState?data.batchState.name : '-' }}</td>
53
-            <td>
54
-              <div class="coop">
55
-								<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
56
-								<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
57
-                <span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</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>
62
-                <span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
63
-              </div>
64
-            </td>
65
-          </tr>
66
-        </tbody>
67
-      </nz-table>
68
-      <div class="list-template__pagination">
69
-        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
70
-          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
71
-        </nz-pagination>
72
-      </div>
73
-    </div>
74
-  </div>
75
-
1
+<div>
2
+	<div class="list-template">
3
+		<div class="list-template__content">
4
+			<div class="list-template__top" nz-row>
5
+				<div nz-col nzLg='16' class="list-template__searchBox">
6
+					<div class="list-template__searchItem">
7
+						<span class="label">批次号:</span>
8
+						<input nz-input class="formItem" [(ngModel)]="batchNumber" placeholder="请输入批次号" nzSize="default" />
9
+					</div>
10
+					<div class="list-template__searchItem">
11
+						<span class="label">创建时间:</span>
12
+						<nz-range-picker [(ngModel)]="dateRange" nzFormat="yyyy-MM-dd"
13
+						(ngModelChange)="changeDate($event)"></nz-range-picker>
14
+					</div>
15
+				</div>
16
+				<div nz-col nzLg='2' class="autoUpdate">{{ logTime }}秒</div>
17
+				<div nz-col nzLg="6" class="list-template__btns">
18
+					<button class="btn default" (click)='search()'>搜索</button>
19
+					<button class="btn default ml8" (click)='reset()'>重置</button>
20
+					<button *ngIf="coopBtns.add" class="btn default ml8" (click)='showModal()'>新增</button>
21
+				</div>
22
+			</div>
23
+			<div class="list-template__bottom">
24
+				<nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
25
+					[nzLoading]="loading1">
26
+					<thead>
27
+						<tr class="thead">
28
+							<th nzWidth="13%">批次号</th>
29
+							<th nzWidth="13%">创建时间</th>
30
+							<th nzWidth="13%">发药时间区间</th>
31
+							<th nzWidth="7%">发药科室</th>
32
+							<th nzWidth="7%">科室数</th>
33
+							<th nzWidth="7%">发药量</th>
34
+							<th nzWidth="7%">箱数</th>
35
+							<th nzWidth="10%">药品总价</th>
36
+							<th nzWidth="7%">状态</th>
37
+							<th nzWidth="16%">操作</th>
38
+						</tr>
39
+					</thead>
40
+					<tbody>
41
+						<tr *ngFor="let data of listOfData">
42
+							<td>{{ data.batchNo || '-' }}</td>
43
+							<td>{{ data.createTime|date:'yyyy-MM-dd HH:mm' }}</td>
44
+							<td>
45
+								<div>{{ data.startTime|date:'yyyy-MM-dd HH:mm' }}至</div>
46
+								<div>{{ data.endTime|date:'yyyy-MM-dd HH:mm' }}</div>
47
+							</td>
48
+							<td>{{ data.pharmacyDTO?data.pharmacyDTO.dept:'-' }}</td>
49
+							<td>{{ data.deptNum || '0' }}</td>
50
+							<td>{{ data.drugNum || '0'}}</td>
51
+							<td>{{ data.cartonNum || '0' }}</td>
52
+							<td>{{ data.totalPrice || '0' }}</td>
53
+							<td>{{ data.batchState?data.batchState.name : '-' }}</td>
54
+							<td>
55
+								<div class="coop">
56
+									<span *ngIf="coopBtns.edit && data.batchState.name=='未发药'" (click)="edit($event,data)">编辑</span>
57
+									<span *ngIf="coopBtns.del && data.batchState.name=='未发药'" (click)="showDelModal($event,data.id)">删除</span>
58
+									<span *ngIf="coopBtns.config && data.batchState.name=='未发药'" (click)="detail($event,data)">配置</span>
59
+									<span *ngIf="coopBtns.dispensingGross && data.batchState.name=='已发药'" (click)="dispensingGross($event, data)">发药总量</span>
60
+									<span *ngIf="coopBtns.dispensingInfo && data.batchState.name=='已发药'" (click)="dispensingInfo($event, data)">发药信息</span>
61
+									<span *ngIf="coopBtns.export && data.batchState.name=='已发药'" (click)="exportPc($event, data)">导出</span>
62
+									<span *ngIf="coopBtns.print && data.batchState.name=='已发药'" (click)="print($event,data, data.id)">打印</span>
63
+									<span *ngIf="coopBtns.batchPrint && data.batchState.name=='未发药'" (click)="dispensingPrint($event, data, data.id)">发药并打印</span>
64
+								</div>
65
+							</td>
66
+						</tr>
67
+					</tbody>
68
+				</nz-table>
69
+				<div class="list-template__pagination">
70
+					<nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
71
+						(nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
72
+					</nz-pagination>
73
+				</div>
74
+			</div>
75
+		</div>
76
+	</div>
76 77
   <!-- 新增/编辑模态框 -->
77 78
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
78 79
     <div class="modalBody">
79 80
       <div class="title">发药批次-{{add ? '新增' : '编辑'}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
80 81
       </div>
81
-      <overlay-scrollbars #osComponentRef1 class="content">
82
+      <div class="content">
82 83
        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
83 84
        	<nz-form-item>
84 85
        	  <nz-form-label nzRequired nzFor="dispensingTime">发药时间区间</nz-form-label>
@@ -114,7 +115,7 @@
114 115
 					</nz-form-control>
115 116
 				</nz-form-item>
116 117
        </form>
117
-      </overlay-scrollbars>
118
+      </div>
118 119
       <div class="display_flex justify-content_flex-center">
119 120
         <button class="btn" nz-button nzType="primary" (click)="submitForm()" [nzLoading]="btnLoading">{{add ? '保存并配置' : '保存'}}</button>
120 121
 				<button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
@@ -357,6 +358,9 @@
357 358
 						{{data.giveOutType && data.giveOutType.value==1?
358 359
 						data.drugsInfoDTO.unit:'箱'}}
359 360
 					</span>
361
+					<span *ngIf="data.drugsInfoDTO.drugName=='合计'">
362
+						{{ data.cartonActual}}
363
+					</span>
360 364
 					</div>
361 365
 					
362 366
 				</div>

+ 3 - 0
src/app/views/dispensing-batch/dispensing-batch.component.less

@@ -27,6 +27,9 @@
27 27
 .autoUpdate{
28 28
 	text-align: right;
29 29
 }
30
+.list-template .ant-calendar-picker{
31
+	width: auto !important; 
32
+}
30 33
 .save {
31 34
   position: fixed;
32 35
   left: 0;

+ 24 - 13
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -50,7 +50,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
50 50
 		this.hosId = this.tool.getCurrentHospital().id;
51 51
     this.coopBtns = this.tool.initCoopBtns(this.route);
52 52
     this.initForm();
53
-		this.getAddDeparts('')
53
+		this.getTaskTypesId();
54 54
     this.getAllHospital();
55 55
     this.getDeptHandoverType();
56 56
 		this.autoUpdate(true)
@@ -247,12 +247,10 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
247 247
 	// 获取药房科室
248 248
 	getAddDeparts(dept) {
249 249
 		var that = this;
250
-		let data = {
250
+		let data:any = {
251 251
 			department: {
252 252
 				dept,
253
-				hospital: {
254
-					id: this.hosId
255
-				},
253
+				hosIds: this.hosId,
256 254
 				type:{
257 255
 					id:''
258 256
 				}
@@ -260,6 +258,14 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
260 258
 			idx: 0,
261 259
 			sum: 20,
262 260
 		};
261
+		if(this.isParentData==1){
262
+			if(this.tool.getCurrentUserInfo().currentHospital &&
263
+			this.tool.getCurrentUserInfo().currentHospital.parent){
264
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
265
+			}else{
266
+				data.department.hosIds = this.hosId
267
+			}
268
+		}
263 269
 		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
264 270
 			let typeData = res.find(i=>i.value=='pharmacyRoom');
265 271
 			if(typeData){
@@ -293,12 +299,12 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
293 299
 	getTaskTypesId() {
294 300
 		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
295 301
 			this.taskTypeData = data.find(i=>i.value=='infusionSolutions')
296
-			this.getConfig();
297 302
 		});
298 303
 	}
299 304
 	
300 305
 	// 获取配置
301
-	getConfig() {
306
+	isParentData:any;
307
+	getConfig(type) {
302 308
 	  let postData = {
303 309
 	    idx: 0,
304 310
 	    sum: 10,
@@ -312,10 +318,14 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
312 318
 		.subscribe((result) => {
313 319
 			if (result.status == 200) {
314 320
 				let data = result.list[0] || {};
315
-				this.validateForm.controls.addDepartment.setValue(data.pharmacyDept || '');
316
-				this.add = true;
321
+				this.isParentData = data.quoteParentData;
322
+				if(type=='add'){
323
+					this.add = true;
324
+					this.isAddDeptsPhone = true;
325
+					this.validateForm.controls.addDepartment.setValue(data.pharmacyDept || '');
326
+				}
327
+				this.getAddDeparts('')
317 328
 				this.modal = true;
318
-				this.isAddDeptsPhone = true;
319 329
 			}
320 330
 		});
321 331
 	}
@@ -323,7 +333,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
323 333
   // 新增弹框
324 334
   showModal() {
325 335
     this.initForm();
326
-		this.getTaskTypesId()
336
+		this.getConfig('add');
327 337
   }
328 338
   hideModal() {
329 339
     this.coopItem = null;
@@ -384,6 +394,7 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
384 394
   coopItem: any = null;
385 395
   edit(e, data) {
386 396
     e.stopPropagation();
397
+		this.getConfig('edit');
387 398
     this.add = false;
388 399
     this.coopId = data.id;
389 400
     this.coopItem = data;
@@ -396,7 +407,6 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
396 407
 		}
397 408
 		this.loadStartTime = data.startTime
398 409
 		this.loadEndTime = data.endTime
399
-		console.log(11,this.validateForm.value)
400 410
 		this.modal = true
401 411
   }
402 412
 
@@ -580,7 +590,8 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
580 590
 						},
581 591
 						expendCount:i.totalExpendCount,
582 592
 						addSub:i.totalAddSub,
583
-						deptName:''
593
+						deptName:'',
594
+						cartonActual:i.cartonActual
584 595
 					})
585 596
 				}
586 597
 		    that.printData = arr;

+ 33 - 6
src/app/views/dispensing-info-detail/dispensing-info-detail.component.ts

@@ -194,16 +194,22 @@ export class DispensingInfoDetailComponent implements OnInit{
194 194
 	// 获取所有科室
195 195
   getDeparts(dept) {
196 196
     var that = this;
197
-    let data = {
197
+    let data:any = {
198 198
       department: {
199 199
         dept,
200
-        hospital: {
201
-          id: this.hosId
202
-        },
200
+        hosIds: this.hosId,
203 201
       },
204 202
       idx: 0,
205 203
       sum: 20,
206 204
     };
205
+		if(this.isParentData==1){
206
+			if(this.tool.getCurrentUserInfo().currentHospital &&
207
+			this.tool.getCurrentUserInfo().currentHospital.parent){
208
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
209
+			}else{
210
+				data.department.hosIds = this.hosId
211
+			}
212
+		}
207 213
     that.mainService
208 214
 		.getFetchDataList("data", "department", data)
209 215
 		.subscribe((data) => {
@@ -239,7 +245,7 @@ export class DispensingInfoDetailComponent implements OnInit{
239 245
 	    drugsBatch: {
240 246
 	    	batchNo:name,
241 247
 	    	hosId: this.hosId,
242
-				batchStatus:{
248
+				batchState:{
243 249
 					value:2
244 250
 				}
245 251
 	    },
@@ -253,8 +259,29 @@ export class DispensingInfoDetailComponent implements OnInit{
253 259
 			this.batchData = data.list
254 260
 		});
255 261
 	}
262
+	
263
+	isParentData:any = null;
256 264
   getAllquest() {
257
-		this.getDeparts('')
265
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
266
+			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
267
+			let postData = {
268
+			  idx: 0,
269
+			  sum: 10,
270
+			  taskTypeConfig: {
271
+					hosId:this.hosId,
272
+					taskType:taskTypeData.id
273
+			  }
274
+			};
275
+			this.mainService
276
+			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
277
+			  .subscribe((result) => {
278
+			    if (result.status == 200) {
279
+						let data = result.list[0] || {};
280
+						this.isParentData = data.quoteParentData;
281
+						this.getDeparts('')
282
+			    }
283
+			  });
284
+		});
258 285
 		this.getCommodityData('')
259 286
 		this.getBathData('')
260 287
     this.getList();

+ 32 - 6
src/app/views/drug-cloud/drug-cloud.component.ts

@@ -189,16 +189,22 @@ export class DrugCloudComponent implements OnInit {
189 189
 	// 获取所有科室
190 190
   getDeparts(dept) {
191 191
     var that = this;
192
-    let data = {
192
+    let data:any = {
193 193
       department: {
194 194
         dept,
195
-        hospital: {
196
-          id: this.hosId
197
-        },
195
+        hosIds: this.hosId,
198 196
       },
199 197
       idx: 0,
200 198
       sum: 20,
201 199
     };
200
+		if(this.isParentData==1){
201
+			if(this.tool.getCurrentUserInfo().currentHospital &&
202
+			this.tool.getCurrentUserInfo().currentHospital.parent){
203
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
204
+			}else{
205
+				data.department.hosIds = this.hosId
206
+			}
207
+		}
202 208
     that.mainService
203 209
       .getFetchDataList("data", "department", data)
204 210
       .subscribe((data) => {
@@ -210,9 +216,29 @@ export class DrugCloudComponent implements OnInit {
210 216
   }
211 217
 	
212 218
   // 获取所有院区
219
+	isParentData:any = null;
213 220
   getAllHospital() {
214
-		this.getDeparts('')
215
-    this.getDrugType();
221
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
222
+			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
223
+			let postData = {
224
+			  idx: 0,
225
+			  sum: 10,
226
+			  taskTypeConfig: {
227
+					hosId:this.hosId,
228
+					taskType:taskTypeData.id
229
+			  }
230
+			};
231
+			this.mainService
232
+			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
233
+			  .subscribe((result) => {
234
+			    if (result.status == 200) {
235
+						let data = result.list[0] || {};
236
+						this.isParentData = data.quoteParentData;
237
+						this.getDeparts('')
238
+						this.getDrugType();
239
+			    }
240
+			  });
241
+		});
216 242
   }
217 243
 
218 244
 

+ 5 - 3
src/app/views/inspect-statistics/inspect-statistics.component.ts

@@ -60,9 +60,11 @@ export class InspectStatisticsComponent implements OnInit {
60 60
  // 重置
61 61
  reset() {
62 62
   this.pageIndex = 1;
63
-  this.startDate = null;
64
- 	this.endDate = null;
65
- 	this.dateRange = [];
63
+	const todayStart = startOfToday();
64
+	const formattedTodayStart = format(todayStart, 'yyyy-MM-dd');
65
+	this.startDate = formattedTodayStart+' '+'00:00:00';
66
+	this.endDate = formattedTodayStart+' '+'23:59:59';
67
+	this.dateRange = [this.startDate,this.endDate];
66 68
   this.getList();
67 69
  }
68 70
  // 表格数据

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

@@ -603,6 +603,11 @@ const routes: Routes = [
603 603
 			  path: "dispensingInfoDetail",
604 604
 			  loadChildren: () => import("../dispensing-info-detail/dispensing-info-detail.module").then((m) => m.DispensingInfoDetailModule),
605 605
 			},
606
+			// 科室汇总统计
607
+			{
608
+			  path: "deptAllStatistics",
609
+			  loadChildren: () => import("../dept-all-statistics/dept-all-statistics.module").then((m) => m.DeptAllStatisticsModule),
610
+			},
606 611
     ],
607 612
   },
608 613
 ];