|
@@ -1040,7 +1040,7 @@ export class FuwutaiComponent implements OnInit {
|
1040
|
1040
|
//呼入回调函数
|
1041
|
1041
|
TLWSA.onCallin = function (jso) {
|
1042
|
1042
|
console.log(jso);
|
1043
|
|
- _this.incidentModel = {};
|
|
1043
|
+ _this.incidentModel = { repairIncidentType: 'dept' };
|
1044
|
1044
|
_this.callNumber = _this.incidentModel.incomingPhone = jso.caller;//来电的电话
|
1045
|
1045
|
_this.incidentModel.callID = jso.crs;//来电的话机id
|
1046
|
1046
|
if (jso) {
|
|
@@ -1426,20 +1426,20 @@ export class FuwutaiComponent implements OnInit {
|
1426
|
1426
|
// 200签入 201摘机 202来电
|
1427
|
1427
|
if (data.status == 200 && data.phone) {
|
1428
|
1428
|
this.incomingService.setPhoneNumber(phoneNumber);
|
1429
|
|
- this.incidentModel = {};
|
|
1429
|
+ this.incidentModel = { repairIncidentType: 'dept' };
|
1430
|
1430
|
this.incidentMsg = {};
|
1431
|
1431
|
this.incidentModel.callID = data.callId || undefined;
|
1432
|
1432
|
this.msg.info('签入成功');
|
1433
|
1433
|
this.cancelBindExtensionNumber();
|
1434
|
1434
|
} else if (data.status == 201 && data.phone) {
|
1435
|
|
- this.incidentModel = {};
|
|
1435
|
+ this.incidentModel = { repairIncidentType: 'dept' };
|
1436
|
1436
|
this.incidentMsg = {};
|
1437
|
1437
|
this.incidentModel.callID = data.callId || undefined;
|
1438
|
1438
|
|
1439
|
1439
|
this.incidentModel.incomingPhone = this.callNumber = this.incidentModel.contactsInformation = data.phone;
|
1440
|
1440
|
this.searchBxDept();
|
1441
|
1441
|
} else if (data.status == 201 && data.phone === "") {
|
1442
|
|
- this.incidentModel = {};
|
|
1442
|
+ this.incidentModel = { repairIncidentType: 'dept' };
|
1443
|
1443
|
this.incidentMsg = {};
|
1444
|
1444
|
this.incidentModel.callID = data.callId || undefined;
|
1445
|
1445
|
//没绑定科室
|
|
@@ -2382,7 +2382,11 @@ export class FuwutaiComponent implements OnInit {
|
2382
|
2382
|
resetOrderData2(){
|
2383
|
2383
|
this.fileList = [];
|
2384
|
2384
|
this.repairImgs = [];
|
2385
|
|
- this.isRelatedDepartment = true;
|
|
2385
|
+ if(this.incidentModel.repairIncidentType === 'public'){
|
|
2386
|
+ this.isRelatedDepartment = false;
|
|
2387
|
+ }else{
|
|
2388
|
+ this.isRelatedDepartment = true;
|
|
2389
|
+ }
|
2386
|
2390
|
}
|
2387
|
2391
|
// 打开新建工单
|
2388
|
2392
|
deathTasktypeId; //获取这个写死的任务类型的id,送病人回病房
|
|
@@ -2405,6 +2409,7 @@ export class FuwutaiComponent implements OnInit {
|
2405
|
2409
|
this.searchApplicationCategory();
|
2406
|
2410
|
this.searchApplicationPriority();
|
2407
|
2411
|
this.searchApplicationSource();
|
|
2412
|
+ this.getRepairIncidentType();
|
2408
|
2413
|
isInit ? this.searchApplicationDepartment('itsm', undefined, undefined, undefined, true) : this.searchApplicationDepartment('itsm');
|
2409
|
2414
|
isInit && ((this.isRelatedDepartment && this.incidentModel.department) || (!this.isRelatedDepartment && this.incidentModel.hosId) || this.buildType === '报修转事件' ) && this.incidentModel.hosId && this.searchApplicationBuilding();
|
2410
|
2415
|
isInit && this.incidentModel.area && this.searchApplicationFloor();
|
|
@@ -2415,7 +2420,7 @@ export class FuwutaiComponent implements OnInit {
|
2415
|
2420
|
this.fixedTab = "newOrder";
|
2416
|
2421
|
this.currentRTab = 0;
|
2417
|
2422
|
this.rightTitle_tab = [];
|
2418
|
|
- this.incidentModel = isInit ? this.incidentModel : {};
|
|
2423
|
+ this.incidentModel = isInit ? this.incidentModel : { repairIncidentType: 'dept' };
|
2419
|
2424
|
this.incidentMsg = isInit ? this.incidentMsg : {};
|
2420
|
2425
|
this.isBuildOrderAgagin = false;
|
2421
|
2426
|
this.applyDept = null;
|
|
@@ -2457,7 +2462,7 @@ export class FuwutaiComponent implements OnInit {
|
2457
|
2462
|
this.fixedTab = "newOrder";
|
2458
|
2463
|
this.currentRTab = 0;
|
2459
|
2464
|
this.rightTitle_tab = [];
|
2460
|
|
- this.incidentModel = isInit ? this.incidentModel : {};
|
|
2465
|
+ this.incidentModel = isInit ? this.incidentModel : { repairIncidentType: 'dept' };
|
2461
|
2466
|
this.incidentMsg = isInit ? this.incidentMsg : {};
|
2462
|
2467
|
this.isBuildOrderAgagin = false;
|
2463
|
2468
|
this.applyDept = null;
|
|
@@ -2854,6 +2859,7 @@ export class FuwutaiComponent implements OnInit {
|
2854
|
2859
|
"deleteFlag": 0,
|
2855
|
2860
|
"duty": this.incidentModel.duty ? { id: this.incidentModel.duty.id } : undefined,
|
2856
|
2861
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
|
2862
|
+ "repairIncidentType": this.incidentModel.repairIncidentType ? this.repairIncidentTypeList.find(v => v.value === this.incidentModel.repairIncidentType) : undefined,
|
2857
|
2863
|
"alarmType": false,
|
2858
|
2864
|
"department": this.incidentModel.department ? { id: this.incidentModel.department } : undefined,
|
2859
|
2865
|
"contactsInformation": this.incidentModel.contactsInformation,
|
|
@@ -3129,6 +3135,19 @@ export class FuwutaiComponent implements OnInit {
|
3129
|
3135
|
this.applicationSourceList = data || [];
|
3130
|
3136
|
});
|
3131
|
3137
|
}
|
|
3138
|
+ // 报修类型列表
|
|
3139
|
+ repairIncidentTypeList:any[] = [];
|
|
3140
|
+ getRepairIncidentType() {
|
|
3141
|
+ this.mainService.getDictionary("list", "repair_incident_type").subscribe((data) => {
|
|
3142
|
+ this.repairIncidentTypeList = data || [];
|
|
3143
|
+ });
|
|
3144
|
+ }
|
|
3145
|
+ // 选择报修类型
|
|
3146
|
+ changeRepairIncidentType(value){
|
|
3147
|
+ this.incidentModel.department = undefined;
|
|
3148
|
+ this.isRelatedDepartment = false;
|
|
3149
|
+ this.changeApplyRelatedDepartment(this.isRelatedDepartment);
|
|
3150
|
+ }
|
3132
|
3151
|
// 楼栋列表
|
3133
|
3152
|
applicationBuildingList:any[] = [];
|
3134
|
3153
|
searchApplicationBuilding(keyWord?, buildingId?) {
|
|
@@ -3504,6 +3523,11 @@ export class FuwutaiComponent implements OnInit {
|
3504
|
3523
|
maskFlag:any = false;
|
3505
|
3524
|
// 运维-直接解决
|
3506
|
3525
|
directOrder(){
|
|
3526
|
+ if(this.incidentModel.repairIncidentType === 'public' && !this.incidentModel.requester){
|
|
3527
|
+ this.msg.warning('请选择申请人!');
|
|
3528
|
+ return;
|
|
3529
|
+ }
|
|
3530
|
+
|
3507
|
3531
|
if(!this.incidentModel.category){
|
3508
|
3532
|
this.msg.warning('请选择故障现象!');
|
3509
|
3533
|
return;
|
|
@@ -3515,7 +3539,7 @@ export class FuwutaiComponent implements OnInit {
|
3515
|
3539
|
return;
|
3516
|
3540
|
}
|
3517
|
3541
|
|
3518
|
|
- if(!this.incidentModel.department){
|
|
3542
|
+ if(this.incidentModel.repairIncidentType === 'dept' && !this.incidentModel.department){
|
3519
|
3543
|
this.msg.warning('请选择申请科室!');
|
3520
|
3544
|
return;
|
3521
|
3545
|
}
|
|
@@ -3549,6 +3573,11 @@ export class FuwutaiComponent implements OnInit {
|
3549
|
3573
|
}
|
3550
|
3574
|
// 运维-建单并派单
|
3551
|
3575
|
assignOrder(){
|
|
3576
|
+ if(this.incidentModel.repairIncidentType === 'public' && !this.incidentModel.requester){
|
|
3577
|
+ this.msg.warning('请选择申请人!');
|
|
3578
|
+ return;
|
|
3579
|
+ }
|
|
3580
|
+
|
3552
|
3581
|
if(!this.incidentModel.category){
|
3553
|
3582
|
this.msg.warning('请选择故障现象!');
|
3554
|
3583
|
return;
|
|
@@ -3561,7 +3590,7 @@ export class FuwutaiComponent implements OnInit {
|
3561
|
3590
|
return;
|
3562
|
3591
|
}
|
3563
|
3592
|
|
3564
|
|
- if(!this.incidentModel.department){
|
|
3593
|
+ if(this.incidentModel.repairIncidentType === 'dept' && !this.incidentModel.department){
|
3565
|
3594
|
this.msg.warning('请选择申请科室!');
|
3566
|
3595
|
return;
|
3567
|
3596
|
}
|
|
@@ -3610,6 +3639,7 @@ export class FuwutaiComponent implements OnInit {
|
3610
|
3639
|
"description": this.incidentModel.description,
|
3611
|
3640
|
"yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3612
|
3641
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
|
3642
|
+ "repairIncidentType": this.incidentModel.repairIncidentType ? this.repairIncidentTypeList.find(v => v.value === this.incidentModel.repairIncidentType) : undefined,
|
3613
|
3643
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
3614
|
3644
|
"callID": this.incidentModel.callID || undefined,
|
3615
|
3645
|
"incomingPhone": this.incidentModel.incomingPhone || undefined,
|
|
@@ -3684,6 +3714,7 @@ export class FuwutaiComponent implements OnInit {
|
3684
|
3714
|
"description": this.incidentModel.description,
|
3685
|
3715
|
"yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3686
|
3716
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
|
3717
|
+ "repairIncidentType": this.incidentModel.repairIncidentType ? this.repairIncidentTypeList.find(v => v.value === this.incidentModel.repairIncidentType) : undefined,
|
3687
|
3718
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
3688
|
3719
|
"callID": this.incidentModel.callID || undefined,
|
3689
|
3720
|
"incomingPhone": this.incidentModel.incomingPhone || undefined,
|
|
@@ -3730,6 +3761,11 @@ export class FuwutaiComponent implements OnInit {
|
3730
|
3761
|
|
3731
|
3762
|
// 运维-保存
|
3732
|
3763
|
saveOrder(){
|
|
3764
|
+ if(this.incidentModel.repairIncidentType === 'public' && !this.incidentModel.requester){
|
|
3765
|
+ this.msg.warning('请选择申请人!');
|
|
3766
|
+ return;
|
|
3767
|
+ }
|
|
3768
|
+
|
3733
|
3769
|
if(!this.incidentModel.category){
|
3734
|
3770
|
this.msg.warning('请选择故障现象!');
|
3735
|
3771
|
return;
|
|
@@ -3741,7 +3777,7 @@ export class FuwutaiComponent implements OnInit {
|
3741
|
3777
|
return;
|
3742
|
3778
|
}
|
3743
|
3779
|
|
3744
|
|
- if(!this.incidentModel.department){
|
|
3780
|
+ if(this.incidentModel.repairIncidentType === 'dept' && !this.incidentModel.department){
|
3745
|
3781
|
this.msg.warning('请选择申请科室!');
|
3746
|
3782
|
return;
|
3747
|
3783
|
}
|
|
@@ -3784,6 +3820,7 @@ export class FuwutaiComponent implements OnInit {
|
3784
|
3820
|
"description": this.incidentModel.description,
|
3785
|
3821
|
"yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
|
3786
|
3822
|
"requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
|
|
3823
|
+ "repairIncidentType": this.incidentModel.repairIncidentType ? this.repairIncidentTypeList.find(v => v.value === this.incidentModel.repairIncidentType) : undefined,
|
3787
|
3824
|
"acceptUser": { id: this.tool.getCurrentUserId() },
|
3788
|
3825
|
"callID": this.incidentModel.callID || undefined,
|
3789
|
3826
|
"incomingPhone": this.incidentModel.incomingPhone || undefined,
|
|
@@ -4936,6 +4973,7 @@ export class FuwutaiComponent implements OnInit {
|
4936
|
4973
|
incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
|
4937
|
4974
|
incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
|
4938
|
4975
|
incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
|
|
4976
|
+ incidentModel.repairIncidentType && (incidentModel.repairIncidentType = incidentModel.repairIncidentType.value);
|
4939
|
4977
|
incidentModel.source && (incidentModel.source = incidentModel.source.id);
|
4940
|
4978
|
incidentModel.area && (incidentModel.area = incidentModel.area.id);
|
4941
|
4979
|
incidentModel.place && (incidentModel.place = incidentModel.place.id);
|
|
@@ -4966,6 +5004,7 @@ export class FuwutaiComponent implements OnInit {
|
4966
|
5004
|
incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
|
4967
|
5005
|
incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
|
4968
|
5006
|
incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
|
|
5007
|
+ incidentModel.repairIncidentType && (incidentModel.repairIncidentType = incidentModel.repairIncidentType.value);
|
4969
|
5008
|
incidentModel.source && (incidentModel.source = incidentModel.source.id);
|
4970
|
5009
|
incidentModel.area && (incidentModel.area = incidentModel.area.id);
|
4971
|
5010
|
incidentModel.place && (incidentModel.place = incidentModel.place.id);
|
|
@@ -5064,6 +5103,7 @@ export class FuwutaiComponent implements OnInit {
|
5064
|
5103
|
incidentModel.requester && (incidentMsg.requesterPhone = incidentModel.requester.phone);
|
5065
|
5104
|
incidentModel.requester && (incidentMsg.requesterName = incidentModel.requester.name);
|
5066
|
5105
|
incidentModel.requester && (incidentModel.requester = incidentModel.requester.id);
|
|
5106
|
+ incidentModel.repairIncidentType && (incidentModel.repairIncidentType = incidentModel.repairIncidentType.value);
|
5067
|
5107
|
incidentModel.source && (incidentModel.source = incidentModel.source.id);
|
5068
|
5108
|
incidentModel.area && (incidentModel.area = incidentModel.area.id);
|
5069
|
5109
|
incidentModel.place && (incidentModel.place = incidentModel.place.id);
|