Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_web
Overview
Overview
Details
Activity
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
pseer
gxpt_web
Commits
4d292b98
Commit
4d292b98
authored
Dec 04, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
套餐开始时段和结束时段限制
parent
480fa6aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
index.vue
src/views/system/pack/index.vue
+16
-2
No files found.
src/views/system/pack/index.vue
View file @
4d292b98
...
@@ -153,10 +153,11 @@
...
@@ -153,10 +153,11 @@
<el-input
v-model=
"form.price"
placeholder=
"请输入金额"
/>
<el-input
v-model=
"form.price"
placeholder=
"请输入金额"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"套餐开始时段"
prop=
"packaStartPeriod"
>
<el-form-item
label=
"套餐开始时段"
prop=
"packaStartPeriod"
>
<el-input
v-model=
"form.packaStartPeriod"
placeholder=
"请输入套餐开始时段"
/>
<!--指定0到23范围的数字-->
<el-input-number
v-model=
"form.packaStartPeriod"
:min=
"0"
:max=
"23"
label=
"套餐开始时段"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"套餐结束时段"
prop=
"packaEndPeriod"
>
<el-form-item
label=
"套餐结束时段"
prop=
"packaEndPeriod"
>
<el-input
v-model=
"form.packaEndPeriod"
placeholder=
"请输入套餐结束时段"
/>
<el-input
-number
v-model=
"form.packaEndPeriod"
:min=
"0"
:max=
"23"
label=
"套餐开始时段"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否首次下单可用"
prop=
"firstOrderAvailable"
>
<el-form-item
label=
"是否首次下单可用"
prop=
"firstOrderAvailable"
>
<el-radio-group
v-model=
"form.firstOrderAvailable"
>
<el-radio-group
v-model=
"form.firstOrderAvailable"
>
...
@@ -223,6 +224,19 @@ export default {
...
@@ -223,6 +224,19 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
packaEndPeriod
:
[
{
required
:
true
,
message
:
"请输入套餐结束时段"
,
trigger
:
"blur"
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<=
this
.
form
.
packaStartPeriod
)
{
callback
(
new
Error
(
"套餐结束时段必须大于套餐开始时段"
));
}
else
{
callback
();
}
},
trigger
:
"blur"
}
],
}
}
};
};
},
},
...
...
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