|
@@ -48,72 +48,70 @@
|
|
<HcCard actionUi="text-center" :title="formBaseModel.projectName">
|
|
<HcCard actionUi="text-center" :title="formBaseModel.projectName">
|
|
<template #extra>
|
|
<template #extra>
|
|
<HcNewSwitch :datas="tabTab" :keys="tabKey" @change="tabChange" :round="false"/>
|
|
<HcNewSwitch :datas="tabTab" :keys="tabKey" @change="tabChange" :round="false"/>
|
|
-
|
|
|
|
-
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<HcTable :isIndex="false" :column="tableColumn" :datas="tableData">
|
|
<HcTable :isIndex="false" :column="tableColumn" :datas="tableData">
|
|
-
|
|
|
|
<template #deptId="{row,index}">
|
|
<template #deptId="{row,index}">
|
|
- <el-select v-model="row.deptId" block placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="row.deptId" block placeholder="请选择" :disabled="!row.isEdit">
|
|
<el-option v-for="item in departMent" :label="item.deptName" :value="item.id"/>
|
|
<el-option v-for="item in departMent" :label="item.deptName" :value="item.id"/>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
<template #costType="{row,index}">
|
|
<template #costType="{row,index}">
|
|
- <el-select v-model="row.costType" block placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="row.costType" block placeholder="请选择" :disabled="!row.isEdit">
|
|
<el-option v-for="item in costTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
<el-option v-for="item in costTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
<template #projectProcess="{row,index}">
|
|
<template #projectProcess="{row,index}">
|
|
- <el-select v-model="row.projectProcess" block placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="row.projectProcess" block placeholder="请选择" :disabled="!row.isEdit">
|
|
<el-option v-for="item in processList" :label="item.name" :value="item.id"/>
|
|
<el-option v-for="item in processList" :label="item.name" :value="item.id"/>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
<template #budgetType="{row,index}">
|
|
<template #budgetType="{row,index}">
|
|
- <el-select v-model="row.budgetType">
|
|
|
|
|
|
+ <el-select v-model="row.budgetType" :disabled="!row.isEdit">
|
|
<el-option v-for="item in budgetTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
<el-option v-for="item in budgetTypeList" :label="item.dictName" :value="item.dictValue"/>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
<template #taskDetail="{row,index}">
|
|
<template #taskDetail="{row,index}">
|
|
- <el-select v-model="row.taskDetail" :getdata="budgetTypeChange(row?.budgetType,index)">
|
|
|
|
|
|
+ <el-select v-model="row.taskDetail" :getdata="budgetTypeChange(row?.budgetType,index)" :disabled="!row.isEdit">
|
|
<el-option v-for="item in taskDetailList[index]" :label="item.dictName" :value="item.dictValue"/>
|
|
<el-option v-for="item in taskDetailList[index]" :label="item.dictName" :value="item.dictValue"/>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
<template #budgetDays="{row,index}">
|
|
<template #budgetDays="{row,index}">
|
|
- <el-input v-model="row.budgetDays"/>
|
|
|
|
|
|
+ <el-input v-model="row.budgetDays" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #postType="{row,index}">
|
|
<template #postType="{row,index}">
|
|
- <el-select v-model="row.postType">
|
|
|
|
|
|
+ <el-select v-model="row.postType" :disabled="!row.isEdit">
|
|
<el-option v-for="item in postTypeList" :label="item.dictName" :value="item.id"/>
|
|
<el-option v-for="item in postTypeList" :label="item.dictName" :value="item.id"/>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template #staffCount="{row,index}">
|
|
<template #staffCount="{row,index}">
|
|
- <el-input v-model="row.staffCount"/>
|
|
|
|
|
|
+ <el-input v-model="row.staffCount" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #budgetStaffCost="{row,index}">
|
|
<template #budgetStaffCost="{row,index}">
|
|
<el-input v-model="row.budgetStaffCost" disabled/>
|
|
<el-input v-model="row.budgetStaffCost" disabled/>
|
|
</template>
|
|
</template>
|
|
<template #budgetTravelExpense="{row,index}">
|
|
<template #budgetTravelExpense="{row,index}">
|
|
- <el-input v-model="row.budgetTravelExpense" />
|
|
|
|
|
|
+ <el-input v-model="row.budgetTravelExpense" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #outsourceUnitPrice="{row,index}">
|
|
<template #outsourceUnitPrice="{row,index}">
|
|
- <el-input v-model="row.outsourceUnitPrice"/>
|
|
|
|
|
|
+ <el-input v-model="row.outsourceUnitPrice" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #outsourcePeopleCount="{row,index}">
|
|
<template #outsourcePeopleCount="{row,index}">
|
|
- <el-input v-model="row.outsourcePeopleCount"/>
|
|
|
|
|
|
+ <el-input v-model="row.outsourcePeopleCount" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #outsourceCountMoney="{row,index}">
|
|
<template #outsourceCountMoney="{row,index}">
|
|
<el-input v-model="row.outsourceCountMoney" disabled />
|
|
<el-input v-model="row.outsourceCountMoney" disabled />
|
|
</template>
|
|
</template>
|
|
<template #otherBudgetMoney="{row,index}">
|
|
<template #otherBudgetMoney="{row,index}">
|
|
- <el-input v-model="row.otherBudgetMoney" />
|
|
|
|
|
|
+ <el-input v-model="row.otherBudgetMoney" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #budgetCountMoney="{row,index}">
|
|
<template #budgetCountMoney="{row,index}">
|
|
- <el-input v-model="row.budgetCountMoney"/>
|
|
|
|
|
|
+ <el-input v-model="row.budgetCountMoney" disabled/>
|
|
</template>
|
|
</template>
|
|
<template #budgetRemark="{row,index}">
|
|
<template #budgetRemark="{row,index}">
|
|
- <el-input v-model="row.budgetRemark" />
|
|
|
|
|
|
+ <el-input v-model="row.budgetRemark" :disabled="!row.isEdit"/>
|
|
</template>
|
|
</template>
|
|
<template #key15="{row,index}">
|
|
<template #key15="{row,index}">
|
|
<el-input v-model="row.key15"/>
|
|
<el-input v-model="row.key15"/>
|
|
@@ -123,6 +121,8 @@
|
|
<HcIcon name="add"/>
|
|
<HcIcon name="add"/>
|
|
<span>新增</span>
|
|
<span>新增</span>
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button size="small" type="success" v-if="row.isEdit" @click="saveRow(row)">保存</el-button>
|
|
|
|
+ <el-button size="small" type="primary" v-else @click="row.isEdit = true">编辑</el-button>
|
|
<el-button size="small" type="danger" @click="delRow(index)" :disabled="row?.approve===1">
|
|
<el-button size="small" type="danger" @click="delRow(index)" :disabled="row?.approve===1">
|
|
<HcIcon name="delete-bin"/>
|
|
<HcIcon name="delete-bin"/>
|
|
<span>删除</span>
|
|
<span>删除</span>
|
|
@@ -259,13 +259,9 @@ const getPostDict=async(type)=>{
|
|
const {error, code, data} = await costApi.getPostDict()
|
|
const {error, code, data} = await costApi.getPostDict()
|
|
if (!error && code === 200) {
|
|
if (!error && code === 200) {
|
|
postTypeList.value=getArrValue(data)
|
|
postTypeList.value=getArrValue(data)
|
|
- // postTypeList.value.forEach((ele)=>{
|
|
|
|
- // ele.code=parseInt(ele.code)
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- postTypeList.value={}
|
|
|
|
|
|
+ postTypeList.value=[]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//费用分摊部门
|
|
//费用分摊部门
|
|
@@ -389,7 +385,7 @@ const tableColumn = [
|
|
{key: 'otherBudgetMoney', name: '其他预算金额', width: '160', align: 'center'},
|
|
{key: 'otherBudgetMoney', name: '其他预算金额', width: '160', align: 'center'},
|
|
{key: 'budgetCountMoney', name: '总预算金额', width: '160', align: 'center'},
|
|
{key: 'budgetCountMoney', name: '总预算金额', width: '160', align: 'center'},
|
|
{key: 'budgetRemark', name: '测算备注', width: '160', align: 'center'},
|
|
{key: 'budgetRemark', name: '测算备注', width: '160', align: 'center'},
|
|
- {key: 'action', name: '操作', width: '200', align: 'center', fixed: 'right'},
|
|
|
|
|
|
+ {key: 'action', name: '操作', width: '300', align: 'center', fixed: 'right'},
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
@@ -404,6 +400,22 @@ const delRow=(index)=>{
|
|
tableData.value.push({})
|
|
tableData.value.push({})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+}
|
|
|
|
+//保存单行
|
|
|
|
+const saveRow=async(row)=>{
|
|
|
|
+ row.isEdit=false
|
|
|
|
+ //统一测算金额
|
|
|
|
+ const {error, code, data} = await costApi.saveCountMoney(row)
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ let obj=getObjValue(data)
|
|
|
|
+ row.budgetCountMoney=obj.budgetCountMoney
|
|
|
|
+ row.outsourceCountMoney=obj.outsourceCountMoney
|
|
|
|
+ row.budgetStaffCost=obj.budgetStaffCost
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
//取消并返回
|
|
//取消并返回
|
|
const goBackClick = () => {
|
|
const goBackClick = () => {
|