浏览代码

药房2临时版本

seimin 3 年之前
父节点
当前提交
de13fcac1a

+ 5 - 0
src/app/app-routing.module.ts

@@ -39,6 +39,11 @@ const routes: Routes = [
39 39
     loadChildren: () => import('./views/pharmacy/pharmacy.module').then(m => m.PharmacyModule),
40 40
     canActivate: [PharmacyGuard]
41 41
   },
42
+  {
43
+    path: 'pharmacy2',//药房端2
44
+    loadChildren: () => import('./views/pharmacy2/pharmacy2.module').then(m => m.Pharmacy2Module),
45
+    canActivate: [PharmacyGuard]
46
+  },
42 47
   { path: '**', redirectTo: 'main/home' }
43 48
 
44 49
 ];

+ 11 - 0
src/app/views/pharmacy2/pharmacy2-routing.module.ts

@@ -0,0 +1,11 @@
1
+import { NgModule } from "@angular/core";
2
+import { Routes, RouterModule } from "@angular/router";
3
+import { Pharmacy2Component } from "./pharmacy2.component";
4
+
5
+const routes: Routes = [{ path: "", component: Pharmacy2Component }];
6
+
7
+@NgModule({
8
+  imports: [RouterModule.forChild(routes)],
9
+  exports: [RouterModule],
10
+})
11
+export class Pharmacy2RoutingModule {}

+ 586 - 0
src/app/views/pharmacy2/pharmacy2.component.html

