浏览代码

增加药房2

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

+ 6 - 0
src/app/services/main.service.ts

@@ -511,4 +511,10 @@ export class MainService {
511 511
       headers: this.headers,
512 512
     });
513 513
   }
514
+  //药房端2统计数据
515
+  getDrugsBagStateCount(data) {
516
+    return this.http.post(host.host + "/ser/getDrugsBagStateCount", data, {
517
+      headers: this.headers,
518
+    });
519
+  }
514 520
 }

+ 66 - 0
src/app/share/log-prompt-modal/log-prompt-modal.component.html

@@ -0,0 +1,66 @@
1
+<div
2
+  class="modal display_flex justify-content_flex-center align-items_center"
3
+  *ngIf="show"
4
+>
5
+  <div class="modalBody">
6
+    <div class="title">
7
+      流程信息查看<i
8
+        class="icon_transport transport-guanbi"
9
+        (click)="hideModal()"
10
+      ></i>
11
+    </div>
12
+    <div class="content">
13
+      <nz-table
14
+        class="hospitalTable"
15
+        [nzData]="historySpecimenList"
16
+        nzSize="middle"
17
+        [nzShowPagination]="false"
18
+        [nzLoading]="hsLoading"
19
+      >
20
+        <thead>
21
+          <tr class="thead">
22
+            <th nzWidth="8%">序号</th>
23
+            <th nzWidth="23%">时间</th>
24
+            <th nzWidth="23%">操作类型</th>
25
+            <th nzWidth="23%">操作人</th>
26
+            <th nzWidth="23%">交接人</th>
27
+          </tr>
28
+        </thead>
29
+        <tbody>
30
+          <tr *ngFor="let data of historySpecimenList; let i = index">
31
+            <td>{{ i + 1 }}</td>
32
+            <td>{{ data.operationTime | date: "MM-dd HH:mm" }}</td>
33
+            <td>{{ data.operationType ? data.operationType.name : "" }}</td>
34
+            <td>
35
+              {{ data.username || "暂无" }}
36
+              <span *ngIf="data.operatorAccount"
37
+                >({{ data.operatorAccount }})</span
38
+              >
39
+            </td>
40
+            <td>
41
+              {{ data.handoverPersonName || "暂无" }}
42
+              <span *ngIf="data.handoverPersonAccount"
43
+                >({{ data.handoverPersonAccount }})</span
44
+              >
45
+            </td>
46
+          </tr>
47
+        </tbody>
48
+      </nz-table>
49
+      <div class="pagination">
50
+        <nz-pagination
51
+          [(nzPageIndex)]="historySpecimenPageIndex"
52
+          [(nzTotal)]="historySpecimenListLength"
53
+          [(nzPageSize)]="historySpecimenPageSize"
54
+          (nzPageIndexChange)="getHistorySpecimen()"
55
+          (nzPageSizeChange)="getHistorySpecimen()"
56
+        >
57
+        </nz-pagination>
58
+      </div>
59
+    </div>
60
+    <div class="display_flex justify-content_flex-center">
61
+      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">
62
+        知道了
63
+      </button>
64
+    </div>
65
+  </div>
66
+</div>

+ 163 - 0
src/app/share/log-prompt-modal/log-prompt-modal.component.less

