seimin 8 місяців тому
батько
коміт
5e5b6945ef
36 змінених файлів з 1092 додано та 620 видалено
  1. 6 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. 8 21
      src/app/views/dept-statistics/dept-statistics.component.html
  7. 36 1
      src/app/views/dept-statistics/dept-statistics.component.ts
  8. 49 30
      src/app/views/dispensing-batch/dispensing-batch.component.html
  9. 51 337
      src/app/views/dispensing-batch/dispensing-batch.component.ts
  10. 36 26
      src/app/views/dispensing-detail/dispensing-detail.component.html
  11. 34 4
      src/app/views/dispensing-detail/dispensing-detail.component.less
  12. 98 28
      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. 25 22
      src/app/views/medical-waste-personnel-statistics/medical-waste-personnel-statistics.component.ts
  23. 1 1
      src/app/views/office-detail/office-detail.component.ts
  24. 8 19
      src/app/views/order-statistics/order-statistics.component.html
  25. 33 1
      src/app/views/order-statistics/order-statistics.component.ts
  26. 34 4
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.html
  27. 49 0
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.less
  28. 27 21
      src/app/views/quilt-washing-department-statistics/quilt-washing-department-statistics.component.ts
  29. 30 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.html
  30. 49 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.less
  31. 9 0
      src/app/views/quilt-washing-hospital-statistics/quilt-washing-hospital-statistics.component.ts
  32. 38 4
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.html
  33. 49 0
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.less
  34. 24 23
      src/app/views/quilt-washing-personnel-statistics/quilt-washing-personnel-statistics.component.ts
  35. 1 4
      src/app/views/worker-statistics/worker-statistics.component.html
  36. 9 1
      src/app/views/worker-statistics/worker-statistics.component.ts

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

@@ -839,5 +839,11 @@ export class MainService {
839 839
 	    headers: this.headers,
840 840
 	  });
841 841
 	}
842
+	// 发药批次-配置科室数据
843
+	getConsumeDept(data): any {
844
+	  return this.http.post(host.host + "/infusion/solutions/getConsumeDept", data, {
845
+	    headers: this.headers,
846
+	  });
847
+	}
842 848
 
843 849
 }

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

@@ -117,11 +117,6 @@
117 117
               </tr>
118 118
             </tbody>
119 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 120
         </div>
126 121
       </overlay-scrollbars>
127 122
       <div class="display_flex justify-content_flex-center">
@@ -146,65 +141,79 @@
146 141
 				border-radius: 5px;">
147 142
 			<div class="monad-title" 
148 143
 				style="text-align: center;
149
-				font-weight: 700;
150
-				font-size: 16px;
144
+				font-size: 18px;
151 145
 				border-bottom: 1px solid #e7e7e7;
152 146
 				padding-bottom: 10px;">
153 147
 				大输液发药单-{{rowData.applyDeptDTO?rowData.applyDeptDTO.dept:''}}
154 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 150
 				<div style="margin-right: 15px;">日期:{{rowData.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
157 151
 				<div style="margin-right: 15px;">批次号:{{rowData.batch?rowData.batch.batchNo:'-'}}</div>
158 152
 				<div style="margin-right: 15px;">单号:{{rowData.packingNo}}</div>
159 153
 			</div>
160 154
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
161 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 158
 					border-right: 1px solid #e7e7e7;
165 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 163
 					border-right: 1px solid #e7e7e7;
170 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 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 178
 					border-right: 1px solid #e7e7e7;
180 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 183
 				</div>
185 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 187
 					border-right: 1px solid #e7e7e7;
189 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 192
 					border-right: 1px solid #e7e7e7;
194 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 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 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 217
 				</div>
209 218
 			</div>
210 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 848
 						drugName:'合计',
849 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 853
 					deptName:''
854 854
 				})
855 855
         that.codes = arr

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

@@ -24,6 +24,18 @@
24 24
            </nz-option>
25 25
          </nz-select>
26 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 39
       </div>
28 40
       <!-- 自动建单配置 -->
29 41
       <div *ngIf="tabModalName=='automaticOrderCreation'">
@@ -32,6 +44,13 @@
32 44
           <nz-form-label class="label">自动建单</nz-form-label>
33 45
           <nz-checkbox-group [(ngModel)]="autoCreateOrders"></nz-checkbox-group>
34 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 54
       </div>
36 55
       <div class="bottom">
37 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 4
 import { NzMessageService } from 'ng-zorro-antd';
5 5
 import { Subject } from 'rxjs';
6 6
 import { debounceTime } from 'rxjs/operators';
7
+import { format, startOfMinute } from 'date-fns';
7 8
 
8 9
 @Component({
9 10
   selector: "app-big-transfusion-set",
@@ -18,6 +19,7 @@ export class BigTransfusionSetComponent implements OnInit {
18 19
   hosId = this.tool.getCurrentHospital().id; //当前院区
19 20
   // 接手术关联任务类型
20 21
   infusionSolutionsTypeId:Number;
22
+	pharmacyDept:''; //默认发药科室
21 23
   taskTypes1:any[] = [];
22 24
   taskTypeData:{id:''};
23 25
   // 苏醒室科室
@@ -27,6 +29,17 @@ export class BigTransfusionSetComponent implements OnInit {
27 29
   autoCreateOrders:any[] = [
28 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 44
   autoSendWard:any[] = [
32 45
     {label:'是否开启',value: 0}
@@ -56,6 +69,7 @@ export class BigTransfusionSetComponent implements OnInit {
56 69
 	editId:'';
57 70
 	targetData:any = [];
58 71
 	stateData:any = [];
72
+	hospitals:any = [];
59 73
 	// 间隔时间数据
60 74
 	timeData:any[] = [
61 75
 	  {label:'10',value: 10},
@@ -66,6 +80,7 @@ export class BigTransfusionSetComponent implements OnInit {
66 80
   // 配置
67 81
   configs:any = {};
68 82
   searchTimerSubject = new Subject();
83
+	searchParentDeptSubject = new Subject();
69 84
   constructor(private mainService: MainService,private tool: ToolService,private msg: NzMessageService) {}
70 85
 
71 86
   ngOnInit():void {
@@ -74,7 +89,14 @@ export class BigTransfusionSetComponent implements OnInit {
74 89
       let fun = v[0];
75 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 102
   // 切换tab
@@ -93,6 +115,10 @@ export class BigTransfusionSetComponent implements OnInit {
93 115
 			taskType:this.taskTypeData.id,
94 116
 			hosId: this.hosId,
95 117
 			infusionSolutionsTypeId:this.infusionSolutionsTypeId, //任务类型参数
118
+			pharmacyDept:this.pharmacyDept,//默认发药科室
119
+			timingOrder:0,//定时建单
120
+			printOrder:0,// 打印并建单
121
+			executeTime:'',// 定时建单-选择时分
96 122
 			autoCreate:0
97 123
     };
98 124
 		if(this.editId){
@@ -100,11 +126,27 @@ export class BigTransfusionSetComponent implements OnInit {
100 126
 		}else{
101 127
 			delete editData.id 
102 128
 		}
129
+		
103 130
 		if(this.autoCreateOrders[0].checked){
104 131
 			editData.autoCreate = 1
105 132
 		}else{
106 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 150
     this.btnLoading = true;
109 151
     this.mainService
110 152
       .simplePost("addData", "taskTypeConfig", editData)
@@ -128,10 +170,15 @@ export class BigTransfusionSetComponent implements OnInit {
128 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 179
   // 1 患者其他服务
133 180
   // 2 其他临床服务
134
-  getTaskTypes(e:string = '', isFirst:boolean = false) {
181
+  getTaskTypes(e:string = '', isFirst:boolean = false, type) {
135 182
     isFirst && (this.loading = true);
136 183
     let postData:any = {
137 184
       idx: 0,
@@ -155,7 +202,9 @@ export class BigTransfusionSetComponent implements OnInit {
155 202
         this.isLoading = false;
156 203
         if (result.status == 200) {
157 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 258
   getConfig() {
173 259
     this.loading = true;
@@ -188,6 +274,13 @@ export class BigTransfusionSetComponent implements OnInit {
188 274
 					this.editId = data.id
189 275
 					this.autoCreateOrders[0].checked = data.autoCreate == 1;
190 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
   }

+ 8 - 21
src/app/views/dept-statistics/dept-statistics.component.html

@@ -27,37 +27,24 @@
27 27
         <thead>
28 28
           <tr class="thead">
29 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 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 nzShowSort nzSortKey="other" [(nzSort)]="sortCurrent.other" (nzSortChange)="sort('other',$event)">其他数量</th>
40 36
           </tr>
41 37
         </thead>
42 38
         <tbody>
43 39
           <tr *ngFor="let data of listOfData;let index=index;">
44 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 42
           </tr>
56 43
         </tbody>
57 44
       </nz-table>
58 45
       <div class="list-template__pagination">
59 46
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
60
-          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
47
+          (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue,'forbid')" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue,'forbid')">
61 48
         </nz-pagination>
62 49
       </div>
63 50
     </div>

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

@@ -132,11 +132,33 @@ export class DeptStatisticsComponent implements OnInit {
132 132
   // 重置
133 133
   reset() {
134 134
     this.changeDateRange("1");
135
+		this.sortCurrent = {
136
+		  bid: null,
137
+		  total: null,
138
+			other: null,
139
+		};
135 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 159
   loading1 = false;
139
-  getList(num?: number) {
160
+	listOfHeads = [];
161
+  getList(num?: number, field?: string, sort?: string, type?: string) {
140 162
     if (num !== undefined) {
141 163
       this.pageIndex = num;
142 164
     }
@@ -146,12 +168,25 @@ export class DeptStatisticsComponent implements OnInit {
146 168
       startTime: this.searchData.dateRange.start,
147 169
       endTime: this.searchData.dateRange.end,
148 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 176
     this.loading1 = true;
151 177
     this.mainService
152 178
       .postCustom("report", "dept", postData)
153 179
       .subscribe((result) => {
154 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 190
         this.listOfData = result.list || [];
156 191
         this.listLength = result.totalNum;
157 192
       });

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

@@ -101,6 +101,14 @@
101 101
        			</nz-input-group>
102 102
        	  </nz-form-control>
103 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 112
        </form>
105 113
       </overlay-scrollbars>
106 114
       <div class="display_flex justify-content_flex-center">
@@ -125,65 +133,80 @@
125 133
 				border-radius: 5px;margin-bottom: 40px;">
126 134
 			<div class="monad-title" 
127 135
 				style="text-align: center;
128
-				font-weight: 700;
129
-				font-size: 16px;
136
+				font-size: 18px;
130 137
 				border-bottom: 1px solid #e7e7e7;
131 138
 				padding-bottom: 10px;">
132 139
 				大输液发药单-{{item.applyDeptDTO.dept}}
133 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 142
 				<div style="margin-right: 15px;">日期:{{item.createTime|date:'yyyy-MM-dd HH:mm'}}</div>
136 143
 				<div style="margin-right: 15px;">批次号:{{item.batch.batchNo}}</div>
137 144
 				<div style="margin-right: 15px;">单号:{{item.packingNo}}</div>
138 145
 			</div>
139 146
 			<div style="border: 1px solid #e7e7e7;border-bottom: none;font-size: 14px;">
140 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 150
 					border-right: 1px solid #e7e7e7;
144 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 155
 					border-right: 1px solid #e7e7e7;
149 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 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 170
 					border-right: 1px solid #e7e7e7;
159 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 175
 				</div>
164 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 179
 					border-right: 1px solid #e7e7e7;
168 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 184
 					border-right: 1px solid #e7e7e7;
173 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 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 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.giveOutType.value==1 ? data.actualCount :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 210
 				</div>
188 211
 			</div>
189 212
 		</div>
@@ -197,7 +220,3 @@
197 220
  <!-- 模态框 -->
198 221
 <app-dialog-delete [delModal]="printModal" (hideDelModalEvent)="hidePrintModal()" [btnLoading]="btnLoading"
199 222
   (confirmDelEvent)="confirmPrintDel()" [content]="'您确认发药并打印吗?打印同时会更新云库存并建立配送工单?'"></app-dialog-delete>
200
-		
201
-<!-- 遮罩 -->
202
-<app-mask *ngIf="maskFlag"></app-mask>
203
-<app-excel-import [isShow]="isShow" (hideFormHand)="hideExcelImport($event)" *ngIf="isShow" (submitFormHand)="submitExcelImport($event)"></app-excel-import>

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

@@ -47,7 +47,6 @@ export class DispensingBatchComponent implements OnInit {
47 47
     this.coopBtns = this.tool.initCoopBtns(this.route);
48 48
     this.initForm();
49 49
     this.getAllHospital();
50
-    this.getType();
51 50
     this.getDeptHandoverType();
52 51
   }
53 52
   listOfData: any[] = []; //表格数据
@@ -62,6 +61,7 @@ export class DispensingBatchComponent implements OnInit {
62 61
   department: number; //所属科室
63 62
 	hosId: number; 
64 63
 	dateRange;//时间
64
+	loadAllConsumeDept: boolean = true;//是否加载所有消耗科室
65 65
   batchNumber; //批次号
66 66
   num; //编码
67 67
   deptalias; //别名
@@ -83,100 +83,14 @@ export class DispensingBatchComponent implements OnInit {
83 83
   // 初始化增删改按钮
84 84
   coopBtns: any = {};
85 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 88
   // 导入---end
162 89
   //搜索父级科室
163 90
 	isDeptLoading = false;
164 91
   changeInp(e) {
165 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 95
   coopData:any = {};
182 96
   addDateModal(data) {
@@ -204,7 +118,8 @@ export class DispensingBatchComponent implements OnInit {
204 118
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
205 119
 			hosId:this.hosId,
206 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 124
 		that.saveLoading = true;
210 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 141
   search() {
@@ -369,108 +242,6 @@ export class DispensingBatchComponent implements OnInit {
369 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 246
   deptHandoverTypes: Array<any> = [];
476 247
   getDeptHandoverType() {
@@ -480,13 +251,42 @@ export class DispensingBatchComponent implements OnInit {
480 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 287
   showModal() {
486 288
     this.initForm();
487
-    this.add = true;
488
-		this.modal = true;
489
-    this.isAddDeptsPhone = true;
289
+		this.getTaskTypesId()
490 290
   }
491 291
   hideModal() {
492 292
     this.coopItem = null;
@@ -499,80 +299,15 @@ export class DispensingBatchComponent implements OnInit {
499 299
   initForm() {
500 300
     this.validateForm = this.fb.group({
501 301
       dispensingTime: [null, [Validators.required]],
502
-      department: [null, [Validators.required]]
302
+      department: [null, [Validators.required]],
303
+			loadAllConsumeDept: [true,[]]
503 304
     });
504 305
 		let date = new Date();
505 306
 		this.loadStartTime = format(subDays(date, 1), "yyyy-MM-dd") +' '+'08:00:00'
506 307
 		this.loadEndTime = format(date, "yyyy-MM-dd") +' '+'08:00:00'
507 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 312
   submitForm(): void {
578 313
     var that = this;
@@ -585,7 +320,8 @@ export class DispensingBatchComponent implements OnInit {
585 320
 			startTime:this.formStartDate?this.formStartDate:this.loadStartTime,//发起时间开始
586 321
 			endTime:this.formEndDate?this.formEndDate:this.loadEndTime,//发起时间结束
587 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 327
     if (!that.add) {
@@ -616,8 +352,14 @@ export class DispensingBatchComponent implements OnInit {
616 352
     this.coopItem = data;
617 353
     this.validateForm.controls.department.setValue(data.pharmacy);
618 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 360
 		this.loadStartTime = data.startTime
620 361
 		this.loadEndTime = data.endTime
362
+		console.log(11,this.validateForm.value)
621 363
 		this.modal = true
622 364
   }
623 365
 
@@ -676,34 +418,6 @@ export class DispensingBatchComponent implements OnInit {
676 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 422
 	printData = []; 
709 423
 	print(e, data, id){
@@ -724,8 +438,8 @@ export class DispensingBatchComponent implements OnInit {
724 438
 							drugName:'合计',
725 439
 							specs:'',
726 440
 						},
727
-						actualCount:i.totalActual,
728
-						cartonNum:i.totalCarton,
441
+						expendCount:i.totalExpendCount,
442
+						addSub:i.totalAddSub,
729 443
 						deptName:''
730 444
 					})
731 445
 				}
@@ -735,7 +449,7 @@ export class DispensingBatchComponent implements OnInit {
735 449
 				that.printModal = false;
736 450
 		    setTimeout(() => {
737 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 453
 		      WindowPrt.document.write(printContent.innerHTML);
740 454
 		      WindowPrt.document.close();
741 455
 		      WindowPrt.focus();

+ 36 - 26
src/app/views/dispensing-detail/dispensing-detail.component.html

@@ -2,42 +2,44 @@
2 2
   <div class="list-template__content">
3 3
 		<div class="detail-title">
4 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 6
 		</div>
7 7
     <div class="list-template__bottom" style="padding: 0 !important;">
8 8
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
9 9
         [nzLoading]="loading1">
10 10
         <thead>
11 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 22
           </tr>
24 23
         </thead>
25 24
         <tbody>
26 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 30
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.specs:'-' }}</td>
30 31
             <td>{{ data.expendCount||'0' }}</td>
31 32
             <td>{{ data.formerInventory || '0' }}</td>
32 33
             <td>{{ data.drugsInfoDTO?data.drugsInfoDTO.packingSpecs:'0' }}</td>
33
-						<td>{{ data.cartonNum||'0' }}</td>
34
+						<td>{{ data.cartonNum || 0 }}</td> 
34 35
 						<td>{{ data.actualCount||'0' }}</td>
35 36
 						<td>{{ data.afterInventory||'0' }}</td>
36 37
 						<td>{{ data.addSub||'0' }}</td>
37 38
             <td>
38 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, 'add')">增发</span>
41
+								<!-- <span (click)="itemClick($event, data, 'del')">减少</span> -->
42
+								<span (click)="grantClick($event, data)">{{data.giveOutType.value=='2'?'单发':'箱发'}}</span>
41 43
 							</div>
42 44
             </td>
43 45
           </tr>
@@ -50,7 +52,7 @@
50 52
 			<h3 class="title">快速添加发药科室</h3>
51 53
 			<div class="right-template">
52 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 56
 			    <ng-container *ngFor="let option of hospitals1">
55 57
 			      <nz-option *ngIf="!isDeptLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
56 58
 			    </ng-container>
@@ -87,27 +89,28 @@
87 89
   <!-- 增加/减少 -->
88 90
   <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
89 91
     <div class="modalBody">
90
-      <div class="title">{{add ? '增加' : '减少'}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
92
+      <div class="title">增发<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
91 93
       </div>
92 94
       <overlay-scrollbars #osComponentRef1 class="content">
93 95
        <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
94 96
        	<nz-form-item *ngIf="add">
95
-       	  <nz-form-label nzRequired nzFor="addNum">增加数量</nz-form-label>
96
-       	  <nz-form-control nzErrorTip="请选择增数量!">
97
+       	  <nz-form-label nzRequired nzFor="addNum">增发数量<span class="color-stylr"> (支持负数)</span></nz-form-label>
98
+       	  <nz-form-control nzErrorTip="请选择增数量!">
97 99
        	    <nz-input-group>
98 100
        				<nz-input-number
99 101
 								nz-input
100 102
        					formControlName="addNum"
101
-       					[nzMin]="0"
103
+       					[nzMin]="-999999"
102 104
        					[nzPrecision]="0"
103 105
        					[nzMax]="999999"
104 106
        					[nzStep]="1"
105
-       					[nzPlaceHolder]="'请填写增数量'"
107
+       					[nzPlaceHolder]="'请填写增数量'"
106 108
        				 ></nz-input-number>
107 109
        			</nz-input-group>
108 110
        	  </nz-form-control>
109 111
        	</nz-form-item>
110
-				<nz-form-item *ngIf="!add">
112
+				<div *ngIf="rowData.giveOutType.value=='2'" style="text-align: left;" [ngClass]="{'red': isRight == false, 'green': isRight == true}">(消耗数+原库存数 + 增发数量) / 包装规格 = 1 (计算后数量必须是整数) </div>
113
+		<!-- 		<nz-form-item *ngIf="!add">
111 114
 				  <nz-form-label nzRequired nzFor="delNum">减少数量</nz-form-label>
112 115
 				  <nz-form-control nzErrorTip="请选择减少数量!">
113 116
 				    <nz-input-group>
@@ -122,7 +125,7 @@
122 125
 							 ></nz-input-number>
123 126
 						</nz-input-group>
124 127
 				  </nz-form-control>
125
-				</nz-form-item>
128
+				</nz-form-item> -->
126 129
        </form>
127 130
       </overlay-scrollbars>
128 131
       <div class="display_flex justify-content_flex-center">
@@ -131,7 +134,9 @@
131 134
       </div>
132 135
     </div>
133 136
   </div>
134
-
137
+	<div class="mask-style" *ngIf="isSpinning">
138
+		<nz-spin nzSimple class="spin-style"></nz-spin>
139
+	</div>
135 140
 </div>
136 141
 <!-- 操作成功/失败提示框 -->
137 142
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
@@ -140,3 +145,8 @@
140 145
 <!-- 删除模态框 -->
141 146
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
142 147
     (confirmDelEvent)="confirmDel()" content="您确认要删除发药科室吗?"></app-dialog-delete>
148
+
149
+<!-- 单发/箱发 -->
150
+  <app-dialog-delete [delModal]="delGrantModal" (hideDelModalEvent)="hideGrantModal()" [btnLoading]="btnLoading"
151
+    (confirmDelEvent)="confirmGrantDel()" [content]="content"></app-dialog-delete>
152
+

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

@@ -61,8 +61,7 @@ h3{
61 61
 		border-radius: 5px;
62 62
 		border: 1px solid #e5e5e5;
63 63
 		.list-template__bottom{
64
-			height: auto;
65
-			max-height: 550px;
64
+			height: calc(100vh - 70px);
66 65
 			overflow-y: auto;
67 66
 		}
68 67
 	}
@@ -119,8 +118,7 @@ h3{
119 118
 			}
120 119
 			.dept-box{
121 120
 				margin-top: 20px;
122
-				height: auto;
123
-				max-height: 393px;
121
+				height: calc(100vh - 232px);
124 122
 				overflow-y: auto;
125 123
 				.dept-item{
126 124
 					display: flex;
@@ -334,6 +332,9 @@ h3{
334 332
 				}
335 333
 				
336 334
         .addForm {
335
+					.color-stylr{
336
+						color:red;
337
+					}
337 338
           .ant-form-item {
338 339
             margin-bottom: 14px;
339 340
 
@@ -383,3 +384,32 @@ h3{
383 384
 		}
384 385
 	}
385 386
 }
387
+
388
+.mask-style{
389
+	width: 100%;
390
+	height: 100%;
391
+	position: fixed;
392
+	top: 0;
393
+	left: 0;
394
+	z-index: 999;
395
+	display: flex;
396
+	background: rgba(0,0,0,0.2);
397
+	align-items: center;
398
+	justify-content: center;
399
+}
400
+.spin-style{
401
+	z-index:9999;
402
+}
403
+.sign{
404
+	width: 8px;
405
+	height: 8px;
406
+	border-radius: 50%;
407
+	background: red;
408
+	display: inline-block;
409
+}
410
+.red{
411
+	color: red;
412
+}
413
+.green{
414
+	color: #34b349;
415
+}

+ 98 - 28
src/app/views/dispensing-detail/dispensing-detail.component.ts

@@ -39,11 +39,7 @@ export class DispensingDetailComponent implements OnInit {
39 39
   ngOnInit() {
40 40
     this.searchParentDeptSubject.pipe(debounceTime(500)).subscribe((e) => {
41 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 44
 		this.detailId = this.route.snapshot.params.id;
49 45
 		this.hosId = this.tool.getCurrentHospital().id;
@@ -91,6 +87,9 @@ export class DispensingDetailComponent implements OnInit {
91 87
 	deptName:null;
92 88
   //搜索父级科室
93 89
 	isDeptLoading = false;
90
+	isSpinning = false;
91
+	delGrantModal = false;
92
+	showInsp = false;
94 93
   changeInp(e, type) {
95 94
     this.searchParentDeptSubject.next([e, type]);
96 95
   }
@@ -140,8 +139,9 @@ export class DispensingDetailComponent implements OnInit {
140 139
 		  .subscribe((res) => {
141 140
 				if(res.list.length==0){
142 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 196
 		this.deptName = null
197 197
 		this.deptIndex = null
198 198
 		this.listOfData=[]
199
+		this.showInsp = true
199 200
 		this.getDeptData(e,'','')
200 201
 	}
201 202
 	
@@ -218,9 +219,13 @@ export class DispensingDetailComponent implements OnInit {
218 219
 		}else{
219 220
 			data.drugsList.buildingId = e
220 221
 		}
222
+		if(this.showInsp){
223
+			this.isSpinning = true
224
+		}
221 225
 		that.mainService
222 226
 		  .getFetchDataList("data", "drugsList", data)
223 227
 		  .subscribe((res) => {
228
+				this.isSpinning = false
224 229
 		    that.deptList = res.list;
225 230
 				if(initial=='load'){
226 231
 					if(res.list.length>0){
@@ -242,6 +247,7 @@ export class DispensingDetailComponent implements OnInit {
242 247
 	// 添加科室
243 248
 	addDept(){
244 249
 		if(this.addDeptId){
250
+			this.showInsp = true
245 251
 			this.getDispensingDept(this.addDeptId,'dept')
246 252
 		}else{
247 253
 			this.message.error('请先选择发药科室')
@@ -269,39 +275,91 @@ export class DispensingDetailComponent implements OnInit {
269 275
 	}
270 276
 	
271 277
 	// 获取所有科室
272
-  getDeparts(dept) {
273
-    var that = this;
278
+  getDeparts() {
274 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 291
   getAllHospital() {
296
-		this.getDeparts('')
292
+		this.getDeparts()
297 293
 		this.getBuilding('')
298 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
+	rowData = null;
358
+	itemClick(e, data, type){
359
+		this.isRight = null;
303 360
 		e.stopPropagation();
304
-		this.rowId = id
361
+		this.rowId = data.id
362
+		this.rowData = data
305 363
 		if(type=='add'){
306 364
 			this.add = true
307 365
 		}else{
@@ -312,6 +370,7 @@ export class DispensingDetailComponent implements OnInit {
312 370
 	}
313 371
 	
314 372
 	// 表单提交
373
+	isRight = null;
315 374
 	submitForm(): void {
316 375
 	  var that = this;
317 376
 		for (const i in that.validateForm.controls) {
@@ -320,12 +379,23 @@ export class DispensingDetailComponent implements OnInit {
320 379
 		}
321 380
 		if (that.validateForm.invalid) return;
322 381
 	  let data = {
323
-			addSub:this.add?this.validateForm.value.addNum:this.validateForm.value.delNum,
382
+			addSub:this.validateForm.value.addNum,
324 383
 			id:this.rowId,
325 384
 			hosId:this.hosId,
326 385
 			deptId:this.deptId,
327
-			upType:that.add ? 'add' : 'sub'
328 386
 	  };
387
+		if(this.rowData.giveOutType.value==2){
388
+			let num1 = Number(this.rowData.expendCount) + Number(this.rowData.formerInventory) + Number(data.addSub)
389
+			let num2 = num1 / this.rowData.drugsInfoDTO.packingSpecs
390
+			if(num2 % 1 === 0){
391
+				this.isRight = true
392
+			}else{
393
+				this.isRight = false
394
+				this.message.error('数量错误,请重新填写!')
395
+				return
396
+			}
397
+		}
398
+		that.btnLoading = true;
329 399
 	  that.mainService
330 400
 	    .simplePost("addData", "drugsConfigure", data)
331 401
 	    .subscribe((data) => {

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

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

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

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

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

@@ -4,6 +4,55 @@
4 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 56
 .save {
8 57
   position: fixed;
9 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 221
     this.sortCurrentKey = "";
222 222
     this.sortCurrentValue = "";
223 223
     this.sortCurrent = {
224
-      clothesTypeNum: null,
225
-      getOrder: null,
226
-      sendOrder: null,
227
-      sendClothesNum: null,
228
-      price: null,
224
+      totalWeight: null
229 225
     };
230 226
     this.searchDto = {
231 227
       dept: null,
@@ -261,8 +257,23 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
261 257
     });
262 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 275
   loading1 = false;
276
+	summary = {};
266 277
   getList(num?: number, field?: string, sort?: string) {
267 278
     this.mapOfCheckedId = {};
268 279
     this.checkedDepIds = [];
@@ -279,13 +290,14 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
279 290
       buildingId: this.searchDto.building || undefined,
280 291
     };
281 292
     if (field && sort) {
282
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
293
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
283 294
     }
284 295
     this.loading1 = true;
285 296
     this.mainService
286 297
       .postCustom("report/medicalWaste", "dept", postData)
287 298
       .subscribe((result) => {
288 299
         this.loading1 = false;
300
+				this.summary = result.summary[0] || {}
289 301
         this.listOfData = result.list || [];
290 302
         this.heads = result.heads || [];
291 303
         this.listLength = result.totalNum;
@@ -592,20 +604,4 @@ export class MedicalWasteDepartmentStatisticsComponent implements OnInit {
592 604
     this.isLoading = true;
593 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 55
         <div echarts class="echart" [options]='barChartOption'></div>
56 56
       </div>
57 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 72
     <div class="list-template__bottom">
59 73
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
60 74
         [nzLoading]="loading1">
61
-        <!-- <thead (nzSortChange)="sort($event)" nzSingleSort> -->
62 75
         <thead>
63 76
           <tr class="thead">
64 77
             <th>序号</th>
65 78
             <th>日期</th>
79
+						<th>{{dataType=='outbound'?'出库':'回收'}}总重量(kg)</th>
66 80
             <th *ngFor="let data of heads">{{data}}(kg)</th>
67 81
           </tr>
68 82
         </thead>
69 83
         <tbody>
70 84
           <tr *ngFor="let data of listOfData;let index=index;">
71 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 87
           </tr>
75 88
         </tbody>
76 89
       </nz-table>

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

@@ -4,6 +4,55 @@
4 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 56
 .save {
8 57
   position: fixed;
9 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 316
   loading1 = false;
317 317
   pieChart: any = [];
318 318
   barChart: any = [];
319
+	summary = {};
319 320
   getList(num?: number, field?: string, sort?: string) {
320 321
     let maskFlag = this.message.loading("正在加载中..", {
321 322
       nzDuration: 0,
@@ -339,6 +340,7 @@ export class MedicalWasteHospitalStatisticsComponent implements OnInit {
339 340
       .subscribe((result) => {
340 341
         this.message.remove(maskFlag);
341 342
         this.loading1 = false;
343
+				this.summary = result.summary[0] || {}
342 344
         this.heads = result.heads || [];
343 345
         this.listOfData = result.list || [];
344 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 58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
59 59
       </div>
60 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 83
     <div class="list-template__bottom">
62 84
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
63 85
         [nzLoading]="loading1">
64 86
         <thead (nzSortChange)="sort($event)" nzSingleSort>
65 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 93
           </tr>
72 94
         </thead>
73 95
         <tbody>

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

@@ -4,6 +4,55 @@
4 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 56
 .save {
8 57
   position: fixed;
9 58
   left: 0;

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

@@ -214,10 +214,7 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
214 214
     this.sortCurrent = {
215 215
       totalTrip: null,
216 216
       totalOrder: null,
217
-      getTrip: null,
218
-      getOrder: null,
219
-      sendTrip: null,
220
-      sendOrder: null,
217
+      totalWeight: null
221 218
     };
222 219
     this.searchDto = {
223 220
       group: null,
@@ -225,8 +222,30 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
225 222
     }
226 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 242
   loading1 = false;
243
+	summary = {
244
+		personalNum:null,
245
+		totalTrip:null,
246
+		totalOrder:null,
247
+		totalWeight:null,
248
+	};
230 249
   getList(num?: number, field?: string, sort?: string) {
231 250
     this.pageIndex = num;
232 251
     let postData: any = {
@@ -240,13 +259,14 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
240 259
       groupId: this.searchDto.group || undefined,
241 260
     };
242 261
     if (field && sort) {
243
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
262
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
244 263
     }
245 264
     this.loading1 = true;
246 265
     this.mainService
247 266
       .postCustom("report/medicalWaste", "personal", postData)
248 267
       .subscribe((result) => {
249 268
         this.loading1 = false;
269
+				this.summary = result.summary || {}
250 270
         this.listOfData = result.list || [];
251 271
         this.listLength = result.totalNum;
252 272
       });
@@ -500,21 +520,4 @@ export class MedicalWastePersonnelStatisticsComponent implements OnInit {
500 520
     this.isLoading = true;
501 521
     this.searchTimerSubject.next([fun, e]);
502 522
   }
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 523
 }

+ 1 - 1
src/app/views/office-detail/office-detail.component.ts

@@ -24,7 +24,7 @@ export class OfficeDetailComponent implements OnInit {
24 24
     this.getDetail();
25 25
   }
26 26
   hideModal() {
27
-    this.router.navigateByUrl("/main/dispensingBatch");
27
+    this.router.navigateByUrl("/main/officeManagement");
28 28
   }
29 29
 
30 30
   // 获取详情

+ 8 - 19
src/app/views/order-statistics/order-statistics.component.html

@@ -46,35 +46,24 @@
46 46
         <thead>
47 47
           <tr class="thead">
48 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 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 nzShowSort nzSortKey="other" [(nzSort)]="sortCurrent.other" (nzSortChange)="sort('other',$event)">其他数量</th>
58 55
           </tr>
59 56
         </thead>
60 57
         <tbody>
61 58
           <tr *ngFor="let data of listOfData;let index=index;">
62 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 61
           </tr>
73 62
         </tbody>
74 63
       </nz-table>
75 64
       <div class="list-template__pagination">
76 65
         <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
77
-          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
66
+          (nzPageIndexChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue,'forbid')" (nzPageSizeChange)="getList(pageIndex, sortCurrentKey, sortCurrentValue,'forbid')">
78 67
         </nz-pagination>
79 68
       </div>
80 69
     </div>

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

@@ -155,11 +155,31 @@ export class OrderStatisticsComponent implements OnInit {
155 155
   reset() {
156 156
     this.changeDateType("day");
157 157
     this.changeDateRange("1");
158
+		this.sortCurrent = {
159
+		  date: null,
160
+		  total: null,
161
+			other: null,
162
+		};
158 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 180
   loading1 = false;
162
-  getList(num?: number) {
181
+	listOfHeads = [];
182
+  getList(num?: number, field?: string, sort?: string, type?: string) {
163 183
     if (num !== undefined) {
164 184
       this.pageIndex = num;
165 185
     }
@@ -170,12 +190,24 @@ export class OrderStatisticsComponent implements OnInit {
170 190
       endTime: this.searchData.dateRange.end,
171 191
       hosId: this.searchData.hosId,
172 192
       type: this.dateType,
193
+			sort:null
173 194
     };
195
+		if (field && sort) {
196
+		  postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
197
+		}
174 198
     this.loading1 = true;
175 199
     this.mainService
176 200
       .postCustom("report", "workOrder", postData)
177 201
       .subscribe((result) => {
178 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 211
         this.listOfData = result.list || [];
180 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 65
         <button nz-button class="btn default ml8" (click)='exportDetail()' [nzLoading]="loading3" [disabled]="!checkedDepIds.length">批量导出详细科室报表</button>
66 66
       </div>
67 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 98
     <div class="list-template__bottom">
69 99
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
70 100
         [nzLoading]="loading1">
71
-        <thead (nzSortChange)="sort($event)" nzSingleSort>
101
+        <thead nzSingleSort>
72 102
           <tr class="thead">
73 103
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
74 104
               (nzCheckedChange)="checkAll($event)"></th>
@@ -79,11 +109,11 @@
79 109
             <th nzShowSort nzWidth="15%" nzSortKey="sendOrder" [(nzSort)]="sortCurrent.sendOrder">送回单数</th>
80 110
             <th nzShowSort nzWidth="15%" nzSortKey="sendClothesNum" [(nzSort)]="sortCurrent.sendClothesNum">洗涤被服数量</th>
81 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 113
             <th nzWidth="15%">回收单数</th>
84 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 117
           </tr>
88 118
         </thead>
89 119
         <tbody>

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

@@ -4,6 +4,55 @@
4 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 56
 .save {
8 57
   position: fixed;
9 58
   left: 0;

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

@@ -221,10 +221,8 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
221 221
     this.sortCurrentValue = "";
222 222
     this.sortCurrent = {
223 223
       clothesTypeNum: null,
224
-      getOrder: null,
225
-      sendOrder: null,
226
-      sendClothesNum: null,
227
-      price: null,
224
+      sendBackNum: null,
225
+			totalPrice: null,
228 226
     };
229 227
     this.searchDto = {
230 228
       dept: null,
@@ -260,8 +258,31 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
260 258
     });
261 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 277
   loading1 = false;
278
+	summary = {
279
+		deptNum:null,
280
+		clothesTypeTotalNum:null,
281
+		getOrderTotal:null,
282
+		sendOrderTotal:null,
283
+		sendClothesTotalNum:null,
284
+		totalPrice:null,
285
+	};
265 286
   getList(num?: number, field?: string, sort?: string) {
266 287
     this.mapOfCheckedId = {};
267 288
     this.checkedDepIds = [];
@@ -278,13 +299,14 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
278 299
       buildingId: this.searchDto.building || undefined,
279 300
     };
280 301
     if (field && sort) {
281
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
302
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
282 303
     }
283 304
     this.loading1 = true;
284 305
     this.mainService
285 306
       .postCustom("report/clothes", "dept", postData)
286 307
       .subscribe((result) => {
287 308
         this.loading1 = false;
309
+				this.summary = result.summary || {}
288 310
         this.listOfData = result.list || [];
289 311
         this.listLength = result.totalNum;
290 312
       });
@@ -590,20 +612,4 @@ export class QuiltWashingDepartmentStatisticsComponent implements OnInit {
590 612
     this.isLoading = true;
591 613
     this.searchTimerSubject.next([fun, e]);
592 614
   }
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 615
 }

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

@@ -40,6 +40,36 @@
40 40
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
41 41
       </div>
42 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 73
     <div class="list-template__bottom">
44 74
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
45 75
         [nzLoading]="loading1">

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

@@ -4,6 +4,55 @@
4 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 56
 .save {
8 57
   position: fixed;
9 58
   left: 0;

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

@@ -168,6 +168,14 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
168 168
   }
169 169
   // 表格数据
170 170
   loading1 = false;
171
+	summary = {
172
+		deptNum:null,
173
+		clothesTypeTotalNum:null,
174
+		getOrderTotal:null,
175
+		sendOrderTotal:null,
176
+		sendClothesTotalNum:null,
177
+		totalPrice:null,
178
+	};
171 179
   getList(num?: number, field?: string, sort?: string) {
172 180
     this.pageIndex = num;
173 181
     let postData: any = {
@@ -186,6 +194,7 @@ export class QuiltWashingHospitalStatisticsComponent implements OnInit {
186 194
       .postCustom("report/clothes", "hospital", postData)
187 195
       .subscribe((result) => {
188 196
         this.loading1 = false;
197
+				this.summary = result.summary || {}
189 198
         this.listOfData = result.list || [];
190 199
         this.listLength = result.totalNum;
191 200
       });

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

@@ -58,21 +58,55 @@
58 58
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
59 59
       </div>
60 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 95
     <div class="list-template__bottom">
62 96
       <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
63 97
         [nzLoading]="loading1">
64
-        <thead (nzSortChange)="sort($event)" nzSingleSort>
98
+        <thead>
65 99
           <tr class="thead">
66 100
             <th nzWidth="5%">序号</th>
67
-            <th nzWidth="5%">人员姓名</th>
101
+            <th nzWidth="10%">人员姓名</th>
68 102
             <!-- <th nzShowSort nzWidth="15%" nzSortKey="totalTrip" [(nzSort)]="sortCurrent.totalTrip">总趟数</th>
69 103
             <th nzShowSort nzWidth="15%" nzSortKey="totalOrder" [(nzSort)]="sortCurrent.totalOrder">总单数</th>
70 104
             <th nzShowSort nzWidth="15%" nzSortKey="getTrip" [(nzSort)]="sortCurrent.getTrip">回收趟数</th>
71 105
             <th nzShowSort nzWidth="15%" nzSortKey="getOrder" [(nzSort)]="sortCurrent.getOrder">回收工单数</th>
72 106
             <th nzShowSort nzWidth="15%" nzSortKey="sendTrip" [(nzSort)]="sortCurrent.sendTrip">送回趟数</th>
73 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 110
             <th nzWidth="15%">回收趟数</th>
77 111
             <th nzWidth="15%">回收工单数</th>
78 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 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 56
 .save {
8 57
   position: fixed;
9 58
   left: 0;

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

@@ -214,10 +214,6 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
214 214
     this.sortCurrent = {
215 215
       totalTrip: null,
216 216
       totalOrder: null,
217
-      getTrip: null,
218
-      getOrder: null,
219
-      sendTrip: null,
220
-      sendOrder: null,
221 217
     };
222 218
     this.searchDto = {
223 219
       group: null,
@@ -225,8 +221,29 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
225 221
     }
226 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 237
   loading1 = false;
238
+	summary = {
239
+		personTotal:null,
240
+		tripTotal:null,
241
+		orderTotal:null,
242
+		getTripTotal:null,
243
+		getOrderTotal:null,
244
+		sendTripTotal:null,
245
+		sendOrderTotal:null,
246
+	};
230 247
   getList(num?: number, field?: string, sort?: string) {
231 248
     this.pageIndex = num;
232 249
     let postData: any = {
@@ -237,16 +254,17 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
237 254
       hosId: this.searchData.hosId,
238 255
       type: this.dateType,
239 256
       userId: this.searchDto.user || undefined,
240
-      groupId: this.searchDto.group || undefined,
257
+      groupId: this.searchDto.group || undefined
241 258
     };
242 259
     if (field && sort) {
243
-      postData.sort = sort === "ascend" ? field : `${field} desc`;
260
+      postData.sort = sort === "ascend" ? `${field} asc` : `${field} desc`;
244 261
     }
245 262
     this.loading1 = true;
246 263
     this.mainService
247 264
       .postCustom("report/clothes", "personal", postData)
248 265
       .subscribe((result) => {
249 266
         this.loading1 = false;
267
+				this.summary = result.summary || {}
250 268
         this.listOfData = result.list || [];
251 269
         this.listLength = result.totalNum;
252 270
       });
@@ -500,21 +518,4 @@ export class QuiltWashingPersonnelStatisticsComponent implements OnInit {
500 518
     this.isLoading = true;
501 519
     this.searchTimerSubject.next([fun, e]);
502 520
   }
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 521
 }

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

@@ -75,12 +75,9 @@
75 75
             <th nzWidth="8%">姓名</th>
76 76
             <th nzWidth="8%" nzShowSort nzSortKey="byOrderNum" [(nzSort)]="sortCurrent.byOrderNum">工单总数</th>
77 77
             <th nzWidth="16%">五分钟内工单<br>特殊关闭数</th>
78
-            <!-- <th nzWidth="8%"></th> -->
79 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 80
             <th nzWidth="8%">楼栋分<br>陪检方式分</th>
83
-            <!-- <th nzWidth="8%"></th> -->
84 81
             <th nzWidth="16%" nzShowSort nzSortKey="byIntegral" [(nzSort)]="sortCurrent.byIntegral">总积分</th>
85 82
             <th nzWidth="15%">操作</th>
86 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 169
   reset() {
170
+		this.sortCurrentKey = "";
171
+		this.sortCurrentValue = "";
172
+		this.sortCurrent = {
173
+		  byOrderNum: null,
174
+		  byIntegral: null,
175
+			completionRate: null,
176
+		};
170 177
     this.changeDateRange("1");
171 178
     this.group = 0;
172
-    // this.search();
179
+    // this.getList();
173 180
   }
174 181
   // 表格数据
175 182
   loading1 = false;
@@ -203,6 +210,7 @@ export class WorkerStatisticsComponent implements OnInit {
203 210
   sortCurrent = {
204 211
     byOrderNum: null,
205 212
     byIntegral: null,
213
+		completionRate: null,
206 214
   };
207 215
   sortCurrentKey: string = "";
208 216
   sortCurrentValue: string | null = "";