浏览代码

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

seimin 2 年之前
父节点
当前提交
a54978eb0d

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

@@ -194,7 +194,7 @@
194
           <div
194
           <div
195
             class="nurseTitle display_flex justify-content_space-between align-items_center"
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
             <p class="updateTipsForNurses red">{{ updateTipsForNurses }}</p>
198
             <p class="updateTipsForNurses red">{{ updateTipsForNurses }}</p>
199
             <div class="nurseCode" (click)="showNurseCode()">
199
             <div class="nurseCode" (click)="showNurseCode()">
200
               <i class="nurseCodeIcon icon_transport transport-erweima"></i
200
               <i class="nurseCodeIcon icon_transport transport-erweima"></i
@@ -566,9 +566,12 @@
566
                     nzSpan="4"
566
                     nzSpan="4"
567
                     class="txtC h100p alignR display_flex justify-content_flex-end align-items_center"
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
                     </div>
571
                     </div>
572
+                    <div class="btn txtC" *ngIf="mainRole&&loginUser.usertype.value == 1" (click)="toOrder()">
573
+                      查看工单
574
+                    </div>
572
                   </div>
575
                   </div>
573
                 </div>
576
                 </div>
574
               </div>
577
               </div>

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

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

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

@@ -158,6 +158,7 @@ export class HushijiandanComponent implements OnInit {
158
     });
158
     });
159
     this.currentHospital = this.tool.getCurrentHospital();
159
     this.currentHospital = this.tool.getCurrentHospital();
160
 
160
 
161
+    this.getTodayNum();
161
     this.initLogin();
162
     this.initLogin();
162
     this.getDeptTaskType();
163
     this.getDeptTaskType();
163
     this.initForm();
164
     this.initForm();
@@ -230,6 +231,22 @@ export class HushijiandanComponent implements OnInit {
230
   specimenWorkOrderMsg: any = {}; //急标普标数量&信息
231
   specimenWorkOrderMsg: any = {}; //急标普标数量&信息
231
   jpDrugsWKOMsg: any = {}; //药品静配提示信息
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
   areas: any = []; //区域(所属院区)列表
251
   areas: any = []; //区域(所属院区)列表
235
   getArea() {
252
   getArea() {
@@ -2513,7 +2530,7 @@ export class HushijiandanComponent implements OnInit {
2513
         },
2530
         },
2514
         packid:
2531
         packid:
2515
           this.historyDrugsbagCodeSearchInp === ""
2532
           this.historyDrugsbagCodeSearchInp === ""
2516
-            ? ''
2533
+            ? ""
2517
             : this.historyDrugsbagCodeSearchInp,
2534
             : this.historyDrugsbagCodeSearchInp,
2518
         platform: 2,
2535
         platform: 2,
2519
       },
2536
       },
@@ -2968,6 +2985,10 @@ export class HushijiandanComponent implements OnInit {
2968
   toMain() {
2985
   toMain() {
2969
     this.router.navigateByUrl("main");
2986
     this.router.navigateByUrl("main");
2970
   }
2987
   }
2988
+  // 查看工单
2989
+  toOrder() {
2990
+    this.router.navigateByUrl(`main/orderManagement`);
2991
+  }
2971
 
2992
 
2972
   // 退出
2993
   // 退出
2973
   logOut(): void {
2994
   logOut(): void {
@@ -3079,12 +3100,12 @@ export class HushijiandanComponent implements OnInit {
3079
   }
3100
   }
3080
 
3101
 
3081
   mainRole: boolean = false; //回到系统管理权限
3102
   mainRole: boolean = false; //回到系统管理权限
3103
+  mainRoleBtnName = "回到系统管理"; //回到系统管理名字
3082
   initRole() {
3104
   initRole() {
3083
     let menus = JSON.parse(localStorage.getItem("menu"));
3105
     let menus = JSON.parse(localStorage.getItem("menu"));
3084
-    let that = this;
3085
     console.log("菜单数量" + menus.length);
3106
     console.log("菜单数量" + menus.length);
3086
     if (menus.length >= 2) {
3107
     if (menus.length >= 2) {
3087
-      that.mainRole = true;
3108
+      this.mainRole = true;
3088
       return;
3109
       return;
3089
     }
3110
     }
3090
   }
3111
   }

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

@@ -40,7 +40,7 @@
40
         <div class="list-template__searchItem">
40
         <div class="list-template__searchItem">
41
           <span class="label">申请科室</span>:
41
           <span class="label">申请科室</span>:
42
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
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
             <ng-container *ngFor="let option of alldepart">
44
             <ng-container *ngFor="let option of alldepart">
45
               <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
45
               <nz-option *ngIf="!isLoading" [nzLabel]="option.dept" [nzValue]="option.id"></nz-option>
46
             </ng-container>
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
 export class OrderManagementComponent implements OnInit {
13
 export class OrderManagementComponent implements OnInit {
14
   constructor(
14
   constructor(
15
-    private route: ActivatedRoute,
15
+    public route: ActivatedRoute,
16
     private router: Router,
16
     private router: Router,
17
     private mainService: MainService,
17
     private mainService: MainService,
18
     private tool: ToolService
18
     private tool: ToolService
@@ -36,9 +36,10 @@ export class OrderManagementComponent implements OnInit {
36
     this.getAllHos();
36
     this.getAllHos();
37
     this.getGdStates();
37
     this.getGdStates();
38
   }
38
   }
39
-
39
+  loginUser: any = localStorage.getItem("user")
40
+    ? JSON.parse(localStorage.getItem("user")).user
41
+    : null; //登录人信息
40
   listOfData: any[] = []; //表格数据
42
   listOfData: any[] = []; //表格数据
41
-
42
   modal: boolean = false; //回复模态框
43
   modal: boolean = false; //回复模态框
43
   coopId: string; //表格中执行操作的id
44
   coopId: string; //表格中执行操作的id
44
   hospital: string; //选中院区
45
   hospital: string; //选中院区
@@ -94,7 +95,10 @@ export class OrderManagementComponent implements OnInit {
94
     this.association = null;
95
     this.association = null;
95
     this.worker = null;
96
     this.worker = null;
96
     this.tasktype = null;
97
     this.tasktype = null;
97
-    this.department = null;
98
+    if (this.loginUser.usertype.value != 1) {
99
+      // 人员类型不是护士
100
+      this.department = null;
101
+    }
98
     this.gdcode = "";
102
     this.gdcode = "";
99
     this.gdState = null;
103
     this.gdState = null;
100
     this.specialCloseFlag = null;
104
     this.specialCloseFlag = null;
@@ -107,7 +111,6 @@ export class OrderManagementComponent implements OnInit {
107
   getAllHos() {
111
   getAllHos() {
108
     this.hospital = this.tool.getCurrentHospital().id + "";
112
     this.hospital = this.tool.getCurrentHospital().id + "";
109
     this.changeHos();
113
     this.changeHos();
110
-    this.getList();
111
   }
114
   }
112
   // 修改院区获取对应科室,工单类型,执行支助人员
115
   // 修改院区获取对应科室,工单类型,执行支助人员
113
   changeHos() {
116
   changeHos() {
@@ -124,8 +127,7 @@ export class OrderManagementComponent implements OnInit {
124
   // 获取关联类型
127
   // 获取关联类型
125
   getAssociation() {
128
   getAssociation() {
126
     let that = this;
129
     let that = this;
127
-    console.log(that.mainService
128
-      .getDictionary("list", "association_types"))
130
+    console.log(that.mainService.getDictionary("list", "association_types"));
129
     that.mainService
131
     that.mainService
130
       .getDictionary("list", "association_types")
132
       .getDictionary("list", "association_types")
131
       .subscribe((data) => {
133
       .subscribe((data) => {
@@ -268,6 +270,14 @@ export class OrderManagementComponent implements OnInit {
268
       .subscribe((data) => {
270
       .subscribe((data) => {
269
         this.alldepart = data.list;
271
         this.alldepart = data.list;
270
         this.isLoading = false;
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
   enableProdMode();
8
   enableProdMode();
9
   if (window) {
9
   if (window) {
10
     window.console.log = function () { };
10
     window.console.log = function () { };
11
-    console.info('v2.4.4');
11
+    console.info('v2.4.5');
12
   }
12
   }
13
 }
13
 }
14
 platformBrowserDynamic().bootstrapModule(AppModule)
14
 platformBrowserDynamic().bootstrapModule(AppModule)