Răsfoiți Sursa

关联回款

duy 2 ani în urmă
părinte
comite
f99b175c20
1 a modificat fișierele cu 6 adăugiri și 5 ștergeri
  1. 6 5
      src/views/program/project/form.vue

+ 6 - 5
src/views/program/project/form.vue

@@ -110,8 +110,8 @@
         <HcDialog bgColor="#ffffff" isToBody isTable :footer="false" :show="relatedModal" title="关联回款里程碑" widths="70%" @close="relatedCloseClick">
             <HcTable :column="tableRelatedColumn" :datas="tableRelatedData">
                 <template #action="{row,index}">
-                    <el-button size="small" type="success" v-if="row.isRelation=='1'" @click="relation(row,'0')">取消关联</el-button>
-                    <el-button size="small" type="primary" v-else @click="relation(row,'1')">关联</el-button>
+                    <el-button size="small" type="success" v-if="row.isRelation==1" @click="relation(row,0)">取消关联</el-button>
+                    <el-button size="small" type="primary" v-else @click="relation(row,1)">关联</el-button>
                 </template>
             </HcTable>
         </HcDialog>
@@ -313,8 +313,9 @@ const relatedModal = ref(false)
 const rePlanid=ref('')
 const relatedModalShow = (row) => {
     relatedModal.value = true
-    getListByProjectId(row.projectId)
     rePlanid.value=row.id
+    getListByProjectId(row.projectId)
+   
 }
 //关联回款
 const relation=async(row,type)=>{
@@ -346,8 +347,8 @@ const tableRelatedData = ref([
 ])
 //合同里程碑
 
-const getListByProjectId=async(projectId)=>{
-    const {error, code, data} = await contractApi.getListByProjectId({projectId})
+const getListByProjectId=async(projectId,planId)=>{
+    const {error, code, data} = await contractApi.getListByProjectId({projectId,planId:rePlanid.value})
     if (!error && code === 200) {
         tableRelatedData.value=getArrValue(data)