@@ -0,0 +1,586 @@
1
+<div class="pharmacy">
2
+  <!-- 头部 start -->
3
+  <div class="pharmacy-header">
4
+    <div class="pharmacy-logo">
5
+      <img
6
+        src="./../../assets/images/login_logo.png"
7
+        class="pharmacy-logo__img"
8
+        alt=""
9
+      />
10
+      <h1 class="pharmacy-logo__name">大势医院输送保障管理平台</h1>
11
+    </div>
12
+    <div class="pharmacy-name">
13
+      <h2 class="pharmacy-name__title">药房</h2>
14
+      <div class="pharmacy-name__total">
15
+        <div>今日药单量:<strong>253</strong></div>
16
+        <div>今日已完成:<strong>248</strong></div>
17
+      </div>
18
+    </div>
19
+    <div class="userInfo">
20
+      <div class="wel">欢迎您:</div>
21
+      <div class="user">
22
+        <img src="../../assets/images/icon_keshi.png" alt="" />
23
+        <span *ngIf="deptDisplay">{{
24
+          deptDisplay == 2 ? loginUser.dept.deptalias : loginUser.dept.dept
25
+        }}</span>
26
+      </div>
27
+      <div class="userInfo-wrap">
28
+        <div class="logOut" (click)="changeKsNow()">切换科室</div>
29
+        <div class="logOut" (click)="logOut()">退出</div>
30
+      </div>
31
+    </div>
32
+  </div>
33
+  <!-- 头部 end -->
34
+  <!-- 主体部分 start -->
35
+  <div class="pharmacy-main">
36
+    <!-- 待配药 start -->
37
+    <div class="pharmacy-main__list pharmacy-main__print">
38
+      <!-- 标题 start -->
39
+      <div class="pharmacy-main__title">
40
+        <strong>药品计费(待配药)(0)</strong>
41
+        <!-- <button nz-button class="pharmacy-main__printAll" (click)="print()"
42
+            [disabled]="printPharmacyList.length===0">批量打印</button> -->
43
+        <span class="autoUpdate">{{ logTime }}秒</span>
44
+      </div>
45
+      <!-- 标题 end -->
46
+      <!-- 搜索框 start -->
47
+      <div class="pharmacy-main__search">
48
+        <div class="pharmacy-main__searchInput">
49
+          <input
50
+            nz-input
51
+            placeholder="请输入关键字"
52
+            [(ngModel)]="printPharmacySearchKey"
53
+          />
54
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(1)">
55
+            <i nz-icon nzType="search"></i>
56
+            <span>搜索</span>
57
+          </div>
58
+        </div>
59
+      </div>
60
+      <!-- 搜索框 end -->
61
+      <!-- 列表 start -->
62
+      <overlay-scrollbars #osComponentRef1 class="pharmacy-main__selectionWrap">
63
+        <div *ngIf="!loading1" style="height: 100%">
64
+          <div
65
+            class="pharmacy-main__selection"
66
+            *ngFor="let item of printPharmacyList"
67
+          >
68
+            <div class="pharmacy-main__selectionInfo">
69
+              <div class="pharmacy-main__selectionItem">
70
+                <strong>{{ item.target ? item.target.dept : "" }}</strong>
71
+              </div>
72
+              <div class="pharmacy-main__selectionItem">
73
+                <span>单号:{{ item.packid }}</span>
74
+              </div>
75
+              <div class="pharmacy-main__selectionItem">
76
+                <span
77
+                  >记账时间:<ng-container *ngIf="item.bagTime">{{
78
+                    item.bagTime | date: "MM-dd HH:mm"
79
+                  }}</ng-container
80
+                  ><ng-container *ngIf="!item.bagTime">无</ng-container></span
81
+                >
82
+              </div>
83
+            </div>
84
+          </div>
85
+          <div
86
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
87
+            *ngIf="printPharmacyList.length === 0"
88
+          >
89
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
90
+          </div>
91
+          <div
92
+            (click)="loadMore(1)"
93
+            class="pharmacy-main__selection pharmacy-main__selection--more"
94
+            *ngIf="printPharmacyFlag"
95
+          >
96
+            <div class="pharmacy-main__selectionInfo">
97
+              <i
98
+                nz-icon
99
+                nzType="loading"
100
+                nzTheme="outline"
101
+                class="pharmacy-main__selection--icon"
102
+                *ngIf="printPharmacyLoad"
103
+              ></i
104
+              >查看更多
105
+            </div>
106
+          </div>
107
+        </div>
108
+        <div
109
+          *ngIf="loading1"
110
+          style="height: calc(100vh - 212px); min-height: 556px"
111
+        >
112
+          <div
113
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
114
+          >
115
+            <div class="loadingFullInner">
116
+              <img src="../../../assets/images/loading.gif" alt="" />
117
+              <div>加载中...</div>
118
+            </div>
119
+          </div>
120
+        </div>
121
+      </overlay-scrollbars>
122
+      <!-- 列表 end -->
123
+    </div>
124
+    <!-- 待配药 end -->
125
+    <!-- 配药中 start -->
126
+    <div class="pharmacy-main__list pharmacy-main__waitDelivery">
127
+      <!-- 标题 start -->
128
+      <div class="pharmacy-main__title">
129
+        <strong>配药中(3)</strong>
130
+        <span class="autoUpdate">{{ logTime }}秒</span>
131
+      </div>
132
+      <!-- 标题 end -->
133
+      <!-- 搜索框 start -->
134
+      <div class="pharmacy-main__search">
135
+        <div class="pharmacy-main__searchInput">
136
+          <input
137
+            nz-input
138
+            placeholder="请输入关键字"
139
+            [(ngModel)]="waitPharmacySearchKey"
140
+          />
141
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(2)">
142
+            <i nz-icon nzType="search"></i>
143
+            <span>搜索</span>
144
+          </div>
145
+        </div>
146
+      </div>
147
+      <!-- 搜索框 end -->
148
+      <!-- 列表 start -->
149
+      <overlay-scrollbars #osComponentRef2 class="pharmacy-main__selectionWrap">
150
+        <div *ngIf="!loading2" style="height: 100%">
151
+          <div
152
+            class="pharmacy-main__selection"
153
+            *ngFor="let item of waitPharmacyList; let i = index"
154
+          >
155
+            <div class="pharmacy-main__selectionInfo">
156
+              <div class="pharmacy-main__selectionItem">
157
+                <strong>{{ item.target ? item.target.dept : "" }}</strong>
158
+              </div>
159
+              <div class="pharmacy-main__selectionItem">
160
+                <span>单号:{{ item.packid }}</span>
161
+              </div>
162
+              <div class="pharmacy-main__selectionItem">
163
+                <span
164
+                  >记账时间:<ng-container *ngIf="item.bagTime">{{
165
+                    item.bagTime | date: "MM-dd HH:mm"
166
+                  }}</ng-container
167
+                  ><ng-container *ngIf="!item.bagTime">无</ng-container></span
168
+                >
169
+              </div>
170
+              <div class="pharmacy-main__selectionItem">
171
+                <span *ngIf="i == 0">10:10 由 亚祥 配药</span>
172
+                <span *ngIf="i == 1">10:10 由 森源 配药</span>
173
+                <span *ngIf="i == 2">10:10 由 王满 配药</span>
174
+                <span *ngIf="i == 3">10:10 由 小平 配药</span>
175
+              </div>
176
+            </div>
177
+          </div>
178
+          <div
179
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
180
+            *ngIf="waitPharmacyList.length === 0"
181
+          >
182
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
183
+          </div>
184
+          <div
185
+            (click)="loadMore(2)"
186
+            class="pharmacy-main__selection pharmacy-main__selection--more"
187
+            *ngIf="waitPharmacyFlag"
188
+          >
189
+            <div class="pharmacy-main__selectionInfo">
190
+              <i
191
+                nz-icon
192
+                nzType="loading"
193
+                nzTheme="outline"
194
+                class="pharmacy-main__selection--icon"
195
+                *ngIf="waitPharmacyLoad"
196
+              ></i
197
+              >查看更多
198
+            </div>
199
+          </div>
200
+        </div>
201
+        <div
202
+          *ngIf="loading2"
203
+          style="height: calc(100vh - 212px); min-height: 556px"
204
+        >
205
+          <div
206
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
207
+          >
208
+            <div class="loadingFullInner">
209
+              <img src="../../../assets/images/loading.gif" alt="" />
210
+              <div>加载中...</div>
211
+            </div>
212
+          </div>
213
+        </div>
214
+      </overlay-scrollbars>
215
+      <!-- 列表 end -->
216
+    </div>
217
+    <!-- 配药中 end -->
218
+    <!-- 核对中 start -->
219
+    <div class="pharmacy-main__list pharmacy-main__delivery">
220
+      <!-- 标题 start -->
221
+      <div class="pharmacy-main__title">
222
+        <strong>核对中(3)</strong>
223
+        <span class="autoUpdate">{{ logTime }}秒</span>
224
+      </div>
225
+      <!-- 标题 end -->
226
+      <!-- 搜索框 start -->
227
+      <div class="pharmacy-main__search">
228
+        <div class="pharmacy-main__searchInput">
229
+          <input
230
+            nz-input
231
+            placeholder="请输入关键字"
232
+            [(ngModel)]="pharmacySearchKey"
233
+          />
234
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
235
+            <i nz-icon nzType="search"></i>
236
+            <span>搜索</span>
237
+          </div>
238
+        </div>
239
+      </div>
240
+      <!-- 搜索框 end -->
241
+      <!-- 列表 start -->
242
+      <overlay-scrollbars #osComponentRef3 class="pharmacy-main__selectionWrap">
243
+        <div *ngIf="!loading3" style="height: 100%">
244
+          <div
245
+            class="pharmacy-main__selection"
246
+            *ngFor="let item of waitPharmacyList; let i = index"
247
+          >
248
+            <div class="pharmacy-main__selectionInfo">
249
+              <div class="pharmacy-main__selectionItem">
250
+                <strong>{{ item.target ? item.target.dept : "" }}</strong>
251
+              </div>
252
+              <div class="pharmacy-main__selectionItem">
253
+                <span>单号:{{ item.packid }}</span>
254
+              </div>
255
+              <div class="pharmacy-main__selectionItem">
256
+                <span
257
+                  >记账时间:<ng-container *ngIf="item.bagTime">{{
258
+                    item.bagTime | date: "MM-dd HH:mm"
259
+                  }}</ng-container
260
+                  ><ng-container *ngIf="!item.bagTime">无</ng-container></span
261
+                >
262
+              </div>
263
+              <div class="pharmacy-main__selectionItem">
264
+                <span *ngIf="i == 0">10:10 由 亚祥 核对</span>
265
+                <span *ngIf="i == 1">10:10 由 森源 核对</span>
266
+                <span *ngIf="i == 2">10:10 由 王满 核对</span>
267
+                <span *ngIf="i == 3">10:10 由 小平 核对</span>
268
+              </div>
269
+            </div>
270
+          </div>
271
+          <div
272
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
273
+            *ngIf="waitPharmacyList.length === 0"
274
+          >
275
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
276
+          </div>
277
+          <div
278
+            (click)="loadMore(3)"
279
+            class="pharmacy-main__selection pharmacy-main__selection--more"
280
+            *ngIf="pharmacyFlag"
281
+          >
282
+            <div class="pharmacy-main__selectionInfo">
283
+              <i
284
+                nz-icon
285
+                nzType="loading"
286
+                nzTheme="outline"
287
+                class="pharmacy-main__selection--icon"
288
+                *ngIf="pharmacyLoad"
289
+              ></i
290
+              >查看更多
291
+            </div>
292
+          </div>
293
+        </div>
294
+        <div
295
+          *ngIf="loading3"
296
+          style="height: calc(100vh - 212px); min-height: 556px"
297
+        >
298
+          <div
299
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
300
+          >
301
+            <div class="loadingFullInner">
302
+              <img src="../../../assets/images/loading.gif" alt="" />
303
+              <div>加载中...</div>
304
+            </div>
305
+          </div>
306
+        </div>
307
+      </overlay-scrollbars>
308
+      <!-- 列表 end -->
309
+    </div>
310
+    <!-- 核对中 end -->
311
+
312
+    <!-- 临时增加 start -->
313
+    <!-- 核对中 start -->
314
+    <div class="pharmacy-main__list pharmacy-main__delivery">
315
+      <!-- 标题 start -->
316
+      <div class="pharmacy-main__title">
317
+        <strong>配送中(3)</strong>
318
+        <span class="autoUpdate">{{ logTime }}秒</span>
319
+      </div>
320
+      <!-- 标题 end -->
321
+      <!-- 搜索框 start -->
322
+      <div class="pharmacy-main__search">
323
+        <div class="pharmacy-main__searchInput">
324
+          <input
325
+            nz-input
326
+            placeholder="请输入关键字"
327
+            [(ngModel)]="pharmacySearchKey"
328
+          />
329
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
330
+            <i nz-icon nzType="search"></i>
331
+            <span>搜索</span>
332
+          </div>
333
+        </div>
334
+      </div>
335
+      <!-- 搜索框 end -->
336
+      <!-- 列表 start -->
337
+      <overlay-scrollbars #osComponentRef4 class="pharmacy-main__selectionWrap">
338
+        <div *ngIf="!loading3" style="height: 100%">
339
+          <div
340
+            class="pharmacy-main__selection"
341
+            *ngFor="let item of waitPharmacyList; let i = index"
342
+          >
343
+            <div class="pharmacy-main__selectionInfo">
344
+              <div class="pharmacy-main__selectionItem">
345
+                <strong>{{ item.target ? item.target.dept : "" }}</strong>
346
+              </div>
347
+              <div class="pharmacy-main__selectionItem">
348
+                <span>单号:{{ item.packid }}</span>
349
+              </div>
350
+              <div class="pharmacy-main__selectionItem">
351
+                <span
352
+                  >记账时间:<ng-container *ngIf="item.bagTime">{{
353
+                    item.bagTime | date: "MM-dd HH:mm"
354
+                  }}</ng-container
355
+                  ><ng-container *ngIf="!item.bagTime">无</ng-container></span
356
+                >
357
+              </div>
358
+              <div class="pharmacy-main__selectionItem">
359
+                <span *ngIf="i == 0">10:10 由 亚祥 配送</span>
360
+                <span *ngIf="i == 1">10:10 由 森源 配送</span>
361
+                <span *ngIf="i == 2">10:10 由 王满 配送</span>
362
+                <span *ngIf="i == 3">10:10 由 小平 配送</span>
363
+              </div>
364
+            </div>
365
+          </div>
366
+          <div
367
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
368
+            *ngIf="waitPharmacyList.length === 0"
369
+          >
370
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
371
+          </div>
372
+          <div
373
+            (click)="loadMore(3)"
374
+            class="pharmacy-main__selection pharmacy-main__selection--more"
375
+            *ngIf="pharmacyFlag"
376
+          >
377
+            <div class="pharmacy-main__selectionInfo">
378
+              <i
379
+                nz-icon
380
+                nzType="loading"
381
+                nzTheme="outline"
382
+                class="pharmacy-main__selection--icon"
383
+                *ngIf="pharmacyLoad"
384
+              ></i
385
+              >查看更多
386
+            </div>
387
+          </div>
388
+        </div>
389
+        <div
390
+          *ngIf="loading3"
391
+          style="height: calc(100vh - 212px); min-height: 556px"
392
+        >
393
+          <div
394
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
395
+          >
396
+            <div class="loadingFullInner">
397
+              <img src="../../../assets/images/loading.gif" alt="" />
398
+              <div>加载中...</div>
399
+            </div>
400
+          </div>
401
+        </div>
402
+      </overlay-scrollbars>
403
+      <!-- 列表 end -->
404
+    </div>
405
+    <!-- 核对中 end -->
406
+    <!-- 核对中 start -->
407
+    <div class="pharmacy-main__list pharmacy-main__delivery">
408
+      <!-- 标题 start -->
409
+      <div class="pharmacy-main__title">
410
+        <strong>已完成(3)</strong>
411
+        <span class="autoUpdate">{{ logTime }}秒</span>
412
+      </div>
413
+      <!-- 标题 end -->
414
+      <!-- 搜索框 start -->
415
+      <div class="pharmacy-main__search">
416
+        <div class="pharmacy-main__searchInput">
417
+          <input
418
+            nz-input
419
+            placeholder="请输入关键字"
420
+            [(ngModel)]="pharmacySearchKey"
421
+          />
422
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
423
+            <i nz-icon nzType="search"></i>
424
+            <span>搜索</span>
425
+          </div>
426
+        </div>
427
+      </div>
428
+      <!-- 搜索框 end -->
429
+      <!-- 列表 start -->
430
+      <overlay-scrollbars #osComponentRef5 class="pharmacy-main__selectionWrap">
431
+        <div *ngIf="!loading3" style="height: 100%">
432
+          <div
433
+            class="pharmacy-main__selection"
434
+            *ngFor="let item of waitPharmacyList; let i = index"
435
+          >
436
+            <div class="pharmacy-main__selectionInfo">
437
+              <div class="pharmacy-main__selectionItem">
438
+                <strong>{{ item.target ? item.target.dept : "" }}</strong>
439
+              </div>
440
+              <div class="pharmacy-main__selectionItem">
441
+                <span>单号:{{ item.packid }}</span>
442
+              </div>
443
+              <div class="pharmacy-main__selectionItem">
444
+                <span
445
+                  >记账时间:<ng-container *ngIf="item.bagTime">{{
446
+                    item.bagTime | date: "MM-dd HH:mm"
447
+                  }}</ng-container
448
+                  ><ng-container *ngIf="!item.bagTime">无</ng-container></span
449
+                >
450
+              </div>
451
+              <div class="pharmacy-main__selectionItem">
452
+                <span *ngIf="i == 0">10:10 由 亚祥 接收</span>
453
+                <span *ngIf="i == 1">10:10 由 森源 接收</span>
454
+                <span *ngIf="i == 2">10:10 由 王满 接收</span>
455
+                <span *ngIf="i == 3">10:10 由 小平 接收</span>
456
+              </div>
457
+            </div>
458
+          </div>
459
+          <div
460
+            class="pharmacy-main__selection pharmacy-main__selection--noData"
461
+            *ngIf="waitPharmacyList.length === 0"
462
+          >
463
+            <img src="./../../assets/images/image_kongbaiye.png" alt="" />
464
+          </div>
465
+          <div
466
+            (click)="loadMore(3)"
467
+            class="pharmacy-main__selection pharmacy-main__selection--more"
468
+            *ngIf="pharmacyFlag"
469
+          >
470
+            <div class="pharmacy-main__selectionInfo">
471
+              <i
472
+                nz-icon
473
+                nzType="loading"
474
+                nzTheme="outline"
475
+                class="pharmacy-main__selection--icon"
476
+                *ngIf="pharmacyLoad"
477
+              ></i
478
+              >查看更多
479
+            </div>
480
+          </div>
481
+        </div>
482
+        <div
483
+          *ngIf="loading3"
484
+          style="height: calc(100vh - 212px); min-height: 556px"
485
+        >
486
+          <div
487
+            class="loadingFull display_flex justify-content_flex-center align-items_center"
488
+          >
489
+            <div class="loadingFullInner">
490
+              <img src="../../../assets/images/loading.gif" alt="" />
491
+              <div>加载中...</div>
492
+            </div>
493
+          </div>
494
+        </div>
495
+      </overlay-scrollbars>
496
+      <!-- 列表 end -->
497
+    </div>
498
+    <!-- 核对中 end -->
499
+    <!-- 临时增加 end -->
500
+  </div>
501
+  <!-- 主体部分 end -->
502
+  <!-- 二维码打印 -->
503
+  <div id="report" style="display: none">
504
+    <div style="display: inline-block" *ngFor="let img of codes">
505
+      <img style="width: 200px; height: 200px" [src]="img.base64" alt="" />
506
+      <div
507
+        style="
508
+          text-align: center;
509
+          font-size: 12px;
510
+          width: 200px;
511
+          font-weight: bold;
512
+          color: #0a0a0a;
513
+        "
514
+      >
515
+        {{ img.target }}
516
+      </div>
517
+      <div
518
+        style="
519
+          text-align: center;
520
+          font-size: 12px;
521
+          width: 200px;
522
+          font-weight: bold;
523
+          color: #0a0a0a;
524
+        "
525
+      >
526
+        {{ img.creatTime | date: "MM-dd HH:mm" }}
527
+      </div>
528
+    </div>
529
+  </div>
530
+</div>
531
+
532
+<!-- 药房端科室切换提示框 -->
533
+<app-hs-prompt-modal
534
+  [changeShow]="changeShow"
535
+  [closeTime]="closeTime"
536
+  [closeTimeFlag]="closeTimeFlag"
537
+  [show]="hsPromptModalShow"
538
+  (closeModelHs)="closeModelHs($event)"
539
+  (clearModelHs)="clearModelHs($event)"
540
+  deptType="pharmacy"
541
+>
542
+  <!-- 返回系统按钮 -->
543
+  <!-- 右侧悬浮框 -->
544
+  <div id="fixedMenu" class="fixed" *ngIf="mainRole">
545
+    <div class="right">
546
+      <div class="fixedMenu hujiaozhongxin">
547
+        <div class="menuItems">
548
+          <div class="item">快捷菜单</div>
549
+        </div>
550
+      </div>
551
+      <div class="fixedMenu">
552
+        <div class="menuItems">
553
+          <div
554
+            class="others"
555
+            [ngStyle]="{
556
+              height: showLastItems
557
+                ? mainRole
558
+                  ? 35 * 2 + 'px'
559
+                  : 35 * 1 + 'px'
560
+                : 0
561
+            }"
562
+          >
563
+            <div
564
+              [ngClass]="{ item: true, checked: fixedTab == 'back' }"
565
+              *ngIf="mainRole"
566
+              (click)="checkFixedTab('toSystem')"
567
+            >
568
+              返回系统
569
+            </div>
570
+          </div>
571
+        </div>
572
+        <div class="arrow" *ngIf="!showLastItems" (click)="fixedMenuXiala()">
573
+          <i class="icon_transport transport-xiala2-01"></i>
574
+        </div>
575
+        <div class="arrow" *ngIf="showLastItems" (click)="fixedMenuShangla()">
576
+          <i class="icon_transport transport-shangla-"></i>
577
+        </div>
578
+      </div>
579
+    </div>
580
+    <div
581
+      *ngIf="showLastItems && fixedTab != ''"
582
+      (click)="fixedMenuShangla()"
583
+      class="fixedMark"
584
+    ></div>
585
+  </div>
586
+</app-hs-prompt-modal>

