浏览代码

Merge branch 'lmm' into develop

seimin 3 月之前
父节点
当前提交
1c893a336b

文件差异内容过多而无法显示
+ 4 - 4
src/app/components/configurationCenter/configuration-category/configuration-category.component.html


+ 22 - 0
src/app/components/configurationCenter/configuration-category/configuration-category.component.ts

@@ -461,6 +461,13 @@ export class ConfigurationCategoryComponent implements OnInit {
461 461
     }
462 462
   }
463 463
 
464
+  // 删除
465
+  deleteType; //删除类型
466
+  removeCategory(type, data) {
467
+    this.deleteType = type;
468
+    this.showDelModal(data,'您确认要删除吗?','删除','delCategory');
469
+  }
470
+
464 471
   // 新增/编辑表单提交
465 472
   btnLoading: boolean = false; //提交按钮loading状态
466 473
   submitCategoryForm(): void {
@@ -566,6 +573,21 @@ export class ConfigurationCategoryComponent implements OnInit {
566 573
             this.showPromptModal(this.tipsMsg2, false, data.msg);
567 574
           }
568 575
         });
576
+    } else if (this.confirmDelType === "delCategory") {
577
+      //删除-故障现象
578
+      this.mainService
579
+        .deleteIncidentCategory({categoryId: this.coopData.id})
580
+        .subscribe((data:any) => {
581
+          this.btnLoading = false;
582
+          this.delModal = false;
583
+          if (data.status == 200) {
584
+            this['activeCategory' + this.deleteType] = {};
585
+            this.categoryConfigList = [];
586
+            this.showPromptModal(this.tipsMsg2, true, "");
587
+          } else {
588
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
589
+          }
590
+        });
569 591
     } else if (this.confirmDelType === "copy") {
570 592
       //向下复制-关联
571 593
       let postData:any = {

+ 17 - 2
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.html

@@ -5,6 +5,7 @@
5 5
       <div class="contentHead">工时大类
6 6
 				<div>
7 7
 					<button nz-button class="mar-rig-10 btn cancel" nzType="default" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="delCategoryModal(1)">删除</button>
8
+          <button nz-button class="mar-rig-10 btn" nzType="primary" nzSize="small" *ngIf="activeCategory1.id && categoryList1.length" (click)="editCategoryModal(1)">编辑</button>
8 9
 					<button nz-button nzType="primary" nzSize="small" (click)="addCategoryModal(1)">新增</button>
9 10
 				</div>
10 11
 			</div>
@@ -17,6 +18,7 @@
17 18
       <div class="contentHead">工时小类
18 19
 				<div>
19 20
 					<button nz-button class="mar-rig-10 btn cancel" *ngIf="activeCategory2.id && activeCategory1.id" nzType="default" nzSize="small" (click)="delCategoryModal(2)">删除</button>
21
+          <button nz-button class="mar-rig-10 btn" *ngIf="activeCategory2.id && activeCategory1.id" nzType="primary" nzSize="small" (click)="editCategoryModal(2)">编辑</button>
20 22
 					<button nz-button nzType="primary" nzSize="small" *ngIf="activeCategory1.id" (click)="addCategoryModal(2)">新增</button>
21 23
 				</div>
22 24
 			</div>
@@ -35,8 +37,8 @@
35 37
     <div class="title">新增<i class="icon_transport transport-guanbi" (click)="hideCategoryModal()"></i></div>
36 38
     <div class="content">
37 39
       <form nz-form [formGroup]="validateCategoryForm" class="addForm">
38
-				<nz-form-item *ngIf="coopType === 2">
39
-				  <nz-form-label [nzSpan]="6" nzFor="workName">大类工时名称</nz-form-label>
40
+				<nz-form-item *ngIf="coopType === 2 && add">
41
+				  <nz-form-label [nzSpan]="6" nzFor="workName">工时大类名称</nz-form-label>
40 42
 				  <nz-form-control [nzSpan]="18">
41 43
 				    <nz-input-group>
42 44
 							<div>
@@ -45,6 +47,19 @@
45 47
 						</nz-input-group>
46 48
 				  </nz-form-control>
47 49
 				</nz-form-item>
50
+        <nz-form-item *ngIf="coopType === 2 && !add">
51
+          <nz-form-label [nzSpan]="5" nzRequired nzFor="parent">工时大类</nz-form-label>
52
+          <nz-form-control [nzSpan]="19" nzErrorTip="请选择工时大类!">
53
+            <nz-select [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear formControlName="parent" nzPlaceHolder="请选择工时大类">
54
+              <ng-container *ngFor="let option of categoryList1">
55
+                <nz-option *ngIf="!isLoading" [nzLabel]="option.workName" [nzValue]="option.id"></nz-option>
56
+              </ng-container>
57
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
58
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
59
+              </nz-option>
60
+            </nz-select>
61
+          </nz-form-control>
62
+        </nz-form-item>
48 63
 
49 64
 				<nz-form-item>
50 65
 				  <nz-form-label [nzSpan]="5" nzRequired nzFor="workName">工时名称</nz-form-label>

+ 99 - 26
src/app/components/configurationCenter/configuration-manHour/configuration-manHour.component.ts

@@ -62,7 +62,7 @@ export class ConfigurationManHourComponent implements OnInit {
62 62
     this.getScores();
63 63
   }
64 64
 
65
-	
65
+
66 66
 	// 监听单位输入
67 67
 	workUnitshow:boolean = false;
68 68
 	handleInput(event: KeyboardEvent){
@@ -73,7 +73,7 @@ export class ConfigurationManHourComponent implements OnInit {
73 73
 			this.workUnitshow = false
74 74
 		}
75 75
 	}
76
-	
76
+
77 77
   // 获取积分
78 78
   scoreList: any = [];
79 79
   getScores() {
@@ -124,12 +124,12 @@ export class ConfigurationManHourComponent implements OnInit {
124 124
         break;
125 125
     }
126 126
   }
127
-	
127
+
128 128
 	// 取消删除弹框
129 129
 	cancelDel(){
130 130
 		this.hideDelModal();
131 131
 	}
132
-	
132
+
133 133
 	// 确认删除
134 134
 	confirmDel() {
135 135
 	  let that = this;
@@ -156,7 +156,7 @@ export class ConfigurationManHourComponent implements OnInit {
156 156
 	      }
157 157
 	    });
158 158
 	}
159
-	
159
+
160 160
 	// 关闭删除模态框
161 161
 	hideDelModal() {
162 162
 	  this.delModal = false;
@@ -171,7 +171,7 @@ export class ConfigurationManHourComponent implements OnInit {
171 171
   categoryLoading1:boolean = false;
172 172
   categoryLoading2:boolean = false;
173 173
   categoryLoading3:boolean = false;
174
-  getCategoryList(type:number, parentId = 0) {
174
+  getCategoryList(type:number, parentId = 0, isEdit = false, isOnly = false) {
175 175
     setTimeout(() => {
176 176
       this['categoryLoading' + type] = true;
177 177
     }, 0)
@@ -181,6 +181,7 @@ export class ConfigurationManHourComponent implements OnInit {
181 181
 			workHourManagement: {
182 182
 				hosId: this.hosId,
183 183
 				treeLevel: type,
184
+        quoteOther: 0,
184 185
 				parent: type === 1 ? null : { id: parentId }
185 186
 			}
186 187
     };
@@ -189,6 +190,14 @@ export class ConfigurationManHourComponent implements OnInit {
189 190
 		  .subscribe((res) => {
190 191
 		    this['categoryLoading' + type] = false;
191 192
 		    this['categoryList' + type] = res.list || [];
193
+        console.log(this['activeCategory' + type])
194
+        if(isEdit){
195
+          this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this['activeCategory' + type].id);
196
+        }
197
+
198
+        if(isOnly){
199
+          this['activeCategory' + type] = this['categoryList' + type].find(v => v.id == this.validateCategoryForm.value.parent);
200
+        }
192 201
 		  });
193 202
   }
194 203
 
@@ -204,7 +213,38 @@ export class ConfigurationManHourComponent implements OnInit {
204 213
     this.modalCategory = true;
205 214
     this.initCategoryForm();
206 215
   }
207
-	
216
+  isLoading:boolean = false;
217
+  // 编辑
218
+  editCategoryModal(type:number) {
219
+    this.coopType = type;
220
+    this.modelName = "编辑";
221
+    this.add = false; //编辑
222
+    this.modalCategory = true;
223
+    this.initCategoryForm();
224
+    if(type == 1){
225
+      this.requiredChange('parent', false);
226
+    }else if(type == 2){
227
+      this.requiredChange('parent', true);
228
+    }
229
+    console.log(this['activeCategory' + type])
230
+    this.validateCategoryForm.controls.parent.setValue(this['activeCategory' + type].parent ? this['activeCategory' + type].parent.id : null);
231
+    this.validateCategoryForm.controls.workName.setValue(this['activeCategory' + type].workName);
232
+    this.validateCategoryForm.controls.workUnit.setValue(this['activeCategory' + type].workUnit);
233
+    this.validateCategoryForm.controls.wage.setValue(this['activeCategory' + type].wage);
234
+    this.validateCategoryForm.controls.integral.setValue(this['activeCategory' + type].integral ? this['activeCategory' + type].integral.id : null);
235
+  }
236
+
237
+  requiredChange(field: string, required: boolean): void {
238
+    if (!required) {
239
+      this.validateCategoryForm.get(field)!.clearValidators();
240
+      this.validateCategoryForm.get(field)!.markAsPristine();
241
+    } else {
242
+      this.validateCategoryForm.get(field)!.setValidators(Validators.required);
243
+      this.validateCategoryForm.get(field)!.markAsDirty();
244
+    }
245
+    this.validateCategoryForm.get(field)!.updateValueAndValidity();
246
+  }
247
+
208 248
 	// 删除工时
209 249
 	delModal: boolean = false; //删除模态框
210 250
 	delContent: string = null; //删除模态框
@@ -217,7 +257,7 @@ export class ConfigurationManHourComponent implements OnInit {
217 257
 		this.coopType = type;
218 258
 		this.delModal = true
219 259
 	}
220
-	
260
+
221 261
   //关闭新增/编辑弹框
222 262
   hideCategoryModal() {
223 263
     this.modalCategory = false;
@@ -227,6 +267,7 @@ export class ConfigurationManHourComponent implements OnInit {
227 267
   validateCategoryForm: FormGroup; //新增/编辑表单
228 268
   initCategoryForm() {
229 269
     this.validateCategoryForm = this.fb.group({
270
+      parent: [null],//工时大类
230 271
       workName: [null, [Validators.required]],//名称
231 272
 			workUnit: [null, [Validators.required]],//单位
232 273
 			wage: [null, [Validators.required]],//工价
@@ -252,25 +293,43 @@ export class ConfigurationManHourComponent implements OnInit {
252 293
     console.log(this.validateCategoryForm.value);
253 294
     this.btnLoading = true;
254 295
     // -----------------------------------
255
-    let postData:any = {
256
-			...this.validateCategoryForm.value,
257
-			integral:{
258
-				id:this.validateCategoryForm.value.integral
259
-			},
260
-			hosId: this.hosId,
261
-			treeLevel: this.coopType,
262
-			parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
263
-    };
264
-			
296
+    let postData:any;
297
+    if(this.add){
298
+      postData = {
299
+        workHourManagement: {
300
+          ...this.validateCategoryForm.value,
301
+          integral:{
302
+            id:this.validateCategoryForm.value.integral
303
+          },
304
+          hosId: this.hosId,
305
+          treeLevel: this.coopType,
306
+          parent: this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)],
307
+        }
308
+      }
309
+    }else{
310
+      postData = {
311
+        workHourManagement: {
312
+          ...this['activeCategory' + this.coopType],
313
+          ...this.validateCategoryForm.value,
314
+          integral:{
315
+            id:this.validateCategoryForm.value.integral
316
+          },
317
+          hosId: this.hosId,
318
+          treeLevel: this.coopType,
319
+          parent: { id: this.validateCategoryForm.value.parent },
320
+        }
321
+      }
322
+    }
323
+
265 324
 		this.mainService
266
-			.simplePost("addData", "workHourManagement", postData)
325
+			.coopData(this.add ? "addData" : "updData", "workHourManagement", postData)
267 326
 			.subscribe((data) => {
268 327
 				this.btnLoading = false;
269 328
 				if (data.status == 200) {
270 329
 					this.modalCategory = false
271
-					this.showPromptModal("新增", true, "");
330
+					this.showPromptModal(this.add ? "新增" : "编辑", true, "");
272 331
 				} else {
273
-					this.showPromptModal("新增", false, data.msg);
332
+					this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
274 333
 				}
275 334
 			});
276 335
     // -----------------------------------
@@ -290,7 +349,7 @@ export class ConfigurationManHourComponent implements OnInit {
290 349
     });
291 350
     console.log(this.validateConfigForm.controls)
292 351
   }
293
-	
352
+
294 353
 	// 获取当前选中的故障现象索引
295 354
 	get currentCategoryIndex(){
296 355
 	  if(this.activeCategory3.id){
@@ -303,7 +362,7 @@ export class ConfigurationManHourComponent implements OnInit {
303 362
 	    return 1;
304 363
 	  }
305 364
 	}
306
-	
365
+
307 366
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
308 367
   promptContent: string; //操作提示框提示信息
309 368
   ifSuccess: boolean; //操作成功/失败
@@ -317,10 +376,24 @@ export class ConfigurationManHourComponent implements OnInit {
317 376
     setTimeout(() => {
318 377
       this.promptModalShow = true;
319 378
     }, 100);
320
-    if(this.coopType !== 0){
321
-      this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
379
+    if(con === '编辑'){
380
+      if(success){
381
+        if(this.coopType === 1){
382
+          this.getCategoryList(1, 0, true);
383
+        }else if(this.coopType === 2){
384
+          this.getCategoryList(1, 0, false, true);
385
+          this.getCategoryList(2, this.validateCategoryForm.value.parent, true);
386
+        }
387
+      }
322 388
     }else{
323
-      this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
389
+      if(this.coopType !== 0){
390
+        this.getCategoryList(this.coopType, this.coopType === 1 ? undefined : this['activeCategory' + (this.coopType - 1)].id);
391
+      }else{
392
+        this.getCategoryList(this.currentCategoryIndex, this.currentCategoryIndex === 1 ? undefined : this['activeCategory' + (this.currentCategoryIndex - 1)].id);
393
+      }
394
+      if(this.activeCategory2.id || this.activeCategory1.id){
395
+        this.getCategoryList(this.activeCategory2.id || this.activeCategory1.id);
396
+      }
324 397
     }
325 398
   }
326 399
 }

+ 11 - 3
src/app/services/main.service.ts

@@ -305,10 +305,10 @@ export class MainService {
305 305
     });
306 306
   }
307 307
   //服务台新建工单—调度台建单获取起点科室或者终点科室列表
308
-  getdeptList(taskTypeId, patientCode = undefined) {
308
+  getdeptList(taskTypeId, patientCode = undefined, startTime, endTime) {
309 309
     return this.http.post(
310 310
       host.host + "/ser/getdeptList",
311
-      { taskTypeId, patientCode: patientCode || undefined },
311
+      { taskTypeId, patientCode: patientCode || undefined, startTime, endTime },
312 312
       { headers: this.headers }
313 313
     );
314 314
   }
@@ -1043,11 +1043,19 @@ export class MainService {
1043 1043
 	  return this.http.post(host.host + `/user/data/findPhoneDept`, data, {
1044 1044
 	    headers: this.headers,
1045 1045
 	  });
1046
-	}	// 获取细胞学标本
1046
+	}
1047
+  // 获取细胞学标本
1047 1048
 	getCellDictionary(data) {
1048 1049
 	  return this.http.post(host.host + `/common/common/getDictionary`,data, {
1049 1050
 	    headers: this.headers,
1050 1051
 	  });
1051 1052
 	}
1052 1053
 
1054
+  // 删除故障现象
1055
+	deleteIncidentCategory(data) {
1056
+	  return this.http.post(host.host + `/incident/deleteIncidentCategory`, data, {
1057
+	    headers: this.headers,
1058
+	  });
1059
+	}
1060
+
1053 1061
 }

+ 1 - 0
src/app/views/assets-consumable/assets-consumable.component.ts

@@ -84,6 +84,7 @@ export class AssetsConsumableComponent implements OnInit {
84 84
       sum: this.pageSize,
85 85
       consumable: {
86 86
         hosId: this.currentHospital.id,
87
+        quoteOther: 0,
87 88
         ...this.searchDto,
88 89
       },
89 90
     };

+ 30 - 16
src/app/views/fuwutai/fuwutai.component.html

@@ -1097,24 +1097,38 @@
1097 1097
                           </nz-form-item>
1098 1098
                         </div>
1099 1099
                         <div nz-col [nzSpan]="24" *ngIf="isTaskTypeInspect && radioValueZy">
1100
-                          <!-- 检查 -->
1101
-                          <nz-form-item>
1102
-                            <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck" style="text-align: left;">关联的检查</nz-form-label>
1103
-                            <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1104
-                              <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1105
-                                <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1106
-                                  <div nz-col nzSpan="24">
1107
-                                    <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1108
-                                    <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1100
+                          <div class="pos">
1101
+                            <div class="pos-item" style="left: 90px;top: 7px;">
1102
+                              <span style="font-size: 14px">{{inspectToday| date:'yyyy-MM-dd'}}</span>
1103
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="previousDayNew()">
1104
+                                上一日
1105
+                              </button>
1106
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="todayNew()">
1107
+                                今天
1108
+                              </button>
1109
+                              <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="nextDayNew()">
1110
+                                下一日
1111
+                              </button>
1112
+                            </div>
1113
+                            <!-- 检查 -->
1114
+                            <nz-form-item>
1115
+                              <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck" style="text-align: left;">关联的检查</nz-form-label>
1116
+                              <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1117
+                                <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1118
+                                  <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1119
+                                    <div nz-col nzSpan="24">
1120
+                                      <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1121
+                                      <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1122
+                                    </div>
1109 1123
                                   </div>
1124
+                                </nz-checkbox-wrapper>
1125
+                                <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1126
+                                  您选择的检查包含了多个科室,请您只包含一个科室。
1110 1127
                                 </div>
1111
-                              </nz-checkbox-wrapper>
1112
-                              <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1113
-                                您选择的检查包含了多个科室,请您只包含一个科室。
1114
-                              </div>
1115
-                            </nz-form-control>
1116
-                            <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1117
-                          </nz-form-item>
1128
+                              </nz-form-control>
1129
+                              <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1130
+                            </nz-form-item>
1131
+                          </div>
1118 1132
                         </div>
1119 1133
                         <div *ngIf="!isTaskTypeInspect && radioValueZy" nz-col [nzSpan]="deptZyList['startStatus'] != 201 ? 12 : 24" [ngStyle]="{ display: (deptZyList['startStatus'] != 201 && !isTaskTypeInspect) ? 'block' : 'none'}">
1120 1134
                           <nz-form-item>

+ 5 - 0
src/app/views/fuwutai/fuwutai.component.less

@@ -116,6 +116,11 @@
116 116
       left: 110px;
117 117
       z-index: 9;
118 118
     }
119
+    .pos-btn:focus,.pos-btn:hover{
120
+      color: rgba(0, 0, 0, 0.65)!important;
121
+      background-color: #fff!important;
122
+      border-color: #d9d9d9!important;
123
+    }
119 124
     .ant-form-item-label{
120 125
       text-align: left;
121 126
     }

+ 47 - 3
src/app/views/fuwutai/fuwutai.component.ts

@@ -21,7 +21,7 @@ import { Subject, forkJoin } from "rxjs";
21 21
 import { debounceTime, filter, map } from "rxjs/operators";
22 22
 import { SourceId } from "src/app/type/types";
23 23
 import { ToolService } from 'src/app/services/tool.service';
24
-import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours } from 'date-fns';
24
+import { addDays, differenceInCalendarDays, getHours, getMinutes, setMinutes, parse, format, addHours, startOfDay, endOfDay } from 'date-fns';
25 25
 import { UploadFile } from 'ng-zorro-antd';
26 26
 import { HttpRequest, HttpClient, HttpResponse } from '@angular/common/http';
27 27
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -166,6 +166,7 @@ export class FuwutaiComponent implements OnInit {
166 166
   searchHosDepartmentSubject = new Subject();
167 167
   searchHosDepartmentQtSubject = new Subject();
168 168
   searchPatientListSubject = new Subject();
169
+  inspectSubject = new Subject();
169 170
 
170 171
   // 运维相关
171 172
   incidentModel:any = {};
@@ -809,6 +810,9 @@ export class FuwutaiComponent implements OnInit {
809 810
     this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
810 811
       this.searchApplicationDepartment(v[0], v[1]);
811 812
     });
813
+    this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
814
+      this.refreshInspectList();
815
+    });
812 816
     this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
