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 4ee7bae4
authored
Aug 09, 2021
by
limin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/h5/account
into master
2 parents
90c7b867
d33e3b5b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
59 deletions
css/employee.css
css/layui.css
css/main.css
html/employee/index.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
html/role/index.html
css/employee.css
View file @
4ee7bae
...
...
@@ -60,4 +60,7 @@
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
.align-center
{
text-align
:
center
;
}
\ No newline at end of file
css/layui.css
View file @
4ee7bae
...
...
@@ -78,4 +78,19 @@
.layui-tab-brief
>
.layui-tab-more
li
.layui-this
:after
,
.layui-tab-brief
>
.layui-tab-title
.layui-this
:after
{
border-bottom
:
2px
solid
#1989FA
;
}
\ No newline at end of file
}
.layui-tab-content
xm-select
{
border-color
:
#E6E6E6
!important
;
}
.xm-label-block
{
background-color
:
#1989FA
!important
;
}
.selected
i
.xm-icon-duox
{
color
:
#1989FA
!important
;
}
.xm-option-icon
,
.xm-iconfont
,
.xm-icon-duox
{
border-color
:
#1989FA
!important
;
}
\ No newline at end of file
css/main.css
View file @
4ee7bae
...
...
@@ -16,7 +16,9 @@ header {
height
:
48px
;
flex-shrink
:
0
;
}
main
::-webkit-scrollbar
{
display
:
none
;
}
.header
{
height
:
100%
;
background
:
#fff
;
...
...
html/employee/index.html
View file @
4ee7bae
...
...
@@ -13,8 +13,8 @@
</head>
<body>
<div
id=
"app"
>
<main>
<div
class=
"bg-white"
>
<main
class=
"bg-white"
>
<div>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"employeeForm"
>
<div
class=
"layui-form-item"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
...
...
@@ -64,17 +64,19 @@
</div>
</form>
<table
id=
"employeeTable"
lay-filter=
"employeeTool"
></table>
<div
id=
"employeePage"
class=
"align-center"
></div>
</div>
</main>
</div>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
],
function
()
{
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
,
'laypage'
],
function
()
{
var
request
=
layui
.
request
var
table
=
layui
.
table
var
form
=
layui
.
form
var
helper
=
layui
.
helper
var
laypage
=
layui
.
laypage
var
$
=
layui
.
$
// 商户名称列表
var
merchantName
=
$
(
"#merchantName"
)
...
...
@@ -84,7 +86,6 @@
//创建table实例
var
employeeTable
=
table
.
render
({
elem
:
'#employeeTable'
,
page
:
true
,
cols
:
[
[
//表头
...
...
@@ -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
)
// 获取table列表接口
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
var
pageNum
=
isResetPageNum
?
1
:
employeeTable
.
config
.
index
var
pageSize
=
employeeTable
.
config
.
limit
search
=
search
||
{}
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
pageNum
,
pageSize
:
pageSize
,
pageNum
:
page
.
page
Num
,
pageSize
:
page
.
page
Size
,
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
},
search
)
request
(
params
,
...
...
@@ -123,12 +143,12 @@
var
options
=
{
data
:
data
.
data
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
options
.
page
=
{
curr
:
1
}
pageOptions
.
curr
=
1
}
table
.
reload
(
options
)
laypage
.
render
(
pageOptions
)
employeeTable
.
reload
(
options
)
}
)
}
...
...
@@ -187,7 +207,7 @@
// 查询事件
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
getTabelList
(
employeeTable
,
searchData
)
getTabelList
(
employeeTable
,
searchData
,
true
)
})
// 新增点击事件
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
...
...
html/merchant/detail.html
View file @
4ee7bae
This diff is collapsed.
Click to expand it.
html/merchant/edit.html
View file @
4ee7bae
...
...
@@ -523,9 +523,9 @@
}
else
{
merchantId
=
res
.
data
merchantForm
.
merchantAccountLevel
=
parseInt
(
merchantForm
.
merchantAccountLevel
)
getMerchantApi
(
merchantId
,
function
(
res
)
{
form
.
val
(
'merchantForm'
,
res
.
data
)
merchantForm
=
res
.
data
getMerchantApi
(
merchantId
,
function
(
res
pone
)
{
form
.
val
(
'merchantForm'
,
res
pone
.
data
)
merchantForm
=
res
pone
.
data
baseIsShow
(
false
)
treeIsShow
(
true
)
getById
()
...
...
@@ -621,7 +621,6 @@
parent
.
append
(
subParent
)
},
handleFirstCancel
()
{
console
.
log
(
'??????????'
)
go
(
'merchant'
,
'index'
)
return
false
},
...
...
html/merchant/index.html
View file @
4ee7bae
...
...
@@ -20,14 +20,14 @@
}
.merchant
.layui-table-cell
{
/*
height: auto;
height
:
auto
;
overflow
:
visible
;
text-overflow
:
inherit
;
white-space: normal;
*/
height
:
auto
;
white-space
:
normal
;
/*
height: auto;
overflow: hidden;
text-overflow: ellipsis;
white-space
:
nowrap
;
white-space: nowrap;
*/
}
.merchant
#searchForm
.layui-inline
{
...
...
@@ -43,7 +43,7 @@
<body>
<div
class=
"merchant"
id=
"app"
>
<main>
<main
class=
"bg-white"
>
<!-- <div id="tree"></div> -->
<div
class=
"context-block"
>
<div
class=
"search-block"
>
...
...
@@ -106,7 +106,7 @@
</form>
</div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
></div>
<div
id=
"merchantPage"
class=
"align-center"
></div>
</div>
</main>
</div>
...
...
@@ -114,22 +114,28 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
type=
"text/html"
id=
"merchantBtns"
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleDetail"
>
查看
<
/a
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleEdit"
>
修改基本信息
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAuthority"
>
修改权限
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createStaff
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddStaff"
>
创建员工
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
<
div
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleDetail"
>
查看
<
/a
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleEdit"
>
修改基本信息
<
/a
>
{{
#
}
}}
<
/div
>
<
div
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAuthority"
>
修改权限
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
<
/div
>
<
div
>
{{
#
if
((
d
.
btn
.
createStaff
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddStaff"
>
创建员工
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
{{
#
}
}}
<
/div
>
</script>
<script>
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'table'
,
'laypage'
,
'layer'
],
function
()
{
...
...
@@ -154,11 +160,10 @@
pageNum
:
1
,
pageSize
:
10
}
var
pageOptions
=
{
elem
:
'merchantPage'
,
groups
:
5
,
layout
:
[
'
limit'
,
'
count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
...
...
@@ -231,11 +236,11 @@
title
:
'更新时间'
,
align
:
'center'
},
{
align
:
'
center
'
,
align
:
'
left
'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
width
:
485
//
fixed: 'right'
width
:
220
,
fixed
:
'right'
}]
]
})
...
...
@@ -423,7 +428,7 @@
}
})
var
options
=
{
data
:
data
.
data
data
:
data
.
data
,
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
...
...
html/role/index.html
View file @
4ee7bae
...
...
@@ -12,8 +12,8 @@
</head>
<body>
<div
id=
"app"
>
<main>
<div
class=
"bg-white"
>
<main
class=
"bg-white"
>
<div>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"layui-form-item"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
...
...
@@ -39,17 +39,19 @@
</div>
</form>
<table
id=
"roleTable"
lay-filter=
"roleTool"
></table>
<div
id=
"rolePage"
class=
"align-center"
></div>
</div>
</main>
</div>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'table'
,
'form'
,
'request'
,
'helper'
],
function
()
{
layui
.
use
([
'table'
,
'form'
,
'request'
,
'helper'
,
'laypage'
],
function
()
{
var
request
=
layui
.
request
var
table
=
layui
.
table
var
form
=
layui
.
form
var
helper
=
layui
.
helper
var
laypage
=
layui
.
laypage
var
$
=
layui
.
$
// 商户名称列表
var
merchantName
=
$
(
"#merchantName"
)
...
...
@@ -57,7 +59,6 @@
//创建table实例
var
roleTable
=
table
.
render
({
elem
:
'#roleTable'
,
page
:
true
,
cols
:
[
[
//表头
...
...
@@ -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
)
// 获取table列表接口
function
getTabelList
(
table
,
search
=
{},
isResetPageNum
=
false
)
{
function
getTabelList
(
table
,
search
=
{},
isResetPageNum
)
{
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
table
.
config
.
index
,
pageSize
:
table
.
config
.
limit
,
pageNum
:
page
.
pageNum
,
pageSize
:
page
.
pageSize
,
method
:
'org.ore.api.role.page'
},
search
)
request
(
params
,
...
...
@@ -86,12 +112,12 @@
var
options
=
{
data
:
data
.
data
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
options
.
page
=
{
curr
:
1
}
pageOptions
.
curr
=
1
}
table
.
reload
(
options
)
laypage
.
render
(
pageOptions
)
roleTable
.
reload
(
options
)
}
)
}
...
...
@@ -151,7 +177,7 @@
$
(
document
).
on
(
'click'
,
'#roleSearch'
,
function
()
{
var
searchData
=
form
.
val
(
'roleForm'
)
console
.
log
(
searchData
)
getTabelList
(
roleTable
,
searchData
)
getTabelList
(
roleTable
,
searchData
,
true
)
})
})
</script>
...
...
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