浏览代码

出库记录

seimin 1 年之前
父节点
当前提交
9d29287be4

+ 189 - 0
src/app/share/outgoing-record-detail/outgoing-record-detail.component.html

@@ -0,0 +1,189 @@
1
+<div class="detail" *ngIf="!maskFlag">
2
+  <div class="title">
3
+    查看详情<i class="icon_transport transport-guanbi" (click)="close()"></i>
4
+  </div>
5
+  <div class="box">
6
+    <div class="tab display_flex">
7
+      <div
8
+        [ngClass]="{ item: true, flex_1: true, checked: tabType == 1 }"
9
+        (click)="checkTab(1)"
10
+      >
11
+        详情信息
12
+      </div>
13
+      <div
14
+        [ngClass]="{ item: true, flex_1: true, checked: tabType == 4 }"
15
+        (click)="checkTab(4)"
16
+      >
17
+        医废信息
18
+      </div>
19
+    </div>
20
+
21
+    <!-- 详情信息 -->
22
+    <overlay-scrollbars
23
+      #osComponentRef3
24
+      style="flex: 1"
25
+      *ngIf="tabType == 1"
26
+    >
27
+      <div class="content orders">
28
+        <div class="top">
29
+          <div class="info" nz-row>
30
+            <div nz-col nzSpan="8">
31
+              批次号:{{ orderInfo.batchNo }}
32
+            </div>
33
+            <div nz-col nzSpan="8">
34
+              凭证编号:{{ orderInfo.credentialsNumber }}
35
+            </div>
36
+            <div nz-col nzSpan="8">
37
+              出库时间:{{ orderInfo.outTime | date: "yyyy-MM-dd HH:mm:ss" }}
38
+            </div>
39
+          </div>
40
+          <div class="info" nz-row>
41
+            <div nz-col nzSpan="16">
42
+              医废类型:{{ orderInfo.clinicalWasteTypeNames }}
43
+            </div>
44
+            <div nz-col nzSpan="8">
45
+              操作人:{{ orderInfo.operator ? orderInfo.operator.name : '' }}
46
+            </div>
47
+          </div>
48
+          <div class="info" nz-row>
49
+            <div nz-col nzSpan="6">
50
+              总重量:{{ orderInfo.totalWeight }}kg
51
+            </div>
52
+            <div nz-col nzSpan="6">
53
+              总袋数:{{ orderInfo.totalBags }}袋
54
+            </div>
55
+            <div nz-col nzSpan="6">
56
+              总箱数:{{ orderInfo.totalBox }}箱
57
+            </div>
58
+            <div nz-col nzSpan="6">
59
+              总桶数:{{ orderInfo.totalBucket }}桶
60
+            </div>
61
+          </div>
62
+        </div>
63
+        <div class="top">
64
+          <div class="info" nz-row>
65
+            <div nz-col nzSpan="8">
66
+              运输单位:{{ orderInfo.transportCompany ? orderInfo.transportCompany.name : '' }}
67
+            </div>
68
+            <div nz-col nzSpan="8">
69
+              司机姓名:{{ orderInfo.driver ? orderInfo.driver.name : '' }}
70
+            </div>
71
+            <div nz-col nzSpan="8">
72
+              司机联系方式:{{ orderInfo.driver ? orderInfo.driver.mphone : '' }}
73
+            </div>
74
+          </div>
75
+          <div class="info" nz-row>
76
+            <div nz-col nzSpan="8">
77
+              车牌号码:{{ orderInfo.carNo }}
78
+            </div>
79
+            <div nz-col nzSpan="8">
80
+              营运证件号:{{ orderInfo.transportCompany ? orderInfo.transportCompany.businessCode : '' }}
81
+            </div>
82
+          </div>
83
+          <div class="info" nz-row>
84
+            <div nz-col nzSpan="24">
85
+              运输单位地址:{{ orderInfo.transportCompany ? orderInfo.transportCompany.address : '' }}
86
+            </div>
87
+          </div>
88
+        </div>
89
+        <div class="top">
90
+          <div class="info" nz-row>
91
+            <div nz-col nzSpan="8">
92
+              接收单位:{{ orderInfo.receptionCompany ? orderInfo.receptionCompany.name : '' }}
93
+            </div>
94
+            <div nz-col nzSpan="8">
95
+              危险物经营许可证编号:{{ orderInfo.receptionCompany ? orderInfo.receptionCompany.businessCode : '' }}
96
+            </div>
97
+            <div nz-col nzSpan="8">
98
+              联系人:{{ orderInfo.receptionCompany ? orderInfo.receptionCompany.contacts : '' }}
99
+            </div>
100
+          </div>
101
+          <div class="info" nz-row>
102
+            <div nz-col nzSpan="8">
103
+              联系电话:{{ orderInfo.receptionCompany ? orderInfo.receptionCompany.mphone : '' }}
104
+            </div>
105
+            <div nz-col nzSpan="16">
106
+              接收单位地址:{{ orderInfo.receptionCompany ? orderInfo.receptionCompany.address : '' }}
107
+            </div>
108
+          </div>
109
+        </div>
110
+      </div>
111
+    </overlay-scrollbars>
112
+    <!-- 医废信息 -->
113
+    <overlay-scrollbars
114
+      #osComponentRef2
115
+      style="flex:1;"
116
+      *ngIf="tabType == 4"
117
+    >
118
+      <div class="content jifen">
119
+        <div class="table">
120
+          <nz-table
121
+            class="integralTable"
122
+            [nzData]="[1, 2]"
123
+            nzSize="middle"
124
+            [nzShowPagination]="null" [nzLoading]="hsLoading"
125
+          >
126
+            <thead>
127
+              <tr class="thead">
128
+                <th nzWidth="14%">医废类型</th>
129
+                <th nzWidth="14%">序号</th>
130
+                <th nzWidth="14%">重量(KG)</th>
131
+                <th nzWidth="14%">科室名称</th>
132
+                <th nzWidth="14%">收取人</th>
133
+                <th nzWidth="14%">收取时间</th>
134
+                <th nzWidth="16%">备注</th>
135
+              </tr>
136
+            </thead>
137
+            <tbody>
138
+              <tr *ngFor="let item of list; let i = index">
139
+                <td>{{ item.clinicalWasteType ? item.clinicalWasteType.typeName : "" }}</td>
140
+                <td>{{ item.clinicalWasteSn }}</td>
141
+                <td>{{ item.weight }}</td>
142
+                <td>{{ item.dept ? item.dept.dept : "" }}</td>
143
+                <td>{{ item.receivor ? item.receivor.name : "" }}</td>
144
+                <td>{{ item.receiveTime | date:'yyyy-MM-dd HH:mm:ss' }}</td>
145
+                <td>{{ item.remark }}</td>
146
+              </tr>
147
+            </tbody>
148
+          </nz-table>
149
+          <div class="pagination">
150
+            <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
151
+            <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
152
+              [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
153
+              (nzPageSizeChange)="getList()" [nzShowTotal]="totalTemplate">
154
+            </nz-pagination>
155
+          </div>
156
+        </div>
157
+      </div>
158
+    </overlay-scrollbars>
159
+  </div>
160
+  <div class="btns">
161
+    <button class="btn cancel" nz-button nzType="default" (click)="close()">
162
+      关闭
163
+    </button>
164
+  </div>
165
+</div>
166
+<!-- 操作成功/失败提示框 -->
167
+<app-prompt-modal
168
+  *ngIf="promptModalShow"
169
+  [content]="promptContent"
170
+  [success]="ifSuccess"
171
+  [show]="promptModalShow"
172
+  [info]="promptInfo"
173
+  (closeModel)="close()"
174
+>
175
+  <!-- 2.父组件调用子组件时绑定到这个事件属性,并在事件发生时作出回应。(closeModel)="close()" -->
176
+</app-prompt-modal>
177
+
178
+<!-- 业务数据查看 -->
179
+<app-businessData-detail-modal
180
+  *ngIf="businessDataModalShow"
181
+  [show]="businessDataModalShow"
182
+  [type]="businessDataModalType"
183
+  [orderId]="orderId"
184
+  (closeModelHs)="closeModelBlood($event)"
185
+></app-businessData-detail-modal>
186
+
187
+<!-- 遮罩 -->
188
+<app-mask *ngIf="maskFlag"></app-mask>
189
+<app-image-viewer [imageUrl]="imgs" hidden *ngIf="isPreview" [isPreviewNow]="true"></app-image-viewer>

+ 540 - 0
src/app/share/outgoing-record-detail/outgoing-record-detail.component.less

@@ -0,0 +1,540 @@
1
+@import "../../../../src/theme.less";
2
+:host {
3
+  width: 100%;
4
+  height: 100%;
5
+  position: fixed;
6
+  left: 0;
7
+  top: 0;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 99;
10
+
11
+  display: flex;
12
+  justify-content: center;
13
+  align-items: center;
14
+}
15
+
16
+.detail {
17
+  display: flex;
18
+  flex-direction: column;
19
+  width: 1200px;
20
+  // min-height: 580px;
21
+  border-radius: 5px;
22
+  background: #fff;
23
+  color: #333;
24
+  font-size: 14px;
25
+  padding: 12px 20px;
26
+  position: relative;
27
+  padding-bottom: 70px;
28
+
29
+  .pagination{
30
+    margin: 8px;
31
+    text-align: right;
32
+  }
33
+
34
+  .title {
35
+    font-size: 18px;
36
+    text-align: center;
37
+    line-height: 24px;
38
+    margin: 0;
39
+    margin-bottom: 12px;
40
+    position: relative;
41
+
42
+    i {
43
+      position: absolute;
44
+      right: 0;
45
+      top: 0;
46
+      font-size: 20px;
47
+      color: #666;
48
+      cursor: pointer;
49
+      padding: 0 5px;
50
+    }
51
+  }
52
+
53
+  & > .box {
54
+    width: 1160px;
55
+    border: 1px solid #e5e9ed;
56
+    border-radius: 5px;
57
+    flex: 1;
58
+    overflow: hidden;
59
+    display: flex;
60
+    flex-direction: column;
61
+
62
+    .tab {
63
+      width: 100%;
64
+      height: 60px;
65
+      border-bottom: 1px solid #e5e9ed;
66
+
67
+      .item {
68
+        text-align: center;
69
+        line-height: 60px;
70
+        height: 100%;
71
+        border-right: 1px solid #e5e9ed;
72
+
73
+        &:nth-last-child(1) {
74
+          border: none;
75
+        }
76
+
77
+        &.checked {
78
+          background: #f9fafb;
79
+        }
80
+      }
81
+    }
82
+
83
+    .content {
84
+      width: 100%;
85
+      // min-height: 453px;
86
+      display: flex;
87
+      flex-direction: column;
88
+
89
+      &.orders {
90
+        background: #f9fafb;
91
+      }
92
+
93
+      & > .top {
94
+        padding: 10px 32px;
95
+        border-bottom: 1px solid #e5e9ed;
96
+        overflow: hidden;
97
+        background: #fff;
98
+
99
+        .num {
100
+          font-size: 16px;
101
+          overflow: hidden;
102
+          margin-bottom: 6px;
103
+
104
+          .left {
105
+            float: left;
106
+            font-weight: 600;
107
+          }
108
+
109
+          .right {
110
+            float: right;
111
+          }
112
+        }
113
+
114
+        .info {
115
+          color: #666;
116
+
117
+          & > div {
118
+            margin: 4px 0;
119
+          }
120
+
121
+          .jiaji {
122
+            margin: 0;
123
+            margin-top: 8px;
124
+          }
125
+        }
126
+      }
127
+
128
+      & > .center {
129
+        padding: 27px 0 17px 0;
130
+        border-bottom: 1px solid #e5e9ed;
131
+        font-size: 12px;
132
+        background: #fff;
133
+
134
+        .box {
135
+          display: flex;
136
+          justify-content: center;
137
+
138
+          .steps {
139
+            &:nth-last-child(1) {
140
+              .line {
141
+                display: none !important;
142
+              }
143
+            }
144
+
145
+            .step {
146
+              .info {
147
+                width: 90px;
148
+                text-align: center;
149
+                display: inline-block;
150
+                vertical-align: top;
151
+
152
+                i {
153
+                  color: #e5e9ed;
154
+
155
+                  &.green {
156
+                    color: @primary-color;
157
+                  }
158
+                }
159
+              }
160
+
161
+              p {
162
+                margin: 0;
163
+              }
164
+
165
+              .line {
166
+                display: inline-block;
167
+                width: 60px;
168
+                height: 2px;
169
+                background: #e5e9ed;
170
+              }
171
+            }
172
+          }
173
+        }
174
+      }
175
+
176
+      & > .bottom {
177
+        flex: 1;
178
+        padding: 25px 32px;
179
+        background: #f9fafb;
180
+
181
+        .amplification {
182
+          display: flex;
183
+          justify-content: flex-end;
184
+          margin-bottom: 8px;
185
+        }
186
+
187
+        .urgent {
188
+          input {
189
+            width: 600px;
190
+          }
191
+
192
+          .candelBtn {
193
+            margin-left: 20px;
194
+          }
195
+        }
196
+
197
+        .table {
198
+          width: 100%;
199
+          height: 100%;
200
+          min-height: 160px;
201
+          background: #fff;
202
+          border-radius: 5px;
203
+
204
+          .thead {
205
+            background-image: repeating-linear-gradient(
206
+              to right,
207
+              @bg-start,
208
+              @bg-end 100%
209
+            ) !important;
210
+
211
+            th {
212
+              color: #fff !important;
213
+              text-align: center;
214
+              font-size: 12px;
215
+              border: none;
216
+            }
217
+          }
218
+
219
+          .detailDrugTable {
220
+            .thead {
221
+              background-image: repeating-linear-gradient(
222
+                to right,
223
+                @bg-start,
224
+                @bg-end 50%
225
+              ) !important;
226
+            }
227
+          }
228
+
229
+          .ant-table-tbody {
230
+            tr {
231
+              text-align: center;
232
+              font-size: 12px;
233
+              border: none;
234
+
235
+              td {
236
+                border: none;
237
+                position: relative;
238
+              }
239
+            }
240
+
241
+            tr:nth-child(2n) {
242
+              background: #f9fafb;
243
+            }
244
+          }
245
+        }
246
+
247
+        .info {
248
+          width: 100%;
249
+          height: 100%;
250
+          background: #fff;
251
+          border-radius: 5px;
252
+          border: 1px solid #e5e9ed;
253
+          padding: 24px 28px 14px 28px;
254
+          margin-bottom: 8px;
255
+
256
+          .top {
257
+            .left {
258
+              border-right: 1px dashed #e5e9ed;
259
+
260
+              p {
261
+                padding: 0 70px 0 102px;
262
+                overflow: hidden;
263
+
264
+                & > span:nth-child(1) {
265
+                  float: left;
266
+                }
267
+
268
+                & > span:nth-child(2) {
269
+                  float: right;
270
+                  color: #666;
271
+                  text-align: right;
272
+                  max-width: 175px;
273
+                }
274
+              }
275
+            }
276
+
277
+            .right {
278
+              p {
279
+                padding: 0 102px 0 70px;
280
+                overflow: hidden;
281
+
282
+                span:nth-child(1) {
283
+                  float: left;
284
+                }
285
+
286
+                span:nth-child(2) {
287
+                  float: right;
288
+                  color: #666;
289
+                  text-align: right;
290
+                }
291
+              }
292
+            }
293
+          }
294
+
295
+          .wait {
296
+            text-align: center;
297
+            margin-top: 7px;
298
+
299
+            i {
300
+              font-size: 24px;
301
+              color: #62c26d;
302
+            }
303
+
304
+            span {
305
+              color: #62c26d;
306
+            }
307
+          }
308
+        }
309
+      }
310
+
311
+      &.pingjia {
312
+        .msg {
313
+          width: 100%;
314
+          height: 50px;
315
+          line-height: 50px;
316
+          padding-left: 32px;
317
+          border-bottom: 1px solid #e5e9ed;
318
+
319
+          div {
320
+            display: inline-block;
321
+            margin-right: 100px;
322
+          }
323
+        }
324
+
325
+        .con {
326
+          padding: 16px 32px;
327
+          min-height: 360px;
328
+        }
329
+      }
330
+
331
+      & > .form {
332
+        .ant-form-item {
333
+          padding: 0 32px 13px 32px;
334
+          margin-bottom: 0;
335
+          border-bottom: 1px solid #e5e9ed;
336
+
337
+          &:nth-last-child(1) {
338
+            border: none;
339
+          }
340
+        }
341
+
342
+        .ant-form-item-label {
343
+          line-height: 34px;
344
+          text-align: left;
345
+        }
346
+      }
347
+
348
+      & > .mediation {
349
+        padding: 16px 32px;
350
+
351
+        .item {
352
+          border-bottom: 1px solid #e5e9ed;
353
+          padding-top: 10px;
354
+
355
+          .label {
356
+            line-height: 28px;
357
+            margin-top: 10px;
358
+          }
359
+
360
+          .info {
361
+            line-height: 28px;
362
+            color: #999;
363
+            padding-bottom: 20px;
364
+          }
365
+        }
366
+      }
367
+
368
+      &.jifen {
369
+        padding: 32px;
370
+
371
+        & > .table {
372
+          width: 100%;
373
+          height: 100%;
374
+          min-height: 160px;
375
+          padding: 6px;
376
+          background: #fff;
377
+          border: 1px solid #e5e9ed;
378
+          border-radius: 5px;
379
+          overflow: hidden;
380
+
381
+          .thead {
382
+            background-image: repeating-linear-gradient(
383
+              to right,
384
+              @bg-start,
385
+              @bg-end 100%
386
+            ) !important;
387
+
388
+            th {
389
+              color: #fff !important;
390
+              text-align: center;
391
+              font-size: 12px;
392
+              border: none;
393
+              background: transparent;
394
+            }
395
+          }
396
+
397
+          .ant-table-tbody {
398
+            tr {
399
+              text-align: center;
400
+              font-size: 12px;
401
+              border: none;
402
+
403
+              td {
404
+                border: none;
405
+              }
406
+            }
407
+
408
+            tr:nth-child(2n) {
409
+              background: #f9fafb;
410
+            }
411
+          }
412
+        }
413
+      }
414
+    }
415
+  }
416
+
417
+  .btns {
418
+    display: flex;
419
+    justify-content: center;
420
+    align-items: center;
421
+    width: 100%;
422
+    position: absolute;
423
+    left: 0;
424
+    bottom: 20px;
425
+
426
+    .btn {
427
+      margin: 9px;
428
+      margin-bottom: 0;
429
+    }
430
+  }
431
+
432
+  .ant-table {
433
+    border: none !important;
434
+  }
435
+}
436
+
437
+// 撤回工单
438
+.recallOrder {
439
+  position: fixed;
440
+  left: 0;
441
+  top: 0;
442
+  width: 100%;
443
+  height: 100%;
444
+
445
+  display: flex;
446
+  justify-content: center;
447
+  align-items: center;
448
+  background: rgba(0, 0, 0, 0.4);
449
+  z-index: 99;
450
+
451
+  .modalBody {
452
+    width: 350px;
453
+    height: 220px;
454
+    background: #fff;
455
+    border-radius: 5px;
456
+    padding: 10px 20px;
457
+    color: #333;
458
+
459
+    .title {
460
+      width: 100%;
461
+      text-align: center;
462
+      font-size: 18px;
463
+      position: relative;
464
+
465
+      i {
466
+        position: absolute;
467
+        right: 0;
468
+        top: 0;
469
+        font-size: 20px;
470
+        color: #666;
471
+        cursor: pointer;
472
+        padding: 0 5px;
473
+      }
474
+    }
475
+
476
+    .content {
477
+      width: 310px;
478
+      height: 117px;
479
+      background: #f9fafb;
480
+      border: 1px solid #e5e9ed;
481
+      border-radius: 5px;
482
+      overflow: hidden;
483
+      margin-top: 12px;
484
+
485
+      div {
486
+        text-align: center;
487
+        margin: 0;
488
+
489
+        &.icon {
490
+          margin-top: 17px;
491
+
492
+          i {
493
+            color: #ff3b53;
494
+            font-size: 30px !important;
495
+
496
+            &.transport-wenhao {
497
+              color: #f5a523;
498
+            }
499
+          }
500
+        }
501
+
502
+        &.defeat {
503
+          color: #333;
504
+          font-size: 18px;
505
+        }
506
+
507
+        &:nth-child(3) {
508
+          font-size: 14px;
509
+          color: #666;
510
+        }
511
+      }
512
+
513
+      .conditions {
514
+        padding: 16px 20px;
515
+
516
+        div {
517
+          text-align: left;
518
+        }
519
+      }
520
+    }
521
+
522
+    button {
523
+      margin-top: 10px;
524
+
525
+      &.btn {
526
+        margin-left: 8px;
527
+      }
528
+    }
529
+  }
530
+}
531
+
532
+.txtC {
533
+  text-align: center;
534
+}
535
+.ji {
536
+  position: absolute;
537
+  right: 0px;
538
+  top: -3px;
539
+  width: 30px;
540
+}

+ 236 - 0
src/app/share/outgoing-record-detail/outgoing-record-detail.component.ts

@@ -0,0 +1,236 @@
1
+import { Component, OnInit, OnDestroy, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import {
4
+  FormBuilder,
5
+  Validators,
6
+  FormGroup,
7
+} from "@angular/forms";
8
+import { MainService } from "../../services/main.service";
9
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
10
+import { NzMessageService } from "ng-zorro-antd";
11
+import { ToolService } from 'src/app/services/tool.service';
12
+@Component({
13
+  selector: "app-outgoing-record-detail",
14
+  templateUrl: "./outgoing-record-detail.component.html",
15
+  styleUrls: ["./outgoing-record-detail.component.less"],
16
+})
17
+export class OutgoingRecordDetailComponent implements OnInit {
18
+  @ViewChild("osComponentRef1", {
19
+    read: OverlayScrollbarsComponent,
20
+    static: false,
21
+  })
22
+  osComponentRef1: OverlayScrollbarsComponent;
23
+  @ViewChild("osComponentRef2", {
24
+    read: OverlayScrollbarsComponent,
25
+    static: false,
26
+  })
27
+  osComponentRef2: OverlayScrollbarsComponent;
28
+  constructor(
29
+    private message: NzMessageService,
30
+    private fb: FormBuilder,
31
+    private route: ActivatedRoute,
32
+    private mainService: MainService,
33
+    private tool: ToolService,
34
+  ) {}
35
+  maskFlag: any = false;
36
+  id: number; //工单id
37
+  orderInfo: any; //工单详情信息
38
+  endDepts = ""; //工单详情目标科室
39
+  showCoop: boolean = true; //是否展示详情页操作按钮
40
+
41
+  promptContent: string; //操作提示框提示信息
42
+  ifSuccess: boolean; //操作成功/失败
43
+  promptInfo: string; //操作结果提示信息
44
+  promptModalShow: boolean; //是否展示提示框
45
+
46
+  urgentLoading: boolean = false; //确认加急按钮loading状态
47
+  recLoading: boolean = false; //撤回并删除按钮loading状态
48
+  btnLoading: boolean = false; //确认按钮loading状态
49
+  amplificationShow = true;
50
+
51
+  hosId;
52
+
53
+  ngOnInit() {
54
+    this.hosId = this.tool.getCurrentHospital().id;
55
+    this.tabType = this.route.snapshot.params.type || 1;
56
+    this.getInfo();
57
+    this.initForm();
58
+  }
59
+  ngOnDestroy() {}
60
+
61
+  // 放大
62
+  amplification(){
63
+    this.amplificationShow = !this.amplificationShow;
64
+  }
65
+
66
+  // 获取工单详情
67
+  hsLoading:boolean = false;
68
+  getInfo() {
69
+    this.id = +this.route.snapshot.paramMap.get("id");
70
+    this.maskFlag = this.message.loading("正在加载中..", {
71
+      nzDuration: 0,
72
+    }).messageId;
73
+    this.mainService
74
+      .getFetchData("simple/data", "clinicalWasteOut", this.id)
75
+      .subscribe((data) => {
76
+        this.orderInfo = data.data || {};
77
+        this.message.remove(this.maskFlag);
78
+        this.maskFlag = false;
79
+        this.getList();
80
+      });
81
+  }
82
+  // 预览图片
83
+  imgs = [];
84
+  isPreview = false;
85
+  previewImageHandler(data) {
86
+    this.isPreview = false;
87
+    this.mainService.getPreviewImage(data.bindType,data.bindId).subscribe((result:any)=>{
88
+      if (result.status == 200) {
89
+        this.imgs = result.data.map((v) => location.origin + '/file' + v.relativeFilePath);
90
+        this.isPreview = true;
91
+      } else {
92
+        this.imgs = [];
93
+      }
94
+    })
95
+  }
96
+  // 获取历史记录
97
+  pageIndex: number = 1;//表格当前页码
98
+  pageSize: number = 3;//表格每页展示条数
99
+  total: number = 0;//表格总数据量
100
+  list: any = [];
101
+  getList() {
102
+    let postData = {
103
+      idx: this.pageIndex - 1,
104
+      sum: this.pageSize,
105
+      clinicalWaste: {
106
+        outId: this.id,
107
+        hosId: this.hosId,
108
+      }
109
+    }
110
+    this.hsLoading = true;
111
+    this.mainService.getFetchDataList('simple/data','clinicalWaste', postData).subscribe(res => {
112
+      if (res.status == 200) {
113
+        this.hsLoading = false;
114
+        this.list = res.list || [];
115
+        this.total = res.totalNum || 0;
116
+      }
117
+    });
118
+  }
119
+  // 切换tab栏
120
+  tabType: number = 1; //tab栏
121
+  checkTab(type) {
122
+    this.tabType = type;
123
+  }
124
+
125
+  // 关闭弹框
126
+  close() {
127
+    history.go(-1);
128
+  }
129
+
130
+  // 查看业务数据
131
+  businessDataModalShow = false; //业务数据弹窗开关
132
+  businessDataModalType = ''; //业务数据类型
133
+  orderId = ""; //查看业务数据携带
134
+  viewDetail(data, type) {
135
+    this.orderId = data.id;
136
+    this.businessDataModalType = type;
137
+    this.businessDataModalShow = true;
138
+  }
139
+  // 关闭业务数据弹窗
140
+  closeModelBlood(e) {
141
+    this.businessDataModalShow = JSON.parse(e).show;
142
+  }
143
+
144
+  // 获取工单历史记录
145
+  logList = []; //工单历史记录
146
+  getLog() {
147
+    return this.mainService.getWorkOrderLog(this.id);
148
+  }
149
+
150
+  // 初始化新增form表单
151
+  validateForm: FormGroup; //新增/编辑表单
152
+  initForm() {
153
+    this.validateForm = this.fb.group({
154
+      reason: [null, [Validators.required]],
155
+      process: [null, [Validators.required]],
156
+      handleType: [null, [Validators.required]],
157
+      improve: [null, [Validators.required]],
158
+    });
159
+  }
160
+
161
+  // 新增表单提交
162
+  submitForm(): void {
163
+    var that = this;
164
+    for (const i in that.validateForm.controls) {
165
+      that.validateForm.controls[i].markAsDirty();
166
+      that.validateForm.controls[i].updateValueAndValidity();
167
+    }
168
+    if (that.validateForm.invalid) return;
169
+    that.btnLoading = true;
170
+    let postData = {
171
+      badEvaluationHandle: {
172
+        id: that.id,
173
+        reasonAndEventProcess: that.validateForm.value.reason,
174
+        mediationProcess: that.validateForm.value.process,
175
+        handleType: { id: that.validateForm.value.handleType },
176
+        advice: that.validateForm.value.improve,
177
+        handleStatus: { key: "bad_evaluation_handle_status", value: "2" },
178
+      },
179
+    };
180
+
181
+    that.mainService
182
+      .postCustom("adviceCollection", "updData/badEvaluationHandle", postData)
183
+      .subscribe((data) => {
184
+        that.btnLoading = false;
185
+        if (data.status == 200) {
186
+          that.showPromptModal("调解", true, "");
187
+          that.getInfo();
188
+          // that.initForm();
189
+        } else {
190
+          that.showPromptModal("调解", false, data.msg);
191
+        }
192
+      });
193
+  }
194
+
195
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
196
+  showPromptModal(con, success, promptInfo?) {
197
+    this.promptModalShow = false;
198
+    this.promptContent = con;
199
+    this.ifSuccess = success;
200
+    this.promptInfo = promptInfo;
201
+    setTimeout(() => {
202
+      this.promptModalShow = true;
203
+    }, 100);
204
+  }
205
+
206
+  // 格式化时分秒
207
+  // (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
208
+  formatTime(time) {
209
+    let timeStr = "";
210
+    if (time >= 0 && time < 60) {
211
+      // 秒
212
+      timeStr = time + "秒";
213
+    } else if (time >= 60 && time < 3600) {
214
+      // 分钟
215
+      timeStr = Math.floor(time / 60) + "分钟";
216
+    } else if (time >= 3600) {
217
+      // 时 + 分
218
+      let h = "";
219
+      let m = "";
220
+      h = Math.floor(time / 3600) + "小时";
221
+      m = time % 3600 >= 60 ? Math.floor((time % 3600) / 60) + "分钟" : "";
222
+      timeStr = h + m;
223
+    }
224
+    return timeStr;
225
+  }
226
+
227
+  // 计算历史记录耗时
228
+  filterTime(step) {
229
+    // step = [{ difTime: 2 }, { difTime: 6 }]
230
+    let num = 0;
231
+    step.forEach((e) => {
232
+      num += e.difTime;
233
+    });
234
+    return this.formatTime(num / 1000);
235
+  }
236
+}

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

@@ -41,6 +41,7 @@ import { DetailOrdinaryComponent } from './detail-ordinary/detail-ordinary.compo
41 41
 import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/blood-history-prompt-modal.component';
42 42
 import { MedicalWasteHistoryPromptModalComponent } from './medical-waste-history-prompt-modal/medical-waste-history-prompt-modal.component';
43 43
 import { MedicalWasteLogPromptModalComponent } from './medical-waste-log-prompt-modal/medical-waste-log-prompt-modal.component';
44
+import { OutgoingRecordDetailComponent } from './outgoing-record-detail/outgoing-record-detail.component';
44 45
 
45 46
 @NgModule({
46 47
   declarations: [
@@ -61,6 +62,7 @@ import { MedicalWasteLogPromptModalComponent } from './medical-waste-log-prompt-
61 62
     BxPromptModalComponent,
62 63
     AppraiseDetailComponent,
63 64
     OrderDetailComponent,
65
+    OutgoingRecordDetailComponent,
64 66
     DateTransformPipe,
65 67
     DialogDeleteComponent,
66 68
     DialogSurgeryComponent,
@@ -111,6 +113,7 @@ import { MedicalWasteLogPromptModalComponent } from './medical-waste-log-prompt-
111 113
     BxPromptModalComponent,
112 114
     AppraiseDetailComponent,
113 115
     OrderDetailComponent,
116
+    OutgoingRecordDetailComponent,
114 117
     CommonModule,
115 118
     NgZorroAntdModule,
116 119
     FormsModule,

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

@@ -448,6 +448,11 @@ const routes: Routes = [
448 448
         path: "storageRecord",
449 449
         loadChildren: () => import("../medical-waste-storage-record/medical-waste-storage-record.module").then((m) => m.MedicalWasteStorageRecordModule),
450 450
       },
451
+      // 出库记录
452
+      {
453
+        path: "outgoingRecord",
454
+        loadChildren: () => import("../medical-waste-outgoing-record/medical-waste-outgoing-record.module").then((m) => m.MedicalWasteOutgoingRecordModule),
455
+      },
451 456
     ],
452 457
   },
453 458
 ];

+ 1 - 1
src/app/views/medical-waste-information/medical-waste-information.component.html

@@ -57,7 +57,7 @@
57 57
         </div>
58 58
         <div class="list-template__searchItem">
59 59
           <span class="label">收取时间:</span>
60
-          <nz-range-picker [(ngModel)]="searchCriteria.dateRange"></nz-range-picker>
60
+          <nz-range-picker nzShowTime [(ngModel)]="searchCriteria.dateRange"></nz-range-picker>
61 61
         </div>
62 62
       </div>
63 63
       <div nz-col nzXl="8" class="list-template__btns">

+ 25 - 0
src/app/views/medical-waste-outgoing-record/medical-waste-outgoing-record-routing.module.ts

@@ -0,0 +1,25 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { MedicalWasteOutgoingRecordComponent } from './medical-waste-outgoing-record.component';
4
+import { OutgoingRecordDetailComponent } from 'src/app/share/outgoing-record-detail/outgoing-record-detail.component';
5
+
6
+
7
+const routes: Routes = [
8
+  {
9
+    path: "",
10
+    component: MedicalWasteOutgoingRecordComponent,
11
+    children: [
12
+      {
13
+        // 查看详情
14
+        path: 'outgoingRecordDetail/:id',
15
+        component: OutgoingRecordDetailComponent,
16
+      }
17
+    ]
18
+  }
19
+];
20
+
21
+@NgModule({
22
+  imports: [RouterModule.forChild(routes)],
23
+  exports: [RouterModule]
24
+})
25
+export class MedicalWasteOutgoingRecordRoutingModule { }

+ 106 - 0
src/app/views/medical-waste-outgoing-record/medical-waste-outgoing-record.component.html

@@ -0,0 +1,106 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='16' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">出库时间:</span>
7
+          <nz-range-picker nzShowTime [(ngModel)]="searchCriteria.dateRange"></nz-range-picker>
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">操作人:</span>
11
+          <input nz-input class="formItem" placeholder="请输入操作人" [(ngModel)]="searchCriteria.name" />
12
+        </div>
13
+        <div class="list-template__searchItem">
14
+          <span class="label">批次号:</span>
15
+          <input nz-input class="formItem" placeholder="请输入批次号" [(ngModel)]="searchCriteria.batchNo" />
16
+        </div>
17
+        <div class="list-template__searchItem">
18
+          <span class="label">凭证编号:</span>
19
+          <input nz-input class="formItem" placeholder="请输入凭证编号" [(ngModel)]="searchCriteria.credentialsNumber" />
20
+        </div>
21
+      </div>
22
+      <div nz-col nzXl="8" class="list-template__btns">
23
+        <button nz-button class="btn default" (click)='reset()'>重置</button>
24
+        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
25
+      </div>
26
+    </div>
27
+    <div class="list-template__bottom">
28
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
29
+        [nzLoading]="loading1">
30
+        <thead>
31
+          <tr class="thead">
32
+            <th nzWidth="11%">批次号</th>
33
+            <th nzWidth="11%">凭证编号</th>
34
+            <th nzWidth="11%">总重量(KG)</th>
35
+            <th nzWidth="11%">总袋数</th>
36
+            <th nzWidth="11%">操作人</th>
37
+            <th nzWidth="11%">出库时间</th>
38
+            <th nzWidth="11%">运输单位</th>
39
+            <th nzWidth="11%">接收单位</th>
40
+            <th nzWidth="12%">操作</th>
41
+          </tr>
42
+        </thead>
43
+        <tbody>
44
+          <tr *ngFor="let data of listOfData;let i = index">
45
+            <td>{{ data.batchNo }}</td>
46
+            <td>{{ data.credentialsNumber }}</td>
47
+            <td>{{ data.totalWeight }}</td>
48
+            <td>{{ data.totalBags }}</td>
49
+            <td>{{ data.operator ? data.operator.name: '' }}</td>
50
+            <td>{{ data.outTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
51
+            <td>{{ data.transportCompany ? data.transportCompany.name : '' }}</td>
52
+            <td>{{ data.receptionCompany ? data.receptionCompany.name : '' }}</td>
53
+            <td>
54
+              <div class="coop">
55
+                <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看详情</span>
56
+                <!-- <span *ngIf="coopBtns.print" (click)="showModal(data)">打印</span> -->
57
+              </div>
58
+            </td>
59
+          </tr>
60
+        </tbody>
61
+      </nz-table>
62
+      <div class="list-template__pagination">
63
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
64
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
65
+        </nz-pagination>
66
+      </div>
67
+    </div>
68
+  </div>
69
+</div>
70
+<!-- 矫正重量模态框 -->
71
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
72
+  <div class="modalBody">
73
+    <div class="title">矫正重量<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
74
+    </div>
75
+    <overlay-scrollbars #osComponentRef1 class="content">
76
+      <div style="height: 50px;line-height: 50px;">原重量:{{coopData.weight}}kg</div>
77
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
78
+        <nz-form-item>
79
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="weight">矫正重量</nz-form-label>
80
+          <nz-form-control nzErrorTip="请填写矫正重量!">
81
+            <nz-input-number nz-input formControlName="weight" nzPlaceHolder="请填写矫正重量" [nzMin]="0" [nzStep]="0.01" [nzPrecision]="2"></nz-input-number>
82
+            <span class="red">(kg)</span>
83
+          </nz-form-control>
84
+        </nz-form-item>
85
+      </form>
86
+    </overlay-scrollbars>
87
+    <div class="display_flex justify-content_flex-center">
88
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
89
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
90
+    </div>
91
+  </div>
92
+</div>
93
+<!-- 删除模态框 -->
94
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" (confirmDelEvent)="confirmDel()" [content]="content"></app-dialog-delete>
95
+<!-- 操作成功/失败提示框 -->
96
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow" [info]="promptInfo"></app-prompt-modal>
97
+<!-- 查看 -->
98
+<app-medical-waste-log-prompt-modal
99
+  *ngIf="historyPromptModalShow"
100
+  [show]="historyPromptModalShow"
101
+  [id]="id"
102
+  (closeModelHs)="closeModelHistory($event)"
103
+></app-medical-waste-log-prompt-modal>
104
+
105
+<!-- 查看详情 -->
106
+<router-outlet></router-outlet>

+ 121 - 0
src/app/views/medical-waste-outgoing-record/medical-waste-outgoing-record.component.less

@@ -0,0 +1,121 @@
1
+@import "../../../../src/theme.less";
2
+.save {
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: 99;
10
+
11
+  .modalBody {
12
+    width: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 18px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 8px;
102
+          }
103
+        }
104
+
105
+        .editForm {
106
+          .ant-form-item {
107
+            margin-bottom: 14px;
108
+
109
+            .ant-form-item-label {
110
+              line-height: 0;
111
+            }
112
+          }
113
+        }
114
+      }
115
+
116
+      button:nth-child(1) {
117
+        margin-right: 20px;
118
+      }
119
+    }
120
+  }
121
+}

+ 112 - 0
src/app/views/medical-waste-outgoing-record/medical-waste-outgoing-record.component.ts

@@ -0,0 +1,112 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { MainService } from "src/app/services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+import { format } from 'date-fns';
5
+import { ActivatedRoute, Router } from '@angular/router';
6
+import { FormGroup, Validators, FormBuilder } from '@angular/forms';
7
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
8
+
9
+@Component({
10
+  selector: "app-medical-waste-outgoing-record",
11
+  templateUrl: "./medical-waste-outgoing-record.component.html",
12
+  styleUrls: ["./medical-waste-outgoing-record.component.less"],
13
+})
14
+export class MedicalWasteOutgoingRecordComponent implements OnInit {
15
+  @ViewChild("osComponentRef1", {
16
+    read: OverlayScrollbarsComponent,
17
+    static: false,
18
+  })
19
+  osComponentRef1: OverlayScrollbarsComponent;
20
+  constructor(
21
+    private mainService: MainService,
22
+    private tool: ToolService,
23
+    private route: ActivatedRoute,
24
+    private fb: FormBuilder,
25
+    private router: Router,
26
+  ) {}
27
+
28
+  searchCriteria = {
29
+    //搜索条件
30
+    name: "",
31
+    credentialsNumber: "",
32
+    batchNo: "",
33
+    dateRange: [],
34
+  };
35
+  hosId;
36
+  listOfData: any[] = []; //表格数据
37
+  pageIndex: number = 1; //表格当前页码
38
+  pageSize: number = 10; //表格每页展示条数
39
+  listLength: number = 10; //表格总数据量
40
+
41
+  // 初始化增删改按钮
42
+  coopBtns: any = {};
43
+  ngOnInit() {
44
+    this.coopBtns = this.tool.initCoopBtns(this.route);
45
+    this.getHospital();
46
+  }
47
+
48
+  // 查看
49
+  detail(e, id) {
50
+    e.stopPropagation();
51
+    this.router.navigateByUrl("/main/outgoingRecord/outgoingRecordDetail/" + id);
52
+  }
53
+
54
+  // 重置
55
+  reset() {
56
+    this.searchCriteria = {
57
+      //搜索条件
58
+      name: "",
59
+      credentialsNumber: "",
60
+      batchNo: "",
61
+      dateRange: [],
62
+    };
63
+    this.getList(1);
64
+  }
65
+
66
+  // 获取所有院区
67
+  getHospital() {
68
+    this.hosId = this.tool.getCurrentHospital().id;
69
+    this.getList(1);
70
+  }
71
+
72
+  // 表格数据
73
+  loading1 = false;
74
+  getList(type) {
75
+    if (type == 1) {
76
+      this.pageIndex = 1;
77
+    }
78
+    let postData: any = {
79
+      idx: this.pageIndex - 1,
80
+      sum: this.pageSize,
81
+      clinicalWasteOut: {
82
+        hosId: this.hosId,
83
+      },
84
+    };
85
+    if (this.searchCriteria.dateRange.length) {
86
+      postData.clinicalWasteOut.startTime =
87
+        format(this.searchCriteria.dateRange[0], "yyyy-MM-dd HH:mm:ss");
88
+      postData.clinicalWasteOut.endTime =
89
+        format(this.searchCriteria.dateRange[1], "yyyy-MM-dd HH:mm:ss");
90
+    }
91
+    if (this.searchCriteria.name) {
92
+      postData.clinicalWasteOut.name = this.searchCriteria.name;
93
+    }
94
+    if (this.searchCriteria.credentialsNumber) {
95
+      postData.clinicalWasteOut.credentialsNumber = this.searchCriteria.credentialsNumber;
96
+    }
97
+    if (this.searchCriteria.batchNo) {
98
+      postData.clinicalWasteOut.batchNo = this.searchCriteria.batchNo;
99
+    }
100
+    this.loading1 = true;
101
+    this.mainService
102
+      .getFetchDataList("simple/data", "clinicalWasteOut", postData)
103
+      .subscribe((data) => {
104
+        this.loading1 = false;
105
+        if (data["status"] == 200) {
106
+          this.listOfData = data["list"];
107
+          this.listLength = data["totalNum"];
108
+        }
109
+      });
110
+  }
111
+}
112
+

+ 17 - 0
src/app/views/medical-waste-outgoing-record/medical-waste-outgoing-record.module.ts

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

+ 1 - 1
src/app/views/unit-management/unit-management.component.ts

@@ -268,7 +268,7 @@ export class UnitManagementComponent implements OnInit {
268 268
             that.listLength--;
269 269
             that.pageIndex = Math.ceil(that.listLength / that.pageSize) || 1;
270 270
           }
271
-          that.showPromptModal("删除", true, "已删除序号规则,请重新配置序号");
271
+          that.showPromptModal("删除", true, "");
272 272
         } else {
273 273
           that.showPromptModal("删除", false, data["msg"]);
274 274
         }