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 299a2888
authored
Aug 18, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:h5/account
2 parents
f8ca01b2
220710e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
8 deletions
html/merchant/detail.html
html/merchant/edit.html
js/gtree.js
html/merchant/detail.html
View file @
299a288
...
...
@@ -246,7 +246,9 @@
</div>
</div>
<div
class=
"layui-tab-item updateRecord"
>
<span
class=
"no-data"
>
暂无记录
</span>
<table
class=
"layui-table"
id=
"recordTable"
lay-filter=
"merchant-table-filter"
></table>
<div
id=
"recordPage"
class=
"align-center"
></div>
<!-- <span class="no-data"> 暂无记录</span> -->
</div>
</div>
<div
class=
"footer-close"
>
...
...
@@ -258,7 +260,7 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'request'
,
'gtree'
,
'helper'
,
'table'
,
'form'
,
'treeTab'
],
function
()
{
layui
.
use
([
'request'
,
'gtree'
,
'helper'
,
'table'
,
'form'
,
'treeTab'
,
'laypage'
],
function
()
{
var
$
=
layui
.
$
var
request
=
layui
.
request
var
tree
=
layui
.
gtree
...
...
@@ -266,6 +268,7 @@
var
table
=
layui
.
table
var
form
=
layui
.
form
var
treeTab
=
layui
.
treeTab
var
laypage
=
layui
.
laypage
var
merchantId
=
qs
(
'merchantId'
)
var
parentId
=
''
var
merchantForm
=
{}
...
...
@@ -289,6 +292,60 @@
]
var
roleData
=
{}
var
recordPage
=
{
pageNum
:
1
,
pageSize
:
10
}
var
recordPageOptions
=
{
elem
:
'recordPage'
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
recordPage
.
pageNum
=
obj
.
curr
recordPage
.
pageSize
=
obj
.
limit
//首次不执行
if
(
!
first
)
{
//do something
getThirdTable
()
}
}
}
var
recordTable
=
table
.
render
({
elem
:
'#recordTable'
,
page
:
false
,
skin
:
'nob'
,
cols
:
[
[{
field
:
'userName'
,
title
:
'操作人'
,
align
:
'center'
},
{
field
:
'operator'
,
title
:
'登录账户'
,
align
:
'center'
},
{
field
:
'productName'
,
title
:
'登录产品'
,
align
:
'center'
},
{
field
:
'ip'
,
title
:
'登录IP'
,
align
:
'center'
,
width
:
120
},
{
field
:
'modifyContent'
,
title
:
'修改内容'
,
align
:
'center'
},
{
field
:
'createdTime'
,
title
:
'操作时间'
,
align
:
'center'
,
width
:
160
}]
]
})
init
()
function
init
()
{
...
...
@@ -296,7 +353,8 @@
findMenuFunTreeByMerId
()
getSecondInfo
()
getSecondTree
()
getSecondTable
(
subMerchantTable
)
getSecondTable
()
getThirdTable
()
}
// 查询角色详情
...
...
@@ -316,7 +374,7 @@
}
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
?
roleData
[
basicArr
[
i
]]
:
'无'
)
}
if
(
roleData
.
merchantType
==
2
)
{
if
(
roleData
.
merchantType
==
2
)
{
$
(
'#orgTxt'
).
text
(
'组织机构代码:'
)
}
// callback(roleData.accountTypes)
...
...
@@ -461,7 +519,7 @@
$
(
'#tableSearch'
).
on
(
'click'
,
function
()
{
var
search
=
$
(
'#tableSearchForm'
).
val
()
console
.
log
(
search
)
getSecondTable
(
subMerchantTable
,
{
getSecondTable
({
keyword
:
search
})
return
false
...
...
@@ -472,14 +530,14 @@
})
// 获取table列表接口
function
getSecondTable
(
table
,
search
,
isResetPageNum
)
{
function
getSecondTable
(
search
,
isResetPageNum
)
{
var
search
=
search
||
{}
var
params
=
helper
.
clone
(
false
,
{
method
:
'cn.com.glsx.merchants.staff.findMerchantStaffList'
,
merchantId
:
merchantId
},
search
)
request
(
params
,
function
(
res
)
{
console
.
log
(
res
)
//
console.log(res)
var
data
=
res
.
data
var
options
=
{
data
:
data
...
...
@@ -487,6 +545,32 @@
subMerchantTable
.
reload
(
options
)
})
}
// 修改记录
function
getThirdTable
(
isResetPageNum
)
{
var
params
=
{
bussinessId
:
merchantId
,
moduleName
:
'商户模块'
,
pageNum
:
recordPage
.
pageNum
,
pageSize
:
recordPage
.
pageSize
,
method
:
'cn.com.glsx.merchants.menu.findLog'
}
request
(
params
,
function
(
res
)
{
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
data
.
data
[
index
].
modifyContent
=
item
.
module
+
'-'
+
item
.
action
})
var
options
=
{
data
:
data
.
data
,
}
recordPageOptions
.
count
=
data
.
count
if
(
isResetPageNum
)
{
recordPageOptions
.
curr
=
1
}
laypage
.
render
(
recordPageOptions
)
recordTable
.
reload
(
options
)
})
}
})
</script>
</body>
...
...
html/merchant/edit.html
View file @
299a288
...
...
@@ -1361,7 +1361,6 @@
var
str
=
$
(
'<input lay-filter="switch" type="checkbox" name="accounttypeId" value="'
+
item
.
accounttypeId
+
'" title="'
+
item
.
accounttypeName
+
'" />'
)
accountType
.
append
(
str
)
// console.log(check_arr, '0000000000')
if
(
merchantId
)
{
// 角色权限的check
for
(
var
i
=
0
;
i
<
check_arr
.
length
;
i
++
)
{
...
...
js/gtree.js
View file @
299a288
...
...
@@ -10,6 +10,7 @@
layui
.
define
([
'ztree'
],
function
(
exports
)
{
var
$
=
layui
.
$
var
tree
=
layui
.
ztree
var
rootNoChildCheckedNode
=
[]
function
onNodeCreated
(
event
,
treeId
,
treeNode
)
{
if
(
treeNode
.
logo
==
'functionValue'
)
{
...
...
@@ -38,8 +39,12 @@ layui.define(['ztree'], function (exports) {
// clearTimeout(time)
// }
// }, 20)
// console.log(!treeNode.children)
if
(
inst
)
{
inst
.
updateNode
(
treeNode
)
}
else
if
(
!
treeNode
.
children
)
{
rootNoChildCheckedNode
.
push
(
treeNode
)
// console.log(rootNoChildCheckedNode, '==============')
}
}
}
...
...
@@ -79,6 +84,11 @@ layui.define(['ztree'], function (exports) {
if
(
check
==
0
)
setting
.
check
.
enable
=
false
inst
=
tree
.
init
(
$treeDom
,
setting
,
nodes
)
inst
.
expandAll
(
true
)
// console.log(rootNoChildCheckedNode)
$
.
each
(
rootNoChildCheckedNode
,
function
(
index
,
item
)
{
console
.
log
(
item
,
'============'
)
inst
.
checkNode
(
item
,
true
)
})
return
inst
}
}
...
...
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