Merge pull request 'fix : 修复项目费用显示bug' (#344) from dj into master

Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/344
This commit is contained in:
2024-06-16 12:35:12 +00:00
2 changed files with 19 additions and 19 deletions

View File

@@ -36,7 +36,7 @@ const searchConfig = reactive([
colProps: {} colProps: {}
}, { }, {
label: '项目费用', label: '项目费用',
prop: 'requirementName', prop: 'projectCost',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目费用查询', placeholder: '请选择项目费用查询',

View File

@@ -58,9 +58,10 @@ const searchConfig = reactive([
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
colProps: {} colProps: {}
}, { },
{
label: '项目费用', label: '项目费用',
prop: 'requirementName', prop: 'projectCost',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
props: { props: {
placeholder: '请选择项目费用查询', placeholder: '请选择项目费用查询',
@@ -68,7 +69,8 @@ const searchConfig = reactive([
filterable: true, filterable: true,
cacheKey: 'project_cost', cacheKey: 'project_cost',
} }
}, { },
{
label: '项目阶段', label: '项目阶段',
prop: 'researchStage', prop: 'researchStage',
component: shallowRef(fvSelect), component: shallowRef(fvSelect),
@@ -109,7 +111,7 @@ const tableConfig = reactive({
prop: 'name', prop: 'name',
type: 'index', type: 'index',
label: '序号', label: '序号',
width:'80', width: '80',
align: 'center' align: 'center'
}, },
{ {
@@ -121,13 +123,10 @@ const tableConfig = reactive({
prop: 'projectCost', prop: 'projectCost',
label: '项目费用', label: '项目费用',
align: 'center', align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
if (row.projectCost !== null&&row.projectCost !== null&&row.projectCost!==undefined) { if (row.projectCost !== null && row.projectCost !== null && row.projectCost !== undefined) {
if(typeof Number(row.projectCost) === 'number'){ return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
return '--'
}else {
return (<Tag dictType={'project_cost'} value={row.projectCost}/>)
}
} else { } else {
return '--' return '--'
} }
@@ -137,8 +136,9 @@ const tableConfig = reactive({
prop: 'researchStage', prop: 'researchStage',
label: '项目阶段', label: '项目阶段',
align: 'center', align: 'center',
showOverflowTooltip: false,
currentRender: ({row, index}) => { currentRender: ({row, index}) => {
if (row.researchStage&&row.researchStage !== null&&row.researchStage!==undefined) { if (row.researchStage && row.researchStage !== null && row.researchStage !== undefined) {
return (<Tag dictType={'research_stage'} value={row.researchStage}/>) return (<Tag dictType={'research_stage'} value={row.researchStage}/>)
} else { } else {
return '--' return '--'
@@ -154,20 +154,20 @@ const tableConfig = reactive({
prop: 'afterTax', prop: 'afterTax',
label: '税后余额(元)', label: '税后余额(元)',
align: 'center', align: 'center',
currentRender:({row})=>{ currentRender: ({row}) => {
return <span>{toThousands(row.afterTax)}</span> return <span>{toThousands(row.afterTax)}</span>
} }
} }
], ],
api: '/workflow/mosr/expense/ledger', api: '/workflow/mosr/expense/ledger',
params: { params: {
projectId:route.query.id projectId: route.query.id
}, },
btns: [ btns: [
{name: '上传费用', key: 'add', color: '#DED0B2',auth: ''} {name: '上传费用', key: 'add', color: '#DED0B2', auth: ''}
] ]
}) })
const tableIns=ref() const tableIns = ref()
const getBaseInfo = async () => { const getBaseInfo = async () => {
try { try {
const {code, data} = await getBaseInfoApi(route.query.id) const {code, data} = await getBaseInfoApi(route.query.id)
@@ -188,14 +188,14 @@ const handleUploadFee = () => {
router.push({ router.push({
name: 'Implementation/uploadFee', name: 'Implementation/uploadFee',
query: { query: {
id:route.query.id id: route.query.id
} }
}) })
} }
const search = (val) => { const search = (val) => {
console.log('val',val) console.log('val', val)
tableConfig.params = {...val} tableConfig.params = {...val, projectId: route.query.id}
tableIns.value.refresh() tableIns.value.refresh()
} }
</script> </script>