+ 498 - 0
src/app/views/pharmacy2/pharmacy2.component.less

@@ -0,0 +1,498 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+	width: 100%;
4
+  background-color: #f9fafb;
5
+  .ant-btn[disabled]{
6
+    color: rgba(0, 0, 0, 0.25)!important;
7
+    background-color: #f5f5f5!important;
8
+  }
9
+  .red{
10
+    color: red!important;
11
+    font-weight: bold!important;
12
+  }
13
+  .green{
14
+    color: @primary-color!important;
15
+    font-weight: bold!important;
16
+  }
17
+
18
+	h1,
19
+	h2,
20
+	h3,
21
+	p {
22
+		margin: 0;
23
+	}
24
+	em {
25
+		font-style: normal;
26
+  }
27
+  .pharmacy{
28
+    display: flex;
29
+    flex-direction: column;
30
+    height: 100%;
31
+  }
32
+
33
+	// 头部 start
34
+	.pharmacy-header {
35
+		height: 88px;
36
+		background-color: #fff;
37
+		border-bottom: 1px solid #e5e9ed;
38
+		box-sizing: border-box;
39
+		display: flex;
40
+
41
+		.pharmacy-logo {
42
+			width: 221px;
43
+			background-color: #0f2e3b;
44
+			display: flex;
45
+			justify-content: center;
46
+			align-items: center;
47
+
48
+			.pharmacy-logo__img {
49
+				width: 32px;
50
+			}
51
+
52
+			.pharmacy-logo__name {
53
+				font-size: 14px;
54
+				color: #fff;
55
+			}
56
+		}
57
+
58
+		.pharmacy-name {
59
+      flex: 1;
60
+			border-right: 1px solid #e5e9ed;
61
+      display: flex;
62
+      justify-content: space-between;
63
+      align-items: center;
64
+
65
+			.pharmacy-name__title {
66
+				font-size: 22px;
67
+				color: #333;
68
+				margin-left: 43px;
69
+				line-height: 87px;
70
+			}
71
+      .pharmacy-name__total{
72
+        margin-right: 16px;
73
+        font-size: 16px;
74
+      }
75
+		}
76
+
77
+		.pharmacy-operate {
78
+			width: 211px;
79
+			display: flex;
80
+			justify-content: center;
81
+			align-items: center;
82
+			position: relative;
83
+			.pharmacy-operatePop {
84
+        cursor: pointer;
85
+        border: 1px solid #e5e9ed;
86
+				background-color: #fff;
87
+				position: absolute;
88
+				left: 0;
89
+				top: 100%;
90
+				width: 100%;
91
+				height: 34px;
92
+				line-height: 34px;
93
+				text-align: center;
94
+				font-size: 14px;
95
+				color: @primary-color;
96
+			}
97
+
98
+			&:after {
99
+				content: '';
100
+				display: block;
101
+				width: 0;
102
+				height: 0;
103
+				border-left: 7px solid transparent;
104
+				border-right: 7px solid transparent;
105
+				border-top: 10px solid #666;
106
+			}
107
+
108
+			.pharmacy-operate__img {
109
+				max-height: 40px;
110
+				margin-right: 8px;
111
+			}
112
+
113
+			.pharmacy-operate__title {
114
+				font-size: 20px;
115
+				color: #666;
116
+				padding-right: 24px;
117
+				cursor: pointer;
118
+			}
119
+		}
120
+	}
121
+  .userInfo {
122
+    width: 336px;
123
+    height: 100%;
124
+    float: right;
125
+    padding: 8px;
126
+    box-sizing: border-box;
127
+    font-size: 14px;
128
+    border-left: 1px solid #e5e9ed;
129
+
130
+    .wel {
131
+      line-height: 15px;
132
+    }
133
+
134
+    .user {
135
+      font-size: 20px;
136
+      height: 36px;
137
+      display: flex;
138
+      justify-content: center;
139
+      align-items: center;
140
+      line-height: normal;
141
+
142
+      img {
143
+        height: 100%;
144
+        margin-right: 8px;
145
+      }
146
+    }
147
+    .userInfo-wrap {
148
+      display: flex;
149
+      justify-content: flex-end;
150
+      .logOut {
151
+        display: inline-block;
152
+        text-align: right;
153
+        color: @primary-color;
154
+        line-height: 20px;
155
+        cursor: pointer;
156
+        margin-right: 8px;
157
+      }
158
+    }
159
+  }
160
+	// 头部 end
161
+	// 主体部分 start
162
+	.pharmacy-main {
163
+    height: calc(100vh - 88px);
164
+    min-height: 680px;
165
+    flex: 1;
166
+		padding: 16px;
167
+		display: flex;
168
+		justify-content: space-between;
169
+		.pharmacy-main__list {
170
+      display: flex;
171
+      flex-direction: column;
172
+			background-color: #f9fafb;
173
+			flex: 1;
174
+      margin: 0 4px;
175
+			box-sizing: border-box;
176
+			border: 1px solid #e5e9ed;
177
+			// 标题 start
178
+			.pharmacy-main__title {
179
+				height: 40px;
180
+				background-color: #fff;
181
+				font-size: 16px;
182
+				color: #333;
183
+				font-weight: 700;
184
+				padding-left: 8px;
185
+				display: flex;
186
+				justify-content: space-between;
187
+				align-items: center;
188
+				border-bottom: 1px solid #e5e9ed;
189
+        .autoUpdate{
190
+          font-size: 14px;
191
+          color: #49b856;
192
+          margin-right: 8px;
193
+        }
194
+				.pharmacy-main__printAll {
195
+					// width: 80px;
196
+					height: 28px;
197
+					line-height: 28px;
198
+					margin-right: 16px;
199
+					background-color: @primary-color;
200
+					font-size: 14px;
201
+					color: #fff;
202
+					border-radius: 4px;
203
+          text-align: center;
204
+          display: flex;
205
+          justify-content: center;
206
+				}
207
+			}
208
+			// 标题 end
209
+			// 搜索框 start
210
+			.pharmacy-main__search {
211
+				padding: 8px;
212
+				position: relative;
213
+				.pharmacy-main__searchInput {
214
+					border-radius: 100px;
215
+					padding-right: 82px;
216
+					border: 1px solid #e5e9ed;
217
+					background-color: #fff;
218
+					overflow: hidden;
219
+					input {
220
+						border: none;
221
+					}
222
+					.ant-input:focus {
223
+						border-color: #fff;
224
+						outline: 0;
225
+						box-shadow: 0 0 0 2px #fff;
226
+					}
227
+					.pharmacy-main__searchText {
228
+						cursor: pointer;
229
+						position: absolute;
230
+						top: 13px;
231
+						right: 8px;
232
+						width: 74px;
233
+						height: 22px;
234
+						border-left: 1px solid #e5e9ed;
235
+						color: #999;
236
+						padding-left: 8px;
237
+						box-sizing: border-box;
238
+						span {
239
+							color: @primary-color;
240
+							margin-left: 8px;
241
+						}
242
+					}
243
+				}
244
+			}
245
+			// 搜索框 end
246
+			// 列表 start
247
+			.pharmacy-main__selectionWrap {
248
+        flex: 1;
249
+				// height: 630px;
250
+				overflow: auto;
251
+				&:first-child {
252
+					border-top: 1px solid #e5e9ed;
253
+				}
254
+				.pharmacy-main__selection {
255
+					box-sizing: border-box;
256
+					border-bottom: 1px solid #e5e9ed;
257
+          display: flex;
258
+          &.pharmacy-main__selection--more{
259
+            color: @primary-color;
260
+            height: 34px;
261
+            cursor: pointer;
262
+            .pharmacy-main__selectionInfo{
263
+              justify-content: center;
264
+              align-items: center;
265
+              flex-direction: row;
266
+              .pharmacy-main__selection--icon{
267
+                margin-right: 8px;
268
+              }
269
+            }
270
+          }
271
+          &.pharmacy-main__selection--noData{
272
+            height: calc(100vh - 212px);
273
+            min-height: 556px;
274
+            display: flex;
275
+            justify-content: center;
276
+            align-items: center;
277
+            img{
278
+              width: 100px;
279
+            }
280
+          }
281
+					.pharmacy-main__selectionInfo {
282
+						padding: 8px;
283
+						flex: 1;
284
+						display: flex;
285
+						flex-direction: column;
286
+						justify-content: space-between;
287
+						.pharmacy-main__selectionItem {
288
+							display: flex;
289
+              justify-content: space-between;
290
+              padding: 0 8px;
291
+							span {
292
+								color: #666;
293
+                font-size: 12px;
294
+							}
295
+							strong {
296
+								color: #333;
297
+								font-weight: 700;
298
+								font-size: 14px;
299
+							}
300
+						}
301
+					}
302
+					.pharmacy-main__selectionPrint {
303
+						width: 90px;
304
+						display: flex;
305
+						justify-content: center;
306
+						align-items: center;
307
+						border-left: 1px solid #e5e9ed;
308
+						.pharmacy-main__selectionPrintBtn {
309
+							width: 60px;
310
+							height: 28px;
311
+							line-height: 28px;
312
+							border-radius: 4px;
313
+							border: 1px solid @primary-color;
314
+							color: @primary-color;
315
+							text-align: center;
316
+							cursor: pointer;
317
+						}
318
+					}
319
+				}
320
+			}
321
+			// 列表 end
322
+		}
323
+	}
324
+	// 主体部分 end
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+  // 右侧悬浮菜单
337
+  .fixed {
338
+    position: fixed;
339
+    top: 40%;
340
+    right: 0;
341
+    z-index: 99;
342
+    border-radius: 5px 0 0 5px;
343
+
344
+    .fixedMark {
345
+      position: fixed;
346
+      left: 0;
347
+      top: 0;
348
+      width: 100%;
349
+      height: 100%;
350
+      background: rgba(0, 0, 0, .2);
351
+      z-index: 88;
352
+    }
353
+
354
+    // overflow: hidden;
355
+    &>.left {
356
+      width: 480px;
357
+      // height: 280px;
358
+      float: left;
359
+      background: #fff;
360
+      padding: 16px;
361
+      border-radius: 5px;
362
+      border: 1px solid #e5e9ed;
363
+      // box-shadow: -8px 5px 15px #eae9e9;
364
+      position: relative;
365
+      z-index: 98;
366
+
367
+      .con {
368
+        background: #f9fafb;
369
+        width: 100%;
370
+        height: 100%;
371
+        border-radius: 5px;
372
+        border: 1px solid #e5e9ed;
373
+        padding: 16px 20px;
374
+
375
+        &.tableCon {
376
+          padding: 0;
377
+
378
+          .table {
379
+            font-size: 14px;
380
+
381
+            tr {
382
+              td {
383
+                padding: 15px 6px;
384
+                text-align: center;
385
+
386
+                &>.tdiv {
387
+                  overflow: hidden;
388
+
389
+                  .name {
390
+                    float: left;
391
+                  }
392
+
393
+                  .num {
394
+                    float: right;
395
+                    font-size: 12px;
396
+
397
+                    span {
398
+                      color: @primary-color;
399
+                      font-size: 14px;
400
+                    }
401
+                  }
402
+                }
403
+
404
+                .notOpen {
405
+                  color: #666;
406
+                  font-size: 12px;
407
+
408
+                  img {
409
+                    margin-bottom: 8px;
410
+                  }
411
+                }
412
+              }
413
+            }
414
+          }
415
+        }
416
+
417
+        .title {
418
+          color: #333;
419
+          text-align: center;
420
+        }
421
+
422
+        .conditions {
423
+          &>.ant-row {
424
+            margin: 8px 0;
425
+
426
+            .ant-row {
427
+              .ant-col-6 {
428
+                margin: 2px 0;
429
+              }
430
+            }
431
+
432
+            .checkAll {
433
+              width: 100%;
434
+              border-bottom: 1px solid rgb(233, 233, 233);
435
+              color: @primary-color;
436
+            }
437
+          }
438
+        }
439
+
440
+        .btns {
441
+          padding: 5px 20px 0 20px;
442
+        }
443
+      }
444
+    }
445
+
446
+    .right {
447
+      // opacity: .5;
448
+      width: 80px;
449
+      float: left;
450
+      background: rgba(255, 255, 255, .5);
451
+      border-radius: 5px 0 0 5px;
452
+      position: relative;
453
+      z-index: 98;
454
+
455
+      .fixedMenu {
456
+        border: 1px solid #e5e9ed;
457
+        color: rgba(0, 128, 0, .5);
458
+        background: rgba(255, 255, 255, .5);
459
+        text-align: center;
460
+        border-radius: 5px 0 0 5px;
461
+        // box-shadow: -3px 4px 15px rgba(234, 233, 233, .5);
462
+
463
+        &.hujiaozhongxin {
464
+          margin-bottom: 5px;
465
+        }
466
+
467
+        .menuItems {
468
+          .item {
469
+            height: 35px;
470
+            line-height: 35px;
471
+            padding: 0 6px;
472
+            cursor: default;
473
+            border-bottom: 1px solid #e5e9ed;
474
+            user-select: none;
475
+
476
+            &.checked {
477
+              background: #fff;
478
+              color: #52ab77;
479
+              opacity: 1;
480
+              box-shadow: -3px 4px 7px #eae9e9;
481
+            }
482
+          }
483
+
484
+          .others {
485
+            transition: height .4s linear;
486
+            overflow: hidden;
487
+          }
488
+        }
489
+
490
+        .arrow {
491
+          cursor: pointer;
492
+        }
493
+      }
494
+
495
+    }
496
+  }
497
+
498
+}

