maotao месяцев назад: 7
Родитель
Сommit
3e467d4e84

+ 3 - 0
src/app/views/admin-office-prescription/admin-office-prescription.component.html

@@ -256,6 +256,9 @@
256 256
 							{{ data.cartonNum }} {{data.giveOutType && data.giveOutType.value==1?
257 257
 							data.drugsInfoDTO.unit:'箱'}}
258 258
 						</span>
259
+						<span *ngIf="data.drugsInfoDTO.drugName=='合计'">
260
+							{{ data.cartonActual}}
261
+						</span>
259 262
 					</div>
260 263
 					
261 264
 				</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>

+ 44 - 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
@@ -119,7 +122,8 @@ export class BigTransfusionSetComponent implements OnInit {
119 122
 			timingOrder:0,//定时建单
120 123
 			printOrder:0,// 打印并建单
121 124
 			executeTime:'',// 定时建单-选择时分
122
-			autoCreate:0
125
+			autoCreate:0,
126
+			quoteParentData:0
123 127
     };
124 128
 		if(this.editId){
125 129
 			editData.id = this.editId
@@ -133,6 +137,11 @@ export class BigTransfusionSetComponent implements OnInit {
133 137
 			delete editData.autoCreate
134 138
 		}
135 139
 		
140
+		if(this.quoteParentData[0].checked){
141
+			editData.quoteParentData = 1
142
+		}else{
143
+			delete editData.quoteParentData
144
+		}
136 145
 		if(this.radioValue=='1'){
137 146
 			editData.timingOrder = 1
138 147
 			editData.executeTime = this.executeTime ? format(startOfMinute(this.executeTime), "yyyy-MM-dd HH:mm:ss") : undefined
@@ -190,11 +199,17 @@ export class BigTransfusionSetComponent implements OnInit {
190 199
 					key: 'association_types',
191 200
 					value: 'other'
192 201
 				},
193
-        hosId: {
194
-          id: this.hosId
195
-        }
202
+        hosIds: this.hosId
196 203
       }
197 204
     };
205
+		if(this.quoteParentData[0].checked){
206
+			if(this.tool.getCurrentUserInfo().currentHospital &&
207
+			this.tool.getCurrentUserInfo().currentHospital.parent){
208
+				postData.taskType.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
209
+			}else{
210
+				postData.taskType.hosIds = this.hosId
211
+			}
212
+		}
198 213
     this.isLoading = true;
199 214
     this.mainService
200 215
       .getFetchDataList("simple/data", "taskType", postData)
@@ -202,9 +217,9 @@ export class BigTransfusionSetComponent implements OnInit {
202 217
         this.isLoading = false;
203 218
         if (result.status == 200) {
204 219
           this.taskTypes1 = result.list || [];
205
-					if(type=='load'){
206
-						this.getTaskTypesId();
207
-					}
220
+					// if(type=='load'){
221
+					// 	this.getTaskTypesId();
222
+					// }
208 223
         }
209 224
       });
210 225
   }
@@ -223,9 +238,7 @@ export class BigTransfusionSetComponent implements OnInit {
223 238
 	  let data = {
224 239
 	    department: {
225 240
 	      dept,
226
-	      hospital: {
227
-	        id: this.hosId
228
-	      },
241
+	      hosIds: this.hosId,
229 242
 				type:{
230 243
 					id:''
231 244
 				}
@@ -233,6 +246,14 @@ export class BigTransfusionSetComponent implements OnInit {
233 246
 	    idx: 0,
234 247
 	    sum: 20,
235 248
 	  };
249
+		if(this.quoteParentData[0].checked){
250
+			if(this.tool.getCurrentUserInfo().currentHospital &&
251
+			this.tool.getCurrentUserInfo().currentHospital.parent){
252
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
253
+			}else{
254
+				data.department.hosIds = this.hosId
255
+			}
256
+		}
236 257
 		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
237 258
 		  let typeData = res.find(i=>i.value=='pharmacyRoom');
238 259
 			if(typeData){
@@ -248,12 +269,17 @@ export class BigTransfusionSetComponent implements OnInit {
248 269
 						},500)
249 270
 					}else{
250 271
 						this.hospitals = data.list
251
-						that.isLoading = false;
272
+						that.loading  = false;
252 273
 					}
253 274
 			  });