813 817
       if(v[0] === 'requester'){
814 818
         this.searchApplicationRequester(v[1]);
@@ -4536,7 +4540,7 @@ export class FuwutaiComponent implements OnInit {
4536 4540
     // 返回值的status是204 则让前端自己调用科室搜索接口
4537 4541
     // 返回值的status是205 则是固定科室类型,会返回科室列表
4538 4542
     // 返回值的status是206 则是默认患者所在科室,把患者所在科室作为值
4539
-    this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
4543
+    this.mainService.getdeptList(value, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
4540 4544
       this.deptZyList = data;
4541 4545
       // 预约start
4542 4546
       this.currentTasktype = data.taskType;
@@ -5696,7 +5700,7 @@ export class FuwutaiComponent implements OnInit {
5696 5700
         patientCode = undefined;
5697 5701
       }
5698 5702
 
5699
-      this.mainService.getdeptList(value, patientCode).subscribe((data:any) => {
5703
+      this.mainService.getdeptList(value, patientCode, (taskType.associationTypeValue === 'inspect' ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined), (taskType.associationTypeValue === 'inspect' ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined)).subscribe((data:any) => {
5700 5704
         this.linkCheckLis = [];
5701 5705
         if(data.data && Array.isArray(data.data.data) && data.data.data.length) {
5702 5706
           let arr = [];
@@ -5739,4 +5743,44 @@ export class FuwutaiComponent implements OnInit {
5739 5743
       this.noteList = result || [];
5740 5744
     });
5741 5745
   }
5746
+
5747
+  // 关联的检查-上一日,下一日,今天
5748
+  inspectToday:Date = new Date();
5749
+  // 上一日
5750
+  previousDayNew(){
5751
+    this.inspectToday = addDays(this.inspectToday, -1);
5752
+    this.inspectSubject.next();
5753
+  }
5754
+
5755
+  // 今天
5756
+  todayNew(){
5757
+    this.inspectToday = new Date();
5758
+    this.inspectSubject.next();
5759
+  }
5760
+
5761
+  // 下一日
5762
+  nextDayNew(){
5763
+    this.inspectToday = addDays(this.inspectToday, 1);
5764
+    this.inspectSubject.next();
5765
+  }
5766
+
5767
+  refreshInspectList(){
5768
+    this.linkCheckLis = [];
5769
+    this.mainService.getdeptList(this.radioValueZy, this.patientZy, format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'), format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss')).subscribe((data:any) => {
5770
+      if (data.data && Array.isArray(data.data.data) && data.data.data.length) {
5771
+        let arr = [];
5772
+        data.data.data.forEach((e) => {
5773
+          arr.push({
5774
+            execDeptId: e.execDept.id,
5775
+            yyTime: e.yyTime,
5776
+            priority: e.priority,
5777
+            label: (e.yyTime || "") + " " + e.execDept.dept + " 进行 " + (e.inspectName || "检查"),
5778
+            value: e["id"],
5779
+            checked: false,
5780
+          });
5781
+        });
5782
+        this.linkCheckLis = arr;
5783
+      }
5784
+    });
5785
+  }
5742 5786
 }

+ 41 - 19
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1270,6 +1270,7 @@
1270 1270
                             <!-- <button (click)="viewBx(data)">查看</button> -->
1271 1271
                             <button class="btn1 mr8 mb8 mt8" (click)="detailBx(data)">查看</button>
1272 1272
                             <button class="btn1 mr8 mb8 mt8" (click)="showAppraiseBx(data)" *ngIf="data.state && data.state.value == 'close' && !data.wxdegree">评价</button>
1273
+                            <button class="btn1 mr8 mb8 mt8" (click)="delBx(data)" *ngIf="data.state && data.state.value == 'accept'">撤销</button>
1273 1274
                           </td>
1274 1275
                         </tr>
1275 1276
                       </tbody>
@@ -1462,25 +1463,39 @@
1462 1463
             </div>
1463 1464
           </ng-container>
1464 1465
           <ng-container *ngIf="!cLoading">
1465
-            <!-- 检查 -->
1466
-            <nz-form-item *ngIf="checkedShowMsg.status == 200">
1467
-              <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck">关联的检查</nz-form-label>
1468
-              <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1469
-                <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1470
-                  <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1471
-                    <div nz-col nzSpan="24">
1472
-                      <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1473
-                      <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1466
+            <div class="pos" *ngIf="checkedShowMsg.status == 200">
1467
+              <div class="pos-item" style="left: 110px;top: -4px;">
1468
+                <span style="font-size: 18px">{{inspectToday| date:'yyyy-MM-dd'}}</span>
1469
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="previousDayNew()">
1470
+                  上一日
1471
+                </button>
1472
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="todayNew()">
1473
+                  今天
1474
+                </button>
1475
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="nextDayNew()">
1476
+                  下一日
1477
+                </button>
1478
+              </div>
1479
+              <!-- 检查 -->
1480
+              <nz-form-item>
1481
+                <nz-form-label [nzSm]="24" [nzXs]="24" nzFor="linkCheck">关联的检查</nz-form-label>
1482
+                <nz-form-control class="datesGroup" *ngIf="linkCheckLis.length">
1483
+                  <nz-checkbox-wrapper nz-row class="linkCheckCheck w100" ngDefaultControl formControlName="linkCheck" (nzOnChange)="linkCheckLisChange($event)">
1484
+                    <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1485
+                      <div nz-col nzSpan="24">
1486
+                        <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1487
+                        <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1488
+                      </div>
1474 1489
                     </div>
1490
+                  </nz-checkbox-wrapper>
1491
+                  <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1492
+                    您选择的检查包含了多个科室,请您只包含一个科室。
1475 1493
                   </div>
1476
-                </nz-checkbox-wrapper>
1477
-                <div class="red" style="line-height: normal; font-weight: bold" *ngIf="currentTasktype.isMoreDept === 0 && isInspects">
1478
-                  您选择的检查包含了多个科室,请您只包含一个科室。
1479
-                </div>
1480
-              </nz-form-control>
1481
-              <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1482
-            </nz-form-item>
1483
-            <div class="pos" *ngIf="(currentTasktype.associationType.value === 'patientTransport' && appointmentZyBuildFlag == 1) || (currentTasktype.associationType.value === 'inspect' && appointmentBuildFlag == 1)">
1494
+                </nz-form-control>
1495
+                <div class="noInspect" *ngIf="!linkCheckLis.length">暂无关联的检查</div>
1496
+              </nz-form-item>
1497
+            </div>
1498
+            <div class="pos" *ngIf="(currentTasktype.associationType.value === 'patientTransport' && appointmentZyBuildFlag == '1') || (currentTasktype.associationType.value === 'inspect' && appointmentBuildFlag == '1')">
1484 1499
               <!-- 需要预约检查 -->
1485 1500
               <nz-form-item class="pos-item">
1486 1501
                 <nz-form-control>
@@ -2313,6 +2328,14 @@
2313 2328
   (confirmDelEvent)="confirmDelAdvice()"
2314 2329
   content="您确认要删除此条意见吗?"
2315 2330
 ></app-dialog-delete>
2331
+<!-- 撤销报修 -->
2332
+<app-dialog-delete
2333
+  [delModal]="delBxModal"
2334
+  (hideDelModalEvent)="hideDelBxModal()"
2335
+  [btnLoading]="btnLoading"
2336
+  (confirmDelEvent)="confirmDelBx()"
2337
+  content="您确认要删除吗?"
2338
+></app-dialog-delete>
2316 2339
 <!-- 关注模态框 -->
2317 2340
 <div class="commonModal display_flex justify-content_flex-center align-items_center" *ngIf="commonModal">
2318 2341
   <div class="modalBody">
@@ -2589,8 +2612,7 @@
2589 2612
 		</div>
2590 2613
 		<div class="content">
2591 2614
 			<div class="list-template__bottom">
2592
-				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false"
2593
-					[nzLoading]="grossLoading">
2615
+				<nz-table class="list-template__nzTable" [nzData]="viewData" nzSize="middle" [nzShowPagination]="false">
2594 2616
 					<thead>
2595 2617
 						<tr class="thead">
2596 2618
 							<th>申请单类型</th>

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

@@ -87,6 +87,11 @@
87 87
       top: -10px;
88 88
       z-index: 9;
89 89
     }
90
+    .pos-btn:focus,.pos-btn:hover{
91
+      color: rgba(0, 0, 0, 0.65)!important;
92
+      background-color: #fff!important;
93
+      border-color: #d9d9d9!important;
94
+    }
90 95
   }
91 96
 
92 97
   .addRemarks {

+ 104 - 19
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -33,7 +33,7 @@ import {
33 33
   startOfDay,
34 34
   endOfDay,
35 35
   parse,
36
-	subHours 
36
+	subHours
37 37
 } from "date-fns";
38 38
 import { SourceId } from "src/app/type/types";
39 39
 import cloneDeep from 'lodash-es/cloneDeep'
@@ -116,6 +116,7 @@ export class HushijiandanComponent implements OnInit {
116 116
   searchAccountSubject = new Subject(); //查工号防抖
117 117
   searchTabInpSubject = new Subject(); //左侧查患者信息和检查信息防抖
118 118
   otherSearchChangeSubject = new Subject(); //其他建单搜索防抖
119
+  inspectSubject = new Subject();
119 120
   isYyInspect = false; //需要预约检查
120 121
   inspectAndPatientTransportConfig:any = {timeMod: 30};
121 122
   constructor(
@@ -202,6 +203,9 @@ export class HushijiandanComponent implements OnInit {
202 203
     this.otherSearchChangeSubject.pipe(debounceTime(500)).subscribe((v) => {
203 204
       this.getDeptTaskType(v);
204 205
     });
206
+    this.inspectSubject.pipe(debounceTime(500)).subscribe((v) => {
207
+      this.refreshInspectList();
208
+    });
205 209
 
206 210
     this.getTodayNum();
207 211
     this.initLogin();
@@ -336,7 +340,7 @@ export class HushijiandanComponent implements OnInit {
336 340
 		    }
337 341
 		  });
338 342
 	}
339
-	
343
+
340 344
 	// 新增申请单自选类型
341 345
 	applicationType:any;
342 346
 	isPathologyVisible:any = false;
@@ -348,18 +352,18 @@ export class HushijiandanComponent implements OnInit {
348 352
 			this.submitPathlogyForm()
349 353
 		}
350 354
 	}
351
-	
355
+
352 356
 	// 取消新增申请单自选类型
353 357
 	handlePathologyCancel(){
354 358
 		this.applicationType = null
355 359
 		this.isPathologyVisible = false
356 360
 	}
357
-	
361
+
358 362
 	// 确定新增申请单自选类型
359 363
 	handlePathologyOk(){
360 364
 		this.submitPathlogyForm()
361 365
 	}
362
-	
366
+
363 367
 	// 新增申请单自选类型
364 368
 	submitPathlogyForm(){
365 369
 		if(this.openType=='btn'){
@@ -387,7 +391,7 @@ export class HushijiandanComponent implements OnInit {
387 391
 			this.pathologyModal = true
388 392
 		});
389 393
 	}
390
-	
394
+
391 395
 	// 手术排程-病理申请单
392 396
 	openType:any;
393 397
 	scheduleItem:any;
@@ -463,7 +467,7 @@ export class HushijiandanComponent implements OnInit {
463 467
 			this.multiDialog = true
464 468
 		});
465 469
 	}
