Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Giang Tran
InvestCustomer
Commits
7cfd9ca1
Commit
7cfd9ca1
authored
May 27, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit escrow calculator
parent
ee6cd993
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
20 deletions
+59
-20
EscrowCalculatorView.js
src/Screens/Tool/EscrowCalculator/EscrowCalculatorView.js
+17
-11
ItemEscrowCalculator.js
src/Screens/Tool/EscrowCalculator/ItemEscrowCalculator.js
+19
-3
InputMoney.js
src/components/Input/InputMoney.js
+19
-5
en.js
src/helper/i18/locales/en.js
+1
-0
vn.js
src/helper/i18/locales/vn.js
+3
-1
No files found.
src/Screens/Tool/EscrowCalculator/EscrowCalculatorView.js
View file @
7cfd9ca1
...
...
@@ -35,12 +35,15 @@ const EscrowCalculatorView = (props) => {
dataProduct
=
{
props
.
dataProduct
}
setProduct
=
{(
product
)
=>
{
item
.
product
=
product
;
item
.
firstEscrow
=
parseFloat
(
item
.
lotNumber
)
*
product
.
escrow
;
item
.
firstEscrow
=
parseFloat
(
item
.
lotNumber
)
*
product
.
escrow
;
props
.
setItemInput
(
item
,
index
);
}}
setLotNumber
=
{(
lotNumber
)
=>
{
item
.
lotNumber
=
lotNumber
.
split
(
'.'
).
join
(
''
);
item
.
firstEscrow
=
item
.
product
?
parseFloat
(
item
.
lotNumber
)
*
item
.
product
.
escrow
:
0
;
item
.
firstEscrow
=
item
.
product
?
parseFloat
(
item
.
lotNumber
)
*
item
.
product
.
escrow
:
0
;
props
.
setItemInput
(
item
,
index
);
}}
/
>
...
...
@@ -57,23 +60,26 @@ const EscrowCalculatorView = (props) => {
<
/View
>
<
View
style
=
{{
paddingHorizontal
:
WIDTHXD
(
60
)}}
>
<
TextMoney
editable
=
{
false
}
title
=
{
I18n
.
t
(
'FirstEscrowTotal'
)}
value
=
{
props
.
firstEscrowTotal
}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
160
),
fontSize
:
getFontXD
(
39
),
}}
inputStyle
=
{{
backgroundColor
:
R
.
colors
.
gray7
}}
/
>
<
TextMoney
onChangeText
=
{(
val
)
=>
{
props
.
setFirstEscrow
(
val
.
split
(
'.'
).
join
(
''
));
}}
title
=
{
I18n
.
t
(
'
FirstEscrow
'
)}
title
=
{
I18n
.
t
(
'
AvailableMargin
'
)}
value
=
{
props
.
firstEscrow
}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
180
),
fontSize
:
getFontXD
(
39
),
}}
/
>
<
TextMoney
editable
=
{
false
}
title
=
{
I18n
.
t
(
'FirstEscrowTotal'
)}
value
=
{
props
.
firstEscrowTotal
}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
20
),
fontSize
:
getFontXD
(
39
)}}
inputStyle
=
{{
backgroundColor
:
R
.
colors
.
gray7
}}
/
>
<
Text
style
=
{
styles
.
textMessage
}
>
{
props
.
message
}
<
/Text
>
<
/View
>
...
...
src/Screens/Tool/EscrowCalculator/ItemEscrowCalculator.js
View file @
7cfd9ca1
import
React
from
'react'
;
import
{
StyleSheet
,
Text
,
TouchableOpacity
,
View
}
from
'react-native'
;
import
{
StyleSheet
,
Text
,
TouchableOpacity
,
View
,
Dimensions
,
}
from
'react-native'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
PickerItem
from
'../../../components/Picker/PickerItem'
;
import
{
...
...
@@ -12,27 +18,37 @@ import R from '../../../assets/R';
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
Icon
from
'react-native-vector-icons/Entypo'
;
const
{
width
}
=
Dimensions
.
get
(
'window'
);
const
ItemEscrowCalculator
=
(
props
)
=>
{
return
(
<
View
style
=
{
styles
.
viewInput
}
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
,
marginVertical
:
5
}}
>
<
Text
style
=
{
styles
.
textTitle
}
>
{
I18n
.
t
(
'Product'
)}
<
/Text
>
<
PickerItem
data
=
{
props
.
dataProduct
}
onValueChange
=
{(
value
,
item
)
=>
{
props
.
setProduct
(
item
);
}}
width
=
{
width
/
2
-
30
}
iconSize
=
{
WIDTHXD
(
40
)}
iconColor
=
{
R
.
colors
.
black
}
/
>
<
/View
>
<
View
style
=
{{
width
:
20
}}
/
>
<
View
style
=
{{
flex
:
1
}}
>
<
TextMoney
onChangeText
=
{(
val
)
=>
{
props
.
setLotNumber
(
val
);
}}
title
=
{
I18n
.
t
(
'LotTransactionNumber'
)}
value
=
{
toPriceVnd
(
props
.
item
.
lotNumber
)}
titleStyle
=
{{
marginTop
:
HEIGHTXD
(
20
),
fontSize
:
getFontXD
(
39
)}}
titleStyle
=
{{
fontSize
:
getFontXD
(
39
)}}
/
>
<
/View
>
<
/View
>
<
TextMoney
onChangeText
=
{(
val
)
=>
{}}
title
=
{
I18n
.
t
(
'FirstEscrow'
)}
...
...
src/components/Input/InputMoney.js
View file @
7cfd9ca1
...
...
@@ -5,16 +5,27 @@ import R from '../../assets/R';
import
{
toPriceVnd
}
from
'../../Config/Functions'
;
const
TextMoney
=
(
props
)
=>
{
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
,
titleStyle
,
inputStyle
}
=
props
;
const
{
title
,
onChangeText
,
maxLength
,
value
,
editable
,
titleStyle
,
inputStyle
,
}
=
props
;
return
(
<
View
style
=
{{
marginVertical
:
5
}}
>
<
Text
style
=
{[{
style
=
{[
{
fontSize
:
getFontXD
(
42
),
color
:
R
.
colors
.
color777
,
marginBottom
:
5
,
},
titleStyle
&&
titleStyle
]}
>
},
titleStyle
&&
titleStyle
,
]}
>
{
title
?
title
:
''
}
<
/Text
>
<
TextInput
...
...
@@ -25,7 +36,8 @@ const TextMoney = (props) => {
value
=
{
toPriceVnd
(
value
)}
keyboardType
=
{
'number-pad'
}
onChangeText
=
{(
val
)
=>
onChangeText
(
val
.
split
(
','
).
join
(
''
))}
style
=
{[{
style
=
{[
{
height
:
HEIGHTXD
(
109
),
color
:
'black'
,
borderRadius
:
7
,
...
...
@@ -43,7 +55,9 @@ const TextMoney = (props) => {
shadowOpacity
:
0.25
,
shadowRadius
:
1.84
,
elevation
:
1
,
},
inputStyle
&&
inputStyle
]}
},
inputStyle
&&
inputStyle
,
]}
/
>
<
/View
>
);
...
...
src/helper/i18/locales/en.js
View file @
7cfd9ca1
...
...
@@ -285,4 +285,5 @@ export default {
Systemmaintenance
:
'The system is maintenance'
,
WaitUpdateCQG
:
'Waiting Update CQG'
,
code
:
'Code'
,
AvailableMargin
:
'Available margin'
,
};
src/helper/i18/locales/vn.js
View file @
7cfd9ca1
...
...
@@ -267,7 +267,7 @@ export default {
BUY_IN
:
'Mua vào'
,
SELL_OUT
:
'Bán ra'
,
EscrowCalculator
:
'Tính ký quỹ'
,
FirstEscrowTotal
:
'
Ký quỹ khả dụng
'
,
FirstEscrowTotal
:
'
Tổng ký quỹ ban đầu
'
,
YouCanNotTransaction
:
'Bạn không thể giao dịch các hợp đồng kể trên với mức ký quỹ khả dụng hiện tại'
,
YouCanTransaction
:
...
...
@@ -283,4 +283,6 @@ export default {
FirstPriceRange
:
'Giới hạn giá ban đầu'
,
ExpandPriceRange
:
'Giới hạn giá mở rộng'
,
code
:
'Mã'
,
AvailableMargin
:
'Ký quỹ khả dụng'
,
Calculator
:
'Tính'
,
};
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