fix : 修复项目实施上传费用,查看分摊功能细节

This commit is contained in:
2024-06-09 22:02:37 +08:00
parent a88ae09628
commit 83ba497d73
4 changed files with 152 additions and 17 deletions

View File

@@ -92,13 +92,19 @@ const baseForm = ref()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
// component:
},
{
label: '征集类型',
@@ -106,7 +112,6 @@ const schema = computed(() => {
colProps: {
span: 12
}
// component:
},
{
label: '截止时间',
@@ -114,16 +119,8 @@ const schema = computed(() => {
colProps: {
span: 12
}
// component:
},
{
label: '需求名称',
prop: 'requirementName',
colProps: {
span: 12
}
// component:
},
]
})

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-form :model="attachment" inline style="margin-top: 15px">
<el-form-item label="标签" prop="tag">
<el-select v-model="attachment.tag" placeholder="请选择标签" clearable filterable style="width: 300px">
@@ -29,7 +31,9 @@
import {downloadFile} from "@/api/project-demand";
import {searchFileList} from "@/api/project-manage/attachment.js";
import {getTags} from "@/api/project-manage";
import {ElNotification} from "element-plus";
import {ElLoading, ElNotification} from "element-plus";
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute()
const router = useRouter()
@@ -37,6 +41,40 @@ const uploadState = ref(true)
const attachment = reactive({
tag: ''
})
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
]
})
const baseForm = ref()
const tagsOption = ref([])
const tableConfig = reactive({
columns: [
@@ -80,6 +118,16 @@ const tableConfig = reactive({
})
const showTable = ref(true)
const otherFileList = ref([])
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const getTagsOption = () => {
if (!route.query.id) return
getTags(route.query.id).then(res => {

View File

@@ -1,4 +1,6 @@
<template>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<fvSearchForm :searchConfig="searchConfig" @search="search"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig">
<template #empty>
@@ -9,8 +11,44 @@
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "@/components/steps/api";
const route = useRoute()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
]
})
const baseForm = ref()
const searchConfig = reactive([
{
label: '关键词',
@@ -106,7 +144,15 @@ const tableConfig = reactive({
projectId: route.query.id
}
})
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
</script>
<style scoped>

View File

@@ -1,9 +1,7 @@
<template>
<baseTitle title="上传费用"></baseTitle>
<baseTitle title="基础信息"></baseTitle>
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
<el-form :model="tableForm" ref="form" class="query-form">
<el-form-item label="项目名称">
<span>{{projectName}}</span>
</el-form-item>
<el-table :data="tableForm.tableData" style="width: 100%">
<el-table-column prop="time" label="时间">
<template #default="scope">
@@ -85,6 +83,8 @@ import {addLedger} from "@/api/project-manage";
import {useTagsView} from '@/stores/tagsview.js'
import {useRoute} from "vue-router";
import {useCacheStore} from '@/stores/cache.js'
import {computed, ref} from "vue";
import {getBaseInfoApi} from "../../../components/steps/api";
const cacheStore = useCacheStore()
const route = useRoute()
@@ -92,7 +92,41 @@ const router = useRouter()
const tagsViewStore = useTagsView()
const formData = ref({})
const form = ref()
const projectName=ref(localStorage.getItem('projectName'))
const projectName=ref()
const schema = computed(() => {
return [
{
label: '征集名称',
prop: 'requirementName',
colProps: {
span: 12
}
},
{
label: '所属公司',
prop: 'affiliatedCompany',
colProps: {
span: 12
}
},
{
label: '项目名称',
prop: 'projectName',
colProps: {
span: 12
}
},
{
label: '征集类型',
prop: 'collectType',
colProps: {
span: 12
}
},
]
})
const baseForm = ref()
const rules = reactive({
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
@@ -112,6 +146,16 @@ const tableForm = reactive({
}
]
})
const getBaseInfo = async () => {
try {
const {code, data} = await getBaseInfoApi(route.query.id)
baseForm.value.setValues(data)
} catch {
}
}
getBaseInfo()
const handleAdd = () => {
let row = {
projectId: route.query.id,