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 2d3643da
authored
Dec 07, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
员工可见商户添加全选,详情添加本商户显示
1 parent
388ef069
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
html/employee/add.html
html/employee/detail.html
html/employee/add.html
View file @
2d3643d
...
@@ -174,6 +174,9 @@
...
@@ -174,6 +174,9 @@
<label
class=
"layui-form-label required"
>
可见商户:
</label>
<label
class=
"layui-form-label required"
>
可见商户:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
placeholder=
"可见商户"
id=
"searchMerchant"
/>
<input
class=
"layui-input"
placeholder=
"可见商户"
id=
"searchMerchant"
/>
<div
style=
"position: absolute; top: 0; left: 380px"
>
<button
type=
"button"
class=
"layui-btn"
id=
"checkAll"
>
全选
</button>
</div>
<ul
id=
"visibleInferiorMerTree"
style=
"max-height: 200px; overflow-y: auto"
class=
"ztree wrapper-tree"
>
<ul
id=
"visibleInferiorMerTree"
style=
"max-height: 200px; overflow-y: auto"
class=
"ztree wrapper-tree"
>
</ul>
</ul>
</div>
</div>
...
@@ -380,6 +383,22 @@
...
@@ -380,6 +383,22 @@
pwd
.
attr
(
'readonly'
,
false
)
pwd
.
attr
(
'readonly'
,
false
)
pwd
.
val
(
''
)
pwd
.
val
(
''
)
})
})
var
checkAll
=
false
var
checkBtn
=
$
(
'#checkAll'
)
// 全选可见商户
checkBtn
.
on
(
'click'
,
function
()
{
if
(
!
merchantId
)
{
layer
.
msg
(
'请选择所属商户!'
)
}
else
{
checkAll
=
!
checkAll
visibleMerchant
.
checkAllNodes
(
checkAll
)
if
(
checkAll
)
{
checkBtn
.
html
(
'全不选'
)
}
else
{
checkBtn
.
html
(
'全选'
)
}
}
})
// 刷新
// 刷新
$
(
'#refresh'
).
on
(
'click'
,
function
()
{
$
(
'#refresh'
).
on
(
'click'
,
function
()
{
...
...
html/employee/detail.html
View file @
2d3643d
...
@@ -343,7 +343,11 @@
...
@@ -343,7 +343,11 @@
if
(
employeeData
.
visibleInferiorMerName
)
{
if
(
employeeData
.
visibleInferiorMerName
)
{
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
var
visibleName
=
employeeData
.
visibleInferiorMerName
.
split
(
','
)
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
$
.
each
(
visibleName
,
function
(
idx
,
i
)
{
if
(
employeeData
.
merchantName
.
indexOf
(
i
)
!=
-
1
)
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'(本商户)'
+
'</li>'
)
}
else
{
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'</li>'
)
visibleInferiorMerName
.
append
(
'<li class="visibleMerchant">'
+
i
+
'</li>'
)
}
})
})
}
else
{
}
else
{
visibleInferiorMerName
.
remove
()
visibleInferiorMerName
.
remove
()
...
...
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