Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
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
xugong
hls-xcmg-vue-app
Commits
61a3c505
Commit
61a3c505
authored
Nov 21, 2019
by
linxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'liuxin' into develop
parents
b6ca3923
e6068b85
Pipeline
#3640
canceled with stages
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
56 deletions
+108
-56
currencyInput.vue
src/components/currencyInput.vue
+49
-49
contract-record.vue
src/pages/pay/firstPay/contract-record.vue
+35
-5
contract-record.vue
src/pages/pay/payment/contract-record.vue
+24
-2
No files found.
src/components/currencyInput.vue
View file @
61a3c505
...
...
@@ -9,62 +9,62 @@
</
template
>
<
script
>
export
default
{
name
:
'CurrencyInput'
,
props
:
{
value
:
{
type
:
Number
,
default
:
0
,
},
disable
:
{
type
:
Boolean
,
default
:
false
,
},
export
default
{
name
:
'CurrencyInput'
,
props
:
{
value
:
{
type
:
Number
,
default
:
0
,
},
disable
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
focused
:
false
,
data
()
{
return
{
focused
:
false
,
}
},
filter
:
{
uncurrency
(
val
)
{
if
(
!
val
)
return
null
return
(
Number
((
val
).
replace
(
/,/gi
,
''
)))
===
0
?
null
:
Number
((
val
).
replace
(
/,/gi
,
''
))
},
},
computed
:
{
formatValue
()
{
let
currency
=
this
.
$options
.
filters
[
'currency'
]
if
(
!
this
.
focused
)
{
return
currency
(
this
.
value
)
}
else
{
return
this
.
value
}
},
filter
:
{
uncurrency
(
val
)
{
if
(
!
val
)
return
null
return
(
Number
((
val
).
replace
(
/,/gi
,
''
)))
===
0
?
null
:
Number
((
val
).
replace
(
/,/gi
,
''
))
},
},
methods
:
{
onInput
:
function
(
value
)
{
if
(
this
.
disable
)
return
let
uncurrency
=
this
.
$options
.
filter
[
'uncurrency'
]
this
.
currencyValue
=
uncurrency
(
value
)
this
.
$emit
(
'input'
,
this
.
currencyValue
)
},
computed
:
{
formatValue
()
{
let
currency
=
this
.
$options
.
filters
[
'currency'
]
if
(
!
this
.
focused
)
{
return
currency
(
this
.
value
)
}
else
{
return
this
.
value
}
},
onFocus
(
event
)
{
if
(
this
.
disable
)
return
this
.
focused
=
true
setTimeout
(
function
()
{
event
.
target
.
type
=
'number'
event
.
target
.
focus
()
},
0
)
},
methods
:
{
onInput
:
function
(
value
)
{
if
(
this
.
disable
)
return
let
uncurrency
=
this
.
$options
.
filter
[
'uncurrency'
]
this
.
currencyValue
=
uncurrency
(
value
)
this
.
$emit
(
'input'
,
this
.
currencyValue
)
},
onFocus
(
event
)
{
if
(
this
.
disable
)
return
this
.
focused
=
true
setTimeout
(
function
()
{
event
.
target
.
type
=
'number'
event
.
target
.
focus
()
},
0
)
},
onBlur
(
event
)
{
if
(
this
.
disable
)
return
event
.
target
.
type
=
'text'
this
.
focused
=
false
},
onBlur
(
event
)
{
if
(
this
.
disable
)
return
event
.
target
.
type
=
'text'
this
.
focused
=
false
},
}
},
}
</
script
>
<
style
scoped
lang=
"less"
>
...
...
src/pages/pay/firstPay/contract-record.vue
View file @
61a3c505
...
...
@@ -36,8 +36,7 @@
<div
class=
"item-right"
>
<p>
{{
parseFloat
(
e
.
due_amount
).
toFixed
(
2
)
|
currency
}}
</p>
<p>
{{
e
.
received_amount
|
currency
}}
</p>
<input
v-model=
"e.amount"
type=
"number"
placeholder=
"请输入还款金额"
>
</div>
<CurrencyInput
v-model=
"e.amount"
placeholder=
"请输入还款金额"
/></div>
</div>
</div>
</section>
...
...
@@ -60,8 +59,11 @@
</
template
>
<
script
>
import
CurrencyInput
from
'../../../components/currencyInput'
export
default
{
components
:
{},
components
:
{
CurrencyInput
,
},
data
()
{
return
{
money
:
0
,
...
...
@@ -120,7 +122,7 @@ export default {
vm
.
prj_lists
=
res
.
prj_lists
vm
.
prj_lists
.
forEach
(
i
=>
{
i
.
cf_lists
.
forEach
(
j
=>
{
let
num
=
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
)
let
num
=
(
parseFloat
(
j
.
due_amount
)
-
parseFloat
(
j
.
received_amount
)).
toFixed
(
2
)
vm
.
$set
(
j
,
'amount'
,
num
)
})
})
...
...
@@ -213,7 +215,8 @@ export default {
bottom: 150px;
width: 100%;
//margin-top:-60px;
height: 370px;
// height: 370px;
height:7.4rem;
overflow: scroll;
//background-color: #FFF;
.contract-item {
...
...
@@ -382,4 +385,31 @@ export default {
color: #fff;
}
}
.platform-ios {
#contract-record {
.pay-content {
height: 370px;
}
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#contract-record {
.pay-content {
height: 9.4rem;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#contract-record {
.pay-content {
height: 9.4rem;
}
}
}
}
</
style
>
src/pages/pay/payment/contract-record.vue
View file @
61a3c505
...
...
@@ -71,7 +71,7 @@
<div>
<span>
本次还款
</span>
<section>
<
input
v-model=
"detail.amount"
type=
"number"
placeholder=
"请输入还款金额"
>
<
CurrencyInput
v-model=
"detail.amount"
placeholder=
"请输入还款金额"
/
>
</section>
</div>
</div>
...
...
@@ -102,9 +102,12 @@
</h-view>
</
template
>
<
script
>
import
CurrencyInput
from
'../../../components/currencyInput'
export
default
{
name
:
'PaymentContractRecord'
,
components
:
{},
components
:
{
CurrencyInput
,
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
getRentInfo
()
...
...
@@ -478,4 +481,23 @@ export default {
color: white;
}
}
@media (device-width: 375px) and (device-height: 812px) and (-webkit-min-device-pixel-ratio: 3) {
.platform-ios {
#payment-contract-record {
.pay-content {
height: 63%;
}
}
}
}
// iPhoneXR适配
@media (device-width: 414px) and (device-height: 896px) {
.platform-ios {
#payment-contract-record {
.pay-content {
height: 63%;
}
}
}
}
</
style
>
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