Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
27e1dbfb
Commit
27e1dbfb
authored
Oct 13, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:贷款筛选输入限制
parent
ca006bb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
18 deletions
+67
-18
index.vue
src/components/PopUpContent/LoanFilter/index.vue
+37
-14
index.vue
src/views/LoanList/index.vue
+30
-4
No files found.
src/components/PopUpContent/LoanFilter/index.vue
View file @
27e1dbfb
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"word24"
>
<div
class=
"word24"
>
<input
<input
v-model
.
number=
"min_"
v-model
.
number=
"min_"
@
blur=
"check
Min1
"
@
blur=
"check
InterstValid
"
type=
"number"
type=
"number"
placeholder=
"最低利率"
placeholder=
"最低利率"
class=
"bg-transparent w-full text-center"
class=
"bg-transparent w-full text-center"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<input
<input
type=
"number"
type=
"number"
v-model
.
number=
"max_"
v-model
.
number=
"max_"
@
blur=
"check
Max1
"
@
blur=
"check
InterstValid
"
placeholder=
"最高利率"
placeholder=
"最高利率"
class=
"bg-transparent w-full text-center"
class=
"bg-transparent w-full text-center"
/>
/>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<div
class=
"word24"
>
<div
class=
"word24"
>
<input
<input
v-model
.
number=
"min_2"
v-model
.
number=
"min_2"
@
blur=
"check
Min2
"
@
blur=
"check
AmountValid
"
type=
"number"
type=
"number"
placeholder=
"0"
placeholder=
"0"
class=
"bg-transparent w-full text-center"
class=
"bg-transparent w-full text-center"
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<input
<input
type=
"number"
type=
"number"
v-model
.
number=
"max_2"
v-model
.
number=
"max_2"
@
blur=
"check
Max2
"
@
blur=
"check
AmountValid
"
placeholder=
"9999"
placeholder=
"9999"
class=
"bg-transparent w-full text-center"
class=
"bg-transparent w-full text-center"
/>
/>
...
@@ -89,9 +89,11 @@
...
@@ -89,9 +89,11 @@
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
"vue"
;
import
{
defineComponent
}
from
"vue"
;
import
SelectList
from
"@/components/SelectList/index.vue"
;
import
SelectList
from
"@/components/SelectList/index.vue"
;
import
{
Toast
}
from
"vant"
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
SelectList
,
SelectList
,
Toast
,
},
},
props
:
{
props
:
{
bankList
:
Array
,
bankList
:
Array
,
...
@@ -123,17 +125,38 @@ export default defineComponent({
...
@@ -123,17 +125,38 @@ export default defineComponent({
type
:
Function
,
type
:
Function
,
required
:
true
,
required
:
true
,
},
},
checkInterstValid
:
{
type
:
Function
,
required
:
true
,
},
checkAmountValid
:
{
type
:
Function
,
required
:
true
,
},
},
},
methods
:{
methods
:
{
checkMin1
(){
// checkInterstValid(): boolean {
if
(
this
.
min_
){
// let isValid = false;
console
.
log
(
'blur'
);
// if (this.max && this.min) {
this
.
setMin
(
this
.
min
);
// isValid = false;
console
.
log
(
'blur'
,
this
.
min
,
this
.
min_
);
// if (this.max
<=
this
.
min
)
Toast
.
fail
(
"最高利率必须大于最低利率"
);
// } else {
// this.min_ = +Number.parseFloat(this.min_ as string).toFixed(2)
// isValid = true;
}
// }
}
// return isValid;
// },
// checkAmountValid(): boolean {
// let isValid = false;
// if (this.max2 && this.min2) {
// if (this.max2
<=
this
.
min2
)
{
// isValid = false;
// Toast.fail("最高额度必须大于最低额度");
// } else {
// isValid = true;
// }
// }
// return isValid;
// },
},
},
computed
:
{
computed
:
{
min_
:
{
min_
:
{
...
...
src/views/LoanList/index.vue
View file @
27e1dbfb
...
@@ -50,13 +50,14 @@
...
@@ -50,13 +50,14 @@
:setSelectedTypes=
"(v) => (selectedTypes = v)"
:setSelectedTypes=
"(v) => (selectedTypes = v)"
:min=
"min"
:min=
"min"
:max=
"max"
:max=
"max"
:setMin=
"(v) => (min = +Number.parseFloat(v).toFixed(2))"
:setMin=
"(v) => (min = +Number.parseFloat(v).toFixed(2))"
:setMax=
"(v) => (max = +Number.parseFloat(v).toFixed(2))"
:setMax=
"(v) => (max = +Number.parseFloat(v).toFixed(2))"
:min2=
"min2"
:min2=
"min2"
:max2=
"max2"
:max2=
"max2"
:setMin2=
"(v) => (min2 = v)"
:setMin2=
"(v) => (min2 = v)"
:setMax2=
"(v) => (max2 = v)"
:setMax2=
"(v) => (max2 = v)"
:checkInterstValid=
"checkInterstValid"
:checkAmountValid=
"checkAmountValid"
/>
/>
</PopUp>
</PopUp>
</div>
</div>
...
@@ -85,7 +86,7 @@ import {
...
@@ -85,7 +86,7 @@ import {
}
from
"@/service/LoanProductService/index"
;
}
from
"@/service/LoanProductService/index"
;
import
{
simpleItemInfo
}
from
"@/views/withMenu/Loan/types"
;
import
{
simpleItemInfo
}
from
"@/views/withMenu/Loan/types"
;
import
{
iLoanProdcutItem
}
from
"@/service/LoanProductService/type"
;
import
{
iLoanProdcutItem
}
from
"@/service/LoanProductService/type"
;
import
{
Skeleton
}
from
"vant"
;
import
{
Skeleton
,
Toast
}
from
"vant"
;
import
{
import
{
loanSearchState
,
loanSearchState
,
setSearchResult
,
setSearchResult
,
...
@@ -100,6 +101,7 @@ export default defineComponent({
...
@@ -100,6 +101,7 @@ export default defineComponent({
LoanCard
,
LoanCard
,
LoanFilter
,
LoanFilter
,
Skeleton
,
Skeleton
,
Toast
},
},
setup
()
{
setup
()
{
const
mode
=
ref
(
+
useRoute
().
params
.
mode
);
const
mode
=
ref
(
+
useRoute
().
params
.
mode
);
...
@@ -236,6 +238,28 @@ export default defineComponent({
...
@@ -236,6 +238,28 @@ export default defineComponent({
setShow
(
v
:
boolean
)
{
setShow
(
v
:
boolean
)
{
this
.
show
=
v
;
this
.
show
=
v
;
},
},
checkInterstValid
():
boolean
{
let
isValid
=
false
;
if
(
this
.
max
&&
this
.
min
)
{
isValid
=
false
;
if
(
this
.
max
<=
this
.
min
)
Toast
.
fail
(
"最高利率必须大于最低利率"
);
}
else
{
isValid
=
true
;
}
return
isValid
;
},
checkAmountValid
():
boolean
{
let
isValid
=
false
;
if
(
this
.
max2
&&
this
.
min2
)
{
if
(
this
.
max2
<=
this
.
min2
)
{
isValid
=
false
;
Toast
.
fail
(
"最高额度必须大于最低额度"
);
}
else
{
isValid
=
true
;
}
}
return
isValid
;
},
showFilter
()
{
showFilter
()
{
this
.
show
=
true
;
this
.
show
=
true
;
this
.
selectedBanks
=
this
.
reqParams
.
selectedBanks
;
this
.
selectedBanks
=
this
.
reqParams
.
selectedBanks
;
...
@@ -281,8 +305,10 @@ export default defineComponent({
...
@@ -281,8 +305,10 @@ export default defineComponent({
min2
:
this
.
min2
,
min2
:
this
.
min2
,
max2
:
this
.
max2
,
max2
:
this
.
max2
,
};
};
this
.
queryList
();
if
(
this
.
checkAmountValid
()
&&
this
.
checkInterstValid
()){
this
.
show
=
false
;
this
.
queryList
();
this
.
show
=
false
;
}
},
},
queryList
()
{
queryList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
...
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