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
8c7af64c
Commit
8c7af64c
authored
Nov 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加赠送抽奖次数
parent
e0809f71
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
20 deletions
+80
-20
consumer.js
src/api/system/consumer.js
+9
-0
index.vue
src/views/system/consumer/index.vue
+71
-20
No files found.
src/api/system/consumer.js
View file @
8c7af64c
...
...
@@ -57,3 +57,12 @@ export function delConsumer(id) {
method
:
'delete'
})
}
export
function
giveNumber
(
data
)
{
return
request
({
url
:
'/system/consumer/giveNumber'
,
method
:
'post'
,
data
:
data
})
}
src/views/system/consumer/index.vue
View file @
8c7af64c
...
...
@@ -153,12 +153,13 @@
<dict-tag
:options=
"dict.type.sys_user_sex"
:value=
"scope.row.sex"
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"抽奖次数"
prop=
"prizeDrawNumbr"
/>
<el-table-column
align=
"center"
label=
"车牌"
prop=
"numberplate"
width=
"100"
/>
<
el-table-column
label=
"详细地址"
align=
"center"
prop=
"addres"
/
>
<
el-table-column
label=
"充值余额"
align=
"center"
prop=
"amount"
/
>
<
el-table-column
label=
"赠送余额"
align=
"center"
prop=
"freeAmount"
/
>
<
el-table-column
label=
"消费次数"
align=
"center"
prop=
"totalTimes"
/
>
<
el-table-column
align=
"center"
label=
"总消费时长"
prop=
"duration"
width=
"100"
/
>
<
!-- <el-table-column label="详细地址" align="center" prop="addres" />--
>
<
!-- <el-table-column label="充值余额" align="center" prop="amount" />--
>
<
!-- <el-table-column label="赠送余额" align="center" prop="freeAmount" />--
>
<
!-- <el-table-column label="消费次数" align="center" prop="totalTimes" />--
>
<
!-- <el-table-column align="center" label="总消费时长" prop="duration" width="100"/>--
>
<el-table-column
label=
"账号状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status === 1"
>
...
...
@@ -199,14 +200,22 @@
@
click
=
"give(scope.row)"
>
赠送优惠卷
<
/el-button
>
<!--
<
el
-
button
-->
<!--
v
-
hasPermi
=
"['system:consumer:give']"
-->
<!--
icon
=
"el-icon-delete"
-->
<!--
size
=
"mini"
-->
<!--
type
=
"text"
-->
<!--
@
click
=
"giveDuration(scope.row)"
-->
<!--
>
赠送时长
-->
<!--
<
/el-button>--
>
<
el
-
button
v
-
hasPermi
=
"['system:consumer:give']"
icon
=
"el-icon-s-finance"
size
=
"mini"
type
=
"text"
@
click
=
"giveDuration(scope.row)"
>
赠送时长
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"['system:consumer:give']"
icon
=
"el-icon-s-finance"
size
=
"mini"
type
=
"text"
@
click
=
"giveNumber(scope.row)"
>
赠送抽奖次数
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
...
...
@@ -270,7 +279,7 @@
<
/el-dialog
>
<!--
添加或修改会员用户对话框
-->
<!--
赠送时长
-->
<
el
-
dialog
:
title
=
"durationTitle"
:
visible
.
sync
=
"durationOpen"
append
-
to
-
body
width
=
"500px"
>
<
el
-
form
ref
=
"durationForm"
:
model
=
"durationForm"
:
rules
=
"durationRules"
>
<
el
-
form
-
item
label
=
"时长(单位:小时)"
prop
=
"remainingDuration"
>
...
...
@@ -284,6 +293,20 @@
<
/div
>
<
/el-dialog
>
<!--
赠送抽奖次数
-->
<
el
-
dialog
:
title
=
"numberTitle"
:
visible
.
sync
=
"numberOpen"
append
-
to
-
body
width
=
"500px"
>
<
el
-
form
ref
=
"numberForm"
:
model
=
"numberForm"
:
rules
=
"numberRules"
>
<
el
-
form
-
item
label
=
"抽奖次数"
prop
=
"prizeDrawNumbr"
>
<
el
-
input
-
number
v
-
model
=
"numberForm.prizeDrawNumbr"
:
max
=
"100"
:
min
=
"0"
:
step
=
"1"
placeholder
=
"请输入抽奖次数"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitNumberForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"numberCancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
el
-
dialog
:
title
=
"couponTitle"
:
visible
.
sync
=
"couponOpen"
width
=
"80%"
append
-
to
-
bod
>
<
el
-
table
v
-
loading
=
"couponLoading"
:
data
=
"couponList"
>
...
...
@@ -378,7 +401,7 @@
<
/template
>
<
script
>
import
{
listConsumer
,
getConsumer
,
delConsumer
,
addConsumer
,
updateConsumer
}
from
"@/api/system/consumer"
;
import
{
listConsumer
,
getConsumer
,
delConsumer
,
addConsumer
,
updateConsumer
,
giveNumber
}
from
"@/api/system/consumer"
;
import
{
listDuration
}
from
"../../../api/system/coupon"
;
import
{
give
}
from
"../../../api/system/consumerCoupon"
;
import
moment
from
"moment"
;
...
...
@@ -413,11 +436,13 @@ export default {
// 弹出层标题
title
:
""
,
durationTitle
:
""
,
numberTitle
:
""
,
couponTitle
:
""
,
// 是否显示弹出层
couponOpen
:
false
,
open
:
false
,
durationOpen
:
false
,
numberOpen
:
false
,
consumerId
:
null
,
giveConsumerId
:
null
,
// 查询参数
...
...
@@ -442,6 +467,7 @@ export default {
// 表单参数
form
:
{
}
,
durationForm
:
{
}
,
numberForm
:
{
}
,
couponForm
:
{
}
,
// 表单校验
rules
:
{
...
...
@@ -456,8 +482,8 @@ export default {
],
}
,
// 表单校验
durationRules
:
{
}
durationRules
:
{
}
,
numberRules
:
{
}
}
;
}
,
created
()
{
...
...
@@ -553,6 +579,10 @@ export default {
this
.
durationOpen
=
false
;
this
.
durationReset
();
}
,
numberCancel
()
{
this
.
numberOpen
=
false
;
this
.
numberReset
();
}
,
// 表单重置
durationReset
()
{
this
.
durationForm
=
{
...
...
@@ -560,9 +590,12 @@ export default {
}
;
this
.
resetForm
(
"durationForm"
);
}
,
numberReset
()
{
this
.
numberForm
=
{
prizeDrawNumbr
:
null
}
;
this
.
resetForm
(
"numberForm"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
...
...
@@ -628,6 +661,18 @@ export default {
}
}
);
}
,
submitNumberForm
()
{
this
.
$refs
[
"numberForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
numberForm
.
id
=
this
.
giveConsumerId
;
giveNumber
(
this
.
numberForm
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
numberOpen
=
false
;
this
.
getList
();
}
);
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
...
...
@@ -657,6 +702,12 @@ export default {
this
.
durationOpen
=
true
;
this
.
durationTitle
=
"添加时长"
;
}
,
giveNumber
(
row
)
{
this
.
giveConsumerId
=
row
.
id
;
this
.
numberOpen
=
true
;
this
.
numberTitle
=
"添加抽奖次数"
;
}
,
submitcouponGive
(
row
)
{
const
consumerId
=
this
.
consumerId
;
this
.
$modal
.
confirm
(
'是否赠送'
+
row
.
name
+
'优惠卷'
).
then
(
function
()
{
...
...
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