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 1030837a
authored
Nov 05, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
去掉console
1 parent
e1f1bb72
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
140 additions
and
246 deletions
html/employee/add.html
html/employee/detail.html
html/employee/index.html
html/employee/validPeriod.html
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
html/merchant/validPeriodForm.html
html/role/add.html
html/role/detail.html
html/role/index.html
html/role/tree.html
js/gtree.js
js/helper.js
js/treeTab.js
html/employee/add.html
View file @
1030837
...
@@ -287,7 +287,6 @@
...
@@ -287,7 +287,6 @@
radio
:
true
,
radio
:
true
,
data
:
[],
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
merchantId
=
data
.
change
[
0
].
id
merchantId
=
data
.
change
[
0
].
id
getList
(
merchantId
)
getList
(
merchantId
)
}
}
...
@@ -387,7 +386,6 @@
...
@@ -387,7 +386,6 @@
// 提交表单
// 提交表单
form
.
on
(
'submit(employeeSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(employeeSubmit)'
,
function
(
data
)
{
console
.
log
(
data
)
if
(
visibleMerchant
.
getCheckedNodes
(
true
).
length
==
0
)
{
if
(
visibleMerchant
.
getCheckedNodes
(
true
).
length
==
0
)
{
layer
.
msg
(
'可见商户必选'
,
{
layer
.
msg
(
'可见商户必选'
,
{
icon
:
2
icon
:
2
...
@@ -415,7 +413,6 @@
...
@@ -415,7 +413,6 @@
}
}
var
params
=
helper
.
clone
(
true
,
data
.
field
,
otherParams
)
var
params
=
helper
.
clone
(
true
,
data
.
field
,
otherParams
)
delete
params
.
merhcnatImg
delete
params
.
merhcnatImg
console
.
log
(
params
)
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
@@ -434,7 +431,6 @@
...
@@ -434,7 +431,6 @@
// select 选择触发
// select 选择触发
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
console
.
log
(
data
.
value
)
merchantId
=
data
.
value
merchantId
=
data
.
value
getList
(
merchantId
)
getList
(
merchantId
)
})
})
...
@@ -488,7 +484,6 @@
...
@@ -488,7 +484,6 @@
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
console
.
log
(
result
.
data
)
merchantNameSelect
.
update
({
merchantNameSelect
.
update
({
data
:
result
.
data
,
data
:
result
.
data
,
autoRow
:
true
,
autoRow
:
true
,
...
@@ -527,7 +522,6 @@
...
@@ -527,7 +522,6 @@
var
params
=
{
id
:
id
,
method
:
'cn.com.glsx.merchants.staff.staffSearchRequest'
}
var
params
=
{
id
:
id
,
method
:
'cn.com.glsx.merchants.staff.staffSearchRequest'
}
pwd
.
attr
(
'readonly'
,
true
)
pwd
.
attr
(
'readonly'
,
true
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
var
data
=
res
.
data
var
data
=
res
.
data
employeeForm
=
{
employeeForm
=
{
...
@@ -556,7 +550,6 @@
...
@@ -556,7 +550,6 @@
// var visibleInferiorMerArr = [32, 38]
// var visibleInferiorMerArr = [32, 38]
callback
(
visibleInferiorMerArr
)
callback
(
visibleInferiorMerArr
)
}
}
console
.
log
(
employeeForm
,
merchantFileRequest
)
form
.
val
(
'employeeForm'
,
employeeForm
)
form
.
val
(
'employeeForm'
,
employeeForm
)
form
.
render
(
'select'
)
form
.
render
(
'select'
)
})
})
...
...
html/employee/detail.html
View file @
1030837
<!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"
/>
...
@@ -9,19 +10,22 @@
...
@@ -9,19 +10,22 @@
<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>
</head>
</head>
<style>
<style>
.sub-bg-white
{
.sub-bg-white
{
width
:
100%
;
width
:
100%
;
background-color
:
#f4f5fa
;
background-color
:
#f4f5fa
;
padding-top
:
8px
;
padding-top
:
8px
;
}
}
.sub-title
{
.sub-title
{
margin-top
:
21px
;
margin-top
:
21px
;
}
}
.content-title
{
.content-title
{
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.fixed-btn
{
.fixed-btn
{
position
:
fixed
;
position
:
fixed
;
right
:
10px
;
right
:
10px
;
...
@@ -30,6 +34,7 @@
...
@@ -30,6 +34,7 @@
border-radius
:
20px
;
border-radius
:
20px
;
text-align
:
center
;
text-align
:
center
;
}
}
.fixed-btn
a
{
.fixed-btn
a
{
display
:
block
;
display
:
block
;
width
:
40px
;
width
:
40px
;
...
@@ -37,9 +42,11 @@
...
@@ -37,9 +42,11 @@
color
:
#fff
;
color
:
#fff
;
border-bottom
:
1px
solid
#fff
;
border-bottom
:
1px
solid
#fff
;
}
}
.fixed-btn
a
:last-child
{
.fixed-btn
a
:last-child
{
border-bottom
:
none
;
border-bottom
:
none
;
}
}
.topwrap
,
.topwrap
,
.topmidwrap
,
.topmidwrap
,
.topbottomwrap
,
.topbottomwrap
,
...
@@ -55,9 +62,11 @@
...
@@ -55,9 +62,11 @@
/* min-height: calc(100vh - 480px); */
/* min-height: calc(100vh - 480px); */
padding-bottom
:
10px
;
padding-bottom
:
10px
;
}
}
.topbottomwrap
{
.topbottomwrap
{
min-height
:
calc
(
100vh
-
200px
);
min-height
:
calc
(
100vh
-
200px
);
}
}
.grayLine
{
.grayLine
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -66,13 +75,16 @@
...
@@ -66,13 +75,16 @@
width
:
100%
;
width
:
100%
;
height
:
1px
;
height
:
1px
;
}
}
.layui-tab-content
{
.layui-tab-content
{
position
:
relative
;
position
:
relative
;
}
}
.layui-no-data
{
.layui-no-data
{
width
:
100%
;
width
:
100%
;
height
:
500px
;
height
:
500px
;
}
}
.layui-no-data
.no-data
{
.layui-no-data
.no-data
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
...
@@ -82,9 +94,11 @@
...
@@ -82,9 +94,11 @@
font-size
:
14px
;
font-size
:
14px
;
line-height
:
22px
;
line-height
:
22px
;
}
}
.layui-no-data
.no-data
div
{
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
margin-top
:
12px
;
}
}
.show
{
.show
{
display
:
inline-block
;
display
:
inline-block
;
}
}
...
@@ -92,16 +106,19 @@
...
@@ -92,16 +106,19 @@
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
.wrapper
.employeeDetail
.layui-this
{
.wrapper
.employeeDetail
.layui-this
{
color
:
#5850ff
;
color
:
#5850ff
;
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
}
}
.wrapper
,
.wrapper
,
.detail
{
.detail
{
padding-bottom
:
100px
;
padding-bottom
:
100px
;
}
}
</style>
</style>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"wrapper detail"
>
<main
class=
"wrapper detail"
>
<div
class=
"layui-tab layui-tab-brief"
lay-filter=
"editTab"
>
<div
class=
"layui-tab layui-tab-brief"
lay-filter=
"editTab"
>
...
@@ -169,7 +186,8 @@
...
@@ -169,7 +186,8 @@
<div
class=
"topbottomwrap"
>
<div
class=
"topbottomwrap"
>
<div
class=
"grayLine"
></div>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title sub-title"
id=
"accountAuth"
>
账户权限
</h3>
<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"
>
<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>
<ul
class=
"layui-tab-title"
></ul>
<div
class=
"layui-tab-content"
></div>
<div
class=
"layui-tab-content"
></div>
</div>
</div>
...
@@ -332,7 +350,6 @@
...
@@ -332,7 +350,6 @@
}
}
// 账户权限
// 账户权限
var
authList
=
employeeData
.
accountTypeTreeResponseList
var
authList
=
employeeData
.
accountTypeTreeResponseList
console
.
log
(
authList
)
if
(
authList
&&
authList
.
length
!=
0
)
{
if
(
authList
&&
authList
.
length
!=
0
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
treeTab
.
tabAdd
(
treeTab
.
tabAdd
(
...
@@ -360,7 +377,6 @@
...
@@ -360,7 +377,6 @@
treeTab
.
tabChange
(
filterName
,
productId
)
treeTab
.
tabChange
(
filterName
,
productId
)
}
}
})
})
console
.
log
(
authList
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
}
}
}
}
...
@@ -395,5 +411,6 @@
...
@@ -395,5 +411,6 @@
}
}
})
})
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/employee/index.html
View file @
1030837
<!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"
/>
...
@@ -11,23 +12,26 @@
...
@@ -11,23 +12,26 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/employee.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/commonResetIndex.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/commonResetIndex.css"
/>
<title>
员工管理
</title>
<title>
员工管理
</title>
</head>
</head>
<style>
<style>
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
300px
;
width
:
300px
;
}
}
xm-select
:hover
{
xm-select
:hover
{
border
:
1px
solid
#5850ff
!important
;
border
:
1px
solid
#5850ff
!important
;
}
}
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
.show
{
.show
{
display
:
inline-block
;
display
:
inline-block
;
}
}
</style>
</style>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main>
<main>
<div>
<div>
...
@@ -56,7 +60,8 @@
...
@@ -56,7 +60,8 @@
<div
class=
"layui-inline creater"
>
<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 roleId hide"
pane
>
<div
class=
"layui-inline roleId hide"
pane
>
...
@@ -79,7 +84,8 @@
...
@@ -79,7 +84,8 @@
</select>
</select>
</div>
</div>
<div
class=
"layui-input-inline"
style=
"width: 250px"
>
<div
class=
"layui-input-inline"
style=
"width: 250px"
>
<input
type=
"text"
name=
"keywords"
required
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input updateCircleAngle"
/>
<input
type=
"text"
name=
"keywords"
required
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input updateCircleAngle"
/>
</div>
</div>
</div>
</div>
...
@@ -115,9 +121,8 @@
...
@@ -115,9 +121,8 @@
// }
// }
var
roleId
=
$
(
'#roleId'
)
var
roleId
=
$
(
'#roleId'
)
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
console
.
log
(
'accountInfo'
,
accountInfo
)
if
(
accountInfo
)
{
if
(
accountInfo
)
{
if
(
accountInfo
.
merchantAccountLevel
==
4
)
{
if
(
accountInfo
.
merchantAccountLevel
==
4
)
{
$
(
'.merchantNames'
).
addClass
(
'hide'
)
$
(
'.merchantNames'
).
addClass
(
'hide'
)
}
}
$
(
'.creater'
).
addClass
(
'hide'
)
$
(
'.creater'
).
addClass
(
'hide'
)
...
@@ -196,8 +201,6 @@
...
@@ -196,8 +201,6 @@
layout
:
[
'count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
)
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
limit
)
//得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
page
.
pageSize
=
obj
.
limit
//首次不执行
//首次不执行
...
@@ -219,8 +222,7 @@
...
@@ -219,8 +222,7 @@
filterable
:
true
,
filterable
:
true
,
radio
:
true
,
radio
:
true
,
data
:
[],
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
if
(
data
.
isAdd
)
{
if
(
data
.
isAdd
)
{
var
id
=
data
.
change
[
0
].
id
var
id
=
data
.
change
[
0
].
id
findRoleList
(
id
)
findRoleList
(
id
)
...
@@ -253,14 +255,12 @@
...
@@ -253,14 +255,12 @@
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
index
)
layer
.
close
(
index
)
console
.
log
(
'shanchu'
)
getTabelList
(
employeeTable
)
getTabelList
(
employeeTable
)
}
}
})
})
//向服务端发送删除指令
//向服务端发送删除指令
})
})
}
else
if
(
layEvent
===
'updateTime'
)
{
}
else
if
(
layEvent
===
'updateTime'
)
{
console
.
log
(
data
.
id
,
data
.
effectiveTime
)
layer
.
open
({
layer
.
open
({
type
:
2
,
type
:
2
,
title
:
''
,
title
:
''
,
...
@@ -291,7 +291,6 @@
...
@@ -291,7 +291,6 @@
//监听性别操作
//监听性别操作
form
.
on
(
'switch(sexDemo)'
,
function
(
obj
)
{
form
.
on
(
'switch(sexDemo)'
,
function
(
obj
)
{
console
.
log
(
obj
,
obj
.
elem
.
checked
)
if
(
this
.
value
==
'-'
)
{
if
(
this
.
value
==
'-'
)
{
obj
.
elem
.
checked
=
!
obj
.
elem
.
checked
obj
.
elem
.
checked
=
!
obj
.
elem
.
checked
form
.
render
(
'checkbox'
)
form
.
render
(
'checkbox'
)
...
@@ -319,7 +318,6 @@
...
@@ -319,7 +318,6 @@
// 查询事件
// 查询事件
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
$
(
'#employeeSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
getSearch
()
var
searchData
=
getSearch
()
console
.
log
(
searchData
)
getTabelList
(
employeeTable
,
searchData
,
true
)
getTabelList
(
employeeTable
,
searchData
,
true
)
})
})
...
@@ -378,9 +376,7 @@
...
@@ -378,9 +376,7 @@
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
console
.
log
(
result
.
data
)
if
(
accountInfo
&&
accountInfo
.
merchantAccountLevel
==
4
)
{
if
(
accountInfo
&&
accountInfo
.
merchantAccountLevel
==
4
)
{
console
.
log
(
result
.
data
[
0
].
id
)
findRoleList
(
result
.
data
[
0
].
id
)
findRoleList
(
result
.
data
[
0
].
id
)
}
else
{
}
else
{
merchantNameSelect
.
update
({
merchantNameSelect
.
update
({
...
@@ -459,8 +455,10 @@
...
@@ -459,8 +455,10 @@
<script
type=
"text/html"
id=
"switchTpl"
>
<script
type=
"text/html"
id=
"switchTpl"
>
<!--
这里的
checked
的状态只是演示
-->
<!--
这里的
checked
的状态只是演示
-->
<
div
class
=
"switch"
>
<
div
class
=
"switch"
>
<
input
type
=
"checkbox"
name
=
"sex"
value
=
"{{d.roleName}}"
data
-
id
=
"{{d.id}}"
lay
-
skin
=
"switch"
lay
-
text
=
"开|关"
lay
-
filter
=
"sexDemo"
{{
d
.
status
==
0
?
'checked'
:
''
}}
>
<
input
type
=
"checkbox"
name
=
"sex"
value
=
"{{d.roleName}}"
data
-
id
=
"{{d.id}}"
lay
-
skin
=
"switch"
lay
-
text
=
"开|关"
lay
-
filter
=
"sexDemo"
{{
d
.
status
==
0
?
'checked'
:
''
}}
>
<
/div
>
<
/div
>
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/employee/validPeriod.html
View file @
1030837
<!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"
/>
...
@@ -16,9 +17,9 @@
...
@@ -16,9 +17,9 @@
}
}
</style>
</style>
<title>
修改有效期
</title>
<title>
修改有效期
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"valid-period"
>
<main
class=
"valid-period"
>
<form
class=
"layui-form"
lay-filter=
"periodFilter"
>
<form
class=
"layui-form"
lay-filter=
"periodFilter"
>
...
@@ -59,7 +60,6 @@
...
@@ -59,7 +60,6 @@
getVaildPeriod
()
getVaildPeriod
()
form
.
on
(
'submit(periodSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(periodSubmit)'
,
function
(
data
)
{
console
.
log
(
data
.
field
,
vaildData
)
// 调接口
// 调接口
var
params
=
{
var
params
=
{
method
:
'cn.com.glsx.merchants.staff.updateValPerByStaffId'
,
method
:
'cn.com.glsx.merchants.staff.updateValPerByStaffId'
,
...
@@ -102,7 +102,6 @@
...
@@ -102,7 +102,6 @@
form
.
val
(
'periodFilter'
,
{
form
.
val
(
'periodFilter'
,
{
effectiveTime
:
vaildData
.
effectiveTime
effectiveTime
:
vaildData
.
effectiveTime
})
})
console
.
log
(
vaildData
.
effectiveTime
)
form
.
render
(
'select'
)
form
.
render
(
'select'
)
}
}
}
}
...
@@ -110,5 +109,6 @@
...
@@ -110,5 +109,6 @@
}
}
})
})
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/merchant/add.html
View file @
1030837
...
@@ -624,7 +624,6 @@
...
@@ -624,7 +624,6 @@
format
:
'yyyy-MM-dd'
,
format
:
'yyyy-MM-dd'
,
min
:
'2021-09-30'
,
min
:
'2021-09-30'
,
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
)
expireDate
.
config
.
min
=
date
expireDate
.
config
.
min
=
date
lay
(
'#effectiveStarttime'
).
html
(
value
)
lay
(
'#effectiveStarttime'
).
html
(
value
)
}
}
...
@@ -715,7 +714,6 @@
...
@@ -715,7 +714,6 @@
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
// document.querySelector('#basic').scrollIntoView(true)
// document.querySelector('#basic').scrollIntoView(true)
console
.
log
(
data
)
var
formData
=
data
.
field
var
formData
=
data
.
field
var
params
=
{
var
params
=
{
isloginName
:
0
isloginName
:
0
...
@@ -996,7 +994,6 @@
...
@@ -996,7 +994,6 @@
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1004,7 +1001,6 @@
...
@@ -1004,7 +1001,6 @@
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1012,7 +1008,6 @@
...
@@ -1012,7 +1008,6 @@
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1504,7 +1499,6 @@
...
@@ -1504,7 +1499,6 @@
},
},
// tab Change
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
console
.
log
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
if
(
name
==
'roleAuth'
)
{
if
(
name
==
'roleAuth'
)
{
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
...
@@ -1547,16 +1541,13 @@
...
@@ -1547,16 +1541,13 @@
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
var
isAdd
=
data
.
elem
.
checked
var
isAdd
=
data
.
elem
.
checked
var
filterName
=
'treeTab'
+
roleId
var
filterName
=
'treeTab'
+
roleId
console
.
log
(
roleId
,
projectId
,
isAdd
)
// merchantProTreeResponses
// merchantProTreeResponses
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
console
.
log
(
changeObj
,
products
,
roleId
,
treeData
)
if
(
isAdd
)
{
if
(
isAdd
)
{
// 新增
// 新增
active
.
treeTabAdd
(
active
.
treeTabAdd
(
...
@@ -1586,7 +1577,6 @@
...
@@ -1586,7 +1577,6 @@
})
})
}
else
{
}
else
{
// 删除
// 删除
console
.
log
(
treeData
,
Object
.
keys
(
treeData
).
length
)
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
active
.
tabDelete
(
filterName
,
productId
)
active
.
tabDelete
(
filterName
,
productId
)
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
...
@@ -1626,38 +1616,17 @@
...
@@ -1626,38 +1616,17 @@
menuFunTreeData
=
res
.
data
menuFunTreeData
=
res
.
data
var
accountType
=
$
(
'#accountType'
)
var
accountType
=
$
(
'#accountType'
)
accountType
.
empty
()
accountType
.
empty
()
console
.
log
(
menuFunTreeData
)
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
accountType
.
append
(
str
)
if
(
merchantId
)
{
if
(
merchantId
)
{
console
.
log
(
check_arr
)
check_arr
.
forEach
(
i
=>
{
check_arr
.
forEach
(
i
=>
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
var
productData
=
i
var
productData
=
i
var
id
=
item
.
accounttypeId
var
id
=
item
.
accounttypeId
console
.
log
(
'productData'
,
productData
)
str
.
attr
(
'checked'
,
true
)
str
.
attr
(
'checked'
,
true
)
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
active
.
tabAdd
(
obj
,
productData
.
products
)
active
.
tabAdd
(
obj
,
productData
.
products
)
// productData.products.forEach(j => {
// console.log(j, item)
// var products = item.products.find(n => n.productId == j.productId)
// console.log(products)
// active.treeTabAdd(
// {
// name: j.productName,
// value: j.productId
// },
// item.accounttypeId,
// products.merchantProTreeResponses,
// j.menuIds
// )
// })
// var filterName = 'treeTab' + item.accounttypeId
// var productId = 'tab_' + item.accounttypeId + '_' + productData.products[0].productId
// console.log(filterName, productId)
// active.tabChange(filterName, productId)
}
}
})
})
}
}
...
@@ -1697,7 +1666,6 @@
...
@@ -1697,7 +1666,6 @@
for
(
var
key
in
treeData
)
{
for
(
var
key
in
treeData
)
{
var
accountObj
=
treeData
[
key
]
var
accountObj
=
treeData
[
key
]
var
productList
=
[]
var
productList
=
[]
console
.
log
(
accountObj
)
if
(
Object
.
keys
(
accountObj
).
length
!=
0
)
{
if
(
Object
.
keys
(
accountObj
).
length
!=
0
)
{
for
(
var
i
in
accountObj
)
{
for
(
var
i
in
accountObj
)
{
var
productObj
=
accountObj
[
i
]
var
productObj
=
accountObj
[
i
]
...
@@ -1797,7 +1765,6 @@
...
@@ -1797,7 +1765,6 @@
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
getAuthList
()
getAuthList
()
console
.
log
(
requestList
)
if
(
requestList
.
length
!=
0
)
{
if
(
requestList
.
length
!=
0
)
{
var
params
=
{
var
params
=
{
merchantId
:
merchantId
,
merchantId
:
merchantId
,
...
...
html/merchant/addSubMerchant.html
View file @
1030837
...
@@ -531,7 +531,6 @@
...
@@ -531,7 +531,6 @@
// 1-基本信息;2-权限树
// 1-基本信息;2-权限树
var
step
=
1
var
step
=
1
var
merchantId
=
null
var
merchantId
=
null
console
.
log
(
qs
(
'parentId'
))
var
parentMerchantId
=
null
var
parentMerchantId
=
null
var
accountTypeVisible
=
false
var
accountTypeVisible
=
false
// 是否工厂
// 是否工厂
...
@@ -625,7 +624,6 @@
...
@@ -625,7 +624,6 @@
format
:
'yyyy-MM-dd'
,
format
:
'yyyy-MM-dd'
,
min
:
helper
.
dateFormat
(
new
Date
()),
min
:
helper
.
dateFormat
(
new
Date
()),
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
date
.
date
=
date
.
date
+
1
date
.
date
=
date
.
date
+
1
$
(
'#expireDate'
).
val
(
''
)
$
(
'#expireDate'
).
val
(
''
)
...
@@ -721,7 +719,6 @@
...
@@ -721,7 +719,6 @@
// select 选择触发
// select 选择触发
form
.
on
(
'select(accountLevel)'
,
function
(
data
)
{
form
.
on
(
'select(accountLevel)'
,
function
(
data
)
{
console
.
log
(
data
.
value
,
accountInfo
)
if
(
!
accountInfo
)
{
if
(
!
accountInfo
)
{
if
(
data
.
value
==
4
)
{
if
(
data
.
value
==
4
)
{
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
...
@@ -729,7 +726,6 @@
...
@@ -729,7 +726,6 @@
$
(
'#effectiveStarttime'
).
attr
(
'lay-verify'
,
'required'
)
$
(
'#effectiveStarttime'
).
attr
(
'lay-verify'
,
'required'
)
$
(
'#expireDate'
).
attr
(
'lay-verify'
,
'required'
)
$
(
'#expireDate'
).
attr
(
'lay-verify'
,
'required'
)
}
else
{
}
else
{
console
.
log
(
'jinlai'
)
$
(
'#effectiveShowEl'
).
removeClass
(
'show'
)
$
(
'#effectiveShowEl'
).
removeClass
(
'show'
)
$
(
'#effectiveShowEl'
).
addClass
(
'hide'
)
$
(
'#effectiveShowEl'
).
addClass
(
'hide'
)
$
(
'#effectiveStarttime'
).
removeAttr
(
'lay-verify'
)
$
(
'#effectiveStarttime'
).
removeAttr
(
'lay-verify'
)
...
@@ -739,7 +735,6 @@
...
@@ -739,7 +735,6 @@
})
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
// document.querySelector('#basic').scrollIntoView(true)
// document.querySelector('#basic').scrollIntoView(true)
console
.
log
(
data
)
var
formData
=
data
.
field
var
formData
=
data
.
field
var
params
=
{
var
params
=
{
isloginName
:
0
isloginName
:
0
...
@@ -1024,7 +1019,6 @@
...
@@ -1024,7 +1019,6 @@
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
...
@@ -1033,7 +1027,6 @@
...
@@ -1033,7 +1027,6 @@
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
...
@@ -1042,7 +1035,6 @@
...
@@ -1042,7 +1035,6 @@
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
...
@@ -1530,7 +1522,6 @@
...
@@ -1530,7 +1522,6 @@
},
},
// tab Change
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
console
.
log
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
if
(
name
==
'roleAuth'
)
{
if
(
name
==
'roleAuth'
)
{
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
...
@@ -1573,16 +1564,13 @@
...
@@ -1573,16 +1564,13 @@
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
var
isAdd
=
data
.
elem
.
checked
var
isAdd
=
data
.
elem
.
checked
var
filterName
=
'treeTab'
+
roleId
var
filterName
=
'treeTab'
+
roleId
console
.
log
(
roleId
,
projectId
,
isAdd
)
// merchantProTreeResponses
// merchantProTreeResponses
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
console
.
log
(
changeObj
,
products
,
roleId
,
treeData
)
if
(
isAdd
)
{
if
(
isAdd
)
{
// 新增
// 新增
active
.
treeTabAdd
(
active
.
treeTabAdd
(
...
@@ -1612,7 +1600,6 @@
...
@@ -1612,7 +1600,6 @@
})
})
}
else
{
}
else
{
// 删除
// 删除
console
.
log
(
treeData
,
Object
.
keys
(
treeData
).
length
)
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
active
.
tabDelete
(
filterName
,
productId
)
active
.
tabDelete
(
filterName
,
productId
)
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
...
@@ -1652,38 +1639,17 @@
...
@@ -1652,38 +1639,17 @@
menuFunTreeData
=
res
.
data
menuFunTreeData
=
res
.
data
var
accountType
=
$
(
'#accountType'
)
var
accountType
=
$
(
'#accountType'
)
accountType
.
empty
()
accountType
.
empty
()
console
.
log
(
menuFunTreeData
)
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
accountType
.
append
(
str
)
if
(
merchantId
)
{
if
(
merchantId
)
{
console
.
log
(
check_arr
)
check_arr
.
forEach
(
i
=>
{
check_arr
.
forEach
(
i
=>
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
var
productData
=
i
var
productData
=
i
var
id
=
item
.
accounttypeId
var
id
=
item
.
accounttypeId
console
.
log
(
'productData'
,
productData
)
str
.
attr
(
'checked'
,
true
)
str
.
attr
(
'checked'
,
true
)
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
active
.
tabAdd
(
obj
,
productData
.
products
)
active
.
tabAdd
(
obj
,
productData
.
products
)
// productData.products.forEach(j => {
// console.log(j, item)
// var products = item.products.find(n => n.productId == j.productId)
// console.log(products)
// active.treeTabAdd(
// {
// name: j.productName,
// value: j.productId
// },
// item.accounttypeId,
// products.merchantProTreeResponses,
// j.menuIds
// )
// })
// var filterName = 'treeTab' + item.accounttypeId
// var productId = 'tab_' + item.accounttypeId + '_' + productData.products[0].productId
// console.log(filterName, productId)
// active.tabChange(filterName, productId)
}
}
})
})
}
}
...
@@ -1800,7 +1766,6 @@
...
@@ -1800,7 +1766,6 @@
}
else
{
}
else
{
params
.
accountTypes
=
JSON
.
stringify
([])
params
.
accountTypes
=
JSON
.
stringify
([])
}
}
console
.
log
(
requestList
,
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
...
html/merchant/detail.html
View file @
1030837
<!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"
/>
...
@@ -18,6 +19,7 @@
...
@@ -18,6 +19,7 @@
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
.pull-right
{
.pull-right
{
float
:
right
;
float
:
right
;
}
}
...
@@ -40,7 +42,7 @@
...
@@ -40,7 +42,7 @@
word-break
:
break-all
;
word-break
:
break-all
;
}
}
.merchant-content
>
div
:not
(
:first-child
)
{
.merchant-content
>
div
:not
(
:first-child
)
{
margin-left
:
15px
;
margin-left
:
15px
;
height
:
20px
;
height
:
20px
;
font-size
:
12px
;
font-size
:
12px
;
...
@@ -52,10 +54,12 @@
...
@@ -52,10 +54,12 @@
.layui-form
{
.layui-form
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.wrapper-merchant
{
.wrapper-merchant
{
background-color
:
#f4f5fa
;
background-color
:
#f4f5fa
;
display
:
flex
;
display
:
flex
;
}
}
.merchant-left
{
.merchant-left
{
padding-top
:
15px
;
padding-top
:
15px
;
min-height
:
calc
(
100vh
-
200px
);
min-height
:
calc
(
100vh
-
200px
);
...
@@ -65,12 +69,15 @@
...
@@ -65,12 +69,15 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.ztree
.wrapper-tree
{
.ztree
.wrapper-tree
{
overflow-y
:
auto
;
overflow-y
:
auto
;
}
}
.wrapper-tree
::-webkit-scrollbar
{
.wrapper-tree
::-webkit-scrollbar
{
display
:
none
;
display
:
none
;
}
}
.wrapper-tree
.node_name
{
.wrapper-tree
.node_name
{
display
:
inline-block
;
display
:
inline-block
;
max-width
:
235px
;
max-width
:
235px
;
...
@@ -79,9 +86,11 @@
...
@@ -79,9 +86,11 @@
white-space
:
nowrap
;
white-space
:
nowrap
;
word-break
:
break-all
;
word-break
:
break-all
;
}
}
.detail
.wrapper-tree
{
.detail
.wrapper-tree
{
margin-left
:
0
;
margin-left
:
0
;
}
}
.merchant-right
{
.merchant-right
{
padding-top
:
15px
;
padding-top
:
15px
;
...
@@ -93,7 +102,7 @@
...
@@ -93,7 +102,7 @@
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.merchant-right
>
div
:first-child
{
.merchant-right
>
div
:first-child
{
/* position: relative;
/* position: relative;
height: 40px;
height: 40px;
line-height: 40px; */
line-height: 40px; */
...
@@ -101,9 +110,11 @@
...
@@ -101,9 +110,11 @@
align-items
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.layui-form-label
{
.layui-form-label
{
width
:
130px
!important
;
width
:
130px
!important
;
}
}
.merchant-right
.companyName
{
.merchant-right
.companyName
{
display
:
inline-block
;
display
:
inline-block
;
max-width
:
300px
;
max-width
:
300px
;
...
@@ -118,6 +129,7 @@
...
@@ -118,6 +129,7 @@
white-space
:
nowrap
;
white-space
:
nowrap
;
word-break
:
break-all
;
word-break
:
break-all
;
}
}
.merchant-right
.emloyeeListText
{
.merchant-right
.emloyeeListText
{
display
:
inline-block
;
display
:
inline-block
;
height
:
36px
;
height
:
36px
;
...
@@ -176,18 +188,23 @@
...
@@ -176,18 +188,23 @@
margin
:
0
10px
;
margin
:
0
10px
;
/* background-color: #f4f6fc; */
/* background-color: #f4f6fc; */
}
}
.layui-tab-title
.layui-this
{
.layui-tab-title
.layui-this
{
transform
:
none
;
transform
:
none
;
}
}
.layui-tab-title
{
.layui-tab-title
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
}
}
.layui-tab-card
>
.layui-tab-title
li
{
.layui-tab-card
>
.layui-tab-title
li
{
margin-left
:
0
;
margin-left
:
0
;
}
}
.outtitle
{
.outtitle
{
margin-left
:
-10px
;
margin-left
:
-10px
;
}
}
.powerlimt
.layui-tab-content
{
.powerlimt
.layui-tab-content
{
background-color
:
#fff
;
background-color
:
#fff
;
}
}
...
@@ -215,9 +232,11 @@
...
@@ -215,9 +232,11 @@
line-height
:
28px
;
line-height
:
28px
;
font-size
:
12px
;
font-size
:
12px
;
}
}
.threeWrap
{
.threeWrap
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
}
}
/* 新增样式 */
/* 新增样式 */
.MsgWrap
{
.MsgWrap
{
position
:
relative
;
position
:
relative
;
...
@@ -225,10 +244,12 @@
...
@@ -225,10 +244,12 @@
margin-bottom
:
20px
;
margin-bottom
:
20px
;
/* min-height: 300px; */
/* min-height: 300px; */
}
}
.powerlimt
{
.powerlimt
{
background-color
:
#fff
;
background-color
:
#fff
;
padding-bottom
:
30px
;
padding-bottom
:
30px
;
}
}
.grayLine
{
.grayLine
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -237,18 +258,21 @@
...
@@ -237,18 +258,21 @@
width
:
100%
;
width
:
100%
;
height
:
1px
;
height
:
1px
;
}
}
.companyMsg
.layui-word-aux
{
.companyMsg
.layui-word-aux
{
color
:
#999
!important
;
color
:
#999
!important
;
padding-left
:
20px
!important
;
padding-left
:
20px
!important
;
padding-right
:
5px
!important
;
padding-right
:
5px
!important
;
padding-top
:
6px
;
padding-top
:
6px
;
}
}
.AccountMsg
.layui-word-aux
{
.AccountMsg
.layui-word-aux
{
color
:
#999
!important
;
color
:
#999
!important
;
padding-left
:
20px
!important
;
padding-left
:
20px
!important
;
padding-right
:
5px
!important
;
padding-right
:
5px
!important
;
padding-top
:
6px
;
padding-top
:
6px
;
}
}
.account-type-span
{
.account-type-span
{
display
:
inline-block
;
display
:
inline-block
;
/* width: 100px; */
/* width: 100px; */
...
@@ -261,19 +285,22 @@
...
@@ -261,19 +285,22 @@
margin-right
:
10px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.detail-content
{
.detail-content
{
padding
:
30px
0
;
padding
:
30px
0
;
}
}
.updateRecord
.layui-table-view
.layui-table
{
.updateRecord
.layui-table-view
.layui-table
{
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
}
.updateRecord
.layui-table-body
{
.updateRecord
.layui-table-body
{
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
}
</style>
</style>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white wrapper detail"
>
<main
class=
"bg-white wrapper detail"
>
<div
class=
"layui-tab layui-top-tab layui-tab-brief bg-detail"
>
<div
class=
"layui-tab layui-top-tab layui-tab-brief bg-detail"
>
...
@@ -636,9 +663,6 @@
...
@@ -636,9 +663,6 @@
getSecondTable
()
getSecondTable
()
getThirdTable
()
getThirdTable
()
}
}
function
btnClick
()
{
console
.
log
(
'jjj'
)
}
// 查询角色详情
// 查询角色详情
function
getFirstInfo
()
{
function
getFirstInfo
()
{
var
params
=
{
var
params
=
{
...
@@ -686,7 +710,6 @@
...
@@ -686,7 +710,6 @@
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
&&
res
.
data
&&
res
.
data
.
length
!=
0
)
{
if
(
res
.
code
==
'0'
&&
res
.
data
&&
res
.
data
.
length
!=
0
)
{
var
authList
=
res
.
data
var
authList
=
res
.
data
console
.
log
(
authList
)
$
.
each
(
authList
,
function
(
index
,
item
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
treeTab
.
tabAdd
(
treeTab
.
tabAdd
(
{
{
...
@@ -728,7 +751,6 @@
...
@@ -728,7 +751,6 @@
id
:
merchantId
id
:
merchantId
},
},
function
(
res
)
{
function
(
res
)
{
console
.
log
(
res
.
data
)
var
data
=
res
.
data
var
data
=
res
.
data
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
?
data
.
merchantName
:
'-'
)
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
?
data
.
merchantName
:
'-'
)
$
(
'#secondmerchantName'
).
attr
(
'title'
,
data
.
merchantName
)
$
(
'#secondmerchantName'
).
attr
(
'title'
,
data
.
merchantName
)
...
@@ -750,7 +772,6 @@
...
@@ -750,7 +772,6 @@
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
}
}
request
(
treeParams
,
function
(
res
)
{
request
(
treeParams
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
{
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
{
check
:
{
check
:
{
...
@@ -834,7 +855,6 @@
...
@@ -834,7 +855,6 @@
// table搜索
// table搜索
$
(
'#tableSearch'
).
on
(
'click'
,
function
()
{
$
(
'#tableSearch'
).
on
(
'click'
,
function
()
{
var
search
=
$
(
'#tableSearchForm'
).
val
()
var
search
=
$
(
'#tableSearchForm'
).
val
()
console
.
log
(
search
)
getSecondTable
({
getSecondTable
({
keyword
:
search
keyword
:
search
})
})
...
@@ -857,7 +877,6 @@
...
@@ -857,7 +877,6 @@
search
search
)
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
// console.log(res)
var
data
=
res
.
data
var
data
=
res
.
data
var
options
=
{
var
options
=
{
data
:
data
data
:
data
...
@@ -895,5 +914,6 @@
...
@@ -895,5 +914,6 @@
}
}
})
})
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/merchant/edit.html
View file @
1030837
...
@@ -525,7 +525,6 @@
...
@@ -525,7 +525,6 @@
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
var
model
=
qs
(
'model'
)
var
model
=
qs
(
'model'
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
// 上级是市代,子商户为门店,显示 有效期
// 上级是市代,子商户为门店,显示 有效期
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
...
@@ -617,7 +616,6 @@
...
@@ -617,7 +616,6 @@
format
:
'yyyy-MM-dd'
,
format
:
'yyyy-MM-dd'
,
min
:
helper
.
dateFormat
(
new
Date
()),
min
:
helper
.
dateFormat
(
new
Date
()),
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
date
.
date
=
date
.
date
+
1
date
.
date
=
date
.
date
+
1
$
(
'#expireDate'
).
val
(
''
)
$
(
'#expireDate'
).
val
(
''
)
...
@@ -646,7 +644,6 @@
...
@@ -646,7 +644,6 @@
// tab 切换
// tab 切换
element
.
on
(
'tab(editTab)'
,
function
(
val
)
{
element
.
on
(
'tab(editTab)'
,
function
(
val
)
{
console
.
log
(
'-------'
,
val
)
})
})
// 校验
// 校验
...
@@ -683,7 +680,6 @@
...
@@ -683,7 +680,6 @@
}
}
},
},
hasModify
:
function
(
value
)
{
hasModify
:
function
(
value
)
{
console
.
log
(
value
,
'=================----------==========='
)
},
},
otherReq
:
function
(
value
,
item
)
{
otherReq
:
function
(
value
,
item
)
{
var
verifyName
=
$
(
item
).
attr
(
'name'
),
var
verifyName
=
$
(
item
).
attr
(
'name'
),
...
@@ -718,7 +714,6 @@
...
@@ -718,7 +714,6 @@
})
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
console
.
log
(
data
)
var
formData
=
data
.
field
var
formData
=
data
.
field
basicSubmited
=
true
basicSubmited
=
true
var
params
=
{
var
params
=
{
...
@@ -840,7 +835,6 @@
...
@@ -840,7 +835,6 @@
}
else
{
}
else
{
params
.
status
=
1
params
.
status
=
1
}
}
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
// if (editLevel == 3) {
// if (editLevel == 3) {
...
@@ -1012,13 +1006,11 @@
...
@@ -1012,13 +1006,11 @@
layer
.
close
(
index
)
layer
.
close
(
index
)
},
},
function
()
{
function
()
{
console
.
log
(
'11111'
)
element
.
tabChange
(
'editTab'
,
1
)
element
.
tabChange
(
'editTab'
,
1
)
step
=
1
step
=
1
}
}
)
)
}
else
{
}
else
{
console
.
log
(
'fou'
)
element
.
tabChange
(
'editTab'
,
1
)
element
.
tabChange
(
'editTab'
,
1
)
step
=
1
step
=
1
init
()
init
()
...
@@ -1031,7 +1023,6 @@
...
@@ -1031,7 +1023,6 @@
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1039,7 +1030,6 @@
...
@@ -1039,7 +1030,6 @@
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1047,7 +1037,6 @@
...
@@ -1047,7 +1037,6 @@
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1150,11 +1139,6 @@
...
@@ -1150,11 +1139,6 @@
// baseIsShow(false)
// baseIsShow(false)
// treeIsShow(true)
// treeIsShow(true)
}
}
console
.
log
(
model
)
// if (qs('status') == 1 && !helper.store.get('accountInfo') && isFactory) {
// $('#merchantModel').removeClass('hide')
// $('#merchantModel').addClass('show')
// }
if
(
!
accountInfo
&&
isFactory
)
{
if
(
!
accountInfo
&&
isFactory
)
{
if
(
qs
(
'status'
)
==
1
)
{
if
(
qs
(
'status'
)
==
1
)
{
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
...
@@ -1284,7 +1268,6 @@
...
@@ -1284,7 +1268,6 @@
getMerchantApi
(
merchantId
,
function
(
res
)
{
getMerchantApi
(
merchantId
,
function
(
res
)
{
form
.
val
(
'merchantForm'
,
res
.
data
)
form
.
val
(
'merchantForm'
,
res
.
data
)
merchantForm
=
res
.
data
merchantForm
=
res
.
data
console
.
log
(
merchantForm
)
if
(
!
isFactory
)
{
if
(
!
isFactory
)
{
merchantForm
.
channelId
=
parentInfo
.
channelId
merchantForm
.
channelId
=
parentInfo
.
channelId
}
}
...
@@ -1635,16 +1618,13 @@
...
@@ -1635,16 +1618,13 @@
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
var
isAdd
=
data
.
elem
.
checked
var
isAdd
=
data
.
elem
.
checked
var
filterName
=
'treeTab'
+
roleId
var
filterName
=
'treeTab'
+
roleId
console
.
log
(
roleId
,
projectId
,
isAdd
)
// merchantProTreeResponses
// merchantProTreeResponses
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
console
.
log
(
changeObj
,
products
,
roleId
,
treeData
)
if
(
isAdd
)
{
if
(
isAdd
)
{
// 新增
// 新增
active
.
treeTabAdd
(
active
.
treeTabAdd
(
...
@@ -1674,7 +1654,6 @@
...
@@ -1674,7 +1654,6 @@
})
})
}
else
{
}
else
{
// 删除
// 删除
console
.
log
(
treeData
,
Object
.
keys
(
treeData
).
length
)
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
active
.
tabDelete
(
filterName
,
productId
)
active
.
tabDelete
(
filterName
,
productId
)
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
...
@@ -1714,24 +1693,20 @@
...
@@ -1714,24 +1693,20 @@
menuFunTreeData
=
res
.
data
menuFunTreeData
=
res
.
data
var
accountType
=
$
(
'#accountType'
)
var
accountType
=
$
(
'#accountType'
)
accountType
.
empty
()
accountType
.
empty
()
console
.
log
(
menuFunTreeData
)
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
accountType
.
append
(
str
)
if
(
merchantId
)
{
if
(
merchantId
)
{
console
.
log
(
check_arr
)
check_arr
.
forEach
(
i
=>
{
check_arr
.
forEach
(
i
=>
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
var
productData
=
i
var
productData
=
i
var
id
=
item
.
accounttypeId
var
id
=
item
.
accounttypeId
console
.
log
(
'productData'
,
productData
)
str
.
attr
(
'checked'
,
true
)
str
.
attr
(
'checked'
,
true
)
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
active
.
tabAdd
(
obj
,
productData
.
products
)
active
.
tabAdd
(
obj
,
productData
.
products
)
if
(
productData
.
products
&&
productData
.
products
.
length
!=
0
)
{
if
(
productData
.
products
&&
productData
.
products
.
length
!=
0
)
{
productData
.
products
.
forEach
(
j
=>
{
productData
.
products
.
forEach
(
j
=>
{
var
products
=
item
.
products
.
find
(
n
=>
n
.
productId
==
j
.
productId
)
var
products
=
item
.
products
.
find
(
n
=>
n
.
productId
==
j
.
productId
)
console
.
log
(
products
)
if
(
products
)
{
if
(
products
)
{
active
.
treeTabAdd
(
active
.
treeTabAdd
(
{
{
...
@@ -1753,7 +1728,6 @@
...
@@ -1753,7 +1728,6 @@
})
})
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
productData
.
products
[
0
].
productId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
productData
.
products
[
0
].
productId
console
.
log
(
filterName
,
productId
)
active
.
tabChange
(
filterName
,
productId
)
active
.
tabChange
(
filterName
,
productId
)
}
}
}
}
...
@@ -1792,11 +1766,9 @@
...
@@ -1792,11 +1766,9 @@
// 获取角色权限数据requestList
// 获取角色权限数据requestList
function
getAuthList
()
{
function
getAuthList
()
{
requestList
=
[]
requestList
=
[]
console
.
log
(
treeData
)
for
(
var
key
in
treeData
)
{
for
(
var
key
in
treeData
)
{
var
accountObj
=
treeData
[
key
]
var
accountObj
=
treeData
[
key
]
var
productList
=
[]
var
productList
=
[]
console
.
log
(
accountObj
)
// 判断是否为空
if
(
Object
.
keys
(
accountObj
).
length
!=
0
)
{
if
(
Object
.
keys
(
accountObj
).
length
!=
0
)
{
for
(
var
i
in
accountObj
)
{
for
(
var
i
in
accountObj
)
{
var
productObj
=
accountObj
[
i
]
var
productObj
=
accountObj
[
i
]
...
@@ -1896,7 +1868,7 @@
...
@@ -1896,7 +1868,7 @@
})
})
function
submitAuth
()
{
function
submitAuth
()
{
if
(
!
accountInfo
&&
merchantAccountLevel
==
4
&&
!
merchantForm
.
effectiveStarttime
)
{
if
(
!
accountInfo
&&
merchantAccountLevel
==
4
&&
!
merchantForm
.
effectiveStarttime
)
{
layer
.
msg
(
'请去“修改基本信息”填写账户有效期'
,
{
layer
.
msg
(
'请去“修改基本信息”填写账户有效期'
,
{
icon
:
2
icon
:
2
})
})
...
@@ -1915,7 +1887,6 @@
...
@@ -1915,7 +1887,6 @@
}
else
{
}
else
{
params
.
status
=
merchantForm
.
status
params
.
status
=
merchantForm
.
status
}
}
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
...
html/merchant/index.html
View file @
1030837
...
@@ -245,7 +245,6 @@
...
@@ -245,7 +245,6 @@
var
$
=
layui
.
$
var
$
=
layui
.
$
var
helper
=
layui
.
helper
var
helper
=
layui
.
helper
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
console
.
log
(
'accountInfo'
,
accountInfo
)
window
.
isDxternal
=
accountInfo
?
1
:
2
// 1 SCRM, default 运营平台
window
.
isDxternal
=
accountInfo
?
1
:
2
// 1 SCRM, default 运营平台
var
baseData
=
{
var
baseData
=
{
statusList
:
[],
statusList
:
[],
...
@@ -265,8 +264,6 @@
...
@@ -265,8 +264,6 @@
layout
:
[
'count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
//obj包含了当前分页的所有参数,比如:
// console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
// console.log(obj.limit); //得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
page
.
pageSize
=
obj
.
limit
//首次不执行
//首次不执行
...
@@ -491,7 +488,6 @@
...
@@ -491,7 +488,6 @@
table
.
on
(
'tool(merchant-table-filter)'
,
function
(
obj
)
{
table
.
on
(
'tool(merchant-table-filter)'
,
function
(
obj
)
{
var
eventName
=
obj
.
event
var
eventName
=
obj
.
event
var
row
=
obj
.
data
var
row
=
obj
.
data
console
.
log
(
row
.
merchantAccountLevel
)
switch
(
eventName
)
{
switch
(
eventName
)
{
// 查看
// 查看
case
'handleDetail'
:
case
'handleDetail'
:
...
@@ -549,7 +545,6 @@
...
@@ -549,7 +545,6 @@
break
break
// 修改账户有效期
// 修改账户有效期
case
'handleVaildPeriod'
:
case
'handleVaildPeriod'
:
// console.log(row)
var
area
=
[
'560px'
,
'230px'
]
var
area
=
[
'560px'
,
'230px'
]
if
(
row
.
merchantAccountLevel
==
4
)
{
if
(
row
.
merchantAccountLevel
==
4
)
{
area
=
[
'750px'
,
'450px'
]
area
=
[
'750px'
,
'450px'
]
...
@@ -628,7 +623,6 @@
...
@@ -628,7 +623,6 @@
method
:
'cn.com.glsx.merchants.menu.findMerchantByPage'
method
:
'cn.com.glsx.merchants.menu.findMerchantByPage'
}
}
var
searchData
=
$
(
'#searchForm [name]'
).
serializeArray
()
var
searchData
=
$
(
'#searchForm [name]'
).
serializeArray
()
// console.log(searchData)
$
.
each
(
searchData
,
function
()
{
$
.
each
(
searchData
,
function
()
{
if
(
this
.
name
==
'merchantLoginAccount'
)
{
if
(
this
.
name
==
'merchantLoginAccount'
)
{
var
attrName
=
params
.
accountOrPhone
==
'0'
?
'merchantLoginAccount'
:
'merchantLegalPersonPhone'
var
attrName
=
params
.
accountOrPhone
==
'0'
?
'merchantLoginAccount'
:
'merchantLegalPersonPhone'
...
@@ -637,7 +631,6 @@
...
@@ -637,7 +631,6 @@
params
[
this
.
name
]
=
this
.
value
params
[
this
.
name
]
=
this
.
value
}
}
})
})
// console.log(params)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
...
@@ -669,7 +662,6 @@
...
@@ -669,7 +662,6 @@
}
}
}
else
{
}
else
{
// 下级商户
// 下级商户
// console.log(item)
item
.
btn
.
edit
=
true
item
.
btn
.
edit
=
true
item
.
btn
.
editPeriod
=
true
item
.
btn
.
editPeriod
=
true
// 直属门店
// 直属门店
...
...
html/merchant/validPeriodForm.html
View file @
1030837
<!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"
/>
...
@@ -12,6 +13,7 @@
...
@@ -12,6 +13,7 @@
#app
{
#app
{
padding
:
0
;
padding
:
0
;
}
}
.valid-period
{
.valid-period
{
/* width: 560px;
/* width: 560px;
height: 230px; */
height: 230px; */
...
@@ -19,17 +21,19 @@
...
@@ -19,17 +21,19 @@
/* padding: 20px 20px; */
/* padding: 20px 20px; */
background-color
:
#ffffff
;
background-color
:
#ffffff
;
}
}
.layui-form-label
{
.layui-form-label
{
width
:
120px
;
width
:
120px
;
}
}
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
</style>
</style>
<title>
修改有效期
</title>
<title>
修改有效期
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"valid-period"
>
<main
class=
"valid-period"
>
<form
class=
"layui-form"
lay-filter=
"periodFilter"
>
<form
class=
"layui-form"
lay-filter=
"periodFilter"
>
...
@@ -50,7 +54,8 @@
...
@@ -50,7 +54,8 @@
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"effectiveStarttime"
disabled
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"effectiveStarttime"
disabled
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
</div>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
...
@@ -92,7 +97,6 @@
...
@@ -92,7 +97,6 @@
if
(
getQueryString
(
'expireDate'
)
!=
'-'
&&
getQueryString
(
'effectiveStarttime'
)
!=
'-'
)
{
if
(
getQueryString
(
'expireDate'
)
!=
'-'
&&
getQueryString
(
'effectiveStarttime'
)
!=
'-'
)
{
vaildData
.
expireDate
=
getQueryString
(
'expireDate'
)
vaildData
.
expireDate
=
getQueryString
(
'expireDate'
)
vaildData
.
effectiveStarttime
=
getQueryString
(
'effectiveStarttime'
)
vaildData
.
effectiveStarttime
=
getQueryString
(
'effectiveStarttime'
)
console
.
log
(
111111111111
,
getQueryString
(
'expireDate'
))
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
if
(
overdue
)
{
if
(
overdue
)
{
$
(
'#effectiveStarttime'
).
removeAttr
(
'disabled'
)
$
(
'#effectiveStarttime'
).
removeAttr
(
'disabled'
)
...
@@ -106,7 +110,6 @@
...
@@ -106,7 +110,6 @@
}
}
}
else
{
}
else
{
setText
(
2
)
setText
(
2
)
console
.
log
(
getQueryString
(
'status'
))
vaildData
.
effectiveTime
=
getQueryString
(
'status'
)
vaildData
.
effectiveTime
=
getQueryString
(
'status'
)
form
.
val
(
'periodFilter'
,
{
form
.
val
(
'periodFilter'
,
{
effectiveTime
:
getQueryString
(
'status'
)
effectiveTime
:
getQueryString
(
'status'
)
...
@@ -119,7 +122,6 @@
...
@@ -119,7 +122,6 @@
min
:
helper
.
dateFormat
(
new
Date
()),
min
:
helper
.
dateFormat
(
new
Date
()),
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
// effectiveStarttime.config.min = helper.dateFormat(new Date())
// effectiveStarttime.config.min = helper.dateFormat(new Date())
console
.
log
(
value
,
date
)
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
date
.
date
=
date
.
date
+
1
date
.
date
=
date
.
date
+
1
expireDate
.
config
.
min
=
date
expireDate
.
config
.
min
=
date
...
@@ -131,7 +133,7 @@
...
@@ -131,7 +133,7 @@
elem
:
'#expireDate'
,
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
,
format
:
'yyyy-MM-dd'
,
btns
:
[
'clear'
,
'confirm'
],
btns
:
[
'clear'
,
'confirm'
],
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
})
})
...
@@ -140,7 +142,6 @@
...
@@ -140,7 +142,6 @@
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
startTime
))
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
startTime
))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -150,7 +151,6 @@
...
@@ -150,7 +151,6 @@
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -160,7 +160,6 @@
...
@@ -160,7 +160,6 @@
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
const
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
startDate
.
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
if
(
overdue
)
effectiveStarttimeEl
.
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
expireDateEl
.
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -251,5 +250,6 @@
...
@@ -251,5 +250,6 @@
}
}
})
})
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/role/add.html
View file @
1030837
...
@@ -234,7 +234,6 @@
...
@@ -234,7 +234,6 @@
clickClose
:
true
,
clickClose
:
true
,
data
:
[],
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
merchantId
=
data
.
change
[
0
].
id
merchantId
=
data
.
change
[
0
].
id
findMenuFunTreeByMerId
(
merchantId
)
findMenuFunTreeByMerId
(
merchantId
)
}
}
...
@@ -321,11 +320,7 @@
...
@@ -321,11 +320,7 @@
laytpl
(
getTpl
).
render
(
templateData
,
function
(
html
)
{
laytpl
(
getTpl
).
render
(
templateData
,
function
(
html
)
{
view
.
innerHTML
=
html
view
.
innerHTML
=
html
})
})
// var productList = []
// var products = []
console
.
log
(
productList
)
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
id
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
id
).
products
console
.
log
(
products
)
products
.
forEach
(
i
=>
{
products
.
forEach
(
i
=>
{
var
str
=
$
(
'<input lay-filter="filter" data-id="'
+
id
+
'" type="checkbox" name="check['
+
id
+
']" value="'
+
i
.
productId
+
'" title="'
+
i
.
productName
+
'" lay-skin="primary" />'
)
var
str
=
$
(
'<input lay-filter="filter" data-id="'
+
id
+
'" type="checkbox" name="check['
+
id
+
']" value="'
+
i
.
productId
+
'" title="'
+
i
.
productName
+
'" lay-skin="primary" />'
)
$
(
'#project'
+
id
).
append
(
str
)
$
(
'#project'
+
id
).
append
(
str
)
...
@@ -380,7 +375,6 @@
...
@@ -380,7 +375,6 @@
},
},
// tab Change
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
console
.
log
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
if
(
name
==
'roleAuth'
)
{
if
(
name
==
'roleAuth'
)
{
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
$
(
`#nomenu
${
id
}
`
).
html
(
'请选择产品'
)
...
@@ -390,7 +384,6 @@
...
@@ -390,7 +384,6 @@
$
(
`#nodata
${
accounttypeId
}
`
).
removeClass
(
'show'
)
$
(
`#nodata
${
accounttypeId
}
`
).
removeClass
(
'show'
)
$
(
`#nodata
${
accounttypeId
}
`
).
addClass
(
'hide'
)
$
(
`#nodata
${
accounttypeId
}
`
).
addClass
(
'hide'
)
$
(
`#nomenu
${
accounttypeId
}
`
).
html
(
'暂无可选择的菜单功能'
)
$
(
`#nomenu
${
accounttypeId
}
`
).
html
(
'暂无可选择的菜单功能'
)
console
.
log
(
menuFunTreeData
)
menuFunTreeData
.
forEach
(
item
=>
{
menuFunTreeData
.
forEach
(
item
=>
{
if
(
item
.
accounttypeId
==
accounttypeId
)
{
if
(
item
.
accounttypeId
==
accounttypeId
)
{
item
.
products
.
forEach
(
i
=>
{
item
.
products
.
forEach
(
i
=>
{
...
@@ -419,7 +412,6 @@
...
@@ -419,7 +412,6 @@
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/
*/
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
console
.
log
(
item
,
id
,
treeListData
,
defaultList
)
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
element
.
tabAdd
(
filterName
,
{
element
.
tabAdd
(
filterName
,
{
...
@@ -434,7 +426,6 @@
...
@@ -434,7 +426,6 @@
treeData
[
id
][
item
.
value
].
id
=
productId
// 渲染模版的数据
treeData
[
id
][
item
.
value
].
id
=
productId
// 渲染模版的数据
treeData
[
id
][
item
.
value
].
productId
=
item
.
value
treeData
[
id
][
item
.
value
].
productId
=
item
.
value
laytpl
(
getTreeTpl
).
render
(
treeData
[
id
][
item
.
value
],
function
(
html
)
{
laytpl
(
getTreeTpl
).
render
(
treeData
[
id
][
item
.
value
],
function
(
html
)
{
console
.
log
(
treeView
)
treeView
.
innerHTML
=
html
treeView
.
innerHTML
=
html
})
})
// var treeListData = []
// var treeListData = []
...
@@ -466,16 +457,13 @@
...
@@ -466,16 +457,13 @@
}
}
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
var
isAdd
=
data
.
elem
.
checked
var
isAdd
=
data
.
elem
.
checked
var
filterName
=
'treeTab'
+
roleId
var
filterName
=
'treeTab'
+
roleId
console
.
log
(
roleId
,
projectId
,
isAdd
)
// merchantProTreeResponses
// merchantProTreeResponses
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
changeObj
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
.
find
(
i
=>
i
.
productId
==
projectId
)
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
roleId
).
products
console
.
log
(
changeObj
,
products
,
roleId
,
treeData
)
if
(
isAdd
)
{
if
(
isAdd
)
{
// 新增
// 新增
active
.
treeTabAdd
(
active
.
treeTabAdd
(
...
@@ -488,7 +476,6 @@
...
@@ -488,7 +476,6 @@
)
)
}
else
{
}
else
{
// 删除
// 删除
console
.
log
(
treeData
,
Object
.
keys
(
treeData
).
length
)
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
var
productId
=
'tab_'
+
roleId
+
'_'
+
changeObj
.
productId
active
.
tabDelete
(
filterName
,
productId
)
active
.
tabDelete
(
filterName
,
productId
)
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
if
(
Object
.
keys
(
treeData
).
length
!=
0
)
{
...
@@ -507,17 +494,14 @@
...
@@ -507,17 +494,14 @@
// 复选框的change事件
// 复选框的change事件
form
.
on
(
'checkbox(switch)'
,
function
(
data
)
{
form
.
on
(
'checkbox(switch)'
,
function
(
data
)
{
console
.
log
(
data
,
'111111111'
,
treeData
)
if
(
data
.
elem
.
checked
)
{
if
(
data
.
elem
.
checked
)
{
var
obj
=
{
title
:
data
.
elem
.
title
,
value
:
data
.
elem
.
value
}
var
obj
=
{
title
:
data
.
elem
.
title
,
value
:
data
.
elem
.
value
}
check_arr
.
push
({
check_arr
.
push
({
accounttypeId
:
data
.
elem
.
value
accounttypeId
:
data
.
elem
.
value
})
})
active
.
tabAdd
(
obj
)
active
.
tabAdd
(
obj
)
console
.
log
(
check_arr
)
treeData
[
+
data
.
elem
.
value
]
=
{}
treeData
[
+
data
.
elem
.
value
]
=
{}
}
else
{
}
else
{
console
.
log
(
11222
)
for
(
var
i
in
check_arr
)
{
for
(
var
i
in
check_arr
)
{
var
id
=
check_arr
[
i
].
accounttypeId
var
id
=
check_arr
[
i
].
accounttypeId
if
(
check_arr
[
i
].
accounttypeId
==
data
.
elem
.
value
)
{
if
(
check_arr
[
i
].
accounttypeId
==
data
.
elem
.
value
)
{
...
@@ -527,7 +511,6 @@
...
@@ -527,7 +511,6 @@
}
}
delete
treeData
[
data
.
elem
.
value
]
delete
treeData
[
data
.
elem
.
value
]
}
}
console
.
log
(
treeData
)
if
(
check_arr
.
length
!=
0
)
{
if
(
check_arr
.
length
!=
0
)
{
active
.
tabChange
(
'roleAuth'
,
check_arr
[
0
].
accounttypeId
)
active
.
tabChange
(
'roleAuth'
,
check_arr
[
0
].
accounttypeId
)
}
}
...
@@ -536,7 +519,6 @@
...
@@ -536,7 +519,6 @@
// 表单提交
// 表单提交
form
.
on
(
'submit(roleSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(roleSubmit)'
,
function
(
data
)
{
console
.
log
(
data
.
value
,
check_arr
,
treeData
)
if
(
check_arr
.
length
==
0
)
{
if
(
check_arr
.
length
==
0
)
{
layer
.
msg
(
'请选择角色权限'
,
{
layer
.
msg
(
'请选择角色权限'
,
{
icon
:
2
icon
:
2
...
@@ -550,7 +532,6 @@
...
@@ -550,7 +532,6 @@
// select 选择触发
// select 选择触发
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
console
.
log
(
data
.
value
,
check_arr
,
treeData
)
check_arr
.
forEach
(
item
=>
{
check_arr
.
forEach
(
item
=>
{
active
.
tabDelete
(
'roleAuth'
,
item
.
accounttypeId
)
active
.
tabDelete
(
'roleAuth'
,
item
.
accounttypeId
)
})
})
...
@@ -563,7 +544,6 @@
...
@@ -563,7 +544,6 @@
// 存草稿
// 存草稿
$
(
'#draft'
).
on
(
'click'
,
function
()
{
$
(
'#draft'
).
on
(
'click'
,
function
()
{
var
formVal
=
form
.
val
(
'roleForm'
)
var
formVal
=
form
.
val
(
'roleForm'
)
console
.
log
(
formVal
)
if
(
!
formVal
.
merchantId
)
{
if
(
!
formVal
.
merchantId
)
{
layer
.
msg
(
'请选择所属商户'
,
{
layer
.
msg
(
'请选择所属商户'
,
{
icon
:
2
icon
:
2
...
@@ -592,7 +572,6 @@
...
@@ -592,7 +572,6 @@
merchantId
:
merchantId
,
merchantId
:
merchantId
,
delFlag
:
delFlag
delFlag
:
delFlag
}
}
console
.
log
(
requestList
)
let
hasProduct
=
requestList
.
some
(
item
=>
item
.
productList
.
length
!=
0
)
let
hasProduct
=
requestList
.
some
(
item
=>
item
.
productList
.
length
!=
0
)
// 找这个数组里面是否有空值,然后判断是否为草稿,
// 找这个数组里面是否有空值,然后判断是否为草稿,
if
(
delFlag
==
1
)
{
// 草稿
if
(
delFlag
==
1
)
{
// 草稿
...
@@ -633,7 +612,6 @@
...
@@ -633,7 +612,6 @@
}
}
var
params
=
helper
.
clone
(
true
,
formVal
,
otherParams
)
var
params
=
helper
.
clone
(
true
,
formVal
,
otherParams
)
delete
params
.
select
delete
params
.
select
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
@@ -654,28 +632,22 @@
...
@@ -654,28 +632,22 @@
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
// callback(res.data)
// callback(res.data)
menuFunTreeData
=
res
.
data
menuFunTreeData
=
res
.
data
console
.
log
(
res
.
data
)
var
accountType
=
$
(
'#accountType'
)
var
accountType
=
$
(
'#accountType'
)
accountType
.
empty
()
accountType
.
empty
()
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
menuFunTreeData
.
forEach
((
item
,
index
)
=>
{
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
accountType
.
append
(
str
)
if
(
roleid
)
{
if
(
roleid
)
{
console
.
log
(
check_arr
)
check_arr
.
forEach
(
i
=>
{
check_arr
.
forEach
(
i
=>
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
if
(
i
.
accounttypeId
==
item
.
accounttypeId
)
{
var
productData
=
i
var
productData
=
i
var
id
=
item
.
accounttypeId
var
id
=
item
.
accounttypeId
console
.
log
(
'productData'
,
productData
)
str
.
attr
(
'checked'
,
true
)
str
.
attr
(
'checked'
,
true
)
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
var
obj
=
{
title
:
item
.
accounttypeName
,
value
:
item
.
accounttypeId
}
active
.
tabAdd
(
obj
,
productData
.
productList
)
active
.
tabAdd
(
obj
,
productData
.
productList
)
console
.
log
(
productData
.
productList
)
if
(
productData
.
productList
&&
productData
.
productList
.
length
!=
0
)
{
if
(
productData
.
productList
&&
productData
.
productList
.
length
!=
0
)
{
productData
.
productList
.
forEach
(
j
=>
{
productData
.
productList
.
forEach
(
j
=>
{
console
.
log
(
j
,
item
)
var
products
=
item
.
products
.
find
(
n
=>
n
.
productId
==
j
.
productId
)
var
products
=
item
.
products
.
find
(
n
=>
n
.
productId
==
j
.
productId
)
console
.
log
(
products
)
active
.
treeTabAdd
(
active
.
treeTabAdd
(
{
{
name
:
j
.
productName
,
name
:
j
.
productName
,
...
@@ -695,7 +667,6 @@
...
@@ -695,7 +667,6 @@
})
})
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
productData
.
productList
[
0
].
productId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
productData
.
productList
[
0
].
productId
console
.
log
(
filterName
,
productId
)
active
.
tabChange
(
filterName
,
productId
)
active
.
tabChange
(
filterName
,
productId
)
}
else
{
}
else
{
treeData
[
productData
.
accounttypeId
]
=
{}
treeData
[
productData
.
accounttypeId
]
=
{}
...
@@ -777,12 +748,10 @@
...
@@ -777,12 +748,10 @@
// 获取角色权限数据requestList
// 获取角色权限数据requestList
function
getAuthList
()
{
function
getAuthList
()
{
requestList
=
[]
requestList
=
[]
console
.
log
(
treeData
,
check_arr
)
// check_arr.forEach(i => {
// check_arr.forEach(i => {
for
(
var
key
in
treeData
)
{
for
(
var
key
in
treeData
)
{
var
accountObj
=
treeData
[
key
]
var
accountObj
=
treeData
[
key
]
var
productList
=
[]
var
productList
=
[]
console
.
log
(
treeData
)
// if (i.accounttypeId == key) {
// if (i.accounttypeId == key) {
// if (Object.keys(accountObj).length != 0) {
// if (Object.keys(accountObj).length != 0) {
for
(
var
i
in
accountObj
)
{
for
(
var
i
in
accountObj
)
{
...
@@ -823,7 +792,6 @@
...
@@ -823,7 +792,6 @@
}
}
})
})
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
// console.log(m)
functionIdList
.
push
({
functionIdList
.
push
({
id
:
m
.
parentId
,
id
:
m
.
parentId
,
menuId
:
m
.
superParentId
menuId
:
m
.
superParentId
...
@@ -863,7 +831,6 @@
...
@@ -863,7 +831,6 @@
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
console
.
log
(
result
)
merchantNameSelect
.
update
({
merchantNameSelect
.
update
({
data
:
result
.
data
,
data
:
result
.
data
,
autoRow
:
true
,
autoRow
:
true
,
...
...
html/role/detail.html
View file @
1030837
<!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"
/>
...
@@ -9,14 +10,15 @@
...
@@ -9,14 +10,15 @@
<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>
</head>
</head>
<style>
<style>
.sub-bg-white
{
.sub-bg-white
{
background-color
:
#f4f5fa
;
background-color
:
#f4f5fa
;
padding-top
:
8px
;
padding-top
:
8px
;
/* height: 100%; */
/* height: 100%; */
padding-bottom
:
100px
;
padding-bottom
:
100px
;
}
}
.tabmutiple-content-wrap
{
.tabmutiple-content-wrap
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
padding
:
0
0
1px
;
padding
:
0
0
1px
;
...
@@ -27,9 +29,11 @@
...
@@ -27,9 +29,11 @@
margin
:
0
10px
;
margin
:
0
10px
;
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
}
}
.layui-tab-content
{
.layui-tab-content
{
background-color
:
#fff
;
background-color
:
#fff
;
}
}
.layui-tab-title
{
.layui-tab-title
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
}
}
...
@@ -37,21 +41,26 @@
...
@@ -37,21 +41,26 @@
.outtitle
{
.outtitle
{
margin-left
:
-10px
;
margin-left
:
-10px
;
}
}
.layui-this
{
.layui-this
{
background-color
:
#fff
;
background-color
:
#fff
;
border
:
2px
solid
#fff
;
border
:
2px
solid
#fff
;
}
}
.layui-tab-title
.layui-this
{
.layui-tab-title
.layui-this
{
transform
:
none
;
transform
:
none
;
}
}
.layui-tab-card
>
.layui-tab-title
li
{
.layui-tab-card
>
.layui-tab-title
li
{
margin-left
:
0
;
margin-left
:
0
;
}
}
.topwrap
{
.topwrap
{
margin
:
0
20px
0
;
margin
:
0
20px
0
;
background-color
:
#fff
;
background-color
:
#fff
;
position
:
relative
;
position
:
relative
;
}
}
.topwrap
.grayLine
{
.topwrap
.grayLine
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -60,12 +69,14 @@
...
@@ -60,12 +69,14 @@
width
:
100%
;
width
:
100%
;
height
:
1px
;
height
:
1px
;
}
}
.bottomwrap
{
.bottomwrap
{
margin
:
20px
20px
0
;
margin
:
20px
20px
0
;
background-color
:
#fff
;
background-color
:
#fff
;
/* height: 100%; */
/* height: 100%; */
padding-bottom
:
30px
;
padding-bottom
:
30px
;
}
}
.show
{
.show
{
display
:
inline-block
;
display
:
inline-block
;
}
}
...
@@ -73,8 +84,9 @@
...
@@ -73,8 +84,9 @@
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
</style>
</style>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white wrapper detail"
>
<main
class=
"bg-white wrapper detail"
>
<div
class=
"sub-bg-white"
>
<div
class=
"sub-bg-white"
>
...
@@ -152,7 +164,6 @@
...
@@ -152,7 +164,6 @@
var
params
=
{
id
:
roleid
,
method
:
'org.ore.api.role.getById'
}
var
params
=
{
id
:
roleid
,
method
:
'org.ore.api.role.getById'
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
console
.
log
(
roleData
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
for
(
var
i
in
basicArr
)
{
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
||
'无'
)
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
||
'无'
)
...
@@ -195,7 +206,6 @@
...
@@ -195,7 +206,6 @@
treeTab
.
tabChange
(
filterName
,
productId
)
treeTab
.
tabChange
(
filterName
,
productId
)
}
}
})
})
console
.
log
(
authList
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
}
}
})
})
...
@@ -212,5 +222,6 @@
...
@@ -212,5 +222,6 @@
</div>
</div>
</div>
</div>
</script> -->
</script> -->
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/role/index.html
View file @
1030837
<!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,11 +11,12 @@
...
@@ -10,11 +11,12 @@
<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/commonResetIndex.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/commonResetIndex.css"
/>
<title>
角色管理
</title>
<title>
角色管理
</title>
</head>
</head>
<style>
<style>
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
300px
;
width
:
300px
;
}
}
xm-select
:hover
{
xm-select
:hover
{
border
:
1px
solid
#5850ff
!important
;
border
:
1px
solid
#5850ff
!important
;
}
}
...
@@ -22,11 +24,13 @@
...
@@ -22,11 +24,13 @@
.hide
{
.hide
{
display
:
none
;
display
:
none
;
}
}
.show
{
.show
{
display
:
inline-block
;
display
:
inline-block
;
}
}
</style>
</style>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white"
>
<main
class=
"bg-white"
>
<div>
<div>
...
@@ -139,8 +143,6 @@
...
@@ -139,8 +143,6 @@
layout
:
[
'count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
//obj包含了当前分页的所有参数,比如:
//obj包含了当前分页的所有参数,比如:
console
.
log
(
obj
.
curr
)
//得到当前页,以便向服务端请求对应页的数据。
console
.
log
(
obj
.
limit
)
//得到每页显示的条数
page
.
pageNum
=
obj
.
curr
page
.
pageNum
=
obj
.
curr
page
.
pageSize
=
obj
.
limit
page
.
pageSize
=
obj
.
limit
//首次不执行
//首次不执行
...
@@ -181,7 +183,6 @@
...
@@ -181,7 +183,6 @@
search
search
)
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
console
.
log
(
res
)
// var data = res.data
// var data = res.data
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
var
data
=
helper
.
formateNullFieldData
(
res
.
data
)
var
options
=
{
var
options
=
{
...
@@ -200,7 +201,6 @@
...
@@ -200,7 +201,6 @@
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
console
.
log
(
result
)
merchantNameSelect
.
update
({
merchantNameSelect
.
update
({
data
:
result
.
data
,
data
:
result
.
data
,
autoRow
:
true
,
autoRow
:
true
,
...
@@ -235,7 +235,6 @@
...
@@ -235,7 +235,6 @@
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
index
)
layer
.
close
(
index
)
console
.
log
(
'shanchu'
)
getTabelList
(
roleTable
)
getTabelList
(
roleTable
)
}
}
})
})
...
@@ -249,7 +248,6 @@
...
@@ -249,7 +248,6 @@
// 查询事件
// 查询事件
$
(
'#roleSearch'
).
on
(
'click'
,
function
()
{
$
(
'#roleSearch'
).
on
(
'click'
,
function
()
{
var
searchData
=
form
.
val
(
'roleForm'
)
var
searchData
=
form
.
val
(
'roleForm'
)
console
.
log
(
searchData
)
getTabelList
(
roleTable
,
searchData
,
true
)
getTabelList
(
roleTable
,
searchData
,
true
)
})
})
})
})
...
@@ -261,5 +259,6 @@
...
@@ -261,5 +259,6 @@
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"del"
>
删除
<
/a
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"del"
>
删除
<
/a
>
{{
#
}
}}
{{
#
}
}}
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/role/tree.html
View file @
1030837
<!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"
/>
...
@@ -16,16 +17,16 @@
...
@@ -16,16 +17,16 @@
}
}
</style>
</style>
<title>
tree
</title>
<title>
tree
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main>
fdasfda
</main>
<main>
fdasfda
</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>
console
.
log
(
qs
(
'id'
))
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
js/gtree.js
View file @
1030837
...
@@ -28,8 +28,7 @@ layui.define(['ztree'], function (exports) {
...
@@ -28,8 +28,7 @@ layui.define(['ztree'], function (exports) {
}
}
}
}
function
zTreeOnExpand
(
event
,
treeId
,
treeNode
)
{
function
zTreeOnExpand
(
event
,
treeId
,
treeNode
)
{
console
.
log
(
treeNode
)
treeNode
.
check
=
true
treeNode
.
check
=
true
}
}
var
setting
=
{
var
setting
=
{
view
:
{
view
:
{
...
@@ -64,7 +63,7 @@ layui.define(['ztree'], function (exports) {
...
@@ -64,7 +63,7 @@ layui.define(['ztree'], function (exports) {
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
.
expandAll
(
true
)
inst
.
expandAll
(
true
)
inst
.
checkNodes
=
function
(
checked
)
{
inst
.
checkNodes
=
function
(
checked
)
{
var
nodesLevel1
=
this
.
getNodes
()
var
nodesLevel1
=
this
.
getNodes
()
var
nodesAll
=
this
.
transformToArray
(
nodesLevel1
)
var
nodesAll
=
this
.
transformToArray
(
nodesLevel1
)
for
(
var
i
=
0
;
i
<=
nodesAll
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<=
nodesAll
.
length
;
i
++
)
{
...
...
js/helper.js
View file @
1030837
...
@@ -128,7 +128,6 @@ layui.define(['store'], function (exports) {
...
@@ -128,7 +128,6 @@ layui.define(['store'], function (exports) {
}
}
function
dateFormat
(
time
,
fmt
=
'YYYY-mm-dd'
)
{
function
dateFormat
(
time
,
fmt
=
'YYYY-mm-dd'
)
{
console
.
log
(
time
,
'============'
)
var
time
=
new
Date
(
time
)
var
time
=
new
Date
(
time
)
let
ret
;
let
ret
;
const
opt
=
{
const
opt
=
{
...
...
js/treeTab.js
View file @
1030837
...
@@ -97,7 +97,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
...
@@ -97,7 +97,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
// tab Change
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
element
.
tabChange
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
console
.
log
(
name
,
id
)
if
(
name
==
'roleAuth'
)
{
if
(
name
==
'roleAuth'
)
{
$
(
`#nomenu
${
id
}
`
).
html
(
'暂无数据'
)
$
(
`#nomenu
${
id
}
`
).
html
(
'暂无数据'
)
}
else
{
}
else
{
...
@@ -105,7 +104,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
...
@@ -105,7 +104,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
const
productId
=
id
.
split
(
'_'
)[
2
]
const
productId
=
id
.
split
(
'_'
)[
2
]
$
(
`#nodata
${
accounttypeId
}
`
).
removeClass
(
'show'
)
$
(
`#nodata
${
accounttypeId
}
`
).
removeClass
(
'show'
)
$
(
`#nodata
${
accounttypeId
}
`
).
addClass
(
'hide'
)
$
(
`#nodata
${
accounttypeId
}
`
).
addClass
(
'hide'
)
console
.
log
(
menuFunTreeData
)
menuFunTreeData
.
forEach
(
item
=>
{
menuFunTreeData
.
forEach
(
item
=>
{
if
(
item
.
accounttypeId
==
accounttypeId
)
{
if
(
item
.
accounttypeId
==
accounttypeId
)
{
item
.
products
.
forEach
(
i
=>
{
item
.
products
.
forEach
(
i
=>
{
...
@@ -134,7 +132,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
...
@@ -134,7 +132,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/
*/
treeTabAdd
:
function
(
item
,
id
,
products
,
defaultList
)
{
treeTabAdd
:
function
(
item
,
id
,
products
,
defaultList
)
{
console
.
log
(
defaultList
)
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
element
.
tabAdd
(
filterName
,
{
element
.
tabAdd
(
filterName
,
{
...
@@ -164,7 +161,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
...
@@ -164,7 +161,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
treeListData
=
i
.
merchantProTreeResponses
treeListData
=
i
.
merchantProTreeResponses
}
}
})
})
console
.
log
(
'treeListData'
,
treeListData
)
var
treedom
=
'tree_'
+
productId
var
treedom
=
'tree_'
+
productId
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
,
{
chkDisabled
:
true
})
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
,
{
chkDisabled
:
true
})
...
@@ -199,7 +195,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
...
@@ -199,7 +195,6 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
enable
:
false
enable
:
false
}
}
})
})
console
.
log
(
productTreeList
)
if
(
productTreeList
&&
productTreeList
.
length
!=
0
)
{
if
(
productTreeList
&&
productTreeList
.
length
!=
0
)
{
$
(
`#nomenu
${
productId
}
`
).
removeClass
(
'show'
)
$
(
`#nomenu
${
productId
}
`
).
removeClass
(
'show'
)
$
(
`#nomenu
${
productId
}
`
).
addClass
(
'hide'
)
$
(
`#nomenu
${
productId
}
`
).
addClass
(
'hide'
)
...
...
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