liuhairui 1 yıl önce
ebeveyn
işleme
e3215f2a03
1 değiştirilmiş dosya ile 25 ekleme ve 17 silme
  1. 25 17
      src/view/performance/chejianbaogong.vue

+ 25 - 17
src/view/performance/chejianbaogong.vue

@@ -2589,15 +2589,19 @@ const gyupdateCompanyFunc = async (row) => {
 }
 //班组人员及分配比例右键
 const bzonRightClick = async (row) => {
-  console.log(roww.value)
-  ElMessageBox.confirm('确定切换班组吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-	  console.log(1121111)
-    SetMachineTeams(roww.value)
-  })
+	 console.log(roww.value)
+	if(roww.value === null || roww.value === ''){
+		   ElMessage({type: 'warning',message: '请选择 设备作业清单工单后,再操作此功能' })
+	}else{
+		  ElMessageBox.confirm('确定切换班组吗?', '提示', {
+			confirmButtonText: '确定',
+			cancelButtonText: '取消',
+			type: 'warning'
+		  }).then(() => {
+				console.log(1121111)
+				SetMachineTeams(roww.value)
+		  })
+	} 
 }
 //数据接口调用
 const SetMachineTeams = async(row) => {
@@ -5232,14 +5236,18 @@ const yjupdateCompanyFunc = async(row) => {
 //设备作业清单右键
 const yjonRightClick = async(row) => {
   console.log(rowws.value)
-  ElMessageBox.confirm('确定切换当前工单为工作工单吗?', '提示', {
-    confirmButtonText: '确定',
-    cancelButtonText: '取消',
-    type: 'warning'
-  }).then(() => {
-	    location.reload();
-    setMachineTeams(rowws.value)
-  })
+  if(rowws.value === null || rowws.value === ''){
+	   ElMessage({type: 'warning',message: '请选择 设备作业清单工单后,再操作此功能' })
+  }else{
+	  ElMessageBox.confirm('确定切换当前工单为工作工单吗?', '提示', {
+	    confirmButtonText: '确定',
+	    cancelButtonText: '取消',
+	    type: 'warning'
+	  }).then(() => {
+	  	    location.reload();
+	    setMachineTeams(rowws.value)
+	  })
+  } 
 }
 
 const setMachineTeams = async(row) => {