Ver código fonte

白求恩标本优化

maotao 1 mês atrás
pai
commit
feb24957c4

+ 5 - 0
src/app/services/main.service.ts

@@ -1284,4 +1284,9 @@ export class MainService {
1284 1284
 	getLoginCode(data){
1285 1285
 		return this.http.get(host.host + "/auth/captcha", {});
1286 1286
 	}
1287
+	
1288
+	// 根据包号查看标本
1289
+	getInfoPack(packageId, data){
1290
+		return this.http.post(host.host + `/nurse/specimen/getInfo/${packageId}`, data);
1291
+	}
1287 1292
 }

+ 3 - 0
src/app/share/share.module.ts

@@ -74,6 +74,7 @@ import { InspectLogPromptModalComponent } from './inspect-log-prompt-modal/inspe
74 74
 import { UploadFileComponent } from './upload-file/upload-file.component';
75 75
 import { AddInspectTwoModalComponent } from './add-inspect-two-modal/add-inspect-two-modal.component';
76 76
 import { AddInspectThreeModalComponent } from './add-inspect-three-modal/add-inspect-three-modal.component';
77
+import { ViewSpecimenComponent } from './view-specimen/view-specimen.component';
77 78
 
78 79
 @NgModule({
79 80
   declarations: [
@@ -144,6 +145,7 @@ import { AddInspectThreeModalComponent } from './add-inspect-three-modal/add-ins
144 145
     AddInspectModalComponent,
145 146
     AddInspectTwoModalComponent,
146 147
     AddInspectThreeModalComponent,
148
+		ViewSpecimenComponent,
147 149
     SelectDateYytimeComponent,
148 150
     PackageSpecimenRuleComponent,
149 151
     SpecimenPackageListModalComponent,
@@ -229,6 +231,7 @@ import { AddInspectThreeModalComponent } from './add-inspect-three-modal/add-ins
229 231
     AddInspectModalComponent,
230 232
     AddInspectTwoModalComponent,
231 233
     AddInspectThreeModalComponent,
234
+		ViewSpecimenComponent,
232 235
     SelectDateYytimeComponent,
233 236
     PackageSpecimenRuleComponent,
234 237
     SpecimenPackageListModalComponent,

+ 5 - 1
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.html

@@ -34,7 +34,7 @@
34 34
         </thead>
35 35
         <tbody>
36 36
           <tr *ngFor="let data of packageList;let i = index;">
37
-            <td>{{ data.packCode }}</td>
37
+            <td class="underline" (click)="viewSpe(data)">{{ data.packCode }}</td>
38 38
             <td>{{ data.packUserDTO?.name }}</td>
39 39
             <td>{{ data.packTime | date: 'yyyy-MM-dd HH:mm'}}</td>
40 40
             <td>{{ data.specimenNum }}</td>
@@ -112,4 +112,8 @@
112 112
     </div>
113 113
   </div>
114 114
 </div>
115
+
116
+<!-- 查看标本 -->
117
+<app-view-specimen *ngIf="showModal" [speId]="speId" (closeModelHs)="closeModel($event)"></app-view-specimen>
118
+
115 119
 <button ngxPrint printSectionId="print-section-package" #printBtnPackage hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>

+ 6 - 1
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.less

@@ -173,7 +173,12 @@
173 173
           }
174 174
         }
175 175
       }
