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
{
background-color
:
#fff
;
margin
:
20px
;
/* background-color: #F7F7F7; */
/* margin: 20px; */
}
.content-title
{
...
...
css/layui.css
View file @
8d62828
...
...
@@ -6,7 +6,15 @@
.layui-textarea
:focus
{
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
{
content
:
'*'
;
display
:
inline-block
;
...
...
@@ -16,6 +24,7 @@
.layui-laypage-btn
,
.layui-btn
{
background-color
:
#1989FA
!important
;
border-radius
:
4px
;
color
:
#ffffff
;
}
...
...
@@ -96,15 +105,33 @@
border-color
:
#1989FA
!important
;
}
/* 分页器的修改 */
.layui-laypage
button
{
border-radius
:
4px
;
}
.layui-laypage
.layui-laypage-skip
input
:focus
{
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
{
height
:
auto
;
overflow
:
visible
;
text-overflow
:
inherit
;
white-space
:
normal
;
/* 高度最多四行,超出省略号结尾 */
/* display: -webkit-box;
-webkit-box-orient: vertical;
line-clamp: 4;
overflow: hidden;
word-break: break-all; */
}
.layui-table-cell
li
{
list-style
:
disc
;
...
...
@@ -113,4 +140,4 @@ border-color: #1989FA!important;
}
.layui-table-cell
li
::marker
{
color
:
#1989FA
;
}
\ No newline at end of file
}
css/main.css
View file @
8d62828
...
...
@@ -10,6 +10,7 @@ html, body {
display
:
flex
;
flex-direction
:
column
;
height
:
100%
;
background-color
:
#f7f7f7
;
}
header
{
...
...
@@ -25,7 +26,7 @@ main::-webkit-scrollbar {
box-shadow
:
0px
0px
8px
0px
rgba
(
0
,
0
,
0
,
0.1
);
display
:
flex
;
justify-content
:
space-between
;
padding
:
0
38
px
;
padding
:
0
20
px
;
}
.header-nav
{
...
...
@@ -93,9 +94,20 @@ main {
flex
:
1
;
min-height
:
calc
(
100%
-
60px
-
30px
);
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
{
height
:
30px
;
flex-shrink
:
0
;
...
...
css/merchant.css
View file @
8d62828
...
...
@@ -4,6 +4,8 @@
}
.merchant-left
{
width
:
500px
;
box-sizing
:
border-box
;
padding-left
:
20px
;
}
.merchant-right
{
flex
:
1
;
...
...
html/employee/index.html
View file @
8d62828
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"description"
content=
"广联帐户管理中心-员工管理"
/>
<meta
name=
"author"
content=
"GLSX Web Team"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<title>
员工管理
</title>
</head>
<body>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<div>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"description"
content=
"广联帐户管理中心-员工管理"
/>
<meta
name=
"author"
content=
"GLSX Web Team"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<title>
员工管理
</title>
</head>
<style>
.merchantNames
{
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"
>
<div
class=
"layui-form-item"
pane
>
<div
class=
"layui-form-item"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"addEmployee"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建员工
</button>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-inline
merchantNames
"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"layui-input-block"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
...
...
@@ -29,25 +43,26 @@
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline
creater
"
>
<label
class=
"layui-form-label"
>
创建者
</label>
<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
class=
"layui-inline"
pane
>
<label
class=
"layui-form-label"
>
状态
</label>
<div
class=
"layui-inline
status
"
pane
>
<label
class=
"layui-form-label
"
>
状态
</label>
<div
class=
"layui-input-block"
>
<select
name=
"status"
id=
"status"
lay-verify=
"required"
>
<!-- <option value="">全部</option>
<option value="0">存草稿</option>
<option value="1">启用</option>
<option value="2">已注销</option> -->
<option value="0">存草稿</option>
<option value="1">启用</option>
<option value="2">已注销</option> -->
</select>
</div>
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline
selector
"
>
<select
name=
"type"
lay-verify=
"required"
>
<option
value=
""
></option>
<option
value=
"0"
>
员工姓名
</option>
...
...
@@ -55,233 +70,237 @@
</select>
</div>
<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
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=
"employeeExport"
>
导出
</button>
</div>
</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>
</
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'
,
'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"
)
var
status
=
$
(
'#status'
)
findAllMerchant
(
)
findAllDictData
()
//创建table实例
var
employeeTable
=
table
.
render
({
elem
:
'#employeeTable'
,
skin
:
'lin
e'
,
cols
:
[
[
//表头
{
field
:
''
,
title
:
'序号'
,
type
:
'numbers'
,
width
:
80
},
{
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
,
align
:
'center'
},
{
field
:
'staffCode'
,
title
:
'员工号'
,
align
:
'center'
},
{
field
:
'roleName'
,
title
:
'角色
'
,
align
:
'center'
},
{
field
:
'staffPhone'
,
title
:
'登录手机号'
,
align
:
'center'
,
width
:
125
},
{
field
:
'password'
,
title
:
'登录密码'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态
'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者
'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'createdTime'
,
title
:
'更新时间
'
,
align
:
'center'
,
width
:
160
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
276
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
]
</
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'
,
'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"
)
var
status
=
$
(
'#status'
)
findAllMerchant
()
findAllDictData
()
//创建table实例
var
employeeTable
=
table
.
render
({
elem
:
'#employeeTabl
e'
,
skin
:
'line'
,
cols
:
[
[
//表头
{
field
:
''
,
title
:
'序号'
,
type
:
'numbers'
,
width
:
80
},
{
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
,
align
:
'center'
},
{
field
:
'staffCode'
,
title
:
'员工号
'
,
align
:
'center'
},
{
field
:
'roleName'
,
title
:
'角色'
,
align
:
'center'
},
{
field
:
'staffPhone'
,
title
:
'登录手机号'
,
align
:
'center'
,
width
:
125
},
{
field
:
'password'
,
title
:
'登录密码
'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态
'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)
'
,
align
:
'center'
,
width
:
160
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
220
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
]
})
// 分页配置
var
page
=
{
pageNum
:
1
,
pageSize
:
10
]
})
// 分页配置
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
)
}
}
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
)
{
search
=
search
||
{}
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
page
.
pageNum
,
pageSize
:
page
.
pageSize
,
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
},
search
)
request
(
params
,
function
(
res
)
{
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列表接口
function
getTabelList
(
table
,
search
,
isResetPageNum
)
{
search
=
search
||
{}
var
params
=
helper
.
clone
(
false
,
{
pageNum
:
page
.
pageNum
,
pageSize
:
page
.
pageSize
,
method
:
'cn.com.glsx.merchants.staff.findStaffByPage'
},
search
)
request
(
params
,
function
(
res
)
{
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
)
)
}
// table工具条事件
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
var
data
=
obj
.
data
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
}
)
}
// table工具条事件
table
.
on
(
'tool(employeeTool)'
,
function
(
obj
)
{
var
data
=
obj
.
data
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
)
}
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
()
getTabelList
(
employeeTable
,
searchData
,
true
)
})
// 新增点击事件
$
(
'#addEmployee'
).
on
(
'click'
,
function
()
{
var
value
=
merchantName
.
val
()
if
(
value
)
{
go
(
'employee'
,
'add'
,
{
merchantId
:
value
})
}
else
{
layer
.
msg
(
'请选择商户'
)
})
// 查询所有商户
function
findAllMerchant
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
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'
)
}
})
// 导出
$
(
'#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
)
}
})
})
// 查询所有商户
function
findAllMerchant
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
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'
)
}
})
}
function
getSearch
()
{
var
formVal
=
form
.
val
(
'employeeForm'
)
var
searchData
=
helper
.
clone
(
false
,
formVal
)
console
.
log
(
formVal
)
if
(
searchData
.
type
==
0
)
{
searchData
.
staffName
=
formVal
.
keywords
searchData
.
staffPhone
=
''
}
else
if
(
searchData
.
type
==
1
)
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
formVal
.
keywords
}
else
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
''
}
function
getSearch
()
{
var
formVal
=
form
.
val
(
'employeeForm'
)
var
searchData
=
helper
.
clone
(
false
,
formVal
)
console
.
log
(
formVal
)
if
(
searchData
.
type
==
0
)
{
searchData
.
staffName
=
formVal
.
keywords
searchData
.
staffPhone
=
''
}
else
if
(
searchData
.
type
==
1
)
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
formVal
.
keywords
}
else
{
searchData
.
staffName
=
''
searchData
.
staffPhone
=
''
}
delete
searchData
.
type
delete
searchData
.
keywords
return
searchData
delete
searchData
.
type
delete
searchData
.
keywords
return
searchData
}
function
findAllDictData
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
dictType
:
'staff_status'
}
function
findAllDictData
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
dictType
:
'staff_status'
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
var
list
=
res
.
data
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
(
''
)
$
.
each
(
list
,
function
(
index
,
item
)
{
status
.
append
(
new
Option
(
item
.
dictLabel
,
item
.
dictValue
))
})
form
.
render
(
'select'
)
}
})
}
})
</script>
<script
type=
"text/html"
id=
"employeeBar"
>
})
}
})
</script>
<script
type=
"text/html"
id=
"employeeBar"
>
<
div
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"detail"
>
查看
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
...
...
@@ -291,5 +310,6 @@
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"updateTime"
>
修改账户有效期
<
/a
>
<
/div
>
</script>
</body>
</html>
</body>
</html>
\ No newline at end of file
html/merchant/detail.html
View file @
8d62828
...
...
@@ -20,12 +20,17 @@
}
.merchant-content
#secondmerchantName
{
margin-left
:
15px
;
width
:
250px
;
height
:
24px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
24px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
.merchant-content
>
div
:not
(
:first-child
)
{
...
...
@@ -48,12 +53,18 @@
line-height
:
40px
;
}
.merchant-right
.companyName
{
display
:
inline-block
;
width
:
300px
;
height
:
36px
;
font-size
:
16px
;
font-family
:
PingFangSC-Medium
,
PingFang
SC
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
36px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
word-break
:
break-all
;
}
.merchant-right
.layui-btn
{
position
:
absolute
;
...
...
@@ -168,7 +179,7 @@
<div
class=
"merchant-headerMsg"
>
<div
class=
"merchantImg"
><img
src=
"../../css/img/merchantImg.png"
alt=
""
></div>
<div
class=
"merchant-content"
>
<div
id=
"secondmerchantName"
></div>
<div
id=
"secondmerchantName"
></div>
<div>
商户号:
<span
id=
"secondmerchantId"
></span></div>
<div>
您共有
<span
id=
"numberOfSubMerchants"
></span>
个子商户,共有
<span
id=
"numberOfStores"
></span>
家门店
</div>
</div>
...
...
@@ -393,10 +404,12 @@
console
.
log
(
res
.
data
)
var
data
=
res
.
data
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
$
(
'#secondmerchantName'
).
attr
(
'title'
,
data
.
merchantName
);
$
(
'#secondmerchantId'
).
text
(
data
.
merchantNo
)
$
(
'#numberOfSubMerchants'
).
text
(
data
.
numberOfSubMerchants
)
$
(
'#numberOfStores'
).
text
(
data
.
numberOfStores
)
$
(
'#merchantNameTable'
).
text
(
data
.
merchantName
)
$
(
'#merchantNameTable'
).
attr
(
'title'
,
data
.
merchantName
+
'员工列表'
);
})
}
...
...
html/merchant/index.html
View file @
8d62828
...
...
@@ -10,13 +10,13 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<style>
.search-block
{
padding
:
8px
20px
;
background-color
:
#ffffff
;
}
/*
.merchant .layui-table-view {
margin
:
10px
20px
;
margin: -5px 20px;
} */
.merchant
.layui-table
{
margin
:
0
;
}
/* .merchant .layui-table-cell {
...
...
@@ -38,6 +38,10 @@
.layui-btn-xs
{
cursor
:
pointer
;
}
.channel
,
.accountLevel
,
.accountType
,
.customerStatus
{
margin-left
:
20px
;
}
</style>
<title>
商户管理
</title>
</head>
...
...
@@ -48,11 +52,11 @@
<!-- <div id="tree"></div> -->
<div
class=
"context-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"
>
<button
class=
"layui-btn"
id=
"addBtn"
>
<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>
<div
class=
"layui-input-inline"
>
<select
name=
"channelId"
id=
"channelIdEl"
>
...
...
@@ -60,7 +64,7 @@
</select>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountLevel"
pane
>
<label
class=
"layui-form-label"
>
账户等级:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"merchantAccountLevel"
id=
"accountLevelEl"
>
...
...
@@ -68,7 +72,7 @@
</select>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
accountType"
pane
>
<label
class=
"layui-form-label"
>
账户类型:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"accounttypeId"
id=
"accountTypeIdEl"
>
...
...
@@ -77,7 +81,7 @@
</div>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
loginName"
pane
>
<div
class=
"layui-input-inline"
style=
"width: 120px;"
>
<select
name=
"name"
lay-filter=
"nameFilter"
>
<option
value=
"0"
>
账号登陆名
</option>
...
...
@@ -88,7 +92,7 @@
<input
class=
"layui-input"
placeholder=
"请输入"
name=
"merchantLoginAccount"
>
</div>
</div>
<div
class=
"layui-inline
"
>
<div
class=
"layui-inline
customerStatus"
pane
>
<label
class=
"layui-form-label"
>
客户状态:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"status"
id=
"searchStatusEl"
>
...
...
@@ -106,8 +110,10 @@
</div>
</form>
</div>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
class=
"align-center"
></div>
<div
class=
"table-page"
>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"merchantPage"
class=
"align-center"
></div>
</div>
</div>
</main>
</div>
...
...
@@ -221,6 +227,7 @@
field
:
'accountTypeNames'
,
title
:
'账户类型'
,
align
:
'left'
,
width
:
100
,
templet
:
'#accountTypeTpl'
},
{
field
:
'merchantLoginAccount'
,
...
...
@@ -250,17 +257,18 @@
field
:
'merchantAddress'
,
title
:
'商户地址'
,
align
:
'center'
,
width
:
1
4
0
width
:
1
8
0
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
align
:
'center'
align
:
'center'
,
width
:
120
},
{
align
:
'left'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
width
:
220
//
fixed: 'right'
width
:
220
,
fixed
:
'right'
}]
]
})
...
...
@@ -386,8 +394,7 @@
})
// console.log(params)
request
(
params
,
function
(
res
)
{
// console.log(res)
var
data
=
res
.
data
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
page
.
pageSize
*
(
page
.
pageNum
-
1
)
item
.
btn
=
{
...
...
@@ -528,6 +535,7 @@
getTabelList
()
}
})
</script>
</body>
...
...
html/role/index.html
View file @
8d62828
...
...
@@ -9,37 +9,47 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<title>
角色管理
</title>
<style>
.companyName
,
.searchBtn
{
margin-left
:
20px
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<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;"
>
<i
class=
"layui-icon layui-icon-add-circle"
></i>
创建角色
</button>
<div
class=
"layui-inline"
pane
>
<label
class=
"layui-form-label"
>
商户名称
</label>
<div
class=
"search-block"
>
<form
action=
""
class=
"layui-form layui-form-pane"
lay-filter=
"roleForm"
>
<div
class=
"layui-form-item"
>
<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 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"
>
<select
name=
"merchantId"
id=
"merchantName"
lay-verify=
"required"
>
</select>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
角色名称
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"roleName"
placeholder=
"请输入角色名称"
autocomplete=
"off"
class=
"layui-input"
/>
<div
class=
"layui-inline searchBtn"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button>
</div>
</
div
>
<div
class=
"layui-inline"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"roleSearch"
>
查询
</button
>
<
/div
>
</form
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
<div
id=
"rolePage"
class=
"align-center"
></div>
</
form
>
</div
>
<div
class=
"table-page"
>
<
table
id=
"roleTable"
lay-filter=
"roleTool"
></table
>
<div
id=
"rolePage"
class=
"align-center"
></div
>
<
/div
>
</div>
</main>
</div>
...
...
@@ -68,7 +78,7 @@
{
field
:
'roleCode'
,
title
:
'角色号'
,
align
:
'center'
},
{
field
:
'merchantName'
,
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'
}
]
]
...
...
js/helper.js
View file @
8d62828
...
...
@@ -52,9 +52,35 @@ layui.define(['store'], function (exports) {
},
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'
,
{
clone
:
clone
,
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