Bläddra i källkod

项目计划预算

duy 2 år sedan
förälder
incheckning
38aba3a6f2
2 ändrade filer med 14 tillägg och 2 borttagningar
  1. 1 0
      src/api/modules/program/project.js
  2. 13 2
      src/views/program/project/form.vue

+ 1 - 0
src/api/modules/program/project.js

@@ -39,6 +39,7 @@ export default {
         return httpApi({
             url: '/api/blade-control/projectCostBudget/updateChildrenPlan',
             method: 'post',
+            isDelay:true,
             data: form
         }, msg);
     },

+ 13 - 2
src/views/program/project/form.vue

@@ -254,7 +254,7 @@
         </template>
 
         <!--分解子计划-->
-        <HcDialog bgColor="#ffffff" isToBody isTable
+        <HcDialog bgColor="#ffffff" isToBody isTable isRowFooter
                   title="分解子计划" widths="80%"
                   saveText="保存"
                   :show="subplanModal"
@@ -288,9 +288,13 @@
                     <el-input v-model="row.key9" clearable :disabled="row?.isShowDelete===0"/>
                 </template>
                 <template #action="{row,index}">
-                <el-button size="small" type="primary" @click="delSubplan(row,index)" :disabled="row?.isShowDelete===0">删除</el-button>
+                <el-button size="small" type="danger" @click="delSubplan(row,index)" :disabled="row?.isShowDelete===0">删除</el-button>
             </template>
+
             </HcTable>
+            <template #footer>
+                <el-button  type="primary" @click="updateChildPlanClick" size="large" :loading="updateChildPlanLoading">保存</el-button>
+            </template>
         </HcDialog>
 
         <!--关联回款里程碑-->
@@ -608,12 +612,15 @@ const updateMainPlanClick=async(row)=>{
     }
 
 }
+const updateChildPlanLoading=ref(false)
 //编辑子计划传入父级
 const updateChildPlanClick=async()=>{
     subPlanItem.value.childrenList=tableSubplanData.value
+    updateChildPlanLoading.value=true
     const {error, code, data,msg} = await projectApi.updateChildrenPlan( 
         subPlanItem.value,
     )
+    updateChildPlanLoading.value=false
     if (!error && code === 200) {
         window.$message.success(msg)
         tableData.value.forEach((ele)=>{
@@ -630,6 +637,10 @@ const updateChildPlanClick=async()=>{
                 ele.planTaskTypeValue=data.planTaskTypeValue
                 ele.planStartTime=data.planStartTime
                 ele.planEndTime=data.planEndTime
+                //子计划不显示保存按钮,且其他按钮禁用
+                ele.childrenList.forEach((item)=>{
+                    item.isEdit=false
+                })
                 
             }
         })