Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ff6edd56
authored
Aug 09, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
登入名字,查看样式
2 parents
3a0b33d0
b26940de
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
42 deletions
css/employee.css
html/components/header.html
html/employee/index.html
html/merchant/edit.html
html/merchant/index.html
html/role/index.html
js/load.js
css/employee.css
View file @
ff6edd5
...
@@ -61,3 +61,6 @@
...
@@ -61,3 +61,6 @@
top
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
}
}
.align-center
{
text-align
:
center
;
}
\ No newline at end of file
\ No newline at end of file
html/components/header.html
View file @
ff6edd5
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<script>
<script>
layui
.
use
([
'element'
,
'request'
,
'helper'
],
function
()
{
layui
.
use
([
'element'
,
'request'
,
'helper'
],
function
()
{
var
element
=
layui
.
element
var
element
=
layui
.
element
var
user
=
helper
.
store
.
get
(
'user'
)
element
.
init
()
element
.
init
()
highlight
()
highlight
()
bindEvents
()
bindEvents
()
...
...
html/employee/index.html
View file @
ff6edd5
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main>
<main
class=
"bg-white"
>
<div
class=
"bg-white"
>
<div>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"employeeForm"
>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"employeeForm"
>
<div
class=
"layui-form-item"
pane
>
<div
class=
"layui-form-item"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
...
@@ -64,17 +64,19 @@
...
@@ -64,17 +64,19 @@
</div>
</div>
</form>
</form>
<table
id=
"employeeTable"
lay-filter=
"employeeTool"
></table>
<table
id=
"employeeTable"
lay-filter=
"employeeTool"
></table>
<div
id=
"employeePage"
class=
"align-center"
></div>
</div>
</div>
</main>
</main>
</div>
</div>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
<script>
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
],
function
()
{
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
,
'laypage'
],
function
()
{
var
request
=
layui
.
request
var
request
=
layui
.
request
var
table
=
layui
.
table
var
table
=
layui
.
table
var
form
=
layui
.
form
var
form
=
layui
.
form
var
helper
=
layui
.
helper
var
helper
=
layui
.
helper
var
laypage
=
layui
.
laypage
var
$
=
layui
.
$
var
$
=
layui
.
$
// 商户名称列表
// 商户名称列表
var
merchantName
=
$
(
"#merchantName"
)
var
merchantName
=
$
(
"#merchantName"
)
...
@@ -84,7 +86,6 @@
...
@@ -84,7 +86,6 @@
//创建table实例
//创建table实例
var
employeeTable
=
table
.
render
({
var
employeeTable
=
table
.
render
({
elem
:
'#employeeTable'
,
elem
:
'#employeeTable'
,
page
:
true
,
cols
:
[
cols
:
[
[
[
//表头
//表头
...
@@ -102,15 +103,34 @@
...
@@ -102,15 +103,34 @@
]
]
]
]
})
})
// 分页配置
var
page
=
{
pageNum
:
1
,
pageSize
:
10
}
var
pageOptions
=
{
elem
:
'employeePage'
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
limit
);
//得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
//首次不执行
if
(
!
first
)
{
getTabelList
(
employeeTable
)
}
}
}
getTabelList
(
employeeTable
)
getTabelList
(
employeeTable
)
// 获取table列表接口
// 获取table列表接口
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
var
pageNum
=
isResetPageNum
?
1
:
employeeTable
.
config
.
index
var
pageSize
=
employeeTable
.
config
.
limit
search
=
search
||
{}
search
=
search
||
{}
var
params
=
helper
.
clone
(
false
,
{
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
pageNum
,
pageNum
:
page
.
page
Num
,
pageSize
:
pageSize
,
pageSize
:
page
.
page
Size
,
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
},
search
)
},
search
)
request
(
params
,
request
(
params
,
...
@@ -123,12 +143,12 @@
...
@@ -123,12 +143,12 @@
var
options
=
{
var
options
=
{
data
:
data
.
data
data
:
data
.
data
}
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
if
(
isResetPageNum
)
{
options
.
page
=
{
pageOptions
.
curr
=
1
curr
:
1
}
}
}
table
.
reload
(
options
)
laypage
.
render
(
pageOptions
)
employeeTable
.
reload
(
options
)
}
}
)
)
}
}
...
@@ -187,7 +207,7 @@
...
@@ -187,7 +207,7 @@
// 查询事件
// 查询事件
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
var
searchData
=
getSearch
()
getTabelList
(
employeeTable
,
searchData
)
getTabelList
(
employeeTable
,
searchData
,
true
)
})
})
// 新增点击事件
// 新增点击事件
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
...
...
html/merchant/edit.html
View file @
ff6edd5
...
@@ -523,9 +523,9 @@
...
@@ -523,9 +523,9 @@
}
else
{
}
else
{
merchantId
=
res
.
data
merchantId
=
res
.
data
merchantForm
.
merchantAccountLevel
=
parseInt
(
merchantForm
.
merchantAccountLevel
)
merchantForm
.
merchantAccountLevel
=
parseInt
(
merchantForm
.
merchantAccountLevel
)
getMerchantApi
(
merchantId
,
function
(
res
)
{
getMerchantApi
(
merchantId
,
function
(
res
pone
)
{
form
.
val
(
'merchantForm'
,
res
.
data
)
form
.
val
(
'merchantForm'
,
res
pone
.
data
)
merchantForm
=
res
.
data
merchantForm
=
res
pone
.
data
baseIsShow
(
false
)
baseIsShow
(
false
)
treeIsShow
(
true
)
treeIsShow
(
true
)
getById
()
getById
()
...
@@ -621,7 +621,8 @@
...
@@ -621,7 +621,8 @@
parent
.
append
(
subParent
)
parent
.
append
(
subParent
)
},
},
handleFirstCancel
()
{
handleFirstCancel
()
{
go
(
'merchant'
,
'index'
)
// go(-1)
window
.
history
.
back
()
return
false
return
false
},
},
handleCancel
()
{
handleCancel
()
{
...
@@ -841,6 +842,7 @@
...
@@ -841,6 +842,7 @@
treeObj
=
tree
.
create
(
'carBrandTree'
,
res
.
data
,
{
treeObj
=
tree
.
create
(
'carBrandTree'
,
res
.
data
,
{
checkedList
:
checkedList
checkedList
:
checkedList
})
})
all_nodes
=
treeObj
.
getNodes
()
bindEvent
()
bindEvent
()
})
})
}
}
...
...
html/merchant/index.html
View file @
ff6edd5
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<body>
<body>
<div
class=
"merchant"
id=
"app"
>
<div
class=
"merchant"
id=
"app"
>
<main>
<main
class=
"bg-white"
>
<!-- <div id="tree"></div> -->
<!-- <div id="tree"></div> -->
<div
class=
"context-block"
>
<div
class=
"context-block"
>
<div
class=
"search-block"
>
<div
class=
"search-block"
>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
</form>
</form>
</div>
</div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
></div>
<div
id=
"merchantPage"
class=
"align-center"
></div>
</div>
</div>
</main>
</main>
</div>
</div>
...
@@ -114,22 +114,28 @@
...
@@ -114,22 +114,28 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
type=
"text/html"
id=
"merchantBtns"
>
<script
type=
"text/html"
id=
"merchantBtns"
>
<
div
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleDetail"
>
查看
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleDetail"
>
查看
<
/a
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleEdit"
>
修改基本信息
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleEdit"
>
修改基本信息
<
/a
>
{{
#
}
}}
{{
#
}
}}
<
/div
>
<
div
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAuthority"
>
修改权限
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAuthority"
>
修改权限
<
/a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
{{
#
}
}}
<
/div
>
<
div
>
{{
#
if
((
d
.
btn
.
createStaff
)){
}}
{{
#
if
((
d
.
btn
.
createStaff
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddStaff"
>
创建员工
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddStaff"
>
创建员工
<
/a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
{{
#
}
}}
{{
#
}
}}
<
/div
>
</script>
</script>
<script>
<script>
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'table'
,
'laypage'
,
'layer'
],
function
()
{
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'table'
,
'laypage'
,
'layer'
],
function
()
{
...
@@ -154,11 +160,10 @@
...
@@ -154,11 +160,10 @@
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
pageSize
:
10
}
}
var
pageOptions
=
{
var
pageOptions
=
{
elem
:
'merchantPage'
,
elem
:
'merchantPage'
,
groups
:
5
,
groups
:
5
,
layout
:
[
'
limit'
,
'
count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
...
@@ -423,7 +428,7 @@
...
@@ -423,7 +428,7 @@
}
}
})
})
var
options
=
{
var
options
=
{
data
:
data
.
data
data
:
data
.
data
,
}
}
pageOptions
.
count
=
data
.
count
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
if
(
isResetPageNum
)
{
...
@@ -492,8 +497,7 @@
...
@@ -492,8 +497,7 @@
function
init
()
{
function
init
()
{
// 运营系统
// 运营系统
// if (!isDxternal) {
if
(
!
isDxternal
)
{
if
(
isDxternal
)
{
getChannel
()
getChannel
()
getAccountLevel
()
getAccountLevel
()
getAccountType
()
getAccountType
()
...
...
html/role/index.html
View file @
ff6edd5
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main>
<main
class=
"bg-white"
>
<div
class=
"bg-white"
>
<div>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"layui-form-item"
pane
>
<div
class=
"layui-form-item"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
...
@@ -39,17 +39,19 @@
...
@@ -39,17 +39,19 @@
</div>
</div>
</form>
</form>
<table
id=
"roleTable"
lay-filter=
"roleTool"
></table>
<table
id=
"roleTable"
lay-filter=
"roleTool"
></table>
<div
id=
"rolePage"
class=
"align-center"
></div>
</div>
</div>
</main>
</main>
</div>
</div>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
<script>
layui
.
use
([
'table'
,
'form'
,
'request'
,
'helper'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'request'
,
'helper'
,
'laypage'
],
function
()
{
var
request
=
layui
.
request
var
request
=
layui
.
request
var
table
=
layui
.
table
var
table
=
layui
.
table
var
form
=
layui
.
form
var
form
=
layui
.
form
var
helper
=
layui
.
helper
var
helper
=
layui
.
helper
var
laypage
=
layui
.
laypage
var
$
=
layui
.
$
var
$
=
layui
.
$
// 商户名称列表
// 商户名称列表
var
merchantName
=
$
(
"#merchantName"
)
var
merchantName
=
$
(
"#merchantName"
)
...
@@ -57,7 +59,6 @@
...
@@ -57,7 +59,6 @@
//创建table实例
//创建table实例
var
roleTable
=
table
.
render
({
var
roleTable
=
table
.
render
({
elem
:
'#roleTable'
,
elem
:
'#roleTable'
,
page
:
true
,
cols
:
[
cols
:
[
[
[
//表头
//表头
...
@@ -71,12 +72,37 @@
...
@@ -71,12 +72,37 @@
]
]
]
]
})
})
// 分页配置
var
page
=
{
pageNum
:
1
,
pageSize
:
10
}
var
pageOptions
=
{
elem
:
'rolePage'
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
limit
);
//得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
// getTabelList()
//首次不执行
if
(
!
first
)
{
//do something
getTabelList
()
}
}
}
getTabelList
(
roleTable
)
getTabelList
(
roleTable
)
// 获取table列表接口
// 获取table列表接口
function
getTabelList
(
table
,
search
=
{},
isResetPageNum
=
false
)
{
function
getTabelList
(
table
,
search
=
{},
isResetPageNum
)
{
var
params
=
helper
.
clone
(
false
,
{
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
table
.
config
.
index
,
pageNum
:
page
.
pageNum
,
pageSize
:
table
.
config
.
limit
,
pageSize
:
page
.
pageSize
,
method
:
'org.ore.api.role.page'
method
:
'org.ore.api.role.page'
},
search
)
},
search
)
request
(
params
,
request
(
params
,
...
@@ -86,12 +112,12 @@
...
@@ -86,12 +112,12 @@
var
options
=
{
var
options
=
{
data
:
data
.
data
data
:
data
.
data
}
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
if
(
isResetPageNum
)
{
options
.
page
=
{
pageOptions
.
curr
=
1
curr
:
1
}
}
}
table
.
reload
(
options
)
laypage
.
render
(
pageOptions
)
roleTable
.
reload
(
options
)
}
}
)
)
}
}
...
@@ -151,7 +177,7 @@
...
@@ -151,7 +177,7 @@
$
(
document
).
on
(
'click'
,
'#roleSearch'
,
function
()
{
$
(
document
).
on
(
'click'
,
'#roleSearch'
,
function
()
{
var
searchData
=
form
.
val
(
'roleForm'
)
var
searchData
=
form
.
val
(
'roleForm'
)
console
.
log
(
searchData
)
console
.
log
(
searchData
)
getTabelList
(
roleTable
,
searchData
)
getTabelList
(
roleTable
,
searchData
,
true
)
})
})
})
})
</script>
</script>
...
...
js/load.js
View file @
ff6edd5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @Date: 2021-07-15 15:46:53
* @LastEditors: limin
* @LastEditors: limin
* @LastEditTime: 2021-08-09 1
8:08:19
* @LastEditTime: 2021-08-09 1
9:15:04
* @FilePath: \account\js\load.js
* @FilePath: \account\js\load.js
*/
*/
;(
function
load
()
{
;(
function
load
()
{
...
@@ -35,7 +35,8 @@ function loadHeaderFooter() {
...
@@ -35,7 +35,8 @@ function loadHeaderFooter() {
if
(
isExternal
){
//运营平台外部系统
if
(
isExternal
){
//运营平台外部系统
append
()
append
()
}
else
{
//嵌入运营平台
}
else
{
//嵌入运营平台
if
(
isLoginPage
()){
var
token
=
store
.
get
(
'token'
)
if
(
token
||
isLoginPage
()){
return
return
}
}
var
t
=
qs
(
't'
)
var
t
=
qs
(
't'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment