Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c063a9a1
authored
2025-04-01 14:40:45 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
估值模型百分比支持大于100
1 parent
ea3da759
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
src/views/data_transaction/valuationModelCreate.vue
src/views/data_transaction/valuationModelCreate.vue
View file @
c063a9a
...
...
@@ -648,6 +648,10 @@ const incomeCalculateData = computed(() => { //响应式不生效
let
transfer
=
(
v
,
need
=
true
)
=>
{
return
v
?
(
need
?
parseFloat
(
v
)
/
100
:
parseFloat
(
v
))
:
0
;
}
/** 转换千分位为正整数 */
let
transferQianFenWei
=
(
v
)
=>
{
return
typeof
v
==
'string'
?
parseFloat
(
v
?.
replace
(
/,/g
,
''
))
:
parseFloat
(
v
)
}
incomeYears
.
value
.
forEach
((
year
,
i
)
=>
{
let
C6
=
transfer
(
data
[
5
][
year
.
field
])
let
C7
=
transfer
(
data
[
6
][
year
.
field
])
...
...
@@ -659,10 +663,10 @@ const incomeCalculateData = computed(() => { //响应式不生效
sumC7
=
sumC7
+
transfer
(
data
[
6
][
item
.
field
]);
})
}
resultInfo
[
'综合分成率'
].
push
(
changeNum
(
C6
*
(
1
-
sumC7
+
C7
/
2
)
*
100
,
2
,
true
));
//TODO综合分成率算法有问题
resultInfo
[
'综合分成率'
].
push
(
changeNum
(
C6
*
(
1
-
sumC7
+
C7
/
2
)
*
100
,
2
,
true
));
let
C1
=
transfer
(
data
[
0
][
year
.
field
],
false
)
let
C5
=
transfer
(
data
[
4
][
year
.
field
])
resultInfo
[
'现金流'
].
push
(
changeNum
(
C1
*
C5
*
resultInfo
[
'综合分成率'
][
i
]
/
100
,
2
,
true
));
resultInfo
[
'现金流'
].
push
(
changeNum
(
C1
*
C5
*
transferQianFenWei
(
resultInfo
[
'综合分成率'
][
i
])
/
100
,
2
,
true
));
if
(
i
==
0
)
{
let
cnt
=
month
==
12
?
12
:
(
12
-
month
);
resultInfo
[
'折现年期'
].
push
(
changeNum
(
cnt
/
12
/
2
,
2
,
true
));
...
...
@@ -673,7 +677,7 @@ const incomeCalculateData = computed(() => { //响应式不生效
}
let
C10
=
transfer
(
data
[
9
][
year
.
field
]);
resultInfo
[
'折现因子'
].
push
(
changeNum
(
1
/
Math
.
pow
((
1
+
C10
),
parseFloat
(
resultInfo
[
'折现年期'
][
i
])),
2
,
true
));
resultInfo
[
'折现现值'
].
push
(
changeNum
(
parseFloat
(
resultInfo
[
'折现因子'
][
i
])
*
parseFloat
(
resultInfo
[
'现金流'
][
i
]?.
replace
(
/,/g
,
''
)
),
2
,
true
));
resultInfo
[
'折现现值'
].
push
(
changeNum
(
parseFloat
(
resultInfo
[
'折现因子'
][
i
])
*
transferQianFenWei
(
resultInfo
[
'现金流'
][
i
]
),
2
,
true
));
})
resultInfo
[
'数据资产估值'
]
=
resultInfo
[
'折现现值'
].
length
<
2
?
resultInfo
[
'折现现值'
][
0
]
:
changeNum
(
resultInfo
[
'折现现值'
].
reduce
(
function
(
prev
,
curr
,
idx
,
arr
)
{
return
(
typeof
prev
==
'string'
?
parseFloat
(
prev
?.
replace
(
/,/g
,
''
))
:
parseFloat
(
prev
))
+
parseFloat
(
curr
?.
replace
(
/,/g
,
''
));
...
...
@@ -874,7 +878,7 @@ onMounted(async () => {
<div
v-if=
"scope.row.auto != true"
class=
"input_cell"
>
<el-input
v-model
.
trim=
"scope.row[year.field]"
placeholder=
"请输入"
@
change=
"(val) => inputChange(val, scope, year.field)"
@
input=
"(val) => inputEventChange(val, scope, year.field,
scope.row.unit == '%' ? 100 :
null)"
@
input=
"(val) => inputEventChange(val, scope, year.field, null)"
clearable
></el-input>
</div>
<span
v-else
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment