Browse Source

快捷建单增加院区选择,系统配置增加是否显示报修的开关

seimin 2 years ago
parent
commit
8be9a20608

+ 17 - 1
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -146,6 +146,7 @@ export class HushijiandanComponent implements OnInit {
146 146
         this.deptDisplay = result.list[0].valueconfig;
147 147
       }
148 148
     });
149
+    this.getItsmIncident();
149 150
     this.getUpdateTipsForNurses();
150 151
     this.getSpecimenButton();
151 152
     this.getCloseTimeFlag();
@@ -366,6 +367,22 @@ export class HushijiandanComponent implements OnInit {
366 367
   closeExecModal() {
367 368
     this.execModal = false;
368 369
   }
370
+  // 获取系统配置,护士端是否显示报修
371
+  isShowBx = false;
372
+  getItsmIncident() {
373
+    let postData = {
374
+      idx: 0,
375
+      sum: 1,
376
+      systemConfiguration: { keyconfig: "itsmIncident" },
377
+    };
378
+    this.mainService
379
+      .getFetchDataList("simple/data", "systemConfiguration", postData)
380
+      .subscribe((result) => {
381
+        if (result.status == 200) {
382
+          this.isShowBx = result.list[0].valueconfig == 1;
383
+        }
384
+      });
385
+  }
369 386
   // 获取护士端更新提示
370 387
   updateTipsForNurses = "";
371 388
   getUpdateTipsForNurses() {
@@ -2424,7 +2441,6 @@ export class HushijiandanComponent implements OnInit {
2424 2441
 
2425 2442
   // 页面中间部分tab切换
2426 2443
   checkedTableType: string = "other";
2427
-  isShowBx = false;
2428 2444
   checkTable(type) {
2429 2445
     this.checkedTableType = type;
2430 2446
     if (type === "historySpecimen") {

+ 30 - 2
src/app/views/shortcut-build-orders/shortcut-build-orders.component.html

@@ -6,7 +6,7 @@
6 6
           <span class="label label--big">快捷建单名称:</span>
7 7
           <input nz-input class="formItem" placeholder="请输入关键字" [(ngModel)]="searchCriteria.name" />
8 8
         </div>
9
-        <div class="list-template__searchItem">
9
+        <!-- <div class="list-template__searchItem">
10 10
           <span class="label">起点科室:</span>
11 11
           <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
12 12
             nzPlaceHolder="请选择起点科室" [(ngModel)]="searchCriteria.startDepartment"
@@ -18,7 +18,7 @@
18 18
               <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
19 19
             </nz-option>
20 20
           </nz-select>
21
-        </div>
21
+        </div> -->
22 22
       </div>
23 23
       <div nz-col nzXl="12" class="list-template__btns">
24 24
         <button nz-button class="btn default" (click)='reset()'>重置</button>
@@ -99,6 +99,20 @@
99 99
             </nz-form-control>
100 100
           </nz-form-item>
101 101
           <nz-form-item>
102
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="startDepartmentHospital">起点科室院区</nz-form-label>
103
+            <nz-form-control nzErrorTip="请选择起点科室院区!">
104
+              <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="startDepartmentHospital" nzShowSearch
105
+                nzAllowClear nzPlaceHolder="请选择起点科室院区" nzServerSearch (ngModelChange)="changeStartHospital($event)">
106
+                <ng-container *ngFor="let data of userInfo.infoPermission.hospitals">
107
+                  <nz-option *ngIf="!isLoading" nzLabel="{{data.hosName}}" nzValue="{{data.id}}"></nz-option>
108
+                </ng-container>
109
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
110
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
111
+                </nz-option>
112
+              </nz-select>
113
+            </nz-form-control>
114
+          </nz-form-item>
115
+          <nz-form-item>
102 116
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="startDepartment">起点科室</nz-form-label>
103 117
             <nz-form-control nzErrorTip="请选择起点科室!">
104 118
               <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="startDepartment" nzShowSearch
@@ -114,6 +128,20 @@
114 128
             </nz-form-control>
115 129
           </nz-form-item>
116 130
           <nz-form-item>
131
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="endDepartmentHospital">终点科室院区</nz-form-label>
132
+            <nz-form-control nzErrorTip="请选择终点科室院区!">
133
+              <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="endDepartmentHospital" nzShowSearch
134
+                nzAllowClear nzPlaceHolder="请选择终点科室院区" nzServerSearch (ngModelChange)="changeEndHospital($event)">
135
+                <ng-container *ngFor="let data of userInfo.infoPermission.hospitals">
136
+                  <nz-option *ngIf="!isLoading" nzLabel="{{data.hosName}}" nzValue="{{data.id}}"></nz-option>
137
+                </ng-container>
138
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
139
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
140
+                </nz-option>
141
+              </nz-select>
142
+            </nz-form-control>
143
+          </nz-form-item>
144
+          <nz-form-item>
117 145
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="endDepartment">终点科室</nz-form-label>
118 146
             <nz-form-control nzErrorTip="请选择终点科室!">
119 147
               <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false" formControlName="endDepartment"

+ 1 - 1
src/app/views/shortcut-build-orders/shortcut-build-orders.component.less

@@ -107,7 +107,7 @@
107 107
         width: 100%;
108 108
         height: auto;
109 109
         padding: 18px 14px 0 14px;
110
-        max-height: 497px;
110
+        max-height: 550px;
111 111
         overflow-y: auto;
112 112
 
113 113
         .addForm {

+ 32 - 2
src/app/views/shortcut-build-orders/shortcut-build-orders.component.ts

@@ -235,6 +235,16 @@ export class ShortcutBuildOrdersComponent implements OnInit {
235 235
     this.isLoading = true;
236 236
     this.changeInpSubject.next([dept, type]);
237 237
   }
238
+  // 修改起点科室院区
239
+  changeStartHospital(e){
240
+    console.log(e);
241
+    this.validateForm.controls.startDepartment.setValue(null);
242
+  }
243
+  // 修改终点科室院区
244
+  changeEndHospital(e){
245
+    console.log(e);
246
+    this.validateForm.controls.endDepartment.setValue(null);
247
+  }
238 248
   // 搜索科室
239 249
   snum = 0;
240 250
   searchDepartment(dept, type) {
@@ -249,9 +259,25 @@ export class ShortcutBuildOrdersComponent implements OnInit {
249 259
       idx: 0,
250 260
       sum: 20,
251 261
     };
262
+    if (type === "form") {
263
+      if(this.validateForm.value.startDepartmentHospital){
264
+        data.department.hospital.id = this.validateForm.value.startDepartmentHospital;
265
+      }else{
266
+        this.department = [];
267
+        this.isLoading = false;
268
+        return;
269
+      }
270
+    }
252 271
     // 终点科室的科室类型为检验科
253 272
     if (type === "formEnd") {
254 273
       data.department.type.id = 282;
274
+      if(this.validateForm.value.endDepartmentHospital){
275
+        data.department.hospital.id = this.validateForm.value.endDepartmentHospital;
276
+      }else{
277
+        this.department1 = [];
278
+        this.isLoading = false;
279
+        return;
280
+      }
255 281
     }
256 282
     this.snum++;
257 283
     this.mainService
@@ -348,7 +374,9 @@ export class ShortcutBuildOrdersComponent implements OnInit {
348 374
     this.validateForm = this.fb.group({
349 375
       roundRobinName: [null, [Validators.required]],
350 376
       roundRobinType: [null, [Validators.required]],
377
+      startDepartmentHospital: [null, [Validators.required]],
351 378
       startDepartment: [null, [Validators.required]],
379
+      endDepartmentHospital: [null, [Validators.required]],
352 380
       endDepartment: [null, [Validators.required]],
353 381
     });
354 382
     this.validateForm.controls.roundRobinType.setValue(
@@ -417,6 +445,8 @@ export class ShortcutBuildOrdersComponent implements OnInit {
417 445
     this.coopId = data.id;
418 446
     this.createUser = data.createUserName; //创建人
419 447
     this.validateForm.controls.roundRobinName.setValue(data.title); //名称
448
+    this.validateForm.controls.startDepartmentHospital.setValue(data.startDeptHosId.toString());//起点科室院区
449
+    this.validateForm.controls.endDepartmentHospital.setValue(data.targetDeptHosId.toString());//终点科室院区
420 450
     let taskType$ = this.mainService.getFetchDataList(
421 451
       "configuration",
422 452
       "taskType",
@@ -437,7 +467,7 @@ export class ShortcutBuildOrdersComponent implements OnInit {
437 467
     startDeptArr.push({ id: startDept, dept: startDeptShow });
438 468
     let startDept$ = this.mainService.getFetchDataList("data", "department", {
439 469
       department: {
440
-        hospital: { id: data.hospital },
470
+        hospital: { id: data.startDeptHosId },
441 471
         type: { id: 383 }, //科室类型为中转科室
442 472
       },
443 473
       idx: 0,
@@ -453,7 +483,7 @@ export class ShortcutBuildOrdersComponent implements OnInit {
453 483
     });
454 484
     let targetDept$ = this.mainService.getFetchDataList("data", "department", {
455 485
       department: {
456
-        hospital: { id: data.hospital },
486
+        hospital: { id: data.targetDeptHosId },
457 487
         type: { id: 282 },
458 488
       },
459 489
       idx: 0,

+ 10 - 0
src/app/views/sys-config/sys-config.component.html

@@ -112,6 +112,16 @@
112 112
               [nzAutosize]="{ minRows: 3, maxRows: 3 }" maxlength="50"></textarea>
113 113
           </nz-form-control>
114 114
         </nz-form-item>
115
+        <nz-form-item class="formItem">
116
+          <nz-form-label [nzSpan]="12" nzFor="itsmIncident" nzRequired class="label">护士端是否显示报修
117
+          </nz-form-label>
118
+          <nz-form-control [nzSpan]="12" nzErrorTip="护士端是否显示报修是必填项!">
119
+            <nz-radio-group formControlName="itsmIncident">
120
+              <label nz-radio nzValue="1">是</label>
121
+              <label nz-radio nzValue="0">否</label>
122
+            </nz-radio-group>
123
+          </nz-form-control>
124
+        </nz-form-item>
115 125
       </div>
116 126
     </form>
117 127
   </overlay-scrollbars>

+ 10 - 0
src/app/views/sys-config/sys-config.component.ts

@@ -42,6 +42,7 @@ export class SysConfigComponent implements OnInit {
42 42
       specimenButton: [null, [Validators.required]],
43 43
       deptDisplay: [null, [Validators.required]],
44 44
       orderClearUserSwitch: [null, [Validators.required]],
45
+      itsmIncident: [null, [Validators.required]],
45 46
       workOrderSettings: [5, [Validators.required]],
46 47
       nurseDeptSwitchTip: [0, [Validators.required]],
47 48
       updateTipsForNurses: [""],
@@ -103,6 +104,7 @@ export class SysConfigComponent implements OnInit {
103 104
         item.keyconfig === "specimenButton" ||
104 105
         item.keyconfig === "deptDisplay" ||
105 106
         item.keyconfig === "orderClearUserSwitch" ||
107
+        item.keyconfig === "itsmIncident" ||
106 108
         item.keyconfig === "workOrderSettings" ||
107 109
         item.keyconfig === "nurseDeptSwitchTip" ||
108 110
         item.keyconfig === "updateTipsForNurses" ||
@@ -121,6 +123,9 @@ export class SysConfigComponent implements OnInit {
121 123
       } else if (item.keyconfig === "orderClearUserSwitch") {
122 124
         item.valueconfig =
123 125
           this.validateForm.controls.orderClearUserSwitch.value;
126
+      } else if (item.keyconfig === "itsmIncident") {
127
+        item.valueconfig =
128
+          this.validateForm.controls.itsmIncident.value;
124 129
       } else if (item.keyconfig === "workOrderSettings") {
125 130
         item.valueconfig = this.validateForm.controls.workOrderSettings.value;
126 131
       } else if (item.keyconfig === "nurseDeptSwitchTip") {
@@ -194,6 +199,11 @@ export class SysConfigComponent implements OnInit {
194 199
                     c[1]
195 200
                   );
196 201
                   break;
202
+                case "itsmIncident":
203
+                  this.validateForm.controls.itsmIncident.setValue(
204
+                    c[1]
205
+                  );
206
+                  break;
197 207
                 case "workOrderSettings":
198 208
                   this.validateForm.controls.workOrderSettings.setValue(c[1]);
199 209
                   break;