Browse Source

医护陪同BUG修复

seimin 3 years ago
parent
commit
95d1b12665

+ 2 - 2
src/app/share/dialog-delete/dialog-delete.component.html

@@ -1,7 +1,7 @@
1 1
 <!-- 删除模态框 -->
2 2
 <div class="dialog-delete" *ngIf="delModal">
3 3
   <div class="modalBody">
4
-    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal()"></i></div>
4
+    <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideDelModal('x')"></i></div>
5 5
     <div class="content">
6 6
       <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
7 7
       <div class="defeat">{{content}}</div>
@@ -9,7 +9,7 @@
9 9
     </div>
10 10
     <div class="operate">
11 11
       <button nz-button nzType="primary" (click)="confirmDel()" [nzLoading]="btnLoading">{{confirmTxt}}</button>
12
-      <button class="btn cancel ml8" nz-button nzType="default" (click)="hideDelModal()" [nzLoading]="cancenlLoading">{{cancelTxt}}</button>
12
+      <button class="btn cancel ml8" nz-button nzType="default" (click)="hideDelModal('cancel')" [nzLoading]="cancenlLoading">{{cancelTxt}}</button>
13 13
     </div>
14 14
   </div>
15 15
 </div>

+ 2 - 2
src/app/share/dialog-delete/dialog-delete.component.ts

@@ -20,8 +20,8 @@ export class DialogDeleteComponent implements OnInit {
20 20
   ngOnInit() {
21 21
   }
22 22
   // 隐藏
23
-  hideDelModal() {
24
-    this.hideDelModalEvent.emit();
23
+  hideDelModal(e:string) {
24
+    this.hideDelModalEvent.emit(e);
25 25
   }
26 26
   // 确认删除
27 27
   confirmDel() {

+ 1 - 1
src/app/views/hushijiandan/hushijiandan.component.html

@@ -1335,6 +1335,6 @@
1335 1335
 <!-- 遮罩 -->
1336 1336
 <app-mask *ngIf="maskFlag"></app-mask>
1337 1337
 <!-- 是否需要医护陪同检查模态框 -->
1338
-<app-dialog-delete [delModal]="accompanyModal" (hideDelModalEvent)="hideAccompanyModal()"
1338
+<app-dialog-delete [delModal]="accompanyModal" (hideDelModalEvent)="hideAccompanyModal($event)"
1339 1339
   [btnLoading]="accompanyLoading" [cancenlLoading]="cancenlLoading" (confirmDelEvent)="confirmAccompany()"
1340 1340
   confirmTxt="是" cancelTxt="否" content="您选择的患者是危重或特级护理或一级护理患者,请问是否需要医护陪同检查?"></app-dialog-delete>

+ 26 - 13
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -723,21 +723,19 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
723 723
       );
724 724
     }
725 725
     //是否需要医护陪同检查
726
-    let isAccompany = false;
727
-    if (this.patientMsg.careLevel && !isAccompany) {
726
+    if (this.patientMsg.careLevel && this.currentTasktype.isAccompany == 1) {
728 727
       //特级护理或一级护理
729 728
       if (
730 729
         this.patientMsg.careLevel.value === "0" ||
731 730
         this.patientMsg.careLevel.value === "1"
732 731
       ) {
733
-        isAccompany = true;
734 732
         this.btnLoading = false;
735 733
         this.btnLoading1 = false;
736 734
         this.accompany(this.confirmPostData, this.confirmYuyue, "patient-yy");
737 735
         return;
738 736
       }
739 737
     }
740
-    if (this.patientMsg.illnessState && !isAccompany) {
738
+    if (this.patientMsg.illnessState && this.currentTasktype.isAccompany == 1) {
741 739
       //病危或病重
742 740
       if (
743 741
         this.patientMsg.illnessState.value === "2" ||
@@ -1052,21 +1050,22 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
1052 1050
         postData.workOrder["isRemand"] = this.isRemand ? 1 : 0;
1053 1051
       }
1054 1052
       //是否需要医护陪同检查
1055
-      let isAccompany = false;
1056
-      if (this.patientMsg.careLevel && !isAccompany) {
1053
+      if (this.patientMsg.careLevel && this.currentTasktype.isAccompany == 1) {
1057 1054
         //特级护理或一级护理
1058 1055
         if (
1059 1056
           this.patientMsg.careLevel.value === "0" ||
1060 1057
           this.patientMsg.careLevel.value === "1"
1061 1058
         ) {
1062
-          isAccompany = true;
1063 1059
           this.btnLoading = false;
1064 1060
           this.btnLoading1 = false;
1065 1061
           this.accompany(postData, yuyue, "patient");
1066 1062
           return;
1067 1063
         }
1068 1064
       }
1069
-      if (this.patientMsg.illnessState && !isAccompany) {
1065
+      if (
1066
+        this.patientMsg.illnessState &&
1067
+        this.currentTasktype.isAccompany == 1
1068
+      ) {
1070 1069
         //病危或病重
1071 1070
         if (
1072 1071
           this.patientMsg.illnessState.value === "2" ||
@@ -1184,7 +1183,13 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
1184 1183
         });
1185 1184
     }
1186 1185
   }
1187
-  hideAccompanyModal() {
1186
+  hideAccompanyModal(e) {
1187
+    console.log(e);
1188
+    if (e === "x") {
1189
+      //关闭
1190
+      this.accompanyModal = false;
1191
+      return;
1192
+    }
1188 1193
     this.accompanyPostData.workOrder.isAccompany = 0;
1189 1194
     this.cancenlLoading = true;
1190 1195
     if (this.accompanyType == "patient") {
@@ -1263,9 +1268,13 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
1263 1268
   checkedShowMsg: any = {}; //患者送检检查项目对应展示信息
1264 1269
   // checkedShowFlag: any;//切换到患者检查
1265 1270
   current_allowUrgent = false; //当前任务类型是否允许加急
1271
+  currentTasktype; //当前选中的任务类型对象
1266 1272
   changeCheckedType() {
1267 1273
     this.clickYYFlag = false;
1268 1274
     this.clickYYZyFlag = false;
1275
+    this.currentTasktype = this.checkTypeLis.find(
1276
+      (item) => item.id == this.patientForm.controls.checkedType.value
1277
+    );
1269 1278
     // 获取患者其他服务,护士端是否预约建单
1270 1279
     let appointmentZyBuildFlag = this.checkTypeLis.filter(
1271 1280
       (item) =>
@@ -1676,21 +1685,25 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
1676 1685
     }
1677 1686
     console.log(this.inspectionInfo);
1678 1687
     //是否需要医护陪同检查
1679
-    let isAccompany = false;
1680
-    if (this.inspectionInfo.careLevel && !isAccompany) {
1688
+    if (
1689
+      this.inspectionInfo.careLevel &&
1690
+      this.currentTasktype.isAccompany == 1
1691
+    ) {
1681 1692
       //特级护理或一级护理
1682 1693
       if (
1683 1694
         this.inspectionInfo.careLevel.value === "0" ||
1684 1695
         this.inspectionInfo.careLevel.value === "1"
1685 1696
       ) {
1686
-        isAccompany = true;
1687 1697
         this.btnLoading = false;
1688 1698
         this.btnLoading2 = false;
1689 1699
         this.accompany(postData, yuyue, "inspect");
1690 1700
         return;
1691 1701
       }
1692 1702
     }
1693
-    if (this.inspectionInfo.illnessState && !isAccompany) {
1703
+    if (
1704
+      this.inspectionInfo.illnessState &&
1705
+      this.currentTasktype.isAccompany == 1
1706
+    ) {
1694 1707
       //病危或病重
1695 1708
       if (
1696 1709
         this.inspectionInfo.illnessState.value === "2" ||