|
@@ -1,6 +1,6 @@
|
1
|
1
|
import { Component, OnInit, ViewChild, OnDestroy } from "@angular/core";
|
2
|
2
|
import { MainService } from "../../services/main.service";
|
3
|
|
-import { Router } from "@angular/router";
|
|
3
|
+import { ActivatedRoute, Router } from "@angular/router";
|
4
|
4
|
import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
|
5
|
5
|
import { startOfDay, format, endOfDay } from "date-fns";
|
6
|
6
|
import { ToolService } from 'src/app/services/tool.service';
|
|
@@ -24,6 +24,7 @@ export class PathologySampleComponent implements OnInit {
|
24
|
24
|
constructor(
|
25
|
25
|
private mainService: MainService,
|
26
|
26
|
public router: Router,
|
|
27
|
+ public route: ActivatedRoute,
|
27
|
28
|
public tool: ToolService,
|
28
|
29
|
private fb: FormBuilder,
|
29
|
30
|
private message: NzMessageService,
|
|
@@ -81,13 +82,13 @@ export class PathologySampleComponent implements OnInit {
|
81
|
82
|
detailId:any = '200';
|
82
|
83
|
project:any;
|
83
|
84
|
viewType:any = 'no';
|
84
|
|
-
|
|
85
|
+ mainRole:any;
|
85
|
86
|
ngOnInit() {
|
86
|
87
|
this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
|
87
|
88
|
this.searchSpecimenData(v[0])
|
88
|
89
|
});
|
89
|
90
|
this.changeInpSubjectSpecimen.pipe(debounceTime(500)).subscribe((v) => {
|
90
|
|
- this.searchSpecimen(v[0])
|
|
91
|
+ this.searchSpecimen(v[0],'search')
|
91
|
92
|
});
|
92
|
93
|
this.hosId = this.tool.getCurrentHospital().id;
|
93
|
94
|
this.userId = this.tool.getCurrentUserId()
|
|
@@ -98,6 +99,10 @@ export class PathologySampleComponent implements OnInit {
|
98
|
99
|
this.getSysData()
|
99
|
100
|
this.getTaskTypesId();
|
100
|
101
|
this.getStationaryLiquid();
|
|
102
|
+ if(this.route.snapshot.params && this.route.snapshot.params.param){
|
|
103
|
+ this.barCode = this.route.snapshot.params.param
|
|
104
|
+ this.searchSpecimen(this.barCode,'search')
|
|
105
|
+ }
|
101
|
106
|
setTimeout(_=>{
|
102
|
107
|
document.getElementById('Binput').focus();
|
103
|
108
|
},500)
|
|
@@ -135,6 +140,7 @@ export class PathologySampleComponent implements OnInit {
|
135
|
140
|
this.addLoading = false
|
136
|
141
|
this.viewType = 'edit';
|
137
|
142
|
this.fetchDataList(data.data.id);
|
|
143
|
+ this.searchSpecimen(this.adviceList.patientNo,'add');
|
138
|
144
|
});
|
139
|
145
|
}
|
140
|
146
|
|
|
@@ -148,6 +154,7 @@ export class PathologySampleComponent implements OnInit {
|
148
|
154
|
}
|
149
|
155
|
|
150
|
156
|
// 获取配置
|
|
157
|
+ pathologyBarCode:any = 1;
|
151
|
158
|
ifImmobilization:any = false;
|
152
|
159
|
getConfig() {
|
153
|
160
|
let postData = {
|
|
@@ -167,6 +174,7 @@ export class PathologySampleComponent implements OnInit {
|
167
|
174
|
}else{
|
168
|
175
|
this.ifImmobilization = false
|
169
|
176
|
}
|
|
177
|
+ this.pathologyBarCode = result.list[0].pathologyBarCode?result.list[0].pathologyBarCode:1;
|
170
|
178
|
}
|
171
|
179
|
});
|
172
|
180
|
}
|
|
@@ -184,25 +192,28 @@ export class PathologySampleComponent implements OnInit {
|
184
|
192
|
}
|
185
|
193
|
}
|
186
|
194
|
|
187
|
|
- isShowMove:any = false
|
|
195
|
+ isShowMove:any = true
|
188
|
196
|
showLook(){
|
189
|
197
|
this.isShowMove = !this.isShowMove
|
190
|
198
|
}
|
191
|
199
|
|
192
|
200
|
// 标本条码搜索
|
193
|
201
|
adviceList:any = null;
|
194
|
|
- searchSpecimen(e){
|
195
|
|
- if(!this.barCode){
|
196
|
|
- return
|
197
|
|
- }
|
198
|
|
- if(this.barCode.length < 10) {
|
199
|
|
- return
|
|
202
|
+ searchSpecimen(e,type){
|
|
203
|
+ console.log(7777,this.route.snapshot.params.param)
|
|
204
|
+ if(type!='add'){
|
|
205
|
+ if(!this.barCode){
|
|
206
|
+ return
|
|
207
|
+ }
|
|
208
|
+ if(this.barCode.length < 10) {
|
|
209
|
+ return
|
|
210
|
+ }
|
200
|
211
|
}
|
201
|
212
|
let data:any = {
|
202
|
213
|
idx: 0,
|
203
|
214
|
sum: 9999,
|
204
|
215
|
pathologyAdvice:{
|
205
|
|
- patientNo:this.barCode
|
|
216
|
+ patientNo:this.barCode?this.barCode:e
|
206
|
217
|
}
|
207
|
218
|
}
|
208
|
219
|
this.isSpinning = true
|
|
@@ -210,22 +221,24 @@ export class PathologySampleComponent implements OnInit {
|
210
|
221
|
.subscribe((res:any) => {
|
211
|
222
|
this.isSpinning = false
|
212
|
223
|
if(res.status==200){
|
213
|
|
- this.adviceList = res.list[0]
|
214
|
|
- console.log(4545,this.adviceList)
|
215
|
|
- // let item = this.codeData.pathologySpecimenDTOList.find(i=>i.specimenCode == e)
|
216
|
|
- // if(!item.fixationTime && this.codeData.pathologyFormType==0){
|
217
|
|
- // this.fixationError = null
|
218
|
|
- // this.searchMsg = null
|
219
|
|
- // }else if(item.fixationTime && this.codeData.pathologyFormType==0){
|
220
|
|
- // this.barCode = null
|
221
|
|
- // this.fixationError = null
|
222
|
|
- // this.searchMsg = null
|
223
|
|
- // }else{
|
224
|
|
- // this.barCode = null
|
225
|
|
- // this.fixationError = null
|
226
|
|
- // this.searchMsg = '该申请单类型不是病理检查申请单'
|
227
|
|
- // }
|
228
|
|
-
|
|
224
|
+ this.barCode = null
|
|
225
|
+ this.searchMsg = null
|
|
226
|
+ this.isShowMove = true
|
|
227
|
+ if(type=='search'){
|
|
228
|
+ this.leftIndex = null
|
|
229
|
+ this.detailsData = null
|
|
230
|
+ this.statusValue = 1
|
|
231
|
+ this.pathologyLogs = []
|
|
232
|
+ this.stepLength = 0
|
|
233
|
+ this.viewType = 'no';
|
|
234
|
+ }
|
|
235
|
+ if(res.list.length>0){
|
|
236
|
+ this.adviceList = res.list[0]
|
|
237
|
+ }else{
|
|
238
|
+ this.adviceList = []
|
|
239
|
+ this.viewType = 'no';
|
|
240
|
+ }
|
|
241
|
+ this.patientId = this.adviceList.patientId
|
229
|
242
|
}else{
|
230
|
243
|
this.barCode = null
|
231
|
244
|
this.searchMsg = res.msg
|
|
@@ -259,15 +272,31 @@ export class PathologySampleComponent implements OnInit {
|
259
|
272
|
}
|
260
|
273
|
|
261
|
274
|
// 选择固定时间
|
262
|
|
- formChangeDate(result){
|
263
|
|
- this.startDate = format(result, 'yyyy-MM-dd HH:mm:ss');
|
|
275
|
+ fixationTime:any;
|
|
276
|
+ fixationData:any;
|
|
277
|
+ fixationDateChange(result){
|
|
278
|
+ this.fixationData = format(result, 'yyyy-MM-dd');
|
|
279
|
+ console.log(this.fixationData)
|
|
280
|
+ }
|
|
281
|
+ fixationTimeSelect:any;
|
|
282
|
+ fixationTimeChange(result){
|
|
283
|
+ this.fixationTimeSelect = format(result, 'HH:mm');
|
|
284
|
+ console.log(this.fixationData + ' ' + this.fixationTimeSelect)
|
264
|
285
|
}
|
265
|
286
|
|
266
|
287
|
// 选择离体时间
|
267
|
288
|
inVitroTime:any;
|
|
289
|
+ inVitroData:any;
|
|
290
|
+ inVitroDateChange(result){
|
|
291
|
+ this.inVitroData = format(result, 'yyyy-MM-dd');
|
|
292
|
+ console.log(this.inVitroData)
|
|
293
|
+ }
|
|
294
|
+ inVitroTimeSelect:any;
|
268
|
295
|
inVitroTimeChange(result){
|
269
|
|
- this.inVitroTime = format(result, 'yyyy-MM-dd HH:mm:ss');
|
|
296
|
+ this.inVitroTimeSelect = format(result, 'HH:mm');
|
|
297
|
+ console.log(this.inVitroData + ' ' + this.inVitroTimeSelect)
|
270
|
298
|
}
|
|
299
|
+
|
271
|
300
|
|
272
|
301
|
// 提交固定标本接收
|
273
|
302
|
startDate:any;
|
|
@@ -279,13 +308,13 @@ export class PathologySampleComponent implements OnInit {
|
279
|
308
|
this.validatePrintForm.controls[i].updateValueAndValidity();
|
280
|
309
|
}
|
281
|
310
|
if (this.validatePrintForm.invalid) return;
|
282
|
|
- let ids = this.validateForm.value.project.join(',')
|
|
311
|
+ let ids = this.validateForm.value.project
|
283
|
312
|
let data: any = {
|
284
|
313
|
pathologyForm:{
|
285
|
314
|
...this.detailsData,
|
286
|
315
|
...this.validateForm.value,
|
287
|
|
- inVitroTime:this.inVitroTime,
|
288
|
|
- fixationTime:this.startDate,
|
|
316
|
+ inVitroTime:this.inVitroData + ' ' + this.inVitroTimeSelect+':00',
|
|
317
|
+ fixationTime:this.fixationData + ' ' + this.fixationTimeSelect+':00',
|
289
|
318
|
specimenFixingLiquid:{
|
290
|
319
|
id:this.validatePrintForm.value.fixative
|
291
|
320
|
},
|
|
@@ -314,7 +343,7 @@ export class PathologySampleComponent implements OnInit {
|
314
|
343
|
delete data.pathologySpecimenIds
|
315
|
344
|
}
|
316
|
345
|
if(this.ifImmobilization){
|
317
|
|
- data.pathologyForm.fixationTime = this.startDate
|
|
346
|
+ data.pathologyForm.fixationTime = this.fixationData + ' ' + this.fixationTimeSelect +':00'
|
318
|
347
|
data.pathologyForm.specimenFixingLiquid.id = this.validatePrintForm.value.fixative
|
319
|
348
|
}else{
|
320
|
349
|
delete data.pathologyForm.fixationTime
|
|
@@ -374,7 +403,6 @@ export class PathologySampleComponent implements OnInit {
|
374
|
403
|
.subscribe((data) => {
|
375
|
404
|
this.isSpinning = false;
|
376
|
405
|
this.detailsData = data.data;
|
377
|
|
- this.patientId = data.data.patientId;
|
378
|
406
|
this.surgeryId = data.data.surgeryId;
|
379
|
407
|
if(this.detailsData.status && this.detailsData.status.value==5){
|
380
|
408
|
this.viewType = 'view'
|
|
@@ -404,16 +432,20 @@ export class PathologySampleComponent implements OnInit {
|
404
|
432
|
}
|
405
|
433
|
|
406
|
434
|
// 检验项目
|
407
|
|
- let arr = []
|
408
|
|
- if(this.detailsData.pathologyInspectDTOS){
|
409
|
|
- for(let i of this.detailsData.pathologyInspectDTOS){
|
410
|
|
- arr.push(i.inspectProject.id)
|
|
435
|
+ if(this.detailsData.status && this.detailsData.status.value==5){
|
|
436
|
+ if(this.detailsData.pathologyInspectDTOS&&this.detailsData.pathologyInspectDTOS.length>0){
|
|
437
|
+ this.project = this.detailsData.pathologyInspectDTOS[0].inspectProject.name
|
411
|
438
|
}
|
412
|
|
- this.validateForm.controls.project.setValue(arr);
|
413
|
439
|
}else{
|
414
|
|
- this.validateForm.controls.project.setValue(arr);
|
|
440
|
+ let str = null
|
|
441
|
+ if(this.detailsData.pathologyInspectDTOS){
|
|
442
|
+ str = this.detailsData.pathologyInspectDTOS[0].inspectProject.id
|
|
443
|
+ this.validateForm.controls.project.setValue(str);
|
|
444
|
+ }else{
|
|
445
|
+ this.validateForm.controls.project.setValue(str);
|
|
446
|
+ }
|
415
|
447
|
}
|
416
|
|
-
|
|
448
|
+
|
417
|
449
|
// 标本类型
|
418
|
450
|
if(this.detailsData.specimenType){
|
419
|
451
|
this.validateForm.controls.specimenGenre.setValue(this.detailsData.specimenType.id);
|
|
@@ -444,7 +476,7 @@ export class PathologySampleComponent implements OnInit {
|
444
|
476
|
|
445
|
477
|
// 获取检验项目
|
446
|
478
|
getProDicData(){
|
447
|
|
- this.mainService.getDictionary("list", "pathology_inspect_type").subscribe((res) => {
|
|
479
|
+ this.mainService.getDictionary("list", "outpatient_pathology_inspect_type").subscribe((res) => {
|
448
|
480
|
this.projectData = res
|
449
|
481
|
});
|
450
|
482
|
}
|
|
@@ -507,6 +539,7 @@ export class PathologySampleComponent implements OnInit {
|
507
|
539
|
|
508
|
540
|
// 获取标本-标本名称
|
509
|
541
|
getSpNameData(id,item,type){
|
|
542
|
+ this.selectItem = this.specimenData.find(i=>i.id == this.validateForm.value.specimenGenre)
|
510
|
543
|
let postData: any = {
|
511
|
544
|
idx: 0,
|
512
|
545
|
sum: 9999,
|
|
@@ -515,12 +548,17 @@ export class PathologySampleComponent implements OnInit {
|
515
|
548
|
parent:id,
|
516
|
549
|
key: 'pathology_specimen',
|
517
|
550
|
deleted: 0,
|
|
551
|
+ extra1:'',
|
518
|
552
|
},
|
519
|
553
|
};
|
520
|
|
- this.mainService
|
521
|
|
- .getFetchDataList("simple/data", "dictionaryTree", postData)
|
522
|
|
- .subscribe((data) => {
|
523
|
|
- this.specimenNameList = data.list;
|
|
554
|
+
|
|
555
|
+ if(this.selectType){
|
|
556
|
+ postData.dictionaryTree.key = 'cell_specimen'
|
|
557
|
+ postData.dictionaryTree.extra1 = this.selectItem.value
|
|
558
|
+ delete postData.dictionaryTree.parent
|
|
559
|
+ delete postData.dictionaryTree.level
|
|
560
|
+ this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData).subscribe((res) => {
|
|
561
|
+ this.specimenNameList = res.list;
|
524
|
562
|
if(type=='edit'){
|
525
|
563
|
if(item.sample){
|
526
|
564
|
this.validateSpecimenForm = this.fb.group({
|
|
@@ -540,7 +578,37 @@ export class PathologySampleComponent implements OnInit {
|
540
|
578
|
this.specimenModal = true
|
541
|
579
|
},50)
|
542
|
580
|
}
|
543
|
|
- });
|
|
581
|
+ });
|
|
582
|
+ }else{
|
|
583
|
+ postData.dictionaryTree.key = 'pathology_specimen'
|
|
584
|
+ postData.dictionaryTree.parent = id
|
|
585
|
+ postData.dictionaryTree.level = 3
|
|
586
|
+ delete postData.dictionaryTree.extra1
|
|
587
|
+ this.mainService.getFetchDataList("simple/data", "dictionaryTree", postData)
|
|
588
|
+ .subscribe((data) => {
|
|
589
|
+ this.specimenNameList = data.list;
|
|
590
|
+ if(type=='edit'){
|
|
591
|
+ if(item.sample){
|
|
592
|
+ this.validateSpecimenForm = this.fb.group({
|
|
593
|
+ remark: [null, []],
|
|
594
|
+ specimenName: [null, [Validators.required]]
|
|
595
|
+ });
|
|
596
|
+ setTimeout(_=>{
|
|
597
|
+ let index4 = this.specimenNameList.findIndex(i=>i.id==item.sample.id)
|
|
598
|
+ this.specimenNameIndex = index4
|
|
599
|
+ this.specimenNameName = item.sample.name
|
|
600
|
+ this.specimenNameId = Number(item.sample.id);
|
|
601
|
+ this.validateSpecimenForm.controls.specimenName.setValue(item.specimenName);
|
|
602
|
+ },100)
|
|
603
|
+ }
|
|
604
|
+ setTimeout(_=>{
|
|
605
|
+ this.validateSpecimenForm.controls.remark.setValue(item.remark);
|
|
606
|
+ this.specimenModal = true
|
|
607
|
+ },50)
|
|
608
|
+ }
|
|
609
|
+ });
|
|
610
|
+ }
|
|
611
|
+
|
544
|
612
|
}
|
545
|
613
|
|
546
|
614
|
// 删除标本
|
|
@@ -579,18 +647,28 @@ export class PathologySampleComponent implements OnInit {
|
579
|
647
|
specimenDetailId:any = null;
|
580
|
648
|
specimenEdit(e,item,index){
|
581
|
649
|
this.specimenDetailId = item.id
|
582
|
|
- let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
|
583
|
|
- this.placeIndex = index1
|
584
|
|
- this.placeId = Number(item.partSource.id)
|
585
|
|
- let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
|
586
|
|
- this.systemIndex = index2
|
587
|
|
- this.systemId = Number(item.system.id)
|
588
|
|
- this.getApparatusData(item.system.id,item,'edit')
|
589
|
|
- this.getSpNameData(item.organ.id,item,'edit')
|
|
650
|
+ if(item.system && item.organ){
|
|
651
|
+ this.selectType = false
|
|
652
|
+ let index1 = this.placeList.findIndex(i=>i.id==item.partSource.id)
|
|
653
|
+ this.placeIndex = index1
|
|
654
|
+ this.placeId = Number(item.partSource.id)
|
|
655
|
+ let index2 = this.systemList.findIndex(i=>i.id==item.system.id)
|
|
656
|
+ this.systemIndex = index2
|
|
657
|
+ this.systemId = Number(item.system.id)
|
|
658
|
+ this.getApparatusData(item.system.id,item,'edit')
|
|
659
|
+ this.getSpNameData(item.organ.id,item,'edit')
|
|
660
|
+ }else{
|
|
661
|
+ this.selectType = true
|
|
662
|
+ this.getSpNameData(item.specimenId,item,'edit')
|
|
663
|
+ }
|
590
|
664
|
}
|
591
|
665
|
|
592
|
666
|
// 选择标本
|
|
667
|
+ selectItem:any;
|
|
668
|
+ selectType:any = false;
|
593
|
669
|
openSpecimen(){
|
|
670
|
+ this.selectItem = this.specimenData.find(i=>i.id == this.validateForm.value.specimenGenre)
|
|
671
|
+ console.log(this.selectItem.value) //20 21 22 24 60 80
|
594
|
672
|
this.validateSpecimenForm = this.fb.group({
|
595
|
673
|
remark: [null, []],
|
596
|
674
|
specimenName:[null, [Validators.required]],
|
|
@@ -608,10 +686,19 @@ export class PathologySampleComponent implements OnInit {
|
608
|
686
|
this.systemList=[]; //系统数据
|
609
|
687
|
this.apparatusList=[]; //器官数据
|
610
|
688
|
this.specimenNameList=[]; //标本名称数据
|
611
|
|
- this.specimenNameName = null;
|
612
|
|
- this.getSourceData()
|
613
|
|
- this.getSysData()
|
|
689
|
+ this.specimenNameName = null
|
614
|
690
|
this.specimenModal = true
|
|
691
|
+ if(this.selectItem.value==20 || this.selectItem.value==21 ||
|
|
692
|
+ this.selectItem.value==22 || this.selectItem.value==23 ||
|
|
693
|
+ this.selectItem.value==24 || this.selectItem.value==60 ||
|
|
694
|
+ this.selectItem.value==70 || this.selectItem.value==80){
|
|
695
|
+ this.selectType = true
|
|
696
|
+ this.getSpNameData('',{},'select')
|
|
697
|
+ }else{
|
|
698
|
+ this.selectType = false
|
|
699
|
+ this.getSourceData()
|
|
700
|
+ this.getSysData()
|
|
701
|
+ }
|
615
|
702
|
}
|
616
|
703
|
|
617
|
704
|
// 选择位置来源
|
|
@@ -684,19 +771,22 @@ export class PathologySampleComponent implements OnInit {
|
684
|
771
|
addSpLoading:boolean = false;
|
685
|
772
|
addMadal:boolean = false;
|
686
|
773
|
submitSpecimen(type){
|
687
|
|
- if(this.placeIndex==null){
|
688
|
|
- this.message.error('请选择位置来源')
|
689
|
|
- return
|
690
|
|
- }
|
691
|
|
- if(this.systemIndex==null){
|
692
|
|
- this.message.error('请选择系统')
|
693
|
|
- return
|
694
|
|
- }
|
695
|
|
- if(this.apparatusIndex==null){
|
696
|
|
- this.message.error('请选择器官')
|
697
|
|
- return
|
|
774
|
+ if(!this.selectType){
|
|
775
|
+ if(this.placeIndex==null){
|
|
776
|
+ this.message.error('请选择位置来源')
|
|
777
|
+ return
|
|
778
|
+ }
|
|
779
|
+ if(this.systemIndex==null){
|
|
780
|
+ this.message.error('请选择系统')
|
|
781
|
+ return
|
|
782
|
+ }
|
|
783
|
+ if(this.apparatusIndex==null){
|
|
784
|
+ this.message.error('请选择器官')
|
|
785
|
+ return
|
|
786
|
+ }
|
698
|
787
|
}
|
699
|
|
- if(this.specimenNameIndex==null){
|
|
788
|
+
|
|
789
|
+ if(this.specimenNameIndex==null && this.validateSpecimenForm.value.specimenName == ''){
|
700
|
790
|
this.message.error('请选择标本名称')
|
701
|
791
|
return
|
702
|
792
|
}
|
|
@@ -847,7 +937,11 @@ export class PathologySampleComponent implements OnInit {
|
847
|
937
|
let str = []
|
848
|
938
|
if(res.list.length>0){
|
849
|
939
|
for(let i of res.list){
|
850
|
|
- str.push(i.system.name + '-' + i.organ.name)
|
|
940
|
+ if(i.system && i.organ){
|
|
941
|
+ str.push(i.system.name + '-' + i.organ.name)
|
|
942
|
+ }else{
|
|
943
|
+ str.push(i.specimenName)
|
|
944
|
+ }
|
851
|
945
|
}
|
852
|
946
|
const newStr = new Set(str);
|
853
|
947
|
const newData = Array.from(newStr);
|
|
@@ -897,25 +991,34 @@ export class PathologySampleComponent implements OnInit {
|
897
|
991
|
this.specimenNum = res.specimenNum
|
898
|
992
|
this.pathologySpecimenIds = res.ids
|
899
|
993
|
let date = new Date();
|
900
|
|
- this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
|
901
|
|
- this.inVitroTime = format(date, "yyyy-MM-dd HH:mm:ss")
|
|
994
|
+
|
|
995
|
+ let inVitroDate = format(date, "yyyy-MM-dd")
|
902
|
996
|
if(this.ifImmobilization){
|
903
|
997
|
this.validatePrintForm = this.fb.group({
|
904
|
|
- inVitroTime: [null, [Validators.required]],
|
905
|
|
- fixationTime: [null, [Validators.required]],
|
|
998
|
+ inVitroTimes: [null, [Validators.required]],
|
|
999
|
+ inVitroDate: [null, [Validators.required]],
|
|
1000
|
+ fixationTimes: [null, [Validators.required]],
|
|
1001
|
+ fixationDate: [null, [Validators.required]],
|
906
|
1002
|
fixative:[null, [Validators.required]],
|
907
|
1003
|
jobNumber: [null, [Validators.required]],
|
908
|
1004
|
name:[null, [Validators.required]],
|
909
|
1005
|
});
|
910
|
|
- this.validatePrintForm.controls.fixationTime.setValue(this.startDate);
|
|
1006
|
+ this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
|
|
1007
|
+ this.validatePrintForm.controls.fixationTimes.setValue(date);
|
|
1008
|
+ this.fixationData = inVitroDate;
|
|
1009
|
+ this.fixationTimeSelect = format(date, 'HH:mm');
|
911
|
1010
|
}else{
|
912
|
1011
|
this.validatePrintForm = this.fb.group({
|
913
|
|
- inVitroTime: [null, [Validators.required]],
|
|
1012
|
+ inVitroTimes: [null, [Validators.required]],
|
|
1013
|
+ inVitroDate: [null, [Validators.required]],
|
914
|
1014
|
jobNumber: [null, [Validators.required]],
|
915
|
1015
|
name:[null, [Validators.required]],
|
916
|
1016
|
});
|
917
|
1017
|
}
|
918
|
|
- this.validatePrintForm.controls.inVitroTime.setValue(this.inVitroTime);
|
|
1018
|
+ this.validatePrintForm.controls.inVitroDate.setValue(inVitroDate);
|
|
1019
|
+ this.validatePrintForm.controls.inVitroTimes.setValue(date);
|
|
1020
|
+ this.inVitroData = inVitroDate;
|
|
1021
|
+ this.inVitroTimeSelect = format(date, 'HH:mm');
|
919
|
1022
|
if(this.detailsData.surgeryDoctorDTO){
|
920
|
1023
|
this.validatePrintForm.controls.jobNumber.setValue(this.detailsData.surgeryDoctorDTO.account);
|
921
|
1024
|
this.validatePrintForm.controls.name.setValue(this.detailsData.surgeryDoctorDTO.name);
|
|
@@ -937,12 +1040,10 @@ export class PathologySampleComponent implements OnInit {
|
937
|
1040
|
submitForm(type): void{
|
938
|
1041
|
var that = this;
|
939
|
1042
|
this.operation = 'wholePrint'
|
940
|
|
- console.log(5555,that.validateForm.controls)
|
941
|
1043
|
for (const i in that.validateForm.controls) {
|
942
|
1044
|
that.validateForm.controls[i].markAsDirty();
|
943
|
1045
|
that.validateForm.controls[i].updateValueAndValidity();
|
944
|
1046
|
}
|
945
|
|
- console.log(444,that.validateForm.invalid)
|
946
|
1047
|
if (that.validateForm.invalid) return;
|
947
|
1048
|
if(this.specimenList.length==0){
|
948
|
1049
|
this.message.error('标本不能为空')
|
|
@@ -957,25 +1058,34 @@ export class PathologySampleComponent implements OnInit {
|
957
|
1058
|
this.specimenNum = res.specimenNum
|
958
|
1059
|
this.pathologySpecimenIds = res.ids
|
959
|
1060
|
let date = new Date();
|
960
|
|
- this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
|
961
|
|
- this.inVitroTime = format(date, "yyyy-MM-dd HH:mm:ss")
|
|
1061
|
+
|
|
1062
|
+ let inVitroDate = format(date, "yyyy-MM-dd")
|
962
|
1063
|
if(this.ifImmobilization){
|
963
|
1064
|
this.validatePrintForm = this.fb.group({
|
964
|
|
- inVitroTime: [null, [Validators.required]],
|
965
|
|
- fixationTime: [null, [Validators.required]],
|
|
1065
|
+ inVitroTimes: [null, [Validators.required]],
|
|
1066
|
+ inVitroDate: [null, [Validators.required]],
|
|
1067
|
+ fixationTimes: [null, [Validators.required]],
|
|
1068
|
+ fixationDate: [null, [Validators.required]],
|
966
|
1069
|
fixative:[null, [Validators.required]],
|
967
|
1070
|
jobNumber: [null, [Validators.required]],
|
968
|
1071
|
name:[null, [Validators.required]],
|
969
|
1072
|
});
|
970
|
|
- this.validatePrintForm.controls.fixationTime.setValue(this.startDate);
|
|
1073
|
+ this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
|
|
1074
|
+ this.validatePrintForm.controls.fixationTimes.setValue(date);
|
|
1075
|
+ this.fixationData = inVitroDate;
|
|
1076
|
+ this.fixationTimeSelect = format(date, 'HH:mm');
|
971
|
1077
|
}else{
|
972
|
1078
|
this.validatePrintForm = this.fb.group({
|
973
|
|
- inVitroTime: [null, [Validators.required]],
|
|
1079
|
+ inVitroTimes: [null, [Validators.required]],
|
|
1080
|
+ inVitroDate: [null, [Validators.required]],
|
974
|
1081
|
jobNumber: [null, [Validators.required]],
|
975
|
1082
|
name:[null, [Validators.required]],
|
976
|
1083
|
});
|
977
|
1084
|
}
|
978
|
|
- this.validatePrintForm.controls.inVitroTime.setValue(this.inVitroTime);
|
|
1085
|
+ this.validatePrintForm.controls.inVitroDate.setValue(inVitroDate);
|
|
1086
|
+ this.validatePrintForm.controls.inVitroTimes.setValue(date);
|
|
1087
|
+ this.inVitroData = inVitroDate;
|
|
1088
|
+ this.inVitroTimeSelect = format(date, 'HH:mm');
|
979
|
1089
|
if(this.detailsData.surgeryDoctorDTO){
|
980
|
1090
|
this.validatePrintForm.controls.jobNumber.setValue(this.detailsData.surgeryDoctorDTO.account);
|
981
|
1091
|
this.validatePrintForm.controls.name.setValue(this.detailsData.surgeryDoctorDTO.name);
|
|
@@ -988,7 +1098,7 @@ export class PathologySampleComponent implements OnInit {
|
988
|
1098
|
surgeryId: this.surgeryId || "",
|
989
|
1099
|
patientId: this.patientId || "",
|
990
|
1100
|
hosId: this.hosId || "" ,
|
991
|
|
- pathologyInspectIds: this.validateForm.value.project.join(','),
|
|
1101
|
+ pathologyInspectIds: this.validateForm.value.project,
|
992
|
1102
|
specimenType:{
|
993
|
1103
|
id:this.validateForm.value.specimenGenre
|
994
|
1104
|
}
|
|
@@ -1022,25 +1132,34 @@ export class PathologySampleComponent implements OnInit {
|
1022
|
1132
|
this.totalNum = res.totalNum
|
1023
|
1133
|
this.specimenNum = res.specimenNum
|
1024
|
1134
|
let date = new Date();
|
1025
|
|
- this.startDate = format(date, "yyyy-MM-dd HH:mm:ss")
|
1026
|
|
- this.inVitroTime = format(date, "yyyy-MM-dd HH:mm:ss")
|
|
1135
|
+
|
|
1136
|
+ let inVitroDate = format(date, "yyyy-MM-dd")
|
1027
|
1137
|
if(this.ifImmobilization){
|
1028
|
1138
|
this.validatePrintForm = this.fb.group({
|
1029
|
|
- inVitroTime: [null, [Validators.required]],
|
1030
|
|
- fixationTime: [null, [Validators.required]],
|
|
1139
|
+ inVitroTimes: [null, [Validators.required]],
|
|
1140
|
+ inVitroDate: [null, [Validators.required]],
|
|
1141
|
+ fixationTimes: [null, [Validators.required]],
|
|
1142
|
+ fixationDate: [null, [Validators.required]],
|
1031
|
1143
|
fixative:[null, [Validators.required]],
|
1032
|
1144
|
jobNumber: [null, [Validators.required]],
|
1033
|
1145
|
name:[null, [Validators.required]],
|
1034
|
1146
|
});
|
1035
|
|
- this.validatePrintForm.controls.fixationTime.setValue(this.startDate);
|
|
1147
|
+ this.validatePrintForm.controls.fixationDate.setValue(inVitroDate);
|
|
1148
|
+ this.validatePrintForm.controls.fixationTimes.setValue(date);
|
|
1149
|
+ this.fixationData = inVitroDate;
|
|
1150
|
+ this.fixationTimeSelect = format(date, 'HH:mm');
|
1036
|
1151
|
}else{
|
1037
|
1152
|
this.validatePrintForm = this.fb.group({
|
1038
|
|
- inVitroTime: [null, [Validators.required]],
|
|
1153
|
+ inVitroTimes: [null, [Validators.required]],
|
|
1154
|
+ inVitroDate: [null, [Validators.required]],
|
1039
|
1155
|
jobNumber: [null, [Validators.required]],
|
1040
|
1156
|
name:[null, [Validators.required]],
|
1041
|
1157
|
});
|
1042
|
1158
|
}
|
1043
|
|
- this.validatePrintForm.controls.inVitroTime.setValue(this.inVitroTime);
|
|
1159
|
+ this.validatePrintForm.controls.inVitroDate.setValue(inVitroDate);
|
|
1160
|
+ this.validatePrintForm.controls.inVitroTimes.setValue(date);
|
|
1161
|
+ this.inVitroData = inVitroDate;
|
|
1162
|
+ this.inVitroTimeSelect = format(date, 'HH:mm');
|
1044
|
1163
|
if(this.detailsData.surgeryDoctorDTO){
|
1045
|
1164
|
this.validatePrintForm.controls.jobNumber.setValue(this.detailsData.surgeryDoctorDTO.account);
|
1046
|
1165
|
this.validatePrintForm.controls.name.setValue(this.detailsData.surgeryDoctorDTO.name);
|
|
@@ -1055,7 +1174,7 @@ export class PathologySampleComponent implements OnInit {
|
1055
|
1174
|
surgeryId: this.surgeryId || "",
|
1056
|
1175
|
patientId: this.patientId || "",
|
1057
|
1176
|
hosId: this.hosId || "" ,
|
1058
|
|
- pathologyInspectIds:this.validateForm.value.project.join(','),
|
|
1177
|
+ pathologyInspectIds:this.validateForm.value.project,
|
1059
|
1178
|
specimenType:{
|
1060
|
1179
|
id:this.validateForm.value.specimenGenre
|
1061
|
1180
|
}
|