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 b6aa5d56
authored
Aug 08, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户管理
1 parent
b3900535
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
36 deletions
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
html/merchant/detail.html
View file @
b6aa5d5
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"zh"
>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
@@ -10,8 +11,9 @@
...
@@ -10,8 +11,9 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/merchant.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/merchant.css"
/>
<title>
商户管理
</title>
<title>
商户管理
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<main
class=
"bg-white wrapper detail"
>
<main
class=
"bg-white wrapper detail"
>
<div
class=
"layui-tab"
>
<div
class=
"layui-tab"
>
...
@@ -104,16 +106,19 @@
...
@@ -104,16 +106,19 @@
<option
value=
"021"
>
上海
</option>
<option
value=
"021"
>
上海
</option>
<option
value=
"0571"
>
杭州
</option>
<option
value=
"0571"
>
杭州
</option>
</select>
</select>
<div
class=
"layui-tab"
lay-filter=
"funAuth"
>
<ul
class=
"layui-tab-title"
></ul>
<div
class=
"layui-tab-content"
></div>
</div>
</h3>
</h3>
</div>
</div>
<div
class=
"layui-tab-item"
>
<div
class=
"layui-tab-item"
>
<div
class=
"wrapper-merchant"
>
<div
class=
"wrapper-merchant"
>
<div
class=
"merchant-left"
>
<div
class=
"merchant-left"
>
<div>
<div
id=
"secondmerchantName"
></div>
<div>
深圳
</div>
<div
id=
"secondmerchantId"
>
商户号
</div>
<div>
商户号
</div>
<div
id=
""
>
宁接口了接口了就
</div>
<div>
宁接口了接口了就
</div>
</form>
</div>
<form
class=
"layui-form"
action=
""
>
<form
class=
"layui-form"
action=
""
>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
...
@@ -194,13 +199,15 @@
...
@@ -194,13 +199,15 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
<script>
layui
.
use
([
'request'
,
'gtree'
,
'element'
,
'helper'
,
'table'
],
function
()
{
layui
.
use
([
'request'
,
'gtree'
,
'element'
,
'helper'
,
'table'
,
'form'
],
function
()
{
var
$
=
layui
.
$
var
$
=
layui
.
$
var
request
=
layui
.
request
var
request
=
layui
.
request
var
tree
=
layui
.
gtree
var
tree
=
layui
.
gtree
var
helper
=
layui
.
helper
var
helper
=
layui
.
helper
var
table
=
layui
.
table
var
table
=
layui
.
table
var
id
=
qs
(
'id'
)
var
form
=
layui
.
form
var
merchantId
=
qs
(
'merchantId'
)
var
merchantInfo
=
{}
var
basicArr
=
[
var
basicArr
=
[
'merchantLoginAccount'
,
'merchantLoginAccount'
,
'accountTypeNames'
,
'accountTypeNames'
,
...
@@ -216,10 +223,25 @@
...
@@ -216,10 +223,25 @@
'merchantBrandName'
'merchantBrandName'
]
]
var
roleData
=
{}
var
roleData
=
{}
init
()
function
init
()
{
getFirstInfo
()
getSecondInfo
()
getSecondTree
()
getSecondTable
(
subMerchantTable
)
}
// 查询角色详情
// 查询角色详情
var
params
=
{
id
:
31
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
}
function
getFirstInfo
()
{
request
(
params
,
function
(
res
)
{
var
params
=
{
console
.
log
(
res
)
id
:
merchantId
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
}
request
(
params
,
function
(
res
)
{
console
.
log
(
res
,
'账户信息'
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
roleData
=
helper
.
clone
(
true
,
res
.
data
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
for
(
var
i
in
basicArr
)
{
...
@@ -227,52 +249,102 @@
...
@@ -227,52 +249,102 @@
}
}
}
}
})
})
}
// 上下级商户 - 信息
function
getSecondInfo
()
{
request
({
method
:
'cn.com.glsx.merchants.menu.findSubordinateRelationship'
,
id
:
merchantId
},
function
(
res
)
{
console
.
log
(
res
.
data
)
var
data
=
res
.
data
var
arr
=
[
'merchantName'
,
'merchantId'
,
''
]
$
.
each
(
arr
,
function
(
index
,
item
)
{
console
.
log
(
data
[
item
])
$
(
'#second'
+
item
).
text
(
data
[
item
])
})
})
}
// 上下级商户数
// 上下级商户 - 树
var
treeParams
=
{
id
:
31
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
}
function
getSecondTree
()
{
var
treeParams
=
{
id
:
merchantId
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
}
var
merchants
=
{}
var
merchants
=
{}
request
(
treeParams
,
function
(
res
)
{
request
(
treeParams
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
merchants
=
tree
.
create
(
'merchantTree'
,
res
.
data
)
merchants
=
tree
.
create
(
'merchantTree'
,
res
.
data
)
merchants
.
expandAll
(
true
)
merchants
.
expandAll
(
true
)
}
}
})
})
}
// 列表
// 列表配置
var
subMerchantTable
=
table
.
render
({
var
subMerchantTable
=
table
.
render
({
elem
:
'#subMerchantTable'
,
elem
:
'#subMerchantTable'
,
page
:
false
,
page
:
false
,
cols
:
[
cols
:
[
[
[{
{
field
:
''
,
title
:
'序号'
,
type
:
'numbers'
,
width
:
80
},
field
:
''
,
{
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
},
title
:
'序号'
,
{
field
:
'roleName'
,
title
:
'角色'
,
width
:
120
},
type
:
'numbers'
,
{
field
:
'merchantName'
,
title
:
'登录账户'
,
width
:
120
},
width
:
80
{
field
:
'statusName'
,
title
:
'登录密码'
,
width
:
120
},
},
{
field
:
'createdAccount '
,
title
:
'创建者'
,
width
:
100
},
{
{
field
:
'createdTime'
,
title
:
'创建时间'
,
width
:
150
}
field
:
'staffName'
,
title
:
'员工姓名'
,
width
:
120
},
{
field
:
'roleName'
,
title
:
'角色'
,
width
:
120
},
{
field
:
'merchantName'
,
title
:
'登录账户'
,
width
:
120
},
{
field
:
'statusName'
,
title
:
'登录密码'
,
width
:
120
},
{
field
:
'createdAccount '
,
title
:
'创建者'
,
width
:
100
},
{
field
:
'createdTime'
,
title
:
'创建时间'
,
width
:
150
}
]
]
]
]
})
})
getTabelList
(
subMerchantTable
)
// 获取table列表接口
// 获取table列表接口
function
getTabelList
(
table
,
isResetPageNum
=
false
)
{
function
getSecondTable
(
table
,
isResetPageNum
=
false
)
{
request
(
request
({
{
method
:
'cn.com.glsx.merchants.staff.findMerchantStaffList'
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantStaffList'
,
merchantId
:
merchantId
merchantId
:
31
},
},
function
(
res
)
{
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
var
data
=
res
.
data
var
data
=
res
.
data
var
options
=
{
var
options
=
{
data
:
data
data
:
data
}
}
t
able
.
reload
(
options
)
subMerchantT
able
.
reload
(
options
)
}
}
)
)
}
}
})
})
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/merchant/edit.html
View file @
b6aa5d5
This diff is collapsed.
Click to expand it.
html/merchant/index.html
View file @
b6aa5d5
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
switch
(
eventName
)
{
switch
(
eventName
)
{
// 查看
// 查看
case
'handleDetail'
:
case
'handleDetail'
:
go
(
'merchant'
,
'detail'
)
go
(
'merchant'
,
'detail'
,
{
merchantId
:
row
.
id
}
)
break
break
// 修改
// 修改
case
'handleEdit'
:
case
'handleEdit'
:
...
@@ -361,7 +361,7 @@
...
@@ -361,7 +361,7 @@
// 本身
// 本身
if
(
item
.
id
==
user
.
merchantId
)
{
if
(
item
.
id
==
user
.
merchantId
)
{
item
.
btn
.
createStaff
=
true
item
.
btn
.
createStaff
=
true
if
(
merchantAccountLevel
!=
4
)
{
if
(
item
.
merchantAccountLevel
!=
4
)
{
item
.
btn
.
createSubMerchant
=
true
item
.
btn
.
createSubMerchant
=
true
}
}
}
else
{
// 下级商户
}
else
{
// 下级商户
...
...
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