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