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
614250af
Commit
614250af
authored
Jan 27, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tampilin ui summaryoftriputra
parent
a3432754
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
166 additions
and
166 deletions
+166
-166
SummaryOfTriputra.js
src/container/SummaryTriputra/SummaryOfTriputra.js
+166
-166
No files found.
src/container/SummaryTriputra/SummaryOfTriputra.js
View file @
614250af
...
@@ -401,179 +401,179 @@ export default class SummaryOfTriputra extends Component {
...
@@ -401,179 +401,179 @@ export default class SummaryOfTriputra extends Component {
}
}
})
})
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
}
else
if
(
this
.
state
.
report
.
value
===
3
)
{
api
.
create
().
getReportHierarkiPL
(
payload
).
then
(
response
=>
{
//
api.create().getReportHierarkiPL(payload).then(response => {
// console.log(response);
//
// console.log(response);
if
(
response
.
data
)
{
//
if (response.data) {
let
dataTable
=
[]
let
dataTable
=
[]
console
.
log
(
response
)
//
console.log(response)
let
res
=
response
.
data
.
data
//
let res = response.data.data
const
handlePushChild
=
(
item
)
=>
{
//
const handlePushChild = (item) => {
dataTable
.
push
([
//
dataTable.push([
item
.
type_report_id
,
//
item.type_report_id,
item
.
id
,
//
item.id,
item
.
parent
,
//
item.parent,
item
.
formula
,
//
item.formula,
item
.
level
,
//
item.level,
item
.
description
,
//
item.description,
item
.
profit_detail
.
total_actual_before
===
null
?
"0"
:
item
.
profit_detail
.
total_actual_before
===
""
?
"0"
:
item
.
profit_detail
.
total_actual_before
,
//
item.profit_detail.total_actual_before === null ? "0" : item.profit_detail.total_actual_before === "" ? "0" : item.profit_detail.total_actual_before,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
january
,
formula
:
item
.
profit_detail
.
january_formula
}
:
item
.
profit_detail
.
january
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
february
,
formula
:
item
.
profit_detail
.
february_formula
}
:
item
.
profit_detail
.
february
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
march
,
formula
:
item
.
profit_detail
.
march_formula
}
:
item
.
profit_detail
.
march
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
april
,
formula
:
item
.
profit_detail
.
april_formula
}
:
item
.
profit_detail
.
april
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.april, formula: item.profit_detail.april_formula } : item.profit_detail.april,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
may
,
formula
:
item
.
profit_detail
.
may_formula
}
:
item
.
profit_detail
.
may
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.may, formula: item.profit_detail.may_formula } : item.profit_detail.may,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
june
,
formula
:
item
.
profit_detail
.
june_formula
}
:
item
.
profit_detail
.
june
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.june, formula: item.profit_detail.june_formula } : item.profit_detail.june,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
july
,
formula
:
item
.
profit_detail
.
july_formula
}
:
item
.
profit_detail
.
july
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.july, formula: item.profit_detail.july_formula } : item.profit_detail.july,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
august
,
formula
:
item
.
profit_detail
.
august_formula
}
:
item
.
profit_detail
.
august
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.august, formula: item.profit_detail.august_formula } : item.profit_detail.august,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
september
,
formula
:
item
.
profit_detail
.
september_formula
}
:
item
.
profit_detail
.
september
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.september, formula: item.profit_detail.september_formula } : item.profit_detail.september,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
october
,
formula
:
item
.
profit_detail
.
october_formula
}
:
item
.
profit_detail
.
october
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.october, formula: item.profit_detail.october_formula } : item.profit_detail.october,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
item
.
profit_detail
.
november
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.november, formula: item.profit_detail.november_formula } : item.profit_detail.november,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
}
:
item
.
profit_detail
.
december
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.december, formula: item.profit_detail.december_formula } : item.profit_detail.december,
item
.
profit_detail
.
total_current_year
,
//
item.profit_detail.total_current_year,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_next_year
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.profit_detail.total_next_year,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_more_year
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.profit_detail.total_more_year,
item
.
order
,
//
item.order,
item
.
condition_it_should_be
,
//
item.condition_it_should_be,
item
.
condition_if_wrong
,
//
item.condition_if_wrong,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
//
item.profit_detail.forecast_formula == null ? [] : item.profit_detail.forecast_formula
])
//
])
if
(
item
.
children
!==
null
)
{
//
if (item.children !== null) {
if
(
item
.
children
.
length
>
0
)
{
//
if (item.children.length > 0) {
item
.
children
.
map
((
items
,
indexs
)
=>
{
//
item.children.map((items, indexs) => {
handlePushChild
(
items
)
//
handlePushChild(items)
})
//
})
}
//
}
}
//
}
}
//
}
res
.
map
((
item
,
index
)
=>
{
//
res.map((item, index) => {
dataTable
.
push
([
//
dataTable.push([
item
.
type_report_id
,
//
item.type_report_id,
item
.
id
,
//
item.id,
item
.
parent
,
//
item.parent,
item
.
formula
,
//
item.formula,
item
.
level
,
//
item.level,
item
.
description
,
//
item.description,
item
.
profit_detail
.
total_actual_before
===
null
?
"0"
:
item
.
profit_detail
.
total_actual_before
===
""
?
"0"
:
item
.
profit_detail
.
total_actual_before
,
//
item.profit_detail.total_actual_before === null ? "0" : item.profit_detail.total_actual_before === "" ? "0" : item.profit_detail.total_actual_before,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
january
,
formula
:
item
.
profit_detail
.
january_formula
}
:
item
.
profit_detail
.
january
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
february
,
formula
:
item
.
profit_detail
.
february_formula
}
:
item
.
profit_detail
.
february
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
march
,
formula
:
item
.
profit_detail
.
march_formula
}
:
item
.
profit_detail
.
march
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
april
,
formula
:
item
.
profit_detail
.
april_formula
}
:
item
.
profit_detail
.
april
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.april, formula: item.profit_detail.april_formula } : item.profit_detail.april,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
may
,
formula
:
item
.
profit_detail
.
may_formula
}
:
item
.
profit_detail
.
may
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.may, formula: item.profit_detail.may_formula } : item.profit_detail.may,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
june
,
formula
:
item
.
profit_detail
.
june_formula
}
:
item
.
profit_detail
.
june
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.june, formula: item.profit_detail.june_formula } : item.profit_detail.june,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
july
,
formula
:
item
.
profit_detail
.
july_formula
}
:
item
.
profit_detail
.
july
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.july, formula: item.profit_detail.july_formula } : item.profit_detail.july,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
august
,
formula
:
item
.
profit_detail
.
august_formula
}
:
item
.
profit_detail
.
august
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.august, formula: item.profit_detail.august_formula } : item.profit_detail.august,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
september
,
formula
:
item
.
profit_detail
.
september_formula
}
:
item
.
profit_detail
.
september
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.september, formula: item.profit_detail.september_formula } : item.profit_detail.september,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
october
,
formula
:
item
.
profit_detail
.
october_formula
}
:
item
.
profit_detail
.
october
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.october, formula: item.profit_detail.october_formula } : item.profit_detail.october,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
item
.
profit_detail
.
november
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.november, formula: item.profit_detail.november_formula } : item.profit_detail.november,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
}
:
item
.
profit_detail
.
december
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.december, formula: item.profit_detail.december_formula } : item.profit_detail.december,
item
.
profit_detail
.
total_current_year
,
//
item.profit_detail.total_current_year,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_next_year
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.profit_detail.total_next_year,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
||
item
.
type_report_id
==
7
?
0
:
item
.
profit_detail
.
total_more_year
,
//
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? 0 : item.profit_detail.total_more_year,
item
.
order
,
//
item.order,
item
.
condition_it_should_be
,
//
item.condition_it_should_be,
item
.
condition_if_wrong
,
//
item.condition_if_wrong,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
//
item.profit_detail.forecast_formula == null ? [] : item.profit_detail.forecast_formula
])
//
])
if
(
item
.
children
!==
null
)
{
//
if (item.children !== null) {
if
(
item
.
children
.
length
>
0
)
{
//
if (item.children.length > 0) {
item
.
children
.
map
((
items
,
indexs
)
=>
{
//
item.children.map((items, indexs) => {
handlePushChild
(
items
)
//
handlePushChild(items)
})
//
})
}
//
}
}
//
}
})
//
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
}
else
{
//
} else {
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
}
//
}
})
//
})
}
else
if
(
this
.
state
.
report
.
value
===
4
)
{
}
else
if
(
this
.
state
.
report
.
value
===
4
)
{
api
.
create
().
getReportHierarkiFR
(
payload
).
then
(
response
=>
{
//
api.create().getReportHierarkiFR(payload).then(response => {
// console.log(payload);
// console.log(payload);
console
.
log
(
response
);
//
console.log(response);
let
dataTable
=
[]
let
dataTable
=
[]
if
(
response
.
data
)
{
//
if (response.data) {
let
res
=
response
.
data
.
data
//
let res = response.data.data
const
handlePushChild
=
(
item
)
=>
{
//
const handlePushChild = (item) => {
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
//
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if
(
indexIDzz
===
-
1
)
{
//
if (indexIDzz === -1) {
dataTable
.
push
([
//
dataTable.push([
item
.
type_report_id
,
//
item.type_report_id,
item
.
id
,
//
item.id,
item
.
parent
,
//
item.parent,
item
.
formula
,
//
item.formula,
item
.
level
,
//
item.level,
item
.
description
,
//
item.description,
item
.
ratio
.
total_actual_before
===
null
?
"0.0"
:
item
.
ratio
.
total_actual_before
===
""
?
"0.0"
:
item
.
ratio
.
total_actual_before
,
//
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
Number
(
item
.
ratio
.
january
).
toFixed
(
1
),
//
Number(item.ratio.january).toFixed(1),
Number
(
item
.
ratio
.
february
).
toFixed
(
1
),
//
Number(item.ratio.february).toFixed(1),
Number
(
item
.
ratio
.
march
).
toFixed
(
1
),
//
Number(item.ratio.march).toFixed(1),
Number
(
item
.
ratio
.
april
).
toFixed
(
1
),
//
Number(item.ratio.april).toFixed(1),
Number
(
item
.
ratio
.
may
).
toFixed
(
1
),
//
Number(item.ratio.may).toFixed(1),
Number
(
item
.
ratio
.
june
).
toFixed
(
1
),
//
Number(item.ratio.june).toFixed(1),
Number
(
item
.
ratio
.
july
).
toFixed
(
1
),
//
Number(item.ratio.july).toFixed(1),
Number
(
item
.
ratio
.
august
).
toFixed
(
1
),
//
Number(item.ratio.august).toFixed(1),
Number
(
item
.
ratio
.
september
).
toFixed
(
1
),
//
Number(item.ratio.september).toFixed(1),
Number
(
item
.
ratio
.
october
).
toFixed
(
1
),
//
Number(item.ratio.october).toFixed(1),
Number
(
item
.
ratio
.
november
).
toFixed
(
1
),
//
Number(item.ratio.november).toFixed(1),
Number
(
item
.
ratio
.
december
).
toFixed
(
1
),
//
Number(item.ratio.december).toFixed(1),
Number
(
item
.
ratio
.
total_current_year
).
toFixed
(
1
),
//
Number(item.ratio.total_current_year).toFixed(1),
Number
(
item
.
ratio
.
total_next_year
).
toFixed
(
1
),
//
Number(item.ratio.total_next_year).toFixed(1),
Number
(
item
.
ratio
.
total_more_year
).
toFixed
(
1
),
//
Number(item.ratio.total_more_year).toFixed(1),
item
.
order
,
//
item.order,
item
.
condition_it_should_be
,
//
item.condition_it_should_be,
item
.
condition_if_wrong
//
item.condition_if_wrong
])
//
])
}
//
}
if
(
item
.
children
!==
null
)
{
//
if (item.children !== null) {
if
(
item
.
children
.
length
>
0
)
{
//
if (item.children.length > 0) {
item
.
children
.
map
((
items
,
indexs
)
=>
{
//
item.children.map((items, indexs) => {
handlePushChild
(
items
)
//
handlePushChild(items)
})
//
})
}
//
}
}
//
}
}
//
}
res
.
map
((
item
,
index
)
=>
{
//
res.map((item, index) => {
dataTable
.
push
([
//
dataTable.push([
item
.
type_report_id
,
//
item.type_report_id,
item
.
id
,
//
item.id,
item
.
parent
,
//
item.parent,
item
.
formula
,
//
item.formula,
item
.
level
,
//
item.level,
item
.
description
,
//
item.description,
item
.
ratio
.
total_actual_before
===
null
?
"0.0"
:
item
.
ratio
.
total_actual_before
===
""
?
"0.0"
:
item
.
ratio
.
total_actual_before
,
//
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before,
Number
(
item
.
ratio
.
january
).
toFixed
(
1
),
//
Number(item.ratio.january).toFixed(1),
Number
(
item
.
ratio
.
february
).
toFixed
(
1
),
//
Number(item.ratio.february).toFixed(1),
Number
(
item
.
ratio
.
march
).
toFixed
(
1
),
//
Number(item.ratio.march).toFixed(1),
Number
(
item
.
ratio
.
april
).
toFixed
(
1
),
//
Number(item.ratio.april).toFixed(1),
Number
(
item
.
ratio
.
may
).
toFixed
(
1
),
//
Number(item.ratio.may).toFixed(1),
Number
(
item
.
ratio
.
june
).
toFixed
(
1
),
//
Number(item.ratio.june).toFixed(1),
Number
(
item
.
ratio
.
july
).
toFixed
(
1
),
//
Number(item.ratio.july).toFixed(1),
Number
(
item
.
ratio
.
august
).
toFixed
(
1
),
//
Number(item.ratio.august).toFixed(1),
Number
(
item
.
ratio
.
september
).
toFixed
(
1
),
//
Number(item.ratio.september).toFixed(1),
Number
(
item
.
ratio
.
october
).
toFixed
(
1
),
//
Number(item.ratio.october).toFixed(1),
Number
(
item
.
ratio
.
november
).
toFixed
(
1
),
//
Number(item.ratio.november).toFixed(1),
Number
(
item
.
ratio
.
december
).
toFixed
(
1
),
//
Number(item.ratio.december).toFixed(1),
Number
(
item
.
ratio
.
total_current_year
).
toFixed
(
1
),
//
Number(item.ratio.total_current_year).toFixed(1),
Number
(
item
.
ratio
.
total_next_year
).
toFixed
(
1
),
//
Number(item.ratio.total_next_year).toFixed(1),
Number
(
item
.
ratio
.
total_more_year
).
toFixed
(
1
),
//
Number(item.ratio.total_more_year).toFixed(1),
item
.
order
,
//
item.order,
item
.
condition_it_should_be
,
//
item.condition_it_should_be,
item
.
condition_if_wrong
//
item.condition_if_wrong
])
//
])
if
(
item
.
children
!==
null
)
{
//
if (item.children !== null) {
if
(
item
.
children
.
length
>
0
)
{
//
if (item.children.length > 0) {
item
.
children
.
map
((
items
,
indexs
)
=>
{
//
item.children.map((items, indexs) => {
handlePushChild
(
items
)
//
handlePushChild(items)
})
//
})
}
//
}
}
//
}
})
//
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
this
.
setState
({
dataTable
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
}
else
{
//
} else {
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
}
//
}
})
//
})
}
}
}
}
...
...
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