466
-	
470
+
467 471
 	// 获取病理申请单最新数据
468 472
 	getPathologyData(){
469 473
 		if(this.openType=='btn'){
@@ -501,7 +505,7 @@ export class HushijiandanComponent implements OnInit {
501 505
 			}
502 506
 		})
503 507
 	}
504
-	
508
+
505 509
 	// 申请单号点击
506 510
 	itemClick(item){
507 511
 		this.detailId = item.id
@@ -519,7 +523,7 @@ export class HushijiandanComponent implements OnInit {
519 523
 			}
520 524
 		},200)
521 525
 	}
522
-	
526
+
523 527
 	// 申请单作废
524 528
 	cancellationLoading:any = false;
525 529
 	cancellationModal:any = false;
@@ -527,7 +531,7 @@ export class HushijiandanComponent implements OnInit {
527 531
 		this.coopId = data.id
528 532
 		this.cancellationModal = true
529 533
 	}
530
-	
534
+
531 535
 	// 确定作废
532 536
 	confirmCancellation(){
533 537
 		this.cancellationLoading = true;
@@ -543,12 +547,12 @@ export class HushijiandanComponent implements OnInit {
543 547
 			}
544 548
 		});
545 549
 	}
546
-	
550
+
547 551
 	// 取消作废
548 552
 	cancelCancellation(){
549 553
 		this.cancellationModal = false
550 554
 	}
