|
@@ -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.relevance" @click="row.relevance = false">取消关联</el-button>
|
|
|
- <el-button size="small" type="primary" v-else @click="row.relevance = true">关联</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>
|
|
@@ -310,9 +310,23 @@ const subplanSaveClick = () => {
|
|
|
|
|
|
|
|
|
const relatedModal = ref(false)
|
|
|
+const rePlanid=ref('')
|
|
|
const relatedModalShow = (row) => {
|
|
|
relatedModal.value = true
|
|
|
getListByProjectId(row.projectId)
|
|
|
+ rePlanid.value=row.id
|
|
|
+}
|
|
|
+//关联回款
|
|
|
+const relation=async(row,type)=>{
|
|
|
+ const {error, code, data,msg} = await projectApi.relationPlanAndReturned( {
|
|
|
+ planId:rePlanid.value,
|
|
|
+ returnedId:row.id,
|
|
|
+ type
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message.success(msg)
|
|
|
+ getListByProjectId(row.projectId).then()
|
|
|
+ }
|
|
|
}
|
|
|
//表格
|
|
|
const tableRelatedColumn = [
|