소스 검색

工单权限修改

maotao 5 달 전
부모
커밋
b647e0b0fc
2개의 변경된 파일11개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      pages/incidentList/incidentList.vue
  2. 9 3
      pages/repair/rapidRepNext.vue

+ 2 - 2
pages/incidentList/incidentList.vue

@@ -109,14 +109,14 @@
109 109
 		if(loginUserStore.loginUser.user&&loginUserStore.loginUser.user.group){
110 110
 			loginUserStore.loginUser.user.group.forEach(item => {
111 111
 			    if(data.currentLog){
112
-			        if (item.id == data.candidateGroupId) {
112
+			        if (item.id == data.currentLog.groupId) {
113 113
 			            inGroup = true;
114 114
 			        }
115 115
 			    }
116 116
 			})
117 117
 		}
118 118
     
119
-    return data.state.value === 'pending' && (inUser || inUser2 || inGroup) && qiangdan.value;
119
+    return data.state.value === 'pending' && (inUser2 || inGroup) && qiangdan.value;
120 120
   })
121 121
 
122 122
   // 转换协同人

+ 9 - 3
pages/repair/rapidRepNext.vue

@@ -387,7 +387,10 @@
387 387
         value: v.id,
388 388
 				floor: v.floor
389 389
       }));
390
-			
390
+			let isDeptId = dataInfo.repairTypeList.filter(i=>i.value==dataInfo.department)
391
+			if(isDeptId.length==0){
392
+				dataInfo.department = ''
393
+			}
391 394
     })
392 395
   }
393 396
   
@@ -458,7 +461,10 @@
458 461
 			let data = repairIncident.value.find(i=>i.value=='dept')
459 462
 			dataInfo.incidentData.repairIncidentType.id = data.id
460 463
 			let deptItem = dataInfo.repairTypeList.find(i=>i.value == dataInfo.department)
461
-			postData.incident.place.id = deptItem.floor.id
464
+			console.log(333,deptItem)
465
+			if(deptItem){
466
+				postData.incident.place.id = deptItem.floor.id
467
+			}
462 468
 		}else if(dataInfo.tabActiveValue === 'overtime'){
463 469
 			let data = repairIncident.value.find(i=>i.value=='public')
464 470
 			dataInfo.incidentData.repairIncidentType.id = data.id
@@ -584,7 +590,7 @@
584 590
   function submitHandler(){
585 591
     console.log(dataInfo);
586 592
 		if(dataInfo.tabActiveValue=='doing'){
587
-			if(dataInfo.dept==''){
593
+			if(dataInfo.department==''){
588 594
 			  uni.showToast({
589 595
 			  	icon: 'none',
590 596
 			    title: '请选择报修科室'