Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Ad1Appraisal-Mobile
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
Ad1Appraisal-Mobile
Commits
692c6cd3
Commit
692c6cd3
authored
Mar 09, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tambahan buat demo katanya
parent
3a4d696a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
468 additions
and
227 deletions
+468
-227
sampleMenuAppraisal.js
app/container/home/appraisal/sampleMenuAppraisal.js
+46
-75
sampleMenuAppraisal2.js
app/container/home/appraisal/sampleMenuAppraisal2.js
+217
-97
sampleMenuAppraisal3.js
app/container/home/appraisal/sampleMenuAppraisal3.js
+49
-6
penerimaan.js
app/container/home/penerimaan/penerimaan.js
+2
-2
sampleMenuPenerimaan.js
app/container/home/penerimaan/sampleMenuPenerimaan.js
+118
-30
sampleMenuPenerimaan2.js
app/container/home/penerimaan/sampleMenuPenerimaan2.js
+11
-2
sampleMenuPenerimaan3.js
app/container/home/penerimaan/sampleMenuPenerimaan3.js
+20
-14
api.js
app/service/api.js
+5
-1
No files found.
app/container/home/appraisal/sampleMenuAppraisal.js
View file @
692c6cd3
...
@@ -62,14 +62,6 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -62,14 +62,6 @@ export default class sampleMenuAppraisal extends Component {
this
.
setState
({
dateUpdate
,
isDateTimePickerVisible
:
false
})
this
.
setState
({
dateUpdate
,
isDateTimePickerVisible
:
false
})
}
}
draftData
()
{
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
draftDataBack
(){
draftDataBack
(){
api
.
create
().
postDraftAppraisal
({
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
contract_id
:
this
.
state
.
data
.
contract_id
...
@@ -231,7 +223,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -231,7 +223,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Warehouse
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Warehouse
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeWerehouse
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeWerehouse
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -245,7 +237,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -245,7 +237,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Warehouse
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Warehouse
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaWerehouse
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaWerehouse
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -259,7 +251,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -259,7 +251,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Remote
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Remote
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
kodeRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -273,7 +265,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -273,7 +265,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Remote
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Remote
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -288,7 +280,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -288,7 +280,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Appraisal
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Appraisal
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -311,7 +303,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -311,7 +303,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Masuk
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Masuk
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -333,7 +325,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -333,7 +325,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Penilaian
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Penilaian
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -347,7 +339,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -347,7 +339,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Jaminan
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
Jaminan
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -361,7 +353,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -361,7 +353,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Lokasi
Unit
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Lokasi
Unit
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -373,9 +365,9 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -373,9 +365,9 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Ket
erangan
Lokasi
Unit
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Ket
Lokasi
Unit
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -389,7 +381,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -389,7 +381,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Petugas
Tarik
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Petugas
Tarik
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -403,7 +395,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -403,7 +395,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Int
/
Ext
Kolektor
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Int
/
Ext
Kolektor
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -414,11 +406,11 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -414,11 +406,11 @@ export default class sampleMenuAppraisal extends Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Masuk
W
e
rehouse
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Masuk
W
a
rehouse
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -441,7 +433,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -441,7 +433,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Pick
up
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Pick
up
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -464,7 +456,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -464,7 +456,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Perubahan
Data
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Perubahan
Data
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -515,7 +507,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -515,7 +507,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Rekondisi
STNK
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Rekondisi
STNK
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -526,11 +518,11 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -526,11 +518,11 @@ export default class sampleMenuAppraisal extends Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'40%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tgl
Jatuh
Tempo
STNK
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Jatuh
Tempo
STNK
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -552,7 +544,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -552,7 +544,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
PKB
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
PKB
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -566,7 +558,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -566,7 +558,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
SWDKLJJ
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
SWDKLJJ
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -610,7 +602,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -610,7 +602,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Faktur
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Faktur
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -632,7 +624,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -632,7 +624,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Faktur
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Faktur
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -674,7 +666,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -674,7 +666,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Sertifikat
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Sertifikat
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -688,7 +680,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -688,7 +680,7 @@ export default class sampleMenuAppraisal extends Component {
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Sertifikat
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tanggal
Sertifikat
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
<
TouchableOpacity
style
=
{
styles
.
viewInput
En
able
}
style
=
{
styles
.
viewInput
Dis
able
}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
onPress
=
{()
=>
this
.
setState
({
isDateTimePickerVisiblePenerimaan
:
true
})}
>
>
...
@@ -739,7 +731,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -739,7 +731,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Polisi
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Polisi
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -752,7 +744,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -752,7 +744,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Rangka
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Rangka
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -765,7 +757,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -765,7 +757,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Mesin
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nomor
Mesin
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -778,7 +770,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -778,7 +770,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
KM
Terakhir
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
KM
Terakhir
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -791,7 +783,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -791,7 +783,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kunci
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kunci
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -804,7 +796,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -804,7 +796,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Merk
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Merk
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -817,7 +809,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -817,7 +809,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tipe
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -830,7 +822,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -830,7 +822,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Model
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Model
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -843,7 +835,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -843,7 +835,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tahun
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Tahun
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -856,7 +848,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -856,7 +848,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Warna
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Warna
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -869,7 +861,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -869,7 +861,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Pasar
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Pasar
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -882,7 +874,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -882,7 +874,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nilai
Pembanding
Rekondisi
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nilai
Pembanding
Rekondisi
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -895,7 +887,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -895,7 +887,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Pokok
Pembiayaan
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Pokok
Pembiayaan
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -908,7 +900,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -908,7 +900,7 @@ export default class sampleMenuAppraisal extends Component {
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
width
:
'45%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Karoseri
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Harga
Karoseri
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaRemote
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
...
@@ -923,28 +915,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -923,28 +915,7 @@ export default class sampleMenuAppraisal extends Component {
<
/CollapseBody
>
<
/CollapseBody
>
<
/Collapse
>
<
/Collapse
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'space-evenly'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'center'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
}}
>
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
backgroundPlaceholder
=
{
null
}
backgroundDarker
=
{
'#FFED75'
}
backgroundProgress
=
{
null
}
width
=
{
120
}
height
=
{
45
}
raiseLevel
=
{
5
}
borderRadius
=
{
10
}
progressLoadingTime
=
{
1000
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
draftData
()
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Draft
<
/Text
>
<
/AwesomeButton
>
<
AwesomeButton
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundColor
=
{
Colors
.
yellowBasic
}
...
@@ -960,7 +931,7 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -960,7 +931,7 @@ export default class sampleMenuAppraisal extends Component {
progress
=
{
!
this
.
state
.
progress
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal2'
,
{
contract_id
:
this
.
state
.
data
.
contract_id
})
this
.
props
.
navigation
.
navigate
(
'MenuAppraisal2'
,
{
contract_id
:
this
.
state
.
data
.
contract_id
,
data
:
this
.
state
.
data
})
next
()
next
()
},
300
);
},
300
);
}}
}}
...
@@ -975,8 +946,8 @@ export default class sampleMenuAppraisal extends Component {
...
@@ -975,8 +946,8 @@ export default class sampleMenuAppraisal extends Component {
}
}
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
viewInputEnable
:
{
width
:
'5
5
%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputEnable
:
{
width
:
'5
0
%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'5
5
%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'5
0
%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
...
...
app/container/home/appraisal/sampleMenuAppraisal2.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
,
BackHandler
}
from
'react-native'
import
ImagePicker
from
'react-native-image-picker'
;
import
ImagePicker
from
'react-native-image-picker'
;
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
...
@@ -15,17 +15,44 @@ export default class sampleMenuAppraisal2 extends Component {
...
@@ -15,17 +15,44 @@ export default class sampleMenuAppraisal2 extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
this
.
state
=
{
this
.
state
=
{
data
:
this
.
props
.
navigation
.
state
.
params
.
data
||
""
,
date
:
new
Date
(),
date
:
new
Date
(),
checked
:
'first'
,
checked
:
'first'
,
progress
:
false
,
progress
:
false
,
viewerMesin
:
false
,
viewerMesin
:
false
,
imageRangka
:
''
,
imageRangka
:
''
,
imageMesin
:
''
,
imageMesin
:
''
,
mesinArray
:
[]
mesinArray
:
[],
photo1
:
''
,
photo2
:
''
,
photo3
:
''
,
photo4
:
''
,
photo5
:
''
,
photo6
:
''
,
}
}
}
}
componentDidMount
(){
componentDidMount
()
{
if
(
this
.
state
.
data
!=
""
)
{
this
.
setState
({
photo1
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
0
],
photo2
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
1
],
photo3
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
2
],
photo4
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
3
],
photo5
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
4
],
photo6
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
5
]
})
}
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
}
async
requestCameraPermission
(
type
)
{
async
requestCameraPermission
(
type
)
{
...
@@ -61,8 +88,37 @@ export default class sampleMenuAppraisal2 extends Component {
...
@@ -61,8 +88,37 @@ export default class sampleMenuAppraisal2 extends Component {
try
{
try
{
RNFetchBlob
.
fs
.
readFile
(
res
.
uri
,
'base64'
)
RNFetchBlob
.
fs
.
readFile
(
res
.
uri
,
'base64'
)
.
then
((
data
)
=>
{
.
then
((
data
)
=>
{
if
(
type
==
'rangka'
)
{
if
(
type
==
'1'
)
{
this
.
setState
({
imageRangka
:
res
.
uri
},
()
=>
alert
(
this
.
state
.
imageRangka
))
this
.
setState
({
photo1
:
res
.
uri
})
}
else
if
(
type
==
'2'
)
{
this
.
setState
({
photo2
:
res
.
uri
})
}
else
if
(
type
==
'3'
)
{
this
.
setState
({
photo3
:
res
.
uri
})
}
else
if
(
type
==
'4'
)
{
this
.
setState
({
photo4
:
res
.
uri
})
}
else
if
(
type
==
'5'
)
{
this
.
setState
({
photo5
:
res
.
uri
})
}
else
if
(
type
==
'6'
)
{
this
.
setState
({
photo6
:
res
.
uri
})
}
else
if
(
type
==
'rangka'
)
{
this
.
setState
({
data
:
{
...
this
.
state
.
data
,
chassis_number_photo
:
res
.
uri
}
})
}
else
{
}
else
{
let
mesinArray
=
[]
let
mesinArray
=
[]
mesinArray
.
push
({
mesinArray
.
push
({
...
@@ -86,6 +142,7 @@ export default class sampleMenuAppraisal2 extends Component {
...
@@ -86,6 +142,7 @@ export default class sampleMenuAppraisal2 extends Component {
render
()
{
render
()
{
let
{
data
}
=
this
.
state
return
(
return
(
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
,
paddingBottom
:
20
}}
>
<
Container
style
=
{{
flex
:
1
,
paddingHorizontal
:
20
,
paddingBottom
:
20
}}
>
...
@@ -107,136 +164,199 @@ export default class sampleMenuAppraisal2 extends Component {
...
@@ -107,136 +164,199 @@ export default class sampleMenuAppraisal2 extends Component {
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
style
=
{{
flex
:
1
}}
>
<
ScrollView
showsVerticalScrollIndicator
=
{
false
}
>
<
View
>
<
View
style
=
{{
padding
:
20
,
justifyContent
:
'center'
,
width
:
'100%'
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
fontSize
:
18
,
fontWeight
:
'bold'
}}
>
Appraisal
<
/Text
>
<
/View
>
<
StepIndicator
labels
=
{
Array
.
labelAppraisal
}
currentPosition
=
{
1
}
customStyles
=
{{
stepIndicatorSize
:
20
,
currentStepIndicatorSize
:
20
,
currentStepStrokeWidth
:
1
,
stepStrokeCurrentColor
:
Colors
.
yellowBasic
,
stepIndicatorCurrentColor
:
'white'
,
stepIndicatorLabelCurrentColor
:
Colors
.
yellowBasic
,
currentStepLabelColor
:
Colors
.
yellowBasic
,
stepStrokeUnFinishedColor
:
Colors
.
yellowBasic
,
separatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorLabelUnFinishedColor
:
'#ffffff'
,
labelColor
:
'#E6E6E6'
,
stepIndicatorFinishedColor
:
Colors
.
yellowBasic
,
separatorFinishedColor
:
Colors
.
yellowBasic
,
}}
stepCount
=
{
Array
.
labelStep
.
length
}
/
>
<
View
style
=
{{
padding
:
20
,
justifyContent
:
'center'
,
width
:
'100%'
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
fontSize
:
18
,
fontWeight
:
'bold'
}}
>
Appraisal
<
/Text
>
<
/View
>
<
StepIndicator
labels
=
{
Array
.
labelAppraisal
}
currentPosition
=
{
1
}
customStyles
=
{{
stepIndicatorSize
:
20
,
currentStepIndicatorSize
:
20
,
currentStepStrokeWidth
:
1
,
stepStrokeCurrentColor
:
Colors
.
yellowStatusBar
,
stepIndicatorCurrentColor
:
'white'
,
stepIndicatorLabelCurrentColor
:
Colors
.
yellowStatusBar
,
currentStepLabelColor
:
Colors
.
yellowStatusBar
,
stepStrokeUnFinishedColor
:
Colors
.
yellowStatusBar
,
separatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorUnFinishedColor
:
'#DEE1E5'
,
stepIndicatorLabelUnFinishedColor
:
'#ffffff'
,
labelColor
:
'#E6E6E6'
,
stepIndicatorFinishedColor
:
Colors
.
yellowStatusBar
,
separatorFinishedColor
:
Colors
.
yellowStatusBar
,
}}
stepCount
=
{
Array
.
labelAppraisal
.
length
}
/
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
,
marginTop
:
20
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Rangka
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
this
.
requestCameraPermission
(
'rangka'
)}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
this
.
state
.
imageRangka
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'contain'
}}
source
=
{{
uri
:
this
.
state
.
imageRangka
}}
/
>
}
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
,
marginTop
:
20
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Rangka
<
/Text
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
state
.
imageMesin
!=
''
?
this
.
setState
({
viewerMesin
:
true
})
:
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
this
.
state
.
imageMesin
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
imageMesin
}}
/
>
}
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
null
}
activeOpacity
=
{
1
}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
data
.
chassis_number_photo
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'cover'
}}
source
=
{{
uri
:
data
.
chassis_number_photo
}}
/
>
}
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
Unit
(
6
Foto
)
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
/View
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
state
.
imageMesin
!=
''
?
this
.
setState
({
viewerMesin
:
true
})
:
null
}}
>
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
>
{
data
.
engine_number_photo
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
data
.
engine_number_photo
}}
/
>
}
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewFotoUnit
}
>
<
/TouchableOpacity
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'45%'
,
justifyContent
:
'space-between'
}}
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
Unit
(
6
Foto
)
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
viewFotoUnit
}
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'40%'
,
justifyContent
:
'space-between'
}}
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo1
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo1
}}
/
>
}
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Bag
.
Depan
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo2
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo2
}}
/
>
}
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
,
flexWrap
:
'nowrap'
}}
>
Bag
.
Belakang
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo3
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo3
}}
/
>
}
<
/View
>
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Depan
Kanan
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'45%'
,
justifyContent
:
'space-between'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
height
:
'40%'
,
justifyContent
:
'space-between'
}}
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo4
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo4
}}
/
>
}
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Sisi
Kanan
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo5
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo5
}}
/
>
}
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
11
}}
>
Sisi
Kiri
<
/Text
>
<
/TouchableOpacity
>
<
TouchableOpacity
activeOpacity
=
{
1
}
style
=
{{
width
:
'30%'
,
height
:
'80%'
,
}}
onPress
=
{()
=>
null
}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'
3
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'
10
0%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
}}
}}
>
>
{
this
.
state
.
photo6
==
''
?
<
View
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
justifyContent
:
'center'
,
alignContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'rgba(237, 57, 99, .5)'
,
textAlign
:
'center'
,
fontSize
:
40
}}
>+<
/Text
>
<
/View>
:
<
Image
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
resizeMode
:
'stretch'
}}
source
=
{{
uri
:
this
.
state
.
photo6
}}
/
>
}
<
/View
>
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Belakang
Kiri
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
<
View
style
=
{{
width
:
'100%'
,
marginTop
:
20
,
marginBottom
:
20
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
width
:
'100%'
,
marginTop
:
20
,
marginBottom
:
20
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
...
@@ -271,6 +391,6 @@ const styles = StyleSheet.create({
...
@@ -271,6 +391,6 @@ const styles = StyleSheet.create({
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
Horizontal
:
10
,
paddingVertical
:
20
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
})
app/container/home/appraisal/sampleMenuAppraisal3.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
BackHandler
}
from
'react-native'
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Collapse
,
CollapseHeader
,
CollapseBody
}
from
"accordion-collapse-react-native"
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
{
Thumbnail
,
List
,
ListItem
,
Separator
,
Container
}
from
'native-base'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
...
@@ -39,10 +39,31 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -39,10 +39,31 @@ export default class sampleMenuAppraisal3 extends Component {
}
}
}
}
validasi
(){
componentDidMount
()
{
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
validasi
()
{
api
.
create
().
postAppraisal
({
api
.
create
().
postAppraisal
({
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
contract_id
:
this
.
props
.
navigation
.
state
.
params
.
contract_id
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
}
draftData
()
{
api
.
create
().
postDraftAppraisal
({
contract_id
:
this
.
state
.
data
.
contract_id
}).
then
((
response
)
=>
{
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
this
.
props
.
navigation
.
navigate
(
'Appraisal'
)
})
})
}
}
...
@@ -239,7 +260,7 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -239,7 +260,7 @@ export default class sampleMenuAppraisal3 extends Component {
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
,
width
:
'50%'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Shock
Depan
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Shock
Depan
<
/Text
>
<
/View
>
<
/View
>
...
@@ -645,7 +666,29 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -645,7 +666,29 @@ export default class sampleMenuAppraisal3 extends Component {
{
/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 2.5 }}>
{
/* <View style={{ flexDirection: 'row', justifyContent: 'space-between', paddingVertical: 2.5 }}>
</View> */
}
</View> */
}
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'flex-end'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
}}
>
<
View
style
=
{{
width
:
'100%'
,
justifyContent
:
'space-evenly'
,
marginTop
:
20
,
alignSelf
:
'center'
,
alignContent
:
'flex-end'
,
alignItems
:
'center'
,
marginBottom
:
20
,
flexDirection
:
'row'
}}
>
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
backgroundPlaceholder
=
{
null
}
backgroundDarker
=
{
'#FFED75'
}
backgroundProgress
=
{
null
}
width
=
{
120
}
height
=
{
45
}
raiseLevel
=
{
5
}
borderRadius
=
{
10
}
progressLoadingTime
=
{
1000
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
this
.
draftData
()
next
()
},
300
);
}}
>
<
Text
style
=
{{
color
:
'black'
,
fontWeight
:
'700'
}}
>
Draft
<
/Text
>
<
/AwesomeButton
>
<
AwesomeButton
<
AwesomeButton
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundColor
=
{
Colors
.
yellowBasic
}
backgroundShadow
=
{
'#DBDBDB'
}
backgroundShadow
=
{
'#DBDBDB'
}
...
@@ -660,7 +703,7 @@ export default class sampleMenuAppraisal3 extends Component {
...
@@ -660,7 +703,7 @@ export default class sampleMenuAppraisal3 extends Component {
progress
=
{
!
this
.
state
.
progress
}
progress
=
{
!
this
.
state
.
progress
}
onPress
=
{
next
=>
{
onPress
=
{
next
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
validasi
()
this
.
validasi
()
next
()
next
()
},
300
);
},
300
);
}}
}}
...
...
app/container/home/penerimaan/penerimaan.js
View file @
692c6cd3
...
@@ -67,7 +67,7 @@ export default class Penerimaan extends Component {
...
@@ -67,7 +67,7 @@ export default class Penerimaan extends Component {
return
(
return
(
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
<
View
key
=
{
index
}
style
=
{{
paddingHorizontal
:
7
}}
>
{
!
this
.
state
.
loading
&&
(
{
!
this
.
state
.
loading
&&
(
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
item
})}
>
<
TouchableOpacity
style
=
{{
marginTop
:
10
,
borderRadius
:
20
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
item
,
type
:
'clar'
})}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
height
:
60
,
backgroundColor
:
'#e4b300'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
20
,
flexDirection
:
'row'
,
borderTopRightRadius
:
10
,
borderTopLeftRadius
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
<
Text
style
=
{{
color
:
'white'
,
fontSize
:
16
,
fontWeight
:
'700'
}}
>
{
item
.
contract_number
}
<
/Text
>
...
@@ -112,7 +112,7 @@ export default class Penerimaan extends Component {
...
@@ -112,7 +112,7 @@ export default class Penerimaan extends Component {
containerStyle
=
{{}}
containerStyle
=
{{}}
style
=
{{
backgroundColor
:
'#e4b300'
}}
style
=
{{
backgroundColor
:
'#e4b300'
}}
position
=
"bottomRight"
position
=
"bottomRight"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
""
})}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'MenuPenerimaan'
,
{
data
:
""
})}
>
>
<
Icon
name
=
"add"
/>
<
Icon
name
=
"add"
/>
<
/Fab
>
<
/Fab
>
...
...
app/container/home/penerimaan/sampleMenuPenerimaan.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
BackHandler
}
from
'react-native'
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
M
from
'moment'
import
M
from
'moment'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
FontAwesome5Icon
from
'react-native-vector-icons/FontAwesome5'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
DateTimePicker
from
'react-native-modal-datetime-picker'
;
import
DateTimePicker
from
'react-native-modal-datetime-picker'
;
import
{
Array
}
from
'../../../library/Array'
;
import
{
Array
}
from
'../../../library/Array'
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
AwesomeButton
from
"react-native-really-awesome-button"
;
import
{
Menu
,
MenuOptions
,
MenuOption
,
MenuTrigger
,
renderers
}
from
'react-native-popup-menu'
;
import
Colors
from
'../../../library/colors'
;
import
Colors
from
'../../../library/colors'
;
import
api
from
'../../../service/api'
;
export
default
class
sampleMenuPenerimaan
extends
Component
{
export
default
class
sampleMenuPenerimaan
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -25,12 +28,75 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -25,12 +28,75 @@ export default class sampleMenuPenerimaan extends Component {
tanggalPenerimaan
:
''
,
tanggalPenerimaan
:
''
,
tanggalUpdate
:
''
,
tanggalUpdate
:
''
,
isDateTimePickerVisible
:
false
,
isDateTimePickerVisible
:
false
,
isDateTimePickerVisiblePenerimaan
:
false
isDateTimePickerVisiblePenerimaan
:
false
,
arrayBranch
:
[],
branchName
:
''
,
branchCode
:
''
,
warehouseName
:
''
,
warehouseCode
:
''
,
arrayWarehouse
:
[],
contractId
:
''
}
}
}
}
componentDidMount
()
{
componentDidMount
()
{
// alert(JSON.stringify(this.props))
this
.
getBranch
()
this
.
getWarehouse
()
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
getBranch
()
{
api
.
create
().
getBranch
().
then
((
response
)
=>
{
// alert(JSON.stringify(response.data))
if
(
response
.
data
.
status
==
"success"
)
{
let
arrayBranch
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
arrayBranch
.
push
({
value
:
item
.
branch_id
,
label
:
item
.
branch_name
})
})
this
.
setState
({
arrayBranch
})
}
})
}
getWarehouse
()
{
api
.
create
().
getWarehouse
().
then
((
response
)
=>
{
if
(
response
.
data
.
status
==
"success"
)
{
let
arrayWarehouse
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
arrayWarehouse
.
push
({
value
:
item
.
warehouse_id
,
label
:
item
.
warehouse_name
})
})
this
.
setState
({
arrayWarehouse
})
}
})
}
getListClar
(){
api
.
create
().
getListClarByBranch
({
contract_id
:
Number
(
this
.
state
.
contractId
),
warehouse_id
:
Number
(
this
.
state
.
warehouseCode
),
branch_id
:
Number
(
this
.
state
.
branchCode
)
}).
then
((
response
)
=>
{
if
(
response
.
data
.
data
!=
null
)
{
this
.
setState
({
data
:
response
.
data
.
data
})
}
else
{
this
.
setState
({
data
:
[]
})
}
})
}
}
handlePenerimaanDate
(
date
)
{
handlePenerimaanDate
(
date
)
{
...
@@ -75,21 +141,30 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -75,21 +141,30 @@ export default class sampleMenuPenerimaan extends Component {
}}
}}
stepCount
=
{
Array
.
labelStep
.
length
}
stepCount
=
{
Array
.
labelStep
.
length
}
/
>
/
>
{
/* <View style={{ backgroundColor: '#fcc000', height: 30, justifyContent: 'center', paddingHorizontal: 5, borderRadius: 20, width: '40%', marginBottom: 20 }}>
<Text style={{ fontWeight: '700', textAlign: 'center' }}>Data Kontrak</Text>
</View> */
}
<
View
>
<
View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
,
marginTop
:
20
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingVertical
:
2.5
,
marginTop
:
20
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Cabang
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Cabang
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
TextInput
<
Menu
>
style
=
{
styles
.
textInput
}
<
MenuTrigger
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
branch_id
)}
disabled
=
{
this
.
props
.
navigation
.
state
.
params
.
type
!=
undefined
?
true
:
false
}
>
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
<
View
style
=
{
this
.
state
.
branchName
==
""
?
{
justifyContent
:
'space-between'
,
flexDirection
:
'row'
,
paddingHorizontal
:
10
}
:
{
alignItems
:
'center'
,
justifyContent
:
'space-between'
,
flexDirection
:
'row'
,
paddingHorizontal
:
10
}}
>
/
>
<
Text
style
=
{{
color
:
'black'
}}
>
{
this
.
state
.
data
==
""
?
this
.
state
.
branchCode
:
data
.
branch_id
}
<
/Text
>
<
FontAwesome5Icon
size
=
{
20
}
color
=
{
'black'
}
name
=
{
'angle-down'
}
style
=
{{}}
/
>
<
/View
>
<
/MenuTrigger
>
<
MenuOptions
optionsContainerStyle
=
{{
borderRadius
:
5
,
paddingVertical
:
10
,
paddingHorizontal
:
10
,
backgroundColor
:
'white'
,
width
:
null
,
height
:
null
,
marginTop
:
20
}}
>
{
this
.
state
.
arrayBranch
.
map
((
item
,
index
)
=>
{
return
(
this
.
state
.
branchName
!=
item
.
label
&&
<
MenuOption
key
=
{
index
}
style
=
{{
marginTop
:
index
==
0
?
0
:
5
,
borderBottomColor
:
'#dbdbdb'
,
borderBottomWidth
:
.
5
}}
onSelect
=
{()
=>
{
this
.
setState
({
selectedBranch
:
item
,
branchName
:
item
.
label
,
branchCode
:
item
.
value
},
()
=>
this
.
getListClar
())
}}
>
<
Text
style
=
{{
textAlign
:
'center'
}}
>
{
item
.
label
}
<
/Text
>
<
/MenuOption
>
)
})}
<
/MenuOptions
>
<
/Menu
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -97,11 +172,11 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -97,11 +172,11 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Cabang
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Cabang
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
TextInput
<
TextInput
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
warehouse_cod
e
)}
value
=
{
this
.
state
.
data
==
""
?
this
.
state
.
branchName
:
String
(
data
.
branch_nam
e
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
editable
=
{
false
}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -113,8 +188,9 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -113,8 +188,9 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
TextInput
<
TextInput
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
contract_number
)}
value
=
{
this
.
state
.
data
==
""
?
this
.
state
.
contractId
:
String
(
data
.
contract_number
)}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
onChangeText
=
{
e
=>
this
.
setState
({
contractId
:
e
},
()
=>
this
.
getListClar
())}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -123,7 +199,7 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -123,7 +199,7 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
No
Subkontrak
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
No
Subkontrak
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
TextInput
<
TextInput
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
sub_contract_number
)}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
sub_contract_number
)}
...
@@ -136,7 +212,7 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -136,7 +212,7 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Nasabah
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Nasabah
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInputDisable
}
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
TextInput
<
TextInput
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
nasabah_name
)}
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
nasabah_name
)}
...
@@ -149,13 +225,25 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -149,13 +225,25 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Warehouse
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Kode
Warehouse
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInputEnable
}
>
<
View
style
=
{
this
.
state
.
data
==
""
?
styles
.
viewInputEnable
:
styles
.
viewInputDisable
}
>
<
TextInput
<
Menu
>
onChangeText
=
{(
e
)
=>
this
.
setState
({
warehouse_name
:
e
})}
<
MenuTrigger
style
=
{
styles
.
textInput
}
disabled
=
{
this
.
props
.
navigation
.
state
.
params
.
type
!=
undefined
?
true
:
false
}
>
value
=
{
this
.
state
.
data
==
""
?
null
:
String
(
data
.
warehouse_name
)}
<
View
style
=
{
this
.
state
.
warehouseName
==
""
?
{
justifyContent
:
'space-between'
,
flexDirection
:
'row'
,
paddingHorizontal
:
10
}
:
{
alignItems
:
'center'
,
justifyContent
:
'space-between'
,
flexDirection
:
'row'
,
paddingHorizontal
:
10
}}
>
editable
=
{
this
.
state
.
data
==
""
?
true
:
false
}
<
Text
style
=
{{
color
:
'black'
}}
>
{
this
.
state
.
data
==
""
?
this
.
state
.
warehouseCode
:
data
.
warehouse_id
}
<
/Text
>
/
>
<
FontAwesome5Icon
size
=
{
20
}
color
=
{
'black'
}
name
=
{
'angle-down'
}
style
=
{{}}
/
>
<
/View
>
<
/MenuTrigger
>
<
MenuOptions
optionsContainerStyle
=
{{
borderRadius
:
5
,
paddingVertical
:
10
,
paddingHorizontal
:
10
,
backgroundColor
:
'white'
,
width
:
null
,
height
:
null
,
marginTop
:
20
}}
>
{
this
.
state
.
arrayWarehouse
.
map
((
item
,
index
)
=>
{
return
(
this
.
state
.
warehouseName
!=
item
.
label
&&
<
MenuOption
key
=
{
index
}
style
=
{{
marginTop
:
index
==
0
?
0
:
5
,
borderBottomColor
:
'#dbdbdb'
,
borderBottomWidth
:
.
5
}}
onSelect
=
{()
=>
{
this
.
setState
({
selectedWarehouse
:
item
,
warehouseName
:
item
.
label
,
warehouseCode
:
item
.
value
},
()
=>
this
.
getListClar
())
}}
>
<
Text
style
=
{{
textAlign
:
'center'
}}
>
{
item
.
label
}
<
/Text
>
<
/MenuOption
>
)
})}
<
/MenuOptions
>
<
/Menu
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -163,12 +251,12 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -163,12 +251,12 @@ export default class sampleMenuPenerimaan extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Warehouse
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Nama
Warehouse
<
/Text
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
viewInput
En
able
}
>
<
View
style
=
{
styles
.
viewInput
Dis
able
}
>
<
TextInput
<
TextInput
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaWerehouse
:
e
})}
onChangeText
=
{(
e
)
=>
this
.
setState
({
namaWerehouse
:
e
})}
style
=
{
styles
.
textInput
}
style
=
{
styles
.
textInput
}
value
=
{
data
.
warehouse_code
}
value
=
{
this
.
state
.
data
==
""
?
this
.
state
.
warehouseName
:
String
(
data
.
warehouse_name
)
}
editable
editable
=
{
false
}
/
>
/
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -279,8 +367,8 @@ export default class sampleMenuPenerimaan extends Component {
...
@@ -279,8 +367,8 @@ export default class sampleMenuPenerimaan extends Component {
}
}
const
styles
=
StyleSheet
.
create
({
const
styles
=
StyleSheet
.
create
({
viewInputEnable
:
{
width
:
'
63
%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputEnable
:
{
width
:
'
55
%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'
63
%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'
55
%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
5
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
...
...
app/container/home/penerimaan/sampleMenuPenerimaan2.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
BackHandler
}
from
'react-native'
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
import
StepIndicator
from
'react-native-step-indicator'
;
import
StepIndicator
from
'react-native-step-indicator'
;
...
@@ -25,7 +25,16 @@ export default class sampleMenuPenerimaan2 extends Component {
...
@@ -25,7 +25,16 @@ export default class sampleMenuPenerimaan2 extends Component {
}
}
componentDidMount
(){
componentDidMount
(){
// alert(JSON.stringify(this.state.data))
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
}
render
()
{
render
()
{
...
...
app/container/home/penerimaan/sampleMenuPenerimaan3.js
View file @
692c6cd3
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
}
from
'react-native'
import
{
Text
,
View
,
TextInput
,
ScrollView
,
StyleSheet
,
TouchableOpacity
,
PermissionsAndroid
,
Image
,
Modal
,
BackHandler
}
from
'react-native'
import
ImagePicker
from
'react-native-image-picker'
;
import
ImagePicker
from
'react-native-image-picker'
;
import
{
Container
}
from
'native-base'
import
{
Container
}
from
'native-base'
import
{
RadioButton
}
from
'react-native-paper'
;
import
{
RadioButton
}
from
'react-native-paper'
;
...
@@ -45,8 +45,17 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -45,8 +45,17 @@ export default class sampleMenuPenerimaan3 extends Component {
photo6
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
5
]
photo6
:
this
.
props
.
navigation
.
state
.
params
.
data
.
photo_unit
[
5
]
})
})
}
}
// alert(JSON.stringify(this.state.data))
// alert(JSON.stringify(this.state.data)) componentDidMount(){
BackHandler
.
addEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
componentWillUnmount
()
{
BackHandler
.
removeEventListener
(
'hardwareBackPress'
,
this
.
handleBackButtonClick
);
}
handleBackButtonClick
=
()
=>
{
this
.
props
.
navigation
.
goBack
()
return
true
;
}
}
async
requestCameraPermission
(
type
)
{
async
requestCameraPermission
(
type
)
{
...
@@ -119,8 +128,11 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -119,8 +128,11 @@ export default class sampleMenuPenerimaan3 extends Component {
uri
:
res
.
uri
uri
:
res
.
uri
})
})
this
.
setState
({
this
.
setState
({
imageMesin
:
res
.
uri
,
mesinArray
data
:
{
},
()
=>
alert
(
this
.
state
.
mesinArray
))
...
this
.
state
.
data
,
engine_number_photo
:
res
.
uri
}
})
}
}
})
})
...
@@ -169,12 +181,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -169,12 +181,7 @@ export default class sampleMenuPenerimaan3 extends Component {
>
>
<
View
style
=
{{
height
:
'85%'
}}
>
<
View
style
=
{{
height
:
'85%'
}}
>
<
ImageViewer
<
ImageViewer
imageUrls
=
{
this
.
state
.
mesinArray
}
imageUrls
=
{
this
.
state
.
mesinArray
}
// enableSwipeDown={true}
// index={this.state.Index}
// onSwipeDown={() => this.props.navigation.goBack()}
// onChange={(item) => this.next(item)}
// renderIndicator={() => (<View />)}
/
>
/
>
<
/View
>
<
/View
>
<
/Modal
>
<
/Modal
>
...
@@ -234,7 +241,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -234,7 +241,7 @@ export default class sampleMenuPenerimaan3 extends Component {
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
30
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
Text
style
=
{{
fontSize
:
13
}}
>
Foto
No
Mesin
<
/Text
>
<
/View
>
<
/View
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
state
.
imageMesin
!=
''
?
this
.
setState
({
viewerMesin
:
true
})
:
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
TouchableOpacity
style
=
{
styles
.
viewRangka
}
onPress
=
{()
=>
{
this
.
requestCameraPermission
(
'mesin'
)
}}
>
<
View
<
View
style
=
{{
style
=
{{
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
width
:
'100%'
,
height
:
'100%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderStyle
:
'dotted'
,
borderWidth
:
2
,
borderRadius
:
5
...
@@ -370,8 +377,7 @@ export default class sampleMenuPenerimaan3 extends Component {
...
@@ -370,8 +377,7 @@ export default class sampleMenuPenerimaan3 extends Component {
<
/View
>
<
/View
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Belakang
Kiri
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
}}
>
Belakang
Kiri
<
/Text
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/ScrollView
>
<
/ScrollView
>
...
@@ -456,6 +462,6 @@ const styles = StyleSheet.create({
...
@@ -456,6 +462,6 @@ const styles = StyleSheet.create({
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputEnable
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewInputDisable
:
{
width
:
'63%'
,
backgroundColor
:
'#E6E6E6'
,
justifyContent
:
'center'
,
height
:
30
,
borderRadius
:
5
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewRangka
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
10
,
height
:
100
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
:
1
0
,
height
:
150
,
justifyContent
:
'space-between'
},
viewFotoUnit
:
{
width
:
'63%'
,
borderColor
:
'rgba(237, 57, 99, .5)'
,
borderWidth
:
.
8
,
borderRadius
:
5
,
padding
Horizontal
:
10
,
paddingVertical
:
2
0
,
height
:
150
,
justifyContent
:
'space-between'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
textInput
:
{
paddingHorizontal
:
10
,
paddingVertical
:
0
,
color
:
'#999999'
},
})
})
app/service/api.js
View file @
692c6cd3
...
@@ -57,6 +57,8 @@ const create = () => {
...
@@ -57,6 +57,8 @@ const create = () => {
const
postRejectApproval
=
(
value
)
=>
POST
(
'demo/rejecting_approval'
,
value
)
const
postRejectApproval
=
(
value
)
=>
POST
(
'demo/rejecting_approval'
,
value
)
const
postApprovalDetail
=
(
value
)
=>
POST
(
'demo/approval_detail'
,
value
)
const
postApprovalDetail
=
(
value
)
=>
POST
(
'demo/approval_detail'
,
value
)
const
getHistory
=
()
=>
GET
(
'demo/get_history'
)
const
getHistory
=
()
=>
GET
(
'demo/get_history'
)
const
getBranch
=
()
=>
GET
(
'demo/get_branch'
)
const
getListClarByBranch
=
(
value
)
=>
POST
(
'demo/get_clar_by_branch_code'
,
value
)
return
{
return
{
...
@@ -74,7 +76,9 @@ const create = () => {
...
@@ -74,7 +76,9 @@ const create = () => {
postPenolakan
,
postPenolakan
,
postDraftAppraisal
,
postDraftAppraisal
,
postRejectApproval
,
postRejectApproval
,
postApprovalDetail
postApprovalDetail
,
getBranch
,
getListClarByBranch
}
}
}
}
...
...
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