Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 887d0e25
authored
Mar 14, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'xuyl-dev-v2.0.0' into 'v2.0.0'
修改会员页面的校验 See merge request
!12
2 parents
7242161f
505a0973
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
src/views/memberCenter/center.vue
src/views/memberCenter/center.vue
View file @
887d0e2
...
@@ -38,18 +38,18 @@
...
@@ -38,18 +38,18 @@
<div
class=
"cardDetail editForm"
v-else
>
<div
class=
"cardDetail editForm"
v-else
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"90px"
class=
"demo-ruleForm"
style=
"width: 500px"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"90px"
class=
"demo-ruleForm"
style=
"width: 500px"
>
<el-form-item
label=
"会员卡名"
prop=
"cardName"
size=
"small"
>
<el-form-item
label=
"会员卡名"
prop=
"cardName"
size=
"small"
>
<el-input
v-model
=
"ruleForm.cardName"
size=
"small"
class=
"cardNameInput"
show-word-limit
placeholder=
"请输入会员卡名"
maxlength=
"15"
></el-input>
<el-input
v-model
.
trim
=
"ruleForm.cardName"
size=
"small"
class=
"cardNameInput"
show-word-limit
placeholder=
"请输入会员卡名"
maxlength=
"15"
></el-input>
</el-form-item>
</el-form-item>
<div
class=
"pricesMerge"
>
<div
class=
"pricesMerge"
>
<el-form-item
label=
"售价"
size=
"small"
prop=
"price"
style=
"width: 300px"
>
<el-form-item
label=
"售价"
size=
"small"
prop=
"price"
style=
"width: 300px"
>
<el-input
v-model=
"ruleForm.price"
size=
"small"
placeholder=
"请输入
合理价格
"
@
keyup
.
native=
"ruleForm.price = oninput(ruleForm.price)"
>
<el-input
v-model=
"ruleForm.price"
size=
"small"
placeholder=
"请输入
售价
"
@
keyup
.
native=
"ruleForm.price = oninput(ruleForm.price)"
>
<!--
<template
slot=
"append"
>
元
</
template
>
-->
<!--
<template
slot=
"append"
>
元
</
template
>
-->
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"市场价"
prop=
"marketPrice"
size=
"small"
style=
"width: 300px"
>
<el-form-item
label=
"市场价"
prop=
"marketPrice"
size=
"small"
style=
"width: 300px"
>
<!-- :onkeyup="(ruleForm.marketPrice = ruleForm.marketPrice.replace(/[^\-\d.]/g, ''))" -->
<!-- :onkeyup="(ruleForm.marketPrice = ruleForm.marketPrice.replace(/[^\-\d.]/g, ''))" -->
<el-input
v-model=
"ruleForm.marketPrice"
size=
"small"
placeholder=
"请输入
合理价格
"
@
keyup
.
native=
"ruleForm.marketPrice = oninput(ruleForm.marketPrice)"
>
<el-input
v-model=
"ruleForm.marketPrice"
size=
"small"
placeholder=
"请输入
市场价
"
@
keyup
.
native=
"ruleForm.marketPrice = oninput(ruleForm.marketPrice)"
>
<!-- <template slot="append">元</template> -->
<!-- <template slot="append">元</template> -->
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
</el-input>
</el-input>
...
@@ -63,8 +63,8 @@
...
@@ -63,8 +63,8 @@
<el-input-number
v-model=
"ruleForm.tryNum"
:controls=
"false"
:min=
"1"
:max=
"365"
></el-input-number>
<el-input-number
v-model=
"ruleForm.tryNum"
:controls=
"false"
:min=
"1"
:max=
"365"
></el-input-number>
<span>
天试用
</span>
<span>
天试用
</span>
</div>
</div>
<div
class=
"el-form-item__error trialDays_error
"
v-if=
"ruleForm.tryAble==1 && !ruleForm.tryNum"
>
<div
class=
"el-form-item__error trialDays_error"
v-if=
"ruleForm.tryAble==1 && !ruleForm.tryNum"
>
试用时长可输入 1 到 365 天
请输入试用时长
</div>
</div>
</div>
</div>
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
<!-- <div v-if="ruleForm.tryAble" class="promoteQR">生成小程序码推广</div> -->
...
@@ -331,14 +331,15 @@ export default {
...
@@ -331,14 +331,15 @@ export default {
copyRuleForm
:
{},
copyRuleForm
:
{},
rules
:
{
rules
:
{
cardName
:
[
cardName
:
[
{
required
:
true
,
message
:
'请输入会员卡名称'
,
trigger
:
'blur'
},
{
required
:
true
,
min
:
1
,
max
:
15
,
message
:
'请输入会员卡名称'
,
trigger
:
'blur'
},
{
min
:
3
,
max
:
20
,
message
:
'长度在 3 到 20 个字符'
,
trigger
:
'blur
'
}
// { min: 1, max: 15, message: '请输入1 到 15 个字符
' }
],
],
price
:
[
price
:
[
{
required
:
true
,
message
:
'请输入
价格'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请输入
售价'
,
trigger
:
'blur'
}
// { validator: checkPrice, trigger: 'blur' }
// { validator: checkPrice, trigger: 'blur' }
],
],
// marketPrice: [{ validator: checkPrice, trigger: 'blur' }]
marketPrice
:
[{
required
:
true
,
message
:
'请输入市场价'
,
trigger
:
'blur'
}]
},
},
//权益 - 弹窗
//权益 - 弹窗
isDialogVisible
:
false
,
isDialogVisible
:
false
,
...
@@ -393,6 +394,9 @@ export default {
...
@@ -393,6 +394,9 @@ export default {
if
(
len1
==
'-'
)
{
if
(
len1
==
'-'
)
{
str
=
''
str
=
''
}
//限制只能输入一个小数点
}
//限制只能输入一个小数点
if
(
value
!==
''
&&
value
==
0
){
return
(
str
=
1
)
}
if
(
Number
(
value
)
>=
99999
)
{
if
(
Number
(
value
)
>=
99999
)
{
return
(
str
=
99999
)
return
(
str
=
99999
)
}
}
...
@@ -781,7 +785,7 @@ export default {
...
@@ -781,7 +785,7 @@ export default {
align-items
:
center
;
align-items
:
center
;
height
:
33px
;
height
:
33px
;
.trialDays_error{
.trialDays_error{
margin-left
:
1
2
5px
;
margin-left
:
1
3
5px
;
}
}
.switchTag
.el-switch__label
{
.switchTag
.el-switch__label
{
position
:
absolute
;
position
:
absolute
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment