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
7579513c
Commit
7579513c
authored
Oct 07, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'didam' into 'master'
bobo nyenyak See merge request
!488
parents
ef94db22
7d662834
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
53 deletions
+169
-53
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+142
-47
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+22
-1
OperatingIndicatorDetail.js
src/container/OprIndicator/OperatingIndicatorDetail.js
+5
-5
No files found.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
7579513c
...
@@ -102,18 +102,18 @@ export default class FixedAssetsMovement extends Component {
...
@@ -102,18 +102,18 @@ export default class FixedAssetsMovement extends Component {
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
fixed_asset_movement
.
total_actual_before
===
null
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
===
""
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
,
item
.
fixed_asset_movement
.
total_actual_before
===
null
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
===
""
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
,
item
.
fixed_asset_movement
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
january
,
formula
:
item
.
fixed_asset_movement
.
january_formula
}
:
item
.
fixed_asset_movement
.
january
,
item
.
fixed_asset_movement
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
february
,
formula
:
item
.
fixed_asset_movement
.
february_formula
}
:
item
.
fixed_asset_movement
.
february
,
item
.
fixed_asset_movement
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
march
,
formula
:
item
.
fixed_asset_movement
.
march_formula
}
:
item
.
fixed_asset_movement
.
march
,
item
.
fixed_asset_movement
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
april
,
formula
:
item
.
fixed_asset_movement
.
april_formula
}
:
item
.
fixed_asset_movement
.
april
,
item
.
fixed_asset_movement
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
may
,
formula
:
item
.
fixed_asset_movement
.
may_formula
}
:
item
.
fixed_asset_movement
.
may
,
item
.
fixed_asset_movement
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
june
,
formula
:
item
.
fixed_asset_movement
.
june_formula
}
:
item
.
fixed_asset_movement
.
june
,
item
.
fixed_asset_movement
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
july
,
formula
:
item
.
fixed_asset_movement
.
july_formula
}
:
item
.
fixed_asset_movement
.
july
,
item
.
fixed_asset_movement
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
august
,
formula
:
item
.
fixed_asset_movement
.
august_formula
}
:
item
.
fixed_asset_movement
.
august
,
item
.
fixed_asset_movement
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
september
,
formula
:
item
.
fixed_asset_movement
.
september_formula
}
:
item
.
fixed_asset_movement
.
september
,
item
.
fixed_asset_movement
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
october
,
formula
:
item
.
fixed_asset_movement
.
october_formula
}
:
item
.
fixed_asset_movement
.
october
,
item
.
fixed_asset_movement
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
november
,
formula
:
item
.
fixed_asset_movement
.
november_formula
}
:
item
.
fixed_asset_movement
.
november
,
item
.
fixed_asset_movement
.
december
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
december
,
formula
:
item
.
fixed_asset_movement
.
december_formula
}
:
item
.
fixed_asset_movement
.
december
,
item
.
fixed_asset_movement
.
total_current_year
,
item
.
fixed_asset_movement
.
total_current_year
,
item
.
fixed_asset_movement
.
total_next_year
,
item
.
fixed_asset_movement
.
total_next_year
,
item
.
fixed_asset_movement
.
total_more_year
,
item
.
fixed_asset_movement
.
total_more_year
,
...
@@ -137,18 +137,18 @@ export default class FixedAssetsMovement extends Component {
...
@@ -137,18 +137,18 @@ export default class FixedAssetsMovement extends Component {
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
item
.
fixed_asset_movement
.
total_actual_before
===
null
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
===
""
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
,
item
.
fixed_asset_movement
.
total_actual_before
===
null
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
===
""
?
"0"
:
item
.
fixed_asset_movement
.
total_actual_before
,
item
.
fixed_asset_movement
.
january
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
january
,
formula
:
item
.
fixed_asset_movement
.
january_formula
}
:
item
.
fixed_asset_movement
.
january
,
item
.
fixed_asset_movement
.
february
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
february
,
formula
:
item
.
fixed_asset_movement
.
february_formula
}
:
item
.
fixed_asset_movement
.
february
,
item
.
fixed_asset_movement
.
march
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
march
,
formula
:
item
.
fixed_asset_movement
.
march_formula
}
:
item
.
fixed_asset_movement
.
march
,
item
.
fixed_asset_movement
.
april
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
april
,
formula
:
item
.
fixed_asset_movement
.
april_formula
}
:
item
.
fixed_asset_movement
.
april
,
item
.
fixed_asset_movement
.
may
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
may
,
formula
:
item
.
fixed_asset_movement
.
may_formula
}
:
item
.
fixed_asset_movement
.
may
,
item
.
fixed_asset_movement
.
june
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
june
,
formula
:
item
.
fixed_asset_movement
.
june_formula
}
:
item
.
fixed_asset_movement
.
june
,
item
.
fixed_asset_movement
.
july
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
july
,
formula
:
item
.
fixed_asset_movement
.
july_formula
}
:
item
.
fixed_asset_movement
.
july
,
item
.
fixed_asset_movement
.
august
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
august
,
formula
:
item
.
fixed_asset_movement
.
august_formula
}
:
item
.
fixed_asset_movement
.
august
,
item
.
fixed_asset_movement
.
september
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
september
,
formula
:
item
.
fixed_asset_movement
.
september_formula
}
:
item
.
fixed_asset_movement
.
september
,
item
.
fixed_asset_movement
.
october
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
october
,
formula
:
item
.
fixed_asset_movement
.
october_formula
}
:
item
.
fixed_asset_movement
.
october
,
item
.
fixed_asset_movement
.
november
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
november
,
formula
:
item
.
fixed_asset_movement
.
november_formula
}
:
item
.
fixed_asset_movement
.
november
,
item
.
fixed_asset_movement
.
december
,
item
.
type_report_id
==
5
||
item
.
type_report_id
==
6
?
{
value
:
item
.
fixed_asset_movement
.
december
,
formula
:
item
.
fixed_asset_movement
.
december_formula
}
:
item
.
fixed_asset_movement
.
december
,
item
.
fixed_asset_movement
.
total_current_year
,
item
.
fixed_asset_movement
.
total_current_year
,
item
.
fixed_asset_movement
.
total_next_year
,
item
.
fixed_asset_movement
.
total_next_year
,
item
.
fixed_asset_movement
.
total_more_year
,
item
.
fixed_asset_movement
.
total_more_year
,
...
@@ -458,6 +458,101 @@ export default class FixedAssetsMovement extends Component {
...
@@ -458,6 +458,101 @@ export default class FixedAssetsMovement extends Component {
render
()
{
render
()
{
let
dataTable2
=
this
.
state
.
dataTable
let
dataTable2
=
this
.
state
.
dataTable
const
handleValueFormula
=
(
value
,
tableMeta
)
=>
{
let
splitFormula
=
String
(
tableMeta
.
rowData
[
3
]).
split
(
'@'
)
let
baru
=
[]
let
anjay
=
[]
splitFormula
.
map
((
item
,
index
)
=>
{
let
items
=
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
)
let
re
=
/^
[
a-zA-Z0-9_
]
+$/
;
let
asd
=
''
if
(
item
!==
""
)
{
if
(
!
re
.
test
(
items
))
{
baru
.
push
(
String
(
item
).
substr
(
0
,
Number
(
String
(
item
).
length
)
-
1
))
baru
.
push
(
String
(
item
).
substr
(
Number
(
String
(
item
).
length
)
-
1
,
1
))
}
else
{
baru
.
push
(
String
(
item
))
}
}
})
// console.log(baru)
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
)
{
anjay
.
push
(
item
)
}
else
{
if
(
String
(
item
).
includes
(
'#'
))
{
if
(
String
(
item
).
includes
(
'[M-1]'
))
{
let
tst
=
String
(
item
).
replace
(
'[M-1]'
,
''
)
let
indexID
=
tableMeta
.
rowData
[
18
].
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
tst
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
)
-
1
)
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
let
valuezz
=
tableMeta
.
rowData
[
18
].
formula
[
indexID
].
value
// baru.push(valuezz)
anjay
.
push
(
valuezz
)
// console.log(valuezz)
}
}
else
{
let
indexID
=
value
.
formula
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
))
// console.log(indexID)
if
(
indexID
!==
-
1
)
{
// console.log(value.formula[indexID].value)
let
valuezz
=
value
.
formula
[
indexID
].
value
anjay
.
push
(
valuezz
)
}
}
}
else
{
// console.log(item)
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
22
]
==
item
)
// console.log(dataTable2[indexID][tableMeta.columnIndex])
if
(
indexID
!==
-
1
)
{
let
valuezz
=
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
==
undefined
?
dataTable2
[
indexID
][
tableMeta
.
columnIndex
]
:
dataTable2
[
indexID
][
tableMeta
.
columnIndex
].
value
anjay
.
push
(
valuezz
)
}
}
}
})
let
total
=
0
let
opt
=
""
anjay
.
map
((
item
,
index
)
=>
{
if
(
item
==
"+"
)
{
opt
=
"tambah"
}
else
if
(
item
==
"-"
)
{
opt
=
"kurang"
}
else
if
(
item
==
"*"
)
{
opt
=
"kali"
}
else
if
(
item
==
"/"
)
{
opt
=
"bagi"
}
else
{
if
(
opt
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
item
)
}
else
if
(
opt
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
item
)
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
item
)
}
else
if
(
opt
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
item
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
item
)
}
else
{
total
+=
Number
(
item
)
}
}
})
// console.log(tableMeta.rowData[5])
// console.log(baru)
// console.log(anjay)
// console.log(total)
// console.log(splitFormula)
if
(
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
==
undefined
)
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
total
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
].
value
=
total
}
return
total
}
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
const
handleChange
=
(
value
,
tableMeta
,
type
)
=>
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
if
(
type
===
"actual"
)
{
if
(
type
===
"actual"
)
{
...
@@ -744,7 +839,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -744,7 +839,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -758,7 +853,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -758,7 +853,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -833,7 +928,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -833,7 +928,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -847,7 +942,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -847,7 +942,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
2
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -922,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -922,7 +1017,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -936,7 +1031,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -936,7 +1031,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
3
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1011,7 +1106,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1011,7 +1106,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1025,7 +1120,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1025,7 +1120,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
4
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1100,7 +1195,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1100,7 +1195,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1114,7 +1209,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1114,7 +1209,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
5
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1189,7 +1284,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1189,7 +1284,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1203,7 +1298,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1203,7 +1298,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
6
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1278,7 +1373,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1278,7 +1373,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1292,7 +1387,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1292,7 +1387,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
7
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1367,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1367,7 +1462,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1381,7 +1476,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1381,7 +1476,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
8
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1456,7 +1551,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1456,7 +1551,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1470,7 +1565,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1470,7 +1565,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
9
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1545,7 +1640,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1545,7 +1640,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1559,7 +1654,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1559,7 +1654,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
10
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1634,7 +1729,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1634,7 +1729,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
@@ -1648,7 +1743,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1648,7 +1743,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handle
Formula
(
value
,
tableMeta
,
11
)).
toFixed
(
1
)}
value
=
{
Number
(
handle
ValueFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
...
@@ -1723,7 +1818,7 @@ export default class FixedAssetsMovement extends Component {
...
@@ -1723,7 +1818,7 @@ export default class FixedAssetsMovement extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
Number
(
handleValue
Formula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
/
>
<
/span
>
<
/span
>
:
:
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
7579513c
...
@@ -108,6 +108,27 @@ export default class OperatingIndicator extends Component {
...
@@ -108,6 +108,27 @@ export default class OperatingIndicator extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
compActive
=
[]
let
userCompActive
=
[]
this
.
state
.
userCompany
.
map
((
item
,
index
)
=>
{
let
indeks
=
data
.
findIndex
((
val
)
=>
val
.
company_id
==
item
)
if
(
indeks
!==
-
1
&&
String
(
data
[
indeks
].
status
).
toLocaleLowerCase
()
==
'active'
){
userCompActive
.
push
(
item
)
}
})
data
.
map
((
item
,
index
)
=>
{
if
(
String
(
item
.
status
).
toLocaleLowerCase
()
==
'active'
)
{
compActive
.
push
(
item
)
}
})
if
(
compActive
.
length
==
userCompActive
.
length
){
this
.
setState
({
superUser
:
false
})
}
else
{
this
.
setState
({
superUser
:
true
})
}
let
companyData
=
data
.
map
((
item
)
=>
{
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
return
{
company_id
:
item
.
company_id
,
company_id
:
item
.
company_id
,
...
@@ -501,7 +522,7 @@ export default class OperatingIndicator extends Component {
...
@@ -501,7 +522,7 @@ export default class OperatingIndicator extends Component {
})}
})}
getReport
=
{()
=>
this
.
getReport
()}
getReport
=
{()
=>
this
.
getReport
()}
saveOperatingInd
=
{
this
.
saveOperatingInd
.
bind
(
this
)}
saveOperatingInd
=
{
this
.
saveOperatingInd
.
bind
(
this
)}
superUser
=
{
this
.
state
.
superUser
}
/
>
/
>
}
}
...
...
src/container/OprIndicator/OperatingIndicatorDetail.js
View file @
7579513c
...
@@ -1244,7 +1244,7 @@ export default class BalanceSheet extends Component {
...
@@ -1244,7 +1244,7 @@ export default class BalanceSheet extends Component {
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
{
this
.
props
.
superUser
&&
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -1256,9 +1256,9 @@ export default class BalanceSheet extends Component {
...
@@ -1256,9 +1256,9 @@ export default class BalanceSheet extends Component {
>
>
<
img
src
=
{
Images
.
template
}
/
>
<
img
src
=
{
Images
.
template
}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a>
}
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"template"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
{
this
.
props
.
superUser
&&
<
a
data
-
tip
=
{
'Upload'
}
data
-
for
=
"upload"
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
...
@@ -1270,7 +1270,7 @@ export default class BalanceSheet extends Component {
...
@@ -1270,7 +1270,7 @@ export default class BalanceSheet extends Component {
>
>
<
img
src
=
{
Images
.
upload
}
/
>
<
img
src
=
{
Images
.
upload
}
/
>
<
/button
>
<
/button
>
<
/a
>
<
/a>
}
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
ReactTooltip
border
=
{
true
}
id
=
"upload"
place
=
"bottom"
type
=
"light"
effect
=
"solid"
/>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
a
data
-
tip
=
{
'Download'
}
data
-
for
=
"download"
>
<
button
<
button
...
@@ -1323,7 +1323,7 @@ export default class BalanceSheet extends Component {
...
@@ -1323,7 +1323,7 @@ export default class BalanceSheet extends Component {
<
/div
>
<
/div
>
<
/button
>
<
/button
>
<
/div
>
<
/div
>
{
!
this
.
state
.
emptyData
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
{
!
this
.
state
.
emptyData
&&
this
.
props
.
superUser
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
<
button
type
=
"button"
type
=
"button"
onClick
=
{()
=>
onClick
=
{()
=>
...
...
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