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 @@
...
@@ -207,7 +207,7 @@
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<el-form-item
label=
"时长"
prop=
"duration"
>
<el-form-item
label=
"时长"
prop=
"duration"
>
<!--指定0到23范围的数字-->
<!--指定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>
<!-- <el-form-item label="金额" prop="price">-->
<!-- <el-form-item label="金额" prop="price">-->
<!-- <el-input v-model="form.price" placeholder="请输入金额" />-->
<!-- <el-input v-model="form.price" placeholder="请输入金额" />-->
...
@@ -218,10 +218,10 @@
...
@@ -218,10 +218,10 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"套餐开始时段"
prop=
"packaStartPeriod"
>
<el-form-item
label=
"套餐开始时段"
prop=
"packaStartPeriod"
>
<!--指定0到23范围的数字-->
<!--指定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>
<el-form-item
label=
"套餐结束时段"
prop=
"packaEndPeriod"
>
<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>
<el-form-item
label=
"排序"
prop=
"sort"
>
<el-form-item
label=
"排序"
prop=
"sort"
>
<!--指定0到23范围的数字-->
<!--指定0到23范围的数字-->
...
@@ -312,9 +312,9 @@ export default {
...
@@ -312,9 +312,9 @@ export default {
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
name
:
null
,
name
:
null
,
duration
:
null
,
duration
:
''
,
price
:
null
,
price
:
null
,
packaStartPeriod
:
null
,
packaStartPeriod
:
''
,
packaEndPeriod
:
null
,
packaEndPeriod
:
null
,
firstOrderAvailable
:
null
,
firstOrderAvailable
:
null
,
type
:
null
,
type
:
null
,
...
@@ -325,18 +325,8 @@ export default {
...
@@ -325,18 +325,8 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
packaEndPeriod
:
[
packaStartPeriod
:
[
{
required
:
true
,
message
:
"请输入套餐结束时段"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入套餐结束时段"
,
trigger
:
"blur"
}
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
<=
this
.
form
.
packaStartPeriod
)
{
callback
(
new
Error
(
"套餐结束时段必须大于套餐开始时段"
));
}
else
{
callback
();
}
},
trigger
:
"blur"
}
],
],
}
}
};
};
...
@@ -345,6 +335,12 @@ export default {
...
@@ -345,6 +335,12 @@ export default {
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
onDurationChange
(
val
){
this
.
form
.
packaEndPeriod
=
Number
(
this
.
form
.
packaStartPeriod
)
+
val
},
onStartTimeChange
(
val
){
this
.
form
.
packaEndPeriod
=
Number
(
this
.
form
.
duration
)
+
val
},
/** 查询套餐列表 */
/** 查询套餐列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -369,10 +365,10 @@ export default {
...
@@ -369,10 +365,10 @@ export default {
this
.
form
=
{
this
.
form
=
{
id
:
null
,
id
:
null
,
name
:
null
,
name
:
null
,
duration
:
null
,
duration
:
1
,
price
:
null
,
price
:
null
,
packaStartPeriod
:
null
,
packaStartPeriod
:
0
,
packaEndPeriod
:
null
,
packaEndPeriod
:
1
,
createBy
:
null
,
createBy
:
null
,
createTime
:
null
,
createTime
:
null
,
updateBy
:
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