fix : 修复菜单图标、金额单位为元、项目实施台账上传费用功能、

This commit is contained in:
2024-06-02 11:04:54 +08:00
parent a796e7622f
commit cd715fbf98
26 changed files with 94 additions and 86 deletions

View File

@@ -156,7 +156,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectType !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
@@ -169,7 +169,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.rdSubject !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
@@ -182,7 +182,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectImpact !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
@@ -191,7 +191,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概算(元)',
label: '经济概算(元)',
align: 'center'
},
{

View File

@@ -89,10 +89,6 @@ const tableConfig = reactive({
align: 'center'
},
{
prop: 'projectName',
label: '项目名称',
align: 'center'
},{
prop: 'time',
label: '时间',
align: 'center'
@@ -100,12 +96,28 @@ const tableConfig = reactive({
{
prop: 'projectCost',
label: '项目费用',
align: 'center'
align: 'center',
currentRender: ({row, index}) => {
if (row.projectCost !== null) {
return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
} else {
return '--'
}
}
},
{
prop: 'researchStage',
label: '研发阶段',
align: 'center'
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 '--'
}
}
},
{
prop: 'digest',

View File

@@ -161,7 +161,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectType !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
@@ -174,7 +174,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.rdSubject !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
@@ -187,7 +187,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectImpact !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
@@ -196,7 +196,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概算(元)',
label: '经济概算(元)',
align: 'center'
},
{

View File

@@ -8,7 +8,7 @@
</template>
<script setup lang="jsx">
import {reactive} from "vue";
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
const searchConfig = reactive([
{
@@ -24,13 +24,14 @@ const searchConfig = reactive([
},
{
label: '项目费用',
prop: 'requirementName',
component: 'el-input',
prop: 'projectCost',
component: shallowRef(fvSelect),
props: {
placeholder: '请输入项目费用查询',
placeholder: '请选择项目费用查询',
clearable: true,
filterable: true,
checkStrictly: true
checkStrictly: true,
cacheKey: 'project_cost'
}
},
{
@@ -59,38 +60,38 @@ const tableConfig = reactive({
align: 'center'
},
{
prop: 'projectType',
prop: 'researchPersonnel',
label: '研发人员',
align: 'center'
},
{
prop: 'productMainBody',
prop: 'wagesPayable',
label: '应发工资',
align: 'center'
},
{
prop: 'projectEffect',
prop: 'performance',
label: '绩效',
align: 'center'
},
{
prop: 'survey',
prop: 'reserveFund',
label: '公积金',
align: 'center'
},{
prop: 'survey',
prop: 'socialSecurity',
label: '社保',
align: 'center'
},{
prop: 'survey',
prop: 'annuity',
label: '年金',
align: 'center'
},{
prop: 'survey',
prop: 'workday',
label: '工作日(天)',
align: 'center'
},{
prop: 'survey',
prop: 'researchDuration',
label: '研发工时(天)',
align: 'center'
},{
@@ -101,9 +102,6 @@ const tableConfig = reactive({
],
api: '',
params: {},
btns: [
{name: '上传分摊', key: '_export', color: '#DED0B2',auth: ''}
]
})
</script>

View File

@@ -2,14 +2,6 @@
<baseTitle title="上传费用"></baseTitle>
<el-form :model="tableForm" ref="form">
<el-table :data="tableForm.tableData" style="width: 100%">
<el-table-column prop="projectName" label="项目名称">
<template #default="scope">
<el-form-item prop="projectName" :rules="scope.row.projectName?'1':rules.projectName">
<el-input v-model="scope.row.projectName" placeholder="请输入项目名称" clearable>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="time" label="时间">
<template #default="scope">
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
@@ -93,33 +85,21 @@ import {useCacheStore} from '@/stores/cache.js'
const cacheStore = useCacheStore()
const route = useRoute()
const router = useRouter()
const tagsViewStore = useTagsView()
const formData = ref({})
const form = ref()
const rules = reactive({
projectName: [{required: true, message: '请输入项目名称', trigger:"blur"}],
time: [{required: true, message: '请选择时间', trigger: 'blur'}],
projectCost: [{required: true, message: '请输入项目费用', trigger: 'blur'}],
researchStage: [{required: true, message: '请输入研发阶段', trigger: 'blur'}],
digest: [{required: true, message: '请输入摘要', trigger: 'blur'}],
afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}]
})
const tableData=ref([
{
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
digest: '',
afterTax: ''
}
])
const tableForm = reactive({
tableData: [
{
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
@@ -131,36 +111,38 @@ const tableForm = reactive({
const handleAdd = () => {
let row = {
projectId: route.query.id,
projectName: '',
time: '',
projectCost: '',
researchStage: '',
digest: '',
afterTax: ''
}
tableData.value.push(row)
tableForm.tableData.push(row)
}
const handleDelete = (index) => {
tableData.value.splice(index, 1)
tableForm.tableData.splice(index, 1)
}
const handleSubmit = (instance) => {
if (!instance) return
instance.validate(async (valid) => {
if (!valid) return
instance.clearValidate()
console.log('params', tableData.value)
// const res = addLedger(tableData.value)
// ElNotification({
// title: '提示',
// message: res.msg,
// type: res.code === 1000 ? 'success' : 'error'
// })
// if (res.code === 1000) {
// tagsViewStore.delVisitedViews(router.currentRoute.value.path)
// router.push({
// name: 'Implementation'
// })
// }
console.log('params', tableForm.tableData)
const res =await addLedger(tableForm.tableData)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000) {
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
router.push({
name: 'Implementation/account',
query:{
id:route.query.id
}
})
}
})
}
const handleBack = () => {

View File

@@ -155,7 +155,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectType !== null) {
return (<Tag dictType={'project_type'} value={row.projectType}/>)
} else {
return '--'
@@ -168,7 +168,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.rdSubject !== null) {
return (<Tag dictType={'rd_subject'} value={row.rdSubject}/>)
} else {
return '--'
@@ -181,7 +181,7 @@ const tableConfig = reactive({
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.state !== null) {
if (row.projectImpact !== null) {
return (<Tag dictType={'project_impact'} value={row.projectImpact}/>)
} else {
return '--'
@@ -190,7 +190,7 @@ const tableConfig = reactive({
},
{
prop: 'economicEstimate',
label: '经济概算(元)',
label: '经济概算(元)',
align: 'center'
},
{