551
-	
555
+
552 556
 	hideModal(){
553 557
 		this.multiDialog = false
554 558
 	}
@@ -965,6 +969,7 @@ export class HushijiandanComponent implements OnInit {
965 969
   detailBx(data){
966 970
     this.router.navigateByUrl("nurse/detailBx/" + data.id);
967 971
   }
972
+
968 973
   // 查看报修信息弹窗
969 974
   bxPromptModalShow = false; //弹窗开关
970 975
   bData = ""; //查看详情携带所有数据
@@ -2989,11 +2994,7 @@ export class HushijiandanComponent implements OnInit {
2989 2994
       }
2990 2995
     }
2991 2996
     // 获取患者其他服务,护士端是否预约建单
2992
-    let appointmentZyBuildFlag = this.checkTypeLis.filter(
2993
-      (item) =>
2994
-        item.id == this.patientForm.controls.checkedType.value &&
2995
-        item.associationType.value == "patientTransport"
2996
-    );
2997
+    let appointmentZyBuildFlag = this.checkTypeLis.filter((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "patientTransport");
2997 2998
     if (appointmentZyBuildFlag.length) {
2998 2999
       this.appointmentZyBuildFlag =
2999 3000
         appointmentZyBuildFlag[0].appointmentOtherSwitch == 1 ? "1" : "0";
@@ -3020,9 +3021,12 @@ export class HushijiandanComponent implements OnInit {
3020 3021
     // 判断这个任务类型是否允许加急 start
3021 3022
     // 判断这个任务类型是否允许加急 end
3022 3023
     let that = this;
3024
+    let isInpect = this.checkTypeLis.some((item) => item.id == this.patientForm.controls.checkedType.value && item.associationType.value == "inspect");
3023 3025
     let postData = {
3024 3026
       taskTypeId: that.patientForm.controls.checkedType.value,
3025 3027
       patientCode: that.patientMsg.patientCode,
3028
+      startTime: isInpect ? format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
3029
+      endTime: isInpect ? format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss') : undefined,
3026 3030
     };
3027 3031
     this.cLoading = true;
3028 3032
     that.mainService
@@ -3954,7 +3958,7 @@ export class HushijiandanComponent implements OnInit {
3954 3958
         that.adviceListLength = data.totalNum || 0;
3955 3959
       });
3956 3960
   }
3957
-	
3961
+
3958 3962
 	startDate:any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
3959 3963
 	endDate:any = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
3960 3964
 	scheduleTime: any = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
@@ -3967,7 +3971,7 @@ export class HushijiandanComponent implements OnInit {
3967 3971
 			this.endDate = null
3968 3972
 		}
3969 3973
 	}
