fix : 修复新增台账功能

This commit is contained in:
2024-06-03 16:48:00 +08:00
parent abd060b530
commit 63a6f9b85e
3 changed files with 23 additions and 5 deletions

View File

@@ -110,9 +110,7 @@ const tableConfig = reactive({
label: '研发阶段',
align: 'center',
currentRender: ({row, index}) => {
console.log('row.researchStage',row.researchStage)
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
console.log('ull',row.researchStage)
return (<Tag dictType={'research_stage'} value={row.researchStage}/>)
} else {
return '--'

View File

@@ -142,7 +142,7 @@ const tableConfig = reactive({
},
{
prop: 'projectName',
label: '名称',
label: '项目名称',
align: 'center'
},
{
@@ -181,6 +181,19 @@ const tableConfig = reactive({
}
}
},
{
prop: 'researchStage',
label: '研发阶段',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) {
return (<Tag dictType={'research_stage'} value={row.researchStage}/>)
} else {
return '--'
}
}
},
{
prop: 'projectImpact',
label: '项目影响',
@@ -321,6 +334,7 @@ const handleEdit = (row) => {
})
}
const handleStandingBook = (row) => {
localStorage.setItem('projectName', row.projectName)
router.push({
name: 'Implementation/account',
query: {

View File

@@ -1,6 +1,9 @@
<template>
<baseTitle title="上传费用"></baseTitle>
<el-form :model="tableForm" ref="form">
<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">
@@ -89,6 +92,7 @@ const router = useRouter()
const tagsViewStore = useTagsView()
const formData = ref({})
const form = ref()
const projectName=ref(localStorage.getItem('projectName'))
const rules = reactive({
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
@@ -127,7 +131,9 @@ const handleSubmit = (instance) => {
instance.validate(async (valid) => {
if (!valid) return
instance.clearValidate()
console.log('params', tableForm.tableData)
tableForm.tableData.forEach(item=>{
item.projectName=projectName.value
})
const res =await addLedger(tableForm.tableData)
ElNotification({
title: '提示',