Browse Source

库存信息

seimin 1 year ago
parent
commit
d18d91a1c6

+ 39 - 0
src/app/share/medical-waste-history-prompt-modal/medical-waste-history-prompt-modal.component.html

@@ -0,0 +1,39 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody">
3
+    <div class="title">查看医废详情<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <nz-table class="hospitalTable" [nzData]="historySpecimenList" nzSize="middle" [nzShowPagination]="false"
6
+        [nzLoading]="hsLoading">
7
+        <thead>
8
+          <tr class="thead">
9
+            <th nzWidth="10%">序号</th>
10
+            <th nzWidth="18%">医废序号</th>
11
+            <th nzWidth="18%">重量</th>
12
+            <th nzWidth="18%">收取科室</th>
13
+            <th nzWidth="18%">收取时间</th>
14
+            <th nzWidth="18%">收取人</th>
15
+          </tr>
16
+        </thead>
17
+        <tbody>
18
+          <tr *ngFor="let data of historySpecimenList;let i = index;">
19
+            <td>{{i+1}}</td>
20
+            <td>{{ data.clinicalWasteSn }}</td>
21
+            <td>{{ data.weight }}kg</td>
22
+            <td>{{ data.dept ? data.dept.dept : '' }}</td>
23
+            <td>{{ data.receiveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
24
+            <td>{{ data.receivor ? data.receivor.name : '' }}</td>
25
+          </tr>
26
+        </tbody>
27
+      </nz-table>
28
+      <div class="pagination">
29
+        <nz-pagination [(nzPageIndex)]="historySpecimenPageIndex" [(nzTotal)]="historySpecimenListLength"
30
+          [(nzPageSize)]="historySpecimenPageSize" (nzPageIndexChange)="getHistorySpecimen()"
31
+          (nzPageSizeChange)="getHistorySpecimen()">
32
+        </nz-pagination>
33
+      </div>
34
+    </div>
35
+    <div class="display_flex justify-content_flex-center">
36
+      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">知道了</button>
37
+    </div>
38
+  </div>
39
+</div>

+ 163 - 0
src/app/share/medical-waste-history-prompt-modal/medical-waste-history-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
+}

+ 59 - 0
src/app/share/medical-waste-history-prompt-modal/medical-waste-history-prompt-modal.component.ts

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

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

@@ -39,6 +39,7 @@ import { BusinessDataDetailModalComponent } from './businessData-detail-modal/bu
39 39
 import { RelationTransDetailModalComponent } from './relationTrans-detail-modal/relationTrans-detail-modal.component';
40 40
 import { DetailOrdinaryComponent } from './detail-ordinary/detail-ordinary.component';
41 41
 import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/blood-history-prompt-modal.component';
42
+import { MedicalWasteHistoryPromptModalComponent } from './medical-waste-history-prompt-modal/medical-waste-history-prompt-modal.component';
42 43
 
43 44
 @NgModule({
44 45
   declarations: [
@@ -80,6 +81,7 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
80 81
     RelationTransDetailModalComponent,
81 82
     DetailOrdinaryComponent,
82 83
     BloodHistoryPromptModalComponent,
84
+    MedicalWasteHistoryPromptModalComponent,
83 85
   ],
84 86
   imports: [
85 87
     CommonModule,
@@ -130,6 +132,7 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
130 132
     SpePromptModalComponent,
131 133
     OrderPromptModalComponent,
132 134
     BloodHistoryPromptModalComponent,
135
+    MedicalWasteHistoryPromptModalComponent,
133 136
   ]
134 137
 })
135 138
 export class ShareModule { }

+ 12 - 0
src/app/views/inventory-information/inventory-information-routing.module.ts

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

+ 53 - 0
src/app/views/inventory-information/inventory-information.component.html

@@ -0,0 +1,53 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="cont">
4
+      <div>
5
+        <span>本月出库总重量</span>
6
+        <span>{{otherData.outWeight}}kg</span>
7
+      </div>
8
+      <div>
9
+        <span>本月入库总重量</span>
10
+        <span>{{otherData.intoWeight}}kg</span>
11
+      </div>
12
+    </div>
13
+    <div class="list-template__bottom">
14
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
15
+        [nzLoading]="loading1">
16
+        <thead>
17
+          <tr class="thead">
18
+            <th nzWidth="20%">医废类型</th>
19
+            <th nzWidth="20%">重量(KG)</th>
20
+            <th nzWidth="20%">袋数</th>
21
+            <th nzWidth="20%">上次出库时间</th>
22
+            <th nzWidth="20%">操作</th>
23
+          </tr>
24
+        </thead>
25
+        <tbody>
26
+          <tr *ngFor="let data of listOfData;let i = index">
27
+            <td>{{ data.clinicalWasteType ? data.clinicalWasteType.typeName: '' }}</td>
28
+            <td>{{ data.weight }}</td>
29
+            <td>{{ data.bags }}</td>
30
+            <td [ngClass]="{red: data.overTime}">{{ data.lastOutTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
31
+            <td>
32
+              <div class="coop">
33
+                <span *ngIf="coopBtns.look" (click)="viewHistory(data)">查看</span>
34
+              </div>
35
+            </td>
36
+          </tr>
37
+        </tbody>
38
+      </nz-table>
39
+      <div class="list-template__pagination">
40
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
41
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
42
+        </nz-pagination>
43
+      </div>
44
+    </div>
45
+  </div>
46
+</div>
47
+<!-- 弹窗 -->
48
+<app-medical-waste-history-prompt-modal
49
+  *ngIf="historyPromptModalShow"
50
+  [show]="historyPromptModalShow"
51
+  [id]="id"
52
+  (closeModelHs)="closeModelHistory($event)"
53
+></app-medical-waste-history-prompt-modal>

+ 49 - 0
src/app/views/inventory-information/inventory-information.component.less

@@ -0,0 +1,49 @@
1
+@import "../../../../src/theme.less";
2
+.cont {
3
+  width: 100%;
4
+  border: 1px solid #dde1e5;
5
+  padding: 8px 16px;
6
+  border-radius: 2px;
7
+  margin-bottom: 8px;
8
+
9
+  &>div {
10
+    display: inline-block;
11
+    margin-right: 4px;
12
+
13
+    &:nth-child(1) {
14
+      position: relative;
15
+      padding-left: 10px;
16
+
17
+      &::before {
18
+        content: '';
19
+        position: absolute;
20
+        left: 0;
21
+        width: 4px;
22
+        height: 100%;
23
+        background: @primary-color;
24
+        margin-right: 8px;
25
+      }
26
+    }
27
+
28
+    span {
29
+      margin-right: 8px;
30
+
31
+      &:nth-child(1) {
32
+        font-size: 12px;
33
+        color: #999;
34
+      }
35
+
36
+      &:nth-child(2) {
37
+        color: #333;
38
+        font-weight: 500;
39
+      }
40
+
41
+      &.rate {
42
+        font-size: 18px;
43
+        color: @primary-color;
44
+      }
45
+    }
46
+
47
+
48
+  }
49
+}

+ 80 - 0
src/app/views/inventory-information/inventory-information.component.ts

@@ -0,0 +1,80 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { MainService } from "src/app/services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+import { ActivatedRoute } from '@angular/router';
5
+
6
+@Component({
7
+  selector: "app-inventory-information",
8
+  templateUrl: "./inventory-information.component.html",
9
+  styleUrls: ["./inventory-information.component.less"],
10
+})
11
+export class InventoryInformationComponent implements OnInit {
12
+  constructor(
13
+    private mainService: MainService,
14
+    private tool: ToolService,
15
+    private route: ActivatedRoute,
16
+  ) {}
17
+
18
+  hosId;
19
+  listOfData: any[] = []; //表格数据
20
+  pageIndex: number = 1; //表格当前页码
21
+  pageSize: number = 10; //表格每页展示条数
22
+  listLength: number = 10; //表格总数据量
23
+
24
+  otherData:any =  {
25
+    intoWeight: 0,
26
+    outWeight: 0,
27
+  }
28
+
29
+  // 初始化增删改按钮
30
+  coopBtns: any = {};
31
+  ngOnInit() {
32
+    this.coopBtns = this.tool.initCoopBtns(this.route);
33
+    this.getHospital();
34
+  }
35
+
36
+  // 获取所有院区
37
+  getHospital() {
38
+    this.hosId = this.tool.getCurrentHospital().id;
39
+    this.getList(1);
40
+  }
41
+
42
+  // 查看标本历史记录
43
+  historyPromptModalShow = false; //标本历史记录弹窗开关
44
+  id = ""; //查看历史记录携带
45
+  viewHistory(data) {
46
+    this.id = data.clinicalWasteType.id;
47
+    this.historyPromptModalShow = true;
48
+  }
49
+  // 关闭标本历史记录弹窗
50
+  closeModelHistory(e) {
51
+    this.historyPromptModalShow = JSON.parse(e).show;
52
+  }
53
+
54
+  // 表格数据
55
+  loading1 = false;
56
+  getList(type) {
57
+    if (type == 1) {
58
+      this.pageIndex = 1;
59
+    }
60
+    let postData: any = {
61
+      idx: this.pageIndex - 1,
62
+      sum: this.pageSize,
63
+      clinicalWasteInventory: {
64
+        hosId: this.hosId,
65
+      },
66
+    };
67
+    this.loading1 = true;
68
+    this.mainService
69
+      .getFetchDataList("simple/data", "clinicalWasteInventory", postData)
70
+      .subscribe((data) => {
71
+        this.loading1 = false;
72
+        if (data["status"] == 200) {
73
+          this.listOfData = data["list"];
74
+          this.listLength = data["totalNum"];
75
+          this.otherData = data.otherData || {};
76
+        }
77
+      });
78
+  }
79
+}
80
+

+ 17 - 0
src/app/views/inventory-information/inventory-information.module.ts

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

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

@@ -433,6 +433,11 @@ const routes: Routes = [
433 433
         path: "recyclingRestriction",
434 434
         loadChildren: () => import("../recycling-restriction/recycling-restriction.module").then((m) => m.RecyclingRestrictionModule),
435 435
       },
436
+      // 库存信息
437
+      {
438
+        path: "inventoryInformation",
439
+        loadChildren: () => import("../inventory-information/inventory-information.module").then((m) => m.InventoryInformationModule),
440
+      },
436 441
     ],
437 442
   },
438 443
 ];