Browse Source

护士端添加当日建单数和回到系统管理按钮文字

seimin 2 years ago
parent
commit
a54978eb0d

+ 5 - 2
src/app/views/hushijiandan/hushijiandan.component.html

@@ -194,7 +194,7 @@
194 194
           <div
195 195
             class="nurseTitle display_flex justify-content_space-between align-items_center"
196 196
           >
197
-            <span>护士端</span>
197
+            <span>护士端<span class="todayNum">当日建单数:{{todayNum}}</span></span>
198 198
             <p class="updateTipsForNurses red">{{ updateTipsForNurses }}</p>
199 199
             <div class="nurseCode" (click)="showNurseCode()">
200 200
               <i class="nurseCodeIcon icon_transport transport-erweima"></i
@@ -566,9 +566,12 @@
566 566
                     nzSpan="4"
567 567
                     class="txtC h100p alignR display_flex justify-content_flex-end align-items_center"
568 568
                   >
569
-                    <div class="btn txtC" *ngIf="mainRole" (click)="toMain()">
569
+                    <div class="btn txtC" *ngIf="mainRole&&loginUser.usertype.value != 1" (click)="toMain()">
570 570
                       回到系统管理
571 571
                     </div>
572
+                    <div class="btn txtC" *ngIf="mainRole&&loginUser.usertype.value == 1" (click)="toOrder()">
573
+                      查看工单
574
+                    </div>
572 575
                   </div>
573 576
                 </div>
574 577
               </div>

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

@@ -770,6 +770,10 @@
770 770
           font-size: 22px;
771 771
           color: #333;
772 772
           flex: 1;
773
+          .todayNum{
774
+            font-size: 16px;
775
+            margin-left: 16px;
776
+          }
773 777
 
774 778
           .updateTipsForNurses {
775 779
             margin: 0;

+ 24 - 3
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -158,6 +158,7 @@ export class HushijiandanComponent implements OnInit {
158 158
     });
159 159
     this.currentHospital = this.tool.getCurrentHospital();
160 160
 
161
+    this.getTodayNum();
161 162
     this.initLogin();
162 163
     this.getDeptTaskType();
163 164
     this.initForm();
