|
@@ -43,7 +43,7 @@
|
|
|
|
|
|
</template>
|
|
|
<template #planDays="{row,index}">
|
|
|
- <el-input v-model="row.planDays" v-if="row.isEdit"/>
|
|
|
+ <el-input v-model="row.planDays" v-if="row.isEdit" disabled/>
|
|
|
<span v-else>{{row.planDays}}</span>
|
|
|
</template>
|
|
|
<!-- <template #key9="{row,index}">
|
|
@@ -51,7 +51,7 @@
|
|
|
<span v-else>{{row.key9}}</span>
|
|
|
</template> -->
|
|
|
<template #action="{row,index}">
|
|
|
- <el-button size="small" type="success" v-if="row.isEdit" @click="row.isEdit = false">保存</el-button>
|
|
|
+ <el-button size="small" type="success" v-if="row.isEdit" @click="getWorkDays(row)">保存</el-button>
|
|
|
<el-button size="small" type="primary" v-else @click="row.isEdit = true">编辑</el-button>
|
|
|
<el-button size="small" type="warning" @click="relatedModalShow(row)">关联回款</el-button>
|
|
|
<el-button size="small" type="danger" @click="subplanModalShow(row)">分解子计划</el-button>
|
|
@@ -97,12 +97,17 @@
|
|
|
<span >{{row.planEndTime?row.planEndTime:''}}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
- <template #planDays="{row,index}">
|
|
|
- <el-input v-model="row.planDays"/>
|
|
|
+ <template #planDays="{row,index}" >
|
|
|
+ <!-- <el-input v-model="row.planDays" disabled/> -->
|
|
|
+ <el-input v-model="row.planDays" disabled />
|
|
|
</template>
|
|
|
<template #key9="{row,index}">
|
|
|
<el-input v-model="row.key9"/>
|
|
|
</template>
|
|
|
+ <template #action="{row,index}">
|
|
|
+ <el-button size="small" type="success" v-if="row.isEdit" @click="getWorkDays(row)">保存</el-button>
|
|
|
+ <el-button size="small" type="primary" v-else @click="row.isEdit = true">编辑</el-button>
|
|
|
+ </template>
|
|
|
</HcTable>
|
|
|
</HcDialog>
|
|
|
|
|
@@ -290,6 +295,7 @@ const tableSubplanColumn = [
|
|
|
{key: 'planTarget', name: '完成指标', minWidth: '200', align: 'center', isTooltip: true},
|
|
|
{key: 'key7', name: '计划起止日期', width: '280', align: 'center'},
|
|
|
{key: 'planDays', name: '预计工作量(小数/整数/天)', width: '160', align: 'center'},
|
|
|
+ {key: 'action', name: '操作', width: '80', align: 'center', fixed: 'right'},
|
|
|
]
|
|
|
const tableSubplanData = ref([
|
|
|
{id: 1, key1: 'xx', key2: 'xx', key3: 'xx', key4: 'xx', key5: 'xx', key6: 'xx', key7: 'xx', key8: 'xx', key9: 'xx', key10: 'xx'},
|
|
@@ -324,6 +330,24 @@ const relatedModalShow = (row) => {
|
|
|
rePlanid.value=row.id
|
|
|
getListByProjectId(row.projectId)
|
|
|
|
|
|
+}
|
|
|
+//保存获取工作时长
|
|
|
+const getWorkDays=async(row)=>{
|
|
|
+ row.isEdit = false
|
|
|
+ if(row?.planStartTime&&row?.planEndTime){
|
|
|
+ const {error, code, data,msg} = await projectApi.getWorkDays( {
|
|
|
+ startDate:row.planStartTime,
|
|
|
+ endDate:row.planEndTime,
|
|
|
+
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ if(data){
|
|
|
+ row.planDays=data
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//关联回款
|
|
|
const relation=async(row,type)=>{
|