|
@@ -49,14 +49,14 @@
|
|
|
<template #extra>
|
|
|
<HcNewSwitch :datas="tabTab" :keys="tabKey" :round="false" @change="tabChange" />
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<HcTable :is-index="false" :column="tableColumn" :datas="tableData" :loading="tableLoaing">
|
|
|
- <template #deptId="{ row }">
|
|
|
+ <template #deptId="{ row }">
|
|
|
<el-select v-model="row.deptId" block placeholder="请选择" :disabled="!row.isEdit">
|
|
|
<el-option v-for="item in departMent" :key="item.id" :label="item.deptName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- <template #costType="{ row }">
|
|
|
+ <template #costType="{ row }">
|
|
|
<el-select v-model="row.costType" block placeholder="请选择" :disabled="!row.isEdit">
|
|
|
<el-option v-for="item in costTypeList" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" />
|
|
|
</el-select>
|
|
@@ -84,7 +84,7 @@
|
|
|
<el-option v-for="item in postTypeList" :key="item.id" :label="item.dictName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<template #staffCount="{ row }">
|
|
|
<el-input v-model="row.staffCount" :disabled="!row.isEdit" />
|
|
|
</template>
|
|
@@ -108,13 +108,13 @@
|
|
|
</template>
|
|
|
<template #budgetCountMoney="{ row }">
|
|
|
<el-input v-model="row.budgetCountMoney" disabled />
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
<template #budgetRemark="{ row }">
|
|
|
<el-input v-model="row.budgetRemark" :disabled="!row.isEdit" />
|
|
|
</template>
|
|
|
<template #key15="{ row }">
|
|
|
<el-input v-model="row.key15" />
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
<template #action="{ row, index }">
|
|
|
<el-button size="small" type="primary" @click="addRow(row, index)">
|
|
|
<HcIcon name="add" />
|
|
@@ -137,7 +137,7 @@
|
|
|
<HcIcon name="arrow-go-back" />
|
|
|
<span>取消并返回</span>
|
|
|
</el-button>
|
|
|
- <el-button size="large" type="primary" hc-btn :loading="submitLoaing" @click="submitForm">
|
|
|
+ <el-button size="large" type="primary" hc-btn :loading="submitLoaing" @click="submitForm">
|
|
|
<HcIcon name="check-double" />
|
|
|
<span>提交保存</span>
|
|
|
</el-button>
|
|
@@ -179,14 +179,14 @@ onActivated(() => {
|
|
|
}
|
|
|
|
|
|
getCostTypeDict()
|
|
|
-
|
|
|
+
|
|
|
getPostDict()
|
|
|
getdepartmentListData()
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
|
|
|
|
|
@@ -230,7 +230,7 @@ const getBudgetTypeList = async ()=>{
|
|
|
const { error, code, data } = await costApi.getSecondSubject2()
|
|
|
if (!error && code === 200) {
|
|
|
budgetTypeList.value = getArrValue(data)
|
|
|
-
|
|
|
+
|
|
|
|
|
|
} else {
|
|
|
budgetTypeList.value = {}
|
|
@@ -254,7 +254,7 @@ const taskDetailList = ref({})
|
|
|
// taskDetailList.value[index] = {}
|
|
|
// }
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
// }
|
|
|
const changeBudgetType = (val, index)=>{
|
|
|
budgetTypeList.value.forEach((ele)=>{
|
|
@@ -319,18 +319,18 @@ const tabsData = ref([
|
|
|
{ icon: 'file-list-2', label: '成本测算', key: 'table' },
|
|
|
])
|
|
|
const tabsClick = (key) => {
|
|
|
-
|
|
|
+
|
|
|
if (!formBaseModel.value.projectId) {
|
|
|
window.$message.warning('请先在基础信息栏选择项目')
|
|
|
} else {
|
|
|
if (key === 'table') {
|
|
|
tabsKey.value = key
|
|
|
-
|
|
|
+
|
|
|
getProcessList(formBaseModel.value.projectId)
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -383,7 +383,7 @@ const tabChange = ({ key }) => {
|
|
|
tableData.value = bulidUnitData.value.length > 0 ? bulidUnitData.value : [{}]
|
|
|
formBaseModel.value.buildUnit = tableData.value
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -403,8 +403,8 @@ const tableColumn = [
|
|
|
{ key: 'outsourcePeopleCount', name: '外包数量', width: '160', align: 'center' },
|
|
|
{ key: 'outsourceCountMoney', name: '外包金额', width: '160', align: 'center' },
|
|
|
{ key: 'otherBudgetMoney', name: '其他预算金额', width: '160', align: 'center' },
|
|
|
- { key: 'budgetCountMoney', name: '总预算金额', width: '160', align: 'center' },
|
|
|
{ key: 'budgetRemark', name: '测算备注', width: '160', align: 'center' },
|
|
|
+ { key: 'budgetCountMoney', name: '总预算金额', width: '160', align: 'center', fixed: 'right' },
|
|
|
{ key: 'action', name: '操作', width: '300', align: 'center', fixed: 'right' },
|
|
|
]
|
|
|
|
|
@@ -422,7 +422,7 @@ const delRow = (index)=>{
|
|
|
if ( tableData.value.length === 0) {
|
|
|
tableData.value.push({})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
//保存单行
|
|
|
const saveRow = async (row)=>{
|
|
@@ -436,7 +436,7 @@ const saveRow = async (row)=>{
|
|
|
row.budgetStaffCost = obj.budgetStaffCost
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
//取消并返回
|
|
|
const goBackClick = () => {
|
|
@@ -446,7 +446,7 @@ const isEmptyObj = (obj)=> {
|
|
|
let arr = Object.keys(obj)
|
|
|
return (arr.length === 0)
|
|
|
|
|
|
-}
|
|
|
+}
|
|
|
|
|
|
|
|
|
//保存submitForm
|
|
@@ -455,19 +455,19 @@ const submitForm = async ()=>{
|
|
|
console.log(formBaseModel.value.supervisorUnit, 'formBaseModel.value.supervisorUnit')
|
|
|
//取消空对象提交
|
|
|
if (formBaseModel.value?.supervisorUnit?.length > 0) {
|
|
|
- let suisnullObj = isEmptyObj(formBaseModel.value?.supervisorUnit[0])
|
|
|
+ let suisnullObj = isEmptyObj(formBaseModel.value?.supervisorUnit[0])
|
|
|
if (suisnullObj === true) {
|
|
|
formBaseModel.value.supervisorUnit = null
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
if (formBaseModel.value?.constructUnit?.length > 0) {
|
|
|
- let coisnullObj = isEmptyObj(formBaseModel.value?.constructUnit[0])
|
|
|
+ let coisnullObj = isEmptyObj(formBaseModel.value?.constructUnit[0])
|
|
|
if (coisnullObj) {
|
|
|
formBaseModel.value.constructUnit = null
|
|
|
}
|
|
|
}
|
|
|
if (formBaseModel.value?.buildUnit?.length > 0) {
|
|
|
- let buisnullObj = isEmptyObj(formBaseModel.value?.buildUnit[0])
|
|
|
+ let buisnullObj = isEmptyObj(formBaseModel.value?.buildUnit[0])
|
|
|
if (buisnullObj) {
|
|
|
formBaseModel.value.buildUnit = null
|
|
|
}
|
|
@@ -481,12 +481,12 @@ const submitForm = async ()=>{
|
|
|
submitLoaing.value = false
|
|
|
if (!error && code === 200) {
|
|
|
window.$message.success(msg)
|
|
|
-
|
|
|
+
|
|
|
router.push({
|
|
|
name: 'project-cost',
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|