@@ -230,6 +231,22 @@ export class HushijiandanComponent implements OnInit {
230 231
   specimenWorkOrderMsg: any = {}; //急标普标数量&信息
231 232
   jpDrugsWKOMsg: any = {}; //药品静配提示信息
232 233
 
234
+  // 获取当日建单总数
235
+  todayNum = ''; //当日建单总数
236
+  getTodayNum() {
237
+    this.mainService
238
+      .getFetchDataList("nurse", "workOrder", {
239
+        idx: 0,
240
+        sum: 1,
241
+        workOrder: { createDept: this.loginUser.dept.id },
242
+      })
243
+      .subscribe((data) => {
244
+        if (data.status == 200) {
245
+          this.todayNum = data.totalNum || 0;
246
+        }
247
+      });
248
+  }
249
+
233 250
   // 获取报修区域(所属院区)
234 251
   areas: any = []; //区域(所属院区)列表
235 252
   getArea() {
@@ -2513,7 +2530,7 @@ export class HushijiandanComponent implements OnInit {
2513 2530
         },
2514 2531
         packid:
2515 2532
           this.historyDrugsbagCodeSearchInp === ""
2516
-            ? ''
2533
+            ? ""
2517 2534
             : this.historyDrugsbagCodeSearchInp,
2518 2535
         platform: 2,
2519 2536
       },
@@ -2968,6 +2985,10 @@ export class HushijiandanComponent implements OnInit {
2968 2985
   toMain() {
2969 2986
     this.router.navigateByUrl("main");
2970 2987
   }
2988
+  // 查看工单
2989
+  toOrder() {
2990
+    this.router.navigateByUrl(`main/orderManagement`);
2991
+  }
2971 2992
 
2972 2993
   // 退出
2973 2994
   logOut(): void {
@@ -3079,12 +3100,12 @@ export class HushijiandanComponent implements OnInit {
3079 3100
   }
3080 3101
 
3081 3102
   mainRole: boolean = false; //回到系统管理权限
3103
+  mainRoleBtnName = "回到系统管理"; //回到系统管理名字
3082 3104
   initRole() {
3083 3105
     let menus = JSON.parse(localStorage.getItem("menu"));
3084
-    let that = this;
3085 3106
     console.log("菜单数量" + menus.length);
3086 3107
     if (menus.length >= 2) {
3087
-      that.mainRole = true;
3108
+      this.mainRole = true;
3088 3109
       return;
3089 3110
     }
3090 3111
   }

+ 1 - 1
src/app/views/order-management/order-management.component.html

@@ -40,7 +40,7 @@
40 40
         <div class="list-template__searchItem">
41 41
           <span class="label">申请科室</span>:
42 42
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
43
-            (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择申请科室" [(ngModel)]="department">
43
+            (nzOnSearch)="changeInp($event)" nzAllowClear nzPlaceHolder="请选择申请科室" [(ngModel)]="department" [nzDisabled]="loginUser.usertype.value == 1">
44 44
             <ng-container *ngFor="let option of alldepart">
45 45
               <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
46 46
             </ng-container>

+ 17 - 7
src/app/views/order-management/order-management.component.ts

@@ -12,7 +12,7 @@ import { debounceTime } from "rxjs/operators";
12 12
 })
13 13
 export class OrderManagementComponent implements OnInit {
14 14
   constructor(
15
-    private route: ActivatedRoute,
15
+    public route: ActivatedRoute,
16 16
     private router: Router,
17 17
     private mainService: MainService,
18 18
     private tool: ToolService
@@ -36,9 +36,10 @@ export class OrderManagementComponent implements OnInit {
36 36
     this.getAllHos();
37 37
     this.getGdStates();
38 38
   }
39
-
39
+  loginUser: any = localStorage.getItem("user")
40
+    ? JSON.parse(localStorage.getItem("user")).user
41
+    : null; //登录人信息
40 42
   listOfData: any[] = []; //表格数据
41
-
42 43
   modal: boolean = false; //回复模态框
43 44
   coopId: string; //表格中执行操作的id
44 45
   hospital: string; //选中院区
@@ -94,7 +95,10 @@ export class OrderManagementComponent implements OnInit {
94 95
     this.association = null;
95 96
     this.worker = null;
96 97
     this.tasktype = null;
97
-    this.department = null;
98
+    if (this.loginUser.usertype.value != 1) {
99
+      // 人员类型不是护士
100
+      this.department = null;
101
+    }
98 102
     this.gdcode = "";
99 103
     this.gdState = null;
100 104
     this.specialCloseFlag = null;
@@ -107,7 +111,6 @@ export class OrderManagementComponent implements OnInit {
107 111
   getAllHos() {
108 112
     this.hospital = this.tool.getCurrentHospital().id + "";
109 113
     this.changeHos();
110
-    this.getList();
111 114
   }
112 115
   // 修改院区获取对应科室,工单类型,执行支助人员
113 116
   changeHos() {
@@ -124,8 +127,7 @@ export class OrderManagementComponent implements OnInit {
124 127
   // 获取关联类型
125 128
   getAssociation() {
126 129
     let that = this;
127
-    console.log(that.mainService
128
-      .getDictionary("list", "association_types"))
130
+    console.log(that.mainService.getDictionary("list", "association_types"));
129 131
     that.mainService
130 132
       .getDictionary("list", "association_types")
131 133
       .subscribe((data) => {
@@ -268,6 +270,14 @@ export class OrderManagementComponent implements OnInit {
268 270
       .subscribe((data) => {
269 271
         this.alldepart = data.list;
270 272
         this.isLoading = false;
273
+        if (dept === undefined && this.loginUser.usertype.value == 1) {
274
+          // 初次渲染,人员类型是护士,则回显申请科室,并禁用
275
+          this.alldepart = [this.loginUser.dept];
276
+          this.department = this.loginUser.dept.id;
277
+          this.getList();
278
+        }else{
279
+          this.getList();
280
+        }
271 281
       });
272 282
   }
273 283
 

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.4');
11
+    console.info('v2.4.5');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)