htc hai 1 semana
pai
achega
38ed4f9dd7
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/views/modules/agent/program.vue

+ 4 - 1
src/views/modules/agent/program.vue

@@ -642,7 +642,7 @@
     });
     const xmjzRef = ref(null);
     const buttonLoading7 = ref(false);
-
+    const programTeamNum = ref(0);
 
     const handleChangeTab = (idx) => {
         tidx.value = idx;
@@ -684,6 +684,7 @@
     };
 
     const handleExpand = (item, index) => {
+        programTeamNum.value = 0;
         programid.value = item.id;
         programTeamForm.value.companyName = item.enterpriseName;
         companyList.value.forEach(c => { c.select = false; });
@@ -694,6 +695,7 @@
         getTeamListById({enterpriseId: programid.value}).then(res=>{
             if(res.code!==0) proxy.$message.error(res.msg);
             teamList.value = res.data;
+            programTeamNum.value = res.data?.length||0;
         })
     }
     const handleSelect = (team, index) => {
@@ -714,6 +716,7 @@
 
     const handleAddTeam = () => {
         if(!programid.value) return proxy.$message.error('请先选择项目')
+        if(programTeamNum.value>0) return proxy.$message.error('该项目已有团队,请先删除或修改')
         programTeamShow.value = true;
     };