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 5515030a
authored
Aug 05, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权限按钮
1 parent
0818a0ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
1 deletions
html/merchant/index.html
html/merchant/index.html
View file @
5515030
...
...
@@ -109,12 +109,18 @@
<script
src=
"/js/load.js"
></script>
<script
type=
"text/html"
id=
"merchantBtns"
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleDetail"
>
查看
<
/a
>
{{
#
if
((
d
.
btn
.
edit
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleEdit"
>
修改
<
/a
>
{{
#
if
((
d
.
merchantAccountLevel
!=
4
)
||
(
d
.
status
==
2
&&
d
.
merchantAccountLevel
!=
4
)){
}}
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createStaff
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddStaff"
>
创建员工
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
</script>
<script>
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'table'
,
'layer'
],
function
()
{
...
...
@@ -311,6 +317,61 @@
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
pageSize
*
(
pageNum
-
1
)
item
.
btn
=
{
edit
:
false
,
createSubMerchant
:
false
,
createStaff
:
false
,
editPeriod
:
false
}
/** btn
* check - 查看(无需判断,均有)
* edit - 修改
* createSubMerchant - 创建子商户/门店
* createStaff - 创建员工
* editPeriod - 修改账户有效期
* **/
// status(账户状态 - 列表):1-草稿;2-正常;3-注销;4-过期
// merchantAccountLevel(账户等级 - 列表):1-工厂;2-省代;3-市代;4-门店
// 外部系统
if
(
isDxternal
)
{
// 状态 - 正常
if
(
item
.
status
==
2
)
{
// 本身
if
(
item
.
id
==
user
.
merchantId
)
{
item
.
btn
.
createStaff
=
true
if
(
merchantAccountLevel
!=
4
)
{
item
.
btn
.
createSubMerchant
=
true
}
}
else
{
// 下级商户
item
.
btn
.
edit
=
true
item
.
btn
.
editPeriod
=
true
// 直属门店
if
(
item
.
merchantAccountLevel
==
4
)
{
if
(
item
.
parentId
==
user
.
merchantId
)
{
item
.
btn
.
createStaff
=
true
}
}
else
{
item
.
btn
.
createSubMerchant
=
true
}
}
}
else
if
(
item
.
status
!=
3
)
{
item
.
btn
.
edit
=
true
}
}
else
{
// 超管登陆
if
(
item
.
status
!=
3
)
{
item
.
btn
.
edit
=
true
}
if
((
item
.
status
==
2
))
{
item
.
btn
.
createStaff
=
true
if
(
item
.
merchantAccountLevel
!=
4
)
{
item
.
btn
.
createSubMerchant
=
true
}
}
if
(
item
.
status
!=
1
)
{
item
.
btn
.
editPeriod
=
true
}
}
})
var
options
=
{
data
:
data
.
data
...
...
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