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
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
401 additions
and
283 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
;
...
@@ -113,4 +140,4 @@ border-color: #1989FA!important;
...
@@ -113,4 +140,4 @@ border-color: #1989FA!important;
}
}
.layui-table-cell
li
::marker
{
.layui-table-cell
li
::marker
{
color
:
#1989FA
;
color
:
#1989FA
;
}
\ No newline at end of file
\ No newline at end of file
}
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>
<meta
charset=
"utf-8"
/>
<head>
<meta
content=
"IE=edge"
/>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"description"
content=
"广联帐户管理中心-员工管理"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"author"
content=
"GLSX Web Team"
/>
<meta
name=
"description"
content=
"广联帐户管理中心-员工管理"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<meta
name=
"author"
content=
"GLSX Web Team"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<title>
员工管理
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
</head>
<title>
员工管理
</title>
<body>
</head>
<div
id=
"app"
>
<style>
<main
class=
"bg-white"
>
.merchantNames
{
<div>
margin-left
:
20px
;
}
.creater
,
.status
{
margin-right
:
20px
;
}
.selector
{
width
:
110px
;
}
</style>
<body>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<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,25 +43,26 @@
...
@@ -29,25 +43,26 @@
</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>
<option value="0">存草稿</option>
<option value="0">存草稿</option>
<option value="1">启用</option>
<option value="1">启用</option>
<option value="2">已注销</option> -->
<option value="2">已注销</option> -->
</select>
</select>
</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,233 +70,237 @@
...
@@ -55,233 +70,237 @@
</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>
</
main
>
</
div
>
</
div
>
</
main
>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script
>
</div
>
<script
src=
"/js/load
.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui
.js"
></script>
<
script>
<script
src=
"/js/load.js"
></
script>
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
,
'laypage'
],
function
()
{
<script>
var
request
=
layui
.
request
layui
.
use
([
'table'
,
'request'
,
'form'
,
'helper'
,
'laypage'
],
function
()
{
var
table
=
layui
.
table
var
request
=
layui
.
request
var
form
=
layui
.
form
var
table
=
layui
.
table
var
helper
=
layui
.
helper
var
form
=
layui
.
form
var
laypage
=
layui
.
laypage
var
helper
=
layui
.
helper
var
$
=
layui
.
$
var
laypage
=
layui
.
laypage
// 商户名称列表
var
$
=
layui
.
$
var
merchantName
=
$
(
"#merchantName"
)
// 商户名称列表
var
status
=
$
(
'#status'
)
var
merchantName
=
$
(
"#merchantName"
)
findAllMerchant
(
)
var
status
=
$
(
'#status'
)
findAllDictData
()
findAllMerchant
()
//创建table实例
findAllDictData
()
var
employeeTable
=
table
.
render
({
//创建table实例
elem
:
'#employeeTable'
,
var
employeeTable
=
table
.
render
({
skin
:
'lin
e'
,
elem
:
'#employeeTabl
e'
,
cols
:
[
skin
:
'line'
,
[
cols
:
[
//表头
[
{
field
:
''
,
title
:
'序号'
,
type
:
'numbers'
,
width
:
80
},
//表头
{
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
,
align
:
'center'
},
{
field
:
''
,
title
:
'序号'
,
type
:
'numbers'
,
width
:
80
},
{
field
:
'staffCode'
,
title
:
'员工号'
,
align
:
'center'
},
{
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
,
align
:
'center'
},
{
field
:
'roleName'
,
title
:
'角色
'
,
align
:
'center'
},
{
field
:
'staffCode'
,
title
:
'员工号
'
,
align
:
'center'
},
{
field
:
'staffPhone'
,
title
:
'登录手机号'
,
align
:
'center'
,
width
:
125
},
{
field
:
'roleName'
,
title
:
'角色'
,
align
:
'center'
},
{
field
:
'password'
,
title
:
'登录密码'
,
align
:
'center'
},
{
field
:
'staffPhone'
,
title
:
'登录手机号'
,
align
:
'center'
,
width
:
125
},
{
field
:
'statusName'
,
title
:
'状态
'
,
align
:
'center'
},
{
field
:
'password'
,
title
:
'登录密码
'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者
'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态
'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'更新时间
'
,
align
:
'center'
,
width
:
160
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)
'
,
align
:
'center'
,
width
:
160
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
276
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
]
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
220
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
]
]
})
]
// 分页配置
})
var
page
=
{
// 分页配置
pageNum
:
1
,
var
page
=
{
pageSize
:
10
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
)
}
}
}
var
pageOptions
=
{
}
elem
:
'employeePage'
,
getTabelList
(
employeeTable
)
groups
:
5
,
// 获取table列表接口
layout
:
[
'count'
,
'page'
,
'skip'
],
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
jump
:
function
(
obj
,
first
)
{
search
=
search
||
{}
//obj包含了当前分页的所有参数,比如:
var
params
=
helper
.
clone
(
false
,
{
console
.
log
(
obj
.
curr
);
//得到当前页,以便向服务端请求对应页的数据。
pageNum
:
page
.
pageNum
,
console
.
log
(
obj
.
limit
);
//得到每页显示的条数
pageSize
:
page
.
pageSize
,
page
.
pageNum
=
obj
.
curr
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
page
.
pageSize
=
obj
.
limit
},
search
)
//首次不执行
request
(
params
,
if
(
!
first
)
{
function
(
res
)
{
getTabelList
(
employeeTable
)
console
.
log
(
res
)
// table.reload('testReload', {
// data: res.data.data
// })
var
data
=
res
.
data
var
options
=
{
data
:
data
.
data
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
pageOptions
.
curr
=
1
}
}
laypage
.
render
(
pageOptions
)
employeeTable
.
reload
(
options
)
}
}
}
)
getTabelList
(
employeeTable
)
}
// 获取table列表接口
// table工具条事件
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
search
=
search
||
{}
var
data
=
obj
.
data
var
params
=
helper
.
clone
(
false
,
{
var
layEvent
=
obj
.
event
pageNum
:
page
.
pageNum
,
var
tr
=
obj
.
tr
pageSize
:
page
.
pageSize
,
if
(
layEvent
===
'detail'
)
{
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
go
(
'employee'
,
'detail'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
},
search
)
}
else
if
(
layEvent
===
'edit'
)
{
request
(
params
,
go
(
'employee'
,
'add'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
function
(
res
)
{
}
else
if
(
layEvent
===
'del'
)
{
console
.
log
(
res
)
layer
.
confirm
(
'真的删除行么'
,
function
(
index
)
{
// table.reload('testReload', {
// obj.del() //删除对应行(tr)的DOM结构,并更新缓存
// data: res.data.data
var
params
=
{
// })
method
:
'cn.com.glsx.merchants.staff.deleteStaff'
,
var
data
=
res
.
data
id
:
data
.
id
var
options
=
{
data
:
data
.
data
}
pageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
pageOptions
.
curr
=
1
}
laypage
.
render
(
pageOptions
)
employeeTable
.
reload
(
options
)
}
}
)
request
(
params
,
function
(
res
)
{
}
if
(
res
.
code
==
'0'
)
{
// table工具条事件
layer
.
close
(
index
)
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
console
.
log
(
'shanchu'
)
var
data
=
obj
.
data
getTabelList
(
employeeTable
)
var
layEvent
=
obj
.
event
var
tr
=
obj
.
tr
if
(
layEvent
===
'detail'
)
{
go
(
'employee'
,
'detail'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
}
else
if
(
layEvent
===
'edit'
)
{
go
(
'employee'
,
'add'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
}
else
if
(
layEvent
===
'del'
)
{
layer
.
confirm
(
'真的删除行么'
,
function
(
index
)
{
// obj.del() //删除对应行(tr)的DOM结构,并更新缓存
var
params
=
{
method
:
'cn.com.glsx.merchants.staff.deleteStaff'
,
id
:
data
.
id
}
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
index
)
console
.
log
(
'shanchu'
)
getTabelList
(
employeeTable
)
}
})
//向服务端发送删除指令
})
}
else
if
(
layEvent
===
'updateTime'
)
{
layer
.
open
({
type
:
2
,
title
:
'修改账户的有效期'
,
area
:
[
'600px'
,
'320px'
],
fixed
:
false
,
//不固定
// maxmin: true,
btn
:
[
'确定'
,
'取消'
],
content
:
'validPeriod.html?id='
+
data
.
id
+
'&effectiveTime='
+
data
.
effectiveTime
,
yes
:
function
(
index
,
layero
)
{
var
body
=
layer
.
getChildFrame
(
'body'
,
index
)
helper
.
store
.
set
(
'isRefresh'
,
false
)
body
.
find
(
'#periodVerifyBtn'
).
click
()
},
end
:
function
()
{
var
isRefresh
=
helper
.
store
.
get
(
'isRefresh'
)
if
(
isRefresh
)
{
getTabelList
(
employeeTable
)
layer
.
msg
(
'修改成功'
,
{
icon
:
1
})
}
helper
.
store
.
remove
(
'isRefresh'
)
},
})
})
//向服务端发送删除指令
})
}
else
if
(
layEvent
===
'updateTime'
)
{
layer
.
open
({
type
:
2
,
title
:
'修改账户的有效期'
,
area
:
[
'600px'
,
'320px'
],
fixed
:
false
,
//不固定
// maxmin: true,
btn
:
[
'确定'
,
'取消'
],
content
:
'validPeriod.html?id='
+
data
.
id
+
'&effectiveTime='
+
data
.
effectiveTime
,
yes
:
function
(
index
,
layero
)
{
var
body
=
layer
.
getChildFrame
(
'body'
,
index
)
helper
.
store
.
set
(
'isRefresh'
,
false
)
body
.
find
(
'#periodVerifyBtn'
).
click
()
},
end
:
function
()
{
var
isRefresh
=
helper
.
store
.
get
(
'isRefresh'
)
if
(
isRefresh
)
{
getTabelList
(
employeeTable
)
layer
.
msg
(
'修改成功'
,
{
icon
:
1
})
}
helper
.
store
.
remove
(
'isRefresh'
)
},
})
}
})
// 查询事件
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
getTabelList
(
employeeTable
,
searchData
,
true
)
})
// 新增点击事件
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
var
value
=
merchantName
.
val
()
if
(
value
)
{
go
(
'employee'
,
'add'
,
{
merchantId
:
value
})
}
else
{
layer
.
msg
(
'请选择商户'
)
}
})
// 导出
$
(
'#employeeExport'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
var
params
=
helper
.
clone
(
false
,
{
method
:
'cn.com.glsx.merchants.staff.exportData'
},
searchData
)
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
window
.
open
(
res
.
data
)
}
}
})
})
// 查询事件
})
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
// 查询所有商户
var
searchData
=
getSearch
()
function
findAllMerchant
()
{
getTabelList
(
employeeTable
,
searchData
,
true
)
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
})
request
(
params
,
function
(
result
)
{
// 新增点击事件
if
(
result
.
code
==
'0'
)
{
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
console
.
log
(
result
)
var
value
=
merchantName
.
val
()
var
list
=
result
.
data
if
(
value
)
{
list
.
unshift
(
''
)
go
(
'employee'
,
'add'
,
{
merchantId
:
value
})
$
.
each
(
list
,
function
(
index
,
item
)
{
}
else
{
merchantName
.
append
(
new
Option
(
item
.
merchantName
,
item
.
id
))
layer
.
msg
(
'请选择商户'
)
})
form
.
render
(
'select'
)
}
}
})
})
// 导出
}
$
(
'#employeeExport'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
function
getSearch
()
{
var
params
=
helper
.
clone
(
false
,
{
method
:
'cn.com.glsx.merchants.staff.exportData'
},
searchData
)
var
formVal
=
form
.
val
(
'employeeForm'
)
request
(
params
,
function
(
res
)
{
var
searchData
=
helper
.
clone
(
false
,
formVal
)
if
(
res
.
code
==
'0'
)
{
console
.
log
(
formVal
)
window
.
open
(
res
.
data
)
if
(
searchData
.
type
==
0
)
{
}
searchData
.
staffName
=
formVal
.
keywords
})
searchData
.
staffPhone
=
''
})
}
else
if
(
searchData
.
type
==
1
)
{
// 查询所有商户
searchData
.
staffName
=
''
function
findAllMerchant
()
{
searchData
.
staffPhone
=
formVal
.
keywords
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
}
else
{
request
(
params
,
function
(
result
)
{
searchData
.
staffName
=
''
if
(
result
.
code
==
'0'
)
{
searchData
.
staffPhone
=
''
console
.
log
(
result
)
var
list
=
result
.
data
list
.
unshift
(
''
)
$
.
each
(
list
,
function
(
index
,
item
)
{
merchantName
.
append
(
new
Option
(
item
.
merchantName
,
item
.
id
))
})
form
.
render
(
'select'
)
}
})
}
}
delete
searchData
.
type
function
getSearch
()
{
delete
searchData
.
keywords
var
formVal
=
form
.
val
(
'employeeForm'
)
return
searchData
var
searchData
=
helper
.
clone
(
false
,
formVal
)
}
console
.
log
(
formVal
)
function
findAllDictData
()
{
if
(
searchData
.
type
==
0
)
{
var
params
=
{
searchData
.
staffName
=
formVal
.
keywords
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
searchData
.
staffPhone
=
''
dictType
:
'staff_status'
}
else
if
(
searchData
.
type
==
1
)
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
formVal
.
keywords
}
else
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
''
}
delete
searchData
.
type
delete
searchData
.
keywords
return
searchData
}
}
function
findAllDictData
()
{
request
(
params
,
function
(
res
)
{
var
params
=
{
if
(
res
.
code
==
'0'
)
{
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
var
list
=
res
.
data
dictType
:
'staff_status'
list
.
unshift
(
''
)
$
.
each
(
list
,
function
(
index
,
item
)
{
status
.
append
(
new
Option
(
item
.
dictLabel
,
item
.
dictValue
))
})
form
.
render
(
'select'
)
}
}
request
(
params
,
function
(
res
)
{
})
if
(
res
.
code
==
'0'
)
{
}
var
list
=
res
.
data
})
list
.
unshift
(
''
)
</script>
$
.
each
(
list
,
function
(
index
,
item
)
{
<script
type=
"text/html"
id=
"employeeBar"
>
status
.
append
(
new
Option
(
item
.
dictLabel
,
item
.
dictValue
))
})
form
.
render
(
'select'
)
}
})
}
})
</script>
<script
type=
"text/html"
id=
"employeeBar"
>
<
div
>
<
div
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"detail"
>
查看
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"detail"
>
查看
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
...
@@ -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,8 +110,10 @@
...
@@ -106,8 +110,10 @@
</div>
</div>
</form>
</form>
</div>
</div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
class=
"table-page"
>
<div
id=
"merchantPage"
class=
"align-center"
></div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<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,37 +9,47 @@
...
@@ -9,37 +9,47 @@
<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>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"search-block"
>
<div
class=
"layui-form-item"
pane
>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
<div
class=
"layui-form-item"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addRole"
style=
"padding: 0 15px;"
>
创建角色
<i
class=
"layui-icon layui-icon-add-circle"
></i>
</button>
创建角色
<div
class=
"layui-inline"
pane
>
</button>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-inline companyName"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
</select>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
角色名称
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
</select>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-inline searchBtn"
pane
>
<div
class=
"layui-inline"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button>
<label
class=
"layui-form-label"
>
角色名称
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</
div
>
</
form
>
<div
class=
"layui-inline"
pane
>
</div
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button
>
<div
class=
"table-page"
>
<
/div
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
</form
>
<div
id=
"rolePage"
class=
"align-center"
></div
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
<
/div
>
<div
id=
"rolePage"
class=
"align-center"
></div>
</div>
</div>
</main>
</main>
</div>
</div>
...
@@ -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