Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
f3cb46cc
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1174
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f3cb46cc
编写于
2月 22, 2022
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增我录入的会员功能
上级
842ec1c8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
249 addition
and
0 deletion
+249
-0
member/src/main/resources/template/js/member/myWriteMemberList.js
...rc/main/resources/template/js/member/myWriteMemberList.js
+179
-0
member/src/main/resources/template/tpl/member/myWriteMemberList.html
...main/resources/template/tpl/member/myWriteMemberList.html
+70
-0
未找到文件。
member/src/main/resources/template/js/member/myWriteMemberList.js
0 → 100644
浏览文件 @
f3cb46cc
var
rowId
=
""
;
var
memberMation
=
{};
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
$
=
layui
.
$
,
form
=
layui
.
form
,
table
=
layui
.
table
;
authBtn
(
'
1645535320880
'
);
table
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
shopBasePath
+
'
queryMyWriteMemberList
'
,
where
:
getTableParams
(),
even
:
true
,
page
:
true
,
limits
:
getLimits
(),
limit
:
getLimit
(),
cols
:
[[
{
title
:
systemLanguage
[
"
com.skyeye.serialNumber
"
][
languageType
],
fixed
:
'
left
'
,
type
:
'
numbers
'
},
{
field
:
'
contacts
'
,
title
:
'
会员称呼
'
,
align
:
'
left
'
,
width
:
140
,
fixed
:
'
left
'
,
templet
:
function
(
d
){
return
'
<a lay-event="select" class="notice-title-click">
'
+
d
.
contacts
+
'
</a>
'
;
}},
{
field
:
'
phone
'
,
title
:
'
联系电话
'
,
align
:
'
center
'
,
width
:
100
},
{
field
:
'
email
'
,
title
:
'
电子邮箱
'
,
align
:
'
left
'
,
width
:
120
},
{
field
:
'
address
'
,
title
:
'
地址
'
,
align
:
'
left
'
,
width
:
100
},
{
field
:
'
enabled
'
,
title
:
'
状态
'
,
align
:
'
center
'
,
width
:
80
,
templet
:
function
(
d
){
return
shopUtil
.
getEnableStateName
(
d
.
enabled
);
}},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
300
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(){
matchingLanguage
();
}
});
table
.
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
var
data
=
obj
.
data
;
var
layEvent
=
obj
.
event
;
if
(
layEvent
===
'
edit
'
)
{
//编辑
editmember
(
data
);
}
else
if
(
layEvent
===
'
delete
'
)
{
//删除
deletemember
(
data
);
}
else
if
(
layEvent
===
'
enabled
'
)
{
//启用
editEnabled
(
data
);
}
else
if
(
layEvent
==
'
unenabled
'
){
//禁用
editNotEnabled
(
data
)
}
else
if
(
layEvent
==
'
select
'
){
//详情
selectMember
(
data
)
}
});
// 编辑
function
editmember
(
data
){
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/member/memberEdit.html
"
,
title
:
"
编辑会员
"
,
pageId
:
"
memberEdit
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.operationFailed
"
][
languageType
],
{
icon
:
2
,
time
:
2000
});
}
}});
}
// 删除会员
function
deletemember
(
data
){
layer
.
confirm
(
systemLanguage
[
"
com.skyeye.deleteOperationMsg
"
][
languageType
],
{
icon
:
3
,
title
:
systemLanguage
[
"
com.skyeye.deleteOperation
"
][
languageType
]},
function
(
index
){
layer
.
close
(
index
);
AjaxPostUtil
.
request
({
url
:
shopBasePath
+
"
member004
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.deleteOperationSuccessMsg
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
// 设置启用状态
function
editEnabled
(
data
){
layer
.
confirm
(
'
确认要更改该会员为启用状态吗?
'
,
{
icon
:
3
,
title
:
'
状态变更
'
},
function
(
index
)
{
AjaxPostUtil
.
request
({
url
:
shopBasePath
+
"
member006
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
method
:
"
PUT
"
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
winui
.
window
.
msg
(
"
设置成功。
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
// 设置禁用状态
function
editNotEnabled
(
data
){
layer
.
confirm
(
'
确认要更改该会员为禁用状态吗?
'
,
{
icon
:
3
,
title
:
'
状态变更
'
},
function
(
index
)
{
AjaxPostUtil
.
request
({
url
:
shopBasePath
+
"
member007
"
,
params
:
{
rowId
:
data
.
id
},
type
:
'
json
'
,
method
:
"
PUT
"
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
winui
.
window
.
msg
(
"
设置成功。
"
,
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
{
winui
.
window
.
msg
(
json
.
returnMessage
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
}
// 详情
function
selectMember
(
data
){
rowId
=
data
.
id
;
_openNewWindows
({
url
:
"
../../tpl/member/memberInfo.html
"
,
title
:
systemLanguage
[
"
com.skyeye.detailsPageTitle
"
][
languageType
],
pageId
:
"
memberinfo
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
){
}
});
}
// 添加会员
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
(){
_openNewWindows
({
url
:
"
../../tpl/member/memberAdd.html
"
,
title
:
"
新增会员
"
,
pageId
:
"
memberAdd
"
,
area
:
[
'
90vw
'
,
'
90vh
'
],
callBack
:
function
(
refreshCode
){
if
(
refreshCode
==
'
0
'
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.successfulOperation
"
][
languageType
],
{
icon
:
1
,
time
:
2000
});
loadTable
();
}
else
if
(
refreshCode
==
'
-9999
'
)
{
winui
.
window
.
msg
(
systemLanguage
[
"
com.skyeye.operationFailed
"
][
languageType
],
{
icon
:
2
,
time
:
2000
});
}
}});
});
form
.
render
();
form
.
on
(
'
submit(formSearch)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
table
.
reload
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()})
}
return
false
;
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
});
// 刷新
function
loadTable
(){
table
.
reload
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
function
getTableParams
(){
return
{
contacts
:
$
(
"
#contacts
"
).
val
(),
phone
:
$
(
"
#phone
"
).
val
(),
email
:
$
(
"
#email
"
).
val
(),
enabled
:
$
(
"
#enabled
"
).
val
()
};
}
exports
(
'
myWriteMemberList
'
,
{});
});
member/src/main/resources/template/tpl/member/myWriteMemberList.html
0 → 100644
浏览文件 @
f3cb46cc
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
class=
"txtcenter"
style=
"margin:0 auto;padding-top:10px;"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
会员称呼
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"contacts"
name=
"contacts"
placeholder=
"请输入会员称呼"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
>
手机号码
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"phone"
name=
"phone"
placeholder=
"请输入手机号码"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
>
电子邮箱
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"email"
name=
"email"
placeholder=
"请输入电子邮箱"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
><language
showName=
"com.skyeye.state"
></language></label>
<div
class=
"layui-input-inline"
>
<select
id=
"enabled"
name=
"enabled"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
启用
</option>
<option
value=
"2"
>
禁用
</option>
</select>
</div>
<button
type=
"reset"
class=
"layui-btn layui-btn-primary list-form-search"
><language
showName=
"com.skyeye.reset"
></language></button>
<button
class=
"layui-btn list-form-search"
lay-submit
lay-filter=
"formSearch"
><language
showName=
"com.skyeye.search2"
></language></button>
</div>
</div>
</form>
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn"
auth=
"1645535320880"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
d
.
enabled
==
2
&&
auth
(
'
1645535338174
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
enabled
==
2
&&
auth
(
'
1645535281417
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-danger layui-btn-xs
"
lay
-
event
=
"
delete
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
enabled
==
1
&&
auth
(
'
1645535298928
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
unenabled
"
><
language
showName
=
"
com.skyeye.disableBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
if
(
d
.
enabled
==
2
&&
auth
(
'
1645535290395
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
enabled
"
><
language
showName
=
"
com.skyeye.enableBtn
"
><
/language></
a
>
{{
#
}
}}
</script>
</div>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/member/
'
}).
use
(
'
myWriteMemberList
'
);
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录