浏览代码

追加检查

seimin 3 月之前
父节点
当前提交
d0a03c68f5

+ 36 - 0
src/app/share/add-inspect-two-modal/add-inspect-two-modal.component.html

@@ -0,0 +1,36 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center">
2
+  <div class="modalBody" style="width: 1200px;">
3
+    <div class="title">追加检查<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <div class="tableWrap">
6
+        <div class="inspectType">
7
+          检查类型:<u *ngFor="let item of inspectCheckItemList" (click)="clickInspectCheckItem(item.id)" [ngClass]="{ active: activeInspectCheckItemId == item.id }">{{item.name}}</u>
8
+        </div>
9
+        <nz-table class="hospitalTable" [nzData]="data2List" nzSize="middle" [nzShowPagination]="false"
10
+          [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageData2Change($event)" [nzScroll]="{ y: '385px' }">
11
+          <thead>
12
+            <tr class="thead">
13
+              <th nzWidth="4%" nzShowCheckbox [(nzChecked)]="isAllDisplayData2Checked" [nzIndeterminate]="isIndeterminateData2"
14
+                (nzCheckedChange)="checkAllData2($event)"></th>
15
+              <th nzWidth="32%">检查项目</th>
16
+              <th nzWidth="32%">检查地点</th>
17
+              <th nzWidth="32%">检查类型</th>
18
+            </tr>
19
+          </thead>
20
+          <tbody>
21
+            <tr *ngFor="let data of data2List;let i = index;" (click)="selectedListData2(data.id)">
22
+              <td nzShowCheckbox [(nzChecked)]="mapOfCheckedData2Id[data.id]" (nzCheckedChange)="refreshData2Status()"></td>
23
+              <td>{{ data.name}}</td>
24
+              <td>{{ deptDisplay == 2 ? data.extra4DTO?.deptalias : data.extra4DTO?.dept }}</td>
25
+              <td>{{ data.extra5DTO?.name }}</td>
26
+            </tr>
27
+          </tbody>
28
+        </nz-table>
29
+      </div>
30
+    </div>
31
+    <div class="display_flex justify-content_flex-center">
32
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
33
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
34
+    </div>
35
+  </div>
36
+</div>

+ 194 - 0
src/app/share/add-inspect-two-modal/add-inspect-two-modal.component.less

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

+ 129 - 0
src/app/share/add-inspect-two-modal/add-inspect-two-modal.component.ts

@@ -0,0 +1,129 @@
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
+import { startOfDay, format } from 'date-fns';
5
+import { NzMessageService } from 'ng-zorro-antd';
6
+@Component({
7
+  selector: 'app-add-inspect-two-modal',
8
+  templateUrl: './add-inspect-two-modal.component.html',
9
+  styleUrls: ['./add-inspect-two-modal.component.less']
10
+})
11
+export class AddInspectTwoModalComponent implements OnInit {
12
+  // 切换科室,切换弹窗
13
+  isAllDisplayData2Checked = false;
14
+  listOfDisplayData2: any[] = [];
15
+  mapOfCheckedData2Id: { [key: string]: boolean } = {};
16
+  isIndeterminateData2 = false;
17
+  currentDept; //当前科室
18
+
19
+  hosId;
20
+  hsLoading = false;
21
+  data2List: any = [];// 列表
22
+
23
+  @Input() deptDisplay: any;
24
+
25
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
26
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
27
+
28
+  constructor(
29
+    private mainService: MainService,
30
+    private tool: ToolService,
31
+    private message: NzMessageService,
32
+  ) { }
33
+
34
+  ngOnInit() {
35
+    this.hosId = this.tool.getCurrentHospital().id;
36
+    this.currentDept = this.tool.getCurrentUserDept();
37
+    this.getList();
38
+  }
39
+
40
+  currentPageData2Change($event: any[]): void {
41
+    this.listOfDisplayData2 = this.data2List; //改变页数,长度也要变
42
+    this.refreshData2Status();
43
+  }
44
+
45
+  refreshData2Status(): void {
46
+    this.isAllDisplayData2Checked = this.listOfDisplayData2.length ? this.listOfDisplayData2.every(
47
+      (item) => this.mapOfCheckedData2Id[item.id]
48
+    ) : false;
49
+    this.isIndeterminateData2 = this.listOfDisplayData2.some((item) => this.mapOfCheckedData2Id[item.id]) && !this.isAllDisplayData2Checked;
50
+  }
51
+
52
+  // 开通科室选择整行
53
+  selectedListData2(id) {
54
+    this.mapOfCheckedData2Id[id] = !this.mapOfCheckedData2Id[id];
55
+    this.refreshData2Status();
56
+  }
57
+
58
+  checkAllData2(value: boolean): void {
59
+    this.listOfDisplayData2.forEach(
60
+      (item) => (this.mapOfCheckedData2Id[item.id] = value)
61
+    );
62
+    this.refreshData2Status();
63
+  }
64
+
65
+  // 确认弹窗
66
+  confirmModal() {
67
+    console.log(this[`mapOfCheckedData2Id`]);
68
+    let list = [];
69
+    for (const key in this[`mapOfCheckedData2Id`]) {
70
+      if (this[`mapOfCheckedData2Id`][key]) {
71
+        list.push({id: key});
72
+      }
73
+    }
74
+    if(list.length == 0){
75
+      this.message.warning('请选择数据');
76
+      return;
77
+    }
78
+    this.confirmModelHs.emit(JSON.stringify({ show: false, list, type: 2 }));//emits(向上弹射)事件
79
+  }
80
+
81
+  // 关闭弹窗
82
+  hideModal() {
83
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
84
+  }
85
+
86
+  getList(){
87
+    this.getInspectCheckItem();
88
+    this.getList2();
89
+  }
90
+
91
+  // 获取列表数据
92
+  getList2() {
93
+    let postData = {
94
+      idx: 0,
95
+      sum: 9999,
96
+      dictionary: {
97
+        key: 'inspect_check_type',
98
+        extra5: this.activeInspectCheckItemId,
99
+      }
100
+    }
101
+    this.hsLoading = true;
102
+    this.mainService.getFetchDataList('simple/data','dictionary',postData).subscribe(data => {
103
+      this.hsLoading = false;
104
+      this.data2List = data.list || [];
105
+    })
106
+  }
107
+
108
+  // 获取检查项目
109
+  inspectCheckItemList:any[] = [];
110
+  activeInspectCheckItemId;
111
+  getInspectCheckItem() {
112
+    this.mainService.getDictionary("list", "inspect_check_item").subscribe((data) => {
113
+			this.inspectCheckItemList = data || [];
114
+		});
115
+  }
116
+
117
+  clickInspectCheckItem(id){
118
+    if(this.activeInspectCheckItemId == id){
119
+      this.activeInspectCheckItemId = undefined;
120
+    }else{
121
+      this.activeInspectCheckItemId = id;
122
+    }
123
+    this.getList2();
124
+  }
125
+
126
+}
127
+
128
+
129
+

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

@@ -66,6 +66,7 @@ import { PackageSpecimenRuleComponent } from './package-specimen-rule/package-sp
66 66
 import { SpecimenPackageListModalComponent } from './specimen-package-list-modal/specimen-package-list-modal.component';
67 67
 import { NgxPrintModule } from 'ngx-print';
68 68
 import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-prompt-modal/specimen-package-log-prompt-modal.component';
69
+import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect-two-modal.component';
69 70
 
70 71
 @NgModule({
71 72
   declarations: [
@@ -130,6 +131,7 @@ import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-p
130 131
     MedicalWasteLogPromptModalComponent,
131 132
     SelectDateComponent,
132 133
     AddInspectModalComponent,
134
+    AddInspectTwoModalComponent,
133 135
     SelectDateYytimeComponent,
134 136
     PackageSpecimenRuleComponent,
135 137
     SpecimenPackageListModalComponent,
@@ -207,6 +209,7 @@ import { SpecimenPackageLogPromptModalComponent } from './specimen-package-log-p
207 209
     MedicalWasteLogPromptModalComponent,
208 210
     SelectDateComponent,
209 211
     AddInspectModalComponent,
212
+    AddInspectTwoModalComponent,
210 213
     SelectDateYytimeComponent,
211 214
     PackageSpecimenRuleComponent,
212 215
     SpecimenPackageListModalComponent,

+ 15 - 0
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1484,6 +1484,9 @@
1484 1484
                 <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="nextDayNew()">
1485 1485
                   下一日
1486 1486
                 </button>
1487
+                <button nz-button nzSize="small" nzType="default" class="pos-btn ml8" (click)="addInspect()" *ngIf="inspectAndPatientTransportConfig.nurseAppendInspect == 1">
1488
+                  追加检查
1489
+                </button>
1487 1490
               </div>
1488 1491
               <!-- 检查 -->
1489 1492
               <nz-form-item>
@@ -1493,6 +1496,7 @@
1493 1496
                     <div nz-row nz-col nzSpan="12" *ngFor="let item of linkCheckLis">
1494 1497
                       <div nz-col nzSpan="24">
1495 1498
                         <label nz-checkbox [nzValue]="item">{{ item.label}}</label>
1499
+                        <i class="icon_transport transport-shanchu1 cur" *ngIf="item.manualCreate == 1" (click)="delInspect(item.value)"></i>
1496 1500
                         <i class="icon_transport transport-zu1468 priority" *ngIf="item.priority === 1 || item.priority === '1'"></i>
1497 1501
                       </div>
1498 1502
                     </div>
@@ -2346,6 +2350,14 @@
2346 2350
   (confirmDelEvent)="confirmDelAdvice()"
2347 2351
   content="您确认要删除此条意见吗?"
2348 2352
 ></app-dialog-delete>
2353
+<!-- 删除检查模态框 -->
2354
+<app-dialog-delete
2355
+  [delModal]="delInspectModal"
2356
+  (hideDelModalEvent)="hideDelInspectModal()"
2357
+  [btnLoading]="btnLoading"
2358
+  (confirmDelEvent)="confirmDelInspect()"
2359
+  content="您确认要删除此条检查吗?"
2360
+></app-dialog-delete>
2349 2361
 <!-- 撤销报修 -->
2350 2362
 <app-dialog-delete
2351 2363
   [delModal]="delBxModal"
@@ -2760,3 +2772,6 @@
2760 2772
 
2761 2773
 <!-- 标本打包-数字点击 -->
2762 2774
 <app-specimen-package-list-modal *ngIf="isShowSpecimenPackageList" (closeModelHs)="closeSpecimenPackageList($event)" [specimenPackageStateValue]="specimenPackageStateValue"></app-specimen-package-list-modal>
2775
+
2776
+<!-- 追加检查 -->
2777
+<app-add-inspect-two-modal *ngIf="isShowAddInspect" [deptDisplay]="deptDisplay" (closeModelHs)="closeAddInspectModel($event)" (confirmModelHs)="confirmAddInspectModel($event)"></app-add-inspect-two-modal>

+ 72 - 0
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -3325,6 +3325,7 @@ export class HushijiandanComponent implements OnInit {
3325 3325
               execDeptId: e.execDept.id,
3326 3326
               yyTime: e.yyTime,
3327 3327
               priority: e.priority,
3328
+              manualCreate: e.manualCreate,
3328 3329
               label:
3329 3330
                 (e.yyTime || "") +
3330 3331
                 " " +
@@ -4622,6 +4623,30 @@ export class HushijiandanComponent implements OnInit {
4622 4623
   hideDelAdviceModal() {
4623 4624
     this.delAdviceModal = false;
4624 4625
   }
4626
+  // 追加检查删除模态框
4627
+  delInspectModal: boolean = false;
4628
+  delInspectId: number; //删除id
4629
+  delInspect(id) {
4630
+    this.delInspectId = id;
4631
+    this.delInspectModal = true;
4632
+  }
4633
+  confirmDelInspect() {
4634
+    this.btnLoading = true;
4635
+    this.mainService
4636
+      .simplePost("rmvData", "inspect", [this.delInspectId])
4637
+      .subscribe((data) => {
4638
+        this.delInspectModal = false;
4639
+        if (data.status == 200) {
4640
+          this.message.success('追加检查成功!')
4641
+          this.refreshInspectList();
4642
+        } else {
4643
+          this.message.error(data.msg || '追加检查失败!')
4644
+        }
4645
+      });
4646
+  }
4647
+  hideDelInspectModal() {
4648
+    this.delInspectModal = false;
4649
+  }
4625 4650
   // 报修撤销模态框
4626 4651
   delBxModal: boolean = false;
4627 4652
   delBxData: any; //删除的data
@@ -5457,6 +5482,7 @@ export class HushijiandanComponent implements OnInit {
5457 5482
               execDeptId: e.execDept.id,
5458 5483
               yyTime: e.yyTime,
5459 5484
               priority: e.priority,
5485
+              manualCreate: e.manualCreate,
5460 5486
               label:
5461 5487
                 (e.yyTime || "") +
5462 5488
                 " " +
@@ -5485,4 +5511,50 @@ export class HushijiandanComponent implements OnInit {
5485 5511
   closeSpecimenPackageList(e) {
5486 5512
     this.isShowSpecimenPackageList = JSON.parse(e).show;
5487 5513
   }
5514
+
5515
+  // 追加检查
5516
+  isShowAddInspect = false; //弹窗开关
5517
+  addInspect(){
5518
+    this.isShowAddInspect = true;
5519
+  }
5520
+  // 关闭弹窗
5521
+  closeAddInspectModel(e) {
5522
+    this.isShowAddInspect = JSON.parse(e).show;
5523
+  }
5524
+  // 确定弹窗
5525
+  confirmAddInspectModel(e) {
5526
+    console.log(e);
5527
+    let obj = JSON.parse(e);
5528
+    this.isShowAddInspect = obj.show;
5529
+    if(obj.type == 2){
5530
+      let user = JSON.parse(localStorage.getItem("user"));
5531
+      // 手动添加
5532
+      let postData:any = {
5533
+        inspectList: obj.list.map(v => ({
5534
+          patientCode: this.patientMsg.patientCode,
5535
+          patientName: this.patientMsg.patientName,
5536
+          barCode: this.patientMsg.barCode,
5537
+          inspectCheckType: { id: v.id },
5538
+          applyDeptId: user.user.dept.id,
5539
+          bedNum: this.patientMsg.bedNum,
5540
+          hosId: this.patientMsg.hosId,
5541
+        })) || undefined,
5542
+      };
5543
+      this.maskFlag = this.message.loading("正在加载中..", {
5544
+        nzDuration: 0,
5545
+      }).messageId;
5546
+      this.mainService
5547
+        .simplePost("addData", "inspect", postData)
5548
+        .subscribe((data:any) => {
5549
+          this.message.remove(this.maskFlag);
5550
+          this.maskFlag = false;
5551
+          if (data.status == 200) {
5552
+            this.message.success('追加检查成功!')
5553
+            this.refreshInspectList();
5554
+          } else {
5555
+            this.message.error(data.msg || '追加检查失败!')
5556
+          }
5557
+        });
5558
+    }
5559
+  }
5488 5560
 }

+ 5 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.html

@@ -157,6 +157,11 @@
157 157
           <nz-form-label class="label">是否开启陪检方式</nz-form-label>
158 158
           <nz-checkbox-group [(ngModel)]="enableTripType"></nz-checkbox-group>
159 159
         </div>
160
+        <!-- 是否开启护士端追加检查 -->
161
+        <div class="display_flex align-items_center mb8">
162
+          <nz-form-label class="label">是否开启护士端追加检查</nz-form-label>
163
+          <nz-checkbox-group [(ngModel)]="nurseAppendInspect"></nz-checkbox-group>
164
+        </div>
160 165
         <!-- 检查预约不进行工单合并 -->
161 166
         <!-- <div class="display_flex align-items_center mb8">
162 167
           <nz-form-label class="label">检查预约不进行工单合并</nz-form-label>

+ 6 - 0
src/app/views/inspect-and-patient-transport-config/inspect-and-patient-transport-config.component.ts

@@ -92,6 +92,10 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
92 92
   enableTripType:any[] = [
93 93
     {label:'是否开启',value: 0}
94 94
   ];
95
+  // 是否开启护士端追加检查
96
+  nurseAppendInspect:any[] = [
97
+    {label:'是否开启',value: 0}
98
+  ];
95 99
   // 检查预约不进行工单合并
96 100
   // yyInspectMergeOrder:any[] = [
97 101
   //   {label:'是否开启',value: 0}
@@ -292,6 +296,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
292 296
       hideInspectScan: this.hideInspectScan[0].checked ? 1 : 0,
293 297
       enableGoods: this.enableGoods[0].checked ? 1 : 0,
294 298
       enableTripType: this.enableTripType[0].checked ? 1 : 0,
299
+      nurseAppendInspect: this.nurseAppendInspect[0].checked ? 1 : 0,
295 300
       // yyInspectMergeOrder: this.yyInspectMergeOrder[0].checked ? 1 : 0,
296 301
       addService: this.addService[0].checked ? 1 : 0,
297 302
       addServiceTaskIds: this.addServiceTaskIds.length ? this.addServiceTaskIds.toString() : undefined,
@@ -422,6 +427,7 @@ export class InspectAndPatientTransportConfigComponent implements OnInit {
422 427
           this.hideInspectScan[0].checked = this.configs.hideInspectScan == 1;
423 428
           this.enableGoods[0].checked = this.configs.enableGoods == 1;
424 429
           this.enableTripType[0].checked = this.configs.enableTripType == 1;
430
+          this.nurseAppendInspect[0].checked = this.configs.nurseAppendInspect == 1;
425 431
           // this.yyInspectMergeOrder[0].checked = this.configs.yyInspectMergeOrder == 1;
426 432
           this.addService[0].checked = this.configs.addService == 1;
427 433
           this.addServiceTaskIds = this.configs.addServiceTaskIds ? this.configs.addServiceTaskIds.split(',').map(v => +v) : [];