浏览代码

血制品二次整改

seimin 2 年之前
父节点
当前提交
34c8c79e62

+ 35 - 0
src/app/share/blood-history-prompt-modal/blood-history-prompt-modal.component.html

@@ -0,0 +1,35 @@
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]="historyLogsList" nzSize="middle" [nzShowPagination]="false"
6
+        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
7
+        <thead>
8
+          <tr class="thead">
9
+            <th nzWidth="10%">序号</th>
10
+            <th nzWidth="30%">动作</th>
11
+            <th nzWidth="30%">时间</th>
12
+            <th nzWidth="30%">操作人</th>
13
+          </tr>
14
+        </thead>
15
+        <tbody>
16
+          <tr *ngFor="let data of historyLogsList;let i = index;">
17
+            <td>{{i+1}}</td>
18
+            <td>{{ data.operationType?data.operationType.name:'-' }}</td>
19
+            <td>{{ data.operationTime||'-' }}</td>
20
+            <td>{{ data.username||'-' }}</td>
21
+          </tr>
22
+        </tbody>
23
+      </nz-table>
24
+      <!-- <div class="pagination">
25
+        <nz-pagination [(nzPageIndex)]="historySpecimenPageIndex" [(nzTotal)]="historyLogsListLength"
26
+          [(nzPageSize)]="historySpecimenPageSize" (nzPageIndexChange)="getHistorySpecimen()"
27
+          (nzPageSizeChange)="getHistorySpecimen()">
28
+        </nz-pagination>
29
+      </div> -->
30
+    </div>
31
+    <div class="display_flex justify-content_flex-center">
32
+      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">知道了</button>
33
+    </div>
34
+  </div>
35
+</div>

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

+ 45 - 0
src/app/share/blood-history-prompt-modal/blood-history-prompt-modal.component.ts

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

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

@@ -37,6 +37,7 @@ import { SpePromptModalComponent } from './spe-prompt-modal/spe-prompt-modal.com
37 37
 import { OrderPromptModalComponent } from './order-prompt-modal/order-prompt-modal.component';
38 38
 import { BloodDetailModalComponent } from './blood-detail-modal/blood-detail-modal.component';
39 39
 import { DetailBloodComponent } from './detail-blood/detail-blood.component';
40
+import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/blood-history-prompt-modal.component';
40 41
 
41 42
 @NgModule({
42 43
   declarations: [
@@ -74,6 +75,7 @@ import { DetailBloodComponent } from './detail-blood/detail-blood.component';
74 75
     OrderPromptModalComponent,
75 76
     BloodDetailModalComponent,
76 77
     DetailBloodComponent,
78
+    BloodHistoryPromptModalComponent,
77 79
   ],
78 80
   imports: [
79 81
     CommonModule,
@@ -124,6 +126,7 @@ import { DetailBloodComponent } from './detail-blood/detail-blood.component';
124 126
     ImageViewerComponent,
125 127
     SpePromptModalComponent,
126 128
     OrderPromptModalComponent,
129
+    BloodHistoryPromptModalComponent,
127 130
   ]
128 131
 })
129 132
 export class ShareModule { }

+ 6 - 2
src/app/views/blood-products-config/blood-products-config.component.html

@@ -21,7 +21,10 @@
21 21
         <!-- 核对方式 -->
22 22
         <div class="display_flex align-items_center mb8">
23 23
           <nz-form-label class="label" nzRequired>核对方式</nz-form-label>
24
-          <nz-checkbox-group class="w320px" [(ngModel)]="checkModes"></nz-checkbox-group>
24
+          <!-- <nz-checkbox-group class="w320px" [(ngModel)]="checkModes"></nz-checkbox-group> -->
25
+          <nz-radio-group [(ngModel)]="radioCheckModesValue">
26
+            <label style="display: block;" nz-radio [nzValue]="item.value" *ngFor="let item of checkModes">{{ item.label }}</label>
27
+          </nz-radio-group>
25 28
         </div>
26 29
         <!-- 签到方式 -->
27 30
         <div class="display_flex align-items_center mb8">
@@ -39,7 +42,8 @@
39 42
         <!-- 自动建单 -->
40 43
         <div class="display_flex align-items_center mb8">
41 44
           <nz-form-label class="label">自动建单</nz-form-label>