@@ -0,0 +1,163 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+    }
15
+    .thead {
16
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
17
+      th {
18
+        text-align: center !important;
19
+        color: #fff;
20
+        background: transparent;
21
+      }
22
+    }
23
+  }
24
+
25
+  .modalBody {
26
+    width: 700px;
27
+    min-height: 220px;
28
+    background: #fff;
29
+    border-radius: 5px;
30
+    padding: 10px 20px;
31
+    color: #333;
32
+    &.modalBody-search {
33
+      width: 480px;
34
+      min-height: 250px;
35
+    }
36
+
37
+    .title {
38
+      width: 100%;
39
+      text-align: center;
40
+      font-size: 18px;
41
+      position: relative;
42
+
43
+      i {
44
+        position: absolute;
45
+        right: 0;
46
+        top: 0;
47
+        font-size: 20px;
48
+        color: #666;
49
+        cursor: pointer;
50
+        padding: 0 5px;
51
+      }
52
+    }
53
+
54
+    .content {
55
+      min-height: 117px;
56
+      background: #f9fafb;
57
+      border: 1px solid #e5e9ed;
58
+      border-radius: 5px;
59
+      overflow: hidden;
60
+      margin-top: 12px;
61
+      display: flex;
62
+      flex-direction: column;
63
+      justify-content: center;
64
+      align-items: center;
65
+      &.content-search {
66
+        min-height: 147px;
67
+        justify-content: start;
68
+        .defeat-search {
69
+          width: 100%;
70
+          height: 52px;
71
+          display: flex;
72
+          justify-content: center;
73
+          align-items: center;
74
+          border-bottom: solid 1px #e5e9ed;
75
+          em {
76
+            color: #666;
77
+            font-style: normal;
78
+          }
79
+        }
80
+        .form {
81
+          width: 100%;
82
+          padding: 0 16px;
83
+          .ant-form-item-label,
84
+          .ant-form-explain {
85
+            text-align: left !important;
86
+          }
87
+        }
88
+      }
89
+
90
+      div {
91
+        text-align: center;
92
+        margin: 0;
93
+
94
+        &.defeat {
95
+          color: #333;
96
+          font-size: 28px;
97
+        }
98
+        &.countDown {
99
+          font-size: 14px;
100
+          color: 666;
101
+          em {
102
+            font-style: normal;
103
+            color: @primary-color;
104
+          }
105
+        }
106
+
107
+        &:nth-child(3) {
108
+          font-size: 14px;
109
+          color: #666;
110
+          padding-bottom: 10px;
111
+        }
112
+      }
113
+    }
114
+
115
+    button {
116
+      margin-top: 10px;
117
+
118
+      &.btn {
119
+        margin-left: 8px;
120
+      }
121
+    }
122
+  }
123
+
124
+  // 新增
125
+  &.add {
126
+    .modalBody {
127
+      width: 480px;
128
+      height: auto;
129
+
130
+      .content {
131
+        width: 100%;
132
+        height: auto;
133
+        padding: 18px 14px 0 14px;
134
+
135
+        .addForm {
136
+          .ant-form-item {
137
+            margin-bottom: 15px;
138
+
139
+            .ant-form-item-label {
140
+              line-height: 0;
141
+            }
142
+          }
143
+        }
144
+
145
+        .editForm {
146
+          .ant-form-item {
147
+            margin-bottom: 15px;
148
+
149
+            .ant-form-item-label {
150
+              line-height: 0;
151
+            }
152
+          }
153
+        }
154
+      }
155
+
156
+      button {
157
+        &:nth-child(1) {
158
+          margin-right: 20px;
159
+        }
160
+      }
161
+    }
162
+  }
163
+}

+ 55 - 0
src/app/share/log-prompt-modal/log-prompt-modal.component.ts

@@ -0,0 +1,55 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+
5
+@Component({
6
+  selector: "app-log-prompt-modal",
7
+  templateUrl: "./log-prompt-modal.component.html",
8
+  styleUrls: ["./log-prompt-modal.component.less"],
9
+})
10
+export class LogPromptModalComponent implements OnInit {
11
+  hosId;
12
+  // 切换科室,切换弹窗
13
+  hsLoading = false;
14
+  historySpecimenList: any = [];
15
+  historySpecimenPageIndex: number = 1; //表格当前页码
16
+  historySpecimenPageSize: number = 5; //表格每页展示条数
17
+  historySpecimenListLength: number = 10; //表格总数据量
18
+  @Input() show: Boolean;
19
+  @Input() packid: String;
20
+
21
+  @Output() closeModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
22
+
23
+  constructor(private mainService: MainService, private tool: ToolService) {}
24
+
25
+  ngOnInit() {
26
+    this.hosId = this.tool.getCurrentHospital().id;
27
+    this.getHistorySpecimen();
28
+  }
29
+  // 关闭弹窗
30
+  hideModal() {
31
+    this.closeModelHs.emit(JSON.stringify({ show: false })); //emits(向上弹射)事件
32
+  }
33
+  // 获取列表数据
34
+  getHistorySpecimen(idx?) {
35
+    if (idx) {
36
+      this.historySpecimenPageIndex = 1;
37
+    }
38
+    let postData = {
39
+      idx: this.historySpecimenPageIndex - 1,
40
+      sum: this.historySpecimenPageSize,
41
+      drugsBagOperationLog: {
42
+        hosId: this.hosId,
43
+        packid: this.packid,
44
+      },
45
+    };
46
+    this.hsLoading = true;
47
+    this.mainService
48
+      .getFetchDataList("simple/data", "drugsBagOperationLog", postData)
49
+      .subscribe((data) => {
50
+        this.hsLoading = false;
51
+        this.historySpecimenList = data.list || [];
52
+        this.historySpecimenListLength = data.totalNum || 0;
53
+      });
54
+  }
55
+}

+ 3 - 0
src/app/share/share.module.ts

@@ -30,6 +30,7 @@ import { HtmlTransformPipe } from '../pipes/html-transform.pipe';
30 30
 import { BxPromptModalComponent } from './bx-prompt-modal/bx-prompt-modal.component';
31 31
 import { ExcelExportComponent } from './excel-export/excel-export.component';
32 32
 import { FilterSelfPipe } from '../pipes/filter-self.pipe';
33
+import { LogPromptModalComponent } from './log-prompt-modal/log-prompt-modal.component';
33 34
 
34 35
 @NgModule({
35 36
   declarations: [
@@ -58,6 +59,7 @@ import { FilterSelfPipe } from '../pipes/filter-self.pipe';
58 59
     HtmlTransformPipe,
59 60
     FilterSelfPipe,
60 61
     ExcelExportComponent,
62
+    LogPromptModalComponent,
61 63
   ],
62 64
   imports: [
63 65
     CommonModule,
@@ -101,6 +103,7 @@ import { FilterSelfPipe } from '../pipes/filter-self.pipe';
101 103
     HtmlTransformPipe,
102 104
     FilterSelfPipe,
103 105
     ExcelExportComponent,
106
+    LogPromptModalComponent,
104 107
   ]
105 108
 })
106 109
 export class ShareModule { }

+ 1 - 0
src/app/views/main/main.component.html

@@ -35,6 +35,7 @@
35 35
           <button nz-button nzType="primary" *ngIf='deskRole' (click)="toFuwutai()">调度台</button>
36 36
           <button nz-button nzType="primary" *ngIf="nurseRole" (click)="toHuShi()">护士端</button>
37 37
           <button nz-button nzType="primary" *ngIf="pharmacyRole" (click)="toPharmacy()">药房端</button>
38
+          <button nz-button nzType="primary" *ngIf="pharmacyRole" (click)="toPharmacy2()">药房端2</button>
38 39
           <button nz-button nzType="primary" *ngIf="largeScreenRole" (click)="toBigScreen('largeScreen')">大屏端</button>
39 40
           <button nz-button nzType="primary" *ngIf="largeScreenRole2"
40 41
             (click)="toBigScreen('largeScreen2')">大屏端2</button>

+ 4 - 0
src/app/views/main/main.component.ts

