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
96c9a728
Commit
96c9a728
authored
Nov 21, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
套餐设置时间配置优化
parent
4ddb211d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
index.vue
src/views/system/pack/index.vue
+16
-20
No files found.
src/views/system/pack/index.vue
View file @
96c9a728
...
...
@@ -207,7 +207,7 @@
<!-- </el-form-item>-->
<el-form-item
label=
"时长"
prop=
"duration"
>
<!--指定0到23范围的数字-->
<el-input-number
v-model=
"form.duration"
:max=
"2
4"
:min=
"0.5"
:step=
"0.5"
label=
"时长"
/>
<el-input-number
v-model=
"form.duration"
:max=
"2
3-form.packaStartPeriod"
:min=
"1"
:step=
"1"
label=
"时长"
@
input=
"onDurationChange"
/>
</el-form-item>
<!-- <el-form-item label="金额" prop="price">-->
<!-- <el-input v-model="form.price" placeholder="请输入金额" />-->
...
...
@@ -218,10 +218,10 @@
</el-form-item>
<el-form-item
label=
"套餐开始时段"
prop=
"packaStartPeriod"
>
<!--指定0到23范围的数字-->
<el-input-number
v-model=
"form.packaStartPeriod"
:min=
"0"
:max=
"23
"
label=
"套餐开始时段"
/>
<el-input-number
v-model=
"form.packaStartPeriod"
:min=
"0"
:max=
"23
-form.duration"
label=
"套餐开始时段"
@
input=
"onStartTimeChange"
/>
</el-form-item>
<el-form-item
label=
"套餐结束时段"
prop=
"packaEndPeriod"
>
<el-input-number
v-model=
"form.packaEndPeriod"
:min=
"0"
:max=
"23"
label=
"套餐开始时段"
/>
<el-input-number
disabled
v-model=
"form.packaEndPeriod"
:min=
"0"
:max=
"23"
label=
"套餐开始时段"
/>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"sort"
>
<!--指定0到23范围的数字-->
...
...
@@ -312,9 +312,9 @@ export default {
pageNum
:
1
,
pageSize
:
10
,
name
:
null
,
duration
:
null
,
duration
:
''
,
price
:
null
,
packaStartPeriod
:
null
,
packaStartPeriod
:
''
,
packaEndPeriod
:
null
,
firstOrderAvailable
:
null
,
type
:
null
,
...
...
@@ -325,18 +325,8 @@ export default {
form
:
{},
// 表单校验
rules
:
{
packaEndPeriod
:
[
{
required
:
true
,
message
:
"请输入套餐结束时段"
,
trigger
:
"blur"
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<=
this
.
form
.
packaStartPeriod
)
{
callback
(
new
Error
(
"套餐结束时段必须大于套餐开始时段"
));
}
else
{
callback
();
}
},
trigger
:
"blur"
}
packaStartPeriod
:
[
{
required
:
true
,
message
:
"请输入套餐结束时段"
,
trigger
:
"blur"
}
],
}
};
...
...
@@ -345,6 +335,12 @@ export default {
this
.
getList
();
},
methods
:
{
onDurationChange
(
val
){
this
.
form
.
packaEndPeriod
=
Number
(
this
.
form
.
packaStartPeriod
)
+
val
},
onStartTimeChange
(
val
){
this
.
form
.
packaEndPeriod
=
Number
(
this
.
form
.
duration
)
+
val
},
/** 查询套餐列表 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -369,10 +365,10 @@ export default {
this
.
form
=
{
id
:
null
,
name
:
null
,
duration
:
null
,
duration
:
1
,
price
:
null
,
packaStartPeriod
:
null
,
packaEndPeriod
:
null
,
packaStartPeriod
:
0
,
packaEndPeriod
:
1
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
...
...
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