176
-
176
+			
177
+			.underline{
178
+				text-decoration: underline;
179
+				cursor: pointer;
180
+			}
181
+			
177 182
       div {
178 183
         text-align: center;
179 184
         margin: 0;

+ 14 - 1
src/app/share/specimen-package-list-modal/specimen-package-list-modal.component.ts

@@ -50,7 +50,20 @@ export class SpecimenPackageListModalComponent implements OnInit {
50 50
   getList(){
51 51
     this.getSpecimenPackageList();
52 52
   }
53
-
53
+	
54
+	// 关闭弹窗
55
+	closeModel(e){
56
+		this.showModal = false;
57
+	}
58
+	
59
+	// 查看标本
60
+	speId:any;
61
+	showModal:boolean = false;
62
+	viewSpe(data){
63
+		this.speId = data.id;
64
+		this.showModal = true;
65
+	}
66
+	
54 67
   // 获取状态
55 68
   specimentPackageTypeList: any[] = [];
56 69
   getStatusList() {

+ 104 - 0
src/app/share/view-specimen/view-specimen.component.html

@@ -0,0 +1,104 @@
1
+<div
2
+  class="modal display_flex justify-content_flex-center align-items_center"
3
+>
4
+  <div class="modalBody" style="width: 1200px;">
5
+    <div class="title">
6
+      标本查看<i
7
+        class="icon_transport transport-guanbi"
8
+        (click)="hideModal()"
9
+      ></i>
10
+    </div>
11
+		<div class="list-template">
12
+		  <div class="list-template__content">
13
+				<div class="list-template__top" nz-row>
14
+				  <div nz-col nzXl='18' class="list-template__searchBox">
15
+				    <div class="list-template__searchItem">
16
+				      <span class="label">患者</span>:
17
+				      <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="userId" nzShowSearch nzAllowClear nzPlaceHolder="请选择患者" (ngModelChange)="userChange($event)">
18
+				        <ng-container *ngFor="let data of userList">
19
+				          <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.patientNo">
20
+				          </nz-option>
21
+				        </ng-container>
22
+				      </nz-select>
23
+				    </div>
24
+				    <div class="list-template__searchItem">
25
+							<span class="label">试管类型</span>:
26
+							<nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [(ngModel)]="tubeTypeId" nzShowSearch nzAllowClear nzPlaceHolder="请选择试管类型" (ngModelChange)="tubeChange($event)">
27
+							  <ng-container *ngFor="let data of tubeList">
28
+							    <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.tubeTypeId">
29
+							    </nz-option>
30
+							  </ng-container>
31
+							</nz-select>
32
+				    </div>
33
+				  </div>
34
+				  <div nz-col nzXl='6' class="list-template__btns">
35
+						<button nz-button class="btn default" (click)="reset()">重置</button>
36
+				  </div>
37
+				</div>
38
+		  </div>
39
+		</div>
40
+    <div class="content">
41
+      <nz-table
42
+        class="hospitalTable"
43
+        [nzData]="historySpecimenList"
44
+        nzSize="middle"
45
+        [nzShowPagination]="false"
46
+        [nzLoading]="hsLoading"
47
+				[nzScroll]="{ y: '500px' }"
48
+      >
49
+        <thead>
50
+          <tr class="thead">
51
+            <th nzWidth="16%">科室信息</th>
52
+            <th nzWidth="16%">患者信息</th>
53
+            <th nzWidth="16%">标本信息</th>
54
+            <th nzWidth="16%">采集信息</th>
55
+            <th nzWidth="16%">标本类型</th>
56
+						<th nzWidth="16%">状态</th>
57
+          </tr>
58
+        </thead>
59
+        <tbody>
60
+          <tr *ngFor="let data of historySpecimenList; let i = index">
61
+            <td>
62
+							<div>{{ data.sickRoom?.dept }}</div>
63
+							<div>{{ data.checkDept?.dept }}</div>
64
+						</td>
65
+            <td>
66
+							<div>{{ data.residenceNo?data.residenceNo:data.patientNo }}</div>
67
+							<div>{{ data.patientName}} <span *ngIf="data.bedNum">({{data.bedNum}})</span></div>
68
+						</td>
69
+            <td>
70
+              <div>{{ data.scode }}</div>
71
+              <div>{{ data.specimenDesc}}</div>
72
+            </td>
73
+						<td>
74
+						  <div>{{ data.collectNurseName }}</div>
75
+						  <div>{{ data.printDate | date: "MM-dd HH:mm:ss"}}</div>
76
+						</td>
77
+            <td>
78
+              <div>{{ data.stype?.name }}</div>
79
+              <div>{{ data.tubeType?.name }}</div>
80
+            </td>
81
+						<td>
82
+						  {{ data.speState?.name }}
83
+						</td>
84
+          </tr>
85
+        </tbody>
86
+      </nz-table>
87
+      <div class="pagination">
88
+        <nz-pagination
89
+          [(nzPageIndex)]="historySpecimenPageIndex"
90
+          [(nzTotal)]="historySpecimenListLength"
91
+          [(nzPageSize)]="historySpecimenPageSize"
92
+          (nzPageIndexChange)="getHistorySpecimen()"
93
+          (nzPageSizeChange)="getHistorySpecimen()"
94
+        >
95
+        </nz-pagination>
96
+      </div>
97
+    </div>
98
+    <div class="display_flex justify-content_flex-center">
99
+      <button class="btn know" nz-button nzType="primary" (click)="hideModal()">
100
+        知道了
101
+      </button>
102
+    </div>
103
+  </div>
104
+</div>

+ 177 - 0
src/app/share/view-specimen/view-specimen.component.less

@@ -0,0 +1,177 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+    }
15
+    .thead {
16
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
17
+      th {
18
+        text-align: center !important;
19
+        color: #fff;
20
+        background: transparent;
21
+      }
22
+    }
23
+  }
24
+
25
+  .modalBody {
26
+   min-height: 760px;
27
+   width: 700px;
28
+	 padding: 10px 20px;
29
+   background: #fff;
30
+   border-radius: 5px;
31
+   color: #333;
32
+   position: relative;
33
+   &.modalBody-search {
34
+     width: 480px;
35
+     min-height: 250px;
36
+   }
37
+
38
+    .title {
39
+      width: 100%;
40
+      text-align: center;
41
+      font-size: 18px;
42
+      position: relative;
43
+
44
+      i {
45
+        position: absolute;
46
+        right: 0;
47
+        top: 0;
48
+        font-size: 20px;
49
+        color: #666;
50
+        cursor: pointer;
51
+        padding: 0 5px;
52
+      }
53
+    }
54
+		
55
+    .content {
56
+      min-height: 117px;
57
+      background: #f9fafb;
58
+      border: 1px solid #e5e9ed;
59
+      border-radius: 5px;
60
+      overflow: hidden;
61
+      margin-top: 12px;
62
+      display: flex;
63
+      flex-direction: column;
64
+      justify-content: center;
65
+      align-items: center;
66
+      &.content-search {
67
+        min-height: 147px;
68
+        justify-content: start;
69
+        .defeat-search {
70
+          width: 100%;
71
+          height: 52px;
72
+          display: flex;
73
+          justify-content: center;
74
+          align-items: center;
75
+          border-bottom: solid 1px #e5e9ed;
76
+          em {
77
+            color: #666;
78
+            font-style: normal;
79
+          }
80
+        }
81
+        .form {
82
+          width: 100%;
83
+          padding: 0 16px;
84
+          .ant-form-item-label,
85
+          .ant-form-explain {
86
+            text-align: left !important;
87
+          }
88
+        }
89
+      }
90
+
91
+      div {
92
+        text-align: center;
93
+        margin: 0;
94
+
95
+        &.defeat {
96
+          color: #333;
97
+          font-size: 28px;
98
+        }
99
+        &.countDown {
100
+          font-size: 14px;
101
+          color: 666;
102
+          em {
103
+            font-style: normal;
104
+            color: @primary-color;
105
+          }
106
+        }
107
+				
108
+				&.pagination {
109
+				  font-size: 14px;
110
+				  color: #666;
111
+				  padding-top: 16px;
112
+				  padding-bottom: 16px;
113
+				  margin-left: auto;
114
+				  margin-right: 16px;
115
+				}
116
+				
117
+        &:nth-child(3) {
118
+          font-size: 14px;
119
+          color: #666;
120
+          padding-bottom: 10px;
121
+        }
122
+      }
123
+    }
124
+
125
+    button {
126
+      margin-top: 10px;
127
+
128
+      &.btn {
129
+        margin-left: 8px;
130
+      }
131
+    }
132
+		.know{
133
+			position: absolute;
134
+			bottom: 20px;
135
+		}
136
+  }
137
+
138
+  // 新增
139
+  &.add {
140
+    .modalBody {
141
+      width: 480px;
142
+      height: auto;
143
+
144
+      .content {
145
+        width: 100%;
146
+        height: auto;
147
+        padding: 18px 14px 0 14px;
148
+
149
+        .addForm {
150
+          .ant-form-item {
151
+            margin-bottom: 15px;
152
+
153
+            .ant-form-item-label {
154
+              line-height: 0;
155
+            }
156
+          }
157
+        }
158
+
159
+        .editForm {
160
+          .ant-form-item {
161
+            margin-bottom: 15px;
162
+
163
+            .ant-form-item-label {
164
+              line-height: 0;
165
+            }
166
+          }
167
+        }
168
+      }
169
+
170
+      button {
171
+        &:nth-child(1) {
172
+          margin-right: 20px;
173
+        }
174
+      }
175
+    }
176
+  }
177
+}