3970
-	
3974
+
3971 3975
   // 手术排程信息表格数据
3972 3976
   surgeryList: any = [];
3973 3977
   surgeryPageIndex: number = 1; //表格当前页码
@@ -4334,6 +4338,31 @@ export class HushijiandanComponent implements OnInit {
4334 4338
   hideDelAdviceModal() {
4335 4339
     this.delAdviceModal = false;
4336 4340
   }
4341
+  // 报修撤销模态框
4342
+  delBxModal: boolean = false;
4343
+  delBxData: any; //删除的data
4344
+  delBx(data) {
4345
+    this.delBxData = data;
4346
+    this.delBxModal = true;
4347
+  }
4348
+  confirmDelBx() {
4349
+    this.btnLoading = true;
4350
+    this.mainService
4351
+      .flowPost("incident/task/cancel", { incident: this.delBxData })
4352
+      .subscribe((result) => {
4353
+        if(result.state == 200){
4354
+          this.delBxModal = false;
4355
+          this.showPromptModal("撤销", true, "");
4356
+          this.getBxlb(true);
4357
+        }else{
4358
+          this.delBxModal = false;
4359
+          this.showPromptModal("撤销", false, result.msg);
4360
+        }
4361
+      });
4362
+  }
4363
+  hideDelBxModal() {
4364
+    this.delBxModal = false;
4365
+  }
4337 4366
   // 报修提示框
4338 4367
   reqModal: boolean = false;
4339 4368
   extraData:any = {};
@@ -5098,4 +5127,60 @@ export class HushijiandanComponent implements OnInit {
5098 5127
       this.noteList = result || [];
5099 5128
     });
