Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-science-front
Commits
d379340e
Commit
d379340e
authored
Jan 09, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
333
parent
2373da47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
153 additions
and
0 deletions
+153
-0
fundInfo.vue
src/views/report/project/components/fundInfo.vue
+153
-0
taskEdit.vue
src/views/report/task/components/taskEdit.vue
+0
-0
No files found.
src/views/report/project/components/fundInfo.vue
0 → 100644
View file @
d379340e
<
template
>
<div>
<a-row>
<a-col
:span=
"24"
>
<div
class=
"tb-title"
>
<span>
项目经费
<strong>
(单位:万元)
</strong></span>
</div>
</a-col>
</a-row>
<a-row>
<a-col
:span=
"6"
class=
"bg-gray"
>
预算科目
</a-col>
<a-col
:span=
"3"
class=
"bg-gray"
>
总预算数
</a-col>
<a-col
:span=
"5"
class=
"bg-gray"
>
省级财政资金
</a-col>
<a-col
:span=
"5"
class=
"bg-gray"
>
自筹资金
</a-col>
<a-col
:span=
"5"
class=
"bg-gray"
>
备注
</a-col>
</a-row>
<div
v-for=
"(item, index) in budget"
:key=
"'budget' + index"
class=
"row_center"
>
<a-row
v-if=
"item.type ==='count'"
type=
"flex"
>
<a-col
:span=
"6"
:style=
"'text-align: left;padding-left:'+left(item.level)+'px'"
>
<div
class=
"special-middle"
>
{{
item
.
budgetName
}}
</div>
</a-col>
<a-col
:span=
"3"
>
<div
class=
"special-middle"
>
{{
Count
(
item
.
source
,
'totalBudget'
,
index
)
}}
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
<span
v-if=
"!!!item.code||item.code === 'applyFunds'"
>
{{
Count
(
item
.
source
,
'applyFunds'
,
index
)
}}
</span>
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
{{
Count
(
item
.
source
,
'selfFunds'
,
index
)
}}
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
<a-input
v-model=
"item.calculationBasis"
:maxLength=
"100"
style=
"width: 80%;"
/>
</div>
</a-col>
</a-row>
<a-row
v-else
type=
"flex"
>
<a-col
:span=
"6"
:style=
"'text-align: left;padding-left:'+left(item.level)+'px'"
>
<div
class=
"special-middle"
>
{{
item
.
budgetName
}}
</div>
</a-col>
<a-col
:span=
"3"
>
<div
class=
"special-middle"
>
{{
Count1
(
index
,
item
.
applyFunds
,
item
.
selfFunds
)
}}
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
<a-input-number
v-model=
"item.applyFunds"
:min=
"0"
:step=
"0.01"
style=
"width: 80%"
v-if=
"!!!item.code||item.code === 'applyFunds'"
/>
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
<a-input-number
v-model=
"item.selfFunds"
:min=
"0"
:step=
"0.01"
style=
"width: 80%"
v-if=
"!!!item.code||item.code === 'selfFunds'"
/>
</div>
</a-col>
<a-col
:span=
"5"
>
<div
class=
"special-middle"
>
<a-input
v-model=
"item.calculationBasis"
:maxLength=
"100"
style=
"width: 80%;"
/>
</div>
</a-col>
</a-row>
</div>
</div>
</
template
>
<
script
>
import
{
budgetList
}
from
"@/views/report/project/config"
export
default
{
name
:
"fundInfo"
,
data
()
{
return
{
};
},
props
:
{
budget
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
},
created
()
{
},
methods
:
{
Count
(
source
,
type
,
index
)
{
if
(
!
source
||
!
source
.
length
)
{
return
0.00
}
let
applyFunds
=
0.00
let
selfFunds
=
0.00
source
.
forEach
(
i
=>
{
applyFunds
=
parseFloat
(
applyFunds
+
this
.
budget
[
i
].
applyFunds
)
selfFunds
=
parseFloat
(
selfFunds
+
this
.
budget
[
i
].
selfFunds
)
})
if
(
type
===
'applyFunds'
)
{
this
.
budget
[
index
].
applyFunds
=
applyFunds
.
toFixed
(
2
)
return
applyFunds
.
toFixed
(
2
)
}
else
if
(
type
===
'selfFunds'
)
{
this
.
budget
[
index
].
selfFunds
=
selfFunds
.
toFixed
(
2
)
return
selfFunds
.
toFixed
(
2
)
}
else
{
this
.
budget
[
index
].
totalBudget
=
(
applyFunds
+
selfFunds
).
toFixed
(
2
)
return
parseFloat
(
applyFunds
+
selfFunds
).
toFixed
(
2
)
}
},
Count1
(
index
,
applyFunds
,
selfFunds
)
{
let
apply
=
0.00
let
self
=
0.00
if
(
!!
applyFunds
)
apply
=
applyFunds
if
(
!!
selfFunds
)
self
=
selfFunds
this
.
budget
[
index
].
totalBudget
=
(
apply
+
self
).
toFixed
(
2
)
return
(
apply
+
self
).
toFixed
(
2
)
},
left
(
l
)
{
switch
(
l
)
{
case
'1'
:
return
4
;
case
'2'
:
return
12
;
case
'3'
:
return
20
;
case
'4'
:
return
30
;
}
return
0
;
}
},
};
</
script
>
src/views/report/task/components/taskEdit.vue
View file @
d379340e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment