seimin 7 місяців тому
батько
коміт
f5331e61ad

+ 2 - 2
src/app/components/incidentManagement/incident-detail/incident-detail.component.html

@@ -35,8 +35,8 @@
35 35
             </div>
36 36
             <div class="row">
37 37
               <div class="col">来电电话:{{incidentData.incomingPhone}}</div>
38
-              <div class="col"><audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID"><source [src]="audioSrc"></audio></div>
39
-              <div class="col">关联资产:{{incidentData.assetDTO?.name}}</div>
38
+              <div class="col"><audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID"><source [src]="audioSrc" type="audio/wav"></audio></div>
39
+              <div class="col" *ngIf="incidentData.assetDTO">关联资产:{{incidentData.assetDTO?.name}}</div>
40 40
             </div>
41 41
             <div class="row">
42 42
               <div class="col">报修科室:{{incidentData.department?.dept}}</div>

+ 1 - 1
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.html

@@ -32,7 +32,7 @@
32 32
     <div class="value w100">
33 33
       <nz-select class="w100" [(ngModel)]="incidentDataCopy.assetId" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
34 34
         (nzOnSearch)="changeInp('assetId', $event)" nzAllowClear  nzPlaceHolder="请选择关联资产">
35
-          <ng-container *ngFor="let option of assetProducList">
35
+          <ng-container *ngFor="let option of assetList">
36 36
             <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
37 37
           </ng-container>
38 38
           <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 22 - 8
src/app/components/incidentManagement/incident-handle-info-simple/incident-handle-info-simple.component.ts

@@ -36,7 +36,7 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
36 36
       if(v[0] === 'synergetic'){
37 37
         this.getSynergeticList(v[1]);
38 38
       }else if(v[0] === 'assetId'){
39
-        this.getAssetProductList(v[1]);
39
+        this.getAssetList(v[1]);
40 40
       }
41 41
     });
42 42
     this.init();
@@ -48,8 +48,9 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
48 48
     this.incidentDataCopy = cloneDeep(this.incidentData);
49 49
     this.incidentDataCopy.synergetic = [];
50 50
     this.getHandleCategorys();
51
+    this.getClosecodes();
51 52
     this.getSynergeticList();
52
-    this.getAssetProductList();
53
+    this.getAssetList();
53 54
   }
54 55
 
55 56
   // 边输边搜节流阀
@@ -76,6 +77,19 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
76 77
     });
77 78
   }
78 79
 
80
+  // 获取处理结果列表
81
+  closecodeList:any[] = [];
82
+  getClosecodes(){
83
+    this.mainService.getDictionary("list", "incident_closecode").subscribe((data) => {
84
+      this.closecodeList = data || [];
85
+      console.log(this.incidentDataCopy)
86
+      if(!this.incidentDataCopy.closecode){
87
+        let closecode = this.closecodeList.find(v => v.value == '1');
88
+        this.incidentDataCopy.closecode = closecode ? closecode.id : undefined;
89
+      }
90
+    });
91
+  }
92
+
79 93
   // 获取协同人员
80 94
   hosId:any;
81 95
   isLoading = false;
