浏览代码

拉取最新代码

maotao 9 月之前
父节点
当前提交
42e80af775
共有 35 个文件被更改,包括 1028 次插入602 次删除
  1. 7 0
      src/app/services/main.service.ts
  2. 40 31
      src/app/views/admin-office-prescription/admin-office-prescription.component.html
  3. 2 2
      src/app/views/admin-office-prescription/admin-office-prescription.component.ts
  4. 19 0
      src/app/views/big-transfusion-set/big-transfusion-set.component.html
  5. 96 3
      src/app/views/big-transfusion-set/big-transfusion-set.component.ts
  6. 7 20
      src/app/views/dept-statistics/dept-statistics.component.html
  7. 36 1
      src/app/views/dept-statistics/dept-statistics.component.ts
  8. 49 26
      src/app/views/dispensing-batch/dispensing-batch.component.html
  9. 51 337
      src/app/views/dispensing-batch/dispensing-batch.component.ts
  10. 28 19
      src/app/views/dispensing-detail/dispensing-detail.component.html
  11. 25 4
      src/app/views/dispensing-detail/dispensing-detail.component.less
  12. 80 24
      src/app/views/dispensing-detail/dispensing-detail.component.ts
  13. 1 0
      src/app/views/drug-info/drug-info.component.ts
  14. 20 7
      src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.html
  15. 49 0
      src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.less
  16. 18 22
      src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.ts
  17. 16 3
      src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.html
  18. 49 0
      src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.less
  19. 2 0
      src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.ts
  20. 27 5
      src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.html
  21. 49 0
      src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.less
  22. 20 22
      src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.ts
  23. 7 18
      src/app/views/order-statistics/order-statistics.component.html
  24. 33 1
      src/app/views/order-statistics/order-statistics.component.ts
  25. 34 4
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.html
  26. 49 0
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.less
  27. 20 21
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.ts
  28. 30 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.html
  29. 49 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.less
  30. 2 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.ts
  31. 38 4
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.html
  32. 49 0
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.less
  33. 16 23
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.ts
  34. 1 4
      src/app/views/worker-statistics/worker-statistics.component.html
  35. 9 1
      src/app/views/worker-statistics/worker-statistics.component.ts

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

@@ -828,4 +828,11 @@ export class MainService {
828
 	  });
828
 	  });
829
 	}
829
 	}
830
 	
830
 	
831
+	// 发药批次-配置科室数据
832
+	getConsumeDept(data): any {
833
+	  return this.http.post(host.host + "/infusion/solutions/getConsumeDept", data, {
834
+	    headers: this.headers,
835
+	  });
836
+	}
837
+	
831
 }
838
 }

+ 40 - 31
src/app/views/admin-office-prescription/admin-office-prescription.component.html

@@ -117,11 +117,6 @@
117
               </tr>
117
               </tr>
118
             </tbody>
118
             </tbody>
119
           </nz-table>
119
           </nz-table>
120
-        <!--  <div class="list-template__pagination">
121
-            <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
122
-              (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
123
-            </nz-pagination>
124
-          </div> -->
125
         </div>
120
         </div>
126
       </overlay-scrollbars>
121
       </overlay-scrollbars>
127
       <div class="display_flex justify-content_flex-center">
122
       <div class="display_flex justify-content_flex-center">
@@ -146,65 +141,79 @@
146
 				border-radius: 5px;">
141
 				border-radius: 5px;">
147
 			<div class="monad-title" 
142
 			<div class="monad-title" 
148
 				style="text-align: center;
143
 				style="text-align: center;
149
-				font-weight: 700;
150
-				font-size: 16px;
144
+				font-size: 18px;
151
 				border-bottom: 1px solid #e7e7e7;
145
 				border-bottom: 1px solid #e7e7e7;
152
 				padding-bottom: 10px;">
146
 				padding-bottom: 10px;">
153
 				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
147
 				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
154
 			</div>
148
 			</div>
155
-			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
149
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
156
 				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
150
 				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
157
 				<div style="margin-right: 15px;">批次号:{{rowData.batch?rowData.batch.batchNo:'-'}}</div>
151
 				<div style="margin-right: 15px;">批次号:{{rowData.batch?rowData.batch.batchNo:'-'}}</div>
158
 				<div style="margin-right: 15px;">单号:{{rowData.packingNo}}</div>
152
 				<div style="margin-right: 15px;">单号:{{rowData.packingNo}}</div>
159
 			</div>
153
 			</div>
160
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
154
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
161
 				<div class="thead" style="display: flex;">
155
 				<div class="thead" style="display: flex;">
162
-					<div style="text-align: center;width: 40%;height: 40px;
163
-					line-height: 40px;
156
+					<div style="text-align: center;width: 30%;height: 23px;
157
+					line-height: 23px;
164
 					border-right: 1px solid #e7e7e7;
158
 					border-right: 1px solid #e7e7e7;
165
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
159
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
166
 					
160
 					
167
-					<div style="text-align: center;width: 20%;height: 40px;
168
-					line-height: 40px;
161
+					<div style="text-align: center;width: 20%;height: 23px;
162
+					line-height: 23px;
169
 					border-right: 1px solid #e7e7e7;
163
 					border-right: 1px solid #e7e7e7;
170
 					border-bottom: 1px solid #e7e7e7;">规格</div>
164
 					border-bottom: 1px solid #e7e7e7;">规格</div>
171
 					
165
 					
172
-					<div style="text-align: center;width: 10%;height: 40px;
173
-					line-height: 40px;
166
+					<div style="text-align: center;width: 10%;height: 23px;
167
+					line-height: 23px;
174
 					border-right: 1px solid #e7e7e7;
168
 					border-right: 1px solid #e7e7e7;
175
-					border-bottom: 1px solid #e7e7e7;">总量</div>
169
+					border-bottom: 1px solid #e7e7e7;">实际消耗</div>
176
 					
170
 					
177
-					<div style="text-align: center;width: 10%;height: 40px;
178
-					line-height: 40px;
171
+					<div style="text-align: center;width: 10%;height: 23px;
172
+					line-height: 23px;
173
+					border-right: 1px solid #e7e7e7;
174
+					border-bottom: 1px solid #e7e7e7;">临时增发</div>
175
+					
176
+					<div style="text-align: center;width: 10%;height: 23px;
177
+					line-height: 23px;
179
 					border-right: 1px solid #e7e7e7;
178
 					border-right: 1px solid #e7e7e7;
180
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
179
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
181
 					
180
 					
182
-					<div style="text-align: center;width: 20%;height: 40px;
183
-					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
181
+					<div style="text-align: center;width: 20%;height: 23px;
182
+					line-height: 23px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
184
 				</div>
183
 				</div>
185
 				<div *ngFor="let data of codes" style="display: flex;">
184
 				<div *ngFor="let data of codes" style="display: flex;">
186
-					<div style="text-align: center;width: 40%;height: 40px;
187
-					line-height: 40px;
185
+					<div style="text-align: center;width: 30%;height: 23px;
186
+					line-height: 23px;
188
 					border-right: 1px solid #e7e7e7;
187
 					border-right: 1px solid #e7e7e7;
189
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
188
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
190
 					
189
 					
191
-					<div style="text-align: center;width: 20%;height: 40px;
192
-					line-height: 40px;
190
+					<div style="text-align: center;width: 20%;height: 23px;
191
+					line-height: 23px;
193
 					border-right: 1px solid #e7e7e7;
192
 					border-right: 1px solid #e7e7e7;
194
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
193
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
195
 					
194
 					
196
-					<div style="text-align: center;width: 10%;height: 40px;
197
-					line-height: 40px;
195
+					<div style="text-align: center;width: 10%;height: 23px;
196
+					line-height: 23px;
197
+					border-right: 1px solid #e7e7e7;
198
+					border-bottom: 1px solid #e7e7e7;">{{ data.expendCount }}</div>
199
+					
200
+					<div style="text-align: center;width: 10%;height: 23px;
201
+					line-height: 23px;
198
 					border-right: 1px solid #e7e7e7;
202
 					border-right: 1px solid #e7e7e7;
199
-					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
203
+					border-bottom: 1px solid #e7e7e7;">{{ data.addSub || 0 }}</div>
200
 					
204
 					
201
-					<div style="text-align: center;width: 10%;height: 40px;
202
-					line-height: 40px;
205
+					<div style="text-align: center;width: 10%;height: 23px;
206
+					line-height: 23px;
203
 					border-right: 1px solid #e7e7e7;
207
 					border-right: 1px solid #e7e7e7;
204
-					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>
208
+					border-bottom: 1px solid #e7e7e7;">
209
+						<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
210
+							{{ data.cartonNum }} {{data.giveOutType && data.giveOutType.value==1?
211
+							data.drugsInfoDTO.unit:'箱'}}
212
+						</span>
213
+					</div>
205
 					
214
 					
206
-					<div style="text-align: center;width: 20%;height: 40px;
207
-					line-height: 40px;border-bottom: 1px solid #e7e7e7;">{{ data.deptName }}</div>
215
+					<div style="text-align: center;width: 20%;height: 23px;
216
+					line-height: 23px;border-bottom: 1px solid #e7e7e7;">{{ data.deptName }}</div>
208
 				</div>
217
 				</div>
209
 			</div>
218
 			</div>
210
 		</div>
219
 		</div>

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

@@ -848,8 +848,8 @@ export class AdminOfficePrescriptionComponent implements OnInit{
848
 						drugName:'合计',
848
 						drugName:'合计',
849
 						specs:'',
849
 						specs:'',
850
 					},
850
 					},
851
-					actualCount:res.data.totalActual,
852
-					cartonNum:res.data.totalCarton,
851
+					expendCount:res.data.totalExpendCount,
852
+					addSub:res.data.totalAddSub,
853
 					deptName:''
853
 					deptName:''
854
 				})
854
 				})
855
         that.codes = arr
855
         that.codes = arr

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

@@ -24,6 +24,18 @@
24
            </nz-option>
24
            </nz-option>
25
          </nz-select>
25
          </nz-select>
26
        </div>
26
        </div>
27
+			 <!-- 默认发药科室 -->
28
+			 <div class="display_flex align-items_center mb8">
29
+			   <nz-form-label class="label" nzRequired>默认发药科室</nz-form-label>
30
+			   <nz-select class="w320px" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event)" nzServerSearch nzShowSearch nzPlaceHolder="请选择默发药科室" [(ngModel)]="pharmacyDept">
31
+			     <ng-container *ngFor="let option of hospitals">
32
+			       <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
33
+			     </ng-container>
34
+			     <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
35
+			       <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
36
+			     </nz-option>
37
+			   </nz-select>
38
+			 </div>
27
       </div>
39
       </div>
28
       <!-- 自动建单配置 -->
40
       <!-- 自动建单配置 -->
29
       <div *ngIf="tabModalName=='automaticOrderCreation'">
41
       <div *ngIf="tabModalName=='automaticOrderCreation'">
@@ -32,6 +44,13 @@
32
           <nz-form-label class="label">自动建单</nz-form-label>
44
           <nz-form-label class="label">自动建单</nz-form-label>
33
           <nz-checkbox-group [(ngModel)]="autoCreateOrders"></nz-checkbox-group>
45
           <nz-checkbox-group [(ngModel)]="autoCreateOrders"></nz-checkbox-group>
34
         </div>
46
         </div>
47
+				<div class="display_flex align-items_center mb8" *ngIf="autoCreateOrders[0].checked">
48
+					<nz-radio-group [(ngModel)]="radioValue">
49
+						<label nz-radio nzValue="1">定时建单</label>
50
+						<label nz-radio nzValue="2">打印并建单</label>
51
+					</nz-radio-group>
52
+					<nz-time-picker [(ngModel)]="executeTime" nzFormat="HH:mm" *ngIf="radioValue==1"></nz-time-picker>
53
+				</div>
35
       </div>
54
       </div>
36
       <div class="bottom">
55
       <div class="bottom">
37
         <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>
56
         <button class="login-form-button" nzType="primary" [nzLoading]="btnLoading" nz-button (click)="submitForm()">保存</button>

+ 96 - 3
src/app/views/big-transfusion-set/big-transfusion-set.component.ts

@@ -4,6 +4,7 @@ import { ToolService } from 'src/app/services/tool.service';
4
 import { NzMessageService } from 'ng-zorro-antd';
4
 import { NzMessageService } from 'ng-zorro-antd';
5
 import { Subject } from 'rxjs';
5
 import { Subject } from 'rxjs';
6
 import { debounceTime } from 'rxjs/operators';
6
 import { debounceTime } from 'rxjs/operators';
7
+import { format, startOfMinute } from 'date-fns';
7
 
8
 