+ 101 - 0
src/app/share/view-specimen/view-specimen.component.ts

@@ -0,0 +1,101 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
2
+import { MainService } from "../../services/main.service";
3
+import { ToolService } from "src/app/services/tool.service";
4
+import { Subject } from "rxjs";
5
+import { debounceTime } from "rxjs/operators";
6
+
7
+@Component({
8
+  selector: "app-view-specimen",
9
+  templateUrl: "./view-specimen.component.html",
10
+  styleUrls: ["./view-specimen.component.less"],
11
+})
12
+export class ViewSpecimenComponent implements OnInit {
13
+  hosId;
14
+  // 切换科室,切换弹窗
15
+  hsLoading = false;
16
+  historySpecimenList: any = [];
17
+  historySpecimenPageIndex: number = 1; //表格当前页码
18
+  historySpecimenPageSize: number = 10; //表格每页展示条数
19
+  historySpecimenListLength: number = 10; //表格总数据量
20
+	changeInpSubject = new Subject(); //防抖
21
+	userId:any = 0;
22
+	tubeTypeId:any = 0;
23
+	
24
+  @Input() speId: String;
25
+
26
+  @Output() closeModelHs = new EventEmitter<any>(); //1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
27
+
28
+  constructor(private mainService: MainService, private tool: ToolService) {}
29
+
30
+  ngOnInit() {
31
+    this.hosId = this.tool.getCurrentHospital().id;
32
+    this.getHistorySpecimen();
33
+  }
34
+  // 关闭弹窗
35
+  hideModal() {
36
+    this.closeModelHs.emit(JSON.stringify({ show: false })); //emits(向上弹射)事件
37
+  }
38
+	
39
+	// 重置
40
+	reset(){
41
+		this.userId = 0
42
+		this.tubeTypeId = 0
43
+		this.getHistorySpecimen(true)
44
+	}
45
+	
46
+	// 选择患者
47
+	userChange(e){
48
+		this.getHistorySpecimen(true)
49
+	}
50
+	
51
+	// 选择试管类型
52
+	tubeChange(e){
53
+		this.getHistorySpecimen(true)
54
+	}
55
+	
56
+  // 获取列表数据
57
+	userList:any = [];
58
+	tubeList:any = [];
59
+  getHistorySpecimen(idx?) {
60
+    if (idx) {
61
+      this.historySpecimenPageIndex = 1;
62
+    }
63
+    let postData = {
64
+      idx: this.historySpecimenPageIndex - 1,
65
+      sum: this.historySpecimenPageSize,
66
+			patientNo: this.userId!=0 ? this.userId : undefined,
67
+			tubeTypeId: this.tubeTypeId!=0 ? this.tubeTypeId: undefined
68
+    };
69
+    this.hsLoading = true;
70
+    this.mainService
71
+      .getInfoPack(this.speId, postData)
72
+      .subscribe((data:any) => {
73
+        this.hsLoading = false;
74
+        this.historySpecimenList = data.specimen || [];
75
+				data.patient.forEach(i=>{
76
+					if(i.bedNum){
77
+						i.name = i.patientName + '-' + i.bedNum + '-' + i.patientNo
78
+					}else{
79
+						i.name = i.patientName + '-' + i.patientNo
80
+					}
81
+				})
82
+				data.patient.unshift({
83
+					name: '全部',
84
+					patientName:'',
85
+					patientNo: 0,
86
+				})
87
+				this.userList = data.patient || [];
88
+				data.tubeType.forEach(i=>{
89
+					i.name = i.tubeTypeName +'('+ i.specimenNum +')'
90
+				})
91
+				data.tubeType.unshift({
92
+					name: '全部',
93
+					tubeTypeName: '',
94
+					specimenNum: '',
95
+					tubeTypeId: 0
96
+				})
97
+				this.tubeList = data.tubeType || [];
98
+        this.historySpecimenListLength = data.totalNum || 0;
99
+      });
100
+  }
101
+}

+ 9 - 1
src/app/views/batch-specimen/batch-specimen.component.html

@@ -4,7 +4,8 @@
4 4
   </div>
5 5
   <input class="specimenCode" #specimenCodeElement nz-input placeholder="可扫描标本条码快速添加" [(ngModel)]="specimenCode" (input)="inputChange($event)" />
6 6
   <div class="display_flex align-items_center">
7
-    <button nz-button class="btn default" (click)="showDelModal({}, '您确认要重置标本吗,重置会先清空标本在根据规则自动清点?','重置标本','reset')">重置标本</button>
7
+		<button nz-button class="btn default" (click)="batchDel()">批量移除</button>
8
+    <button nz-button class="btn default ml8" (click)="showDelModal({}, '您确认要重置标本吗,重置会先清空标本在根据规则自动清点?','重置标本','reset')">重置标本</button>
8 9
     <button nz-button nzType="default" class="ml8" *ngIf="configs.spePackageAutoPack == 1" (click)='showPackageSpecimenRule()'>自动清点规则</button>
9 10
   </div>
10 11
 </div>
@@ -27,6 +28,8 @@
27 28
   <nz-table class="list-template__nzTable filter_table" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false" [nzLoading]="loading1">
28 29
     <thead>
29 30
       <tr class="thead">
31
+				<th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
32
+				  (nzCheckedChange)="checkAll($event)"></th>
30 33
         <th nzWidth="11%">患者姓名</th>
31 34
         <th nzWidth="11%">住院号</th>
32 35
         <th nzWidth="11%">标本条码</th>
@@ -40,6 +43,7 @@
40 43
     </thead>
41 44
     <tbody>
42 45
       <tr *ngFor="let data of listOfData">
46
+				<td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
43 47
         <td>{{ data.patientName }}<span *ngIf="data.bedNum">({{ data.bedNum }})</span></td>
44 48
         <td>{{ data.residenceNo }}</td>
45 49
         <td>{{ data.scode }}</td>
@@ -57,6 +61,10 @@
57 61
     </tbody>
58 62
   </nz-table>
59 63
 </div>
64
+<div class="bottom-content">
65
+	<span class="mal-50">包号:{{package.packCode}}</span>
66
+	<span>状态:{{package.status?.name}}</span>
67
+</div>
60 68
 <div class="footer display_flex align-items_center justify-content_flex-center">
61 69
   <button nzType="primary" class="btn" nz-button (click)='packageHandler()' *ngIf="this.total > 0 && package.status.value === '0'">打包</button>
62 70
   <button nzType="primary" class="btn" nz-button (click)='printPackage()' *ngIf="this.total > 0 && package.status.value === '1'">补打</button>

+ 7 - 0
src/app/views/batch-specimen/batch-specimen.component.less

@@ -186,6 +186,13 @@
186 186
       }
187 187
     }
188 188
   }
189
+	.bottom-content{
190
+		padding-left: 200px;
191
+		background: #fff;
192
+		.mal-50{
193
+			margin-right: 50px;
194
+		}
195
+	}
189 196
   .footer{
190 197
     height: 60px;
191 198
     background-color: #fff;

+ 57 - 5
src/app/views/batch-specimen/batch-specimen.component.ts

@@ -116,7 +116,49 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
116 116
         }
117 117
       })
118 118
   }
119
-
119
+	
120
+	// 批量移除
121
+	infoContent:any;
122
+	batchDel(){
123
+		if(this.checkedDepIds.length==0){
124
+			this.message.error('请勾选标本列表')
125
+			return
126
+		}
127
+		this.confirmDelType = 'batchDel';
128
+		this.tipsMsg1 = `您确认要移除${this.checkedDepIds.length}项标本吗?`
129
+		this.delModal = true;
130
+	}
131
+	
132
+	// 选中表格中科室
133
+	mapOfCheckedId: { [key: string]: boolean } = {};
134
+	checkedDepIds = []; //已选中科室id
135
+	refreshStatus(): void {
136
+	  this.isAllDisplayDataChecked = this.listOfData.every(
137
+	    (item) => this.mapOfCheckedId[item.id]
138
+	  );
139
+	  let arr = [];
140
+	  for (var k in this.mapOfCheckedId) {
141
+	    if (this.mapOfCheckedId[k]) {
142
+	      arr.push(Number(k));
143
+	    }
144
+	  }
145
+	  this.checkedDepIds = arr;
146
+	  console.log(this.checkedDepIds);
147
+	}
148
+	
149
+	//表格整行选中
150
+	selectedListData(id) {
151
+	  this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
152
+	  this.refreshStatus();
153
+	}
154
+	
155
+	// 全选
156
+	isAllDisplayDataChecked = false; //当前页是否全选
157
+	checkAll(value: boolean): void {
158
+	  this.listOfData.forEach((item) => (this.mapOfCheckedId[item.id] = value));
159
+	  this.refreshStatus();
160
+	}
161
+	
120 162
   inspectActiveList: any = [];//选中检查列表
121 163
   patientActiveList: any = [];//选中患者列表
122 164
 
@@ -148,10 +190,10 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
148 190
   confirmDel(e) {
149 191
     console.log(e)
150 192
     this.btnLoading = true;
151
-    if (this.confirmDelType === "del") {
193
+    if (this.confirmDelType === "del" || this.confirmDelType ==='batchDel') {
152 194
       //删除-移除标本
153 195
       let postData = {
154
-        speIds: this.coopData.id.toString(),
196
+        speIds: this.confirmDelType === "del" ? this.coopData.id.toString() : this.checkedDepIds.toString(),
155 197
         packageId: this.package.id,
156 198
       }
157 199
 
@@ -161,9 +203,9 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
161 203
           this.btnLoading = false;
162 204
           this.delModal = false;
163 205
           if (data.state == 200) {
164
-            this.showPromptModal(this.tipsMsg2, true, "");
206
+            this.showPromptModal('移除', true, "");
165 207
           } else {
166
-            this.showPromptModal(this.tipsMsg2, false, data.msg);
208
+            this.showPromptModal('移除', false, data.msg);
167 209
           }
168 210
         });
169 211
     }else if (this.confirmDelType === "reset") {
@@ -204,6 +246,10 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
204 246
           }
205 247
         });
206 248
     }
249
+		if(this.listOfData.length){
250
+			this.listOfData.forEach(item => (this.mapOfCheckedId[item.id] = false));
251
+			this.refreshStatus();
252
+		}
207 253
   }
208 254
 
209 255
   // 打印
