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 8d628282
authored
Aug 11, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
UI提出需要改动的样式
1 parent
8d6dd5fb
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
177 additions
and
59 deletions
css/employee.css
css/layui.css
css/main.css
css/merchant.css
html/employee/index.html
html/merchant/detail.html
html/merchant/index.html
html/role/index.html
js/helper.js
css/employee.css
View file @
8d62828
.bg-white
{
.bg-white
{
background-color
:
#fff
;
/* background-color: #F7F7F7; */
margin
:
20px
;
/* margin: 20px; */
}
}
.content-title
{
.content-title
{
...
...
css/layui.css
View file @
8d62828
...
@@ -6,7 +6,15 @@
...
@@ -6,7 +6,15 @@
.layui-textarea
:focus
{
.layui-textarea
:focus
{
border-color
:
#1989FA
!important
;
border-color
:
#1989FA
!important
;
}
}
.layui-input
{
border-radius
:
4px
;
}
.layui-form-pane
.layui-input-inline
{
margin-left
:
-4px
;
}
.layui-form-pane
.layui-form-item
[
pane
]
{
border-style
:
none
;
}
.layui-form-label.required
::before
{
.layui-form-label.required
::before
{
content
:
'*'
;
content
:
'*'
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -16,6 +24,7 @@
...
@@ -16,6 +24,7 @@
.layui-laypage-btn
,
.layui-btn
{
.layui-laypage-btn
,
.layui-btn
{
background-color
:
#1989FA
!important
;
background-color
:
#1989FA
!important
;
border-radius
:
4px
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
...
@@ -96,15 +105,33 @@
...
@@ -96,15 +105,33 @@
border-color
:
#1989FA
!important
;
border-color
:
#1989FA
!important
;
}
}
/* 分页器的修改 */
/* 分页器的修改 */
.layui-laypage
button
{
border-radius
:
4px
;
}
.layui-laypage
.layui-laypage-skip
input
:focus
{
.layui-laypage
.layui-laypage-skip
input
:focus
{
border-color
:
#1989FA
!important
;
border-color
:
#1989FA
!important
;
}
}
.layui-laypage
a
,
.layui-laypage
span
,
.layui-laypage
.layui-laypage-skip
{
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#666666
;
}
/* 表格行内容高度自适应 */
/* 表格行内容高度自适应 */
.layui-table-cell
{
.layui-table-cell
{
height
:
auto
;
height
:
auto
;
overflow
:
visible
;
overflow
:
visible
;
text-overflow
:
inherit
;
text-overflow
:
inherit
;
white-space
:
normal
;
white-space
:
normal
;
/* 高度最多四行,超出省略号结尾 */
/* display: -webkit-box;
-webkit-box-orient: vertical;
line-clamp: 4;
overflow: hidden;
word-break: break-all; */
}
}
.layui-table-cell
li
{
.layui-table-cell
li
{
list-style
:
disc
;
list-style
:
disc
;
...
...
css/main.css
View file @
8d62828
...
@@ -10,6 +10,7 @@ html, body {
...
@@ -10,6 +10,7 @@ html, body {
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
height
:
100%
;
background-color
:
#f7f7f7
;
}
}
header
{
header
{
...
@@ -25,7 +26,7 @@ main::-webkit-scrollbar {
...
@@ -25,7 +26,7 @@ main::-webkit-scrollbar {
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.1
);
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
0
38
px
;
padding
:
0
20
px
;
}
}
.header-nav
{
.header-nav
{
...
@@ -93,9 +94,20 @@ main {
...
@@ -93,9 +94,20 @@ main {
flex
:
1
;
flex
:
1
;
min-height
:
calc
(
100%
-
60px
-
30px
);
min-height
:
calc
(
100%
-
60px
-
30px
);
overflow
:
auto
;
overflow
:
auto
;
background-color
:
#f8f8f8
;
background-color
:
#F7F7F7
;
}
.search-block
{
padding
:
8px
20px
;
background-color
:
#ffffff
;
}
main
.table-page
{
background-color
:
#ffffff
;
margin
:
15px
20px
;
padding
:
5px
;
}
main
.table-page
tr
th
:last-child
.layui-table-cell
{
text-align
:
center
;
}
}
footer
{
footer
{
height
:
30px
;
height
:
30px
;
flex-shrink
:
0
;
flex-shrink
:
0
;
...
...
css/merchant.css
View file @
8d62828
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
}
}
.merchant-left
{
.merchant-left
{
width
:
500px
;
width
:
500px
;
box-sizing
:
border-box
;
padding-left
:
20px
;
}
}
.merchant-right
{
.merchant-right
{
flex
:
1
;
flex
:
1
;
...
...
html/employee/index.html
View file @
8d62828
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"zh"
>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
@@ -10,18 +11,31 @@
...
@@ -10,18 +11,31 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<title>
员工管理
</title>
<title>
员工管理
</title>
</head>
</head>
<body>
<style>
.merchantNames
{
margin-left
:
20px
;
}
.creater
,
.status
{
margin-right
:
20px
;
}
.selector
{
width
:
110px
;
}
</style>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<main
class=
"bg-white"
>
<div>
<div>
<div
class=
"search-block"
>
<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"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建员工
创建员工
</button>
</button>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline
merchantNames
"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
...
@@ -29,14 +43,15 @@
...
@@ -29,14 +43,15 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline
creater
"
>
<label
class=
"layui-form-label"
>
创建者
</label>
<label
class=
"layui-form-label"
>
创建者
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"createdName"
required
lay-verify=
"required"
placeholder=
"请输入创建者"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"createdName"
required
lay-verify=
"required"
placeholder=
"请输入创建者"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline
status
"
pane
>
<label
class=
"layui-form-label"
>
状态
</label>
<label
class=
"layui-form-label
"
>
状态
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<select
name=
"status"
id=
"status"
lay-verify=
"required"
>
<select
name=
"status"
id=
"status"
lay-verify=
"required"
>
<!-- <option value="">全部</option>
<!-- <option value="">全部</option>
...
@@ -47,7 +62,7 @@
...
@@ -47,7 +62,7 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline
selector
"
>
<select
name=
"type"
lay-verify=
"required"
>
<select
name=
"type"
lay-verify=
"required"
>
<option
value=
""
></option>
<option
value=
""
></option>
<option
value=
"0"
>
员工姓名
</option>
<option
value=
"0"
>
员工姓名
</option>
...
@@ -55,23 +70,27 @@
...
@@ -55,23 +70,27 @@
</select>
</select>
</div>
</div>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"keywords"
required
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"keywords"
required
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline"
style=
"float: rihg;"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"employeeSearch"
>
查询
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"employeeSearch"
>
查询
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"employeeExport"
>
导出
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"employeeExport"
>
导出
</button>
</div>
</div>
</form>
</form>
<table
id=
"employeeTable"
lay-filter=
"employeeTool"
></table>
</div>
<div
class=
"table-page"
>
<table
id=
"employeeTable"
lay-filter=
"employeeTool"
></table>
<div
id=
"employeePage"
class=
"align-center"
></div>
<div
id=
"employeePage"
class=
"align-center"
></div>
</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'
,
'laypage'
],
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
...
@@ -86,7 +105,7 @@
...
@@ -86,7 +105,7 @@
//创建table实例
//创建table实例
var
employeeTable
=
table
.
render
({
var
employeeTable
=
table
.
render
({
elem
:
'#employeeTable'
,
elem
:
'#employeeTable'
,
skin
:
'line'
,
skin
:
'line'
,
cols
:
[
cols
:
[
[
[
//表头
//表头
...
@@ -99,8 +118,8 @@
...
@@ -99,8 +118,8 @@
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
16
0
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
12
0
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
276
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
220
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
]
]
]
]
})
})
...
@@ -135,7 +154,7 @@
...
@@ -135,7 +154,7 @@
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
},
search
)
},
search
)
request
(
params
,
request
(
params
,
function
(
res
)
{
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
// table.reload('testReload', {
// table.reload('testReload', {
// data: res.data.data
// data: res.data.data
...
@@ -154,16 +173,16 @@
...
@@ -154,16 +173,16 @@
)
)
}
}
// table工具条事件
// table工具条事件
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
var
data
=
obj
.
data
var
data
=
obj
.
data
var
layEvent
=
obj
.
event
var
layEvent
=
obj
.
event
var
tr
=
obj
.
tr
var
tr
=
obj
.
tr
if
(
layEvent
===
'detail'
)
{
if
(
layEvent
===
'detail'
)
{
go
(
'employee'
,
'detail'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
go
(
'employee'
,
'detail'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
}
else
if
(
layEvent
===
'edit'
)
{
}
else
if
(
layEvent
===
'edit'
)
{
go
(
'employee'
,
'add'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
go
(
'employee'
,
'add'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
}
else
if
(
layEvent
===
'del'
)
{
}
else
if
(
layEvent
===
'del'
)
{
layer
.
confirm
(
'真的删除行么'
,
function
(
index
)
{
layer
.
confirm
(
'真的删除行么'
,
function
(
index
)
{
// obj.del() //删除对应行(tr)的DOM结构,并更新缓存
// obj.del() //删除对应行(tr)的DOM结构,并更新缓存
var
params
=
{
var
params
=
{
method
:
'cn.com.glsx.merchants.staff.deleteStaff'
,
method
:
'cn.com.glsx.merchants.staff.deleteStaff'
,
...
@@ -206,25 +225,25 @@
...
@@ -206,25 +225,25 @@
}
}
})
})
// 查询事件
// 查询事件
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
var
searchData
=
getSearch
()
getTabelList
(
employeeTable
,
searchData
,
true
)
getTabelList
(
employeeTable
,
searchData
,
true
)
})
})
// 新增点击事件
// 新增点击事件
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
var
value
=
merchantName
.
val
()
var
value
=
merchantName
.
val
()
if
(
value
)
{
if
(
value
)
{
go
(
'employee'
,
'add'
,
{
merchantId
:
value
})
go
(
'employee'
,
'add'
,
{
merchantId
:
value
})
}
else
{
}
else
{
layer
.
msg
(
'请选择商户'
)
layer
.
msg
(
'请选择商户'
)
}
}
})
})
// 导出
// 导出
$
(
'#employeeExport'
).
on
(
'click'
,
function
()
{
$
(
'#employeeExport'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
var
searchData
=
getSearch
()
var
params
=
helper
.
clone
(
false
,
{
method
:
'cn.com.glsx.merchants.staff.exportData'
},
searchData
)
var
params
=
helper
.
clone
(
false
,
{
method
:
'cn.com.glsx.merchants.staff.exportData'
},
searchData
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
window
.
open
(
res
.
data
)
window
.
open
(
res
.
data
)
}
}
})
})
...
@@ -268,7 +287,7 @@
...
@@ -268,7 +287,7 @@
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
dictType
:
'staff_status'
dictType
:
'staff_status'
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
var
list
=
res
.
data
var
list
=
res
.
data
list
.
unshift
(
''
)
list
.
unshift
(
''
)
...
@@ -291,5 +310,6 @@
...
@@ -291,5 +310,6 @@
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"updateTime"
>
修改账户有效期
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"updateTime"
>
修改账户有效期
<
/a
>
<
/div
>
<
/div
>
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/merchant/detail.html
View file @
8d62828
...
@@ -20,12 +20,17 @@
...
@@ -20,12 +20,17 @@
}
}
.merchant-content
#secondmerchantName
{
.merchant-content
#secondmerchantName
{
margin-left
:
15px
;
margin-left
:
15px
;
width
:
250px
;
height
:
24px
;
height
:
24px
;
font-size
:
16px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
line-height
:
24px
;
line-height
:
24px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
}
.merchant-content
>
div
:not
(
:first-child
)
{
.merchant-content
>
div
:not
(
:first-child
)
{
...
@@ -48,12 +53,18 @@
...
@@ -48,12 +53,18 @@
line-height
:
40px
;
line-height
:
40px
;
}
}
.merchant-right
.companyName
{
.merchant-right
.companyName
{
display
:
inline-block
;
width
:
300px
;
height
:
36px
;
height
:
36px
;
font-size
:
16px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
line-height
:
36px
;
line-height
:
36px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
}
.merchant-right
.layui-btn
{
.merchant-right
.layui-btn
{
position
:
absolute
;
position
:
absolute
;
...
@@ -168,7 +179,7 @@
...
@@ -168,7 +179,7 @@
<div
class=
"merchant-headerMsg"
>
<div
class=
"merchant-headerMsg"
>
<div
class=
"merchantImg"
><img
src=
"../../css/img/merchantImg.png"
alt=
""
></div>
<div
class=
"merchantImg"
><img
src=
"../../css/img/merchantImg.png"
alt=
""
></div>
<div
class=
"merchant-content"
>
<div
class=
"merchant-content"
>
<div
id=
"secondmerchantName"
></div>
<div
id=
"secondmerchantName"
></div>
<div>
商户号:
<span
id=
"secondmerchantId"
></span></div>
<div>
商户号:
<span
id=
"secondmerchantId"
></span></div>
<div>
您共有
<span
id=
"numberOfSubMerchants"
></span>
个子商户,共有
<span
id=
"numberOfStores"
></span>
家门店
</div>
<div>
您共有
<span
id=
"numberOfSubMerchants"
></span>
个子商户,共有
<span
id=
"numberOfStores"
></span>
家门店
</div>
</div>
</div>
...
@@ -393,10 +404,12 @@
...
@@ -393,10 +404,12 @@
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
)
var
data
=
res
.
data
var
data
=
res
.
data
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
$
(
'#secondmerchantName'
).
attr
(
'title'
,
data
.
merchantName
);
$
(
'#secondmerchantId'
).
text
(
data
.
merchantNo
)
$
(
'#secondmerchantId'
).
text
(
data
.
merchantNo
)
$
(
'#numberOfSubMerchants'
).
text
(
data
.
numberOfSubMerchants
)
$
(
'#numberOfSubMerchants'
).
text
(
data
.
numberOfSubMerchants
)
$
(
'#numberOfStores'
).
text
(
data
.
numberOfStores
)
$
(
'#numberOfStores'
).
text
(
data
.
numberOfStores
)
$
(
'#merchantNameTable'
).
text
(
data
.
merchantName
)
$
(
'#merchantNameTable'
).
text
(
data
.
merchantName
)
$
(
'#merchantNameTable'
).
attr
(
'title'
,
data
.
merchantName
+
'员工列表'
);
})
})
}
}
...
...
html/merchant/index.html
View file @
8d62828
...
@@ -10,13 +10,13 @@
...
@@ -10,13 +10,13 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<style>
<style>
.search-block
{
padding
:
8px
20px
;
background-color
:
#ffffff
;
}
/*
.merchant .layui-table-view {
.merchant .layui-table-view {
margin
:
10px
20px
;
margin: -5px 20px;
} */
.merchant
.layui-table
{
margin
:
0
;
}
}
/* .merchant .layui-table-cell {
/* .merchant .layui-table-cell {
...
@@ -38,6 +38,10 @@
...
@@ -38,6 +38,10 @@
.layui-btn-xs
{
.layui-btn-xs
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.channel
,
.accountLevel
,
.accountType
,
.customerStatus
{
margin-left
:
20px
;
}
</style>
</style>
<title>
商户管理
</title>
<title>
商户管理
</title>
</head>
</head>
...
@@ -48,11 +52,11 @@
...
@@ -48,11 +52,11 @@
<!-- <div id="tree"></div> -->
<!-- <div id="tree"></div> -->
<div
class=
"context-block"
>
<div
class=
"context-block"
>
<div
class=
"search-block"
>
<div
class=
"search-block"
>
<form
class=
"layui-form"
lay-filter=
"searchFilter"
id=
"searchForm"
>
<form
class=
"layui-form
layui-form-pane
"
lay-filter=
"searchFilter"
id=
"searchForm"
>
<div
class=
"layui-inline"
id=
"operateEl"
>
<div
class=
"layui-inline"
id=
"operateEl"
>
<button
class=
"layui-btn"
id=
"addBtn"
>
<button
class=
"layui-btn"
id=
"addBtn"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建商户
</button>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建商户
</button>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
channel"
pane
>
<label
class=
"layui-form-label"
>
渠道:
</label>
<label
class=
"layui-form-label"
>
渠道:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<select
name=
"channelId"
id=
"channelIdEl"
>
<select
name=
"channelId"
id=
"channelIdEl"
>
...
@@ -60,7 +64,7 @@
...
@@ -60,7 +64,7 @@
</select>
</select>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountLevel"
pane
>
<label
class=
"layui-form-label"
>
账户等级:
</label>
<label
class=
"layui-form-label"
>
账户等级:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<select
name=
"merchantAccountLevel"
id=
"accountLevelEl"
>
<select
name=
"merchantAccountLevel"
id=
"accountLevelEl"
>
...
@@ -68,7 +72,7 @@
...
@@ -68,7 +72,7 @@
</select>
</select>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountType"
pane
>
<label
class=
"layui-form-label"
>
账户类型:
</label>
<label
class=
"layui-form-label"
>
账户类型:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<select
name=
"accounttypeId"
id=
"accountTypeIdEl"
>
<select
name=
"accounttypeId"
id=
"accountTypeIdEl"
>
...
@@ -77,7 +81,7 @@
...
@@ -77,7 +81,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
loginName"
pane
>
<div
class=
"layui-input-inline"
style=
"width: 120px;"
>
<div
class=
"layui-input-inline"
style=
"width: 120px;"
>
<select
name=
"name"
lay-filter=
"nameFilter"
>
<select
name=
"name"
lay-filter=
"nameFilter"
>
<option
value=
"0"
>
账号登陆名
</option>
<option
value=
"0"
>
账号登陆名
</option>
...
@@ -88,7 +92,7 @@
...
@@ -88,7 +92,7 @@
<input
class=
"layui-input"
placeholder=
"请输入"
name=
"merchantLoginAccount"
>
<input
class=
"layui-input"
placeholder=
"请输入"
name=
"merchantLoginAccount"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
customerStatus"
pane
>
<label
class=
"layui-form-label"
>
客户状态:
</label>
<label
class=
"layui-form-label"
>
客户状态:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<select
name=
"status"
id=
"searchStatusEl"
>
<select
name=
"status"
id=
"searchStatusEl"
>
...
@@ -106,9 +110,11 @@
...
@@ -106,9 +110,11 @@
</div>
</div>
</form>
</form>
</div>
</div>
<div
class=
"table-page"
>
<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"
class=
"align-center"
></div>
<div
id=
"merchantPage"
class=
"align-center"
></div>
</div>
</div>
</div>
</main>
</main>
</div>
</div>
...
@@ -221,6 +227,7 @@
...
@@ -221,6 +227,7 @@
field
:
'accountTypeNames'
,
field
:
'accountTypeNames'
,
title
:
'账户类型'
,
title
:
'账户类型'
,
align
:
'left'
,
align
:
'left'
,
width
:
100
,
templet
:
'#accountTypeTpl'
templet
:
'#accountTypeTpl'
},
{
},
{
field
:
'merchantLoginAccount'
,
field
:
'merchantLoginAccount'
,
...
@@ -250,17 +257,18 @@
...
@@ -250,17 +257,18 @@
field
:
'merchantAddress'
,
field
:
'merchantAddress'
,
title
:
'商户地址'
,
title
:
'商户地址'
,
align
:
'center'
,
align
:
'center'
,
width
:
1
4
0
width
:
1
8
0
},
{
},
{
field
:
'createdTime'
,
field
:
'createdTime'
,
title
:
'更新时间'
,
title
:
'更新时间'
,
align
:
'center'
align
:
'center'
,
width
:
120
},
{
},
{
align
:
'left'
,
align
:
'left'
,
title
:
'操作'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
toolbar
:
'#merchantBtns'
,
width
:
220
width
:
220
,
//
fixed: 'right'
fixed
:
'right'
}]
}]
]
]
})
})
...
@@ -386,8 +394,7 @@
...
@@ -386,8 +394,7 @@
})
})
// console.log(params)
// console.log(params)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
// console.log(res)
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
page
.
pageSize
*
(
page
.
pageNum
-
1
)
item
.
index
=
index
+
1
+
page
.
pageSize
*
(
page
.
pageNum
-
1
)
item
.
btn
=
{
item
.
btn
=
{
...
@@ -528,6 +535,7 @@
...
@@ -528,6 +535,7 @@
getTabelList
()
getTabelList
()
}
}
})
})
</script>
</script>
</body>
</body>
...
...
html/role/index.html
View file @
8d62828
...
@@ -9,18 +9,24 @@
...
@@ -9,18 +9,24 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<title>
角色管理
</title>
<title>
角色管理
</title>
<style>
.companyName
,
.searchBtn
{
margin-left
:
20px
;
}
</style>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<main
class=
"bg-white"
>
<div>
<div>
<div
class=
"search-block"
>
<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"
>
<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;"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建角色
创建角色
</button>
</button>
<div
class=
"layui-inlin
e"
pane
>
<div
class=
"layui-inline companyNam
e"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
...
@@ -34,13 +40,17 @@
...
@@ -34,13 +40,17 @@
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline searchBtn"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button>
</div>
</div>
</form>
</form>
</div>
<div
class=
"table-page"
>
<table
id=
"roleTable"
lay-filter=
"roleTool"
></table>
<table
id=
"roleTable"
lay-filter=
"roleTool"
></table>
<div
id=
"rolePage"
class=
"align-center"
></div>
<div
id=
"rolePage"
class=
"align-center"
></div>
</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>
...
@@ -68,7 +78,7 @@
...
@@ -68,7 +78,7 @@
{
field
:
'roleCode'
,
title
:
'角色号'
,
align
:
'center'
},
{
field
:
'roleCode'
,
title
:
'角色号'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'所属商户名'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'所属商户名'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#roleBar'
}
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#roleBar'
}
]
]
]
]
...
...
js/helper.js
View file @
8d62828
...
@@ -52,9 +52,35 @@ layui.define(['store'], function (exports) {
...
@@ -52,9 +52,35 @@ layui.define(['store'], function (exports) {
},
delay
)
},
delay
)
}
}
}
}
//将后台返回数据中数值为空的字段全部替换为“-”
function
formateNullFieldData
(
initialData
)
{
const
isEmpty
=
function
(
val
)
{
if
(
String
(
val
)
===
'null'
)
{
return
'-'
;
}
return
val
;
}
if
(
initialData
instanceof
Array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
array
[
key
]
=
formateNullFieldData
(
val
)
})
}
else
if
(
initialData
instanceof
Object
)
{
for
(
let
pro
in
initialData
)
{
initialData
[
pro
]
=
formateNullFieldData
(
initialData
[
pro
])
}
}
else
{
//数据为基本类型时
initialData
=
isEmpty
(
initialData
)
}
return
initialData
;
}
exports
(
'helper'
,
{
exports
(
'helper'
,
{
clone
:
clone
,
clone
:
clone
,
store
:
layui
.
store
,
store
:
layui
.
store
,
debounce
:
debounce
debounce
:
debounce
,
formateNullFieldData
:
formateNullFieldData
})
})
})
})
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