|
@@ -171,6 +171,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
171
|
171
|
userInfo:any = null;
|
172
|
172
|
placeholder:any = null;
|
173
|
173
|
placeholderType:any = null;
|
|
174
|
+ operationType:any = 'pathologyHandoverBook';
|
174
|
175
|
ngOnDestroy() {
|
175
|
176
|
clearTimeout(this.timer);
|
176
|
177
|
clearTimeout(this.logTimer);
|
|
@@ -188,26 +189,25 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
188
|
189
|
this.businessType = this.route.snapshot.queryParams.businessType
|
189
|
190
|
this.placeholderType = this.route.snapshot.queryParams.placeholder
|
190
|
191
|
this.packId = this.route.snapshot.queryParams.packId //打包配送查看标本
|
|
192
|
+ this.operationType = localStorage.getItem("checkType"); //入口类型
|
191
|
193
|
if(this.placeholderType==1){
|
192
|
194
|
this.placeholder = '可扫描物理标本条码'
|
193
|
195
|
}else{
|
194
|
196
|
this.placeholder = '可扫描物理标本条码及包码'
|
195
|
197
|
}
|
196
|
198
|
let scanData = localStorage.getItem("scanCodeData")
|
197
|
|
- //dataType类型:receive:病理科接收标本,pack:病理科打包标本
|
198
|
|
- //pathologyPack: 病理包扫码
|
199
|
199
|
this.dataType = localStorage.getItem("dataType")
|
200
|
|
- if(this.packId && this.businessType=='packagLook'){
|
201
|
|
- this.getJsData(5)
|
202
|
|
- return
|
203
|
|
- }
|
|
200
|
+ // if(this.packId && this.businessType=='packagLook'){
|
|
201
|
+ // this.getJsData(5)
|
|
202
|
+ // return
|
|
203
|
+ // }
|
204
|
204
|
if(scanData){
|
205
|
205
|
let data = JSON.parse(localStorage.getItem("scanCodeData"))
|
206
|
206
|
this.scanCodeData = data.data[0]
|
207
|
207
|
// 包的状态为配送中展示配送接收弹框
|
208
|
|
- if(this.dataType=='pathologyPack'){
|
209
|
|
- this.getJsData(4)
|
210
|
|
- }
|
|
208
|
+ // if(this.dataType=='pathologyPack'){
|
|
209
|
+ // this.getJsData(4)
|
|
210
|
+ // }
|
211
|
211
|
if(this.scanCodeData.pathologySpecimenDTOList &&
|
212
|
212
|
this.scanCodeData.pathologySpecimenDTOList.length>1){
|
213
|
213
|
this.muArr = []
|
|
@@ -219,6 +219,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
219
|
219
|
this.getJsData(3)
|
220
|
220
|
}else if(this.scanCodeData.pathologySpecimenDTOList &&
|
221
|
221
|
this.scanCodeData.pathologySpecimenDTOList.length==1){
|
|
222
|
+ this.notification.create('success','提示',data.msg);
|
222
|
223
|
this.getJsData(1)
|
223
|
224
|
}
|
224
|
225
|
}else{
|
|
@@ -238,11 +239,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
238
|
239
|
tabClick(type){
|
239
|
240
|
this.activeIndex = type
|
240
|
241
|
localStorage.setItem("pathologyActiveIndex",type)
|
241
|
|
- if(type==0){
|
242
|
|
- this.getJsData(1)
|
243
|
|
- }else if(type==1){
|
244
|
|
- this.getJsData(1)
|
245
|
|
- }
|
|
242
|
+ this.getJsData(1)
|
246
|
243
|
}
|
247
|
244
|
|
248
|
245
|
// 分页
|
|
@@ -268,17 +265,20 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
268
|
265
|
sum: this.pageSize,
|
269
|
266
|
pathologyForm: {
|
270
|
267
|
batchNo:this.batchNo,
|
271
|
|
- packId:null
|
|
268
|
+ surgeryDeptId:this.deptId,
|
|
269
|
+ handoverType:this.operationType,
|
|
270
|
+ unScan:null
|
272
|
271
|
},
|
273
|
272
|
};
|
274
|
|
- if(type==4){
|
275
|
|
- data.pathologyForm.packId = this.scanCodeData.id
|
276
|
|
- delete data.pathologyForm.batchNo
|
277
|
|
- }else if(type==5){
|
278
|
|
- data.pathologyForm.packId = this.packId
|
279
|
|
- delete data.pathologyForm.batchNo
|
|
273
|
+ if(this.operationType == 'pathologyHandoverBook'){
|
|
274
|
+ data.pathologyForm.surgeryDeptId = this.deptId
|
|
275
|
+ }else{
|
|
276
|
+ delete data.pathologyForm.surgeryDeptId
|
|
277
|
+ }
|
|
278
|
+ if(this.activeIndex==1){
|
|
279
|
+ data.pathologyForm.unScan = 1
|
280
|
280
|
}else{
|
281
|
|
- delete data.pathologyForm.packId
|
|
281
|
+ delete data.pathologyForm.unScan
|
282
|
282
|
}
|
283
|
283
|
this.tableLoading = true;
|
284
|
284
|
this.mainService
|
|
@@ -334,7 +334,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
334
|
334
|
let data = {
|
335
|
335
|
receiveUser:this.connectUserId,
|
336
|
336
|
deliveryUser:this.dispatchingUserId,
|
337
|
|
- operationType:'bagReceive',
|
|
337
|
+ operationType:this.operationType,
|
338
|
338
|
id:this.scanCodeData.id
|
339
|
339
|
};
|
340
|
340
|
this.btnConnectLoading = true
|
|
@@ -412,28 +412,36 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
412
|
412
|
btnLoading:any = false;
|
413
|
413
|
submitFixationForm(){
|
414
|
414
|
this.btnLoading = true
|
415
|
|
- this.mainService.getSpecimenInfo(this.batchNo,this.deptId).subscribe((res:any) => {
|
|
415
|
+ this.mainService.getSpecimenInfo(this.batchNo,this.deptId,{
|
|
416
|
+ operationType:'handoverDelivery'
|
|
417
|
+ }).subscribe((res:any) => {
|
416
|
418
|
this.btnLoading = false
|
417
|
|
- this.mustReceived = res.data.mustReceived;
|
418
|
|
- this.currReceived = res.data.currReceived;
|
|
419
|
+ this.mustReceived = res;
|
|
420
|
+ // this.currReceived = res.data.currReceived;
|
419
|
421
|
this.btnConnectLoading = false
|
420
|
|
- if(this.codeData[0].deliveryUserDTO){
|
421
|
|
- this.validateConnectForm = this.fb.group({
|
422
|
|
- receptionNumber: [this.userInfo.account, [Validators.required]],
|
423
|
|
- dispatchingNumber: [this.codeData[0].deliveryUserDTO.account, [Validators.required]]
|
424
|
|
- });
|
425
|
|
- this.dispatchingName = this.codeData[0].deliveryUserDTO.name;
|
426
|
|
- this.dispatchingUserId = this.codeData[0].deliveryUserDTO.id
|
427
|
|
- }else{
|
428
|
|
- this.validateConnectForm = this.fb.group({
|
429
|
|
- receptionNumber: [null, [Validators.required]],
|
430
|
|
- dispatchingNumber: [null, [Validators.required]]
|
431
|
|
- });
|
432
|
|
- this.dispatchingName = null;
|
433
|
|
- this.dispatchingUserId = null
|
434
|
|
- }
|
435
|
|
- this.receptionName = this.userInfo.name;
|
436
|
|
- this.connectUserId = this.userInfo.id;
|
|
422
|
+ // if(this.codeData[0].deliveryUserDTO){
|
|
423
|
+ // this.validateConnectForm = this.fb.group({
|
|
424
|
+ // receptionNumber: [this.userInfo.account, [Validators.required]],
|
|
425
|
+ // dispatchingNumber: [this.codeData[0].deliveryUserDTO.account, [Validators.required]]
|
|
426
|
+ // });
|
|
427
|
+ // this.dispatchingName = this.codeData[0].deliveryUserDTO.name;
|
|
428
|
+ // this.dispatchingUserId = this.codeData[0].deliveryUserDTO.id
|
|
429
|
+ // }else{
|
|
430
|
+ // this.validateConnectForm = this.fb.group({
|
|
431
|
+ // receptionNumber: [null, [Validators.required]],
|
|
432
|
+ // dispatchingNumber: [null, [Validators.required]]
|
|
433
|
+ // });
|
|
434
|
+ // this.dispatchingName = null;
|
|
435
|
+ // this.dispatchingUserId = null
|
|
436
|
+ // }
|
|
437
|
+ // this.receptionName = this.userInfo.name;
|
|
438
|
+ // this.connectUserId = this.userInfo.id;
|
|
439
|
+ this.validateConnectForm = this.fb.group({
|
|
440
|
+ receptionNumber: [null, [Validators.required]],
|
|
441
|
+ dispatchingNumber: [null, [Validators.required]]
|
|
442
|
+ });
|
|
443
|
+ this.dispatchingName = null;
|
|
444
|
+ this.dispatchingUserId = null
|
437
|
445
|
this.connectModal = true
|
438
|
446
|
});
|
439
|
447
|
}
|
|
@@ -452,8 +460,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
452
|
460
|
if (this.validateConnectForm.invalid) return;
|
453
|
461
|
let data = {
|
454
|
462
|
batchNo:this.batchNo,
|
455
|
|
- receiveDept:this.deptId,
|
456
|
|
- receiverUser:this.connectUserId,
|
|
463
|
+ checkUser:this.connectUserId,
|
457
|
464
|
deliveryUser:this.dispatchingUserId
|
458
|
465
|
};
|
459
|
466
|
this.btnConnectLoading = true
|
|
@@ -472,16 +479,15 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
472
|
479
|
// 返回
|
473
|
480
|
hideSpecimenModal(){
|
474
|
481
|
localStorage.setItem("scanCodeData",'')
|
475
|
|
- let type = localStorage.getItem("checkType")
|
476
|
|
- if(type=='communicationBook'){//交接本
|
|
482
|
+ if(this.operationType=='pathologyHandoverBook'){//交接本
|
477
|
483
|
this.router.navigateByUrl(`/pathologyCommunicationBook?type=detail`)
|
478
|
|
- }else if(type=='surgery'){//手术间
|
|
484
|
+ }else if(this.operationType=='surgery'){//手术间
|
479
|
485
|
this.router.navigateByUrl(`/nurse`)
|
480
|
|
- }else if(type=='specimen'){//标本间
|
|
486
|
+ }else if(this.operationType=='specimenDept'){//标本间
|
481
|
487
|
this.router.navigateByUrl(`/specimenRoomView`)
|
482
|
|
- }else if(type=='pathology'){//病理端
|
|
488
|
+ }else if(this.operationType=='pathology'){//病理端
|
483
|
489
|
this.router.navigateByUrl(`/pathology`)
|
484
|
|
- }else if(type=='sample'){//门诊病理
|
|
490
|
+ }else if(this.operationType=='sample'){//门诊病理
|
485
|
491
|
this.router.navigateByUrl(`/pathologySample`)
|
486
|
492
|
}
|
487
|
493
|
}
|
|
@@ -530,7 +536,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
530
|
536
|
this.changeInpSubject.next([e]);
|
531
|
537
|
}
|
532
|
538
|
|
533
|
|
- // 标本接收搜索条码
|
|
539
|
+ // 标本搜索条码
|
534
|
540
|
errorMsg:any = null;
|
535
|
541
|
searchSpecimenData(e){
|
536
|
542
|
if(!e){
|
|
@@ -543,14 +549,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
543
|
549
|
barcode:e,
|
544
|
550
|
deptId:this.deptId,
|
545
|
551
|
batchNo:this.batchNo,
|
546
|
|
- tabType:null
|
547
|
|
- }
|
548
|
|
- if(this.dataType=='receive'){
|
549
|
|
- data.tabType = 'receive'
|
550
|
|
- }else if(this.dataType=='pack'){
|
551
|
|
- data.tabType = 'pack'
|
552
|
|
- }else{
|
553
|
|
- delete data.tabType
|
|
552
|
+ platform:'pathologyHandoverBook',
|
554
|
553
|
}
|
555
|
554
|
this.tableLoading = true
|
556
|
555
|
this.mainService.pathologyScanCode(data)
|
|
@@ -570,8 +569,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
570
|
569
|
this.codeMultiData = res.data[0].pathologySpecimenDTOList
|
571
|
570
|
localStorage.setItem("scanCodeData",JSON.stringify(res))
|
572
|
571
|
}else{
|
573
|
|
- let tip = `扫描“申请单号”的标本“标本号” + “标本名称”成功`
|
574
|
|
- this.notification.create('success','提示',tip);
|
|
572
|
+ this.notification.create('success','提示',res.msg);
|
575
|
573
|
this.getJsData(1)
|
576
|
574
|
}
|
577
|
575
|
this.errorMsg = null
|
|
@@ -605,14 +603,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
605
|
603
|
barcode:e,
|
606
|
604
|
deptId:this.deptId,
|
607
|
605
|
pathologyFormId:this.scanCodeData.id,
|
608
|
|
- tabType:null
|
609
|
|
- }
|
610
|
|
- if(this.dataType=='receive'){
|
611
|
|
- data.tabType = 'receive'
|
612
|
|
- }else if(this.dataType=='pack'){
|
613
|
|
- data.tabType = 'pack'
|
614
|
|
- }else{
|
615
|
|
- delete data.tabType
|
|
606
|
+ platform:'pathologyHandoverBook',
|
616
|
607
|
}
|
617
|
608
|
setTimeout(_=>{
|
618
|
609
|
this.tableLoading = true
|
|
@@ -652,7 +643,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
652
|
643
|
}
|
653
|
644
|
let data: any = {
|
654
|
645
|
id:this.scanCodeData.id,
|
655
|
|
- operationType:'pathologyReceive',
|
|
646
|
+ operationType:this.operationType,
|
656
|
647
|
batchNo:this.batchNo
|
657
|
648
|
};
|
658
|
649
|
this.btnMultiLoading = true;
|
|
@@ -667,7 +658,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
667
|
658
|
});
|
668
|
659
|
}
|
669
|
660
|
|
670
|
|
- // 多只标本打包
|
|
661
|
+ // 多只标本扫描
|
671
|
662
|
submitMultiScanForm(){
|
672
|
663
|
let data1 = JSON.parse(localStorage.getItem("scanCodeData"))
|
673
|
664
|
this.scanCodeData = data1.data[0]
|
|
@@ -679,7 +670,7 @@ export class PathologyCheckComponent implements OnInit, OnDestroy {
|
679
|
670
|
}
|
680
|
671
|
let data: any = {
|
681
|
672
|
id:this.scanCodeData.id,
|
682
|
|
- operationType:'pathologyPack',
|
|
673
|
+ operationType:this.operationType,
|
683
|
674
|
batchNo:this.batchNo
|
684
|
675
|
};
|
685
|
676
|
this.btnMultiLoading = true;
|