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
7b2e4e04
Commit
7b2e4e04
authored
Jan 11, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷领取修改显示
parent
5c3e7a6c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
28 deletions
+77
-28
index.vue
src/views/system/consumerCoupon/index.vue
+2
-0
index.vue
src/views/system/coupon/index.vue
+75
-28
No files found.
src/views/system/consumerCoupon/index.vue
View file @
7b2e4e04
...
...
@@ -228,6 +228,8 @@
<dict-tag
:options=
"dict.type.consumer_coupon_platform_type"
:value=
"scope.row.platformType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"有效开始时段"
align=
"center"
prop=
"couponTimeStart"
/>
<el-table-column
label=
"有效结束时段"
align=
"center"
prop=
"couponTimeEnd"
/>
<el-table-column
label=
"有效期开始"
align=
"center"
prop=
"startDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
startDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
...
...
src/views/system/coupon/index.vue
View file @
7b2e4e04
...
...
@@ -32,18 +32,18 @@
</el-form-item>
<el-form-item
label=
"有效期开始"
prop=
"startDate"
>
<el-date-picker
clearable
v-model=
"queryParams.startDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期开始"
>
v-model=
"queryParams.startDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期开始"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"有效期结束"
prop=
"endDate"
>
<el-date-picker
clearable
v-model=
"queryParams.endDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期结束"
>
v-model=
"queryParams.endDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择有效期结束"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"使用状态"
prop=
"useStatus"
>
...
...
@@ -71,7 +71,8 @@
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['system:coupon:add']"
>
新增
</el-button>
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -82,7 +83,8 @@
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['system:coupon:edit']"
>
修改
</el-button>
>
修改
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -93,7 +95,8 @@
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:coupon:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
...
...
@@ -103,14 +106,15 @@
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['system:coupon:export']"
>
导出
</el-button>
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"couponList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"优惠券名称"
align=
"center"
prop=
"name"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"优惠券名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"优惠券类型"
align=
"center"
prop=
"couponType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.store_coupon_type"
:value=
"scope.row.couponType"
/>
...
...
@@ -134,6 +138,8 @@
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"有效开始时段"
align=
"center"
prop=
"validStartTime"
width=
"180"
/>
<el-table-column
label=
"有效结束时段"
align=
"center"
prop=
"validEndTime"
width=
"180"
/>
<!-- <el-table-column label="数量" align="center" prop="number"/>-->
<el-table-column
label=
"说明"
align=
"center"
prop=
"remark"
/>
...
...
@@ -145,14 +151,16 @@
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['system:coupon:edit']"
>
修改
</el-button>
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:coupon:remove']"
>
删除
</el-button>
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -169,7 +177,7 @@
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"优惠券名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入优惠券名称"
/>
<el-input
v-model=
"form.name"
placeholder=
"请输入优惠券名称"
/>
</el-form-item>
<el-form-item
label=
"优惠券类型"
prop=
"couponType"
>
<el-select
v-model=
"form.couponType"
placeholder=
"请选择优惠券类型"
disabled
>
...
...
@@ -218,12 +226,34 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"有效开始时段"
prop=
"validStartTime"
>
<el-time-select
v-model=
"form.validStartTime"
:picker-options=
"{
start: '00:00',
step: '00:30',
end: '24:00'
}"
placeholder=
"选择开始时段"
>
</el-time-select>
</el-form-item>
<el-form-item
label=
"有效结束时段"
prop=
"validEndTime"
>
<el-time-select
v-model=
"form.validEndTime"
:picker-options=
"{
start: '00:00',
step: '00:30',
end: '24:00'
}"
placeholder=
"选择结束时段"
>
</el-time-select>
</el-form-item>
<!-- <el-form-item label="数量" prop="number">-->
<!-- <el-input-number v-model="form.number" :min="0" :max="9999" label="优惠卷数量"/>-->
<!-- <!– <el-input v-model="form.number" type="textarea" placeholder="请输入数量" />–>-->
<!-- </el-form-item>-->
<el-form-item
label=
"说明"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入内容"
/>
</el-form-item>
</el-form>
...
...
@@ -288,13 +318,29 @@ export default {
{
pattern
:
/^
(([
1-9
]{1}\d
*
)
|
(
0
{1}))(\.\d{0,2})?
$/
,
message
:
"请输入正确的优惠金额"
,
trigger
:
"blur"
}
],
name
:
[
{
required
:
true
,
message
:
"优惠券名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"优惠券名称不能为空"
,
trigger
:
"blur"
}
],
couponType
:
[
{
required
:
true
,
message
:
"优惠券类型不能为空"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"优惠券类型不能为空"
,
trigger
:
"change"
}
],
duration
:
[
{
required
:
true
,
message
:
"时长不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"时长不能为空"
,
trigger
:
"blur"
}
],
validEndTime
:
[
//结束时段必须大于开始时段
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
form
.
validStartTime
&&
this
.
form
.
validEndTime
)
{
if
(
this
.
form
.
validStartTime
>=
this
.
form
.
validEndTime
)
{
callback
(
new
Error
(
"结束时段必须大于开始时段"
));
}
else
{
callback
();
}
}
else
{
callback
();
}
},
trigger
:
"blur"
}
],
}
};
...
...
@@ -304,11 +350,11 @@ export default {
this
.
onPackList
();
},
methods
:
{
onChangeStoreType
(
e
){
onChangeStoreType
(
e
)
{
console
.
log
(
e
)
this
.
form
.
storeType
=
e
.
join
()
},
onChangeRoomType
(
e
){
onChangeRoomType
(
e
)
{
console
.
log
(
e
)
this
.
form
.
roomType
=
e
.
join
()
},
...
...
@@ -380,7 +426,7 @@ export default {
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
},
/** 新增按钮操作 */
...
...
@@ -405,10 +451,10 @@ export default {
if
(
response
.
data
.
packageId
)
{
this
.
form
.
packageId
=
response
.
data
.
packageId
.
toString
();
}
if
(
this
.
form
.
storeType
)
{
if
(
this
.
form
.
storeType
)
{
this
.
storeType
=
this
.
form
.
storeType
.
split
(
","
)
}
if
(
this
.
form
.
roomType
)
{
if
(
this
.
form
.
roomType
)
{
this
.
roomType
=
this
.
form
.
roomType
.
split
(
","
)
}
this
.
open
=
true
;
...
...
@@ -441,12 +487,13 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除优惠券编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除优惠券编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
delCoupon
(
ids
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
...
...
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