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
8c08f7a7
Commit
8c08f7a7
authored
Sep 22, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update fam 220920 malam
parent
5340be35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
5 deletions
+47
-5
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+47
-5
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
8c08f7a7
...
...
@@ -346,6 +346,7 @@ export default class FixedAssetsMovement extends Component {
})
})
let
body
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
...
...
@@ -383,6 +384,50 @@ export default class FixedAssetsMovement extends Component {
}
}
handleValidate
()
{
let
data
=
[]
// console.log(this.state.dataTable)
this
.
state
.
dataTable
.
map
(
i
=>
{
data
.
push
({
item_report_id
:
i
[
1
],
total_actual_before
:
String
(
i
[
6
]),
january
:
String
(
i
[
7
]),
february
:
String
(
i
[
8
]),
march
:
String
(
i
[
9
]),
april
:
String
(
i
[
10
]),
may
:
String
(
i
[
11
]),
june
:
String
(
i
[
12
]),
july
:
String
(
i
[
13
]),
august
:
String
(
i
[
14
]),
september
:
String
(
i
[
15
]),
october
:
String
(
i
[
16
]),
november
:
String
(
i
[
17
]),
december
:
String
(
i
[
18
]),
total_current_year
:
String
(
i
[
19
]),
total_next_year
:
String
(
i
[
20
]),
total_more_year
:
String
(
i
[
21
])
})
})
// console.log(JSON.stringify(data))
let
payload
=
{
submission_id
:
this
.
props
.
submissionID
,
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
fixed_asset_movement
:
data
,
status
:
"submitted"
}
console
.
log
(
payload
)
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
}
else
{
this
.
setState
({
loading
:
false
,
buttonError
:
true
,
editable
:
true
})
}
})
}
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
...
...
@@ -507,8 +552,6 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
/* {console.log(val)} */
}
{
/* {console.log(tableMeta)} */
}
{
tableMeta
.
rowData
[
22
]
?
tableMeta
.
rowData
[
22
].
length
>
0
?
<
div
style
=
{{
paddingLeft
:
20
*
Number
(
tableMeta
.
rowData
[
4
])
}}
>
...
...
@@ -547,8 +590,6 @@ export default class FixedAssetsMovement extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
console
.
log
(
tableMeta
)}
{
console
.
log
(
value
)}
{
tableMeta
.
rowData
[
0
]
===
4
?
null
:
...
...
@@ -2012,7 +2053,8 @@ export default class FixedAssetsMovement extends Component {
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
true
})
// this.setState({ loading: false, buttonError: false, editable: true })
this
.
handleValidate
()
},
100
);
})
}}
...
...
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