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
1325f428
Commit
1325f428
authored
Dec 27, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Plain Diff
'12-12uat'
parents
771d4be2
f0968541
Pipeline
#4373
canceled with stages
Changes
4
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1589 additions
and
355 deletions
+1589
-355
currencyInput.vue
src/components/currencyInput.vue
+82
-0
creat-rent-info.vue
src/pages/contractCreate/creat-rent-info.vue
+1152
-0
contract-repayment.vue
src/pages/contractRepayment/contract-repayment.vue
+354
-354
my-info.vue
src/pages/myInfo/my-info.vue
+1
-1
No files found.
src/components/currencyInput.vue
0 → 100644
View file @
1325f428
/**
* @Author Sean
* @Date 2019/11/21
*/
<
template
>
<input
:value=
"formatValue"
:readonly=
"disable"
type=
"text"
@
input=
"onInput($event.target.value)"
@
focus=
"onFocus"
@
blur=
"onBlur"
>
</
template
>
<
script
>
export
default
{
name
:
'CurrencyInput'
,
props
:
{
value
:
{
default
:
0
,
},
disable
:
{
type
:
Boolean
,
default
:
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
}
},
},
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
let
value
=
event
.
target
.
value
event
.
target
.
value
=
''
event
.
target
.
value
=
value
/* if (document.selection) {
var sel = value.createTextRange()
sel.moveStart('character', value.length)
sel.collapse()
sel.select()
} else if (typeof value.selectionStart === 'number' && typeof value.selectionEnd === 'number') {
value.selectionStart = value.selectionEnd = value.length
}*/
setTimeout
(
function
()
{
event
.
target
.
type
=
'number'
event
.
target
.
focus
()
},
0
)
},
onBlur
(
event
)
{
if
(
this
.
disable
)
return
event
.
target
.
type
=
'text'
this
.
focused
=
false
},
},
}
</
script
>
<
style
scoped
lang=
"less"
>
</
style
>
src/pages/contractCreate/creat-rent-info.vue
0 → 100644
View file @
1325f428
This diff is collapsed.
Click to expand it.
src/pages/contractRepayment/contract-repayment.vue
View file @
1325f428
src/pages/myInfo/my-info.vue
View file @
1325f428
...
@@ -474,7 +474,7 @@ export default {
...
@@ -474,7 +474,7 @@ export default {
window
.
localStorage
.
setItem
(
'width'
,
width
)
window
.
localStorage
.
setItem
(
'width'
,
width
)
window
.
localStorage
.
setItem
(
'height'
,
height
)
window
.
localStorage
.
setItem
(
'height'
,
height
)
vm
.
$router
.
push
(
'/login'
)
vm
.
$router
.
push
(
'/login'
)
location
.
reload
()
//
location.reload()
}
}
},
},
})
})
...
...
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