Procházet zdrojové kódy

科室增加交接类型

seimin před 1 rokem
rodič
revize
5f52f1f5dd

+ 12 - 5
src/app/views/office-detail/office-detail.component.html

@@ -11,22 +11,29 @@
11 11
         <div class="left" nz-col nzSpan="12">
12 12
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
13 13
             <span>科室类型</span>
14
-            <span>{{officeInfo.type?officeInfo.type.name:'无'}}</span>
14
+            <span>{{officeInfo.type?.name}}</span>
15
+          </div>
16
+          <div class="item display_flex  justify-content_space-between align-items_flex-start">
17
+            <span>交接类型</span>
18
+            <span>{{officeInfo.deptHandoverType?.name}}</span>
15 19
           </div>
16 20
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
17 21
             <span>科室位置</span>
18
-            <span>{{
19
-              officeInfo.building?officeInfo.building.buildingName:'-'}}栋{{officeInfo.floor?officeInfo.floor.floorName:'-'}}层{{officeInfo.address}}</span>
22
+            <span>
23
+              {{ officeInfo.building?.buildingName }}
24
+              <ng-container *ngIf="officeInfo.building?.buildingName">{{ officeInfo.floor?.floorName }}层</ng-container>
25
+              {{ officeInfo.address }}
26
+            </span>
20 27
           </div>
21 28
         </div>
22 29
         <div class="right" nz-col nzSpan="12">
23 30
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
24 31
             <span>科室电话</span>
25
-            <span>{{officeInfo.manyPhone?officeInfo.manyPhone:'无'}}</span>
32
+            <span>{{officeInfo.manyPhone || ''}}</span>
26 33
           </div>
27 34
           <div class="item display_flex  justify-content_space-between align-items_flex-start">
28 35
             <span>父级科室</span>
29
-            <span>{{officeInfo.parent?officeInfo.parent.dept:'无'}}</span>
36
+            <span>{{officeInfo.parent?.dept}}</span>
30 37
           </div>
31 38
         </div>
32 39
       </div>

+ 21 - 3
src/app/views/office-management/office-management.component.html

@@ -3,7 +3,7 @@
3 3
     <div class="list-template__top" nz-row>
4 4
       <div nz-col nzLg='14' class="list-template__searchBox">
5 5
         <div class="list-template__searchItem">
6
-          <span class="label">院区</span>
6
+          <span class="label">院区</span>
7 7
           <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择院区" [(ngModel)]="hospital">
8 8
             <ng-container *ngFor="let option of hospitals1">
9 9
               <nz-option *ngIf="!isLoading" [nzLabel]="option.hosName" [nzValue]="option.id"></nz-option>
@@ -32,6 +32,13 @@
32 32
             <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of types"></nz-option>
33 33
           </nz-select>
34 34
         </div>
35
+        <div class="list-template__searchItem">
36
+          <span class="label">交接类型:</span>
37
+          <nz-select [nzDropdownMatchSelectWidth]="false" style="width: 135px;" nzShowSearch nzAllowClear
38
+            nzPlaceHolder="请选择交接类型" [(ngModel)]="deptHandoverType">
39
+            <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of deptHandoverTypes"></nz-option>
40
+          </nz-select>
41
+        </div>
35 42
       </div>
36 43
       <div nz-col nzLg="10" class="list-template__btns">
37 44
         <button class="btn default" (click)='search()'>搜索</button>
@@ -56,8 +63,9 @@
56 63
             <th nzWidth="10%">科室编码</th>
57 64
             <th nzWidth="10%">科室电话</th>
58 65
             <th nzWidth="10%">科室类型</th>
59
-            <th nzWidth="15%">科室位置</th>
60
-            <th nzWidth="20%">操作</th>
66
+            <th nzWidth="10%">交接类型</th>
67
+            <th nzWidth="10%">科室位置</th>
68
+            <th nzWidth="15%">操作</th>
61 69
           </tr>
62 70
         </thead>
63 71
         <tbody>
@@ -72,6 +80,7 @@
72 80
               </div>
73 81
             </td>
74 82
             <td>{{ data.type?data.type.name:'无' }}</td>
83
+            <td>{{ data.deptHandoverType?data.deptHandoverType.name:'无' }}</td>
75 84
             <td>{{ data.building?data.building.buildingName:'-'
76 85
               }}栋{{data.floor?data.floor.floorName:'-'}}层{{data.address}}</td>
77 86
             <td>
