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
d35d45a6
Commit
d35d45a6
authored
Oct 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加赠送时长按钮
parent
3d0f9619
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
8 deletions
+82
-8
wallet.js
src/api/system/wallet.js
+8
-0
index.vue
src/views/system/consumer/index.vue
+74
-8
No files found.
src/api/system/wallet.js
View file @
d35d45a6
...
@@ -42,3 +42,11 @@ export function delWallet(id) {
...
@@ -42,3 +42,11 @@ export function delWallet(id) {
method
:
'delete'
method
:
'delete'
})
})
}
}
export
function
giveDuration
(
data
)
{
return
request
({
url
:
'/system/wallet/giveDuration'
,
method
:
'post'
,
data
:
data
})
}
src/views/system/consumer/index.vue
View file @
d35d45a6
...
@@ -134,16 +134,16 @@
...
@@ -134,16 +134,16 @@
<el-table
v-loading=
"loading"
:data=
"consumerList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"consumerList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"用户账号"
align=
"center"
prop=
"account"
/>
<el-table-column
align=
"center"
label=
"用户账号"
prop=
"account"
width=
"120"
/>
<el-table-column
label=
"用户昵称"
align=
"center"
prop=
"nickName"
/>
<el-table-column
align=
"center"
label=
"用户昵称"
prop=
"nickName"
width=
"100"
/>
<el-table-column
label=
"用户头像"
align=
"center"
prop=
"avatar"
width=
"100"
>
<el-table-column
label=
"用户头像"
align=
"center"
prop=
"avatar"
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<image-preview
:src=
"scope.row.avatar"
:width=
"50"
:height=
"50"
/>
<image-preview
:src=
"scope.row.avatar"
:width=
"50"
:height=
"50"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"用户手机号"
align=
"center"
prop=
"phone"
/>
<el-table-column
align=
"center"
label=
"用户手机号"
prop=
"phone"
width=
"120"
/>
<el-table-column
label=
"会员级别"
align=
"center"
prop=
"level"
/>
<el-table-column
label=
"会员级别"
align=
"center"
prop=
"level"
/>
<el-table-column
label=
"会员角色类型"
align=
"center"
prop=
"roleType
"
>
<el-table-column
align=
"center"
label=
"会员角色类型"
prop=
"roleType"
width=
"100
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.wechat_role_type"
:value=
"scope.row.roleType"
/>
<dict-tag
:options=
"dict.type.wechat_role_type"
:value=
"scope.row.roleType"
/>
</
template
>
</
template
>
...
@@ -153,12 +153,12 @@
...
@@ -153,12 +153,12 @@
<dict-tag
:options=
"dict.type.sys_user_sex"
:value=
"scope.row.sex"
/>
<dict-tag
:options=
"dict.type.sys_user_sex"
:value=
"scope.row.sex"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"车牌"
align=
"center"
prop=
"numberplate
"
/>
<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=
"addres"
/>
<el-table-column
label=
"充值余额"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"充值余额"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"赠送余额"
align=
"center"
prop=
"freeAmount"
/>
<el-table-column
label=
"赠送余额"
align=
"center"
prop=
"freeAmount"
/>
<el-table-column
label=
"消费次数"
align=
"center"
prop=
"totalTimes"
/>
<el-table-column
label=
"消费次数"
align=
"center"
prop=
"totalTimes"
/>
<el-table-column
label=
"总消费时长"
align=
"center"
prop=
"duration"
/>
<el-table-column
align=
"center"
label=
"总消费时长"
prop=
"duration"
width=
"100"
/>
<el-table-column
label=
"账号状态"
align=
"center"
prop=
"status"
>
<el-table-column
label=
"账号状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.status === 1"
>
<span
v-if=
"scope.row.status === 1"
>
...
@@ -170,12 +170,12 @@
...
@@ -170,12 +170,12 @@
</span>
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"最后一次登录时间"
align=
"center"
prop=
"lastLoginTime"
>
<el-table-column
align=
"center"
label=
"最后一次登录时间"
prop=
"lastLoginTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
lastLoginTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
'
)
}}
<
/span
>
<span>
{{
parseTime
(
scope
.
row
.
lastLoginTime
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
'
)
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width
"
>
<
el
-
table
-
column
align
=
"center"
class
-
name
=
"small-padding fixed-width"
label
=
"操作"
width
=
"180
"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<!--
<
el
-
button
-->
<!--
<
el
-
button
-->
<!--
size
=
"mini"
-->
<!--
size
=
"mini"
-->
...
@@ -199,6 +199,14 @@
...
@@ -199,6 +199,14 @@
@
click
=
"give(scope.row)"
@
click
=
"give(scope.row)"
>
赠送优惠卷
>
赠送优惠卷
<
/el-button
>
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"['system:consumer:give']"
icon
=
"el-icon-delete"
size
=
"mini"
type
=
"text"
@
click
=
"giveDuration(scope.row)"
>
赠送时长
<
/el-button
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
...
@@ -261,6 +269,22 @@
...
@@ -261,6 +269,22 @@
<
/div
>
<
/div
>
<
/el-dialog
>
<
/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"
>
<
el
-
input
-
number
v
-
model
=
"durationForm.remainingDuration"
:
max
=
"100"
:
min
=
"0"
:
step
=
"0.5"
placeholder
=
"请输入门槛时长"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"submitDurationForm"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"durationCancel"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
el
-
dialog
:
title
=
"couponTitle"
:
visible
.
sync
=
"couponOpen"
width
=
"80%"
append
-
to
-
bod
>
<
el
-
dialog
:
title
=
"couponTitle"
:
visible
.
sync
=
"couponOpen"
width
=
"80%"
append
-
to
-
bod
>
<
el
-
table
v
-
loading
=
"couponLoading"
:
data
=
"couponList"
>
<
el
-
table
v
-
loading
=
"couponLoading"
:
data
=
"couponList"
>
<
el
-
table
-
column
label
=
"优惠券名称"
align
=
"center"
prop
=
"name"
/>
<
el
-
table
-
column
label
=
"优惠券名称"
align
=
"center"
prop
=
"name"
/>
...
@@ -359,6 +383,8 @@ import {listDuration} from "../../../api/system/coupon";
...
@@ -359,6 +383,8 @@ import {listDuration} from "../../../api/system/coupon";
import
{
give
}
from
"../../../api/system/consumerCoupon"
;
import
{
give
}
from
"../../../api/system/consumerCoupon"
;
import
moment
from
"moment"
;
import
moment
from
"moment"
;
import
{
query
}
from
'@/api/system/pack'
;
import
{
query
}
from
'@/api/system/pack'
;
import
{
giveDuration
}
from
'@/api/system/wallet'
;
import
{
storeList
}
from
"../../../api/system/store"
;
import
{
storeList
}
from
"../../../api/system/store"
;
export
default
{
export
default
{
...
@@ -386,11 +412,14 @@ export default {
...
@@ -386,11 +412,14 @@ export default {
storeList
:
[],
storeList
:
[],
// 弹出层标题
// 弹出层标题
title
:
""
,
title
:
""
,
durationTitle
:
""
,
couponTitle
:
""
,
couponTitle
:
""
,
// 是否显示弹出层
// 是否显示弹出层
couponOpen
:
false
,
couponOpen
:
false
,
open
:
false
,
open
:
false
,
durationOpen
:
false
,
consumerId
:
null
,
consumerId
:
null
,
giveConsumerId
:
null
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
...
@@ -412,6 +441,7 @@ export default {
...
@@ -412,6 +441,7 @@ export default {
}
,
}
,
// 表单参数
// 表单参数
form
:
{
}
,
form
:
{
}
,
durationForm
:
{
}
,
couponForm
:
{
}
,
couponForm
:
{
}
,
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -424,6 +454,9 @@ export default {
...
@@ -424,6 +454,9 @@ export default {
phone
:
[
phone
:
[
{
required
:
true
,
message
:
"用户手机号不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"用户手机号不能为空"
,
trigger
:
"blur"
}
],
],
}
,
// 表单校验
durationRules
:
{
}
}
}
;
}
;
}
,
}
,
...
@@ -515,6 +548,21 @@ export default {
...
@@ -515,6 +548,21 @@ export default {
}
;
}
;
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
}
,
}
,
// 取消按钮
durationCancel
()
{
this
.
durationOpen
=
false
;
this
.
durationReset
();
}
,
// 表单重置
durationReset
()
{
this
.
durationForm
=
{
duration
:
null
}
;
this
.
resetForm
(
"durationForm"
);
}
,
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
pageNum
=
1
;
...
@@ -567,6 +615,19 @@ export default {
...
@@ -567,6 +615,19 @@ export default {
}
}
}
);
}
);
}
,
}
,
/** 提交按钮 */
submitDurationForm
()
{
this
.
$refs
[
"durationForm"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
durationForm
.
consumerId
=
this
.
giveConsumerId
;
giveDuration
(
this
.
durationForm
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
durationOpen
=
false
;
this
.
getList
();
}
);
}
}
);
}
,
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
const
ids
=
row
.
id
||
this
.
ids
;
...
@@ -591,6 +652,11 @@ export default {
...
@@ -591,6 +652,11 @@ export default {
this
.
couponOpen
=
true
;
this
.
couponOpen
=
true
;
this
.
couponTitle
=
"优惠卷列表"
;
this
.
couponTitle
=
"优惠卷列表"
;
}
,
}
,
giveDuration
(
row
)
{
this
.
giveConsumerId
=
row
.
id
;
this
.
durationOpen
=
true
;
this
.
durationTitle
=
"添加时长"
;
}
,
submitcouponGive
(
row
)
{
submitcouponGive
(
row
)
{
const
consumerId
=
this
.
consumerId
;
const
consumerId
=
this
.
consumerId
;
this
.
$modal
.
confirm
(
'是否赠送'
+
row
.
name
+
'优惠卷'
).
then
(
function
()
{
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