@@ -206,6 +206,10 @@ export class MainComponent implements OnInit {
206 206
   toPharmacy(): void {
207 207
     this.router.navigateByUrl("pharmacy");
208 208
   }
209
+  // 药房端2
210
+  toPharmacy2(): void {
211
+    this.router.navigateByUrl("pharmacy2");
212
+  }
209 213
   // 大屏端或视图端
210 214
   screenType;
211 215
   hosFlag = false;

+ 48 - 60
src/app/views/pharmacy2/pharmacy2.component.html

@@ -12,8 +12,12 @@
12 12
     <div class="pharmacy-name">
13 13
       <h2 class="pharmacy-name__title">药房</h2>
14 14
       <div class="pharmacy-name__total">
15
-        <div>今日药单量:<strong>253</strong></div>
16
-        <div>今日已完成:<strong>248</strong></div>
15
+        <div>
16
+          今日药单量:<strong>{{ todayTotal }}</strong>
17
+        </div>
18
+        <div>
19
+          今日已完成:<strong>{{ todayComplete }}</strong>
20
+        </div>
17 21
       </div>
18 22
     </div>
19 23
     <div class="userInfo">
@@ -37,9 +41,7 @@
37 41
     <div class="pharmacy-main__list pharmacy-main__print">
38 42
       <!-- 标题 start -->
39 43
       <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> -->
44
+        <strong>药品计费(待配药)({{ printPharmacyTotal }})</strong>
43 45
         <span class="autoUpdate">{{ logTime }}秒</span>
44 46
       </div>
45 47
       <!-- 标题 end -->
@@ -62,6 +64,7 @@
62 64
       <overlay-scrollbars #osComponentRef1 class="pharmacy-main__selectionWrap">
63 65
         <div *ngIf="!loading1" style="height: 100%">
64 66
           <div
67
+            (click)="showLogs(item)"
65 68
             class="pharmacy-main__selection"
66 69
             *ngFor="let item of printPharmacyList"
67 70
           >
@@ -126,7 +129,7 @@
126 129
     <div class="pharmacy-main__list pharmacy-main__waitDelivery">
127 130
       <!-- 标题 start -->
128 131
       <div class="pharmacy-main__title">
129
-        <strong>配药中(3)</strong>
132
+        <strong>配药中({{ waitPharmacyTotal }})</strong>
130 133
         <span class="autoUpdate">{{ logTime }}秒</span>
131 134
       </div>
132 135
       <!-- 标题 end -->
@@ -149,6 +152,7 @@
149 152
       <overlay-scrollbars #osComponentRef2 class="pharmacy-main__selectionWrap">
150 153
         <div *ngIf="!loading2" style="height: 100%">
151 154
           <div
155
+            (click)="showLogs(item)"
152 156
             class="pharmacy-main__selection"
153 157
             *ngFor="let item of waitPharmacyList; let i = index"
154 158
           >
@@ -167,12 +171,6 @@
167 171
                   ><ng-container *ngIf="!item.bagTime">无</ng-container></span
168 172
                 >
169 173
               </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 174
             </div>
177 175
           </div>
178 176
           <div
@@ -219,7 +217,7 @@
219 217
     <div class="pharmacy-main__list pharmacy-main__delivery">
220 218
       <!-- 标题 start -->
221 219
       <div class="pharmacy-main__title">
222
-        <strong>核对中(3)</strong>
220
+        <strong>核对中({{ pharmacyTotal }})</strong>
223 221
         <span class="autoUpdate">{{ logTime }}秒</span>
224 222
       </div>
225 223
       <!-- 标题 end -->
@@ -242,8 +240,9 @@
242 240
       <overlay-scrollbars #osComponentRef3 class="pharmacy-main__selectionWrap">
243 241
         <div *ngIf="!loading3" style="height: 100%">
244 242
           <div
243
+            (click)="showLogs(item)"
245 244
             class="pharmacy-main__selection"
246
-            *ngFor="let item of waitPharmacyList; let i = index"
245
+            *ngFor="let item of pharmacyList; let i = index"
247 246
           >
248 247
             <div class="pharmacy-main__selectionInfo">
249 248
               <div class="pharmacy-main__selectionItem">
@@ -260,17 +259,11 @@
260 259
                   ><ng-container *ngIf="!item.bagTime">无</ng-container></span
261 260
                 >
262 261
               </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 262
             </div>
270 263
           </div>
271 264
           <div
272 265
             class="pharmacy-main__selection pharmacy-main__selection--noData"
273
-            *ngIf="waitPharmacyList.length === 0"
266
+            *ngIf="pharmacyList.length === 0"
274 267
           >
275 268
             <img src="./../../assets/images/image_kongbaiye.png" alt="" />
276 269
           </div>
@@ -308,13 +301,11 @@
308 301
       <!-- 列表 end -->
309 302
     </div>
310 303
     <!-- 核对中 end -->
311
-
312
-    <!-- 临时增加 start -->
313
-    <!-- 核对中 start -->
304
+    <!-- 配送中 start -->
314 305
     <div class="pharmacy-main__list pharmacy-main__delivery">
315 306
       <!-- 标题 start -->
316 307
       <div class="pharmacy-main__title">
317
-        <strong>配送中(3)</strong>
308
+        <strong>配送中({{ distributionTotal }})</strong>
318 309
         <span class="autoUpdate">{{ logTime }}秒</span>
319 310
       </div>
320 311
       <!-- 标题 end -->
@@ -324,9 +315,9 @@
324 315
           <input
325 316
             nz-input
326 317
             placeholder="请输入关键字"
327
-            [(ngModel)]="pharmacySearchKey"
318
+            [(ngModel)]="distributionSearchKey"
328 319
           />
329
-          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
320
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(4)">
330 321
             <i nz-icon nzType="search"></i>
331 322
             <span>搜索</span>
332 323
           </div>
@@ -335,10 +326,11 @@
335 326
       <!-- 搜索框 end -->
336 327
       <!-- 列表 start -->
337 328
       <overlay-scrollbars #osComponentRef4 class="pharmacy-main__selectionWrap">
338
-        <div *ngIf="!loading3" style="height: 100%">
329
+        <div *ngIf="!loading4" style="height: 100%">
339 330
           <div
331
+            (click)="showLogs(item)"
340 332
             class="pharmacy-main__selection"
341
-            *ngFor="let item of waitPharmacyList; let i = index"
333
+            *ngFor="let item of distributionList; let i = index"
342 334
           >
343 335
             <div class="pharmacy-main__selectionInfo">
344 336
               <div class="pharmacy-main__selectionItem">
@@ -355,24 +347,18 @@
355 347
                   ><ng-container *ngIf="!item.bagTime">无</ng-container></span
356 348
                 >
357 349
               </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 350
             </div>
365 351
           </div>
366 352
           <div
367 353
             class="pharmacy-main__selection pharmacy-main__selection--noData"
368
-            *ngIf="waitPharmacyList.length === 0"
354
+            *ngIf="distributionList.length === 0"
369 355
           >
370 356
             <img src="./../../assets/images/image_kongbaiye.png" alt="" />
371 357
           </div>
372 358
           <div
373
-            (click)="loadMore(3)"
359
+            (click)="loadMore(4)"
374 360
             class="pharmacy-main__selection pharmacy-main__selection--more"
375
-            *ngIf="pharmacyFlag"
361
+            *ngIf="distributionFlag"
376 362
           >
377 363
             <div class="pharmacy-main__selectionInfo">
378 364
               <i
@@ -380,14 +366,14 @@
380 366
                 nzType="loading"
381 367
                 nzTheme="outline"
382 368
                 class="pharmacy-main__selection--icon"
383
-                *ngIf="pharmacyLoad"
369
+                *ngIf="distributionLoad"
384 370
               ></i
385 371
               >查看更多
386 372
             </div>
387 373
           </div>
388 374
         </div>
389 375
         <div
390
-          *ngIf="loading3"
376
+          *ngIf="loading4"
391 377
           style="height: calc(100vh - 212px); min-height: 556px"
392 378
         >
393 379
           <div
@@ -402,12 +388,12 @@
402 388
       </overlay-scrollbars>
403 389
       <!-- 列表 end -->
404 390
     </div>
405
-    <!-- 核对中 end -->
406
-    <!-- 核对中 start -->
391
+    <!-- 配送中 end -->
392
+    <!-- 已完成 start -->
407 393
     <div class="pharmacy-main__list pharmacy-main__delivery">
408 394
       <!-- 标题 start -->
409 395
       <div class="pharmacy-main__title">
410
-        <strong>已完成(3)</strong>
396
+        <strong>已完成({{ completedTotal }})</strong>
411 397
         <span class="autoUpdate">{{ logTime }}秒</span>
412 398
       </div>
413 399
       <!-- 标题 end -->
@@ -417,9 +403,9 @@
417 403
           <input
418 404
             nz-input
419 405
             placeholder="请输入关键字"
420
-            [(ngModel)]="pharmacySearchKey"
406
+            [(ngModel)]="completedSearchKey"
421 407
           />
422
-          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(3)">
408
+          <div class="pharmacy-main__searchText" (click)="searchKeyHandle(5)">
423 409
             <i nz-icon nzType="search"></i>
424 410
             <span>搜索</span>
425 411
           </div>
@@ -428,10 +414,11 @@
428 414
       <!-- 搜索框 end -->
429 415
       <!-- 列表 start -->
430 416
       <overlay-scrollbars #osComponentRef5 class="pharmacy-main__selectionWrap">
431
-        <div *ngIf="!loading3" style="height: 100%">
417
+        <div *ngIf="!loading5" style="height: 100%">
432 418
           <div
419
+            (click)="showLogs(item)"
433 420
             class="pharmacy-main__selection"
434
-            *ngFor="let item of waitPharmacyList; let i = index"
421
+            *ngFor="let item of completedList; let i = index"
435 422
           >
436 423
             <div class="pharmacy-main__selectionInfo">
437 424
               <div class="pharmacy-main__selectionItem">
@@ -448,24 +435,18 @@
448 435
                   ><ng-container *ngIf="!item.bagTime">无</ng-container></span
449 436
                 >
450 437
               </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 438
             </div>
458 439
           </div>
459 440
           <div
460 441
             class="pharmacy-main__selection pharmacy-main__selection--noData"
461
-            *ngIf="waitPharmacyList.length === 0"
442
+            *ngIf="completedList.length === 0"
462 443
           >
463 444
             <img src="./../../assets/images/image_kongbaiye.png" alt="" />
464 445
           </div>
465 446
           <div
466
-            (click)="loadMore(3)"
447
+            (click)="loadMore(5)"
467 448
             class="pharmacy-main__selection pharmacy-main__selection--more"
468
-            *ngIf="pharmacyFlag"
449
+            *ngIf="completedFlag"
469 450
           >
470 451
             <div class="pharmacy-main__selectionInfo">
471 452
               <i
@@ -473,14 +454,14 @@
473 454
                 nzType="loading"
474 455
                 nzTheme="outline"
475 456
                 class="pharmacy-main__selection--icon"
476
-                *ngIf="pharmacyLoad"
457
+                *ngIf="completedLoad"
477 458
               ></i
478 459
               >查看更多
479 460
             </div>
480 461
           </div>
481 462
         </div>
482 463
         <div
483
-          *ngIf="loading3"
464
+          *ngIf="loading5"
484 465
           style="height: calc(100vh - 212px); min-height: 556px"
485 466
         >
486 467
           <div
@@ -495,8 +476,7 @@
495 476
       </overlay-scrollbars>
496 477
       <!-- 列表 end -->
497 478
     </div>
498
-    <!-- 核对中 end -->
499
-    <!-- 临时增加 end -->
479
+    <!-- 已完成 end -->
500 480
   </div>
501 481
   <!-- 主体部分 end -->
502 482
   <!-- 二维码打印 -->
@@ -584,3 +564,11 @@
584 564
     ></div>
585 565
   </div>
586 566
 </app-hs-prompt-modal>
567
+
568
+<!-- 药包流程信息查看 -->
569
+<app-log-prompt-modal
570
+  *ngIf="logPromptModalShow"
571
+  [show]="logPromptModalShow"
572
+  [packid]="packid"
573
+  (closeModelHs)="closeModelLog($event)"
574
+></app-log-prompt-modal>

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

@@ -255,6 +255,7 @@
255 255
 					box-sizing: border-box;
256 256
 					border-bottom: 1px solid #e5e9ed;
257 257
           display: flex;
258
+          cursor: pointer;
258 259
           &.pharmacy-main__selection--more{
259 260
             color: @primary-color;
260 261
             height: 34px;

+ 158 - 13
src/app/views/pharmacy2/pharmacy2.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from "@angular/core";
2 2
 import { MainService } from "../../services/main.service";
3 3
 import { Router } from "@angular/router";
4 4
 import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
5
+import { startOfDay, format, endOfDay } from "date-fns";
5 6
 
6 7
 @Component({
7 8
   selector: "app-pharmacy2",
@@ -35,26 +36,47 @@ export class Pharmacy2Component implements OnInit {
35 36
   })
36 37
   osComponentRef5: OverlayScrollbarsComponent;
37 38
   constructor(private mainService: MainService, public router: Router) {}
39
+  // 今日药单量
40
+  todayTotal: undefined;
41
+  // 今日已完成
42
+  todayComplete: undefined;
38 43
   //待配药数据
39 44
   codes = [];
40 45
   // 待配药
41 46
   printPharmacyList = []; //数据列表
42 47
   printPharmacyIdx = 0; //页码
48
+  printPharmacyTotal = 0; //总数
43 49
   printPharmacyFlag = false; //是否查看更多
44 50
   printPharmacySearchKey = ""; //搜索的内容
45 51
   printPharmacyLoad = false; //按钮的loading
46 52
   // 配药中列表
47 53
   waitPharmacyList = [];
48 54
   waitPharmacyIdx = 0;
55
+  waitPharmacyTotal = 0;
49 56
   waitPharmacyFlag = false;
50 57
   waitPharmacySearchKey = "";
51 58
   waitPharmacyLoad = false;
52 59
   // 核对中列表
53 60
   pharmacyList = [];
54 61
   pharmacyIdx = 0;
62
+  pharmacyTotal = 0;
55 63
   pharmacyFlag = false;
56 64
   pharmacySearchKey = "";
57 65
   pharmacyLoad = false;
66
+  // 配送中列表
67
+  distributionList = [];
68
+  distributionIdx = 0;
69
+  distributionTotal = 0;
70
+  distributionFlag = false;
71
+  distributionSearchKey = "";
72
+  distributionLoad = false;
73
+  // 已完成列表
74
+  completedList = [];
75
+  completedIdx = 0;
76
+  completedTotal = 0;
77
+  completedFlag = false;
78
+  completedSearchKey = "";
79
+  completedLoad = false;
58 80
 
59 81
   // other
60 82
   loginUser: any = localStorage.getItem("user")
@@ -66,6 +88,9 @@ export class Pharmacy2Component implements OnInit {
66 88
   logTimeConst = 60; //自动刷新秒数
67 89
 
68 90
   ngOnInit() {
91
+    // 统计
92
+    this.total();
93
+    // 切换科室
69 94
     this.changeKs();
70 95
     // 待配药列表
71 96
     this.getPharmacyList(this.printPharmacyIdx, 1, this.printPharmacySearchKey);
@@ -73,14 +98,53 @@ export class Pharmacy2Component implements OnInit {
73 98
     this.getPharmacyList(this.waitPharmacyIdx, 2, this.waitPharmacySearchKey);
74 99
     // 核对中列表
75 100
     this.getPharmacyList(this.pharmacyIdx, 3, this.pharmacySearchKey);
101
+    // 配送中列表
102
+    this.getPharmacyList(this.distributionIdx, 4, this.distributionSearchKey);
103
+    // 已完成列表
104
+    this.getPharmacyList(this.completedIdx, 5, this.completedSearchKey);
76 105
     this.initRole();
77 106
     // 自动刷新倒计时 start
78 107
     this.autoUpdate();
79 108
     // 自动刷新倒计时 end
80 109
   }
110
+  // 统计
111
+  total() {
112
+    let launch = {
113
+      id: JSON.parse(localStorage.getItem("user")).user.dept.id,
114
+    };
115
+    let startTime = format(startOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
116
+    let endTime = format(endOfDay(new Date()), "yyyy-MM-dd HH:mm:ss");
117
+    let postData = {
118
+      startTime,
119
+      endTime,
120
+      launch,
121
+    };
122
+
123
+    this.mainService.getDrugsBagStateCount(postData).subscribe((res: any) => {
124
+      if (res.status == 200) {
125
+        this.todayTotal = res.countMap.todayTotal;
126
+        this.todayComplete = res.countMap.todayComplete;
127
+      }
128
+    });
129
+  }
130
+  // 查看流程信息弹窗
131
+  logPromptModalShow = false; //弹窗开关
132
+  packid = ""; //查看记录携带packid
133
+  showLogs(data) {
134
+    clearInterval(this.logTimer);
135
+    this.packid = data.packid;
136
+    this.logPromptModalShow = true;
137
+  }
138
+  // 关闭流程信息弹窗
139
+  closeModelLog(e) {
140
+    this.logPromptModalShow = JSON.parse(e).show;
141
+    this.autoUpdate(false);
142
+  }
81 143
   // 自动刷新倒计时
82
-  autoUpdate(){
83
-    this.logTime = this.logTimeConst;
144
+  autoUpdate(flag = true) {
145
+    if (flag) {
146
+      this.logTime = this.logTimeConst;
147
+    }
84 148
     clearInterval(this.logTimer);
85 149
     this.logTimer = setInterval(() => {
86 150
       this.logTime--;
@@ -92,15 +156,21 @@ export class Pharmacy2Component implements OnInit {
92 156
         this.getPharmacyList(0, 2, this.waitPharmacySearchKey);
93 157
         // 核对中列表
94 158
         this.getPharmacyList(0, 3, this.pharmacySearchKey);
159
+        // 配送中列表
160
+        this.getPharmacyList(0, 4, this.distributionSearchKey);
161
+        // 已完成列表
162
+        this.getPharmacyList(0, 5, this.completedSearchKey);
95 163
       }
96 164
     }, 1000);
97 165
   }
98 166
   // 药房端药房列表查询、搜索
99
-  // 1为pc待打印状态、2为pc配药中、3为pc核对中
167
+  // 1为pc待打印状态、2为pc配药中、3为pc核对中、4为pc配送中
100 168
   // searchKey  为搜索的关键字,没有就不传
101 169
   loading1 = false;
102 170
   loading2 = false;
103 171
   loading3 = false;
172
+  loading4 = false;
173
+  loading5 = false;
104 174
   getPharmacyList(idx, type, searchKey) {
105 175
     let launch = {
106 176
       id: JSON.parse(localStorage.getItem("user")).user.dept.id,
@@ -115,11 +185,17 @@ export class Pharmacy2Component implements OnInit {
115 185
       case 3:
116 186
         this.loading3 = true;
117 187
         break;
188
+      case 4:
189
+        this.loading4 = true;
190
+        break;
191
+      case 5:
192
+        this.loading5 = true;
193
+        break;
118 194
     }
119 195
     let postData = {
120 196
       idx,
121 197
       sum: 10,
122
-      drugsBag: { searchType: type, searchKey, launch },
198
+      drugsBag: { searchState: type, searchKey, launch, platform: 3 },
123 199
     };
124 200
     this.mainService
125 201
       .getFetchDataList("api", "drugsBag", postData)
@@ -134,10 +210,18 @@ export class Pharmacy2Component implements OnInit {
134 210
           case 3:
135 211
             this.loading3 = false;
136 212
             break;
213
+          case 4:
214
+            this.loading4 = false;
215
+            break;
216
+          case 5:
217
+            this.loading5 = false;
218
+            break;
137 219
         }
138 220
         if (result["status"] == 200) {
139 221
           switch (type) {
140 222
             case 1:
223
+              // 总数
224
+              this.printPharmacyTotal = result.totalNum;
141 225
               // 隐藏按钮的loading
142 226
               this.printPharmacyLoad = false;
143 227
               // 查看更多,是否显示
@@ -149,9 +233,9 @@ export class Pharmacy2Component implements OnInit {
149 233
                 this.printPharmacyFlag = true;
150 234
               }
151 235
               // 列表数据合并
152
-              if(idx === 0){
236
+              if (idx === 0) {
153 237
                 this.printPharmacyList = result["list"];
154
-              }else{
238
+              } else {
155 239
                 this.printPharmacyList = [
156 240
                   ...this.printPharmacyList,
157 241
                   ...result["list"],
@@ -159,6 +243,7 @@ export class Pharmacy2Component implements OnInit {
159 243
               }
160 244
               break;
161 245
             case 2:
246
+              this.waitPharmacyTotal = result.totalNum;
162 247
               this.waitPharmacyLoad = false;
163 248
               if (result["list"].length < 10) {
164 249
                 this.waitPharmacyFlag = false;
@@ -167,9 +252,9 @@ export class Pharmacy2Component implements OnInit {
167 252
               } else {
168 253
                 this.waitPharmacyFlag = true;
169 254
               }
170
-              if(idx === 0){
255
+              if (idx === 0) {
171 256
                 this.waitPharmacyList = result["list"];
172
-              }else{
257
+              } else {
173 258
                 this.waitPharmacyList = [
174 259
                   ...this.waitPharmacyList,
175 260
                   ...result["list"],
@@ -177,6 +262,7 @@ export class Pharmacy2Component implements OnInit {
177 262
               }
178 263
               break;
179 264
             case 3:
265
+              this.pharmacyTotal = result.totalNum;
180 266
               this.pharmacyLoad = false;
181 267
               if (result["list"].length < 10) {
182 268
                 this.pharmacyFlag = false;
@@ -185,15 +271,47 @@ export class Pharmacy2Component implements OnInit {
185 271
               } else {
186 272
                 this.pharmacyFlag = true;
187 273
               }
188
-              if(idx === 0){
274
+              if (idx === 0) {
189 275
                 this.pharmacyList = result["list"];
190
-              }else{
191
-                this.pharmacyList = [
192
-                  ...this.pharmacyList,
276
+              } else {
277
+                this.pharmacyList = [...this.pharmacyList, ...result["list"]];
278
+              }
279
+              break;
280
+            case 4:
281
+              this.distributionTotal = result.totalNum;
282
+              this.distributionLoad = false;
283
+              if (result["list"].length < 10) {
284
+                this.distributionFlag = false;
285
+              } else if (result["list"].length === 0 && idx === 0) {
286
+                this.distributionFlag = false;
287
+              } else {
288
+                this.distributionFlag = true;
289
+              }
290
+              if (idx === 0) {
291
+                this.distributionList = result["list"];
292
+              } else {
293
+                this.distributionList = [
294
+                  ...this.distributionList,
193 295
                   ...result["list"],
194 296
                 ];
195 297
               }
196 298
               break;
299
+            case 5:
300
+              this.completedTotal = result.totalNum;
301
+              this.completedLoad = false;
302
+              if (result["list"].length < 10) {
303
+                this.completedFlag = false;
304
+              } else if (result["list"].length === 0 && idx === 0) {
305
+                this.completedFlag = false;
306
+              } else {
307
+                this.completedFlag = true;
308
+              }
309
+              if (idx === 0) {
310
+                this.completedList = result["list"];
311
+              } else {
312
+                this.completedList = [...this.completedList, ...result["list"]];
313
+              }
314
+              break;
197 315
           }
198 316
         }
199 317
       });
@@ -224,6 +342,20 @@ export class Pharmacy2Component implements OnInit {
224 342
         this.pharmacyLoad = true;
225 343
         this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
226 344
         break;
345
+      case 4:
346
+        this.distributionIdx++;
347
+        this.distributionLoad = true;
348
+        this.getPharmacyList(
349
+          this.distributionIdx,
350
+          type,
351
+          this.distributionSearchKey
352
+        );
353
+        break;
354
+      case 5:
355
+        this.completedIdx++;
356
+        this.completedLoad = true;
357
+        this.getPharmacyList(this.completedIdx, type, this.completedSearchKey);
358
+        break;
227 359
     }
228 360
   }
229 361
   // 搜索关键词
@@ -252,6 +384,20 @@ export class Pharmacy2Component implements OnInit {
252 384
         this.pharmacyList = []; //列表重置
253 385
         this.getPharmacyList(this.pharmacyIdx, type, this.pharmacySearchKey);
254 386
         break;
387
+      case 4:
388
+        this.distributionIdx = 0; //页码重置
389
+        this.distributionList = []; //列表重置
390
+        this.getPharmacyList(
391
+          this.distributionIdx,
392
+          type,
393
+          this.distributionSearchKey
394
+        );
395
+        break;
396
+      case 5:
397
+        this.completedIdx = 0; //页码重置
398
+        this.completedList = []; //列表重置
399
+        this.getPharmacyList(this.completedIdx, type, this.completedSearchKey);
400
+        break;
255 401
     }
256 402
   }
257 403
   // 退出
@@ -418,4 +564,3 @@ export class Pharmacy2Component implements OnInit {
418 564
     }, 1000);
419 565
   }
420 566
 }
421
-