@@ -195,6 +204,15 @@
195 204
             </nz-form-control>
196 205
           </nz-form-item>
197 206
           <nz-form-item>
207
+            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="deptHandoverType">交接类型</nz-form-label>
208
+            <nz-form-control nzErrorTip="请选择交接类型!">
209
+              <nz-select [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear
210
+                formControlName="deptHandoverType" nzPlaceHolder="请选择交接类型">
211
+                <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of deptHandoverTypes"></nz-option>
212
+              </nz-select>
213
+            </nz-form-control>
214
+          </nz-form-item>
215
+          <nz-form-item>
198 216
             <nz-form-label [nzSm]="24" [nzXs]="24">服务时间</nz-form-label>
199 217
             <nz-form-control nzErrorTip="不能为空!">
200 218
               <nz-time-picker nzFormat="HH:mm" formControlName="startTime1" [nzDisabledHours]="startTime1Hourdis"

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

@@ -48,6 +48,7 @@ export class OfficeManagementComponent implements OnInit {
48 48
     this.initForm();
49 49
     this.getAllHospital();
50 50
     this.getType();
51
+    this.getDeptHandoverType();
51 52
   }
52 53
   listOfData: any[] = []; //表格数据
53 54
   promptContent: string; //操作提示框提示信息
@@ -63,6 +64,7 @@ export class OfficeManagementComponent implements OnInit {
63 64
   num; //编码
64 65
   deptalias; //别名
65 66
   type; //类型
67
+  deptHandoverType; //类型
66 68
   pageIndex: number = 1; //页码
67 69
   listLength: number = 10; //总条数
68 70
   pageSize: number = 10; //每页条数
@@ -147,6 +149,7 @@ export class OfficeManagementComponent implements OnInit {
147 149
     this.pageIndex = 1;
148 150
     this.hospital = this.tool.getCurrentHospital().id;
149 151
     this.type = null;
152
+    this.deptHandoverType = null;
150 153
     this.name = "";
151 154
     this.num = "";
152 155
     this.deptalias = "";
@@ -164,6 +167,7 @@ export class OfficeManagementComponent implements OnInit {
164 167
         dept: that.name || "",
165 168
         pcode: that.num || "",
166 169
         type: { id: that.type || "" },
170
+        deptHandoverType: { id: that.deptHandoverType || "" },
167 171
         deptalias: that.deptalias || "",
168 172
       },
169 173
     };
@@ -289,6 +293,16 @@ export class OfficeManagementComponent implements OnInit {
289 293
     });
290 294
   }
291 295
 
296
+  // 获取科室汇总交接类型
297
+  deptHandoverTypes: Array<any> = [];
298
+  getDeptHandoverType() {
299
+    var that = this;
300
+    that.mainService.getDictionary("list", "dept_handover_type").subscribe((data) => {
301
+      console.log(data);
302
+      that.deptHandoverTypes = data;
303
+    });
304
+  }
305
+
292 306
   // 新增弹框
293 307
   showModal() {
294 308
     this.initForm();
@@ -322,6 +336,7 @@ export class OfficeManagementComponent implements OnInit {
322 336
       floor: [null, [Validators.required]],
323 337
       officeAddress: [null, [Validators.required]],
324 338
       officeType: [null, [Validators.required]],
339
+      deptHandoverType: [null],
325 340
       startTime1: [null],
326 341
       endTime1: [null],
327 342
       dynamicCode1: [null],
@@ -420,6 +435,7 @@ export class OfficeManagementComponent implements OnInit {
420 435
         floor: { id: that.validateForm.value.floor - 0 },
421 436
         address: that.validateForm.value.officeAddress,
422 437
         type: { id: that.validateForm.value.officeType },
438
+        deptHandoverType: { id: that.validateForm.value.deptHandoverType },
423 439
       },
424 440
     };
425 441
     if (this.validateForm.value.parentOfficeName) {
@@ -533,6 +549,7 @@ export class OfficeManagementComponent implements OnInit {
533 549
     this.validateForm.controls.deptalias.setValue(data.deptalias);
534 550
     this.validateForm.controls.officeNo.setValue(data.pcode);
535 551
     this.validateForm.controls.officeType.setValue(data.type.id + "");
552
+    this.validateForm.controls.deptHandoverType.setValue(data.deptHandoverType.id + "");
536 553
     this.changeHosp(data);
537 554
     this.validateForm.controls.officeAddress.setValue(data.address);
538 555
   }