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 e4e14a34
authored
Nov 25, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
部门回显
1 parent
8f8149b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
438 additions
and
428 deletions
html/employee/detail.html
html/employee/detail.html
View file @
e4e14a3
<!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"
/>
<title>
员工管理
</title>
</head>
<style>
.sub-bg-white
{
width
:
100%
;
background-color
:
#f4f5fa
;
padding-top
:
8px
;
}
<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"
/>
<title>
员工管理
</title>
</head>
<style>
.sub-bg-white
{
width
:
100%
;
background-color
:
#f4f5fa
;
padding-top
:
8px
;
}
.sub-title
{
margin-top
:
21px
;
}
.sub
-title
{
margin-top
:
21
px
;
}
.content
-title
{
margin-bottom
:
20
px
;
}
.content-title
{
margin-bottom
:
20px
;
}
.fixed-btn
{
position
:
fixed
;
right
:
10px
;
bottom
:
20px
;
background-color
:
#409eff
;
border-radius
:
20px
;
text-align
:
center
;
}
.fixed-btn
{
position
:
fixed
;
right
:
10px
;
bottom
:
20px
;
background-color
:
#409eff
;
border-radius
:
20px
;
text-align
:
center
;
}
.fixed-btn
a
{
display
:
block
;
width
:
40px
;
padding
:
5px
;
color
:
#fff
;
border-bottom
:
1px
solid
#fff
;
}
.fixed-btn
a
{
display
:
block
;
width
:
40px
;
padding
:
5px
;
color
:
#fff
;
border-bottom
:
1px
solid
#fff
;
}
.fixed-btn
a
:last-child
{
border-bottom
:
none
;
}
.fixed-btn
a
:last-child
{
border-bottom
:
none
;
}
.topwrap
,
.topmidwrap
,
.topbottomwrap
,
.bottomwrap
{
/* margin: 0 20px 0; */
background-color
:
#fff
;
position
:
relative
;
min-height
:
238px
;
}
.topwrap
,
.topmidwrap
,
.topbottomwrap
,
.bottomwrap
{
/* margin: 0 20px 0; */
background-color
:
#fff
;
position
:
relative
;
min-height
:
238px
;
}
.topwrap
,
.topmidwrap
{
/* min-height: calc(100vh - 480px); */
padding-bottom
:
10px
;
}
.topwrap
,
.topmidwrap
{
/* min-height: calc(100vh - 480px); */
padding-bottom
:
10px
;
}
.topbottomwrap
{
min-height
:
calc
(
100vh
-
200px
);
}
.topbottomwrap
{
min-height
:
calc
(
100vh
-
200px
);
}
.grayLine
{
position
:
absolute
;
left
:
0
;
top
:
48px
;
background-color
:
#d8d8d8
;
width
:
100%
;
height
:
1px
;
}
.grayLine
{
position
:
absolute
;
left
:
0
;
top
:
48px
;
background-color
:
#d8d8d8
;
width
:
100%
;
height
:
1px
;
}
.layui-tab-content
{
position
:
relative
;
}
.layui-tab-content
{
position
:
relative
;
}
.layui-no-data
{
width
:
100%
;
height
:
500px
;
}
.layui-no-data
{
width
:
100%
;
height
:
500px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
height
:
50%
;
width
:
100%
;
text-align
:
center
;
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
height
:
50%
;
width
:
100%
;
text-align
:
center
;
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.show
{
display
:
inline-block
;
}
.show
{
display
:
inline-block
;
}
.hide
{
display
:
none
;
}
.hide
{
display
:
none
;
}
.wrapper
.employeeDetail
.layui-this
{
color
:
#5850ff
;
background-color
:
#f4f6fc
;
}
.wrapper
.employeeDetail
.layui-this
{
color
:
#5850ff
;
background-color
:
#f4f6fc
;
}
.wrapper
,
.detail
{
padding-bottom
:
100px
;
}
</style>
.wrapper
,
.detail
{
padding-bottom
:
100px
;
}
</style>
<body>
<div
id=
"app"
>
<main
class=
"wrapper detail"
>
<div
class=
"layui-tab layui-tab-brief"
lay-filter=
"editTab"
>
<ul
class=
"layui-tab-title employeeDetail"
>
<li
lay-id=
"1"
style=
"padding: 0; width: 90px; margin-right: 20px"
class=
"layui-this"
>
基本信息
</li>
<li
lay-id=
"2"
style=
"padding: 0; width: 90px; margin-right: 20px"
>
账户权限
</li>
<li
lay-id=
"3"
style=
"padding: 0; width: 90px"
>
修改记录
</li>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"topwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"basic"
>
员工基本信息
<div
class=
"title-right"
id=
"merchantName"
></div>
</h3>
<body>
<div
id=
"app"
>
<main
class=
"wrapper detail"
>
<div
class=
"layui-tab layui-tab-brief"
lay-filter=
"editTab"
>
<ul
class=
"layui-tab-title employeeDetail"
>
<li
lay-id=
"1"
style=
"padding: 0; width: 90px; margin-right: 20px"
class=
"layui-this"
>
基本信息
</li>
<li
lay-id=
"2"
style=
"padding: 0; width: 90px; margin-right: 20px"
>
账户权限
</li>
<li
lay-id=
"3"
style=
"padding: 0; width: 90px"
>
修改记录
</li>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"topwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"basic"
>
员工基本信息
<div
class=
"title-right"
id=
"merchantName"
></div>
</h3>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffName"
></div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
姓名:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffName"
></div>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
登录手机号:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"staffPhone"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
登录手机号:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffPhone"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
企微号:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"entmicroName"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
企微号:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"entmicroName"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职务:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"staffJob"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
职务:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffJob"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色名称:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"roleName"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色名称:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleName"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
创建人:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"createdAccount"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
创建人:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"createdAccount"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属部门:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"department"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
所属部门:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"department"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工标签:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"staffLabel"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
员工标签:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"staffLabel"
></div
>
</div>
</div>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信昵称:
</label
>
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"weChatNickName"
><
/div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信昵称:
</label
>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatNickName"
></div
>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信手机号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatPhone"
></div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信手机号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatPhone"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信openid:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"weChatOpenId"
></div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
微信openid:
</label>
<div
class=
"topmidwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"visibleMerchant"
>
可见下级商户
</h3>
<!-- <ul id="merchantTree" class="ztree wrapper-tree"></ul> -->
<div
class=
"layui-input-block"
>
<
div
class=
"layui-form-mid layui-word-aux"
id=
"weChatOpenId"
></div
>
<
ul
id=
"visibleInferiorMerName"
></ul
>
</div>
</div>
</div>
<div
class=
"topmidwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"visibleMerchant"
>
可见下级商户
</h3>
<!-- <ul id="merchantTree" class="ztree wrapper-tree"></ul> -->
<div
class=
"layui-input-block"
>
<ul
id=
"visibleInferiorMerName"
></ul>
</div>
</div>
</div>
<div
class=
"layui-tab-item"
>
<div
class=
"topbottomwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"accountAuth"
>
账户权限
</h3>
<div
class=
"layui-tab tabmutiple-content"
style=
"padding: 0 20px 10px; background-color: #fff; margin-bottom: 80px"
lay-filter=
"roleAuth"
>
<ul
class=
"layui-tab-title"
></ul>
<div
class=
"layui-tab-content"
></div>
<div
class=
"layui-tab-item"
>
<div
class=
"topbottomwrap"
>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"accountAuth"
>
账户权限
</h3>
<div
class=
"layui-tab tabmutiple-content"
style=
"padding: 0 20px 10px; background-color: #fff; margin-bottom: 80px"
lay-filter=
"roleAuth"
>
<ul
class=
"layui-tab-title"
></ul>
<div
class=
"layui-tab-content"
></div>
</div>
</div>
</div>
</div
>
<div
class=
"layui-tab-item
"
>
<div
class=
"bottomwrap"
style=
"margin-bottom: 80px; padding: 0 20px"
>
<div
class=
"grayLine"
></div
>
<h3
class=
"content-title sub-title"
id=
"record"
>
修改记录
</h3
>
<div
class=
"layui-tab tabmutiple-content
"
>
<div
class=
"table-page"
>
<table
class=
"layui-table"
id=
"recordTable"
></table
>
<
div
id=
"recordPage"
class=
"align-left"
><
/div>
<div
class=
"layui-tab-item"
>
<div
class=
"bottomwrap"
style=
"margin-bottom: 80px; padding: 0 20px
"
>
<div
class=
"grayLine"
></div
>
<h3
class=
"content-title sub-title"
id=
"record"
>
修改记录
</h3
>
<div
class=
"layui-tab tabmutiple-content"
>
<div
class=
"table-page
"
>
<table
class=
"layui-table"
id=
"recordTable"
></table
>
<div
id=
"recordPage"
class=
"align-left"
></div
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"sub-bg-white"
>
<div
class=
"footer-close"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"return"
>
关闭
</button>
</div>
<!-- <div class="fixed-btn">
<div
class=
"sub-bg-white"
>
<div
class=
"footer-close"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"return"
>
关闭
</button>
</div>
<!-- <div class="fixed-btn">
<a id="basicBtn">基本信息</a>
<a id="accountAuthBtn">账户权限</a>
<a id="recordBtn">修改记录</a>
</div> -->
</div>
</main>
</div>
<script
src=
"https://img02.glsx.com.cn/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'request'
,
'helper'
,
'treeTab'
,
'table'
,
'laypage'
],
function
()
{
/** 变量 */
var
$
=
layui
.
$
var
request
=
layui
.
request
var
helper
=
layui
.
helper
var
id
=
qs
(
'id'
)
var
treeTab
=
layui
.
treeTab
var
table
=
layui
.
table
var
laypage
=
layui
.
laypage
var
merchantId
=
qs
(
'merchantId'
)
var
basicArr
=
[
'staffName'
,
'staffPhone'
,
'entmicroName'
,
'staffJob'
,
'roleName'
,
'roleCode'
,
'merchantName'
,
'createdAccount'
,
'department'
,
'staffLabel'
,
'weChatNickName'
,
'weChatPhone'
,
'weChatOpenId'
]
var
employeeData
=
{}
var
visibleInferiorMerName
=
$
(
'#visibleInferiorMerName'
)
</div>
</main>
</div>
<script
src=
"https://img02.glsx.com.cn/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'request'
,
'helper'
,
'treeTab'
,
'table'
,
'laypage'
],
function
()
{
/** 变量 */
var
$
=
layui
.
$
var
request
=
layui
.
request
var
helper
=
layui
.
helper
var
id
=
qs
(
'id'
)
var
treeTab
=
layui
.
treeTab
var
table
=
layui
.
table
var
laypage
=
layui
.
laypage
var
merchantId
=
qs
(
'merchantId'
)
var
basicArr
=
[
'staffName'
,
'staffPhone'
,
'entmicroName'
,
'staffJob'
,
'roleName'
,
'roleCode'
,
'merchantName'
,
'createdAccount'
,
'department'
,
'staffLabel'
,
'weChatNickName'
,
'weChatPhone'
,
'weChatOpenId'
]
var
employeeData
=
{}
var
visibleInferiorMerName
=
$
(
'#visibleInferiorMerName'
)
var
recordPage
=
{
pageNum
:
1
,
pageSize
:
10
}
var
recordPageOptions
=
{
elem
:
'recordPage'
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
recordPage
.
pageNum
=
obj
.
curr
recordPage
.
pageSize
=
obj
.
limit
//首次不执行
if
(
!
first
)
{
//do something
getRecordTable
()
var
recordPage
=
{
pageNum
:
1
,
pageSize
:
10
}
var
recordPageOptions
=
{
elem
:
'recordPage'
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
recordPage
.
pageNum
=
obj
.
curr
recordPage
.
pageSize
=
obj
.
limit
//首次不执行
if
(
!
first
)
{
//do something
getRecordTable
()
}
}
}
}
var
recordTable
=
table
.
render
({
elem
:
'#recordTable'
,
page
:
false
,
skin
:
'nob'
,
height
:
'full-300'
,
cols
:
[
[
{
field
:
'index'
,
title
:
'序号'
,
align
:
'center'
,
width
:
60
},
{
field
:
'operator'
,
title
:
'登录账户'
,
align
:
'center'
},
{
field
:
'productName'
,
title
:
'登录产品'
,
align
:
'center'
},
{
field
:
'ip'
,
title
:
'登录IP'
,
align
:
'center'
},
{
field
:
'modifyContent'
,
title
:
'修改内容'
,
align
:
'center'
,
width
:
220
},
{
field
:
'userName'
,
title
:
'操作人'
,
align
:
'center'
,
width
:
180
},
{
field
:
'createdTime'
,
title
:
'操作时间'
,
align
:
'center'
,
width
:
200
}
var
recordTable
=
table
.
render
({
elem
:
'#recordTable'
,
page
:
false
,
skin
:
'nob'
,
height
:
'full-300'
,
cols
:
[
[
{
field
:
'index'
,
title
:
'序号'
,
align
:
'center'
,
width
:
60
},
{
field
:
'operator'
,
title
:
'登录账户'
,
align
:
'center'
},
{
field
:
'productName'
,
title
:
'登录产品'
,
align
:
'center'
},
{
field
:
'ip'
,
title
:
'登录IP'
,
align
:
'center'
},
{
field
:
'modifyContent'
,
title
:
'修改内容'
,
align
:
'center'
,
width
:
220
},
{
field
:
'userName'
,
title
:
'操作人'
,
align
:
'center'
,
width
:
180
},
{
field
:
'createdTime'
,
title
:
'操作时间'
,
align
:
'center'
,
width
:
200
}
]
]
]
})
})
/** 调用方法 */
getById
()
getRecordTable
()
/** 调用方法 */
getById
()
getRecordTable
()
/** 触发事件 */
$
(
'#return'
).
on
(
'click'
,
function
()
{
if
(
window
.
location
.
hash
)
{
/** 触发事件 */
$
(
'#return'
).
on
(
'click'
,
function
()
{
if
(
window
.
location
.
hash
)
{
window
.
history
.
back
(
-
1
)
window
.
location
.
hash
=
''
}
window
.
history
.
back
(
-
1
)
window
.
location
.
hash
=
''
}
window
.
history
.
back
(
-
1
)
})
})
$
(
'#basicBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
})
$
(
'#basicBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
})
$
(
'#accountAuthBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#accountAuth'
).
scrollIntoView
(
true
)
})
$
(
'#accountAuthBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#accountAuth'
).
scrollIntoView
(
true
)
})
$
(
'#recordBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#record'
).
scrollIntoView
(
true
)
})
$
(
'#recordBtn'
).
on
(
'click'
,
function
()
{
document
.
querySelector
(
'#record'
).
scrollIntoView
(
true
)
})
/** 定义方法 */
// 查询员工详情
function
getById
()
{
var
params
=
{
id
:
id
,
method
:
'merchants.api.staff.staffSearchRequest'
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
employeeData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
employeeData
[
basicArr
[
i
]]
?
employeeData
[
basicArr
[
i
]]
:
'无'
)
}
// 所属部门
if
(
employeeData
.
department
)
{
switch
(
employeeData
.
department
)
{
case
0
:
$
(
'#department'
).
text
(
'其他'
)
break
;
case
1
:
/** 定义方法 */
// 查询员工详情
function
getById
()
{
var
params
=
{
id
:
id
,
method
:
'merchants.api.staff.staffSearchRequest'
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
employeeData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
employeeData
[
basicArr
[
i
]]
?
employeeData
[
basicArr
[
i
]]
:
'无'
)
}
// 所属部门
//
if (employeeData.department) {
switch
(
employeeData
.
department
)
{
case
0
:
$
(
'#department'
).
text
(
'其他'
)
break
case
1
:
$
(
'#department'
).
text
(
'销售部'
)
break
;
case
2
:
break
case
2
:
$
(
'#department'
).
text
(
'售后部'
)
break
;
case
3
:
break
case
3
:
$
(
'#department'
).
text
(
'客服部'
)
break
;
case
4
:
break
case
4
:
$
(
'#department'
).
text
(
'续保部'
)
break
;
break
default
:
$
(
'#department'
).
text
(
'无'
)
}
}
// 员工标签
if
(
employeeData
.
staffLabel
)
{
employeeData
.
staffLabel
=
employeeData
.
staffLabel
.
split
(
','
)
console
.
log
(
employeeData
.
staffLabel
,
'0'
);
employeeData
.
staffLabel
.
map
((
item
,
index
)
=>
{
switch
(
item
)
{
case
'0'
:
employeeData
.
staffLabel
[
index
]
=
'1.0新车权益销售'
break
;
case
'1'
:
employeeData
.
staffLabel
[
index
]
=
'1.1次新车精品升级'
break
;
case
'2'
:
employeeData
.
staffLabel
[
index
]
=
'1.2次新车线上转化'
break
;
case
'3'
:
employeeData
.
staffLabel
[
index
]
=
'1.3存量用户众筹'
break
;
default
:
employeeData
.
staffLabel
[
index
]
=
'无'
// }
// 员工标签
if
(
employeeData
.
staffLabel
)
{
employeeData
.
staffLabel
=
employeeData
.
staffLabel
.
split
(
','
)
console
.
log
(
employeeData
.
staffLabel
,
'0'
)
employeeData
.
staffLabel
.
map
((
item
,
index
)
=>
{
switch
(
item
)
{
case
'0'
:
employeeData
.
staffLabel
[
index
]
=
'1.0新车权益销售'
break
case
'1'
:
employeeData
.
staffLabel
[
index
]
=
'1.1次新车精品升级'
break
case
'2'
:
employeeData
.
staffLabel
[
index
]
=
'1.2次新车线上转化'
break
case
'3'
:
employeeData
.
staffLabel
[
index
]
=
'1.3存量用户众筹'
break
default
:
employeeData
.
staffLabel
[
index
]
=
'无'
}
})
console
.
log
(
employeeData
.
staffLabel
.
join
(
','
),
'1'
)
$
(
'#staffLabel'
).
text
(
employeeData
.
staffLabel
.
join
(
','
))
}
if
(
employeeData
.
visibleInferiorMerName
)
{
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
if
(
employeeData
.
merchantName
.
indexOf
(
i
)
!=
-
1
)
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'(本商户)'
+
'</li>'
)
}
else
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'</li>'
)
}
})
}
else
{
visibleInferiorMerName
.
remove
()
}
// 账户权限
var
authList
=
employeeData
.
accountTypeTreeResponseList
if
(
authList
&&
authList
.
length
!=
0
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
treeTab
.
tabAdd
(
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
},
true
)
var
menuData
=
[]
// for (var i = 0; i < item.products)
if
(
item
.
products
&&
item
.
products
.
length
!=
0
)
{
$
.
each
(
item
.
products
,
function
(
idx
,
m
)
{
treeTab
.
treeTabDetail
(
{
name
:
m
.
productName
,
value
:
m
.
productId
},
item
.
accounttypeId
,
m
.
merchantProTreeResponses
)
})
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
treeTab
.
tabChange
(
filterName
,
productId
)
}
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
()
}
})
console
.
log
(
employeeData
.
staffLabel
.
join
(
','
),
'1'
);
$
(
'#staffLabel'
).
text
(
employeeData
.
staffLabel
.
join
(
','
))
}
if
(
employeeData
.
visibleInferiorMerName
)
{
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
if
(
employeeData
.
merchantName
.
indexOf
(
i
)
!=
-
1
)
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'(本商户)'
+
'</li>'
)
}
else
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'</li>'
)
}
})
}
else
{
visibleInferiorMerName
.
remove
()
})
}
// 修改记录
function
getRecordTable
(
isResetPageNum
)
{
var
params
=
{
bussinessId
:
id
,
moduleName
:
'员工模块'
,
pageNum
:
recordPage
.
pageNum
,
pageSize
:
recordPage
.
pageSize
,
method
:
'merchants.api.menu.findLog'
}
request
(
params
,
function
(
res
)
{
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
recordPage
.
pageSize
*
(
recordPage
.
pageNum
-
1
)
data
.
data
[
index
].
modifyContent
=
item
.
module
+
'-'
+
item
.
action
})
var
options
=
{
data
:
data
.
data
}
// 账户权限
var
authList
=
employeeData
.
accountTypeTreeResponseList
if
(
authList
&&
authList
.
length
!=
0
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
treeTab
.
tabAdd
(
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
},
true
)
var
menuData
=
[]
// for (var i = 0; i < item.products)
if
(
item
.
products
&&
item
.
products
.
length
!=
0
)
{
$
.
each
(
item
.
products
,
function
(
idx
,
m
)
{
treeTab
.
treeTabDetail
(
{
name
:
m
.
productName
,
value
:
m
.
productId
},
item
.
accounttypeId
,
m
.
merchantProTreeResponses
)
})
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
treeTab
.
tabChange
(
filterName
,
productId
)
}
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
();
recordPageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
recordPageOptions
.
curr
=
1
}
}
})
}
// 修改记录
function
getRecordTable
(
isResetPageNum
)
{
var
params
=
{
bussinessId
:
id
,
moduleName
:
'员工模块'
,
pageNum
:
recordPage
.
pageNum
,
pageSize
:
recordPage
.
pageSize
,
method
:
'merchants.api.menu.findLog'
}
request
(
params
,
function
(
res
)
{
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
recordPage
.
pageSize
*
(
recordPage
.
pageNum
-
1
)
data
.
data
[
index
].
modifyContent
=
item
.
module
+
'-'
+
item
.
action
laypage
.
render
(
recordPageOptions
)
recordTable
.
reload
(
options
)
})
var
options
=
{
data
:
data
.
data
}
recordPageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
recordPageOptions
.
curr
=
1
}
laypage
.
render
(
recordPageOptions
)
recordTable
.
reload
(
options
)
})
}
})
</script>
</body>
</html>
\ No newline at end of file
}
})
</script>
</body>
</html>
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