254 275
 		});
255 276
 	}
256 277
 	
278
+	parentChange(e){
279
+		this.getTaskTypes('', true, 'load');
280
+		this.getDeparts('','load')
281
+	}
282
+	
257 283
   // 获取配置
258 284
   getConfig() {
259 285
     this.loading = true;
@@ -271,10 +297,14 @@ export class BigTransfusionSetComponent implements OnInit {
271 297
         this.loading = false;
272 298
         if (result.status == 200) {
273 299
     			let data = result.list[0] || {};
300
+					this.isParentData = data.quoteParentData;
274 301
 					this.editId = data.id
275 302
 					this.autoCreateOrders[0].checked = data.autoCreate == 1;
303
+					this.quoteParentData[0].checked = data.quoteParentData == 1;
276 304
     			this.infusionSolutionsTypeId = data.infusionSolutionsTypeId
277 305
 					this.pharmacyDept = data.pharmacyDept
306
+					this.getTaskTypes('', true, 'load');
307
+					this.getDeparts('','load')
278 308
 					if(data.timingOrder=='1'){
279 309
 						this.radioValue = '1'
280 310
 						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 { }

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

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

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

@@ -0,0 +1,312 @@
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
+  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
+	detailsLoading:Boolean = false;
140
+	detail(id) {
141
+		var that = this;
142
+		let data = {
143
+			idx: 0,
144
+			sum: 9999,
145
+			drugsConfigure: {
146
+			  hosId: this.hosId,
147
+			  drugListId: id
148
+			}
149
+		};
150
+		this.detailsLoading = true;
151
+		that.mainService
152
+		  .getFetchDataList("data", "drugsConfigure", data)
153
+		  .subscribe((data) => {
154
+		    this.detailsLoading = false;
155
+				this.modal = true
156
+		    that.viewData = data.list;
157
+		    that.listLength = data.totalNum;
158
+		  });
159
+	}
160
+	
161
+  // 搜索
162
+  search() {
163
+    this.pageIndex = 1;
164
+    this.getList();
165
+  }
166
+  // 重置
167
+  reset() {
168
+    this.pageIndex = 1;
169
+    this.department = null;
170
+		this.batch = null;
171
+		this.commodity = null;
172
+    this.batchNumber = "";
173
+		this.dateRange = [];
174
+		this.startDate = "";
175
+		this.endDate = "";
176
+    this.getList();
177
+  }
178
+  // 表格数据
179
+  loading1 = false;
180
+  getList() {
181
+    var that = this;
182
+    let data = {
183
+      idx: that.pageIndex - 1,
184
+      sum: that.pageSize,
185
+			deptId:this.department,
186
+			batchId:this.batch,
187
+			startTime: this.startDate,
188
+			endTime: this.endDate,
189
+			drugId:this.commodity,
190
+			hosId:this.hosId
191
+    };
192
+		this.loading1 = true;
193
+		this.mainService
194
+			.drugsInfo(data).subscribe((res:any) => {
195
+				this.loading1 = false;
196
+				for(let i of res.list){
197
+					i.num = i['4'] + i['5'] + i['6']
198
+				}
199
+				this.listOfData = res.list
200
+				that.listLength = res.totalNum;
201
+			});
202
+  }
203
+	
204
+	// 日期选择
205
+	startDate: string; //发起时间开始
206
+	endDate: string; //发起时间结束
207
+	changeDate(result?): void {
208
+	  if (result.length==0) {
209
+	    this.startDate = this.endDate = null;
210
+	    return;
211
+	  }
212
+	  this.startDate = format(startOfDay(result[0]), 'yyyy-MM-dd HH:mm:ss');
213
+	  this.endDate = format(endOfDay(result[1]), 'yyyy-MM-dd HH:mm:ss');
214
+		this.dateRange = [this.startDate,this.endDate]
215
+	}
216
+	
217
+	// 获取所有科室
218
+  getDeparts(dept) {
219
+    var that = this;
220
+    let data:any = {
221
+      department: {
222
+        dept,
223
+        hosIds: this.hosId,
224
+      },
225
+      idx: 0,
226
+      sum: 20,
227
+    };
228
+		if(this.isParentData==1){
229
+			if(this.tool.getCurrentUserInfo().currentHospital &&
230
+			this.tool.getCurrentUserInfo().currentHospital.parent){
231
+				data.department.hosIds = this.hosId +','+this.tool.getCurrentUserInfo().currentHospital.parent.id
232
+			}else{
233
+				data.department.hosIds = this.hosId
234
+			}
235
+		}
236
+    that.mainService
237
+		.getFetchDataList("data", "department", data)
238
+		.subscribe((data) => {
239
+			this.loading = false
240
+			this.hospitals1 = data.list
241
+		});
242
+  }
243
+	
244
+	// 获取药品
245
+	getCommodityData(name) {
246
+	  let data = {
247
+	    drugsInfo: {
248
+	      drugName: name || "",
249
+	      hosId: this.hosId || "" ,
250
+	    	drugType:{
251
+	    		id:'20327'
252
+	    	}
253
+	    },
254
+	    idx: 0,
255
+	    sum: 10,
256
+	  };
257
+	  this.mainService
258
+		.getFetchDataList("data", "drugsInfo", data)
259
+		.subscribe((data) => {
260
+			this.loading = false
261
+			this.commodityData = data.list
262
+		});
263
+	}
264
+	
265
+	// 获取批次号
266
+	getBathData(name) {
267
+	  let data = {
268
+	    drugsBatch: {
269
+	    	batchNo:name,
270
+	    	hosId: this.hosId,
271
+				batchStatus:{
272
+					value:2
273
+				}
274
+	    },
275
+	    idx: 0,
276
+	    sum: 10,
277
+	  };
278
+	  this.mainService
279
+		.getFetchDataList("data", "drugsBatch", data)
280
+		.subscribe((data) => {
281
+			this.loading = false
282
+			this.batchData = data.list
283
+		});
284
+	}
285
+	
286
+	isParentData:any = null;
287
+  getAllquest() {
288
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
289
+			let taskTypeData = data.find(i=>i.value=='infusionSolutions')
290
+			let postData = {
291
+			  idx: 0,
292
+			  sum: 10,
293
+			  taskTypeConfig: {
294
+					hosId:this.hosId,
295
+					taskType:taskTypeData.id
296
+			  }
297
+			};
298
+			this.mainService
299
+			  .getFetchDataList("simple/data", "taskTypeConfig", postData)
300
+			  .subscribe((result) => {
301
+			    if (result.status == 200) {
302
+						let data = result.list[0] || {};
303
+						this.isParentData = data.quoteParentData;
304
+						this.getDeparts('')
305
+			    }
306
+			  });
307
+		});
308
+		this.getCommodityData('')
309
+		this.getBathData('')
310
+    this.getList();
311
+  }
312
+}

+ 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 { }

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

@@ -357,6 +357,9 @@
357 357
 						{{data.giveOutType && data.giveOutType.value==1?
358 358
 						data.drugsInfoDTO.unit:'箱'}}
359 359
 					</span>
360
+					<span *ngIf="data.drugsInfoDTO.drugName=='合计'">
361
+						{{ data.cartonActual}}
362
+					</span>
360 363
 					</div>
361 364
 					
362 365
 				</div>

+ 2 - 1
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -580,7 +580,8 @@ export class DispensingBatchComponent implements OnInit, OnDestroy {
580 580
 						},
581 581
 						expendCount:i.totalExpendCount,
582 582
 						addSub:i.totalAddSub,
583
-						deptName:''
583
+						deptName:'',
584
+						cartonActual:i.cartonActual
584 585
 					})
585 586
 				}
586 587
 		    that.printData = arr;

+ 32 - 5
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) => {
@@ -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 - 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
 ];