seimin 7 kuukautta sitten
vanhempi
commit
f850044dba

+ 54 - 158
src/app/components/incidentManagement/incident-ser-message/incident-ser-message.component.html

@@ -1,170 +1,66 @@
1
-<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
-  <div class="modalBody" style="width: 1200px;">
3
-    <div class="title">业务数据查看<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
1
+<div class="modal display_flex align-items_center">
2
+  <div class="modalBody">
3
+    <div class="title">留言记录<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4 4
     <div class="content">
5
-      <!-- 血制品 -->
6
-      <nz-table *ngIf="type === 'blood'" class="hospitalTable" [nzData]="bloodList" nzSize="middle" [nzShowPagination]="false"
7
-        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
8
-        <thead>
9
-          <tr class="thead">
10
-            <th nzWidth="5%">序号</th>
11
-            <th nzWidth="13%">患者姓名</th>
12
-            <th nzWidth="11%">患者ID</th>
13
-            <th nzWidth="11%">血液类型</th>
14
-            <th nzWidth="14%">血袋号</th>
15
-            <th nzWidth="11%">取血人</th>
16
-            <th nzWidth="12%">取血时间</th>
17
-            <th nzWidth="11%">接收人</th>
18
-            <th nzWidth="12%">接收时间</th>
19
-          </tr>
20
-        </thead>
21
-        <tbody>
22
-          <tr *ngFor="let data of bloodList;let i = index;">
23
-            <td>{{i+1}}</td>
24
-            <td><span>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></span></td>
25
-            <td>{{ data.patientNo||'' }}</td>
26
-            <td>{{ data.type ? data.type.name : "" }}</td>
27
-            <td>{{ data.bloodCode||'' }}</td>
28
-            <td>{{ data.arriverDTO?data.arriverDTO.name:'' }}</td>
29
-            <td>{{ data.arriveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
30
-            <td>{{ data.receiverDTO ? data.receiverDTO.name : '' }}</td>
31
-            <td>{{ data.receiveTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
32
-          </tr>
33
-        </tbody>
34
-      </nz-table>
35
-      <!-- 标本 -->
36
-      <div class="list-template w100" *ngIf="type === 'specimen'">
5
+      <div class="tabs">
6
+        <div class="tab" *ngFor="let item of tabs" (click)="clickTbab(item)" [ngClass]="{ active: activeTabValue === item.value }">{{ item.name }}</div>
7
+      </div>
8
+      <div class="list-template w100">
37 9
         <div class="list-template__content">
38
-          <div class="list-template__top" nz-row *ngIf="type === 'specimen'">
39
-            <div nz-col nzXl='24' class="list-template__searchBox">
40
-              <div class="list-template__searchItem">
41
-                <span class="label">标本类型</span>:
42
-                <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
43
-                  nzPlaceHolder="请选择标本类型" [(ngModel)]="searchCriteria.stype" (ngModelChange)="selectStype($event)">
44
-                  <nz-option *ngFor="let option of specimentTypeList" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
45
-                </nz-select>
46
-              </div>
10
+          <div class="list-template__top" nz-row style="padding: 0;">
11
+            <div nz-col nzXl='18' class="list-template__searchBox">
47 12
               <div class="list-template__searchItem">
48
-                <span class="label">检验项目</span>:
49
-                <nz-select style="width: 210px;" class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
50
-                  nzPlaceHolder="请选择检验项目" [(ngModel)]="searchCriteria.specimenDesc" (ngModelChange)="selectDesc($event)">
51
-                  <nz-option *ngFor="let option of specimenDescList" [nzLabel]="option.nameNum" [nzValue]="option.id"></nz-option>
52
-                </nz-select>
13
+                <span class="label">留言时间</span>:
14
+                <nz-range-picker style="width: 373px;" nzShowTime [(ngModel)]="searchDTO.dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)"></nz-range-picker>
53 15
               </div>
54 16
             </div>
17
+            <div nz-col nzXl='6' class="list-template__btns">
18
+              <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
19
+              <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
20
+            </div>
55 21
           </div>
56 22
         </div>
57 23
       </div>
58
-      <nz-table *ngIf="type === 'specimen'" class="hospitalTable" [nzData]="specimenList" nzSize="middle" [nzShowPagination]="false"
59
-        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
60
-        <thead>
61
-          <tr class="thead">
62
-            <th nzWidth="4%">序号</th>
63
-            <th nzWidth="8%">申请科室</th>
64
-            <th nzWidth="8%">患者姓名</th>
65
-            <th nzWidth="8%">标本编码</th>
66
-            <th nzWidth="8%">检验项目</th>
67
-            <th nzWidth="8%">标本类型</th>
68
-            <th nzWidth="8%">状态</th>
69
-            <th nzWidth="8%">收取时间</th>
70
-            <th nzWidth="8%">收取人</th>
71
-            <th nzWidth="8%">中转时间</th>
72
-            <th nzWidth="8%">送达时间</th>
73
-            <th nzWidth="8%">送达人</th>
74
-            <th nzWidth="8%">终点科室</th>
75
-          </tr>
76
-        </thead>
77
-        <tbody>
78
-          <tr *ngFor="let data of specimenList;let i = index;">
79
-            <td>{{ (pageIndex - 1) * pageSize + i + 1 }}</td>
80
-            <td>{{ data.sickRoom ? data.sickRoom.dept : "-" }}</td>
81
-            <td>{{ data.patientName}}<span *ngIf="data.bedNum">({{data.bedNum}})</span><br>{{data.residenceNo}}</td>
82
-            <td>{{ data.scode || "-" }}</td>
83
-            <td>{{ data.specimenDesc || "-" }}</td>
84
-            <td>{{ data.stype ? data.stype.name : "-" }}</td>
85
-            <td>{{ data.speState ? data.speState.name : "-" }}</td>
86
-            <td>{{ data.arriveTime || "-" }}</td>
87
-            <td>{{ data.receiverName || "-" }}</td>
88
-            <td>{{ data.transTime || '-' }}</td>
89
-            <td>{{ data.sendTime || '-' }}</td>
90
-            <td>{{ data.delivererName || "-" }}</td>
91
-            <td>
92
-              {{ data.checkDept ? data.checkDept.dept : "-" }}
93
-              <img *ngIf="data.urgent == 1" src="../../assets/images/icon_ji.png" alt="" class="ji" />
94
-            </td>
95
-          </tr>
96
-        </tbody>
97
-      </nz-table>
98
-      <!-- 科室检查率统计 -->
99
-      <nz-table *ngIf="type === 'deptInspectionRateStatistics' || type === 'deptInspectionStatistics'" class="hospitalTable" [nzData]="inspectionRateStatisticsList" nzSize="middle" [nzShowPagination]="false"
100
-        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
101
-        <thead>
102
-          <tr class="thead">
103
-            <th nzWidth="4%">序号</th>
104
-            <th nzWidth="12%">患者姓名(床号)</th>
105
-            <th nzWidth="12%">检查项目</th>
106
-            <th nzWidth="12%">预约时间</th>
107
-            <th nzWidth="12%">叫号信息</th>
108
-            <th nzWidth="12%">检查科室</th>
109
-            <th nzWidth="12%">检查状态</th>
110
-            <th nzWidth="12%">陪检人</th>
111
-            <th nzWidth="12%">是否临时急查</th>
112
-          </tr>
113
-        </thead>
114
-        <tbody>
115
-          <tr *ngFor="let data of inspectionRateStatisticsList;let i = index;">
116
-            <td>{{ (pageIndex - 1) * pageSize + i + 1 }}</td>
117
-            <td>{{ data.patientName }}<span *ngIf="data.patientBedNum">({{data.patientBedNum}})</span></td>
118
-            <td>{{ data.inspectName}}</td>
119
-            <td>{{ data.yyTime}}</td>
120
-            <td>{{ data.reservationNumber}}</td>
121
-            <td>{{ data.execDept ? data.execDept.dept : '' }}</td>
122
-            <td>{{ data.inspectState?data.inspectState.name:''}}</td>
123
-            <td>{{ data.workerName}}</td>
124
-            <td>{{ data.priority == 1 ? '是' : '否'}}</td>
125
-          </tr>
126
-        </tbody>
127
-      </nz-table>
128
-
129
-      <!-- 被服洗涤批次管理-查看视图-查看异常 -->
130
-      <nz-table *ngIf="type === 'washingException'" class="hospitalTable" [nzData]="washingExceptionList" nzSize="middle" [nzShowPagination]="false"
131
-        [nzLoading]="hsLoading" [nzScroll]="{ y: '500px' }">
132
-        <thead>
133
-          <tr class="thead">
134
-            <th nzWidth="5%">序号</th>
135
-            <th nzWidth="13%">关联科室</th>
136
-            <th nzWidth="11%">被服种类</th>
137
-            <th nzWidth="5%">调整数量</th>
138
-            <th nzWidth="20%">调整原因</th>
139
-            <th nzWidth="20%">备注</th>
140
-            <th nzWidth="15%">时间</th>
141
-            <th nzWidth="11%">操作人</th>
142
-          </tr>
143
-        </thead>
144
-        <tbody>
145
-          <tr *ngFor="let data of washingExceptionList;let i = index;">
146
-            <td>{{i+1}}</td>
147
-            <td>{{ data.clothesDeptDTO?.dept }}</td>
148
-            <td>{{ data.clothesType?.name }}</td>
149
-            <td>{{ data.changeNum }}</td>
150
-            <td>{{ data.clothesExceptionRe?.name }}</td>
151
-            <td>{{ data.remarks }}</td>
152
-            <td>{{ data.changeTime | date:"yyyy-MM-dd HH:mm:ss" }}</td>
153
-            <td>{{ data.changerDTO?.name }}</td>
154
-          </tr>
155
-        </tbody>
156
-      </nz-table>
157
-
158
-      <div class="pagination" *ngIf="type !== 'blood'">
159
-        <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
160
-        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
161
-          [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
162
-          (nzPageSizeChange)="getList()" [nzShowTotal]="totalTemplate">
163
-        </nz-pagination>
24
+      <div class="tableWrap">
25
+        <nz-table class="hospitalTable" [nzData]="messageList" nzSize="small" [nzShowPagination]="false" [nzLoading]="loading">
26
+          <thead>
27
+            <tr class="thead">
28
+              <th nzWidth="8%">序号</th>
29
+              <th nzWidth="23%">留言时间</th>
30
+              <th nzWidth="23%">来电号码</th>
31
+              <th nzWidth="23%">处理状态</th>
32
+              <th nzWidth="23%">操作</th>
33
+            </tr>
34
+          </thead>
35
+          <tbody>
36
+            <tr *ngFor="let data of messageList;let i = index;">
37
+              <td>{{ (pageIndex - 1) * pageSize + i + 1 }}</td>
38
+              <td>{{ data.recTime | date:'yyyy-MM-dd HH:mm' }}</td>
39
+              <td>{{ data.ano}}</td>
40
+              <td>{{ data.isExcute == 1 ? '已受理' : (data.isExcute == 2 ? '不受理' : '未受理') }}</td>
41
+              <td>
42
+                <div class="coop">
43
+                  <span *ngIf="data.isExcute === 0" (click)="createOrder(data)">生成工单</span>
44
+                  <span (click)="visit(data)">回访录音</span>
45
+                  <span *ngIf="data.isExcute === 0" (click)="showDelModal(data, '确认不受理后,将无法转换为事件工单!', '不受理', 'notAccepted')">不受理</span>
46
+                </div>
47
+              </td>
48
+            </tr>
49
+          </tbody>
50
+        </nz-table>
51
+        <div class="pagination">
52
+          <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
53
+          <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
54
+            [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
55
+            (nzPageSizeChange)="getList()" [nzShowTotal]="totalTemplate">
56
+          </nz-pagination>
57
+        </div>
164 58
       </div>
165 59
     </div>
166
-    <div class="display_flex justify-content_flex-center">
167
-      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">知道了</button>
168
-    </div>
169 60
   </div>
170 61
 </div>
62
+
63
+<!-- 操作成功/失败提示框 -->
64
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow" [info]="promptInfo"></app-prompt-modal>
65
+
66
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" (confirmDelEvent)="confirmDelFn()" [content]="tipsMsg1"></app-dialog-delete>

+ 64 - 25
src/app/components/incidentManagement/incident-ser-message/incident-ser-message.component.less

@@ -1,4 +1,53 @@
1 1
 @import "../../../../theme.less";
2
+.coop {
3
+  button{
4
+    color: #333;
5
+  }
6
+  span,button {
7
+    display: inline-block;
8
+    padding: 0 8px;
9
+    cursor: pointer;
10
+    position: relative;
11
+
12
+    &::after {
13
+      content: "|";
14
+      position: absolute;
15
+      top: 0;
16
+      right: 0;
17
+    }
18
+
19
+    &:hover,
20
+    &:active {
21
+      color: @primary-color;
22
+    }
23
+
24
+    &:nth-last-child(1) {
25
+      &::after {
26
+        content: "";
27
+      }
28
+    }
29
+  }
30
+}
31
+.tabs{
32
+  width: 100%;
33
+  height: 56px;
34
+  border-bottom: 1px solid #D9D9D9;
35
+  display: flex;
36
+  align-items: center;
37
+  .tab{
38
+    width: 100px;
39
+    display: flex;
40
+    height: 100%;
41
+    justify-content: center;
42
+    align-items: center;
43
+    font-size: #333;
44
+    cursor: pointer;
45
+    &.active{
46
+      color: @primary-color;
47
+      border-bottom: 2px solid @primary-color;
48
+    }
49
+  }
50
+}
2 51
 .modal {
3 52
   position: fixed;
4 53
   left: 0;
@@ -7,6 +56,18 @@
7 56
   height: 100%;
8 57
   background: rgba(0, 0, 0, 0.4);
9 58
   z-index: 999;
59
+  .tableWrap{
60
+    margin: 16px!important;
61
+    background: #F9FAFB;
62
+    border-radius: 8px;
63
+    border: 1px solid #D9D9D9;
64
+    width: calc(100% - 32px);
65
+    min-height: 501px;
66
+    padding: 16px 16px 0;
67
+    ::ng-deep .ant-table-body{
68
+      margin: 0!important;
69
+    }
70
+  }
10 71
   .hospitalTable {
11 72
     width: 100%;
12 73
     td {
@@ -37,31 +98,8 @@
37 98
     }
38 99
   }
39 100
 
40
-  .tab {
41
-    width: 100%;
42
-    height: 60px;
43
-    border-bottom: 1px solid #e5e9ed;
44
-    background-color: #fff;
45
-
46
-    .item {
47
-      text-align: center;
48
-      line-height: 60px;
49
-      height: 100%;
50
-      border-right: 1px solid #e5e9ed;
51
-
52
-      &:nth-last-child(1) {
53
-        border: none;
54
-      }
55
-
56
-      &.checked {
57
-        background: #f0f6ed;
58
-      }
59
-    }
60
-  }
61
-
62 101
   .modalBody {
63
-    width: 700px;
64
-    min-height: 220px;
102
+    width: 1315px;
65 103
     background: #fff;
66 104
     border-radius: 5px;
67 105
     padding: 10px 20px;
@@ -90,7 +128,7 @@
90 128
 
91 129
     .content {
92 130
       min-height: 117px;
93
-      background: #f9fafb;
131
+      // background: #f9fafb;
94 132
       border: 1px solid #e5e9ed;
95 133
       border-radius: 5px;
96 134
       overflow: hidden;
@@ -146,6 +184,7 @@
146 184
           color: #666;
147 185
           padding-top: 16px;
148 186
           padding-bottom: 16px;
187
+          text-align: right;
149 188
         }
150 189
       }
151 190
     }

+ 165 - 301
src/app/components/incidentManagement/incident-ser-message/incident-ser-message.component.ts

@@ -1,304 +1,168 @@
1
-// import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
-// import { ToolService } from 'src/app/services/tool.service';
3
-// import { format, startOfDay, endOfDay } from 'date-fns';
4
-// import { MainService } from 'src/app/services/main.service';
5
-// @Component({
6
-//   selector: 'app-businessData-detail-modal',
7
-//   templateUrl: './businessData-detail-modal.component.html',
8
-//   styleUrls: ['./businessData-detail-modal.component.less']
9
-// })
10
-// export class BusinessDataDetailModalComponent implements OnInit {
11
-//   // 切换科室,切换弹窗
12
-//   hosId;
13
-//   hsLoading = false;
14
-//   bloodList: any = [];// 血制品列表
15
-//   washingExceptionList: any = [];// 被服洗涤异常列表
16
-//   specimenList: any = [];// 标本列表
17
-//   inspectionRateStatisticsList: any = [];// 科室检查率统计列表
18
-//   pageIndex: number = 1;//表格当前页码
19
-//   pageSize: number = 10;//表格每页展示条数
20
-//   total: number = 0;//表格总数据量
21
-//   searchCriteria:any = {
22
-//     stype: 0,
23
-//     specimenDesc: 0,
24
-//   }
25
-//   @Input() show: Boolean;
26
-//   @Input() orderId: String;
27
-//   @Input() type: String = '';
28
-//   @Input() dataInfo: any;
29
-
30
-//   @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
31
-
32
-//   constructor(private mainService: MainService, private tool: ToolService) { }
33
-
34
-//   ngOnInit() {
35
-//     this.hosId = this.tool.getCurrentHospital().id;
36
-//     this.tabType = 1;
37
-//     switch(this.type){
38
-//       case 'blood':
39
-//         this.getBlood(1);
40
-//         break;
41
-//       case 'specimen':
42
-//           this.getSpecimen(1);
43
-//           this.getSpecimenType();
44
-//           this.getSpecimenDesc();
45
-//           break;
46
-//       case 'deptInspectionRateStatistics':
47
-//           this.getDeptInspectionRateStatistics(1);
48
-//           break;
49
-//       case 'deptInspectionStatistics':
50
-//         this.getDeptInspectionStatistics(1);
51
-//         break;
52
-//       case 'washingException':
53
-//           this.getWashingException(1);
54
-//           break;
55
-//     }
56
-//   }
57
-//   // 关闭弹窗
58
-//   hideModal() {
59
-//     this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
60
-//   }
61
-
62
-//   // 切换tab栏
63
-//   tabType: number = 1; //tab栏
64
-//   checkTab(type) {
65
-//     this.tabType = type;
66
-//   }
67
-
68
-//   // 切换标本类型下拉框
69
-//   selectStype(e){
70
-//     console.log(e);
71
-//     this.searchCriteria.specimenDesc = 0;
72
-//     this.getSpecimenDesc();
73
-//     this.getSpecimen(1);
74
-//   }
75
-
76
-//   // 切换标本类型下拉框
77
-//   selectDesc(e){
78
-//     console.log(e);
79
-//     this.getSpecimen(1);
80
-//   }
81
-
82
-//   // 分页获取数据
83
-//   getList(){
84
-//     switch(this.type){
85
-//       case 'blood':
86
-//         this.getBlood();
87
-//         break;
88
-//       case 'specimen':
89
-//           this.getSpecimen();
90
-//           break;
91
-//       case 'deptInspectionRateStatistics':
92
-//         this.getDeptInspectionRateStatistics();
93
-//         break;
94
-//       case 'deptInspectionStatistics':
95
-//         this.getDeptInspectionStatistics();
96
-//         break;
97
-//       case 'washingException':
98
-//         this.getWashingException();
99
-//         break;
100
-//     }
101
-//   }
102
-
103
-//   // 获取列表数据
104
-//   getBlood(idx?) {
105
-//     if (idx) {
106
-//       this.pageIndex = 1;
107
-//     }
108
-//     let postData = {
109
-//       "type": "blood",
110
-//       "orderId": this.orderId
111
-//     }
112
-//     this.hsLoading = true;
113
-//     this.mainService.checkData(postData).subscribe((data:any) => {
114
-//       this.hsLoading = false;
115
-//       this.bloodList = data.data ? data.data.all : [];
116
-//       this.pageSize = this.total = data.data ? data.data.all.length : 0;
117
-//     })
118
-//   }
119
-
120
-//   // 获取标本类型
121
-//   specimentTypeList: any[] = [{ id: 0, name: '全部' }];
122
-//   getSpecimenType() {
123
-//     this.mainService.getDictionary("list", "specimen_type").subscribe((data:any) => {
124
-//       let specimentTypeList = [{ id: 0, name: '全部' }];
125
-//       this.specimentTypeList = specimentTypeList.concat(data);
126
-//     })
127
-//   }
128
-
129
-//   // 获取检验项目
130
-//   specimenDescList: any[] = [{ id: 0, name: '', nameNum: '全部' }];
131
-//   id:number = 0;
132
-//   getSpecimenDesc() {
133
-//     let postData = {
134
-//       "hosId": this.hosId,
135
-//       "gdId": this.orderId,
136
-//       "stype": this.searchCriteria.stype || undefined,
137
-//     };
138
-//     this.mainService.specimenCount(postData).subscribe((data:any) => {
139
-//       data.data = data.data || [];
140
-//       let specimenDescList:any = [{ id: 0, name: '全部', nameNum: '全部' }];
141
-//       specimenDescList[0].nameNum = `全部(${data.total})`;
142
-//       this.specimenDescList = specimenDescList.concat( data.data.map(v => ({id: --this.id, name: v[0] || '', nameNum: (v[0] ? v[0].slice(0, 15) + (v[0].length >= 15 ? '...' : '') : '') + `(${v[1]})`})));
143
-//     })
144
-//   }
145
-
146
-//   // 获取标本列表
147
-//   getSpecimen(idx?) {
148
-//     if (idx) {
149
-//       this.pageIndex = 1;
150
-//     }
151
-//     let postData = {
152
-//       idx: this.pageIndex - 1,
153
-//       sum: this.pageSize,
154
-//       specimen: {
155
-//         orderBy: 'arrive_time desc',
156
-//         hosId: this.hosId,
157
-//         gdid: this.orderId,
158
-//         stype: this.searchCriteria.stype ? { id: this.searchCriteria.stype } : undefined,
159
-//         specimenDesc: this.searchCriteria.specimenDesc ? this.specimenDescList.find(v => v.id == this.searchCriteria.specimenDesc).name: undefined,
160
-//       }
161
-//     }
162
-//     this.hsLoading = true;
163
-//     this.mainService.getFetchDataList('simple/data','specimen',postData).subscribe(data => {
164
-//       this.hsLoading = false;
165
-//       this.specimenList = data.list || [];
166
-//       this.total = data.totalNum || 0;
167
-//     })
168
-//   }
169
-
170
-//   // 获取被服洗涤异常列表
171
-//   getWashingException(idx?) {
172
-//     if (idx) {
173
-//       this.pageIndex = 1;
174
-//     }
175
-//     let postData = {
176
-//       idx: this.pageIndex - 1,
177
-//       sum: this.pageSize,
178
-//       clothesException: {
179
-//         hosId: this.hosId,
180
-//         batchId: this.orderId,
181
-//       }
182
-//     }
183
-//     this.hsLoading = true;
184
-//     this.mainService.getFetchDataList('simple/data','clothesException',postData).subscribe(data => {
185
-//       this.hsLoading = false;
186
-//       this.washingExceptionList = data.list || [];
187
-//       this.total = data.totalNum || 0;
188
-//     })
189
-//   }
190
-
191
-//   // 获取科室检查率统计-详情列表
192
-//   getDeptInspectionRateStatistics(idx?) {
193
-//     if (idx) {
194
-//       this.pageIndex = 1;
195
-//     }
196
-//     let postData:any = {
197
-//       idx: this.pageIndex - 1,
198
-//       sum: this.pageSize,
199
-//       canceled: this.dataInfo.canceled ? true : undefined,
200
-//       priority: this.dataInfo.priority ? 0 : undefined,
201
-//     }
202
-//     switch(this.dataInfo.type){
203
-//       case 'total':
204
-//         postData.deptId = this.dataInfo.data.id;
205
-//         postData.hosId = this.hosId;
206
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
207
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
208
-//         break;
209
-//       case 'noCheckCount':
210
-//         postData.deptId = this.dataInfo.data.id;
211
-//         postData.hosId = this.hosId;
212
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
213
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
214
-//         postData.reportInsState = 'noCheck';
215
-//         break;
216
-//       case 'checkCount':
217
-//         postData.deptId = this.dataInfo.data.id;
218
-//         postData.hosId = this.hosId;
219
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
220
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
221
-//         postData.reportInsState = 'check';
222
-//         break;
223
-//       case 'insCount':
224
-//         postData.deptId = this.dataInfo.data.id;
225
-//         postData.hosId = this.hosId;
226
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
227
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
228
-//         postData.reportInsState = 'inspect';
229
-//         break;
230
-//     }
231
-//     this.hsLoading = true;
232
-//     this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
233
-//       this.hsLoading = false;
234
-//       this.inspectionRateStatisticsList = data.list || [];
235
-//       this.total = data.totalNum || 0;
236
-//     })
237
-
238
-//   }
239
-
240
-//   // 获取科室检查统计-详情列表
241
-//   getDeptInspectionStatistics(idx?) {
242
-//     if (idx) {
243
-//       this.pageIndex = 1;
244
-//     }
245
-//     let postData:any = {
246
-//       idx: this.pageIndex - 1,
247
-//       sum: this.pageSize,
248
-//       znDeptInspect: true,
249
-//     }
250
-//     switch(this.dataInfo.type){
251
-//       case 'total':
252
-//         postData.deptId = this.dataInfo.data[10];
253
-//         postData.hosId = this.hosId;
254
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
255
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
256
-//         break;
257
-//       case 'cancel':
258
-//         postData.deptId = this.dataInfo.data[10];
259
-//         postData.hosId = this.hosId;
260
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
261
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
262
-//         postData.cancel = true;
263
-//         break;
264
-//       case 'priority':
265
-//         postData.deptId = this.dataInfo.data[10];
266
-//         postData.hosId = this.hosId;
267
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
268
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
269
-//         postData.priority = 1;
270
-//         break;
271
-//       case 'noneYY':
272
-//         postData.deptId = this.dataInfo.data[10];
273
-//         postData.hosId = this.hosId;
274
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
275
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
276
-//         postData.noneYY = true;
277
-//         break;
278
-//       case 'waitCheck':
279
-//         postData.deptId = this.dataInfo.data[10];
280
-//         postData.hosId = this.hosId;
281
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
282
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
283
-//         postData.waitCheck = true;
284
-//         break;
285
-//       case 'doCheck':
286
-//         postData.deptId = this.dataInfo.data[10];
287
-//         postData.hosId = this.hosId;
288
-//         postData.startTime = this.dataInfo.searchDto.dateRange[0] ? format(startOfDay(this.dataInfo.searchDto.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined;
289
-//         postData.endTime = this.dataInfo.searchDto.dateRange[1] ? format(endOfDay(this.dataInfo.searchDto.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined;
290
-//         postData.doCheck = true;
291
-//         break;
292
-//     }
293
-//     this.hsLoading = true;
294
-//     this.mainService.listMsgByMain("listInspect", postData).subscribe((data: any) => {
295
-//       this.hsLoading = false;
296
-//       this.inspectionRateStatisticsList = data.list || [];
297
-//       this.total = data.totalNum || 0;
298
-//     })
299
-
300
-//   }
301
-// }
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { format, startOfDay, endOfDay } from 'date-fns';
3
+import { MainService } from 'src/app/services/main.service';
4
+import { ToolService } from 'src/app/services/tool.service';
5
+import cloneDeep from 'lodash-es/cloneDeep'
6
+@Component({
7
+  selector: 'app-incident-ser-message',
8
+  templateUrl: './incident-ser-message.component.html',
9
+  styleUrls: ['./incident-ser-message.component.less']
10
+})
11
+export class IncidentSerMessageComponent implements OnInit {
12
+  // 切换科室,切换弹窗
13
+  hosId;
14
+  loading = false;
15
+  bloodList: any = [];// 血制品列表
16
+  washingExceptionList: any = [];// 被服洗涤异常列表
17
+  messageList: any = [];// 标本列表
18
+  inspectionRateStatisticsList: any = [];// 科室检查率统计列表
19
+  pageIndex: number = 1;//表格当前页码
20
+  pageSize: number = 10;//表格每页展示条数
21
+  total: number = 0;//表格总数据量
22
+  searchCriteria:any = {
23
+    stype: 0,
24
+    specimenDesc: 0,
25
+  }
26
+
27
+  tabs:any[] = [
28
+    {id: 1, name: '全部', value: '', num: ''},
29
+    {id: 2, name: '未受理', value: 0, num: ''},
30
+    {id: 3, name: '已受理', value: 1, num: ''},
31
+    {id: 4, name: '不受理', value: 2, num: ''},
32
+  ]
33
+
34
+  searchDTO: any = {};
35
+
36
+  @Input() itsmData:any;
37
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
38
+
39
+  constructor(private mainService: MainService, private tool: ToolService) { }
40
+
41
+  ngOnInit() {
42
+    this.hosId = this.tool.getCurrentHospital().id;
43
+    this.clickTbab(this.tabs[1]);
44
+  }
45
+  // 关闭弹窗
46
+  hideModal() {
47
+    this.closeModelHs.emit({ show: false });//emits(向上弹射)事件
48
+  }
49
+
50
+  // 点击tab
51
+  activeTabValue:any;
52
+  clickTbab(item){
53
+    this.activeTabValue = item.value;
54
+    this.getMessageList(1);
55
+  }
56
+
57
+  onCalendarChangeDate(dateArr){
58
+    console.log(dateArr)
59
+    if(dateArr.length == 2){
60
+      let dateStart = new Date(dateArr[0]);
61
+      let dateEnd = new Date(dateArr[1]);
62
+      dateStart.setHours(0,0,0);
63
+      dateEnd.setHours(23,59,59);
64
+      this.searchDTO.dateRange = [dateStart,dateEnd];
65
+    }
66
+  }
67
+
68
+  // 搜索
69
+  search() {
70
+    this.getMessageList(1);
71
+  }
72
+  // 重置
73
+  reset() {
74
+    this.searchDTO = {};
75
+    this.getMessageList(1);
76
+  }
77
+
78
+  delModal: boolean = false; //删除模态框
79
+  tipsMsg1: string; //提示框信息
80
+  tipsMsg2: string; //操作后信息
81
+  confirmDelType: string; //确认的类型(启用/停用,删除)
82
+  coopData:any = {};
83
+  showDelModal(data, tipsMsg1: string, tipsMsg2: string, type: string) {
84
+    this.confirmDelType = type;
85
+    this.delModal = true;
86
+    this.coopData = data;
87
+    this.tipsMsg1 = tipsMsg1;
88
+    this.tipsMsg2 = tipsMsg2;
89
+  }
90
+  // 隐藏删除框
91
+  hideDelModal() {
92
+    this.delModal = false;
93
+  }
94
+  // 确认删除
95
+  btnLoading: boolean = false; //确认按钮loading状态
96
+  confirmDelFn() {
97
+    this.btnLoading = true;
98
+    if (this.confirmDelType === "notAccepted") {
99
+      //不受理
100
+      this.mainService
101
+        .simplePost("updData", "hjzxRecord", { ...this.coopData, item: undefined, isExcute: 2 })
102
+        .subscribe((data) => {
103
+          this.btnLoading = false;
104
+          this.delModal = false;
105
+          if (data.status == 200) {
106
+            this.showPromptModal(this.tipsMsg2, true, "");
107
+          } else {
108
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
109
+          }
110
+        });
111
+    }
112
+  }
113
+
114
+  // 生成工单
115
+  createOrder(data){
116
+    this.closeModelHs.emit({ show: false, data: data });
117
+  }
118
+
119
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
120
+  promptContent: string; //操作提示框提示信息
121
+  ifSuccess: boolean; //操作成功/失败
122
+  promptInfo: string; //操作结果提示信息
123
+  promptModalShow: boolean; //是否展示提示框
124
+  showPromptModal(con, success, promptInfo?) {
125
+    this.promptModalShow = false;
126
+    this.promptContent = con;
127
+    this.ifSuccess = success;
128
+    this.promptInfo = promptInfo;
129
+    setTimeout(() => {
130
+      this.promptModalShow = true;
131
+      this.getList();
132
+    }, 100);
133
+  }
134
+
135
+  // 分页获取数据
136
+  getList(){
137
+    this.getMessageList();
138
+  }
139
+
140
+  // 获取留言列表
141
+  getMessageList(idx?) {
142
+    if (idx) {
143
+      this.pageIndex = 1;
144
+    }
145
+    let postData = {
146
+      idx: this.pageIndex - 1,
147
+      sum: this.pageSize,
148
+      hjzxRecord: {
149
+        isExcute: this.activeTabValue === '' ? undefined : this.activeTabValue,
150
+        startTime: this.searchDTO.dateRange ? format(startOfDay(this.searchDTO.dateRange[0]), 'yyyy-MM-dd HH:mm:ss') : undefined,
151
+        endTime: this.searchDTO.dateRange ? format(endOfDay(this.searchDTO.dateRange[1]), 'yyyy-MM-dd HH:mm:ss') : undefined,
152
+        // orderBy: 'arrive_time desc',
153
+        // hosId: this.hosId,
154
+        // stype: this.searchCriteria.stype ? { id: this.searchCriteria.stype } : undefined,
155
+        // specimenDesc: this.searchCriteria.specimenDesc ? this.specimenDescList.find(v => v.id == this.searchCriteria.specimenDesc).name: undefined,
156
+      }
157
+    }
158
+    this.loading = true;
159
+    this.mainService.getFetchDataList('simple/data','hjzxRecord',postData).subscribe(data => {
160
+      this.loading = false;
161
+      this.messageList = data.list || [];
162
+      this.total = data.totalNum;
163
+    })
164
+  }
165
+}
302 166
 
303 167
 
304 168
 

+ 20 - 0
src/app/components/incidentManagement/incident-ser-message/incident-ser-message.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { IncidentSerMessageComponent } from './incident-ser-message.component';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+
7
+
8
+@NgModule({
9
+  declarations: [
10
+    IncidentSerMessageComponent,
11
+  ],
12
+  imports: [
13
+    CommonModule,
14
+    ShareModule,
15
+  ],
16
+  exports: [
17
+    IncidentSerMessageComponent,
18
+  ]
19
+})
20
+export class IncidentSerMessageModule { }

+ 4 - 1
src/app/views/fuwutai/fuwutai.component.html

@@ -1062,7 +1062,7 @@
1062 1062
         <div class="menuItems">
1063 1063
           <div class="others">
1064 1064
             <div class="item" (click)="visitOrder()">回访<span *ngIf="visitNum !== undefined">-{{visitNum}}</span></div>
1065
-            <div class="item">留言-10</div>
1065
+            <div class="item" (click)="messageOrder()">留言<span *ngIf="messageNum !== undefined">-{{messageNum}}</span></div>
1066 1066
             <div class="item itemLink">通话</div>
1067 1067
           </div>
1068 1068
         </div>
@@ -2433,3 +2433,6 @@
2433 2433
 
2434 2434
 <!-- 回访列表 -->
2435 2435
 <app-incident-ser-visit [itsmData]="itsmData" *ngIf="visitShow" (closeModelHs)="closeVisit($event)"></app-incident-ser-visit>
2436
+
2437
+<!-- 留言列表 -->
2438
+<app-incident-ser-message [itsmData]="itsmData" *ngIf="messageShow" (closeModelHs)="closeMessage($event)"></app-incident-ser-message>

+ 71 - 3
src/app/views/fuwutai/fuwutai.component.ts

@@ -734,6 +734,7 @@ export class FuwutaiComponent implements OnInit {
734 734
     this.getOrderList(2);
735 735
     this.getOrderList(3);
736 736
     this.getVisitList();
737
+    this.getMessageList();
737 738
     this.initControlView();
738 739
     this.moveMenu("fixedMenu");
739 740
     this.moveMenu("fixedMenuLeft");
@@ -1337,6 +1338,22 @@ export class FuwutaiComponent implements OnInit {
1337 1338
       });
1338 1339
   }
1339 1340
 
1341
+  // 获取留言列表
1342
+  messageNum:any;
1343
+  getMessageList(){
1344
+    let postData: any = {
1345
+      idx: 0,
1346
+      sum: 9999,
1347
+      hjzxRecord: {},
1348
+    };
1349
+
1350
+    this.mainService
1351
+      .getFetchDataList("simple/data", "hjzxRecord", postData)
1352
+      .subscribe((result) => {
1353
+        this.messageNum = result.totalNum;
1354
+      });
1355
+  }
1356
+
1340 1357
   // 获取三个状态数据数据
1341 1358
   loading1 = true;
1342 1359
   loading2 = true;
@@ -3805,6 +3822,7 @@ export class FuwutaiComponent implements OnInit {
3805 3822
       this.getOrderList(2);
3806 3823
       this.getOrderList(3);
3807 3824
       this.getVisitList();
3825
+      this.getMessageList();
3808 3826
       if (this.currentRTab === 0) {
3809 3827
         this.getWorkOrders(this.applyDept);
3810 3828
       } else if (this.currentRTab === 1) {
@@ -4187,13 +4205,63 @@ export class FuwutaiComponent implements OnInit {
4187 4205
     this.showPromptModalRefresh();
4188 4206
   }
4189 4207
 
4190
-  // 回访
4191
-  visitShow = false; //业务数据弹窗开关
4208
+  // 回访列表
4209
+  visitShow = false; //弹窗开关
4192 4210
   visitOrder() {
4193 4211
     this.visitShow = true;
4194 4212
   }
4195
-  // 关闭业务数据弹窗
4213
+  // 关闭弹窗
4196 4214
   closeVisit(e) {
4197 4215
     this.visitShow = JSON.parse(e).show;
4198 4216
   }
4217
+
4218
+  // 留言列表
4219
+  messageShow = false; //弹窗开关
4220
+  messageOrder() {
4221
+    this.messageShow = true;
4222
+  }
4223
+  // 关闭弹窗
4224
+  closeMessage(e) {
4225
+    this.messageShow = e.show;
4226
+    if(e.data){
4227
+      // 留言创建工单
4228
+      let postData = {
4229
+        idx: 0,
4230
+        sum: 10,
4231
+        department: {
4232
+          searchType: 2,
4233
+          phone: e.data.ano,
4234
+        },
4235
+      };
4236
+      this.mainService
4237
+        .getFetchDataList("data", "department", postData)
4238
+        .subscribe((result) => {
4239
+          if (result.status == 200) {
4240
+            console.log(result);
4241
+            if (result.list.length > 0) {
4242
+              //绑定了科室
4243
+              if (!this.newOrderShow && !this.newOrderShowOpen) {
4244
+                let incidentModel:any = {department: result.list[0]};
4245
+                let incidentMsg:any = {};
4246
+                incidentModel.department && (incidentMsg.deptManyPhone = incidentModel.department.manyPhone);
4247
+                incidentModel.department && (incidentMsg.deptName = incidentModel.department.dept);
4248
+                incidentModel.department && (incidentModel.department = incidentModel.department.id);
4249
+                // incidentModel.source && (incidentModel.source = incidentModel.source.id);
4250
+                // incidentModel.area && (incidentModel.area = incidentModel.area.id);
4251
+                // incidentModel.place && (incidentModel.place = incidentModel.place.id);
4252
+                this.incidentModel = incidentModel;
4253
+                this.incidentMsg = incidentMsg;
4254
+                console.log('this.applicationDeptList:', this.applicationDeptList)
4255
+                console.log('incidentModel:', incidentModel)
4256
+                this.showNewOrder('', '', true, '留言转事件');
4257
+              }
4258
+            } else {
4259
+              //没绑定科室
4260
+              console.log(this.newOrderShow);
4261
+              this.showNewOrder('', '', true, '留言转事件');
4262
+            }
4263
+          }
4264
+        });
4265
+    }
4266
+  }
4199 4267
 }

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

@@ -14,6 +14,7 @@ import { IncidentRejectModule } from 'src/app/components/incidentManagement/inci
14 14
 import { IncidentSubstitutionModule } from 'src/app/components/incidentManagement/incident-substitution/incident-substitution.module';
15 15
 import { IncidentHandleModule } from 'src/app/components/incidentManagement/incident-handle/incident-handle.module';
16 16
 import { IncidentSerVisitModule } from 'src/app/components/incidentManagement/incident-ser-visit/incident-ser-visit.module';
17
+import { IncidentSerMessageModule } from 'src/app/components/incidentManagement/incident-ser-message/incident-ser-message.module';
17 18
 
18 19
 
19 20
 @NgModule({
@@ -33,6 +34,7 @@ import { IncidentSerVisitModule } from 'src/app/components/incidentManagement/in
33 34
     IncidentSubstitutionModule,
34 35
     IncidentHandleModule,
35 36
     IncidentSerVisitModule,
37
+    IncidentSerMessageModule,
36 38
   ]
37 39
 })
38 40
 export class FuwutaiModule { }