42
-          <nz-checkbox-group class="w320px" [(ngModel)]="autoCreateOrders"></nz-checkbox-group>
45
+          <nz-checkbox-group [(ngModel)]="autoCreateOrders" (ngModelChange)="changeAutoCreateOrders($event)"></nz-checkbox-group>
46
+          <nz-checkbox-group [(ngModel)]="autoDepts" *ngIf="autoCreateOrders[0].checked"></nz-checkbox-group>
43 47
         </div>
44 48
       </div>
45 49
       <div class="bottom">

+ 20 - 7
src/app/views/blood-products-config/blood-products-config.component.ts

@@ -26,6 +26,10 @@ export class BloodProductsConfigComponent implements OnInit {
26 26
   autoCreateOrders:any[] = [
27 27
     {label:'是否开启',value: 0}
28 28
   ];
29
+  // 是否根据开通科室建单
30
+  autoDepts:any[] = [
31
+    {label:'是否根据开通科室建单',value: 0}
32
+  ];
29 33
   // 配置
30 34
   configs:any = {};
31 35
   // 血制品任务类型
@@ -43,6 +47,13 @@ export class BloodProductsConfigComponent implements OnInit {
43 47
   tabModal(tabModalName:string){
44 48
     this.tabModalName = tabModalName;
45 49
   }
50
+  // 修改是否自动建单
51
+  changeAutoCreateOrders(e){
52
+    console.log(e);
53
+    if(!e[0].checked){
54
+      this.autoDepts[0].checked = false;
55
+    }
56
+  }
46 57
   // 保存
47 58
   submitForm() {
48 59
     if(!this.tasktype.id){
@@ -53,20 +64,20 @@ export class BloodProductsConfigComponent implements OnInit {
53 64
       this.msg.create("warning", "请选择交接方式!");
54 65
       return;
55 66
     }
56
-    let checkType = this.checkModes.find(v => v.checked);
57
-    if(!checkType){
67
+    if(!this.radioCheckModesValue){
58 68
       this.msg.create("warning", "请选择核对方式!");
59 69
       return;
60 70
     }
61 71
     let signTypeIds = this.checkInModes.filter(v => v.checked).map(v => v.value).toString();
62 72
     let closeTypeIds = this.automaticCustomsOrders.filter(v => v.checked).map(v => v.value).toString();
63
-    let postData = {
73
+    let postData:any = {
64 74
       id: this.configs.id,
65 75
       taskType: this.tasktype.id,
66 76
       hosId: this.hosId,
67
-      autoCreate: this.autoCreateOrders[0].checked?1:0,
68
-      handoverType: {id:this.handoverMode},
69
-      checkType: {id:checkType.value},
77
+      autoCreate: this.autoCreateOrders[0].checked ? 1 : 0,
78
+      autoDept: this.autoDepts[0].checked ? 1 : 0,
79
+      handoverType: {id: this.handoverMode},
80
+      checkType: {id: this.radioCheckModesValue},
70 81
       signTypeIds: signTypeIds || undefined,
71 82
       closeTypeIds: closeTypeIds || undefined,
72 83
     };
@@ -134,6 +145,7 @@ export class BloodProductsConfigComponent implements OnInit {
134 145
       });
135 146
   }
136 147
   // 获取配置
148
+  radioCheckModesValue = '';
137 149
   getConfig() {
138 150
     this.loading = true;
139 151
     let postData = {
@@ -157,8 +169,9 @@ export class BloodProductsConfigComponent implements OnInit {
157 169
         if (result.status == 200) {
158 170
           this.configs = result.list[0] || {};
159 171
           this.handoverMode = this.configs.handoverType?this.configs.handoverType.id:undefined;
160
-          this.checkModes = this.configs.checkType?[{label:this.configs.checkType.name, value: this.configs.checkType.id, checked: true}]:[{label:this.checkModes[0].label, value: this.checkModes[0].value, checked: false}];
172
+          this.radioCheckModesValue = this.configs.checkType.id;
161 173
           this.autoCreateOrders[0].checked = this.configs.autoCreate == 1;
174
+          this.autoDepts[0].checked = this.configs.autoDept == 1;
162 175
 
163 176
           if(this.configs.signTypeIds){
164 177
             let ids = this.configs.signTypeIds.split(',');

+ 12 - 0
src/app/views/blood-search/blood-search-routing.module.ts

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

+ 75 - 0
src/app/views/blood-search/blood-search.component.html

@@ -0,0 +1,75 @@
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
+          <input nz-input class="formItem" placeholder="请输入血袋号" [(ngModel)]="searchCriteria.bloodCode" />
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">发血时间:</span>
11
+          <nz-range-picker [(ngModel)]="searchCriteria.dateRange" (ngModelChange)="changeDate($event)"></nz-range-picker>
12
+        </div>
13
+      </div>
14
+      <div nz-col nzXl="8" class="list-template__btns">
15
+        <button nz-button class="btn default" (click)='reset()'>重置</button>
16
+        <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
17
+      </div>
18
+    </div>
19
+    <div class="list-template__bottom">
20
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
21
+        [nzLoading]="loading1">
22
+        <thead>
23
+          <tr class="thead">
24
+            <th nzWidth="2%">#</th>
25
+            <th nzWidth="7%">医嘱号</th>
26
+            <th nzWidth="7%">血袋号</th>
27
+            <th nzWidth="7%">申请科室</th>
28
+            <th nzWidth="7%">血液类型</th>
29
+            <th nzWidth="7%">ABO血型</th>
30
+            <th nzWidth="7%">RH(血型)</th>
31
+            <th nzWidth="7%">血量(单位)</th>
32
+            <th nzWidth="7%">患者姓名(住院号)</th>
33
+            <th nzWidth="7%">发血时间</th>
34
+            <th nzWidth="7%">取血者</th>
35
+            <th nzWidth="7%">取血时间</th>
36
+            <th nzWidth="7%">接收人</th>
37
+            <th nzWidth="7%">接收时间</th>
38
+            <th nzWidth="7%">操作</th>
39
+          </tr>
40
+        </thead>
41
+        <tbody>
42
+          <tr *ngFor="let data of listOfData;let i = index">
43
+            <td>{{i+1}}</td>
44
+            <td>{{ data.applyCode || '无'}}</td>
45
+            <td>{{ data.bloodCode || '无'}}</td>
46
+            <td>{{ data.applyDeptDTO ? data.applyDeptDTO.dept :'无' }}</td>
47
+            <td>{{ data.type ? data.type.name : "无" }}</td>
48
+            <td>{{ data.aboType || '无' }}</td>
49
+            <td>{{ data.rhType || '无' }}</td>
50
+            <td>{{ data.volume ? data.volume+'ML':'无' }}</td>
51
+            <td>{{ data.patientName }}<span *ngIf="data.hosNum">({{ data.hosNum }})</span></td>
52
+            <td>{{ data.printDate | date:"yyyy-MM-dd HH:mm:ss" }}</td>
53
+            <td>{{ data.arriverDTO ? data.arriverDTO.name: '无' }}</td>
54
+            <td>{{ data.arriveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
55
+            <td></td>
56
+            <td>{{ data.receiveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
57
+            <td><button (click)="viewBloodHistory(data)">查看日志</button></td>
58
+          </tr>
59
+        </tbody>
60
+      </nz-table>
61
+      <div class="list-template__pagination">
62
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
63
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
64
+        </nz-pagination>
65
+      </div>
66
+    </div>
67
+  </div>
68
+</div>
69
+<!-- 血制品历史记录查看 -->
70
+<app-blood-history-prompt-modal
71
+  *ngIf="historyPromptModalShow"
72
+  [show]="historyPromptModalShow"
73
+  [bloodId]="bloodId"
74
+  (closeModelHs)="closeModelHistory($event)"
75
+></app-blood-history-prompt-modal>

+ 167 - 0
src/app/views/blood-search/blood-search.component.less

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

+ 132 - 0
src/app/views/blood-search/blood-search.component.ts

@@ -0,0 +1,132 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { Subject } from "rxjs";
3
+import { debounceTime } from "rxjs/operators";
4
+import { MainService } from "src/app/services/main.service";
5
+import { ToolService } from "src/app/services/tool.service";
6
+import { format } from 'date-fns';
7
+
8
+@Component({
9
+  selector: "app-blood-search",
10
+  templateUrl: "./blood-search.component.html",
11
+  styleUrls: ["./blood-search.component.less"],
12
+})
13
+export class BloodSearchComponent implements OnInit {
14
+  constructor(private mainService: MainService, private tool: ToolService) {}
15
+
16
+  searchCriteria = {
17
+    //搜索条件
18
+    bloodCode: "", //血袋号
19
+    dateRange: [],
20
+  };
21
+  deptList = []; // 院区下的支助人员列表(搜索框)
22
+  hosId;
23
+  listOfData: any[] = []; //表格数据
24
+  pageIndex: number = 1; //表格当前页码
25
+  pageSize: number = 10; //表格每页展示条数
26
+  listLength: number = 10; //表格总数据量
27
+  changeInpSubject = new Subject();
28
+  ngOnInit() {
29
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
30
+      this.searchDept(v);
31
+    });
32
+    this.getHospital();
33
+  }
34
+  // 重置
35
+  reset() {
36
+    this.searchCriteria = {
37
+      //搜索条件
38
+      bloodCode: "",
39
+      dateRange: [],
40
+    };
41
+    this.getList(1);
42
+  }
43
+
44
+  // 获取所有院区
45
+  getHospital() {
46
+    this.hosId = this.tool.getCurrentHospital().id;
47
+    this.getList(1);
48
+  }
49
+  // 查看标本历史记录
50
+  historyPromptModalShow = false; //标本历史记录弹窗开关
51
+  bloodId = ""; //查看历史记录携带
52
+  viewBloodHistory(data) {
53
+    this.bloodId = data.id;
54
+    this.historyPromptModalShow = true;
55
+  }
56
+  // 关闭标本历史记录弹窗
57
+  closeModelHistory(e) {
58
+    this.historyPromptModalShow = JSON.parse(e).show;
59
+  }
60
+  // 打开搜索框
61
+  changeSearch(flag) {
62
+    if (flag) {
63
+      this.changeInp("no");
64
+    }
65
+  }
66
+  // 边输边搜节流阀
67
+  isLoading = false;
68
+  changeInp(dept) {
69
+    if (!dept) {
70
+      return;
71
+    }
72
+    if (dept === "no") {
73
+      dept = "";
74
+    }
75
+    this.isLoading = true;
76
+    this.changeInpSubject.next(dept);
77
+  }
78
+  // 搜索科室
79
+  searchDept(dept) {
80
+    let postData = {
81
+      department: {
82
+        hospital: { id: this.hosId },
83
+        dept,
84
+      },
85
+      idx: 0,
86
+      sum: 10,
87
+    };
88
+    this.mainService
89
+      .getFetchDataList("data", "department", postData)
90
+      .subscribe((result) => {
91
+        if (result.status == 200) {
92
+          this.isLoading = false;
93
+          this.deptList = result.list;
94
+        }
95
+      });
96
+  }
97
+
98
+  // 表格数据
99
+  loading1 = false;
100
+  getList(type) {
101
+    if (type == 1) {
102
+      this.pageIndex = 1;
103
+    }
104
+    let postData: any = {
105
+      idx: this.pageIndex - 1,
106
+      sum: this.pageSize,
107
+      blood: {
108
+        hosId: this.hosId,
109
+      },
110
+    };
111
+    if (this.searchCriteria.dateRange.length) {
112
+      postData.blood.printDateStart =
113
+        format(this.searchCriteria.dateRange[0], "yyyy-MM-dd ") + "00:00:00";
114
+      postData.blood.printDateEnd =
115
+        format(this.searchCriteria.dateRange[1], "yyyy-MM-dd ") + "23:59:59";
116
+    }
117
+    if (this.searchCriteria.bloodCode) {
118
+      postData.blood.bloodCode = this.searchCriteria.bloodCode;
119
+    }
120
+    this.loading1 = true;
121
+    this.mainService
122
+      .getFetchDataList("simple/data", "blood", postData)
123
+      .subscribe((data) => {
124
+        this.loading1 = false;
125
+        if (data["status"] == 200) {
126
+          this.listOfData = data["list"];
127
+          this.listLength = data["totalNum"];
128
+        }
129
+      });
130
+  }
131
+}
132
+

+ 17 - 0
src/app/views/blood-search/blood-search.module.ts

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

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

@@ -288,6 +288,12 @@ const routes: Routes = [
288 288
           import("../jp-search/jp-search.module").then((m) => m.JpSearchModule),
289 289
       },
290 290
       {
291
+        // 血制品信息
292
+        path: "bloodSearch",
293
+        loadChildren: () =>
294
+          import("../blood-search/blood-search.module").then((m) => m.BloodSearchModule),
295
+      },
296
+      {
291 297
         // 数据核对
292 298
         path: "infoSearch",
293 299
         loadChildren: () =>

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.15');
11
+    console.info('v2.4.17');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)