+ 421 - 0
src/app/views/pharmacy2/pharmacy2.component.ts

@@ -0,0 +1,421 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { Router } from "@angular/router";
4
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+
6
+@Component({
7
+  selector: "app-pharmacy2",
8
+  templateUrl: "./pharmacy2.component.html",
9
+  styleUrls: ["./pharmacy2.component.less"],
10
+})
11
+export class Pharmacy2Component implements OnInit {
12
+  @ViewChild("osComponentRef1", {
13
+    read: OverlayScrollbarsComponent,
14
+    static: false,
15
+  })
16
+  osComponentRef1: OverlayScrollbarsComponent;
17
+  @ViewChild("osComponentRef2", {
18
+    read: OverlayScrollbarsComponent,
19
+    static: false,
20
+  })
21
+  osComponentRef2: OverlayScrollbarsComponent;
22
+  @ViewChild("osComponentRef3", {
23
+    read: OverlayScrollbarsComponent,
24
+    static: false,
25
+  })
26
+  osComponentRef3: OverlayScrollbarsComponent;
27
+  @ViewChild("osComponentRef4", {
28
+    read: OverlayScrollbarsComponent,
29
+    static: false,
30
+  })
31
+  osComponentRef4: OverlayScrollbarsComponent;
32
+  @ViewChild("osComponentRef5", {
33
+    read: OverlayScrollbarsComponent,
34
+    static: false,
35
+  })
36
+  osComponentRef5: OverlayScrollbarsComponent;
37
+  constructor(private mainService: MainService, public router: Router) {}
38
+  //待配药数据
39
+  codes = [];
40
+  // 待配药
41
+  printPharmacyList = []; //数据列表
42
+  printPharmacyIdx = 0; //页码
43
+  printPharmacyFlag = false; //是否查看更多
44
+  printPharmacySearchKey = ""; //搜索的内容
45
+  printPharmacyLoad = false; //按钮的loading
46
+  // 配药中列表
47
+  waitPharmacyList = [];
48
+  waitPharmacyIdx = 0;
49
+  waitPharmacyFlag = false;
50
+  waitPharmacySearchKey = "";
51
+  waitPharmacyLoad = false;
52
+  // 核对中列表
53
+  pharmacyList = [];
54
+  pharmacyIdx = 0;
55
+  pharmacyFlag = false;
56
+  pharmacySearchKey = "";
57
+  pharmacyLoad = false;
58
+
59
+  // other
60
+  loginUser: any = localStorage.getItem("user")
61
+    ? JSON.parse(localStorage.getItem("user")).user
62
+    : null; //登录人信息
63
+
64
+  logTimer = null; //定时器
65
+  logTime = 0; //自动刷新秒数
66
+  logTimeConst = 60; //自动刷新秒数
67
+
68
+  ngOnInit() {
69
+    this.changeKs();
70
+    // 待配药列表
71
+    this.getPharmacyList(this.printPharmacyIdx, 1, this.printPharmacySearchKey);
72
+    // 配药中列表
73
+    this.getPharmacyList(this.waitPharmacyIdx, 2, this.waitPharmacySearchKey);
74
+    // 核对中列表
75
+    this.getPharmacyList(this.pharmacyIdx, 3, this.pharmacySearchKey);
76
+    this.initRole();
77
+    // 自动刷新倒计时 start
78
+    this.autoUpdate();
79
+    // 自动刷新倒计时 end
80
+  }
81
+  // 自动刷新倒计时
82
+  autoUpdate(){
83
+    this.logTime = this.logTimeConst;
84
+    clearInterval(this.logTimer);
85
+    this.logTimer = setInterval(() => {
86
+      this.logTime--;
87
+      if (this.logTime === 0) {
88
+        this.logTime = this.logTimeConst;
89
+        // 待配药列表
90
+        this.getPharmacyList(0, 1, this.printPharmacySearchKey);
91
+        // 配药中列表
92
+        this.getPharmacyList(0, 2, this.waitPharmacySearchKey);
93
+        // 核对中列表
94
+        this.getPharmacyList(0, 3, this.pharmacySearchKey);
95
+      }
96
+    }, 1000);
97
+  }
98
+  // 药房端药房列表查询、搜索
99
+  // 1为pc待打印状态、2为pc配药中、3为pc核对中
100
+  // searchKey  为搜索的关键字,没有就不传
101
+  loading1 = false;
102
+  loading2 = false;
103
+  loading3 = false;
104
+  getPharmacyList(idx, type, searchKey) {
105
+    let launch = {
106
+      id: JSON.parse(localStorage.getItem("user")).user.dept.id,
107
+    };
108
+    switch (type) {
109
+      case 1:
110
+        this.loading1 = true;
111
+        break;
112
+      case 2:
113
+        this.loading2 = true;
114
+        break;
115
+      case 3:
116
+        this.loading3 = true;
117
+        break;
118
+    }
119
+    let postData = {
120
+      idx,
121
+      sum: 10,
122
+      drugsBag: { searchType: type, searchKey, launch },
123
+    };
124
+    this.mainService
125
+      .getFetchDataList("api", "drugsBag", postData)
126
+      .subscribe((result) => {
127
+        switch (type) {
128
+          case 1:
129
+            this.loading1 = false;
130
+            break;
131
+          case 2:
132
+            this.loading2 = false;
133
+            break;
134
+          case 3:
135
+            this.loading3 = false;
136
+            break;
137
+        }
138
+        if (result["status"] == 200) {
139
+          switch (type) {
140
+            case 1:
141
+              // 隐藏按钮的loading
142
+              this.printPharmacyLoad = false;
143
+              // 查看更多,是否显示
144
+              if (result["list"].length < 10) {
145
+                this.printPharmacyFlag = false;
146
+              } else if (result["list"].length === 0 && idx === 0) {
147
+                this.printPharmacyFlag = false;
148
+              } else {
149
+                this.printPharmacyFlag = true;
150
+              }
151
+              // 列表数据合并
152
+              if(idx === 0){
153
+                this.printPharmacyList = result["list"];
154
+              }else{
155
+                this.printPharmacyList = [
156
+                  ...this.printPharmacyList,
157
+                  ...result["list"],
158
+                ];
159
+              }
160
+              break;
161
+            case 2:
162
+              this.waitPharmacyLoad = false;
163
+              if (result["list"].length < 10) {
164
+                this.waitPharmacyFlag = false;
165
+              } else if (result["list"].length === 0 && idx === 0) {
166
+                this.waitPharmacyFlag = false;
167
+              } else {
168
+                this.waitPharmacyFlag = true;
169
+              }
170
+              if(idx === 0){
171
+                this.waitPharmacyList = result["list"];
172
+              }else{
173
+                this.waitPharmacyList = [
174
+                  ...this.waitPharmacyList,
175
+                  ...result["list"],
176
+                ];
177
+              }
178
+              break;
179
+            case 3:
180
+              this.pharmacyLoad = false;
181
+              if (result["list"].length < 10) {
182
+                this.pharmacyFlag = false;
183
+              } else if (result["list"].length === 0 && idx === 0) {
184
+                this.pharmacyFlag = false;
185
+              } else {
186
+                this.pharmacyFlag = true;
187
+              }
188
+              if(idx === 0){
189
+                this.pharmacyList = result["list"];
190
+              }else{
191
+                this.pharmacyList = [
192
+                  ...this.pharmacyList,
193
+                  ...result["list"],
194
+                ];
195
+              }
196
+              break;
197
+          }
198
+        }
199
+      });
200
+  }
201
+  // 加载更多
202
+  loadMore(type) {
203
+    switch (type) {
204
+      case 1:
205
+        this.printPharmacyIdx++;
206
+        this.printPharmacyLoad = true;
207
+        this.getPharmacyList(
208
+          this.printPharmacyIdx,
209
+          type,
210
+          this.printPharmacySearchKey
211
+        );
212
+        break;
213
+      case 2:
214
+        this.waitPharmacyIdx++;
215
+        this.waitPharmacyLoad = true;
216
+        this.getPharmacyList(
217
+          this.waitPharmacyIdx,
218
+          type,
219
+          this.waitPharmacySearchKey
220
+        );
221
+        break;
222
+      case 3:
223
+        this.pharmacyIdx++;
224
+        this.pharmacyLoad = true;
225
+        this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
226
+        break;
227
+    }
228
+  }
229
+  // 搜索关键词
230
+  searchKeyHandle(type) {
231
+    switch (type) {
232
+      case 1:
233
+        this.printPharmacyIdx = 0; //页码重置
234
+        this.printPharmacyList = []; //列表重置
235
+        this.getPharmacyList(
236
+          this.printPharmacyIdx,
237
+          type,
238
+          this.printPharmacySearchKey
239
+        );
240
+        break;
241
+      case 2:
242
+        this.waitPharmacyIdx = 0; //页码重置
243
+        this.waitPharmacyList = []; //列表重置
244
+        this.getPharmacyList(
245
+          this.waitPharmacyIdx,
246
+          type,
247
+          this.waitPharmacySearchKey
248
+        );
249
+        break;
250
+      case 3:
251
+        this.pharmacyIdx = 0; //页码重置
252
+        this.pharmacyList = []; //列表重置
253
+        this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
254
+        break;
255
+    }
256
+  }
257
+  // 退出
258
+  logOut(): void {
259
+    // 假退出
260
+    localStorage.removeItem("user");
261
+    localStorage.removeItem("menu");
262
+    localStorage.removeItem("phones");
263
+    localStorage.removeItem("index");
264
+    this.router.navigateByUrl("login");
265
+    // 假退出
266
+    this.mainService.logOut().subscribe((data) => {
267
+      if (data.status == 200) {
268
+        localStorage.removeItem("user");
269
+        localStorage.removeItem("menu");
270
+        localStorage.removeItem("phones");
271
+        localStorage.removeItem("index");
272
+        this.router.navigateByUrl("login");
273
+      }
274
+    });
275
+  }
276
+  //待配药
277
+  print(id?) {
278
+    let arr = [];
279
+    if (typeof id === "number" && id > 0) {
280
+      //单个二维码
281
+      arr.push(id);
282
+    } else {
283
+      //批量二维码
284
+      arr = this.printPharmacyList.map((item) => item.id);
285
+    }
286
+    this.mainService.printRequisition(arr).subscribe((data) => {
287
+      if (data["status"] == 200) {
288
+        this.codes = data["data"];
289
+        setTimeout(function () {
290
+          const printContent = document.getElementById("report");
291
+          const WindowPrt = window.open("", "", "width=700,height=900");
292
+          WindowPrt.document.write(printContent.innerHTML);
293
+          WindowPrt.print();
294
+          WindowPrt.close();
295
+        }, 100);
296
+        // 待打印变为待配药接口
297
+        let loginName = JSON.parse(localStorage.getItem("user")).user.name;
298
+        this.mainService
299
+          .changeToDispensing(arr, loginName)
300
+          .subscribe((data) => {
301
+            if (data["state"] == 200) {
302
+              this.printPharmacyList = [];
303
+              this.waitPharmacyList = [];
304
+              // 待配药列表
305
+              this.getPharmacyList(0, 1, this.printPharmacySearchKey);
306
+              // 配药中列表
307
+              this.getPharmacyList(0, 2, this.waitPharmacySearchKey);
308
+            }
309
+          });
310
+      }
311
+    });
312
+  }
313
+
314
+  //补打二维码
315
+  replenishPrint(id?) {
316
+    let arr = [];
317
+    if (typeof id === "number" && id > 0) {
318
+      //单个二维码
319
+      arr.push(id);
320
+    } else {
321
+      //批量二维码
322
+      arr = this.printPharmacyList.map((item) => item.id);
323
+    }
324
+    this.mainService.printRequisition(arr).subscribe((data) => {
325
+      if (data["status"] == 200) {
326
+        this.codes = data["data"];
327
+        setTimeout(function () {
328
+          const printContent = document.getElementById("report");
329
+          const WindowPrt = window.open("", "", "width=700,height=900");
330
+          WindowPrt.document.write(printContent.innerHTML);
331
+          WindowPrt.print();
332
+          WindowPrt.close();
333
+        }, 100);
334
+      }
335
+    });
336
+  }
337
+
338
+  // 右侧菜单
339
+  showLastItems: boolean = false;
340
+  // 下拉
341
+  fixedMenuXiala() {
342
+    this.showLastItems = true;
343
+  }
344
+
345
+  // 上拉
346
+  fixedMenuShangla() {
347
+    this.showLastItems = false;
348
+  }
349
+
350
+  mainRole: boolean = false; //回到系统管理权限
351
+  initRole() {
352
+    // let roles = JSON.parse(localStorage.getItem('user')).user.role;
353
+    let menus = JSON.parse(localStorage.getItem("menu"));
354
+    let that = this;
355
+    console.log("菜单数量" + menus.length);
356
+    if (menus.length >= 2) {
357
+      that.mainRole = true;
358
+      return;
359
+    }
360
+  }
361
+
362
+  // 切换右侧菜单Tab
363
+  fixedTab: string = "";
364
+  checkFixedTab(type: string) {
365
+    if (type == "toSystem") {
366
+      this.router.navigateByUrl("main");
367
+    }
368
+    if (this.fixedTab == type) {
369
+      this.fixedTab = "";
370
+    } else {
371
+      this.fixedTab = type;
372
+    }
373
+  }
374
+  //药房端科室切换
375
+  changeShow = true;
376
+  closeTime = 3;
377
+  closeTimeFlag = 0;
378
+  hsPromptModalShow: boolean = true; //科室切换提示框是否展示
379
+  timerCloseTime = null;
380
+  deptDisplay = 1; //护士端是否显示可以别名,1是显示科室名称,2是显示科室别名
381
+  //子传父接收
382
+  closeModelHs(e) {
383
+    this.hsPromptModalShow = JSON.parse(e).show;
384
+    this.changeShow = JSON.parse(e).changeShow;
385
+  }
386
+  //子传父接收
387
+  clearModelHs(e) {
388
+    if (JSON.parse(e).clear === true) {
389
+      clearInterval(this.timerCloseTime);
390
+    }
391
+    this.changeShow = JSON.parse(e).changeShow;
392
+  }
393
+  // 头部切换科室
394
+  changeKsNow() {
395
+    this.hsPromptModalShow = true;
396
+    clearInterval(this.timerCloseTime);
397
+    this.changeShow = false;
398
+  }
399
+  // 切换科室
400
+  changeKs() {
401
+    this.hsPromptModalShow = true;
402
+    // (1)	当用户设置为正数时,用户必须查看此窗体指定秒数。
403
+    // (2)	当用户设置为负数时,用户可点击知道了也可倒计时自动关闭。
404
+    // (3)	如果用户填写0则为无自动关闭和强制查看时间。
405
+    if (this.closeTimeFlag === 0) {
406
+      return;
407
+    }
408
+    this.closeTime = Math.abs(this.closeTimeFlag);
409
+    clearInterval(this.timerCloseTime);
410
+    this.timerCloseTime = setInterval(() => {
411
+      this.closeTime = Math.max(--this.closeTime, 0);
412
+      if (this.closeTime === 0) {
413
+        if (this.closeTimeFlag <= 0) {
414
+          this.hsPromptModalShow = false;
415
+        }
416
+        clearInterval(this.timerCloseTime);
417
+      }
418
+    }, 1000);
419
+  }
420
+}
421
+

+ 17 - 0
src/app/views/pharmacy2/pharmacy2.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { Pharmacy2RoutingModule } from './pharmacy2-routing.module';
5
+import { Pharmacy2Component } from './pharmacy2.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [Pharmacy2Component],
11
+  imports: [
12
+    CommonModule,
13
+    Pharmacy2RoutingModule,
14
+    ShareModule
15
+  ]
16
+})
17
+export class Pharmacy2Module { }