ソースを参照

工单权限修改

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
 		if(loginUserStore.loginUser.user&&loginUserStore.loginUser.user.group){
109
 		if(loginUserStore.loginUser.user&&loginUserStore.loginUser.user.group){
110
 			loginUserStore.loginUser.user.group.forEach(item => {
110
 			loginUserStore.loginUser.user.group.forEach(item => {
111
 			    if(data.currentLog){
111
 			    if(data.currentLog){
112
-			        if (item.id == data.candidateGroupId) {
112
+			        if (item.id == data.currentLog.groupId) {
113
 			            inGroup = true;
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
         value: v.id,
387
         value: v.id,
388
 				floor: v.floor
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
 			let data = repairIncident.value.find(i=>i.value=='dept')
461
 			let data = repairIncident.value.find(i=>i.value=='dept')
459
 			dataInfo.incidentData.repairIncidentType.id = data.id
462
 			dataInfo.incidentData.repairIncidentType.id = data.id
460
 			let deptItem = dataInfo.repairTypeList.find(i=>i.value == dataInfo.department)
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
 		}else if(dataInfo.tabActiveValue === 'overtime'){
468
 		}else if(dataInfo.tabActiveValue === 'overtime'){
463
 			let data = repairIncident.value.find(i=>i.value=='public')
469
 			let data = repairIncident.value.find(i=>i.value=='public')
464
 			dataInfo.incidentData.repairIncidentType.id = data.id
470
 			dataInfo.incidentData.repairIncidentType.id = data.id
@@ -584,7 +590,7 @@
584
   function submitHandler(){
590
   function submitHandler(){
585
     console.log(dataInfo);
591
     console.log(dataInfo);
586
 		if(dataInfo.tabActiveValue=='doing'){
592
 		if(dataInfo.tabActiveValue=='doing'){
587
-			if(dataInfo.dept==''){
593
+			if(dataInfo.department==''){
588
 			  uni.showToast({
594
 			  uni.showToast({
589
 			  	icon: 'none',
595
 			  	icon: 'none',
590
 			    title: '请选择报修科室'
596
 			    title: '请选择报修科室'