fix : 修复分摊汇总及编辑功能

This commit is contained in:
2024-06-06 13:36:07 +08:00
parent 18806f13e4
commit 53ecadf315
6 changed files with 162 additions and 79 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div v-loading="loading">
<div>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable v-if="showTable" ref="tableIns" :tableConfig="tableConfig" :data="detailList">
<fvTable ref="tableIns" :tableConfig="tableConfig">
<template #empty>
<el-empty description="暂无数据"/>
</template>
@@ -10,6 +10,7 @@
</template>
<script setup lang="jsx">
const route = useRoute()
const searchConfig = reactive([
{
label: '项目名称',
@@ -33,16 +34,16 @@ const searchConfig = reactive([
checkStrictly: true
}
},
{
label: '起始时间',
prop: 'time',
component: 'el-date-picker',
props: {
placeholder: '请选择起始时间',
clearable: true,
},
colProps: {}
},
// {
// label: '起始时间',
// prop: 'time',
// component: 'el-date-picker',
// props: {
// placeholder: '请选择起始时间',
// clearable: true,
// },
// colProps: {}
// },
])
const tableConfig = reactive({
columns: [
@@ -91,33 +92,20 @@ const tableConfig = reactive({
label: '研发时长(天)',
align: 'center'
},
]
})
const tableIns = ref()
const props = defineProps({
detailList: {
type: Array,
default: []
},
loading: {
type: Boolean,
default: false
},
showTable: {
type: Boolean,
default: true
],
api:'/workflow/mosr/cost/allocation/usr',
params:{
allocationId:route.query.id
}
})
const tableIns = ref()
const search = (val) => {
tableConfig.params = {...val}
tableConfig.params = {
allocationId:route.query.id,
...val
}
tableIns.value.refresh()
}
watch(() => props.loading, (val) => {
props.loading=val
})
watch(() => props.showTable, (val) => {
props.showTable=val
})
</script>
<style scoped>