Pārlūkot izejas kodu

Merge branch 'lmm' into develop

seimin 1 gadu atpakaļ
vecāks
revīzija
c864e6403c

+ 3 - 0
src/app/share/hs-prompt-modal/hs-prompt-modal.component.ts

@@ -169,9 +169,11 @@ export class HsPromptModalComponent implements OnInit {
169 169
         idx: 0,
170 170
         sum: 10,
171 171
         department: {
172
+          searchType: 1,// 简单查询
172 173
           hospital: { id: hosId },
173 174
           keyWord: keywords,
174 175
           nurseSign: 1,
176
+          flag: 1,
175 177
         },
176 178
       }
177 179
     }else if(this.deptType === 'pharmacy'){
@@ -179,6 +181,7 @@ export class HsPromptModalComponent implements OnInit {
179 181
         idx: 0,
180 182
         sum: 10,
181 183
         department: {
184
+          searchType: 1,// 简单查询
182 185
           hospital: { id: hosId },
183 186
           dept: keywords,
184 187
           type: {id: "386"},

+ 2 - 0
src/app/views/fuwutai/fuwutai.component.ts

@@ -1491,8 +1491,10 @@ export class FuwutaiComponent implements OnInit {
1491 1491
       idx: 0,
1492 1492
       sum: 20,
1493 1493
       department: {
1494
+        searchType: 1,// 简单查询
1494 1495
         cascadeHosId: this.checkedHos,
1495 1496
         keyWord: keyWord,
1497
+        flag: 0,
1496 1498
       },
1497 1499
     };
1498 1500
     this.WSNum++;

+ 5 - 0
src/app/views/office-management/office-management.component.html

@@ -89,6 +89,7 @@
89 89
                 <span *ngIf="coopBtns.edit" (click)="edit($event,data)">编辑</span>
90 90
                 <span *ngIf="coopBtns.del" (click)="showDelModal($event,false,data.id)">删除</span>
91 91
                 <span *ngIf="coopBtns.print" (click)="print($event,false,data.id)">打印</span>
92
+                <span *ngIf="coopBtns.isStartUp" (click)="addDateModal(data)">{{data.flag == 1?'停用':'启用'}}</span>
92 93
               </div>
93 94
             </td>
94 95
           </tr>
@@ -253,6 +254,10 @@
253 254
   <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
254 255
     (confirmDelEvent)="confirmDel()" content="您确认要删除科室吗?"></app-dialog-delete>
255 256
 
257
+  <!-- 启用停用模态框 -->
258
+  <app-dialog-delete [delModal]="delModal1" (hideDelModalEvent)="hideDelModal1()" [btnLoading]="btnLoading"
259
+    (confirmDelEvent)="confirmDel1()" [content]="coopData.flag == 1 ? '您确认要停用科室吗?' : '您确认要启用吗?'"></app-dialog-delete>
260
+
256 261
   <!-- 二维码打印 -->
257 262
   <div id="report" style="display: none">
258 263
     <div *ngFor="let img of codes" style="display: inline-block;">

+ 29 - 0
src/app/views/office-management/office-management.component.ts

@@ -97,6 +97,35 @@ export class OfficeManagementComponent implements OnInit {
97 97
       });
98 98
     }
99 99
   }
100
+  // 启用/停用弹框
101
+  coopData:any = {};
102
+  addDateModal(data) {
103
+    this.coopData = data;
104
+    this.showDelModal1();
105
+  }
106
+  delModal1: boolean = false; //删除模态框
107
+
108
+  showDelModal1() {
109
+    this.delModal1 = true;
110
+  }
111
+  hideDelModal1() {
112
+    this.delModal1 = false;
113
+  }
114
+  // 确认
115
+  confirmDel1() {
116
+    this.btnLoading = true;
117
+    this.mainService
118
+      .coopData("updData", "department", {department:{...this.coopData, ...{flag: this.coopData.flag == 1 ? 0 : 1}}})
119
+      .subscribe((data) => {
120
+        this.btnLoading = false;
121
+        this.delModal1 = false;
122
+        if (data.status == 200) {
123
+          this.showPromptModal(this.coopData.flag == 1 ? "停用" : "启用", true, "");
124
+        } else {
125
+          this.showPromptModal(this.coopData.flag == 1 ? "停用" : "启用", false, data.msg);
126
+        }
127
+      });
128
+  }
100 129
   //获取所有的父级科室列表
101 130
   getAllParentdepart(keyWord = "") {
102 131
     let postData: any = {