Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
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
Dida Adams Arizona
Tia-dev
Commits
34686707
Commit
34686707
authored
Jan 29, 2021
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
Didam See merge request
!1071
parents
12b5e35a
ae8ace99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
23 deletions
+31
-23
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+31
-23
No files found.
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
34686707
...
...
@@ -636,6 +636,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
handleCalculate
(
datatable2
)
{
// console.log(datatable2)
this
.
setState
({
loading
:
true
},
()
=>
{
let
total
=
0
let
perfomanceScore
=
''
...
...
@@ -690,7 +691,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
totalScore
=
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
Number
(
totalScore
).
toFixed
(
0
)
//Score X Weight
let
totalSW
=
0
...
...
@@ -703,16 +704,21 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
item
[
12
]
==
''
||
String
(
item
[
12
])
==
'0'
||
String
(
item
[
12
])
==
'0.0'
)
{
totalSW
=
0
}
else
{
totalSW
=
(
Number
(
totalScore
)
*
Number
(
handlePercent
)
/
1
00
)
totalSW
=
(
Number
(
totalScore
z
)
*
Number
(
handlePercent
)
/
10
00
)
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
// console.log(totalSW)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
}
// console.log(item[5])
// console.log(totalAch);
// console.log(achx100);
// console.log(listParameterFilter);
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalSW)
// console.log(total)
return
[
[
item
[
0
],
item
[
1
],
item
[
2
],
...
...
@@ -727,37 +733,39 @@ export default class CorporateAnnualTargetMR extends Component {
item
[
11
],
item
[
12
],
totalAch
,
totalScore
,
totalScore
z
,
totalSW
,
item
[
16
],
item
[
17
],
item
[
18
],
item
[
19
],
]
//
item[19],
//
]
]
})
console
.
log
(
totalWeight
)
console
.
log
(
total
)
console
.
log
(
datatable3
);
totalWeight
=
Number
(
totalWeight
)
/
100
total
=
Number
(
Number
(
total
).
toFixed
(
2
)
/
Number
(
totalWeight
)).
toFixed
(
2
)
if
(
total
>=
1.00
&&
total
<=
2.00
)
{
// console.log(totalWeight)
// console.log(total)
// console.log(datatable3);
let
totalWeightz
=
Number
(
totalWeight
)
/
100
let
totalz
=
Number
(
Number
(
total
).
toFixed
(
2
)
/
Number
(
totalWeightz
)).
toFixed
(
2
)
let
lastTotal
=
R
.
equals
(
totalz
,
NaN
)
?
0.0
:
totalz
// console.log(Number(Number(total).toFixed(2) / Number(totalWeightz)).toFixed(2))
if
(
lastTotal
>=
1.00
&&
lastTotal
<=
2.00
)
{
perfomanceScore
=
'K'
}
else
if
(
total
>=
2.01
&&
t
otal
<=
2.75
)
{
}
else
if
(
lastTotal
>=
2.01
&&
lastT
otal
<=
2.75
)
{
perfomanceScore
=
'C'
}
else
if
(
total
>=
2.76
&&
t
otal
<=
3.00
)
{
}
else
if
(
lastTotal
>=
2.76
&&
lastT
otal
<=
3.00
)
{
perfomanceScore
=
'B-'
}
else
if
(
total
>=
3.01
&&
t
otal
<=
3.75
)
{
}
else
if
(
lastTotal
>=
3.01
&&
lastT
otal
<=
3.75
)
{
perfomanceScore
=
'B'
}
else
if
(
total
>=
3.76
&&
t
otal
<=
4.00
)
{
}
else
if
(
lastTotal
>=
3.76
&&
lastT
otal
<=
4.00
)
{
perfomanceScore
=
'B+'
}
else
if
(
total
>=
4.01
&&
t
otal
<=
4.75
)
{
}
else
if
(
lastTotal
>=
4.01
&&
lastT
otal
<=
4.75
)
{
perfomanceScore
=
'BS'
}
else
if
(
total
>=
4.76
&&
t
otal
<=
5.00
)
{
}
else
if
(
lastTotal
>=
4.76
&&
lastT
otal
<=
5.00
)
{
perfomanceScore
=
'IST'
}
setTimeout
(()
=>
{
this
.
setState
({
totalScore
:
t
otal
,
perfomanceScore
,
loading
:
false
},
()
=>
{
this
.
setState
({
totalScore
:
lastT
otal
,
perfomanceScore
,
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
true
})
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
})
...
...
@@ -1044,10 +1052,10 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
dataTable2
[
tableMeta
.
rowIndex
][
5
]
==
"ROIC"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
0
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
column
]
=
Number
(
total
).
toFixed
(
1
)
}
return
total
return
Number
(
total
).
toFixed
(
1
)
}
const
handleChangeText
=
(
value
,
tableMeta
)
=>
{
...
...
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