|
@@ -12,6 +12,8 @@
|
|
<template #action>
|
|
<template #action>
|
|
<hc-pages :pages="searchForm" @change="pageChange" />
|
|
<hc-pages :pages="searchForm" @change="pageChange" />
|
|
</template>
|
|
</template>
|
|
|
|
+ <!-- 新增/修改 -->
|
|
|
|
+ <HcBudgetData v-model="isBudgetDataShow" :info="budgetRowData" @finish="getTableData" />
|
|
</hc-card>
|
|
</hc-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -20,16 +22,21 @@ import { onActivated, ref } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { HcDelMsg } from 'hc-vue3-ui'
|
|
import { getArrValue } from 'js-fast-way'
|
|
import { getArrValue } from 'js-fast-way'
|
|
|
|
+import HcBudgetData from './modules/budget-data.vue'
|
|
import mainApi from '~api/funding/budget'
|
|
import mainApi from '~api/funding/budget'
|
|
|
|
|
|
const store = useAppStore()
|
|
const store = useAppStore()
|
|
const projectId = ref(store.getProjectId)
|
|
const projectId = ref(store.getProjectId)
|
|
|
|
+const contractId = ref(store.getContractId)
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'FundingBudget',
|
|
name: 'FundingBudget',
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+//选项卡被激活
|
|
onActivated(() => {
|
|
onActivated(() => {
|
|
|
|
+ projectId.value = store.getProjectId
|
|
|
|
+ contractId.value = store.getContractId
|
|
getTableData()
|
|
getTableData()
|
|
})
|
|
})
|
|
|
|
|
|
@@ -66,19 +73,30 @@ const getTableData = async () => {
|
|
searchForm.value.total = data['total'] || 0*/
|
|
searchForm.value.total = data['total'] || 0*/
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+//新增/修改弹窗
|
|
|
|
+const isBudgetDataShow = ref(false)
|
|
|
|
+const budgetRowData = ref({})
|
|
|
|
+
|
|
//新增数据
|
|
//新增数据
|
|
const addRowClick = () => {
|
|
const addRowClick = () => {
|
|
-
|
|
|
|
|
|
+ budgetRowData.value = {}
|
|
|
|
+ isBudgetDataShow.value = true
|
|
}
|
|
}
|
|
|
|
|
|
//修改数据
|
|
//修改数据
|
|
const editRowClick = (row) => {
|
|
const editRowClick = (row) => {
|
|
-
|
|
|
|
|
|
+ budgetRowData.value = row
|
|
|
|
+ isBudgetDataShow.value = true
|
|
}
|
|
}
|
|
|
|
|
|
//删除数据
|
|
//删除数据
|
|
const delRowClick = (row) => {
|
|
const delRowClick = (row) => {
|
|
-
|
|
|
|
|
|
+ HcDelMsg(async (resolve) => {
|
|
|
|
+ console.log('删除中...')
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ resolve() //关闭弹窗的回调
|
|
|
|
+ }, 3000)
|
|
|
|
+ })
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|