8
 @Component({
9
 @Component({
9
   selector: "app-big-transfusion-set",
10
   selector: "app-big-transfusion-set",
@@ -18,6 +19,7 @@ export class BigTransfusionSetComponent implements OnInit {
18
   hosId = this.tool.getCurrentHospital().id; //当前院区
19
   hosId = this.tool.getCurrentHospital().id; //当前院区
19
   // 接手术关联任务类型
20
   // 接手术关联任务类型
20
   infusionSolutionsTypeId:Number;
21
   infusionSolutionsTypeId:Number;
22
+	pharmacyDept:''; //默认发药科室
21
   taskTypes1:any[] = [];
23
   taskTypes1:any[] = [];
22
   taskTypeData:{id:''};
24
   taskTypeData:{id:''};
23
   // 苏醒室科室
25
   // 苏醒室科室
@@ -27,6 +29,17 @@ export class BigTransfusionSetComponent implements OnInit {
27
   autoCreateOrders:any[] = [
29
   autoCreateOrders:any[] = [
28
     {label:'是否开启',value: 0}
30
     {label:'是否开启',value: 0}
29
   ];
31
   ];
32
+	// 定时建单
33
+	timingOrder:any[] = [
34
+	  {label:'是否开启',value: 0}
35
+	];
36
+	// 打印并建单
37
+	printOrder:any[] = [
38
+	  {label:'是否开启',value: 0}
39
+	];
40
+	radioValue:string = '';
41
+	// 定时建单-选择时分
42
+	executeTime:Date | null = null;
30
   // 是否开通送回病房
43
   // 是否开通送回病房
31
   autoSendWard:any[] = [
44
   autoSendWard:any[] = [
32
     {label:'是否开启',value: 0}
45
     {label:'是否开启',value: 0}
@@ -56,6 +69,7 @@ export class BigTransfusionSetComponent implements OnInit {
56
 	editId:'';
69
 	editId:'';
57
 	targetData:any = [];
70
 	targetData:any = [];
58
 	stateData:any = [];
71
 	stateData:any = [];
72
+	hospitals:any = [];
59
 	// 间隔时间数据
73
 	// 间隔时间数据
60
 	timeData:any[] = [
74
 	timeData:any[] = [
61
 	  {label:'10',value: 10},
75
 	  {label:'10',value: 10},
@@ -66,6 +80,7 @@ export class BigTransfusionSetComponent implements OnInit {
66
   // 配置
80
   // 配置
67
   configs:any = {};
81
   configs:any = {};
68
   searchTimerSubject = new Subject();
82
   searchTimerSubject = new Subject();
83
+	searchParentDeptSubject = new Subject();
69
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
84
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
70
 
85
 
71
   ngOnInit():void {
86
   ngOnInit():void {
@@ -74,7 +89,14 @@ export class BigTransfusionSetComponent implements OnInit {
74
       let fun = v[0];
89
       let fun = v[0];
75
       fun.call(this, v[1], v[2], v[3]);
90
       fun.call(this, v[1], v[2], v[3]);
76
     });
91
     });
77
-    this.getTaskTypes('', true);
92
+		
93
+		this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
94
+			this.isLoading = true;
95
+			this.getDeparts(e,'search');
96
+		});
97
+		
98
+    this.getTaskTypes('', true, 'load');
99
+		this.getDeparts('','load')
78
   }
100
   }
79
 
101
 
80
   // 切换tab
102
   // 切换tab
@@ -93,6 +115,10 @@ export class BigTransfusionSetComponent implements OnInit {
93
 			taskType:this.taskTypeData.id,
115
 			taskType:this.taskTypeData.id,
94
 			hosId: this.hosId,
116
 			hosId: this.hosId,
95
 			infusionSolutionsTypeId:this.infusionSolutionsTypeId, //任务类型参数
117
 			infusionSolutionsTypeId:this.infusionSolutionsTypeId, //任务类型参数
118
+			pharmacyDept:this.pharmacyDept,//默认发药科室
119
+			timingOrder:0,//定时建单
120
+			printOrder:0,// 打印并建单
121
+			executeTime:'',// 定时建单-选择时分
96
 			autoCreate:0
122
 			autoCreate:0
97
     };
123
     };
98
 		if(this.editId){
124
 		if(this.editId){
@@ -100,11 +126,27 @@ export class BigTransfusionSetComponent implements OnInit {
100
 		}else{
126
 		}else{
101
 			delete editData.id 
127
 			delete editData.id 
102
 		}
128
 		}
129
+		
103
 		if(this.autoCreateOrders[0].checked){
130
 		if(this.autoCreateOrders[0].checked){
104
 			editData.autoCreate = 1
131
 			editData.autoCreate = 1
105
 		}else{
132
 		}else{
106
 			delete editData.autoCreate
133
 			delete editData.autoCreate
107
 		}
134
 		}
135
+		
136
+		if(this.radioValue=='1'){
137
+			editData.timingOrder = 1
138
+			editData.executeTime = this.executeTime ? format(startOfMinute(this.executeTime), "yyyy-MM-dd HH:mm:ss") : undefined
139
+		}else{
140
+			delete editData.timingOrder
141
+			delete editData.executeTime
142
+		}
143
+		
144
+		if(this.radioValue=='2'){
145
+			editData.printOrder = 1
146
+		}else{
147
+			delete editData.printOrder
148
+		}
149
+		
108
     this.btnLoading = true;
150
     this.btnLoading = true;
109
     this.mainService
151
     this.mainService
110
       .simplePost("addData", "taskTypeConfig", editData)
152
       .simplePost("addData", "taskTypeConfig", editData)
@@ -128,10 +170,15 @@ export class BigTransfusionSetComponent implements OnInit {
128
     this.searchTimerSubject.next([fun, e, isFirst, type]);
170
     this.searchTimerSubject.next([fun, e, isFirst, type]);
129
   }
171
   }
130
 	
172
 	
173
+	// 搜索科室
174
+	changeInp(e) {
175
+	  this.searchParentDeptSubject.next(e);
176
+	}
177
+	
131
   //获取关联任务类型
178
   //获取关联任务类型
132
   // 1 患者其他服务
179
   // 1 患者其他服务
133
   // 2 其他临床服务
180
   // 2 其他临床服务
134
-  getTaskTypes(e:string = '', isFirst:boolean = false) {
181
+  getTaskTypes(e:string = '', isFirst:boolean = false, type) {
135
     isFirst && (this.loading = true);
182
     isFirst && (this.loading = true);
136
     let postData:any = {
183
     let postData:any = {
137
       idx: 0,
184
       idx: 0,
@@ -155,7 +202,9 @@ export class BigTransfusionSetComponent implements OnInit {
155
         this.isLoading = false;
202
         this.isLoading = false;
156
         if (result.status == 200) {
203
         if (result.status == 200) {
157
           this.taskTypes1 = result.list || [];
204
           this.taskTypes1 = result.list || [];
158
-					this.getTaskTypesId();
205
+					if(type=='load'){
206
+						this.getTaskTypesId();
207
+					}
159
         }
208
         }
160
       });
209
       });
161
   }
210
   }
@@ -168,6 +217,43 @@ export class BigTransfusionSetComponent implements OnInit {
168
 		});
217
 		});
169
 	}
218
 	}
170
 	
219
 	
220
+	// 获取所有科室
221
+	getDeparts(dept, type) {
222
+	  var that = this;
223
+	  let data = {
224
+	    department: {
225
+	      dept,
226
+	      hospital: {
227
+	        id: this.hosId
228
+	      },
229
+				type:{
230
+					id:''
231
+				}
232
+	    },
233
+	    idx: 0,
234
+	    sum: 20,
235
+	  };
236
+		that.mainService.getDictionary("list", "dept_type").subscribe((res) => {
237
+		  let typeData = res.find(i=>i.value=='pharmacyRoom');
238
+			if(typeData){
239
+				data.department.type.id = typeData.id
240
+			}
241
+			that.mainService
242
+			  .getFetchDataList("data", "department", data)
243
+			  .subscribe((data) => {
244
+					if(type=='search'){
245
+						setTimeout(_=>{
246
+							this.hospitals = data.list
247
+							that.isLoading = false;
248
+						},500)
249
+					}else{
250
+						this.hospitals = data.list
251
+						that.isLoading = false;
252
+					}
253
+			  });
254
+		});
255
+	}
256
+	
171
   // 获取配置
257
   // 获取配置
172
   getConfig() {
258
   getConfig() {
173
     this.loading = true;
259
     this.loading = true;
@@ -188,6 +274,13 @@ export class BigTransfusionSetComponent implements OnInit {
188
 					this.editId = data.id
274
 					this.editId = data.id
189
 					this.autoCreateOrders[0].checked = data.autoCreate == 1;
275
 					this.autoCreateOrders[0].checked = data.autoCreate == 1;
190
     			this.infusionSolutionsTypeId = data.infusionSolutionsTypeId
276
     			this.infusionSolutionsTypeId = data.infusionSolutionsTypeId
277
+					this.pharmacyDept = data.pharmacyDept
278
+					if(data.timingOrder=='1'){
279
+						this.radioValue = '1'
280
+						this.executeTime = data.executeTime ? new Date(data.executeTime) : null;
281
+					}else if(data.printOrder=='1'){
282
+						this.radioValue = '2'
283
+					}
191
         }
284
         }
192
       });
285
       });
193
   }
286
   }

+ 7 - 20
src/app/views/dept-statistics/dept-statistics.component.html

@@ -27,31 +27,18 @@
27
         <thead>
27
         <thead>
28
           <tr class="thead">
28
           <tr class="thead">
29
             <th nzWidth="5%">序号</th>
29
             <th nzWidth="5%">序号</th>
30
-            <th nzWidth="10%">科室名称</th>
31
-            <th nzWidth="10%">工单总量</th>
32
-            <th nzWidth="10%">主动评价次数</th>
33
-            <th nzWidth="10%">标本数量</th>
34
-            <th nzWidth="10%">标本轮巡数量</th>
35
-            <th nzWidth="10%">患者陪检数量</th>
36
-            <th nzWidth="10%">药品数量</th>
37
-            <th nzWidth="10%">静配数量</th>
38
-            <th nzWidth="10%">患者转运数量</th>
39
-            <th nzWidth="5%">其他数量</th>
30
+            <th nzWidth="10%" nzShowSort nzSortKey="bid" [(nzSort)]="sortCurrent.bid" (nzSortChange)="sort('bid',$event)">科室名称</th>
31
+            <th nzWidth="10%" nzShowSort nzSortKey="total" [(nzSort)]="sortCurrent.total" (nzSortChange)="sort('total',$event)">工单总量</th>
32
+            <th *ngFor="let item of listOfHeads; let index=index;" (nzSortChange)="sort(item.dataSort,$event)"
33
+            	nzShowSort [(nzSort)]="item.sortName"
34
+            	>{{item.name}}</th>
35
+            <th nzWidth="10%" nzShowSort nzSortKey="other" [(nzSort)]="sortCurrent.other" (nzSortChange)="sort('other',$event)">其他数量</th>
40
           </tr>
36
           </tr>
41
         </thead>
37
         </thead>
42
         <tbody>
38
         <tbody>
43
           <tr *ngFor="let data of listOfData;let index=index;">
39
           <tr *ngFor="let data of listOfData;let index=index;">
44
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
40
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
45
-            <td>{{ data.date }}</td>
46
-            <td>{{ data.total||0}}</td>
47
-            <td>{{data.elevateCount||0}}</td>
48
-            <td>{{data.speCount||0}}</td>
49
-            <td>{{data.spePlanCount||0}}</td>
50
-            <td>{{data.insCount||0}}</td>
51
-            <td>{{data.drugsCount||0}}</td>
52
-            <td>{{data.jpCount||0}}</td>
53
-            <td>{{data.transCount||0}}</td>
54
-            <td>{{data.otherCount||0}}</td>
41
+            <td *ngFor="let item of data;">{{ item }}</td>
55
           </tr>
42
           </tr>
56
         </tbody>
43
         </tbody>
57
       </nz-table>
44
       </nz-table>

+ 36 - 1
src/app/views/dept-statistics/dept-statistics.component.ts

@@ -132,11 +132,33 @@ export class DeptStatisticsComponent implements OnInit {
132
   // 重置
132
   // 重置
133
   reset() {
133
   reset() {
134
     this.changeDateRange("1");
134
     this.changeDateRange("1");
135
+		this.sortCurrent = {
136
+		  bid: null,
137
+		  total: null,
138
+			other: null,
139
+		};
135
     this.search();
140
     this.search();
136
   }
141
   }
142
+	
143
+	// 列表排序
144
+	sortCurrent = {
145
+	  bid: null,
146
+	  total: null,
147
+		other: null,
148
+	};
149
+	sortCurrentKey: string = "";
150
+	sortCurrentValue: string | null = "";
151
+	sort(name,e) {
152
+		console.log(22,name,e)
153
+	  this.sortCurrentKey = name == 'bid' ? 'b.id' : name;
154
+	  this.sortCurrentValue = e || '';
155
+	  this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue,'forbid');
156
+	}
157
+	
137
   // 表格数据
158
   // 表格数据
138
   loading1 = false;
159
   loading1 = false;
139
-  getList(num?: number) {
160
+	listOfHeads = [];
161
+  getList(num?: number, field?: string, sort?: string, type?: string) {
140
     if (num !== undefined) {
162
     if (num !== undefined) {
141
       this.pageIndex = num;
163
       this.pageIndex = num;
142
     }
164
     }
@@ -146,12 +168,25 @@ export class DeptStatisticsComponent implements OnInit {
146
       startTime: this.searchData.dateRange.start,
168
       startTime: this.searchData.dateRange.start,
147
       endTime: this.searchData.dateRange.end,
169
       endTime: this.searchData.dateRange.end,
148
       hosId: this.searchData.hosId,
170
       hosId: this.searchData.hosId,
171
+			sort: null
149
     };
172
     };
173
+		if (field && sort) {
174
+		  postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
175
+		}
150
     this.loading1 = true;
176
     this.loading1 = true;
151
     this.mainService
177
     this.mainService
152
       .postCustom("report", "dept", postData)
178
       .postCustom("report", "dept", postData)
153
       .subscribe((result) => {
179
       .subscribe((result) => {
154
         this.loading1 = false;
180
         this.loading1 = false;
181
+				let header = result.heads
182
+				console.log(55,type)
183
+				if(!type){
184
+					for(let i in header){
185
+						header[i].dataSort = 'data'+i
186
+						header[i].sortName = null
187
+					}
188
+					this.listOfHeads = header || [];
189
+				}
155
         this.listOfData = result.list || [];
190
         this.listOfData = result.list || [];
156
         this.listLength = result.totalNum;
191
         this.listLength = result.totalNum;
157
       });
192
       });

+ 49 - 26
src/app/views/dispensing-batch/dispensing-batch.component.html

@@ -101,6 +101,14 @@
101
        			</nz-input-group>
101
        			</nz-input-group>
102
        	  </nz-form-control>
102
        	  </nz-form-control>
103
        	</nz-form-item>
103
        	</nz-form-item>
104
+				<nz-form-item>
105
+				  <nz-form-label>加载所有消耗科室</nz-form-label>
106
+					<nz-form-control>
107
+						<label nz-checkbox formControlName="loadAllConsumeDept">
108
+							<span>是否开启</span>
109
+						</label>
110
+					</nz-form-control>
111
+				</nz-form-item>
104
        </form>
112
        </form>
105
       </overlay-scrollbars>
113
       </overlay-scrollbars>
106
       <div class="display_flex justify-content_flex-center">
114
       <div class="display_flex justify-content_flex-center">
@@ -125,65 +133,80 @@
125
 				border-radius: 5px;margin-bottom: 40px;">
133
 				border-radius: 5px;margin-bottom: 40px;">
126
 			<div class="monad-title" 
134
 			<div class="monad-title" 
127
 				style="text-align: center;
135
 				style="text-align: center;
128
-				font-weight: 700;
129
-				font-size: 16px;
136
+				font-size: 18px;
130
 				border-bottom: 1px solid #e7e7e7;
137
 				border-bottom: 1px solid #e7e7e7;
131
 				padding-bottom: 10px;">
138
 				padding-bottom: 10px;">
132
 				大输液发药单-{{item.applyDeptDTO.dept}}
139
 				大输液发药单-{{item.applyDeptDTO.dept}}
133
 			</div>
140
 			</div>
134
-			<div class="monad-sign" style="display: flex;line-height: 40px;font-size: 14px;">
141
+			<div class="monad-sign" style="display: flex;line-height: 23px;font-size: 14px;">
135
 				<div style="margin-right: 15px;">日期:{{item.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
142
 				<div style="margin-right: 15px;">日期:{{item.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
136
 				<div style="margin-right: 15px;">批次号:{{item.batch.batchNo}}</div>
143
 				<div style="margin-right: 15px;">批次号:{{item.batch.batchNo}}</div>
137
 				<div style="margin-right: 15px;">单号:{{item.packingNo}}</div>
144
 				<div style="margin-right: 15px;">单号:{{item.packingNo}}</div>
138
 			</div>
145
 			</div>
139
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
146
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
140
 				<div class="thead" style="display: flex;">
147
 				<div class="thead" style="display: flex;">
141
-					<div style="text-align: center;width: 40%;height: 40px;
142
-					line-height: 40px;
148
+					<div style="text-align: center;width: 30%;height: 23px;
149
+					line-height: 23px;
143
 					border-right: 1px solid #e7e7e7;
150
 					border-right: 1px solid #e7e7e7;
144
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
151
 					border-bottom: 1px solid #e7e7e7;">药品名称</div>
145
 					
152
 					
146
-					<div style="text-align: center;width: 20%;height: 40px;
147
-					line-height: 40px;
153
+					<div style="text-align: center;width: 25%;height: 23px;
154
+					line-height: 23px;
148
 					border-right: 1px solid #e7e7e7;
155
 					border-right: 1px solid #e7e7e7;
149
 					border-bottom: 1px solid #e7e7e7;">规格</div>
156
 					border-bottom: 1px solid #e7e7e7;">规格</div>
150
 					
157
 					
151
-					<div style="text-align: center;width: 10%;height: 40px;
152
-					line-height: 40px;
158
+					<div style="text-align: center;width: 10%;height: 23px;
159
+					line-height: 23px;
153
 					border-right: 1px solid #e7e7e7;
160
 					border-right: 1px solid #e7e7e7;
154
-					border-bottom: 1px solid #e7e7e7;">总量</div>
161
+					border-bottom: 1px solid #e7e7e7;">实际消耗</div>
155
 					
162
 					
156
-					<div style="text-align: center;width: 10%;height: 40px;
157
-					line-height: 40px;
163
+					<div style="text-align: center;width: 10%;height: 23px;
164
+					line-height: 23px;
165
+					border-right: 1px solid #e7e7e7;
166
+					border-bottom: 1px solid #e7e7e7;">临时增发</div>
167
+					
168
+					<div style="text-align: center;width: 10%;height: 23px;
169
+					line-height: 23px;
158
 					border-right: 1px solid #e7e7e7;
170
 					border-right: 1px solid #e7e7e7;
159
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
171
 					border-bottom: 1px solid #e7e7e7;">箱数</div>
160
 					
172
 					
161
-					<div style="text-align: center;width: 20%;height: 40px;
162
-					line-height: 40px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
173
+					<div style="text-align: center;width: 25%;height: 23px;
174
+					line-height: 23px;border-bottom: 1px solid #e7e7e7;">取药药房</div>
163
 				</div>
175
 				</div>
164
 				<div *ngFor="let data of item.drugsConfigureDTOS" style="display: flex;">
176
 				<div *ngFor="let data of item.drugsConfigureDTOS" style="display: flex;">
165
-					<div style="text-align: center;width: 40%;height: 40px;
166
-					line-height: 40px;
177
+					<div style="text-align: center;width: 30%;height: 23px;
178
+					line-height: 23px;
167
 					border-right: 1px solid #e7e7e7;
179
 					border-right: 1px solid #e7e7e7;
168
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
180
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.drugName }}</div>
169
 					
181
 					
170
-					<div style="text-align: center;width: 20%;height: 40px;
171
-					line-height: 40px;
182
+					<div style="text-align: center;width: 25%;height: 23px;
183
+					line-height: 23px;
172
 					border-right: 1px solid #e7e7e7;
184
 					border-right: 1px solid #e7e7e7;
173
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
185
 					border-bottom: 1px solid #e7e7e7;">{{ data.drugsInfoDTO.specs }}</div>
174
 					
186
 					
175
-					<div style="text-align: center;width: 10%;height: 40px;
176
-					line-height: 40px;
187
+					<div style="text-align: center;width: 10%;height: 23px;
188
+					line-height: 23px;
189
+					border-right: 1px solid #e7e7e7;
190
+					border-bottom: 1px solid #e7e7e7;">{{ data.expendCount }}</div>
191
+					
192
+					<div style="text-align: center;width: 10%;height: 23px;
193
+					line-height: 23px;
177
 					border-right: 1px solid #e7e7e7;
194
 					border-right: 1px solid #e7e7e7;
178
-					border-bottom: 1px solid #e7e7e7;">{{ data.actualCount }}</div>
195
+					border-bottom: 1px solid #e7e7e7;">{{ data.addSub || 0 }}</div>
179
 					
196
 					
180
-					<div style="text-align: center;width: 10%;height: 40px;
181
-					line-height: 40px;
197
+					<div style="text-align: center;width: 10%;height: 23px;
198
+					line-height: 23px;
182
 					border-right: 1px solid #e7e7e7;
199
 					border-right: 1px solid #e7e7e7;
183
-					border-bottom: 1px solid #e7e7e7;">{{ data.cartonNum }}</div>
200
+					border-bottom: 1px solid #e7e7e7;">
201
+					<span *ngIf="data.drugsInfoDTO.drugName!='合计'">
202
+						{{ data.cartonNum }}
203
+						{{data.giveOutType && data.giveOutType.value==1?
204
+						data.drugsInfoDTO.unit:'箱'}}
205
+					</span>
206
+					</div>
184
 					
207
 					
185
-					<div style="text-align: center;width: 20%;height: 40px;
186
-					line-height: 40px;border-bottom: 1px solid #e7e7e7;">{{ data.deptName }}</div>
208
+					<div style="text-align: center;width: 25%;height: 23px;
209
+					line-height: 23px;border-bottom: 1px solid #e7e7e7;">{{ data.deptName }}</div>
187
 				</div>
210
 				</div>
188
 			</div>
211
 			</div>
189
 		</div>
212
 		</div>

+ 51 - 337
src/app/views/dispensing-batch/dispensing-batch.component.ts

@@ -47,7 +47,6 @@ export class DispensingBatchComponent implements OnInit {
47
     this.coopBtns = this.tool.initCoopBtns(this.route);
47
     this.coopBtns = this.tool.initCoopBtns(this.route);
48
     this.initForm();
48
     this.initForm();
49
     this.getAllHospital();
49
     this.getAllHospital();
50
-    this.getType();
51
     this.getDeptHandoverType();
50
     this.getDeptHandoverType();
52
   }
51
   }
53
   listOfData: any[] = []; //表格数据
52
   listOfData: any[] = []; //表格数据
@@ -62,6 +61,7 @@ export class DispensingBatchComponent implements OnInit {
62
   department: number; //所属科室
61
   department: number; //所属科室
63
 	hosId: number; 
62
 	hosId: number; 
64
 	dateRange;//时间
63
 	dateRange;//时间
64
+	loadAllConsumeDept: boolean = true;//是否加载所有消耗科室
65
   batchNumber; //批次号
65
   batchNumber; //批次号
66
   num; //编码
66
   num; //编码
67
   deptalias; //别名
67
   deptalias; //别名
@@ -83,100 +83,14 @@ export class DispensingBatchComponent implements OnInit {
83
   // 初始化增删改按钮
83
   // 初始化增删改按钮
84
   coopBtns: any = {};
84
   coopBtns: any = {};
85
 	saveLoading:boolean = false;
85
 	saveLoading:boolean = false;
86
-  // 模板导出
87
-  excelExport(){
88
-    this.maskFlag = this.message.loading("下载模板中..", {
89
-      nzDuration: 0,
90
-    }).messageId;
91
-    this.mainService.exportExcel("department", {}).subscribe(
92
-      (data) => {
93
-        this.message.remove(this.maskFlag);
94
-        this.maskFlag = false;
95
-        this.message.success('下载模板成功');
96
-        var file = new Blob([data], {
97
-          type: "application/vnd.ms-excel",
98
-        });
99
-        //trick to download store a file having its URL
100
-        var fileURL = URL.createObjectURL(file);
101
-        var a = document.createElement("a");
102
-        a.href = fileURL;
103
-        a.target = "_blank";
104
-        a.download = "科室导入模板.xls";
105
-        document.body.appendChild(a);
106
-        a.click();
107
-      },
108
-      (err) => {
109
-        this.message.remove(this.maskFlag);
110
-        this.maskFlag = false;
111
-        this.message.error('下载模板失败');
112
-      }
113
-    );
114
-  }
115
-
116
-  // 导入---start
117
-  // model-取消
118
-  isShow = false;
119
-  hideExcelImport() {
120
-    this.isShow = false;
121
-  }
122
-  // 触发
123
-  excelImport() {
124
-    this.isShow = true;
125
-  }
126
-  submitExcelImport({fileList}){
127
-    this.isShow = false;
128
-    const formData = new FormData();
129
-    fileList.forEach((file: any) => {
130
-      formData.append('file', file);
131
-    });
132
-    this.maskFlag = this.message.loading("正在导入中..", {
133
-      nzDuration: 0,
134
-    }).messageId;
135
-    const req = new HttpRequest('Post', host.host + '/user/data/importExcel/department', formData, {
136
-      reportProgress: true
137
-    });
138
-    this.http
139
-      .request(req)
140
-      .pipe(filter(e => e instanceof HttpResponse))
141
-      .subscribe(
142
-        (res:any) => {
143
-          if(res.body.status == 200){
144
-            this.message.remove(this.maskFlag);
145
-            this.maskFlag = false;
146
-            this.message.success('导入成功');
147
-            this.getList();
148
-          }else{
149
-            this.message.remove(this.maskFlag);
150
-            this.maskFlag = false;
151
-            this.showPromptModal("导入", false, res.body.msg);
152
-          }
153
-        },
154
-        () => {
155
-          this.message.remove(this.maskFlag);
156
-          this.maskFlag = false;
157
-          this.message.error('导入失败');
158
-        },
159
-      );
160
-  }
86
+	taskTypeData:{id:''};
87
+	
161
   // 导入---end
88
   // 导入---end
162
   //搜索父级科室
89
   //搜索父级科室
163
 	isDeptLoading = false;
90
 	isDeptLoading = false;
164
   changeInp(e) {
91
   changeInp(e) {
165
     this.searchParentDeptSubject.next(e);
92
     this.searchParentDeptSubject.next(e);
166
   }
93
   }
167
-  // 打开父级科室下拉框baba
168
-  isLoading = false;
169
-  openDeptSelect(flag) {
170
-    if (flag) {
171
-      this.isLoading = true;
172
-      this.getAllParentdepart().subscribe((result) => {
173
-        this.isLoading = false;
174
-        if (result.status == 200) {
175
-          this.allParentdepart = result.list;
176
-        }
177
-      });
178
-    }
179
-  }
180
   // 配送建单
94
   // 配送建单
181
   coopData:any = {};
95
   coopData:any = {};
182
   addDateModal(data) {
96
   addDateModal(data) {
@@ -204,7 +118,8 @@ export class DispensingBatchComponent implements OnInit {
204
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
118
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
205
 			hosId:this.hosId,
119
 			hosId:this.hosId,
206
 			pharmacy:this.validateForm.value.department,
120
 			pharmacy:this.validateForm.value.department,
207
-			id:that.coopId
121
+			id:that.coopId,
122
+			loadAllConsumeDept:this.validateForm.value.loadAllConsumeDept?1:0
208
     };
123
     };
209
 		that.saveLoading = true;
124
 		that.saveLoading = true;
210
 		that.mainService
125
 		that.mainService
@@ -221,48 +136,6 @@ export class DispensingBatchComponent implements OnInit {
221
 		    }
136
 		    }
222
 		  });
137
 		  });
223
   }
138
   }
224
-	
225
-  //获取所有的父级科室列表
226
-  getAllParentdepart(keyWord = "") {
227
-    let postData: any = {
228
-      idx: 0,
229
-      sum: 10,
230
-      department: {
231
-        // hospital: { id: this.add ? this.tool.getCurrentHospital().id : this.hospital },
232
-        keyWord: keyWord,
233
-      },
234
-    };
235
-    if (this.coopItem) {
236
-      // 过滤这个科室及其子科室
237
-      postData.department.filterByDeptId = this.coopItem.id;
238
-    }
239
-    return this.mainService.getFetchDataList("data", "department", postData);
240
-  }
241
-  // 新添加科室号码
242
-  addDeptPhone(e: MouseEvent) {
243
-    e.preventDefault();
244
-    this.deptPhones.push({ id: ++this.deptsPhoneId, phone: "" });
245
-    this.deptsPhoneChange();
246
-  }
247
-  // 删除新添加科室号码
248
-  removeDeptPhone(index: number, e: MouseEvent) {
249
-    e.preventDefault();
250
-    this.deptPhones.splice(index, 1);
251
-    this.deptsPhoneChange();
252
-  }
253
-  //监听科室电话输入事件
254
-  deptsPhoneChange(e?, phone?) {
255
-    if (e !== undefined && phone !== undefined) {
256
-      phone.phone = e;
257
-    }
258
-    // -------------判断添加按钮是否禁用 start
259
-    this.isAddDeptsPhone = !this.validateForm.value.officeNum;
260
-    if (!this.isAddDeptsPhone) {
261
-      //如果没禁用
262
-      this.isAddDeptsPhone = this.deptPhones.some((item) => item.phone === "");
263
-    }
264
-    // -------------判断添加按钮是否禁用 end
265
-  }
266
 
139
 
267
   // 搜索
140
   // 搜索
