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 ad53b1aa
authored
Aug 23, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
02a7c562
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
43 additions
and
33 deletions
css/main.css
html/employee/add.html
html/employee/detail.html
html/employee/index.html
html/employee/validPeriod.html
html/merchant/detail.html
html/role/add.html
js/gtree.js
js/treeTab.js
css/main.css
View file @
ad53b1a
...
...
@@ -141,4 +141,8 @@ footer {
}
.footer-close
{
text-align
:
center
;
width
:
100%
;
background-color
:
#fff
;
position
:
fixed
;
bottom
:
20px
;
}
\ No newline at end of file
html/employee/add.html
View file @
ad53b1a
...
...
@@ -341,24 +341,32 @@
if
(
res
.
code
==
'0'
)
{
if
(
id
)
{
getById
(
function
(
checkedList
)
{
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
,
{
checkedList
:
checkedList
})
visibleMerchant
.
checkNodes
(
checkedList
)
all_nodes
=
visibleMerchant
.
transformToArray
(
visibleMerchant
.
getNodes
())
bindEvent
()
createMerchant
(
checkedList
,
res
.
data
)
})
}
else
{
console
.
log
(
11
)
const
arr
=
[]
arr
.
push
(
+
merchantId
)
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
res
.
data
,
{
checkedList
:
arr
})
visibleMerchant
.
checkNodes
(
arr
)
all_nodes
=
visibleMerchant
.
transformToArray
(
visibleMerchant
.
getNodes
())
bindEvent
()
createMerchant
(
arr
,
res
.
data
)
}
}
})
}
function
createMerchant
(
arr
,
data
)
{
visibleMerchant
=
tree
.
create
(
'visibleInferiorMerTree'
,
data
,
null
,
{
check
:
{
enable
:
true
,
chkboxType
:
{
Y
:
''
,
N
:
''
}
}
})
visibleMerchant
.
checkNodes
(
arr
)
all_nodes
=
visibleMerchant
.
transformToArray
(
visibleMerchant
.
getNodes
())
bindEvent
()
}
// 查询所有商户
function
findAllMerchant
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
...
...
html/employee/detail.html
View file @
ad53b1a
...
...
@@ -13,7 +13,6 @@
<style>
.sub-bg-white
{
width
:
100%
;
height
:
100%
;
background-color
:
#fff
;
}
.sub-title
{
...
...
@@ -40,7 +39,7 @@
</style>
<body>
<div
id=
"app"
>
<main
class=
"
bg-white
wrapper detail"
>
<main
class=
"wrapper detail"
>
<div
class=
"sub-bg-white"
>
<div>
<h3
class=
"content-title"
id=
"basic"
>
...
...
@@ -71,14 +70,8 @@
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleName"
></div>
</div>
</div>
<div
class=
"layui-form-item mb21"
>
<label
class=
"layui-form-label"
>
角色号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleCode"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
上级姓名
:
</label>
<label
class=
"layui-form-label"
>
创建人
:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"createdAccount"
></div>
</div>
...
...
@@ -99,7 +92,7 @@
</div>
</div>
<div>
<h3
class=
"content-title sub-title"
id=
"record"
>
修改
日志
</h3>
<h3
class=
"content-title sub-title"
id=
"record"
>
修改
记录
</h3>
<div
class=
"layui-tab tabmutiple-content"
style=
"padding: 0 20px;background-color: #fff;"
>
<table
class=
"layui-table"
id=
"recordTable"
></table>
<div
id=
"recordPage"
class=
"align-center"
></div>
...
...
html/employee/index.html
View file @
ad53b1a
...
...
@@ -176,6 +176,7 @@
//向服务端发送删除指令
})
}
else
if
(
layEvent
===
'updateTime'
)
{
console
.
log
(
data
.
id
,
data
.
effectiveTime
)
layer
.
open
({
type
:
2
,
title
:
'修改账户的有效期'
,
...
...
html/employee/validPeriod.html
View file @
ad53b1a
...
...
@@ -58,7 +58,6 @@
effectiveTime
:
getQueryString
(
'effectiveTime'
)
}
getVaildPeriod
()
form
.
on
(
'submit(periodSubmit)'
,
function
(
data
)
{
console
.
log
(
data
.
field
,
vaildData
)
...
...
@@ -102,6 +101,7 @@
form
.
val
(
'periodFilter'
,
{
effectiveTime
:
vaildData
.
effectiveTime
})
console
.
log
(
vaildData
.
effectiveTime
)
form
.
render
(
'select'
)
}
})
...
...
html/merchant/detail.html
View file @
ad53b1a
...
...
@@ -458,7 +458,11 @@
request
(
treeParams
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
false
)
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
{
check
:
{
enable
:
false
}
})
treeObj
.
expandAll
(
true
)
all_nodes
=
treeObj
.
transformToArray
(
treeObj
.
getNodes
())
var
targetNode
=
treeObj
.
getNodeByParam
(
'id'
,
merchantId
)
...
...
html/role/add.html
View file @
ad53b1a
...
...
@@ -49,9 +49,9 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
所属商户:
</label>
<div
class=
"layui-input-block"
id=
"merchantBox"
>
<div
id=
"merchantSelect"
class=
"hide"
>
<
!-- <
div id="merchantSelect" class="hide">
<select id="merchantName" name="merchantId" lay-filter="merchants" lay-verify="required" autocomplete="off" placeholder="请选择商户名称" required></select>
</div>
</div>
-->
<div
class=
"hide"
id=
"merchantIdText"
style=
"line-height: 36px;"
></div>
</div>
</div>
...
...
@@ -192,6 +192,7 @@
}
else
{
var
productId
=
'tab_'
+
id
+
'_'
+
change
[
0
].
value
active
.
tabDelete
(
filterName
,
productId
)
delete
treeData
[
id
][
change
[
0
].
value
]
}
if
(
arr
.
length
!=
0
)
{
var
productId
=
'tab_'
+
id
+
'_'
+
arr
[
0
].
value
...
...
@@ -248,7 +249,7 @@
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
)
treeData
[
id
][
item
.
value
].
treeObj
.
checkAllNodes
(
true
)
}
else
{
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
,
{
checkedList
:
defaultList
}
)
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
)
if
(
defaultList
)
treeData
[
id
][
item
.
value
].
treeObj
.
checkNodes
(
defaultList
)
// helper.defaultChecked(treeData[id][item.value].treeObj, defaultList)
}
...
...
@@ -332,7 +333,6 @@
}
var
params
=
helper
.
clone
(
true
,
formVal
,
otherParams
)
delete
params
.
select
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
...
...
@@ -405,14 +405,12 @@
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
console
.
log
(
res
.
data
,
'详情'
)
var
data
=
res
.
data
var
accounttypeId
=
''
if
(
data
.
responseList
)
{
check_arr
=
data
.
responseList
}
merchantId
=
data
.
merchantId
console
.
log
(
check_arr
,
'jklj'
)
findMenuFunTreeByMerId
(
data
.
merchantId
)
form
.
val
(
'roleForm'
,
{
roleName
:
data
.
roleName
,
...
...
@@ -483,7 +481,6 @@
productList
:
productList
})
}
console
.
log
(
requestList
)
}
// 查询所有商户
...
...
js/gtree.js
View file @
ad53b1a
...
...
@@ -56,12 +56,11 @@ layui.define(['ztree'], function (exports) {
var
inst
=
null
var
gtree
=
{
opt
:
null
,
check
:
true
,
create
:
function
(
id
,
nodes
,
opt
,
check
)
{
create
:
function
(
id
,
nodes
,
opt
,
selfSetting
)
{
this
.
opt
=
opt
var
$treeDom
=
$
(
'#'
+
id
)
$treeDom
.
addClass
(
'ztree'
)
if
(
check
==
0
)
setting
.
check
.
enable
=
false
if
(
selfSetting
)
Object
.
assign
(
setting
,
selfSetting
)
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
.
expandAll
(
true
)
...
...
js/treeTab.js
View file @
ad53b1a
...
...
@@ -122,7 +122,7 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
}
})
var
treedom
=
'tree_'
+
productId
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
,
{
ch
eckedList
:
defaultList
,
ch
kDisabled
:
true
})
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
,
{
chkDisabled
:
true
})
},
treeTabDetail
:
function
(
item
,
id
,
productTreeList
)
{
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
...
...
@@ -142,7 +142,11 @@ layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
treeView
.
innerHTML
=
html
})
var
treedom
=
'tree_'
+
productId
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
productTreeList
,
null
,
false
)
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
productTreeList
,
null
,
{
check
:
{
enable
:
false
}
})
}
}
exports
(
'treeTab'
,
treeTab
)
...
...
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