|
@@ -114,7 +114,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="关联预算计划" prop="key">
|
|
|
- <el-button type="primary" size="small" @click="budgetModalShow">
|
|
|
+ <el-button type="primary" size="small" @click="budgetModalShow(item,index)">
|
|
|
<HcIcon name="add"/>
|
|
|
<span>关联预算计划</span>
|
|
|
</el-button>
|
|
@@ -160,7 +160,7 @@
|
|
|
@close="budgetCloseClick"
|
|
|
@save="budgetSaveClick"
|
|
|
>
|
|
|
- <HcTable :column="tableBudgetColumn" :datas="tableBudgetData">
|
|
|
+ <HcTable :column="tableBudgetColumn" :datas="tableBudgetData" :loading="tableBudgetLoading">
|
|
|
<template #action="{row,index}">
|
|
|
<el-button size="small" type="danger" @click="row.relevance = false" v-if="row.relevance">取消关联</el-button>
|
|
|
<el-button size="small" type="primary" @click="row.relevance = true" v-else>关联</el-button>
|
|
@@ -267,7 +267,7 @@ const getDetailsData = async () => {
|
|
|
//获取间隔天数
|
|
|
const getDiffDaydata=(item)=>{
|
|
|
let time= getDiffDay(item.startDate,item.endDate)
|
|
|
- item.duration=time
|
|
|
+ item.duration=time||0
|
|
|
}
|
|
|
//行程表单
|
|
|
const formItemRules = {
|
|
@@ -459,8 +459,14 @@ const doubleClick = () => {
|
|
|
|
|
|
//关联预算计划
|
|
|
const budgetModal = ref(false)
|
|
|
-const budgetModalShow = () => {
|
|
|
+const budgetIds = ref([])
|
|
|
+const budgetIndex = ref([])
|
|
|
+const budgetModalShow = (item, index) => {
|
|
|
budgetModal.value = true
|
|
|
+ budgetIndex.value = index
|
|
|
+ // budgetIds.value = item.budgetPlanIds?.split(',') || []
|
|
|
+ budgetIds.value=formModel.value.projectId
|
|
|
+ getBudgetTableData(formModel.value.projectId)
|
|
|
}
|
|
|
const budgetCloseClick = () => {
|
|
|
budgetModal.value = false
|
|
@@ -477,12 +483,20 @@ const tableBudgetColumn = [
|
|
|
{key: 'key4', name: '完成指标', width: '120', align: 'center'},
|
|
|
{key: 'action', name: '操作', width: '100', align: 'center'},
|
|
|
]
|
|
|
-const tableBudgetData = ref([
|
|
|
- {id: 1, key1: 'xxxx'},
|
|
|
- {id: 2, key1: 'xxxx'},
|
|
|
- {id: 3, key1: 'xxxx'},
|
|
|
- {id: 4, key1: 'xxxx'},
|
|
|
-])
|
|
|
+
|
|
|
+const tableBudgetData = ref([])
|
|
|
+const tableBudgetLoading=ref(false)
|
|
|
+const getBudgetTableData = async (projectId) => {
|
|
|
+ tableBudgetLoading.value = true
|
|
|
+ const {error, code, data} = await businessApi.budget({projectId})
|
|
|
+ //判断状态
|
|
|
+ tableBudgetLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ tableBudgetData.value = await isRowRelevance(data)
|
|
|
+ } else {
|
|
|
+ tableBudgetData.value = []
|
|
|
+ }
|
|
|
+}
|
|
|
//行程
|
|
|
const detailsObj1 = {
|
|
|
trafficType: '', // 交通工具
|