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
7aa7ac1d
Commit
7aa7ac1d
authored
Oct 01, 2020
by
Rifka Kurnia Irfiana
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
6983a559
7a400996
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
64 deletions
+70
-64
BudgetTahunan.js
src/container/BudgetTahunan.js
+13
-36
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+38
-19
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+6
-4
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+13
-5
No files found.
src/container/BudgetTahunan.js
View file @
7aa7ac1d
...
@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component {
...
@@ -272,8 +272,9 @@ export default class BudgetTahunan extends Component {
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
},
()
=>
{
},
()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
this
.
checkIsSubmit
()
this
.
historyApproval
()
this
.
historyApproval
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
else
{
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
})
...
@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component {
...
@@ -304,20 +305,6 @@ export default class BudgetTahunan extends Component {
})
})
}
}
checkIsSubmit
()
{
// let body = {
// "submission_id": this.state.submissionID
// }
// api.create().checkIsSubmit(body).then(response => {
// console.log(response.data.data.result);
// if (response.data) {
// if (response.data.status === "Success") {
// this.setState({ isSubmit: response.data.data.result })
// }
// }
// })
}
approvalSubmission
(
type
)
{
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
body
=
{
let
body
=
{
...
@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component {
...
@@ -463,20 +450,14 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
})
}
}
})
})
...
@@ -591,13 +572,13 @@ export default class BudgetTahunan extends Component {
...
@@ -591,13 +572,13 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
null
,
cursor
:
tableMeta
.
rowData
[
5
]
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
// tableMeta.rowData[5]
?
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
//
: null
:
null
}
}
>
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
@@ -713,8 +694,7 @@ export default class BudgetTahunan extends Component {
...
@@ -713,8 +694,7 @@ export default class BudgetTahunan extends Component {
download
:
false
,
download
:
false
,
selectableRows
:
false
,
selectableRows
:
false
,
viewColumns
:
false
,
viewColumns
:
false
,
rowsPerPage
:
5
,
pagination
:
false
,
rowsPerPageOptions
:
[
5
,
25
,
100
],
search
:
false
search
:
false
}
}
const
optionsRevision
=
{
const
optionsRevision
=
{
...
@@ -764,8 +744,6 @@ export default class BudgetTahunan extends Component {
...
@@ -764,8 +744,6 @@ export default class BudgetTahunan extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
})}
})}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
...
@@ -785,8 +763,6 @@ export default class BudgetTahunan extends Component {
...
@@ -785,8 +763,6 @@ export default class BudgetTahunan extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
setState
({
visibleTableHistory
:
false
,
loading
:
true
})
this
.
getRevision
()
this
.
getRevision
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
})}
})}
disableClearable
disableClearable
...
@@ -803,6 +779,7 @@ export default class BudgetTahunan extends Component {
...
@@ -803,6 +779,7 @@ export default class BudgetTahunan extends Component {
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
})}
})}
disabled
=
{
true
}
disableClearable
disableClearable
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Revision"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Revision"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
...
@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1045,7 +1022,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
)}
)}
...
@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1061,7 +1038,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
Report
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1079,7 +1056,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1096,7 +1073,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
status
=
{
this
.
state
.
status
}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
...
@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1113,7 +1090,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
isApprover
=
{
this
.
state
.
isApprover
}
isApprover
=
{
this
.
state
.
isApprover
}
/
>
/
>
)}
)}
...
@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1129,7 +1106,7 @@ export default class BudgetTahunan extends Component {
submissionID
=
{
this
.
state
.
submissionID
}
submissionID
=
{
this
.
state
.
submissionID
}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
get
CompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
get
Submission
.
bind
(
this
)}
/
>
/
>
)}
)}
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
7aa7ac1d
...
@@ -245,31 +245,50 @@ export default class CorporateAnnualTarget extends Component {
...
@@ -245,31 +245,50 @@ export default class CorporateAnnualTarget extends Component {
let
reg
=
/^
\d
+$/
;
let
reg
=
/^
\d
+$/
;
isi
.
map
((
i
,
index
)
=>
{
isi
.
map
((
i
,
index
)
=>
{
if
(
i
.
length
>
0
)
{
if
(
i
.
length
>
0
)
{
let
total
=
0
let
lastValz
=
0
let
nilaiTotal
=
0
if
(
i
[
6
]
!==
undefined
)
{
if
(
i
[
6
]
==
'SUM'
||
i
[
6
]
==
'AVG'
||
i
[
6
]
==
'LAST'
)
{
i
.
map
((
items
,
indexs
)
=>
{
if
(
indexs
>=
8
&&
indexs
<=
19
)
{
let
valItem
=
items
==
undefined
||
items
==
""
?
0
:
items
total
+=
Number
(
valItem
)
if
(
index
==
19
)
{
lastValz
+=
Number
(
valItem
)
}
}
})
}
nilaiTotal
=
i
[
6
]
==
'SUM'
?
total
:
i
[
6
]
==
'AVG'
?
total
/
12
:
lastValz
}
console
.
log
(
nilaiTotal
)
payload
.
push
({
payload
.
push
({
item_report_id
:
i
[
0
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
0
]))
===
false
?
""
:
String
(
i
[
0
]).
trim
(),
item_report_id
:
i
[
0
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
0
]))
===
false
?
""
:
String
(
i
[
0
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
item_report
:
i
[
1
]
===
undefined
?
""
:
String
(
i
[
1
]).
trim
(),
weight
:
i
[
2
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
""
:
String
(
i
[
2
]).
trim
(),
weight
:
i
[
2
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
2
]))
===
false
?
""
:
String
(
i
[
2
]).
trim
(),
uom
:
i
[
3
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
""
:
String
(
i
[
3
]).
trim
(),
uom
:
i
[
3
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
3
]))
===
false
?
""
:
String
(
i
[
3
]).
trim
(),
kpi_type
:
i
[
4
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
""
:
String
(
i
[
4
]).
trim
(),
kpi_type
:
i
[
4
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
4
]))
===
false
?
""
:
String
(
i
[
4
]).
trim
(),
formula
:
i
[
5
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
""
:
String
(
i
[
5
]).
trim
(),
max_ach
:
i
[
5
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
5
]))
===
false
?
""
:
String
(
i
[
5
]).
trim
(),
total_actual_before
:
i
[
6
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
"0"
:
String
(
i
[
6
]).
trim
(),
formula
:
i
[
6
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
6
]))
===
false
?
""
:
String
(
i
[
6
]).
trim
(),
january
:
i
[
7
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0"
:
String
(
i
[
7
]).
trim
(),
total_actual_before
:
i
[
7
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
7
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
7
]).
toFixed
(
1
)).
trim
(),
february
:
i
[
8
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0"
:
String
(
i
[
8
]).
trim
(),
january
:
i
[
8
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
8
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
8
]).
toFixed
(
1
)).
trim
(),
march
:
i
[
9
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0"
:
String
(
i
[
9
]).
trim
(),
february
:
i
[
9
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
9
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
9
]).
toFixed
(
1
)).
trim
(),
april
:
i
[
10
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0"
:
String
(
i
[
10
]).
trim
(),
march
:
i
[
10
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
10
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
10
].
toFixed
(
1
))).
trim
(),
may
:
i
[
11
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0"
:
String
(
i
[
11
]).
trim
(),
april
:
i
[
11
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
11
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
11
]).
toFixed
(
1
)).
trim
(),
june
:
i
[
12
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0"
:
String
(
i
[
12
]).
trim
(),
may
:
i
[
12
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
12
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
12
].
toFixed
(
1
))).
trim
(),
july
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
june
:
i
[
13
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
13
].
toFixed
(
1
))).
trim
(),
august
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
july
:
i
[
14
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
14
].
toFixed
(
1
))).
trim
(),
september
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
august
:
i
[
15
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
15
]).
toFixed
(
1
)).
trim
(),
october
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
september
:
i
[
16
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)).
trim
(),
november
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
(),
october
:
i
[
17
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)).
trim
(),
december
:
i
[
18
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
18
]))
===
false
?
"0"
:
String
(
i
[
18
]).
trim
(),
november
:
i
[
18
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
18
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)).
trim
(),
total_current_year
:
i
[
19
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
19
]))
===
false
?
"0"
:
String
(
i
[
19
]).
trim
(),
december
:
i
[
19
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
19
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)).
trim
(),
total_next_year
:
i
[
20
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
20
]))
===
false
?
"0"
:
String
(
i
[
20
]).
trim
(),
total_current_year
:
i
[
20
]
==
0
?
"0.0"
:
String
(
Number
(
nilaiTotal
).
toFixed
(
1
)).
trim
(),
total_more_year
:
i
[
21
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
21
]))
===
false
?
"0"
:
String
(
i
[
21
]).
trim
(),
total_next_year
:
i
[
21
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
21
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
21
]).
toFixed
(
1
)).
trim
(),
strategic
:
i
[
22
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
22
]))
===
false
?
""
:
String
(
i
[
22
]).
trim
(),
total_more_year
:
i
[
22
]
===
undefined
?
"0.0"
:
reg
.
test
(
String
(
i
[
22
]))
===
false
?
"0.0"
:
String
(
Number
(
i
[
22
]).
toFixed
(
1
)).
trim
(),
pic
:
i
[
23
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
23
]))
===
false
?
""
:
String
(
i
[
23
]).
trim
()
strategic
:
i
[
23
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
23
]))
===
false
?
""
:
String
(
i
[
23
]).
trim
(),
pic
:
i
[
24
]
===
undefined
?
""
:
reg
.
test
(
String
(
i
[
24
]))
===
false
?
""
:
String
(
i
[
24
]).
trim
()
})
})
}
}
})
})
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
7aa7ac1d
...
@@ -91,6 +91,7 @@ export default class ProfitLoss extends Component {
...
@@ -91,6 +91,7 @@ export default class ProfitLoss extends Component {
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
api
.
create
().
getDetailReportMB
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
this
.
setState
({
visibleProfitLoss
:
true
})
if
(
response
.
data
)
{
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
...
@@ -166,6 +167,7 @@ export default class ProfitLoss extends Component {
...
@@ -166,6 +167,7 @@ export default class ProfitLoss extends Component {
}
}
}
}
})
})
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
else
{
}
else
{
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
...
@@ -497,9 +499,9 @@ export default class ProfitLoss extends Component {
...
@@ -497,9 +499,9 @@ export default class ProfitLoss extends Component {
}
}
})
})
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
return
value
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
total
...
@@ -2255,9 +2257,9 @@ export default class ProfitLoss extends Component {
...
@@ -2255,9 +2257,9 @@ export default class ProfitLoss extends Component {
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"grid grid-2x"
style
=
{{
marginTop
:
20
}}
>
<
div
className
=
"col-1"
>
<
div
className
=
"col-1"
>
<
button
<
button
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
visibleProfitLoss
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
,
dataTable
:[]
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getItemHierarki
()
this
.
getItemHierarki
()
},
100
);
},
100
);
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
7aa7ac1d
...
@@ -520,7 +520,10 @@ export default class BalanceSheet extends Component {
...
@@ -520,7 +520,10 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
return
(
<
div
style
=
{{
width
:
300
}}
>
<
div
style
=
{{
width
:
300
}}
>
{
tableMeta
.
rowData
[
22
]
?
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
22
]
?
tableMeta
.
rowData
[
22
].
length
>
0
?
tableMeta
.
rowData
[
22
].
length
>
0
?
tableMeta
.
rowData
[
22
][
0
].
field
===
'item'
?
tableMeta
.
rowData
[
22
][
0
].
field
===
'item'
?
tableMeta
.
rowData
[
4
]
==
0
?
tableMeta
.
rowData
[
4
]
==
0
?
...
@@ -572,6 +575,9 @@ export default class BalanceSheet extends Component {
...
@@ -572,6 +575,9 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
// value={value}
// value={value}
...
@@ -593,7 +599,7 @@ export default class BalanceSheet extends Component {
...
@@ -593,7 +599,7 @@ export default class BalanceSheet extends Component {
// }}
// }}
/
>
/
>
}
}
/
>
/>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -610,6 +616,9 @@ export default class BalanceSheet extends Component {
...
@@ -610,6 +616,9 @@ export default class BalanceSheet extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
<
NumberFormat
<
NumberFormat
thousandSeparator
=
{
true
}
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
...
@@ -618,7 +627,7 @@ export default class BalanceSheet extends Component {
...
@@ -618,7 +627,7 @@ export default class BalanceSheet extends Component {
disabled
=
{
true
}
disabled
=
{
true
}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
value
=
{
value
}
value
=
{
value
}
/
>
/>
}
<
/div
>
<
/div
>
)
)
}
}
...
@@ -1141,9 +1150,8 @@ export default class BalanceSheet extends Component {
...
@@ -1141,9 +1150,8 @@ export default class BalanceSheet extends Component {
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
value
=
{
handleValue
(
value
,
tableMeta
)}
decimalScale
=
{
1
}
decimalScale
=
{
1
}
disabled
=
{
tr
ue
}
value
=
{
val
ue
}
onBlur
=
{(
event
)
=>
{
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
handleChange
(
event
.
target
.
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