268
   search() {
141
   search() {
@@ -369,108 +242,6 @@ export class DispensingBatchComponent implements OnInit {
369
     this.getList();
242
     this.getList();
370
   }
243
   }
371
 
244
 
372
-  // 切换院区选项
373
-  buildings: any = []; //楼栋
374
-  maskFlag: any = false;
375
-  changeHosp(obj?) {
376
-    let hospitalId;
377
-    if (obj) {
378
-      hospitalId = obj.hospital.id;
379
-    }
380
-    let hid;
381
-    if (hospitalId || hospitalId == 0) {
382
-      hid = hospitalId - 0;
383
-    } 
384
-		// else {
385
-  //     hid = this.hospital - 0;
386
-  //   }
387
-    let data = {
388
-      hosId: this.add ? this.tool.getCurrentHospital().id : hid,
389
-    };
390
-    this.maskFlag = this.message.loading("正在加载中..", {
391
-      nzDuration: 0,
392
-    }).messageId;
393
-    this.mainService
394
-      .coopData("getBuildingOrFloor", "building", data)
395
-      .subscribe((data) => {
396
-        this.buildings = data.data;
397
-        this.floors = [];
398
-        // ---------
399
-        if (obj) {
400
-          //编辑
401
-          let arr = this.buildings.map((item) => item.id);
402
-          if (obj.building.id && arr.includes(obj.building.id)) {
403
-            //有楼栋
404
-            this.changeBuilding(obj.building.id, obj);
405
-            this.validateForm.controls.building.setValue(obj.building.id + "");
406
-          } else {
407
-            //无楼栋
408
-            this.floors = [];
409
-            this.message.remove(this.maskFlag);
410
-            this.maskFlag = false;
411
-            this.modal = true;
412
-            this.validateForm.controls.building.setValue(null);
413
-            this.validateForm.controls.officeAddress.setValue(null);
414
-          }
415
-        } else {
416
-          //新增
417
-          this.message.remove(this.maskFlag);
418
-          this.maskFlag = false;
419
-          this.modal = true;
420
-        }
421
-        // ---------
422
-      });
423
-  }
424
-
425
-  // 切换楼栋信息
426
-  floors: Array<any> = []; //楼层
427
-  floorLoading: boolean = false;
428
-  changeBuilding(buildingId?, obj?) {
429
-    var that = this;
430
-    that.floors = [];
431
-    var bid;
432
-    if (buildingId || buildingId == 0) {
433
-      bid = buildingId - 0;
434
-    } else if (!that.add && that.validateForm.value.building) {
435
-      bid = that.validateForm.value.building - 0;
436
-    } else {
437
-      return;
438
-    }
439
-    let data = {
440
-      buildingId: bid,
441
-    };
442
-    this.floorLoading = true;
443
-    that.mainService
444
-      .coopData("getBuildingOrFloor", "floor", data)
445
-      .subscribe((data) => {
446
-        this.floorLoading = false;
447
-        this.message.remove(this.maskFlag);
448
-        this.maskFlag = false;
449
-        this.modal = true;
450
-        that.floors = data.data;
451
-        if (obj) {
452
-          let floorId = obj.floor.id;
453
-          let arr = that.floors.map((item) => item["id"]);
454
-          if (floorId && arr.includes(floorId)) {
455
-            this.validateForm.controls.floor.setValue(floorId + "");
456
-          } else {
457
-            this.validateForm.controls.floor.setValue(null);
458
-            this.validateForm.controls.officeAddress.setValue(null);
459
-          }
460
-        }
461
-      });
462
-  }
463
-
464
-  // 获取科室类型
465
-  types: Array<any> = [];
466
-  getType() {
467
-    var that = this;
468
-    that.mainService.getDictionary("list", "dept_type").subscribe((data) => {
469
-      console.log(data);
470
-      that.types = data;
471
-    });
472
-  }
473
-
474
   // 获取科室汇总交接类型
245
   // 获取科室汇总交接类型
475
   deptHandoverTypes: Array<any> = [];
246
   deptHandoverTypes: Array<any> = [];
476
   getDeptHandoverType() {
247
   getDeptHandoverType() {
@@ -480,13 +251,42 @@ export class DispensingBatchComponent implements OnInit {
480
       that.deptHandoverTypes = data;
251
       that.deptHandoverTypes = data;
481
     });
252
     });
482
   }
253
   }
483
-
254
+	
255
+	// 获取任务id
256
+	getTaskTypesId() {
257
+		this.mainService.getDictionary("list", "ordinary_field").subscribe((data) => {
258
+			this.taskTypeData = data.find(i=>i.value=='infusionSolutions')
259
+			this.getConfig();
260
+		});
261
+	}
262
+	
263
+	// 获取配置
264
+	getConfig() {
265
+	  let postData = {
266
+	    idx: 0,
267
+	    sum: 10,
268
+	    taskTypeConfig: {
269
+				hosId:this.hosId,
270
+				taskType:this.taskTypeData.id
271
+	    }
272
+	  };
273
+	  this.mainService
274
+		.getFetchDataList("simple/data", "taskTypeConfig", postData)
275
+		.subscribe((result) => {
276
+			if (result.status == 200) {
277
+				let data = result.list[0] || {};
278
+				this.validateForm.controls.department.setValue(data.pharmacyDept || '');
279
+				this.add = true;
280
+				this.modal = true;
281
+				this.isAddDeptsPhone = true;
282
+			}
283
+		});
284
+	}
285
+	
484
   // 新增弹框
286
   // 新增弹框
485
   showModal() {
287
   showModal() {
486
     this.initForm();
288
     this.initForm();
487
-    this.add = true;
488
-		this.modal = true;
489
-    this.isAddDeptsPhone = true;
289
+		this.getTaskTypesId()
490
   }
290
   }
491
   hideModal() {
291
   hideModal() {
492
     this.coopItem = null;
292
     this.coopItem = null;
@@ -499,80 +299,15 @@ export class DispensingBatchComponent implements OnInit {
499
   initForm() {
299
   initForm() {
500
     this.validateForm = this.fb.group({
300
     this.validateForm = this.fb.group({
501
       dispensingTime: [null, [Validators.required]],
301
       dispensingTime: [null, [Validators.required]],
502
-      department: [null, [Validators.required]]
302
+      department: [null, [Validators.required]],
303
+			loadAllConsumeDept: [true,[]]
503
     });
304
     });
504
 		let date = new Date();
305
 		let date = new Date();
505
 		this.loadStartTime = format(subDays(date, 1), "yyyy-MM-dd") +' '+'08:00:00'
306
 		this.loadStartTime = format(subDays(date, 1), "yyyy-MM-dd") +' '+'08:00:00'
506
 		this.loadEndTime = format(date, "yyyy-MM-dd") +' '+'08:00:00'
307
 		this.loadEndTime = format(date, "yyyy-MM-dd") +' '+'08:00:00'
507
 		this.validateForm.controls.dispensingTime.setValue([this.loadStartTime, this.loadEndTime]);
308
 		this.validateForm.controls.dispensingTime.setValue([this.loadStartTime, this.loadEndTime]);
508
   }
309
   }
509
-  // 科室位置必填
510
-  buildValidator = (control: FormControl): { [s: string]: boolean } => {
511
-    if (
512
-      this.validateForm &&
513
-      this.validateForm.value &&
514
-      (!this.validateForm.value.building ||
515
-        !this.validateForm.value.floor ||
516
-        !this.validateForm.value.officeAddress)
517
-    ) {
518
-      return { required: true };
519
-    }
520
-  };
521
-  /**
522
-   * 生成一个从 start 到 end 的连续数组
523
-   * @param start
524
-   * @param end
525
-   */
526
-  generateArray(start, end) {
527
-    return Array.from(new Array(end).keys()).slice(start);
528
-  }
529
 
310
 
530
-  //服务时间选择
531
-  // 禁用的小时
532
-  startTime1Hourdis() {
533
-    return [];
534
-  }
535
-  endTime1Hourdis() {
536
-    return [];
537
-  }
538
-  startTime2Hourdis() {
539
-    return [];
540
-  }
541
-  endTime2Hourdis() {
542
-    return [];
543
-  }
544
-  // 禁用的分钟
545
-  startTime1Mindis() {
546
-    return [];
547
-  }
548
-  endTime1Mindis() {
549
-    return [];
550
-  }
551
-  startTime2Mindis() {
552
-    return [];
553
-  }
554
-  endTime2Mindis() {
555
-    return [];
556
-  }
557
-  timeChange(e: boolean, type: string, num: number) {
558
-    if (!e && this.validateForm.value[type + num]) {
559
-      let hour = new Date(this.validateForm.value[type + num]).getHours();
560
-      let minute = new Date(this.validateForm.value[type + num]).getMinutes();
561
-      if (type == "startTime" && num === 1) {
562
-        this.endTime1Hourdis = () => this.generateArray(0, hour);
563
-        this.endTime1Mindis = () => this.generateArray(0, minute + 1);
564
-      } else if (type == "startTime" && num === 2) {
565
-        this.endTime2Hourdis = () => this.generateArray(0, hour);
566
-        this.endTime2Mindis = () => this.generateArray(0, minute + 1);
567
-      } else if (type == "endTime" && num === 1) {
568
-        this.startTime1Hourdis = () => this.generateArray(hour + 1, 24);
569
-        this.startTime1Mindis = () => this.generateArray(minute, 60);
570
-      } else if (type == "endTime" && num === 2) {
571
-        this.startTime2Hourdis = () => this.generateArray(hour + 1, 24);
572
-        this.startTime2Mindis = () => this.generateArray(minute, 60);
573
-      }
574
-    }
575
-  }
576
   // 表单提交
311
   // 表单提交
577
   submitForm(): void {
312
   submitForm(): void {
578
     var that = this;
313
     var that = this;
@@ -585,7 +320,8 @@ export class DispensingBatchComponent implements OnInit {
585
 			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
320
 			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
586
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
321
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
587
 			hosId:this.hosId,
322
 			hosId:this.hosId,
588
-			pharmacy:this.validateForm.value.department
323
+			pharmacy:this.validateForm.value.department,
324
+			loadAllConsumeDept:this.validateForm.value.loadAllConsumeDept?1:0
589
     };
325
     };
590
   
326
   
591
     if (!that.add) {
327
     if (!that.add) {
@@ -616,8 +352,14 @@ export class DispensingBatchComponent implements OnInit {
616
     this.coopItem = data;
352
     this.coopItem = data;
617
     this.validateForm.controls.department.setValue(data.pharmacy);
353
     this.validateForm.controls.department.setValue(data.pharmacy);
618
     this.validateForm.controls.dispensingTime.setValue([data.startTime,data.endTime]);
354
     this.validateForm.controls.dispensingTime.setValue([data.startTime,data.endTime]);
355
+		if(data.loadAllConsumeDept==1){
356
+			this.validateForm.controls.loadAllConsumeDept.setValue(true);
357
+		}else{
358
+			this.validateForm.controls.loadAllConsumeDept.setValue(false);
359
+		}
619
 		this.loadStartTime = data.startTime
360
 		this.loadStartTime = data.startTime
620
 		this.loadEndTime = data.endTime
361
 		this.loadEndTime = data.endTime
362
+		console.log(11,this.validateForm.value)
621
 		this.modal = true
363
 		this.modal = true
622
   }
364
   }
623
 
365
 
@@ -676,34 +418,6 @@ export class DispensingBatchComponent implements OnInit {
676
 		this.router.navigateByUrl(`/dispensingDetail/${data.id}`);
418
 		this.router.navigateByUrl(`/dispensingDetail/${data.id}`);
677
   }
419
   }
678
 
420
 
679
-  // 选中表格中科室
680
-  mapOfCheckedId: { [key: string]: boolean } = {};
681
-  checkedDepIds = []; //已选中科室id
682
-  refreshStatus(): void {
683
-    this.isAllDisplayDataChecked = this.listOfData.every(
684
-      (item) => this.mapOfCheckedId[item.id]
685
-    );
686
-    let arr = [];
687
-    for (var k in this.mapOfCheckedId) {
688
-      if (this.mapOfCheckedId[k]) {
689
-        arr.push(Number(k));
690
-      }
691
-    }
692
-    this.checkedDepIds = arr;
693
-    console.log(this.checkedDepIds);
694
-  }
695
-  //表格整行选中
696
-  selectedListData(id) {
697
-    this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
698
-    this.refreshStatus();
699
-  }
700
-  // 全选
701
-  isAllDisplayDataChecked = false; //当前页是否全选
702
-  checkAll(value: boolean): void {
703
-    this.listOfData.forEach((item) => (this.mapOfCheckedId[item.id] = value));
704
-    this.refreshStatus();
705
-  }
706
-
707
 	// 发药并打印
421
 	// 发药并打印
708
 	printData = []; 
422
 	printData = []; 
709
 	print(e, data, id){
423
 	print(e, data, id){
@@ -724,8 +438,8 @@ export class DispensingBatchComponent implements OnInit {
724
 							drugName:'合计',
438
 							drugName:'合计',
725
 							specs:'',
439
 							specs:'',
726
 						},
440
 						},
727
-						actualCount:i.totalActual,
728
-						cartonNum:i.totalCarton,
441
+						expendCount:i.totalExpendCount,
442
+						addSub:i.totalAddSub,
729
 						deptName:''
443
 						deptName:''
730
 					})
444
 					})
731
 				}
445
 				}
@@ -735,7 +449,7 @@ export class DispensingBatchComponent implements OnInit {
735
 				that.printModal = false;
449
 				that.printModal = false;
736
 		    setTimeout(() => {
450
 		    setTimeout(() => {
737
 		      const printContent = document.getElementById("report");
451
 		      const printContent = document.getElementById("report");
738
-		      const WindowPrt = window.open("", "", "width=1000,height=900");
452
+		      const WindowPrt = window.open("", "", "width=1000,height=1200");
739
 		      WindowPrt.document.write(printContent.innerHTML);
453
 		      WindowPrt.document.write(printContent.innerHTML);
740
 		      WindowPrt.document.close();
454
 		      WindowPrt.document.close();
741
 		      WindowPrt.focus();
455
 		      WindowPrt.focus();

+ 28 - 19
src/app/views/dispensing-detail/dispensing-detail.component.html

@@ -2,42 +2,44 @@
2
   <div class="list-template__content">
2
   <div class="list-template__content">
3
 		<div class="detail-title">
3
 		<div class="detail-title">
4
 			<h3 *ngIf="deptName">{{deptName}}-发药单</h3>
4
 			<h3 *ngIf="deptName">{{deptName}}-发药单</h3>
5
-			<button class="btn cancel right-btn" nz-button nzType="default" (click)="back()">取消</button>
5
+			<button class="btn right-btn" nz-button nzType="primary" (click)="back()">返回</button>
6
 		</div>
6
 		</div>
7
     <div class="list-template__bottom" style="padding: 0 !important;">
7
     <div class="list-template__bottom" style="padding: 0 !important;">
8
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
8
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
9
         [nzLoading]="loading1">
9
         [nzLoading]="loading1">
10
         <thead>
10
         <thead>
11
           <tr class="thead">
11
           <tr class="thead">
12
-						<th nzWidth="9%">药品标识</th>
13
-            <th nzWidth="9%">药品名称</th>
14
-            <th nzWidth="9%">规格</th>
15
-						<th nzWidth="9%">消耗数量</th>
16
-						<th nzWidth="9%">原库存数</th>
17
-						<th nzWidth="9%">包装规格</th>
18
-						<th nzWidth="9%">发药箱数</th>
19
-						<th nzWidth="9%">实发数量</th>
20
-            <th nzWidth="9%">计算后库存</th>
21
-						<th nzWidth="7%">增减</th>
22
-            <th nzWidth="11%">操作</th>
12
+            <th nzWidth="25%">药品名称</th>
13
+            <th nzWidth="16%">规格</th>
14
+						<th nzWidth="8%">消耗量</th>
15
+						<th nzWidth="6%">原库存</th>
16
+						<th nzWidth="8%">包装规格</th>
17
+						<th nzWidth="8%">发药箱数</th>
18
+						<th nzWidth="5%">实发</th>
19
+            <th nzWidth="6%">新库存</th>
20
+						<th nzWidth="5%">增减</th>
21
+            <th nzWidth="13%">操作</th>
23
           </tr>
22
           </tr>
24
         </thead>
23
         </thead>
25
         <tbody>
24
         <tbody>
26
           <tr *ngFor="let data of listOfData">
25
           <tr *ngFor="let data of listOfData">
27
-						<td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugCode:'-' }}</td>
28
-            <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'-' }}</td>
26
+            <td nz-tooltip [nzTooltipTitle]="data.drugsInfoDTO.drugCode" style="position: relative;">
27
+							<div class="sign" *ngIf="data.giveOutType.value=='1'"></div>
28
+							{{ data.drugsInfoDTO?data.drugsInfoDTO.drugName:'-' }}
29
+						</td>
29
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
30
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
30
             <td>{{ data.expendCount||'0' }}</td>
31
             <td>{{ data.expendCount||'0' }}</td>
31
             <td>{{ data.formerInventory || '0' }}</td>
32
             <td>{{ data.formerInventory || '0' }}</td>
32
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
33
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
33
-						<td>{{ data.cartonNum||'0' }}</td>
34
+						<td>{{ data.cartonNum || 0 }}</td> 
34
 						<td>{{ data.actualCount||'0' }}</td>
35
 						<td>{{ data.actualCount||'0' }}</td>
35
 						<td>{{ data.afterInventory||'0' }}</td>
36
 						<td>{{ data.afterInventory||'0' }}</td>
36
 						<td>{{ data.addSub||'0' }}</td>
37
 						<td>{{ data.addSub||'0' }}</td>
37
             <td>
38
             <td>
38
               <div class="coop">
39
               <div class="coop">
39
-                <span (click)="itemClick($event,data.id, 'add')">增加</span>
40
-								<span (click)="itemClick($event,data.id, 'del')">减少</span>
40
+                <span (click)="itemClick($event, data.id, 'add')">增加</span>
41
+								<span (click)="itemClick($event, data.id, 'del')">减少</span>
42
+								<span (click)="grantClick($event, data)">{{data.giveOutType.value=='2'?'单发':'箱发'}}</span>
41
 							</div>
43
 							</div>
42
             </td>
44
             </td>
43
           </tr>
45
           </tr>
@@ -50,7 +52,7 @@
50
 			<h3 class="title">快速添加发药科室</h3>
52
 			<h3 class="title">快速添加发药科室</h3>
51
 			<div class="right-template">
53
 			<div class="right-template">
52
 			  <span class="label">科室:</span>
54
 			  <span class="label">科室:</span>
53
-			  <nz-select class="formItem" (ngModelChange)="deptChange($event)" [nzDropdownMatchSelectWidth]="false" (nzOnSearch)="changeInp($event, 'dept')" nzServerSearch nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="department">
55
+			  <nz-select class="formItem" (ngModelChange)="deptChange($event)" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择科室" [(ngModel)]="department">
54
 			    <ng-container *ngFor="let option of hospitals1">
56
 			    <ng-container *ngFor="let option of hospitals1">
55
 			      <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
57
 			      <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
56
 			    </ng-container>
58
 			    </ng-container>
@@ -131,7 +133,9 @@
131
       </div>
133
       </div>
132
     </div>
134
     </div>
133
   </div>
135
   </div>
134
-
136
+	<div class="mask-style" *ngIf="isSpinning">
137
+		<nz-spin nzSimple class="spin-style"></nz-spin>
138
+	</div>
135
 </div>
139
 </div>
136
 <!-- 操作成功/失败提示框 -->
140
 <!-- 操作成功/失败提示框 -->
137
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
141
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
@@ -140,3 +144,8 @@
140
 <!-- 删除模态框 -->
144
 <!-- 删除模态框 -->
141
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
145
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
142
     (confirmDelEvent)="confirmDel()" content="您确认要删除发药科室吗?"></app-dialog-delete>
146
     (confirmDelEvent)="confirmDel()" content="您确认要删除发药科室吗?"></app-dialog-delete>
147
+
148
+<!-- 单发/箱发 -->
149
+  <app-dialog-delete [delModal]="delGrantModal" (hideDelModalEvent)="hideGrantModal()" [btnLoading]="btnLoading"
150
+    (confirmDelEvent)="confirmGrantDel()" [content]="content"></app-dialog-delete>
151
+

+ 25 - 4
src/app/views/dispensing-detail/dispensing-detail.component.less

@@ -61,8 +61,7 @@ h3{
61
 		border-radius: 5px;
61
 		border-radius: 5px;
62
 		border: 1px solid #e5e5e5;
62
 		border: 1px solid #e5e5e5;
63
 		.list-template__bottom{
63
 		.list-template__bottom{
64
-			height: auto;
65
-			max-height: 550px;
64
+			height: calc(100vh - 70px);
66
 			overflow-y: auto;
65
 			overflow-y: auto;
67
 		}
66
 		}
68
 	}
67
 	}
@@ -119,8 +118,7 @@ h3{
119
 			}
118
 			}
120
 			.dept-box{
119
 			.dept-box{
121
 				margin-top: 20px;
120
 				margin-top: 20px;
122
-				height: auto;
123
-				max-height: 393px;
121
+				height: calc(100vh - 232px);
124
 				overflow-y: auto;
122
 				overflow-y: auto;
125
 				.dept-item{
123
 				.dept-item{
126
 					display: flex;
124
 					display: flex;
@@ -383,3 +381,26 @@ h3{
383
 		}
381
 		}
384
 	}
382
 	}
385
 }
383
 }
384
+
385
+.mask-style{
386
+	width: 100%;
387
+	height: 100%;
388
+	position: fixed;
389
+	top: 0;
390
+	left: 0;
391
+	z-index: 999;
392
+	display: flex;
393
+	background: rgba(0,0,0,0.2);
394
+	align-items: center;
395
+	justify-content: center;
396
+}
397
+.spin-style{
398
+	z-index:9999;
399
+}
400
+.sign{
401
+	width: 8px;
402
+	height: 8px;
403
+	border-radius: 50%;
404
+	background: red;
405
+	display: inline-block;
406
+}

+ 80 - 24
src/app/views/dispensing-detail/dispensing-detail.component.ts

@@ -39,11 +39,7 @@ export class DispensingDetailComponent implements OnInit {
39
   ngOnInit() {
39
   ngOnInit() {
40
     this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
40
     this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
41
 			this.isDeptLoading = true;
41
 			this.isDeptLoading = true;
42
-			if(e[1]=='dept'){
43
-				this.getDeparts(e[0]);
44
-			}else{
45
-				this.getBuilding(e[0]);
46
-			}
42
+			this.getBuilding(e[0]);
47
     });
43
     });
48
 		this.detailId = this.route.snapshot.params.id;
44
 		this.detailId = this.route.snapshot.params.id;
49
 		this.hosId = this.tool.getCurrentHospital().id;
45
 		this.hosId = this.tool.getCurrentHospital().id;
@@ -91,6 +87,9 @@ export class DispensingDetailComponent implements OnInit {
91
 	deptName:null;
87
 	deptName:null;
92
   //搜索父级科室
88
   //搜索父级科室
93
 	isDeptLoading = false;
89
 	isDeptLoading = false;
90
+	isSpinning = false;
91
+	delGrantModal = false;
92
+	showInsp = false;
94
   changeInp(e, type) {
93
   changeInp(e, type) {
95
     this.searchParentDeptSubject.next([e, type]);
94
     this.searchParentDeptSubject.next([e, type]);
96
   }
95
   }
@@ -140,8 +139,9 @@ export class DispensingDetailComponent implements OnInit {
140
 		  .subscribe((res) => {
139
 		  .subscribe((res) => {
141
 				if(res.list.length==0){
140
 				if(res.list.length==0){
142
 					this.message.error(`您选择的科室“	${deptData.dept}”时间段内没有消耗药品无法添加发药单。`)
141
 					this.message.error(`您选择的科室“	${deptData.dept}”时间段内没有消耗药品无法添加发药单。`)
142
+				}else{
143
+					this.getDeptData(e,'all','load')
143
 				}
144
 				}
144
-				this.getDeptData(e,'all','load')
145
 		  });
145
 		  });
146
 	}
146
 	}
147
 	
147
 	
@@ -196,6 +196,7 @@ export class DispensingDetailComponent implements OnInit {
196
 		this.deptName = null
196
 		this.deptName = null
197
 		this.deptIndex = null
197
 		this.deptIndex = null
198
 		this.listOfData=[]
198
 		this.listOfData=[]
199
+		this.showInsp = true
199
 		this.getDeptData(e,'','')
200
 		this.getDeptData(e,'','')
200
 	}
201
 	}
201
 	
202
 	
@@ -218,9 +219,13 @@ export class DispensingDetailComponent implements OnInit {
218
 		}else{
219
 		}else{
219
 			data.drugsList.buildingId = e
220
 			data.drugsList.buildingId = e
220
 		}
221
 		}
222
+		if(this.showInsp){
223
+			this.isSpinning = true
224
+		}
221
 		that.mainService
225
 		that.mainService
222
 		  .getFetchDataList("data", "drugsList", data)
226
 		  .getFetchDataList("data", "drugsList", data)
223
 		  .subscribe((res) => {
227
 		  .subscribe((res) => {
228
+				this.isSpinning = false
224
 		    that.deptList = res.list;
229
 		    that.deptList = res.list;
225
 				if(initial=='load'){
230
 				if(initial=='load'){
226
 					if(res.list.length>0){
231
 					if(res.list.length>0){
@@ -242,6 +247,7 @@ export class DispensingDetailComponent implements OnInit {
242
 	// 添加科室
247
 	// 添加科室
243
 	addDept(){
248
 	addDept(){
244
 		if(this.addDeptId){
249
 		if(this.addDeptId){
250
+			this.showInsp = true
245
 			this.getDispensingDept(this.addDeptId,'dept')
251
 			this.getDispensingDept(this.addDeptId,'dept')
246
 		}else{
252
 		}else{
247
 			this.message.error('请先选择发药科室')
253
 			this.message.error('请先选择发药科室')
@@ -269,35 +275,84 @@ export class DispensingDetailComponent implements OnInit {
269
 	}
275
 	}
270
 	
276
 	
271
 	// 获取所有科室
277
 	// 获取所有科室
272
-  getDeparts(dept) {
273
-    var that = this;
278
+  getDeparts() {
274
     let data = {
279
     let data = {
275
-      department: {
276
-        dept,
277
-        hospital: {
278
-          id: this.hosId
279
-        },
280
-      },
281
-      idx: 0,
282
-      sum: 20,
280
+      batchId:this.detailId
283
     };
281
     };
284
-    that.mainService
285
-      .getFetchDataList("data", "department", data)
286
-      .subscribe((data) => {
287
-				setTimeout(_=>{
288
-					that.isDeptLoading = false;
289
-					this.hospitals1 = data.list
290
-				},500)
282
+    this.mainService
283
+      .getConsumeDept(data)
284
+      .subscribe((res) => {
285
+				this.isDeptLoading = false;
286
+				this.hospitals1 = res.data
291
       });
287
       });
292
   }
288
   }
293
 	
289
 	
294
   // 获取所有院区
290
   // 获取所有院区
295
   getAllHospital() {
291
   getAllHospital() {
296
-		this.getDeparts('')
292
+		this.getDeparts()
297
 		this.getBuilding('')
293
 		this.getBuilding('')
298
 		this.getDeptData('','all','load')
294
 		this.getDeptData('','all','load')
295
+		this.getDicData()
299
   }
296
   }
300
 	
297
 	
298
+	// 获取单发箱发字典
299
+	dicData = [];
300
+	getDicData(){
301
+		this.mainService.getDictionary("list", "give_out_type").subscribe((res) => {
302
+			this.dicData = res
303
+		});
304
+	}
305
+	
306
+	// 单发/箱发
307
+	content = '';
308
+	giveName = '';
309
+	grantClick(e, data){
310
+		this.rowId = data.id
311
+		this.giveName = data.giveOutType.value
312
+		if(data.giveOutType.value==1){
313
+			this.content = `您确认要修改发药类型为箱发吗?`
314
+		}else{
315
+			this.content = `您确认要修改发药类型为单发吗?`
316
+		}
317
+		this.delGrantModal = true
318
+	}
319
+	
320
+	// 修改发放类型
321
+	confirmGrantDel(){
322
+		var that = this;
323
+		let list = null;
324
+		console.log(11,this.dicData)
325
+		if(this.giveName=='1'){
326
+			list = this.dicData.find(i=>i.value == '2')
327
+		}else{
328
+			list = this.dicData.find(i=>i.value == '1')
329
+		}
330
+		let data = {
331
+			id:this.rowId,
332
+			deptId:this.deptId,
333
+			giveOutType:{
334
+				id:list.id
335
+			}
336
+		};
337
+		that.btnLoading = true;
338
+		that.mainService
339
+		  .simplePost("addData", "drugsConfigure", data)
340
+		  .subscribe((data) => {
341
+		    that.btnLoading = false;
342
+		    that.hideGrantModal();
343
+				this.getList()
344
+		    if (data.status == 200) {
345
+		      that.showPromptModal("修改", true, "");
346
+		    } else {
347
+		      that.showPromptModal("修改", false, data.msg);
348
+		    }
349
+		  });
350
+	}
351
+	
352
+	hideGrantModal(){
353
+		this.delGrantModal = false;
354
+	}
355
+	
301
 	// 增加/减少
356
 	// 增加/减少
302
 	itemClick(e, id, type){
357
 	itemClick(e, id, type){
303
 		e.stopPropagation();
358
 		e.stopPropagation();
@@ -326,6 +381,7 @@ export class DispensingDetailComponent implements OnInit {
326
 			deptId:this.deptId,
381
 			deptId:this.deptId,
327
 			upType:that.add ? 'add' : 'sub'
382
 			upType:that.add ? 'add' : 'sub'
328
 	  };
383
 	  };
384
+		that.btnLoading = true;
329
 	  that.mainService
385
 	  that.mainService
330
 	    .simplePost("addData", "drugsConfigure", data)
386
 	    .simplePost("addData", "drugsConfigure", data)
331
 	    .subscribe((data) => {
387
 	    .subscribe((data) => {

+ 1 - 0
src/app/views/drug-info/drug-info.component.ts

@@ -187,6 +187,7 @@ export class DrugInfoComponent implements OnInit {
187
     }else{
187
     }else{
188
 			delete data.id
188
 			delete data.id
189
 		}
189
 		}
190
+		that.btnLoading = true;
190
     that.mainService
191
     that.mainService
191
       .simplePost("addData", "drugsInfo", data)
192
       .simplePost("addData", "drugsInfo", data)
192
       .subscribe((data) => {
193
       .subscribe((data) => {

+ 20 - 7
src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.html

@@ -65,26 +65,39 @@
65
         <!-- <button nz-button class="btn default ml8" (click)='exportDetail()' [nzLoading]="loading3" [disabled]="!checkedDepIds.length">批量导出详细科室报表</button> -->
65
         <!-- <button nz-button class="btn default ml8" (click)='exportDetail()' [nzLoading]="loading3" [disabled]="!checkedDepIds.length">批量导出详细科室报表</button> -->
66
       </div>
66
       </div>
67
     </div>
67
     </div>
68
+		<div class="cont">
69
+		  <div>
70
+		    <span>总计</span>
71
+		    <span class="rate"></span>
72
+		  </div>
73
+		  <div>
74
+		    <span>科室名称</span>
75
+		    <span>{{summary[0] || 0}}</span>
76
+		  </div>
77
+		  <div>
78
+		    <span>总重量(kg)</span>
79
+		    <span>{{summary[1] || 0}}</span>
80
+		  </div>
81
+		  <div *ngFor="let item of heads;let index=index;">
82
+		    <span>{{item}}(kg)</span>
83
+				<span>{{summary[index+2] || 0}}</span>
84
+		  </div>
85
+		</div>
68
     <div class="list-template__bottom">
86
     <div class="list-template__bottom">
69
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
87
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
70
         [nzLoading]="loading1">
88
         [nzLoading]="loading1">
71
         <thead (nzSortChange)="sort($event)" nzSingleSort>
89
         <thead (nzSortChange)="sort($event)" nzSingleSort>
72
           <tr class="thead">
90
           <tr class="thead">
73
-            <!-- <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
74
-              (nzCheckedChange)="checkAll($event)"></th> -->
75
             <th>序号</th>
91
             <th>序号</th>
76
             <th>科室名称</th>
92
             <th>科室名称</th>
77
-            <th>总重量(kg)</th>
93
+            <th nzShowSort nzSortKey="totalWeight" [(nzSort)]="sortCurrent.totalWeight">总重量(kg)</th>
78
             <th *ngFor="let data of heads">{{data}}(kg)</th>
94
             <th *ngFor="let data of heads">{{data}}(kg)</th>
79
           </tr>
95
           </tr>
80
         </thead>
96
         </thead>
81
         <tbody>
97
         <tbody>
82
           <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
98
           <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data)">
83
-            <!-- <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td> -->
84
             <td>{{ index+(pageIndex-1) * pageSize + 1 }}</td>
99
             <td>{{ index+(pageIndex-1) * pageSize + 1 }}</td>
85
-            <td>{{ data.dept }}</td>
86
-            <td>{{ data.totalWeight }}</td>
87
-            <td *ngFor="let weight of data.typeWeightList">{{ weight }}</td>
100
+            <td *ngFor="let item of data;">{{ item }}</td>
88
           </tr>
101
           </tr>
89
         </tbody>
102
         </tbody>
90
       </nz-table>
103
       </nz-table>

+ 49 - 0
src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 18 - 22
src/app/views/medical-waste-department-statistics/medical-waste-department-statistics.component.ts

@@ -221,11 +221,7 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
221
     this.sortCurrentKey = "";
221
     this.sortCurrentKey = "";
222
     this.sortCurrentValue = "";
222
     this.sortCurrentValue = "";
223
     this.sortCurrent = {
223
     this.sortCurrent = {
224
-      clothesTypeNum: null,
225
-      getOrder: null,
226
-      sendOrder: null,
227
-      sendClothesNum: null,
228
-      price: null,
224
+      totalWeight: null
229
     };
225
     };
230
     this.searchDto = {
226
     this.searchDto = {
231
       dept: null,
227
       dept: null,
@@ -261,8 +257,23 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
261
     });
257
     });
262
     this.refreshStatus();
258
     this.refreshStatus();
263
   }
259
   }
260
+	
261
+	// 列表排序
262
+	sortCurrent = {
263
+	  totalWeight: null,
264
+	};
265
+	sortCurrentKey: string = "";
266
+	sortCurrentValue: string | null = "";
267
+	sort(e) {
268
+	  const { key, value } = e;
269
+	  this.sortCurrentKey = key;
270
+	  this.sortCurrentValue = value;
271
+	  this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
272
+	}
273
+	
264
   // 表格数据
274
   // 表格数据
265
   loading1 = false;
275
   loading1 = false;
276
+	summary = {};
266
   getList(num?: number, field?: string, sort?: string) {
277
   getList(num?: number, field?: string, sort?: string) {
267
     this.mapOfCheckedId = {};
278
     this.mapOfCheckedId = {};
268
     this.checkedDepIds = [];
279
     this.checkedDepIds = [];
@@ -279,13 +290,14 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
279
       buildingId: this.searchDto.building || undefined,
290
       buildingId: this.searchDto.building || undefined,
280
     };
291
     };
281
     if (field && sort) {
292
     if (field && sort) {
282
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
293
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
283
     }
294
     }
284
     this.loading1 = true;
295
     this.loading1 = true;
285
     this.mainService
296
     this.mainService
286
       .postCustom("report/medicalWaste", "dept", postData)
297
       .postCustom("report/medicalWaste", "dept", postData)
287
       .subscribe((result) => {
298
       .subscribe((result) => {
288
         this.loading1 = false;
299
         this.loading1 = false;
300
+				this.summary = result.summary[0] || {}
289
         this.listOfData = result.list || [];
301
         this.listOfData = result.list || [];
290
         this.heads = result.heads || [];
302
         this.heads = result.heads || [];
291
         this.listLength = result.totalNum;
303
         this.listLength = result.totalNum;
@@ -592,20 +604,4 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
592
     this.isLoading = true;
604
     this.isLoading = true;
593
     this.searchTimerSubject.next([fun, e]);
605
     this.searchTimerSubject.next([fun, e]);
594
   }
606
   }
595
-  // 列表排序
596
-  sortCurrent = {
597
-    clothesTypeNum: null,
598
-    getOrder: null,
599
-    sendOrder: null,
600
-    sendClothesNum: null,
601
-    price: null,
602
-  };
603
-  sortCurrentKey: string = "";
604
-  sortCurrentValue: string | null = "";
605
-  sort(e) {
606
-    const { key, value } = e;
607
-    this.sortCurrentKey = key;
608
-    this.sortCurrentValue = value;
609
-    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
610
-  }
611
 }
607
 }

+ 16 - 3
src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.html

@@ -55,22 +55,35 @@
55
         <div echarts class="echart" [options]='barChartOption'></div>
55
         <div echarts class="echart" [options]='barChartOption'></div>
56
       </div>
56
       </div>
57
     </div>
57
     </div>
58
+		<div class="cont">
59
+		  <div>
60
+		    <span>总计</span>
61
+		    <span class="rate"></span>
62
+		  </div>
63
+		  <div>
64
+		    <span>{{dataType=='outbound'?'出库':'回收'}}总重量(kg)</span>
65
+		    <span>{{summary[0] || 0}}</span>
66
+		  </div>
67
+		  <div *ngFor="let item of heads;let index=index;">
68
+		    <span>{{item}}(kg)</span>
69
+		  	<span>{{summary[index+1] || 0}}</span>
70
+		  </div>
71
+		</div>
58
     <div class="list-template__bottom">
72
     <div class="list-template__bottom">
59
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
73
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
60
         [nzLoading]="loading1">
74
         [nzLoading]="loading1">
61
-        <!-- <thead (nzSortChange)="sort($event)" nzSingleSort> -->
62
         <thead>
75
         <thead>
63
           <tr class="thead">
76
           <tr class="thead">
64
             <th>序号</th>
77
             <th>序号</th>
65
             <th>日期</th>
78
             <th>日期</th>
79
+						<th>{{dataType=='outbound'?'出库':'回收'}}总重量(kg)</th>
66
             <th *ngFor="let data of heads">{{data}}(kg)</th>
80
             <th *ngFor="let data of heads">{{data}}(kg)</th>
67
           </tr>
81
           </tr>
68
         </thead>
82
         </thead>
69
         <tbody>
83
         <tbody>
70
           <tr *ngFor="let data of listOfData;let index=index;">
84
           <tr *ngFor="let data of listOfData;let index=index;">
71
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
85
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
72
-            <td>{{ data.date }}</td>
73
-            <td *ngFor="let weight of data.typeWeightList">{{ weight }}</td>
86
+            <td *ngFor="let item of data;">{{ item }}</td>
74
           </tr>
87
           </tr>
75
         </tbody>
88
         </tbody>
76
       </nz-table>
89
       </nz-table>

+ 49 - 0
src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 2 - 0
src/app/views/medical-waste-hospital-statistics/medical-waste-hospital-statistics.component.ts

@@ -316,6 +316,7 @@ export class MedicalWasteHospitalStatisticsComponent implements OnInit {
316
   loading1 = false;
316
   loading1 = false;
317
   pieChart: any = [];
317
   pieChart: any = [];
318
   barChart: any = [];
318
   barChart: any = [];
319
+	summary = {};
319
   getList(num?: number, field?: string, sort?: string) {
320
   getList(num?: number, field?: string, sort?: string) {
320
     let maskFlag = this.message.loading("正在加载中..", {
321
     let maskFlag = this.message.loading("正在加载中..", {
321
       nzDuration: 0,
322
       nzDuration: 0,
@@ -339,6 +340,7 @@ export class MedicalWasteHospitalStatisticsComponent implements OnInit {
339
       .subscribe((result) => {
340
       .subscribe((result) => {
340
         this.message.remove(maskFlag);
341
         this.message.remove(maskFlag);
341
         this.loading1 = false;
342
         this.loading1 = false;
343
+				this.summary = result.summary[0] || {}
342
         this.heads = result.heads || [];
344
         this.heads = result.heads || [];
343
         this.listOfData = result.list || [];
345
         this.listOfData = result.list || [];
344
         this.listLength = result.totalNum;
346
         this.listLength = result.totalNum;

+ 27 - 5
src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.html

@@ -58,16 +58,38 @@
58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
59
       </div>
59
       </div>
60
     </div>
60
     </div>
61
+		<div class="cont">
62
+		  <div>
63
+		    <span>总计</span>
64
+		    <span class="rate"></span>
65
+		  </div>
66
+		  <div>
67
+		    <span>总人数</span>
68
+		    <span>{{summary.personalNum || 0}}</span>
69
+		  </div>
70
+		  <div>
71
+		    <span>总趟数</span>
72
+		    <span>{{summary.totalTrip || 0}}</span>
73
+		  </div>
74
+		  <div>
75
+		    <span>总单数</span>
76
+		    <span>{{summary.totalOrder || 0}}</span>
77
+		  </div>
78
+		  <div>
79
+		    <span>总重量</span>
80
+		    <span>{{summary.totalWeight || 0}}</span>
81
+		  </div>
82
+		</div>
61
     <div class="list-template__bottom">
83
     <div class="list-template__bottom">
62
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
84
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
63
         [nzLoading]="loading1">
85
         [nzLoading]="loading1">
64
         <thead (nzSortChange)="sort($event)" nzSingleSort>
86
         <thead (nzSortChange)="sort($event)" nzSingleSort>
65
           <tr class="thead">
87
           <tr class="thead">
66
-            <th nzWidth="5%">序号</th>
67
-            <th nzWidth="5%">人员姓名</th>
68
-            <th nzWidth="30%">总趟数</th>
69
-            <th nzWidth="30%">总单数</th>
70
-            <th nzWidth="30%">总重量(KG)</th>
88
+            <th nzWidth="6%">序号</th>
89
+            <th nzWidth="10%">人员姓名</th>
90
+            <th nzWidth="28%" nzShowSort nzSortKey="totalTrip" [(nzSort)]="sortCurrent.totalTrip">总趟数</th>
91
+            <th nzWidth="28%" nzShowSort nzSortKey="totalOrder" [(nzSort)]="sortCurrent.totalOrder">总单数</th>
92
+            <th nzWidth="28%" nzShowSort nzSortKey="totalWeight" [(nzSort)]="sortCurrent.totalWeight">总重量(KG)</th>
71
           </tr>
93
           </tr>
72
         </thead>
94
         </thead>
73
         <tbody>
95
         <tbody>

+ 49 - 0
src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 20 - 22
src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.ts

@@ -214,10 +214,7 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
214
     this.sortCurrent = {
214
     this.sortCurrent = {
215
       totalTrip: null,
215
       totalTrip: null,
216
       totalOrder: null,
216
       totalOrder: null,
217
-      getTrip: null,
218
-      getOrder: null,
219
-      sendTrip: null,
220
-      sendOrder: null,
217
+      totalWeight: null
221
     };
218
     };
222
     this.searchDto = {
219
     this.searchDto = {
223
       group: null,
220
       group: null,
@@ -225,8 +222,25 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
225
     }
222
     }
226
     this.changeDateType("day");
223
     this.changeDateType("day");
227
   }
224
   }
225
+	
226
+	// 列表排序
227
+	sortCurrent = {
228
+	  totalTrip: null,
229
+	  totalOrder: null,
230
+	  totalWeight: null,
231
+	};
232
+	sortCurrentKey: string = "";
233
+	sortCurrentValue: string | null = "";
234
+	sort(e) {
235
+	  const { key, value } = e;
236
+	  this.sortCurrentKey = key;
237
+	  this.sortCurrentValue = value;
238
+	  this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
239
+	}
240
+	
228
   // 表格数据
241
   // 表格数据
229
   loading1 = false;
242
   loading1 = false;
243
+	summary = {};
230
   getList(num?: number, field?: string, sort?: string) {
244
   getList(num?: number, field?: string, sort?: string) {
231
     this.pageIndex = num;
245
     this.pageIndex = num;
232
     let postData: any = {
246
     let postData: any = {
@@ -240,13 +254,14 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
240
       groupId: this.searchDto.group || undefined,
254
       groupId: this.searchDto.group || undefined,
241
     };
255
     };
242
     if (field && sort) {
256
     if (field && sort) {
243
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
257
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
244
     }
258
     }
245
     this.loading1 = true;
259
     this.loading1 = true;
246
     this.mainService
260
     this.mainService
247
       .postCustom("report/medicalWaste", "personal", postData)
261
       .postCustom("report/medicalWaste", "personal", postData)
248
       .subscribe((result) => {
262
       .subscribe((result) => {
249
         this.loading1 = false;
263
         this.loading1 = false;
264
+				this.summary = result.summary || {}
250
         this.listOfData = result.list || [];
265
         this.listOfData = result.list || [];
251
         this.listLength = result.totalNum;
266
         this.listLength = result.totalNum;
252
       });
267
       });
@@ -500,21 +515,4 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
500
     this.isLoading = true;
515
     this.isLoading = true;
501
     this.searchTimerSubject.next([fun, e]);
516
     this.searchTimerSubject.next([fun, e]);
502
   }
517
   }
503
-  // 列表排序
504
-  sortCurrent = {
505
-    totalTrip: null,
506
-    totalOrder: null,
507
-    getTrip: null,
508
-    getOrder: null,
509
-    sendTrip: null,
510
-    sendOrder: null,
511
-  };
512
-  sortCurrentKey: string = "";
513
-  sortCurrentValue: string | null = "";
514
-  sort(e) {
515
-    const { key, value } = e;
516
-    this.sortCurrentKey = key;
517
-    this.sortCurrentValue = value;
518
-    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
519
-  }
520
 }
518
 }

+ 7 - 18
src/app/views/order-statistics/order-statistics.component.html

@@ -46,29 +46,18 @@
46
         <thead>
46
         <thead>
47
           <tr class="thead">
47
           <tr class="thead">
48
             <th nzWidth="5%">序号</th>
48
             <th nzWidth="5%">序号</th>
49
-            <th nzWidth="15%">时间</th>
50
-            <th nzWidth="10%">工单总量</th>
51
-            <th nzWidth="10%">标本数量</th>
52
-            <th nzWidth="10%">标本轮巡数量</th>
53
-            <th nzWidth="10%">患者陪检数量</th>
54
-            <th nzWidth="10%">药品数量</th>
55
-            <th nzWidth="10%">静配数量</th>
56
-            <th nzWidth="10%">患者转运数量</th>
57
-            <th nzWidth="10%">其他数量</th>
49
+            <th nzWidth="10%" nzShowSort nzSortKey="date" [(nzSort)]="sortCurrent.date" (nzSortChange)="sort('date',$event)">时间</th>
50
+            <th nzWidth="10%" nzShowSort nzSortKey="total" [(nzSort)]="sortCurrent.total" (nzSortChange)="sort('total',$event)">工单总量</th>
51
+						<th *ngFor="let item of listOfHeads; let index=index;" (nzSortChange)="sort(item.dataSort,$event)"
52
+							nzShowSort [(nzSort)]="item.sortName"
53
+							>{{item.name}}</th>
54
+            <th nzWidth="10%" nzShowSort nzSortKey="other" [(nzSort)]="sortCurrent.other" (nzSortChange)="sort('other',$event)">其他数量</th>
58
           </tr>
55
           </tr>
59
         </thead>
56
         </thead>
60
         <tbody>
57
         <tbody>
61
           <tr *ngFor="let data of listOfData;let index=index;">
58
           <tr *ngFor="let data of listOfData;let index=index;">
62
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
59
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
63
-            <td>{{ data.date }}</td>
64
-            <td>{{ data.total||0}}</td>
65
-            <td>{{data.speCount||0}}</td>
66
-            <td>{{data.spePlanCount||0}}</td>
67
-            <td>{{data.insCount||0}}</td>
68
-            <td>{{data.drugsCount||0}}</td>
69
-            <td>{{data.jpCount||0}}</td>
70
-            <td>{{data.transCount||0}}</td>
71
-            <td>{{data.otherCount||0}}</td>
60
+            <td *ngFor="let item of data;">{{ item }}</td>
72
           </tr>
61
           </tr>
73
         </tbody>
62
         </tbody>
74
       </nz-table>
63
       </nz-table>

+ 33 - 1
src/app/views/order-statistics/order-statistics.component.ts

@@ -155,11 +155,31 @@ export class OrderStatisticsComponent implements OnInit {
155
   reset() {
155
   reset() {
156
     this.changeDateType("day");
156
     this.changeDateType("day");
157
     this.changeDateRange("1");
157
     this.changeDateRange("1");
158
+		this.sortCurrent = {
159
+		  date: null,
160
+		  total: null,
161
+			other: null,
162
+		};
158
     this.search();
163
     this.search();
159
   }
164
   }
165
+	
166
+	// 列表排序
167
+	sortCurrent = {
168
+	  date: null,
169
+	  total: null,
170
+		other: null,
171
+	};
172
+	sortCurrentKey: string = "";
173
+	sortCurrentValue: string | null = "";
174
+	sort(name,e) {
175
+	  this.sortCurrentKey = name;
176
+	  this.sortCurrentValue = e || '';
177
+	  this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue,'forbid');
178
+	}
160
   // 表格数据
179
   // 表格数据
161
   loading1 = false;
180
   loading1 = false;
162
-  getList(num?: number) {
181
+	listOfHeads = [];
182
+  getList(num?: number, field?: string, sort?: string, type?: string) {
163
     if (num !== undefined) {
183
     if (num !== undefined) {
164
       this.pageIndex = num;
184
       this.pageIndex = num;
165
     }
185
     }
@@ -170,12 +190,24 @@ export class OrderStatisticsComponent implements OnInit {
170
       endTime: this.searchData.dateRange.end,
190
       endTime: this.searchData.dateRange.end,
171
       hosId: this.searchData.hosId,
191
       hosId: this.searchData.hosId,
172
       type: this.dateType,
192
       type: this.dateType,
193
+			sort:null
173
     };
194
     };
195
+		if (field && sort) {
196
+		  postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
197
+		}
174
     this.loading1 = true;
198
     this.loading1 = true;
175
     this.mainService
199
     this.mainService
176
       .postCustom("report", "workOrder", postData)
200
       .postCustom("report", "workOrder", postData)
177
       .subscribe((result) => {
201
       .subscribe((result) => {
178
         this.loading1 = false;
202
         this.loading1 = false;
203
+				let header = result.heads
204
+				if(!type){
205
+					for(let i in header){
206
+						header[i].dataSort = 'data'+i
207
+						header[i].sortName = null
208
+					}
209
+					this.listOfHeads = header || [];
210
+				}
179
         this.listOfData = result.list || [];
211
         this.listOfData = result.list || [];
180
         this.listLength = result.totalNum;
212
         this.listLength = result.totalNum;
181
       });
213
       });

+ 34 - 4
src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.html

@@ -65,10 +65,40 @@
65
         <button nz-button class="btn default ml8" (click)='exportDetail()' [nzLoading]="loading3" [disabled]="!checkedDepIds.length">批量导出详细科室报表</button>
65
         <button nz-button class="btn default ml8" (click)='exportDetail()' [nzLoading]="loading3" [disabled]="!checkedDepIds.length">批量导出详细科室报表</button>
66
       </div>
66
       </div>
67
     </div>
67
     </div>
68
+		<div class="cont">
69
+		  <div>
70
+		    <span>总计</span>
71
+		    <span class="rate"></span>
72
+		  </div>
73
+		  <div>
74
+		    <span>科室数</span>
75
+		    <span>{{summary.deptNum || 0}}</span>
76
+		  </div>
77
+		  <div>
78
+		    <span>送回被服种类数</span>
79
+		    <span>{{summary.clothesTypeTotalNum || 0}}</span>
80
+		  </div>
81
+		  <div>
82
+		    <span>回收单数</span>
83
+		    <span>{{summary.getOrderTotal || 0}}</span>
84
+		  </div>
85
+		  <div>
86
+		    <span>送回单数</span>
87
+		    <span>{{summary.sendOrderTotal || 0}}</span>
88
+		  </div>
89
+		  <div>
90
+		    <span>洗涤被服数量</span>
91
+		    <span>{{summary.sendClothesTotalNum || 0}}</span>
92
+		  </div>
93
+		  <div>
94
+		    <span>总费用</span>
95
+		    <span>{{summary.totalPrice || 0}}</span>
96
+		  </div>
97
+		</div>
68
     <div class="list-template__bottom">
98
     <div class="list-template__bottom">
69
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
99
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
70
         [nzLoading]="loading1">
100
         [nzLoading]="loading1">
71
-        <thead (nzSortChange)="sort($event)" nzSingleSort>
101
+        <thead nzSingleSort>
72
           <tr class="thead">
102
           <tr class="thead">
73
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
103
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
74
               (nzCheckedChange)="checkAll($event)"></th>
104
               (nzCheckedChange)="checkAll($event)"></th>
@@ -79,11 +109,11 @@
79
             <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回单数</th>
109
             <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回单数</th>
80
             <th nzShowSort nzWidth="15%" nzSortKey="sendClothesNum" [(nzSort)]="sortCurrent.sendClothesNum">洗涤被服数量</th>
110
             <th nzShowSort nzWidth="15%" nzSortKey="sendClothesNum" [(nzSort)]="sortCurrent.sendClothesNum">洗涤被服数量</th>
81
             <th nzShowSort nzWidth="15%" nzSortKey="price" [(nzSort)]="sortCurrent.price">费用(元)</th> -->
111
             <th nzShowSort nzWidth="15%" nzSortKey="price" [(nzSort)]="sortCurrent.price">费用(元)</th> -->
82
-            <th nzWidth="15%">送回被服种类数</th>
112
+            <th nzWidth="15%" nzShowSort nzSortKey="clothesTypeNum" [(nzSort)]="sortCurrent.clothesTypeNum" (nzSortChange)="sort('clothesTypeNum',$event)">送回被服种类数</th>
83
             <th nzWidth="15%">回收单数</th>
113
             <th nzWidth="15%">回收单数</th>
84
             <th nzWidth="15%">送回单数</th>
114
             <th nzWidth="15%">送回单数</th>
85
-            <th nzWidth="15%">洗涤被服数量</th>
86
-            <th nzWidth="15%">费用(元)</th>
115
+            <th nzWidth="15%" nzShowSort nzSortKey="sendBackNum" [(nzSort)]="sortCurrent.sendBackNum" (nzSortChange)="sort('sendBackNum',$event)">洗涤被服数量</th>
116
+            <th nzWidth="15%" nzShowSort nzSortKey="totalPrice" [(nzSort)]="sortCurrent.totalPrice" (nzSortChange)="sort('totalPrice',$event)">费用(元)</th>
87
           </tr>
117
           </tr>
88
         </thead>
118
         </thead>
89
         <tbody>
119
         <tbody>

+ 49 - 0
src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 20 - 21
src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.ts

@@ -221,10 +221,8 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
221
     this.sortCurrentValue = "";
221
     this.sortCurrentValue = "";
222
     this.sortCurrent = {
222
     this.sortCurrent = {
223
       clothesTypeNum: null,
223
       clothesTypeNum: null,
224
-      getOrder: null,
225
-      sendOrder: null,
226
-      sendClothesNum: null,
227
-      price: null,
224
+      sendBackNum: null,
225
+			totalPrice: null,
228
     };
226
     };
229
     this.searchDto = {
227
     this.searchDto = {
230
       dept: null,
228
       dept: null,
@@ -260,8 +258,24 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
260
     });
258
     });
261
     this.refreshStatus();
259
     this.refreshStatus();
262
   }
260
   }
261
+	
262
+	// 列表排序
263
+	sortCurrent = {
264
+		clothesTypeNum: null,
265
+		sendBackNum: null,
266
+		totalPrice: null,
267
+	};
268
+	sortCurrentKey: string = "";
269
+	sortCurrentValue: string | null = "";
270
+	sort(name,e) {
271
+		this.sortCurrentKey = name;
272
+		this.sortCurrentValue = e || '';
273
+		this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
274
+	}
275
+	
263
   // 表格数据
276
   // 表格数据
264
   loading1 = false;
277
   loading1 = false;
278
+	summary = {};
265
   getList(num?: number, field?: string, sort?: string) {
279
   getList(num?: number, field?: string, sort?: string) {
266
     this.mapOfCheckedId = {};
280
     this.mapOfCheckedId = {};
267
     this.checkedDepIds = [];
281
     this.checkedDepIds = [];
@@ -278,13 +292,14 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
278
       buildingId: this.searchDto.building || undefined,
292
       buildingId: this.searchDto.building || undefined,
279
     };
293
     };
280
     if (field && sort) {
294
     if (field && sort) {
281
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
295
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
282
     }
296
     }
283
     this.loading1 = true;
297
     this.loading1 = true;
284
     this.mainService
298
     this.mainService
285
       .postCustom("report/clothes", "dept", postData)
299
       .postCustom("report/clothes", "dept", postData)
286
       .subscribe((result) => {
300
       .subscribe((result) => {
287
         this.loading1 = false;
301
         this.loading1 = false;
302
+				this.summary = result.summary || {}
288
         this.listOfData = result.list || [];
303
         this.listOfData = result.list || [];
289
         this.listLength = result.totalNum;
304
         this.listLength = result.totalNum;
290
       });
305
       });
@@ -590,20 +605,4 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
590
     this.isLoading = true;
605
     this.isLoading = true;
591
     this.searchTimerSubject.next([fun, e]);
606
     this.searchTimerSubject.next([fun, e]);
592
   }
607
   }
593
-  // 列表排序
594
-  sortCurrent = {
595
-    clothesTypeNum: null,
596
-    getOrder: null,
597
-    sendOrder: null,
598
-    sendClothesNum: null,
599
-    price: null,
600
-  };
601
-  sortCurrentKey: string = "";
602
-  sortCurrentValue: string | null = "";
603
-  sort(e) {
604
-    const { key, value } = e;
605
-    this.sortCurrentKey = key;
606
-    this.sortCurrentValue = value;
607
-    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
608
-  }
609
 }
608
 }

+ 30 - 0
src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.html

@@ -40,6 +40,36 @@
40
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
40
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
41
       </div>
41
       </div>
42
     </div>
42
     </div>
43
+		<div class="cont">
44
+		  <div>
45
+		    <span>总计</span>
46
+		    <span class="rate"></span>
47
+		  </div>
48
+		  <div>
49
+		    <span>送回科室数</span>
50
+		    <span>{{summary.deptNum || 0}}</span>
51
+		  </div>
52
+		  <div>
53
+		    <span>送回被服种类数</span>
54
+		    <span>{{summary.clothesTypeTotalNum || 0}}</span>
55
+		  </div>
56
+		  <div>
57
+		    <span>回收工单数</span>
58
+		    <span>{{summary.getOrderTotal || 0}}</span>
59
+		  </div>
60
+		  <div>
61
+		    <span>送回工单数</span>
62
+		    <span>{{summary.sendOrderTotal || 0}}</span>
63
+		  </div>
64
+		  <div>
65
+		    <span>洗涤数量</span>
66
+		    <span>{{summary.sendClothesTotalNum || 0}}</span>
67
+		  </div>
68
+		  <div>
69
+		    <span>总费用</span>
70
+		    <span>{{summary.totalPrice || 0}}</span>
71
+		  </div>
72
+		</div>
43
     <div class="list-template__bottom">
73
     <div class="list-template__bottom">
44
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
74
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
45
         [nzLoading]="loading1">
75
         [nzLoading]="loading1">

+ 49 - 0
src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 2 - 0
src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.ts

@@ -168,6 +168,7 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
168
   }
168
   }
169
   // 表格数据
169
   // 表格数据
170
   loading1 = false;
170
   loading1 = false;
171
+	summary = {};
171
   getList(num?: number, field?: string, sort?: string) {
172
   getList(num?: number, field?: string, sort?: string) {
172
     this.pageIndex = num;
173
     this.pageIndex = num;
173
     let postData: any = {
174
     let postData: any = {
@@ -186,6 +187,7 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
186
       .postCustom("report/clothes", "hospital", postData)
187
       .postCustom("report/clothes", "hospital", postData)
187
       .subscribe((result) => {
188
       .subscribe((result) => {
188
         this.loading1 = false;
189
         this.loading1 = false;
190
+				this.summary = result.summary || {}
189
         this.listOfData = result.list || [];
191
         this.listOfData = result.list || [];
190
         this.listLength = result.totalNum;
192
         this.listLength = result.totalNum;
191
       });
193
       });

+ 38 - 4
src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.html

@@ -58,21 +58,55 @@
58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
59
       </div>
59
       </div>
60
     </div>
60
     </div>
61
+		<div class="cont">
62
+		  <div>
63
+		    <span>总计</span>
64
+		    <span class="rate"></span>
65
+		  </div>
66
+		  <div>
67
+		    <span>人员数量</span>
68
+		    <span>{{summary.personTotal || 0}}</span>
69
+		  </div>
70
+		  <div>
71
+		    <span>总趟数</span>
72
+		    <span>{{summary.tripTotal || 0}}</span>
73
+		  </div>
74
+		  <div>
75
+		    <span>总单数</span>
76
+		    <span>{{summary.orderTotal || 0}}</span>
77
+		  </div>
78
+		  <div>
79
+		    <span>回收趟数</span>
80
+		    <span>{{summary.getTripTotal || 0}}</span>
81
+		  </div>
82
+		  <div>
83
+		    <span>回收工单数</span>
84
+		    <span>{{summary.getOrderTotal || 0}}</span>
85
+		  </div>
86
+		  <div>
87
+		    <span>送回趟数</span>
88
+		    <span>{{summary.sendTripTotal || 0}}</span>
89
+		  </div>
90
+		  <div>
91
+		    <span>送回工单数</span>
92
+		    <span>{{summary.sendorderTotal || 0}}</span>
93
+		  </div>
94
+		</div>
61
     <div class="list-template__bottom">
95
     <div class="list-template__bottom">
62
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
96
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
63
         [nzLoading]="loading1">
97
         [nzLoading]="loading1">
64
-        <thead (nzSortChange)="sort($event)" nzSingleSort>
98
+        <thead>
65
           <tr class="thead">
99
           <tr class="thead">
66
             <th nzWidth="5%">序号</th>
100
             <th nzWidth="5%">序号</th>
67
-            <th nzWidth="5%">人员姓名</th>
101
+            <th nzWidth="10%">人员姓名</th>
68
             <!-- <th nzShowSort nzWidth="15%" nzSortKey="totalTrip" [(nzSort)]="sortCurrent.totalTrip">总趟数</th>
102
             <!-- <th nzShowSort nzWidth="15%" nzSortKey="totalTrip" [(nzSort)]="sortCurrent.totalTrip">总趟数</th>
69
             <th nzShowSort nzWidth="15%" nzSortKey="totalOrder" [(nzSort)]="sortCurrent.totalOrder">总单数</th>
103
             <th nzShowSort nzWidth="15%" nzSortKey="totalOrder" [(nzSort)]="sortCurrent.totalOrder">总单数</th>
70
             <th nzShowSort nzWidth="15%" nzSortKey="getTrip" [(nzSort)]="sortCurrent.getTrip">回收趟数</th>
104
             <th nzShowSort nzWidth="15%" nzSortKey="getTrip" [(nzSort)]="sortCurrent.getTrip">回收趟数</th>
71
             <th nzShowSort nzWidth="15%" nzSortKey="getOrder" [(nzSort)]="sortCurrent.getOrder">回收工单数</th>
105
             <th nzShowSort nzWidth="15%" nzSortKey="getOrder" [(nzSort)]="sortCurrent.getOrder">回收工单数</th>
72
             <th nzShowSort nzWidth="15%" nzSortKey="sendTrip" [(nzSort)]="sortCurrent.sendTrip">送回趟数</th>
106
             <th nzShowSort nzWidth="15%" nzSortKey="sendTrip" [(nzSort)]="sortCurrent.sendTrip">送回趟数</th>
73
             <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回工单数</th> -->
107
             <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回工单数</th> -->
74
-            <th nzWidth="15%">总趟数</th>
75
-            <th nzWidth="15%">总单数</th>
108
+            <th nzWidth="15%" nzShowSort nzSortKey="totalTrip" [(nzSort)]="sortCurrent.totalTrip" (nzSortChange)="sort('totalTrip',$event)">总趟数</th>
109
+            <th nzWidth="15%" nzShowSort nzSortKey=" totalOrder" [(nzSort)]="sortCurrent. totalOrder" (nzSortChange)="sort('totalOrder',$event)">总单数</th>
76
             <th nzWidth="15%">回收趟数</th>
110
             <th nzWidth="15%">回收趟数</th>
77
             <th nzWidth="15%">回收工单数</th>
111
             <th nzWidth="15%">回收工单数</th>
78
             <th nzWidth="15%">送回趟数</th>
112
             <th nzWidth="15%">送回趟数</th>

+ 49 - 0
src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.less

@@ -4,6 +4,55 @@
4
   color: #fff !important;
4
   color: #fff !important;
5
 }
5
 }
6
 
6
 
7
+.cont {
8
+  width: 100%;
9
+  border: 1px solid #dde1e5;
10
+  padding: 8px 16px;
11
+  border-radius: 2px;
12
+  margin-bottom: 8px;
13
+
14
+  &>div {
15
+    display: inline-block;
16
+    margin-right: 4px;
17
+
18
+    &:nth-child(1) {
19
+      position: relative;
20
+      padding-left: 10px;
21
+
22
+      &::before {
23
+        content: '';
24
+        position: absolute;
25
+        left: 0;
26
+        width: 4px;
27
+        height: 100%;
28
+        background: @primary-color;
29
+        margin-right: 8px;
30
+      }
31
+    }
32
+
33
+    span {
34
+      margin-right: 8px;
35
+
36
+      &:nth-child(1) {
37
+        font-size: 12px;
38
+        color: #999;
39
+      }
40
+
41
+      &:nth-child(2) {
42
+        color: #333;
43
+        font-weight: 500;
44
+      }
45
+
46
+      &.rate {
47
+        font-size: 18px;
48
+        color: @primary-color;
49
+      }
50
+    }
51
+
52
+
53
+  }
54
+}
55
+
7
 .save {
56
 .save {
8
   position: fixed;
57
   position: fixed;
9
   left: 0;
58
   left: 0;

+ 16 - 23
src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.ts

@@ -214,10 +214,6 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
214
     this.sortCurrent = {
214
     this.sortCurrent = {
215
       totalTrip: null,
215
       totalTrip: null,
216
       totalOrder: null,
216
       totalOrder: null,
217
-      getTrip: null,
218
-      getOrder: null,
219
-      sendTrip: null,
220
-      sendOrder: null,
221
     };
217
     };
222
     this.searchDto = {
218
     this.searchDto = {
223
       group: null,
219
       group: null,
@@ -225,8 +221,21 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
225
     }
221
     }
226
     this.changeDateType("day");
222
     this.changeDateType("day");
227
   }
223
   }
224
+	// 列表排序
225
+	sortCurrent = {
226
+		totalTrip: null,
227
+		totalOrder: null,
228
+	};
229
+	sortCurrentKey: string = "";
230
+	sortCurrentValue: string | null = "";
231
+	sort(name,e) {
232
+		this.sortCurrentKey = name;
233
+		this.sortCurrentValue = e || '';
234
+		this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
235
+	}
228
   // 表格数据
236
   // 表格数据
229
   loading1 = false;
237
   loading1 = false;
238
+	summary = {};
230
   getList(num?: number, field?: string, sort?: string) {
239
   getList(num?: number, field?: string, sort?: string) {
231
     this.pageIndex = num;
240
     this.pageIndex = num;
232
     let postData: any = {
241
     let postData: any = {
@@ -237,16 +246,17 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
237
       hosId: this.searchData.hosId,
246
       hosId: this.searchData.hosId,
238
       type: this.dateType,
247
       type: this.dateType,
239
       userId: this.searchDto.user || undefined,
248
       userId: this.searchDto.user || undefined,
240
-      groupId: this.searchDto.group || undefined,
249
+      groupId: this.searchDto.group || undefined
241
     };
250
     };
242
     if (field && sort) {
251
     if (field && sort) {
243
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
252
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
244
     }
253
     }
245
     this.loading1 = true;
254
     this.loading1 = true;
246
     this.mainService
255
     this.mainService
247
       .postCustom("report/clothes", "personal", postData)
256
       .postCustom("report/clothes", "personal", postData)
248
       .subscribe((result) => {
257
       .subscribe((result) => {
249
         this.loading1 = false;
258
         this.loading1 = false;
259
+				this.summary = result.summary || {}
250
         this.listOfData = result.list || [];
260
         this.listOfData = result.list || [];
251
         this.listLength = result.totalNum;
261
         this.listLength = result.totalNum;
252
       });
262
       });
@@ -500,21 +510,4 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
500
     this.isLoading = true;
510
     this.isLoading = true;
501
     this.searchTimerSubject.next([fun, e]);
511
     this.searchTimerSubject.next([fun, e]);
502
   }
512
   }
503
-  // 列表排序
504
-  sortCurrent = {
505
-    totalTrip: null,
506
-    totalOrder: null,
507
-    getTrip: null,
508
-    getOrder: null,
509
-    sendTrip: null,
510
-    sendOrder: null,
511
-  };
512
-  sortCurrentKey: string = "";
513
-  sortCurrentValue: string | null = "";
514
-  sort(e) {
515
-    const { key, value } = e;
516
-    this.sortCurrentKey = key;
517
-    this.sortCurrentValue = value;
518
-    this.getList(this.pageIndex, this.sortCurrentKey, this.sortCurrentValue);
519
-  }
520
 }
513
 }

+ 1 - 4
src/app/views/worker-statistics/worker-statistics.component.html

@@ -75,12 +75,9 @@
75
             <th nzWidth="8%">姓名</th>
75
             <th nzWidth="8%">姓名</th>
76
             <th nzWidth="8%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">工单总数</th>
76
             <th nzWidth="8%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">工单总数</th>
77
             <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
77
             <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
78
-            <!-- <th nzWidth="8%"></th> -->
79
             <th nzWidth="16%">平均到达时长<br>平均完成时长</th>
78
             <th nzWidth="16%">平均到达时长<br>平均完成时长</th>
80
-            <!-- <th nzWidth="8%"></th> -->
81
-            <th nzWidth="8%">按时完成达标率</th>
79
+            <th nzWidth="8%" nzShowSort nzSortKey="completionRate" [(nzSort)]="sortCurrent.completionRate">按时完成达标率</th>
82
             <th nzWidth="8%">楼栋分<br>陪检方式分</th>
80
             <th nzWidth="8%">楼栋分<br>陪检方式分</th>
83
-            <!-- <th nzWidth="8%"></th> -->
84
             <th nzWidth="16%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">总积分</th>
81
             <th nzWidth="16%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">总积分</th>
85
             <th nzWidth="15%">操作</th>
82
             <th nzWidth="15%">操作</th>
86
           </tr>
83
           </tr>

+ 9 - 1
src/app/views/worker-statistics/worker-statistics.component.ts

@@ -167,9 +167,16 @@ export class WorkerStatisticsComponent implements OnInit {
167
   }
167
   }
168
   // 重置
168
   // 重置
169
   reset() {
169
   reset() {
170
+		this.sortCurrentKey = "";
171
+		this.sortCurrentValue = "";
172
+		this.sortCurrent = {
173
+		  byOrderNum: null,
174
+		  byIntegral: null,
175
+			completionRate: null,
176
+		};
170
     this.changeDateRange("1");
177
     this.changeDateRange("1");
171
     this.group = 0;
178
     this.group = 0;
172
-    // this.search();
179
+    // this.getList();
173
   }
180
   }
174
   // 表格数据
181
   // 表格数据
175
   loading1 = false;
182
   loading1 = false;
@@ -203,6 +210,7 @@ export class WorkerStatisticsComponent implements OnInit {
203
   sortCurrent = {
210
   sortCurrent = {
204
     byOrderNum: null,
211
     byOrderNum: null,
205
     byIntegral: null,
212
     byIntegral: null,
213
+		completionRate: null,
206
   };
214
   };
207
   sortCurrentKey: string = "";
215
   sortCurrentKey: string = "";
208
   sortCurrentValue: string | null = "";
216
   sortCurrentValue: string | null = "";