@@ -289,6 +335,12 @@ export class BatchSpecimenComponent implements OnInit, AfterViewInit {
289 335
         this.loading1 = false;
290 336
         if (data.status == 200) {
291 337
           this.listOfData = data.list;
338
+					// if(this.confirmDelType ==='batchDel'){
339
+					// 	this.listOfData.forEach(item => (this.mapOfCheckedId[item.id] = false));
340
+					// 	setTimeout(_=>{
341
+					// 		this.refreshStatus();
342
+					// 	})
343
+					// }
292 344
         }else{
293 345
           this.message.error(data.msg || "请求数据失败");
294 346
         }

+ 157 - 105
src/app/views/fuwutai/fuwutai.component.ts

@@ -2834,7 +2834,7 @@ export class FuwutaiComponent implements OnInit {
2834 2834
     this.applicationRequesterList = [];
2835 2835
     this.fileList = [];
2836 2836
     this.repairImgs = [];
2837
-    this.isRelatedDepartment = true;
2837
+    this.isRelatedDepartment = false;
2838 2838
     this.solutionId = undefined;
2839 2839
     delete this.incidentMsg.requesterPhone;
2840 2840
   }
@@ -2845,7 +2845,7 @@ export class FuwutaiComponent implements OnInit {
2845 2845
     if(this.incidentModel.repairIncidentType === 'public'){
2846 2846
       this.isRelatedDepartment = false;
2847 2847
     }else{
2848
-      this.isRelatedDepartment = true;
2848
+      this.isRelatedDepartment = false;
2849 2849
     }
2850 2850
   }
2851 2851
 	
@@ -3095,6 +3095,9 @@ export class FuwutaiComponent implements OnInit {
3095 3095
 		if(this.buildType !== '报修转事件'){
3096 3096
 			this.incidentModel.requester = null;
3097 3097
 		}
3098
+		if(this.buildType == '编辑事件' && this.editOrder.requester){
3099
+			this.incidentModel.requester = this.editOrder.requester.id;
3100
+		}
3098 3101
     this.radioValueQt = null;
3099 3102
     this.startDeptQt = null;
3100 3103
     this.endDeptQt = null;
@@ -3582,7 +3585,7 @@ export class FuwutaiComponent implements OnInit {
3582 3585
   }
3583 3586
   // 申请人列表(搜索)
3584 3587
   applicationRequesterList:any[] = [];
3585
-  isRelatedDepartment:boolean = true;
3588
+  isRelatedDepartment:boolean = false;
3586 3589
   searchApplicationRequester(keyWord?) {
3587 3590
     // 关联查询,且没选择申请科室
3588 3591
     if(this.isRelatedDepartment && !this.incidentModel.department){
@@ -3611,48 +3614,70 @@ export class FuwutaiComponent implements OnInit {
3611 3614
       .subscribe((data) => {
3612 3615
         this.isLoading = false;
3613 3616
         if (data.status == 200) {
3614
-          this.applicationRequesterList = data.list;
3617
+					if(this.buildType == '编辑事件' && this.editOrder.requester){
3618
+					  let item = data.list.find(i=> i.id == this.editOrder.requester.id)
3619
+					  if(!item){
3620
+					  	data.list.push({
3621
+					  		name: this.editOrder.requester.name,
3622
+					  		account: this.editOrder.requester.account,
3623
+					  		id: this.editOrder.requester.id
3624
+					  	})
3625
+					  }
3626
+						this.applicationRequesterList = data.list;
3627
+					}else{
3628
+						this.applicationRequesterList = data.list;
3629
+					}
3615 3630
         }
3616 3631
       });
3617 3632
   }
3618 3633
   // 修改申请人
3619 3634
 	userPriorityDTO:any;
3620 3635
   changeApplyRequester(e){
3621
-    let userObj = this.applicationRequesterList.find(v => v.id == e);
3622
-		console.log('选中的申请人',userObj)
3623
-    // 选择申请人回显申请人电话
3624
-    if(userObj){
3625
-      this.incidentMsg.requesterPhone = userObj.phone;
3626
-    }
3627
-		if(userObj && userObj.priorityDTO){
3628
-			this.userPriorityDTO = userObj.priorityDTO
3629
-		}else{
3630
-			this.userPriorityDTO = null
3631
-		}
3632
-		let orders = [];
3633
-		let id = [];
3634
-		if(this.addressDTO&&this.addressDTO.id){
3635
-			orders.push(this.addressDTO.orders)
3636
-			id.push(this.addressDTO.id)
3637
-		}
3638
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3639
-			orders.push(this.deptPriorityDTO.orders)
3640
-			id.push(this.deptPriorityDTO.id)
3641
-		}
3642
-		if(this.userPriorityDTO&&this.userPriorityDTO.id){
3643
-			orders.push(this.userPriorityDTO.orders)
3644
-			id.push(this.userPriorityDTO.id)
3645
-		}
3646
-		if(this.malPriorityDTO&&this.malPriorityDTO.id){
3647
-			orders.push(this.malPriorityDTO.orders)
3648
-			id.push(this.malPriorityDTO.id)
3636
+		if(this.buildType !== '编辑事件'){
3637
+			let userObj = this.applicationRequesterList.find(v => v.id == e);
3638
+			console.log('选中的申请人',userObj)
3639
+			// 选择申请人回显申请人电话
3640
+			if(userObj){
3641
+			  this.incidentMsg.requesterPhone = userObj.phone;
3642
+			}
3643
+			if(userObj && userObj.priorityDTO){
3644
+				this.userPriorityDTO = userObj.priorityDTO
3645
+			}else{
3646
+				this.userPriorityDTO = null
3647
+			}
3648
+			let orders = [];
3649
+			let id = [];
3650
+			if(this.addressDTO&&this.addressDTO.id){
3651
+				orders.push(this.addressDTO.orders)
3652
+				id.push(this.addressDTO.id)
3653
+			}
3654
+			if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
3655
+				orders.push(this.deptPriorityDTO.orders)
3656
+				id.push(this.deptPriorityDTO.id)
3657
+			}
3658
+			if(this.userPriorityDTO&&this.userPriorityDTO.id){
3659
+				orders.push(this.userPriorityDTO.orders)
3660
+				id.push(this.userPriorityDTO.id)
3661
+			}
3662
+			if(this.malPriorityDTO&&this.malPriorityDTO.id){
3663
+				orders.push(this.malPriorityDTO.orders)
3664
+				id.push(this.malPriorityDTO.id)
3665
+			}
3666
+			if(orders.length>0){
3667
+				let minNumber = Math.min(...orders)
3668
+				let index = orders.indexOf(minNumber)
3669
+				console.log('最小值的orders', orders, minNumber)
3670
+				setTimeout(_=>{
3671
+					if(index!=-1){
3672
+						this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3673
+					}else{
3674
+						this.incidentModel.priorityId = null
3675
+					}
3676
+				})
3677
+			}else{
3678
+				this.incidentModel.priorityId = null
3679
+			}
3649 3680
 		}
3650
-		let minNumber = Math.min(...orders)
3651
-		let index = orders.indexOf(minNumber) 
3652
-		console.log('最小值的orders', orders, minNumber)
3653
-		setTimeout(_=>{
3654
-			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3655
-		})
3656 3681
 		if(this.incidentModel.repairIncidentType === 'public'){
3657 3682
 			this.getItsmOrders('')
3658 3683
 			if(this.cmdbRepair){
@@ -3757,8 +3782,14 @@ export class FuwutaiComponent implements OnInit {
3757 3782
 							let index = orders.indexOf(minNumber)
3758 3783
 							console.log('最小值的orders', orders, minNumber)
3759 3784
 							setTimeout(_=>{
3760
-								this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3785
+								if(index!=-1){
3786
+									this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
3787
+								}else{
3788
+									this.incidentModel.priorityId = null
3789
+								}
3761 3790
 							})
3791
+						}else{
3792
+							this.incidentModel.priorityId = null
3762 3793
 						}
3763 3794
 
3764 3795
             // 根据院区和故障现象带出责任部门,优先级,维修人/组
@@ -4091,7 +4122,7 @@ export class FuwutaiComponent implements OnInit {
4091 4122
 		// this.incidentModel.department = undefined;
4092 4123
     this.incidentMsg.deptManyPhone = '';
4093 4124
 		this.incidentModel.requester = null;
4094
-    this.isRelatedDepartment = value !== 'public';
4125
+    // this.isRelatedDepartment = value !== 'public';
4095 4126
     this.changeApplyRelatedDepartment(this.isRelatedDepartment);
4096 4127
 		this.rightTitleHandler(2);
4097 4128
   }
@@ -4289,41 +4320,51 @@ export class FuwutaiComponent implements OnInit {
4289 4320
   // 运维-选择科室
4290 4321
   changeApplyDept(e) {
4291 4322
     console.log(e, this.applicationDeptList);
4292
-		let item = this.applicationDeptList.find(i=>i.id == e)
4293
-		console.log('选中的科室11111',item);
4294
-		if(item && item.priorityDTO){
4295
-			this.addressDTO = null;
4296
-			this.userPriorityDTO = null;
4297
-			this.deptPriorityDTO = item.priorityDTO
4298
-		}else{
4299
-			this.addressDTO = null;
4300
-			this.userPriorityDTO = null;
4301
-			this.deptPriorityDTO = null
4302
-		}
4303
-		let orders = [];
4304
-		let id = [];
4305
-		if(this.addressDTO&&this.addressDTO.id){
4306
-			orders.push(this.addressDTO.orders)
4307
-			id.push(this.addressDTO.id)
4308
-		}
4309
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
4310
-			orders.push(this.deptPriorityDTO.orders)
4311
-			id.push(this.deptPriorityDTO.id)
4312
-		}
4313
-		if(this.userPriorityDTO&&this.userPriorityDTO.id){
4314
-			orders.push(this.userPriorityDTO.orders)
4315
-			id.push(this.userPriorityDTO.id)
4316
-		}
4317
-		if(this.malPriorityDTO&&this.malPriorityDTO.id){
4318
-			orders.push(this.malPriorityDTO.orders)
4319
-			id.push(this.malPriorityDTO.id)
4323
+		if(this.buildType !== '编辑事件'){
4324
+			let item = this.applicationDeptList.find(i=>i.id == e)
4325
+			console.log('选中的科室11111',item);
4326
+			if(item && item.priorityDTO){
4327
+				this.addressDTO = null;
4328
+				this.userPriorityDTO = null;
4329
+				this.deptPriorityDTO = item.priorityDTO
4330
+			}else{
4331
+				this.addressDTO = null;
4332
+				this.userPriorityDTO = null;
4333
+				this.deptPriorityDTO = null
4334
+			}
4335
+			let orders = [];
4336
+			let id = [];
4337
+			if(this.addressDTO&&this.addressDTO.id){
4338
+				orders.push(this.addressDTO.orders)
4339
+				id.push(this.addressDTO.id)
4340
+			}
4341
+			if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
4342
+				orders.push(this.deptPriorityDTO.orders)
4343
+				id.push(this.deptPriorityDTO.id)
4344
+			}
4345
+			if(this.userPriorityDTO&&this.userPriorityDTO.id){
4346
+				orders.push(this.userPriorityDTO.orders)
4347
+				id.push(this.userPriorityDTO.id)
4348
+			}
4349
+			if(this.malPriorityDTO&&this.malPriorityDTO.id){
4350
+				orders.push(this.malPriorityDTO.orders)
4351
+				id.push(this.malPriorityDTO.id)
4352
+			}
4353
+			if(orders.length>0){
4354
+				let minNumber = Math.min(...orders)
4355
+				let index = orders.indexOf(minNumber)
4356
+				console.log('最小值的orders', orders, minNumber)
4357
+				setTimeout(_=>{
4358
+					if(index!=-1){
4359
+						this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
4360
+					}else{
4361
+						this.incidentModel.priorityId = null
4362
+					}
4363
+				})
4364
+			}else{
4365
+				this.incidentModel.priorityId = null
4366
+			}
4320 4367
 		}
4321
-		let minNumber = Math.min(...orders)
4322
-		let index = orders.indexOf(minNumber) 
4323
-		console.log('最小值的orders', index)
4324
-		setTimeout(_=>{
4325
-			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
4326
-		})
4327 4368
     if(this.incidentModel.department && this.currentTabIndex === '故障报修'){
4328 4369
       this.rightTitle_tab = [
4329 4370
         { id: 2, name: '近期维修' },
@@ -6871,7 +6912,7 @@ export class FuwutaiComponent implements OnInit {
6871 6912
     incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
6872 6913
     incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
6873 6914
     incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
6874
-    if(incidentModel.repairIncidentType){
6915
+		if(incidentModel.repairIncidentType){
6875 6916
       incidentModel.repairIncidentType = incidentModel.repairIncidentType.value
6876 6917
       this.changeRepairIncidentType(incidentModel.repairIncidentType);
6877 6918
     }
@@ -6885,6 +6926,7 @@ export class FuwutaiComponent implements OnInit {
6885 6926
     console.log('this.applicationRequesterList:', this.applicationRequesterList)
6886 6927
     console.log('this.applicationDeptList:', this.applicationDeptList)
6887 6928
     console.log('incidentModel:', incidentModel)
6929
+		this.searchApplicationRequester();
6888 6930
     this.showNewOrder(1, '', '', true, '编辑事件');
6889 6931
 
6890 6932
     // 查询报修图片
@@ -7132,37 +7174,47 @@ export class FuwutaiComponent implements OnInit {
7132 7174
   // 选择地址
7133 7175
 	addressDTO:any;
7134 7176
   selectAddress(name, idx){
7135
-		let item = this.addressList.find(i=>i.id == idx)
7136
-		console.log('选中的地址11111',item);
7137
-		if(item && item.priority){
7138
-			this.addressDTO = item.priority
7139
-		}else{
7140
-			this.addressDTO = null
7141
-		}
7142
-		let orders = [];
7143
-		let id = [];
7144
-		if(this.addressDTO&&this.addressDTO.id){
7145
-			orders.push(this.addressDTO.orders)
7146
-			id.push(this.addressDTO.id)
7147
-		}
7148
-		if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
7149
-			orders.push(this.deptPriorityDTO.orders)
7150
-			id.push(this.deptPriorityDTO.id)
7151
-		}
7152
-		if(this.userPriorityDTO&&this.userPriorityDTO.id){
7153
-			orders.push(this.userPriorityDTO.orders)
7154
-			id.push(this.userPriorityDTO.id)
7155
-		}
7156
-		if(this.malPriorityDTO&&this.malPriorityDTO.id){
7157
-			orders.push(this.malPriorityDTO.orders)
7158
-			id.push(this.malPriorityDTO.id)
7177
+		if(this.buildType !== '编辑事件'){
7178
+			let item = this.addressList.find(i=>i.id == idx)
7179
+			console.log('选中的地址11111',item);
7180
+			if(item && item.priority){
7181
+				this.addressDTO = item.priority
7182
+			}else{
7183
+				this.addressDTO = null
7184
+			}
7185
+			let orders = [];
7186
+			let id = [];
7187
+			if(this.addressDTO&&this.addressDTO.id){
7188
+				orders.push(this.addressDTO.orders)
7189
+				id.push(this.addressDTO.id)
7190
+			}
7191
+			if(this.deptPriorityDTO&&this.deptPriorityDTO.id){
7192
+				orders.push(this.deptPriorityDTO.orders)
7193
+				id.push(this.deptPriorityDTO.id)
7194
+			}
7195
+			if(this.userPriorityDTO&&this.userPriorityDTO.id){
7196
+				orders.push(this.userPriorityDTO.orders)
7197
+				id.push(this.userPriorityDTO.id)
7198
+			}
7199
+			if(this.malPriorityDTO&&this.malPriorityDTO.id){
7200
+				orders.push(this.malPriorityDTO.orders)
7201
+				id.push(this.malPriorityDTO.id)
7202
+			}
7203
+			if(orders.length>0){
7204
+				let minNumber = Math.min(...orders)
7205
+				let index = orders.indexOf(minNumber)
7206
+				console.log('最小值的orders', orders, minNumber)
7207
+				setTimeout(_=>{
7208
+					if(index!=-1){
7209
+						this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
7210
+					}else{
7211
+						this.incidentModel.priorityId = null
7212
+					}
7213
+				})
7214
+			}else{
7215
+				this.incidentModel.priorityId = null
7216
+			}
7159 7217
 		}
7160
-		let minNumber = Math.min(...orders)
7161
-		let index = orders.indexOf(minNumber) 
7162
-		console.log('最小值的orders', orders, minNumber)
7163
-		setTimeout(_=>{
7164
-			this.incidentModel.priorityId = minNumber != Infinity ? id[index] : null
7165
-		})
7166 7218
     this.incidentModel.houseNumber = name;
7167 7219
     this.isShowAddressList = false;
7168 7220
   }

+ 1 - 1
src/app/views/office-management/office-management.component.html

@@ -170,7 +170,7 @@
170 170
 					  <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="priority">优先级</nz-form-label>
171 171
 					  <nz-form-control nzErrorTip="请选择优先级!">
172 172
 					    <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="priority" nzShowSearch
173
-					    nzPlaceHolder="请选择优先级" nzServerSearch>
173
+					    nzPlaceHolder="请选择优先级" nzAllowClear nzServerSearch>
174 174
 					      <ng-container *ngFor="let option of priority_c_List">
175 175
 					        <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
176 176
 					      </ng-container>

+ 4 - 1
src/app/views/specimen-package/specimen-package.component.html

@@ -64,7 +64,7 @@
64 64
         </thead>
65 65
         <tbody>
66 66
           <tr *ngFor="let data of listOfData;let i = index">
67
-            <td>{{data.packCode}}</td>
67
+            <td class="underline" (click)="viewSpe(data)">{{data.packCode}}</td>
68 68
             <td>{{ data.packUserDTO?.name }}<br>{{ data.packTime | date: 'yyyy-MM-dd HH:mm'}}</td>
69 69
             <td>{{data.packDeptDTO?.dept}}</td>
70 70
             <td>{{ data.endDeptNames }}</td>
@@ -109,3 +109,6 @@
109 109
 
110 110
 <!-- 查看详情 -->
111 111
 <router-outlet></router-outlet>
112
+
113
+<!-- 查看标本 -->
114
+<app-view-specimen *ngIf="showModal" [speId]="speId" (closeModelHs)="closeModel($event)"></app-view-specimen>

+ 6 - 0
src/app/views/specimen-package/specimen-package.component.less

@@ -8,6 +8,12 @@
8 8
     }
9 9
   }
10 10
 }
11
+
12
+.underline{
13
+	text-decoration: underline;
14
+	cursor: pointer;
15
+}
16
+
11 17
 .save {
12 18
   position: fixed;
13 19
   left: 0;

+ 14 - 1
src/app/views/specimen-package/specimen-package.component.ts

@@ -141,7 +141,20 @@ export class SpecimenPackageComponent implements OnInit {
141 141
       this.searchTimer(this.getDeliveryUserList, e);
142 142
     }
143 143
   }
144
-
144
+	
145
+	// 关闭弹窗
146
+	closeModel(e){
147
+		this.showModal = JSON.parse(e).show;
148
+	}
149
+	
150
+	// 查看标本
151
+	speId:any;
152
+	showModal:boolean = false;
153
+	viewSpe(data){
154
+		this.speId = data.id;
155
+		this.showModal = true;
156
+	}
157
+	
145 158
   // 设置标志
146 159
   setIsSelecting(flag){
147 160
     this.isSelecting = flag; // 设置标志