Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
snow-guizhou-web-frontend
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
雪花
snow-guizhou-web-frontend
Commits
5e5321f2
提交
5e5321f2
authored
5月 11, 2022
作者:
shia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查看数据
上级
71911ff6
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
454 行增加
和
1 行删除
+454
-1
couponData.js
src/api/coupon/couponData.js
+18
-0
index.js
src/router/index.js
+7
-1
verificationList.vue
src/views/coupon/couponData/verificationList.vue
+429
-0
没有找到文件。
src/api/coupon/couponData.js
0 → 100644
浏览文件 @
5e5321f2
import
request
from
'@/utils/request'
// 查询列表
export
function
verificationList
(
data
)
{
return
request
({
url
:
'/coupon/coupon/xhDatalist'
,
method
:
'post'
,
data
:
data
})
}
// 查询详细
export
function
auditDetail
(
id
)
{
return
request
({
url
:
'/coupon/coupon/'
+
id
,
method
:
'get'
})
}
src/router/index.js
浏览文件 @
5e5321f2
...
...
@@ -44,6 +44,7 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'@/views/login'
],
resolve
),
hidden
:
true
},
{
path
:
'/404'
,
component
:
(
resolve
)
=>
require
([
'@/views/error/404'
],
resolve
),
...
...
@@ -64,7 +65,12 @@ export const constantRoutes = [
component
:
(
resolve
)
=>
require
([
'@/views/index_v2'
],
resolve
),
name
:
'Index'
,
meta
:
{
title
:
'首页'
,
icon
:
'dashboard'
,
affix
:
true
}
}
},
{
path
:
'/coupon/verificationList'
,
component
:
(
resolve
)
=>
require
([
'@/views/coupon/couponData/verificationList'
],
resolve
),
hidden
:
true
},
]
},
{
...
...
src/views/coupon/couponData/verificationList.vue
0 → 100644
浏览文件 @
5e5321f2
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
v-show=
"showSearch"
:inline=
"true"
>
<el-form-item
label=
"微信昵称"
prop=
"receiveNickName"
>
<el-input
v-model=
"queryParams.receiveNickName"
placeholder=
"请输入微信昵称"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"openid"
prop=
"receiveUserAccount"
>
<el-input
v-model=
"queryParams.receiveUserAccount"
placeholder=
"请输入权限字符"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"state"
>
<el-select
v-model=
"queryParams.state"
placeholder=
"状态"
clearable
size=
"small"
style=
"width: 240px"
>
I
<!-- NI-已领取待核销, USED-已核销, EXPIRYED-已失效, ERR-发放失败, X-已删除 -->
<el-option
key=
""
label=
"全部"
value=
""
/>
<el-option
key=
"INI"
label=
"已领取待核销"
value=
"INI"
/>
<el-option
key=
"USED"
label=
"已核销"
value=
"USED"
/>
<el-option
key=
"EXPIRYED"
label=
"已失效"
value=
"EXPIRYED"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"核销人"
prop=
"verificationChannelEmployeeName"
>
<el-input
v-model=
"queryParams.verificationChannelEmployeeName"
placeholder=
"请输入核销人"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"核销门店"
prop=
"verificationChannelName"
>
<el-input
v-model=
"queryParams.verificationChannelName"
placeholder=
"请输入核销门店"
clearable
size=
"small"
style=
"width: 240px"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"核销时间"
>
<el-date-picker
v-model=
"dateRange"
size=
"small"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleAdd"
>
下载报表
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
:columns=
"columns"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"roleList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"id"
prop=
"roleId"
width=
"60"
>
<template
slot-scope=
"scope,index"
>
{{
index
}}
</
template
>
</el-table-column>
<el-table-column
label=
"优惠券标题"
prop=
"couponName"
width=
"120"
/>
<el-table-column
label=
"领取人微信openid"
prop=
"receiveUserAccount"
:show-overflow-tooltip=
"true"
width=
"150"
/>
<el-table-column
label=
"微信昵称"
prop=
"receiveNickName"
:show-overflow-tooltip=
"true"
width=
"150"
/>
<el-table-column
label=
"领取时间"
prop=
"receiveTime"
width=
"100"
/>
<el-table-column
label=
"券码"
prop=
"couponCode"
width=
"100"
/>
<el-table-column
label=
"状态"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.status"
active-value=
"0"
inactive-value=
"1"
@
change=
"handleStatusChange(scope.row)"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"核销时间"
align=
"center"
prop=
"verificationTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
verificationTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"核销人"
align=
"center"
prop=
"verificationChannelEmployeeName"
width=
"180"
/>
<el-table-column
label=
"核销门店"
align=
"center"
prop=
"verificationChannelName"
width=
"180"
/>
</el-table>
<pagination
v-show=
"total>0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
verificationList
}
from
"@/api/coupon/couponData"
;
export
default
{
name
:
"Role"
,
dicts
:
[
'sys_normal_disable'
],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 角色表格数据
roleList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 是否显示弹出层(数据权限)
openDataScope
:
false
,
menuExpand
:
false
,
menuNodeAll
:
false
,
deptExpand
:
true
,
deptNodeAll
:
false
,
// 日期范围
dateRange
:
[],
// 数据范围选项
// 菜单列表
menuOptions
:
[],
// 部门列表
deptOptions
:
[],
// 查询参数
queryParams
:
{
pageIndex
:
1
,
pageSize
:
10
,
"couponCode"
:
""
,
"couponInfoId"
:
""
,
"couponName"
:
""
,
"memberSysId"
:
""
,
"receiveNickName"
:
""
,
"receiveUserAccount"
:
""
,
"sendChannel"
:
""
,
"state"
:
""
,
"tableName"
:
""
,
"verificationChannelEmployeeName"
:
""
,
"verificationChannelName"
:
""
,
"verificationEndTime"
:
""
,
"verificationStartTime"
:
""
},
// 表单参数
form
:
{},
defaultProps
:
{
children
:
"children"
,
label
:
"label"
},
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询角色列表 */
getList
()
{
this
.
loading
=
true
;
let
params
=
this
.
queryParams
;
if
(
this
.
dateRange
.
length
!=
0
){
params
.
verificationStartTime
=
this
.
dateRange
[
0
];
}
else
{
params
.
verificationStartTime
=
this
.
dateRange
[
1
];
}
verificationList
(
params
).
then
(
response
=>
{
this
.
roleList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 取消按钮(数据权限)
cancelDataScope
()
{
this
.
openDataScope
=
false
;
this
.
reset
();
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRange
=
[];
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
roleId
)
this
.
single
=
selection
.
length
!=
1
this
.
multiple
=
!
selection
.
length
},
// 更多操作触发
handleCommand
(
command
,
row
)
{
switch
(
command
)
{
case
"handleDataScope"
:
this
.
handleDataScope
(
row
);
break
;
case
"handleAuthUser"
:
this
.
handleAuthUser
(
row
);
break
;
default
:
break
;
}
},
// 树权限(展开/折叠)
handleCheckedTreeExpand
(
value
,
type
)
{
if
(
type
==
'menu'
)
{
let
treeList
=
this
.
menuOptions
;
for
(
let
i
=
0
;
i
<
treeList
.
length
;
i
++
)
{
this
.
$refs
.
menu
.
store
.
nodesMap
[
treeList
[
i
].
id
].
expanded
=
value
;
}
}
else
if
(
type
==
'dept'
)
{
let
treeList
=
this
.
deptOptions
;
for
(
let
i
=
0
;
i
<
treeList
.
length
;
i
++
)
{
this
.
$refs
.
dept
.
store
.
nodesMap
[
treeList
[
i
].
id
].
expanded
=
value
;
}
}
},
// 树权限(全选/全不选)
handleCheckedTreeNodeAll
(
value
,
type
)
{
if
(
type
==
'menu'
)
{
this
.
$refs
.
menu
.
setCheckedNodes
(
value
?
this
.
menuOptions
:
[]);
}
else
if
(
type
==
'dept'
)
{
this
.
$refs
.
dept
.
setCheckedNodes
(
value
?
this
.
deptOptions
:
[]);
}
},
// 树权限(父子联动)
handleCheckedTreeConnect
(
value
,
type
)
{
if
(
type
==
'menu'
)
{
this
.
form
.
menuCheckStrictly
=
value
?
true
:
false
;
}
else
if
(
type
==
'dept'
)
{
this
.
form
.
deptCheckStrictly
=
value
?
true
:
false
;
}
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
getMenuTreeselect
();
this
.
open
=
true
;
this
.
title
=
"添加角色"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
roleId
=
row
.
roleId
||
this
.
ids
const
roleMenu
=
this
.
getRoleMenuTreeselect
(
roleId
);
getRole
(
roleId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
$nextTick
(()
=>
{
roleMenu
.
then
(
res
=>
{
let
checkedKeys
=
res
.
checkedKeys
checkedKeys
.
forEach
((
v
)
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
menu
.
setChecked
(
v
,
true
,
false
);
})
})
});
});
this
.
title
=
"修改角色"
;
});
},
/** 选择角色权限范围触发 */
dataScopeSelectChange
(
value
)
{
if
(
value
!==
'2'
)
{
this
.
$refs
.
dept
.
setCheckedKeys
([]);
}
},
/** 分配数据权限操作 */
handleDataScope
(
row
)
{
this
.
reset
();
const
roleDeptTreeselect
=
this
.
getRoleDeptTreeselect
(
row
.
roleId
);
getRole
(
row
.
roleId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
openDataScope
=
true
;
this
.
$nextTick
(()
=>
{
roleDeptTreeselect
.
then
(
res
=>
{
this
.
$refs
.
dept
.
setCheckedKeys
(
res
.
checkedKeys
);
});
});
this
.
title
=
"分配数据权限"
;
});
},
/** 分配用户操作 */
handleAuthUser
:
function
(
row
)
{
const
roleId
=
row
.
roleId
;
this
.
$router
.
push
(
"/system/role-auth/user/"
+
roleId
);
},
/** 提交按钮 */
submitForm
:
function
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
roleId
!=
undefined
)
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
();
updateRole
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
else
{
this
.
form
.
menuIds
=
this
.
getMenuAllCheckedKeys
();
addRole
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
/** 提交按钮(数据权限) */
submitDataScope
:
function
()
{
if
(
this
.
form
.
roleId
!=
undefined
)
{
this
.
form
.
deptIds
=
this
.
getDeptAllCheckedKeys
();
dataScope
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
openDataScope
=
false
;
this
.
getList
();
});
}
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
roleIds
=
row
.
roleId
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除角色编号为"'
+
roleIds
+
'"的数据项?'
).
then
(
function
()
{
return
delRole
(
roleIds
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
const
queryParams
=
this
.
queryParams
;
this
.
$modal
.
confirm
(
'是否确认导出所有用户数据项?'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportRole
(
queryParams
);
}).
then
(
response
=>
{
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论