@@ -83,7 +97,7 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
83 97
   getSynergeticList(keyword = '') {
84 98
     let postData = {
85 99
       user: {
86
-        hospital: { id: this.hosId },
100
+        hospital: { id: this.incidentDataCopy.duty.id },
87 101
         name: keyword,
88 102
         simpleQuery: true,
89 103
         roleCodes: 'first-line support',
@@ -101,10 +115,10 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
101 115
   }
102 116
 
103 117
   // 获取资产列表
104
-  assetProducList: any = [];
105
-  getAssetProductList(keyword = '') {
118
+  assetList: any = [];
119
+  getAssetList(keyword = '') {
106 120
     let postData = {
107
-      assetProduct: {
121
+      asset: {
108 122
         hosId: this.hosId,
109 123
         name: keyword,
110 124
       },
@@ -112,9 +126,9 @@ export class IncidentHandleInfoSimpleComponent implements OnInit {
112 126
       sum: 20,
113 127
     };
114 128
     this.mainService
115
-      .getFetchDataList("simple/data", "assetProduct", postData)
129
+      .getFetchDataList("simple/data", "asset", postData)
116 130
       .subscribe((data) => {
117
-        this.assetProducList = data.list;
131
+        this.assetList = data.list;
118 132
       });
119 133
   }
120 134
 

+ 1 - 1
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.html

@@ -73,7 +73,7 @@
73 73
     <div class="value w100">
74 74
       <nz-select class="w100" [(ngModel)]="incidentDataCopy.assetId" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
75 75
         (nzOnSearch)="changeInp('assetId', $event)" nzAllowClear  nzPlaceHolder="请选择关联资产">
76
-          <ng-container *ngFor="let option of assetProducList">
76
+          <ng-container *ngFor="let option of assetList">
77 77
             <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
78 78
           </ng-container>
79 79
           <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>

+ 8 - 8
src/app/components/incidentManagement/incident-handle-info/incident-handle-info.component.ts

@@ -45,7 +45,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
45 45
       if(v[0] === 'synergetic'){
46 46
         this.getSynergeticList(v[1]);
47 47
       }else if(v[0] === 'assetId'){
48
-        this.getAssetProductList(v[1]);
48
+        this.getAssetList(v[1]);
49 49
       }else if(v[0] === 'category'){
50 50
         this.getIncidentCategoryList(v[1]);
51 51
       }
@@ -69,7 +69,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
69 69
     this.getHandleCategorys();
70 70
     this.getClosecodes();
71 71
     this.getSynergeticList();
72
-    this.getAssetProductList();
72
+    this.getAssetList();
73 73
     this.getIncidentCategoryList();
74 74
   }
75 75
 
@@ -122,7 +122,7 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
122 122
   getSynergeticList(keyword = '') {
123 123
     let postData = {
124 124
       user: {
125
-        hospital: { id: this.hosId },
125
+        hospital: { id: this.incidentDataCopy.duty.id },
126 126
         name: keyword,
127 127
         simpleQuery: true,
128 128
         roleCodes: 'first-line support',
@@ -170,10 +170,10 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
170 170
   }
171 171
 
172 172
   // 获取资产列表
173
-  assetProducList: any = [];
174
-  getAssetProductList(keyword = '') {
173
+  assetList: any = [];
174
+  getAssetList(keyword = '') {
175 175
     let postData = {
176
-      assetProduct: {
176
+      asset: {
177 177
         hosId: this.hosId,
178 178
         name: keyword,
179 179
       },
@@ -181,9 +181,9 @@ export class IncidentHandleInfoComponent implements OnInit, OnChanges {
181 181
       sum: 20,
182 182
     };
183 183
     this.mainService
184
-      .getFetchDataList("simple/data", "assetProduct", postData)
184
+      .getFetchDataList("simple/data", "asset", postData)
185 185
       .subscribe((data) => {
186
-        this.assetProducList = data.list;
186
+        this.assetList = data.list;
187 187
       });
188 188
   }
189 189
 

+ 30 - 4
src/app/components/incidentManagement/incident-handle-order/incident-handle-order.component.ts

@@ -35,7 +35,7 @@ export class IncidentHandleOrderComponent implements OnInit {
35 35
     });
36 36
     this.hosId = this.tool.getCurrentHospital().id;
37 37
     this.getSummaryList();
38
-    this.getConsumableList();
38
+    this.getHospitalConfig();
39 39
     this.getWorkHourManagementList();
40 40
   }
41 41
 
@@ -143,18 +143,44 @@ export class IncidentHandleOrderComponent implements OnInit {
143 143
     this.changeInpSubject.next([model, e]);
144 144
   }
145 145
 
146
+  // 获取院区配置信息
147
+  itsmZeroStock:any = {};//是否支持零库存
148
+  itsmParentConsumable:any = {};//是否支持父级科室耗材
149
+  getHospitalConfig() {
150
+    let postData = {
151
+      idx: 0,
152
+      sum: 9999,
153
+      hospitalConfig: {
154
+        model: "itsm",
155
+        hosId: this.hosId,
156
+      },
157
+    }
158
+    this.mainService
159
+      .getFetchDataList("simple/data", "hospitalConfig", postData)
160
+      .subscribe((result) => {
161
+        let list = result.list || [];
162
+        this.itsmZeroStock = list.find(v => v.key == 'itsmZeroStock') || {};
163
+        this.itsmParentConsumable = list.find(v => v.key == 'itsmParentConsumable') || {};
164
+        this.getConsumableList();
165
+      });
166
+  }
167
+
146 168
   // 获取耗材
147 169
   consumableList: any = [];
148 170
   getConsumableList(keyword = '', isShowValue = false) {
149
-    let postData = {
171
+    let postData:any = {
150 172
       consumable: {
151 173
         name: keyword,
152
-        hosId: this.hosId,
153
-        showZero: true,
174
+        // showZero: true,
154 175
       },
155 176
       idx: 0,
156 177
       sum: 20,
157 178
     };
179
+    if(this.itsmParentConsumable.value == 1){
180
+      postData.consumable.upHosId = this.hosId;
181
+		}else{
182
+      postData.consumable.hosId = this.hosId;
183
+		}
158 184
     this.mainService
159 185
       .getFetchDataList("simple/data", "consumable", postData)
160 186
       .subscribe((data) => {

+ 1 - 1
src/app/components/incidentManagement/incident-handle-repair/incident-handle-repair.component.html

@@ -40,7 +40,7 @@
40 40
   <div class="name">电话录音:</div>
41 41
   <div class="value">
42 42
     <audio class="audio" controls style="outline: none;" *ngIf="incidentData.callID">
43
-      <source [src]="audioSrc">
43
+      <source [src]="audioSrc" type="audio/wav">
44 44
     </audio>
45 45
   </div>
46 46
 </div>

+ 1 - 0
src/app/components/incidentManagement/incident-handle/incident-handle.component.ts

@@ -321,6 +321,7 @@ export class IncidentHandleComponent implements OnInit {
321 321
         incident: {
322 322
           ...incidentDataCopy,
323 323
           handleCategory: incidentDataCopy.handleCategory ? { id: incidentDataCopy.handleCategory }: undefined,
324
+          closecode: incidentDataCopy.closecode ? { id: incidentDataCopy.closecode }: undefined,
324 325
           synergetic: incidentDataCopy.synergetic.length ? incidentDataCopy.synergetic.map(v => ({id: v})): undefined,
325 326
         },
326 327
       }

+ 1 - 1
src/app/components/incidentManagement/incident-ser-visit/incident-ser-visit.component.ts

@@ -105,7 +105,7 @@ export class IncidentSerVisitComponent implements OnInit {
105 105
     if(currentLog.extra1DTO && currentLog.extra2 && currentLog.startTime){
106 106
         if(currentLog.extra2==0.5){
107 107
           currentLog.extra2 = 4;
108
-          return currentLog.extra1DTO.name+" "+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日") + format(addDays(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
108
+          return currentLog.extra1DTO.name+" "+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日") + format(addHours(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
109 109
         }else{
110 110
           return currentLog.extra1DTO.name+" "+ format(addDays(currentLog.startTime, +currentLog.extra2), "MM月dd日前完成");
111 111
         }

+ 1 - 1
src/app/components/knowledge-look/knowledge-look.component.ts

@@ -41,7 +41,7 @@ export class KnowledgeLookComponent implements OnInit {
41 41
 			idx: 0,
42 42
 			sum: 9999,
43 43
 			solution: {
44
-				hosId: this.hosId,
44
+				hosId: data.hosId,
45 45
 				operationType:'lookOver',
46 46
 				solutionNumber:data.solutionNumber
47 47
 			}

+ 2 - 2
src/app/views/fuwutai/fuwutai.component.html

@@ -445,7 +445,7 @@
445 445
                   <div class="shijian">
446 446
                     <span class="left">
447 447
                       <span>
448
-                        处理人:{{ computedHandlerUser(data.data) }}
448
+                        处理人/组:{{ transferSynergetic(data.data) }}
449 449
                       </span>
450 450
                     </span>
451 451
                     <span class="right">
@@ -649,7 +649,7 @@
649 649
                   <div class="shijian">
650 650
                     <span class="left">
651 651
                       <span>
652
-                        处理人:{{ computedHandlerUser(data.data) }}
652
+                        处理人/组:{{ transferSynergetic(data.data) }}
653 653
                       </span>
654 654
                     </span>
655 655
                     <span class="right">

+ 26 - 10
src/app/views/fuwutai/fuwutai.component.ts

@@ -2262,6 +2262,7 @@ export class FuwutaiComponent implements OnInit {
2262 2262
     this.applicationRequesterList = [];
2263 2263
     this.fileList = [];
2264 2264
     this.repairImgs = [];
2265
+    this.isRelatedDepartment = true;
2265 2266
   }
2266 2267
   // 打开新建工单
2267 2268
   deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房
@@ -2281,7 +2282,7 @@ export class FuwutaiComponent implements OnInit {
2281 2282
       this.searchApplicationPriority();
2282 2283
       this.searchApplicationSource();
2283 2284
       isInit ? this.searchApplicationDepartment('itsm', undefined, undefined, undefined, true) : this.searchApplicationDepartment('itsm');
2284
-      isInit && ((this.isRelatedDepartment && this.incidentModel.department) || (!this.isRelatedDepartment && this.incidentModel.hosId) ) && this.incidentModel.hosId && this.searchApplicationBuilding();
2285
+      isInit && ((this.isRelatedDepartment && this.incidentModel.department) || (!this.isRelatedDepartment && this.incidentModel.hosId) || this.buildType === '报修转事件' ) && this.incidentModel.hosId && this.searchApplicationBuilding();
2285 2286
       isInit && this.incidentModel.area && this.searchApplicationFloor();
2286 2287
       if(!this.hsmsData.hsmsSwitch){
2287 2288
         this.taskBuild = null;
@@ -2534,7 +2535,6 @@ export class FuwutaiComponent implements OnInit {
2534 2535
 
2535 2536
     // 根据院区和故障现象带出责任部门,优先级,维修人/组
2536 2537
     if(this.incidentModel.category && e){
2537
-
2538 2538
       let postData = {
2539 2539
         idx: 0,
2540 2540
         sum: 9999,
@@ -2567,6 +2567,11 @@ export class FuwutaiComponent implements OnInit {
2567 2567
             this.showGroupOrUser();
2568 2568
           }
2569 2569
         });
2570
+    }else{
2571
+      this.incidentModel.group = undefined;
2572
+      this.applicationGroupList = [];
2573
+      this.incidentModel.user = undefined;
2574
+      this.applicationUserList = [];
2570 2575
     }
2571 2576
   }
2572 2577
   // 申请人列表(搜索)
@@ -2683,6 +2688,11 @@ export class FuwutaiComponent implements OnInit {
2683 2688
             this.showGroupOrUser();
2684 2689
           }
2685 2690
         });
2691
+    }else{
2692
+      this.incidentModel.group = undefined;
2693
+      this.applicationGroupList = [];
2694
+      this.incidentModel.user = undefined;
2695
+      this.applicationUserList = [];
2686 2696
     }
2687 2697
   }
2688 2698
 
@@ -2895,6 +2905,13 @@ export class FuwutaiComponent implements OnInit {
2895 2905
   // 处理组列表
2896 2906
   applicationGroupList:any[] = [];
2897 2907
   searchApplicationGroup(keyWord?) {
2908
+    if(!this.incidentModel.duty){
2909
+      this.incidentModel.group = undefined;
2910
+      this.applicationGroupList = [];
2911
+      this.incidentModel.user = undefined;
2912
+      this.applicationUserList = [];
2913
+      return;
2914
+    }
2898 2915
     let postData = {
2899 2916
       idx: 0,
2900 2917
       sum: 20,
@@ -4426,14 +4443,13 @@ export class FuwutaiComponent implements OnInit {
4426 4443
     };
4427 4444
   }
4428 4445
 
4429
-  // 处理人
4430
-  computedHandlerUser(incidentData){
4431
-    if(incidentData.state.value == 'pending' && incidentData.currentLog){
4432
-      return incidentData.currentLog.workerName;
4433
-    }
4434
-    if(incidentData.state.value != 'pending' && incidentData.handlingPersonnelUser){
4435
-      return incidentData.handlingPersonnelUser.name;
4446
+  // 处理人+协同人
4447
+  transferSynergetic(incidentData){
4448
+    let str = incidentData.groupORHandlerUser || "";
4449
+    if(incidentData.synergetic && incidentData.synergetic.length){
4450
+        str += ',' + incidentData.synergetic.map(v => v.name).join(',');
4436 4451
     }
4452
+    return str;
4437 4453
   }
4438 4454
 
4439 4455
   // 菜单拖拽-自由
@@ -4550,7 +4566,7 @@ export class FuwutaiComponent implements OnInit {
4550 4566
     if(currentLog.extra1DTO && currentLog.extra2 && currentLog.startTime){
4551 4567
         if(currentLog.extra2==0.5){
4552 4568
           currentLog.extra2 = 4;
4553
-          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
4569
+          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
4554 4570
         }else{
4555 4571
           return currentLog.extra1DTO.name+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "MM月dd日前完成");
4556 4572
         }

+ 3 - 2
src/app/views/incident-management/incident-management.component.html

@@ -72,7 +72,7 @@
72 72
             <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
73 73
             <td class="text_align_left">
74 74
               <span [ngClass]="priorityColor(data.priorityId)">{{ data.priorityDTO?.name }}</span>
75
-              {{ data.incidentsign }} {{ data.description }}
75
+              {{ data.incidentsign }} {{ data.acceptDate | date: 'yyyy-MM-dd HH:mm' }}<br>{{ data.description }}
76 76
               <i class="icon_transport transport-a-11111 ml8" *ngIf="data.reqAttachment"></i>
77 77
               <i class="icon_transport transport-luyin ml8" *ngIf="data.reqRecord"></i>
78 78
             </td>
@@ -90,7 +90,8 @@
90 90
             <td>
91 91
               {{ data.acceptUser?.name || '无' }}<br>
92 92
               {{ transferSynergetic(data) }}<br>
93
-              <span [ngStyle]="{ color: data.handleColourInfo ? data.handleColourInfo.value : '' }">{{ data.overdueTime | date: 'MM-dd HH:mm' }}</span>前接单
93
+              <ng-container *ngIf="(data.state.value === 'pending' || data.state.value === 'reassign') && data.overdueTime"><span [ngStyle]="{ color: data.handleColourInfo ? data.handleColourInfo.value : '' }">{{ data.overdueTime | date: 'MM-dd HH:mm' }}</span>前接单</ng-container>
94
+              <ng-container *ngIf="data.state.value === 'handler' && data.overdueTime"><span [ngStyle]="{ color: data.handleColourInfo ? data.handleColourInfo.value : '' }">{{ data.overdueTime | date: 'MM-dd HH:mm' }}</span>前处理</ng-container>
94 95
             </td>
95 96
             <td [innerHTML]="transferHandlerLog(data.currentLog)"></td>
96 97
             <td>{{ data.state?.name }}</td>

+ 3 - 3
src/app/views/incident-management/incident-management.component.ts

@@ -214,7 +214,7 @@ export class IncidentManagementComponent implements OnInit {
214 214
     if(currentLog.extra1DTO && currentLog.extra2 && currentLog.startTime){
215 215
         if(currentLog.extra2==0.5){
216 216
           currentLog.extra2 = 4;
217
-          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
217
+          return currentLog.extra1DTO.name+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "MM月dd日")+"<br>"+ format(addHours(currentLog.startTime, +currentLog.extra2), "HH时mm分前完成");
218 218
         }else{
219 219
           return currentLog.extra1DTO.name+"<br>"+ format(addDays(currentLog.startTime, +currentLog.extra2), "MM月dd日前完成");
220 220
         }
@@ -337,7 +337,7 @@ export class IncidentManagementComponent implements OnInit {
337 337
         if(!incident){
338 338
             incident = {};
339 339
         }
340
-        if(this.queryTask === 'all' || this.queryTask === 'callback' || this.queryTask === 'badEvaluate'){
340
+        if(incident.queryTask === 'all' || incident.queryTask === 'callback' || incident.queryTask === 'badEvaluate'){
341 341
           let { hospital, type } = this.tool.getHospitalOrDuty();
342 342
           if(type === 'duty'){
343 343
             // 当前的所属责任部门
@@ -353,7 +353,7 @@ export class IncidentManagementComponent implements OnInit {
353 353
 
354 354
         incident.assignee = this.tool.getCurrentUserId();
355 355
 
356
-        if(this.queryTask === 'todo' || this.queryTask === 'owns'){
356
+        if(incident.queryTask === 'todo' || incident.queryTask === 'owns'){
357 357
           incident.candidateGroups = this.tool.getCurrentGroupList().map(v => v.id).toString();
358 358
         }else{
359 359
           delete incident.candidateGroups;