Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-admin
Commits
61eb8650
Commit
61eb8650
authored
Jun 21, 2021
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员价格配置增加大于0的验证
parent
e2a2c92d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
index.vue
src/views/biz/priceConfig/index.vue
+20
-2
No files found.
src/views/biz/priceConfig/index.vue
View file @
61eb8650
...
...
@@ -8,7 +8,7 @@
ref="formv"
>
<a-form-model-item
label=
"会员价格"
ref=
"vipPriceVal"
prop=
"vipPrice"
>
<a-input
v-model=
"formModel.vipPrice"
prefix=
"¥"
suffix=
"1个月"
@
blur=
"blurValidate('vipPriceVal')"
></a-input>
<a-input
v-model=
"formModel.vipPrice"
prefix=
"¥"
suffix=
"1个月"
></a-input>
</a-form-model-item>
<!--
<a-form-model-item
label=
"折扣配置"
ref=
"discountFor3MonVal"
prop=
"discountFor3Mon"
>
<a-input
v-model=
"formModel.discountFor3Mon"
prefix=
"¥"
suffix=
"3个月"
@
blur=
"blurValidate('discountFor3MonVal')"
></a-input>
...
...
@@ -20,7 +20,7 @@
<a-input
v-model=
"formModel.discountFor12Mon"
prefix=
"¥"
suffix=
"12个月"
@
blur=
"blurValidate('discountFor12MonVal')"
></a-input>
</a-form-model-item>
-->
<a-form-model-item
label=
"企业会员价格"
ref=
"enterpriceVipPriceVal"
prop=
"enterpriceVipPrice"
>
<a-input
v-model=
"formModel.enterpriceVipPrice"
prefix=
"¥"
suffix=
"1个月"
@
blur=
"blurValidate('enterpriceVipPriceVal')"
></a-input>
<a-input
v-model=
"formModel.enterpriceVipPrice"
prefix=
"¥"
suffix=
"1个月"
></a-input>
</a-form-model-item>
<a-form-model-item
:wrapper-col=
"
{offset:4}">
<a-button
type=
"primary"
@
click=
"onSubmit"
:loading=
"btnLoading"
>
保存
</a-button>
...
...
@@ -34,6 +34,13 @@ import {getConfig,updateConfig} from '@/api/biz/priceConfig'
import
{
disposereq
}
from
'@/utils/util'
export
default
{
data
(){
let
validatorPrice
=
(
rule
,
value
,
callback
)
=>
{
var
val
=
parseFloat
(
value
)
if
(
val
<=
0.0
){
return
callback
(
new
Error
(
'必须大于0'
))
}
return
true
;
};
return
{
formModel
:
{
vipPrice
:
0
,
...
...
@@ -57,6 +64,11 @@ export default {
transform
:
(
value
)
=>
{
return
Number
(
value
)
}
},
{
validator
:
validatorPrice
,
message
:
'必须大于0'
,
trigger
:
'blur'
}
],
discountFor3Mon
:
[
...
...
@@ -117,6 +129,11 @@ export default {
transform
:
(
value
)
=>
{
return
Number
(
value
)
}
},
{
validator
:
validatorPrice
,
message
:
'必须大于0'
,
trigger
:
'blur'
}
]
}
...
...
@@ -129,6 +146,7 @@ export default {
},
methods
:
{
blurValidate
(
prop
){
this
.
$refs
[
prop
].
onFieldBlur
()
},
...
...
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