5100 5129
   }
5130
+
5131
+  // 关联的检查-上一日,下一日,今天
5132
+  inspectToday:Date = new Date();
5133
+  // 上一日
5134
+  previousDayNew(){
5135
+    this.inspectToday = addDays(this.inspectToday, -1);
5136
+    this.inspectSubject.next();
5137
+  }
5138
+
5139
+  // 今天
5140
+  todayNew(){
5141
+    this.inspectToday = new Date();
5142
+    this.inspectSubject.next();
5143
+  }
5144
+
5145
+  // 下一日
5146
+  nextDayNew(){
5147
+    this.inspectToday = addDays(this.inspectToday, 1);
5148
+    this.inspectSubject.next();
5149
+  }
5150
+
5151
+  refreshInspectList(){
5152
+    let postData = {
5153
+      taskTypeId: this.patientForm.controls.checkedType.value,
5154
+      patientCode: this.patientMsg.patientCode,
5155
+      startTime: format(startOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
5156
+      endTime: format(endOfDay(this.inspectToday), 'yyyy-MM-dd HH:mm:ss'),
5157
+    };
5158
+    this.linkCheckLis = [];
5159
+    this.mainService
5160
+      .postCustom("nurse", "workOrder/buildTrip", postData)
5161
+      .subscribe((data) => {
5162
+        // 工单备注配置 end
5163
+        if (data.status == 200 && data.data && data.data.length) {
5164
+          let arr = [];
5165
+          data.data.forEach((e) => {
5166
+            arr.push({
5167
+              execDeptId: e.execDept.id,
5168
+              yyTime: e.yyTime,
5169
+              priority: e.priority,
5170
+              label:
5171
+                (e.yyTime || "") +
5172
+                " " +
5173
+                (this.deptDisplay == 2
5174
+                  ? e.execDept.deptalias
5175
+                  : e.execDept.dept) +
5176
+                " 进行 " +
5177
+                (e.inspectName || "检查"),
5178
+              value: e["id"],
5179
+              checked: false,
5180
+            });
5181
+          });
5182
+          this.linkCheckLis = arr;
5183
+        }
5184
+      });
5185
+  }
5101 5186
 }