feat(expense-management): 新增费用分摊功能并优化项目管理相关页面

This commit is contained in:
dj
2025-04-01 23:57:46 +08:00
parent a3bb1a9156
commit 1e29e6bdc4
3 changed files with 73 additions and 118 deletions

View File

@@ -28,17 +28,17 @@ const searchConfig = ref([
checkStrictly: true
}
},
{
label: '子项目',
prop: 'subProjectName',
component: 'el-input',
props: {
placeholder: '请输入子项目查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
// {
// label: '子项目',
// prop: 'subProjectName',
// component: 'el-input',
// props: {
// placeholder: '请输入子项目查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
// {
// label: '项目类型',
// prop: 'projectType',
@@ -80,112 +80,89 @@ const tableConfig = reactive({
// }
// },
{
prop: 'affiliatedCompany',
label: '支年份',
prop: 'paymentYear',
label: '支年份',
align: 'center',
width: 80
},
{
prop: 'projectName',
label: '月份',
prop: 'paymentMonth',
label: '支付月份',
align: 'center',
width: 80
},
{
prop: 'projectCost',
prop: 'masterProjectName',
label: '主项目',
align: 'center',
width: 120,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectCost !== null&&row.projectCost !== null&&row.projectCost!==undefined) {
return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
} else {
return '--'
}
}
},
{
prop: 'time',
prop: 'subProjectName',
label: '子项目',
align: 'center',
width: 120,
},
{
prop: 'researchStage',
prop: 'certificateDate',
label: '凭证日期',
align: 'center',
width: 120,
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: 'digest',
prop: 'voucherNumber',
label: '凭证号',
align: 'center'
},
{
prop: 'digest',
prop: 'entryNumber',
label: '分录号',
align: 'center',
currentRender:({row})=>{
return <span>{toThousands(row.afterTax)}</span>
}
},
{
prop: 'digest',
prop: 'remarks',
label: '摘要',
align: 'center',
},
{
prop: 'digest',
prop: 'accountCode',
label: '科目编码',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.source&&row.source !== null&&row.source!==undefined) {
return (<Tag dictType={'ledger_source'} value={row.source}/>)
} else {
return '--'
}
}
},
{
prop: 'digest',
prop: 'accountName',
label: '科目名称',
align: 'center',
},
{
prop: 'digest',
prop: 'auxiliaryItem',
label: '辅助项',
align: 'center',
},
{
prop: 'digest',
prop: 'recordedAmount',
label: '会计凭证记载金额(元)',
align: 'center',
width: 170
},
{
prop: 'digest',
prop: 'rdAmount',
label: '归集研发费用金额(元)',
align: 'center',
width: 170
},
],
api: '',
api: '/workflow/mosr/payment/list',
params: {},
export:{
open :true,
fileName:`科技创新费用支出明细.xlsx`
fileName:`研发费用明细.xlsx`
}
})
const search = (val) => {

View File

@@ -1,5 +1,5 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<fvSearchForm :searchConfig="searchConfig" @search="search" ></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" >
<template #empty>
<el-empty description="暂无数据"/>
@@ -27,17 +27,17 @@ const searchConfig = ref(
checkStrictly: true
}
},
{
label: '子项目',
prop: 'subProjectName',
component: 'el-input',
props: {
placeholder: '请输入子项目查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
// {
// label: '子项目',
// prop: 'subProjectName',
// component: 'el-input',
// props: {
// placeholder: '请输入子项目查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
{
label: '项目类型',
prop: 'projectType',

View File

@@ -1,6 +1,6 @@
<template>
<fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick">
<!-- <fvSearchForm :searchConfig="searchConfig" @search="search" style="margin-left: 16px"></fvSearchForm>-->
<fvTable ref="tableIns" :tableConfig="tableConfig" @headBtnClick="headBtnClick" style="margin-top: 15px">
<template #empty>
<el-empty description="暂无数据"/>
</template>
@@ -15,23 +15,23 @@ import {reactive, ref} from "vue";
const router = useRouter()
const route = useRoute()
const searchConfig = reactive([
// {
// label: '分摊名称',
// prop: 'shareName',
// component: 'el-input',
// props: {
// placeholder: '请输入分摊名称查询',
// clearable: true,
// filterable: true,
// checkStrictly: true
// }
// },
{
label: '分摊名称',
prop: 'shareName',
component: 'el-input',
props: {
placeholder: '请输入分摊名称查询',
clearable: true,
filterable: true,
checkStrictly: true
}
},
{
label: '分摊月份',
label: '支付月份',
prop: 'apportionmentMonth',
component: 'el-date-picker',
props: {
placeholder: '请选择分摊月份',
placeholder: '请选择支付月份',
clearable: true,
type:'month',
format: 'YYYY-MM',
@@ -64,85 +64,63 @@ const tableConfig = reactive({
// }
// },
{
prop: 'affiliatedCompany',
label: '支年份',
prop: 'paymentYear',
label: '支年份',
align: 'center'
},
{
prop: 'projectName',
label: '月份',
prop: 'paymentMonth',
label: '支付月份',
align: 'center'
},
{
prop: 'projectCost',
prop: 'masterProjectName',
label: '主项目',
align: 'center',
width: 120,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.projectCost !== null&&row.projectCost !== null&&row.projectCost!==undefined) {
return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
} else {
return '--'
}
}
},
{
prop: 'time',
prop: 'subProjectName',
label: '子项目',
align: 'center',
width: 120,
},
{
prop: 'researchStage',
prop: 'researchPersonnel',
label: '研发人员',
align: 'center',
width: 120,
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: 'digest',
prop: 'personnelNature',
label: '人员性质',
align: 'center'
},
{
prop: 'digest',
prop: 'researchDuration',
label: '当月研发工时(天)',
align: 'center',
currentRender:({row})=>{
return <span>{toThousands(row.afterTax)}</span>
}
// currentRender:({row})=>{
// return <span>{toThousands(row.afterTax)}</span>
// }
},
{
prop: 'digest',
prop: 'workday',
label: '当月总工时(天)',
align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => {
if (row.source&&row.source !== null&&row.source!==undefined) {
return (<Tag dictType={'ledger_source'} value={row.source}/>)
} else {
return '--'
}
}
},
{
prop: 'digest',
prop: 'subtotal',
label: '人工成本分摊(元)',
align: 'center',
},
],
api: '',
api: '/workflow/mosr/cost/share',
params: {},
btns: [
{name: '添加分摊', key: 'add', color: '#DED0B2'}