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 41c56dd9
authored
Aug 13, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
查看,修改样式调整
2 parents
0a7836bf
36189bae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
64 deletions
html/employee/add.html
html/employee/index.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
html/role/detail.html
html/role/index.html
js/qs.js
html/employee/add.html
View file @
41c56dd
...
...
@@ -173,7 +173,8 @@
findRoleList
()
// 查询角色权限列表
function
findRoleList
()
{
var
params
=
{
method
:
'org.ore.api.role.list'
,
id
:
merchantId
}
// var params = { method: 'org.ore.api.role.list', id: merchantId }
var
params
=
{
method
:
'org.ore.api.role.list'
,
id
:
merchantId
,
delFlag
:
0
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
var
list
=
res
.
data
...
...
html/employee/index.html
View file @
41c56dd
...
...
@@ -54,7 +54,7 @@
<div
class=
"layui-inline status"
pane
>
<label
class=
"layui-form-label "
>
状态
</label>
<div
class=
"layui-input-block"
>
<select
name=
"status"
id=
"status"
lay-verify=
"required"
>
<select
name=
"status"
id=
"status"
lay-verify=
"required"
placeholder=
"请选择状态"
>
<!-- <option value="">全部</option>
<option value="0">存草稿</option>
<option value="1">启用</option>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"layui-inline"
pane
>
<div
class=
"layui-input-inline selector"
>
<select
name=
"type"
lay-verify=
"required"
>
<select
name=
"type"
lay-verify=
"required"
placeholder=
"员工姓名/手机号"
>
<option
value=
""
></option>
<option
value=
"0"
>
员工姓名
</option>
<option
value=
"1"
>
手机号
</option>
...
...
@@ -119,7 +119,7 @@
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'
cre
atedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
field
:
'
upd
atedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
220
,
align
:
'left'
,
toolbar
:
'#employeeBar'
}
]
]
...
...
@@ -184,7 +184,7 @@
}
else
if
(
layEvent
===
'edit'
)
{
go
(
'employee'
,
'add'
,
{
id
:
data
.
id
,
merchantId
:
data
.
merchantId
})
}
else
if
(
layEvent
===
'del'
)
{
layer
.
confirm
(
'
真的删除行么
'
,
function
(
index
)
{
layer
.
confirm
(
'
是否确认删除该员工?
'
,
function
(
index
)
{
// obj.del() //删除对应行(tr)的DOM结构,并更新缓存
var
params
=
{
method
:
'cn.com.glsx.merchants.staff.deleteStaff'
,
...
...
html/merchant/detail.html
View file @
41c56dd
...
...
@@ -89,6 +89,10 @@
.tabmutiple-content
{
margin
:
0
20px
;
}
.fixed-btn
{
position
:
fixed
;
bottom
:
30px
;
}
</style>
</head>
...
...
@@ -123,6 +127,12 @@
<div
class=
"layui-form-mid layui-word-aux"
id=
"accountLevelName"
></div>
</div>
</div>
<!-- <div class="layui-form-item">
<label class="layui-form-label">账户有效期:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux"></div>
</div>
</div> -->
<h3
class=
"content-title"
>
企业信息
</h3>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
商户名称:
</label>
...
...
@@ -280,7 +290,7 @@
</div>
</div>
<div
class=
"footer-close"
>
<button
class=
"layui-btn"
id=
"closeEl"
>
关闭
</button>
<button
class=
"layui-btn
fixed-btn
"
id=
"closeEl"
>
关闭
</button>
</div>
</div>
</main>
...
...
@@ -344,7 +354,7 @@
if
(
basicArr
[
i
]
==
'businessScopName'
&&
roleData
.
businessScopeCustomize
)
{
roleData
.
businessScopName
=
roleData
.
businessScopName
?
(
roleData
.
businessScopName
+
','
+
roleData
.
businessScopeCustomize
)
:
roleData
.
businessScopeCustomize
}
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
?
roleData
[
basicArr
[
i
]]
:
''
)
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
?
roleData
[
basicArr
[
i
]]
:
'
无
'
)
}
callback
(
roleData
.
accountTypes
)
}
...
...
@@ -468,17 +478,12 @@
width
:
120
},
{
field
:
'
merchantNam
e'
,
field
:
'
staffPhon
e'
,
title
:
'登录账户'
,
width
:
120
},
{
field
:
'statusName'
,
title
:
'登录密码'
,
width
:
120
},
{
field
:
'createdAccount '
,
field
:
'createdAccount'
,
title
:
'创建者'
,
width
:
100
},
...
...
html/merchant/edit.html
View file @
41c56dd
...
...
@@ -128,8 +128,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
商户类型:
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px; margin: 0;"
>
<select
name=
"merchantType"
>
<option
value=
"1"
>
个
体户
</option>
<select
name=
"merchantType"
id=
"merchantTypeEl"
>
<option
value=
"1"
>
个
人
</option>
<option
value=
"2"
>
企业
</option>
</select>
</div>
...
...
@@ -654,6 +654,11 @@
}
})
// console.log($('#merchantTypeEl'))
// $('#merchantTypeEl').on('change', function() {
// console.log('?????????????')
// })
$
(
'.upload'
).
on
(
'change'
,
function
(
e
)
{
// console.log(e)
var
idx
=
$
(
this
).
data
(
'idx'
)
...
...
@@ -731,7 +736,6 @@
}
else
{
getBusiScope
()
getCarBrandTree
()
getAccountType
()
}
if
(
isFactory
)
{
getAccountLevel
()
...
...
@@ -795,13 +799,14 @@
function
getParentInfo
()
{
// console.log(parentMerchantId)
getMerchantApi
(
parentMerchantId
,
function
(
res
)
{
// console.log(res.data)
// console.log(res.data
, 'parentInfo'
)
var
data
=
res
.
data
parentInfo
=
{
parentId
:
data
.
id
,
parentName
:
data
.
merchantName
,
parentAccountType
:
data
.
accountType
,
parentAccountTypeName
:
data
.
accountTypeNames
,
parent
AccountType
:
data
.
merchantType
,
parent
MerchantAccountLevel
:
data
.
merchantAccountLevel
,
channelId
:
data
.
channelId
,
effectiveTime
:
data
.
effectiveTime
}
...
...
@@ -809,6 +814,8 @@
if
(
editLevel
==
3
)
{
getMerchantInfo
()
$
(
'#accountLevelEl'
).
attr
(
'disabled'
,
true
)
}
else
{
getAccountType
()
}
getAccountLevel
()
})
...
...
@@ -828,11 +835,7 @@
getAccountType
()
recoveryBusiScopeCus
()
recoveryFile
()
// if (merchantForm.status == 1) {
// findMenuFunTreeByMerId()
// } else {
getById
()
// }
})
}
...
...
@@ -892,13 +895,14 @@
// 账户等级
function
getAccountLevel
()
{
// console.log('???????????')
getDictData
(
'account_level'
,
function
(
res
)
{
baseData
.
accountLevelList
=
res
.
data
// console.log(baseData.accountLevelList)
if
(
!
isFactory
)
{
var
tempList
=
[]
$
.
each
(
baseData
.
accountLevelList
,
function
(
index
,
item
)
{
if
(
item
.
dictValue
>
parentInfo
.
parent
AccountType
)
{
if
(
item
.
dictValue
>
parentInfo
.
parent
MerchantAccountLevel
)
{
tempList
.
push
(
baseData
.
accountLevelList
[
index
])
}
})
...
...
@@ -982,7 +986,7 @@
// 账户类型
function
getAccountType
()
{
getDictData
(
'account_type'
,
function
(
res
)
{
// console.log(res.data)
// console.log(res.data
, 'account_type'
)
baseData
.
accountTypeList
=
res
.
data
var
checkedList
=
[]
if
(
editLevel
==
3
&&
merchantForm
.
accountType
)
{
...
...
@@ -990,20 +994,44 @@
}
var
el
=
$
(
'#accountTypeEl'
)
$
.
each
(
baseData
.
accountTypeList
,
function
(
index
,
item
)
{
var
optionEl
=
$
(
'<input type="checkbox" class="accounttypeId" name="accountType['
+
item
.
dictValue
+
']" title='
+
item
.
dictLabel
+
' value="'
+
item
.
dictValue
+
'">'
)
// 修改-回显
if
(
editLevel
==
3
)
{
for
(
var
i
=
0
;
i
<=
checkedList
.
length
;
i
++
)
{
if
(
checkedList
[
i
]
==
item
.
dictValue
)
{
optionEl
.
attr
(
"checked"
,
true
)
// console.log(item)
if
(
parentMerchantId
)
{
var
parentLevelList
=
parentInfo
.
parentAccountType
.
split
(
','
)
for
(
var
k
=
0
;
k
<=
parentLevelList
.
length
;
k
++
)
{
if
(
item
.
dictValue
==
parseInt
(
parentLevelList
[
k
]))
{
var
optionEl
=
$
(
'<input type="checkbox" class="accounttypeId" name="accountType['
+
item
.
dictValue
+
']" title='
+
item
.
dictLabel
+
' value="'
+
item
.
dictValue
+
'">'
)
// 修改-回显
if
(
editLevel
==
3
)
{
for
(
var
i
=
0
;
i
<=
checkedList
.
length
;
i
++
)
{
if
(
checkedList
[
i
]
==
item
.
dictValue
)
{
optionEl
.
attr
(
"checked"
,
true
)
break
}
}
}
el
.
append
(
optionEl
)
form
.
render
(
'checkbox'
)
break
}
}
}
else
{
var
optionEl
=
$
(
'<input type="checkbox" class="accounttypeId" name="accountType['
+
item
.
dictValue
+
']" title='
+
item
.
dictLabel
+
' value="'
+
item
.
dictValue
+
'">'
)
// 修改-回显
if
(
editLevel
==
3
)
{
for
(
var
i
=
0
;
i
<=
checkedList
.
length
;
i
++
)
{
if
(
checkedList
[
i
]
==
item
.
dictValue
)
{
optionEl
.
attr
(
"checked"
,
true
)
break
}
}
}
el
.
append
(
optionEl
)
form
.
render
(
'checkbox'
)
}
el
.
append
(
optionEl
)
form
.
render
(
'checkbox'
)
})
})
}
...
...
@@ -1287,19 +1315,26 @@
var
menuIds
=
[]
var
functionIds
=
[]
var
functionIdLists
=
[]
var
functionValueIdLists
=
[]
var
nodes
=
productObj
.
treeObj
.
getCheckedNodes
(
true
)
$
.
each
(
nodes
,
function
(
index
,
item
)
{
// console.log(item)
if
(
item
.
logo
==
'function'
)
{
functionIdLists
.
push
(
item
)
}
else
if
(
item
.
logo
==
'functionValue'
)
{
functionValueIdLists
.
push
(
item
)
}
else
{
menuIds
.
push
(
item
.
id
)
if
(
item
.
logo
!=
'neglect'
)
{
menuIds
.
push
(
item
.
id
)
}
}
})
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
function
Value
IdLists
,
function
(
idx
,
m
)
{
// m.parentId
// console.log(m)
var
findIdx
=
-
1
$
.
each
(
functionIds
,
function
(
idn
,
n
)
{
if
(
n
.
mend
Id
==
m
.
parentId
)
{
if
(
n
.
function
Id
==
m
.
parentId
)
{
findIdx
=
idn
}
})
...
...
@@ -1313,6 +1348,13 @@
})
}
})
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
// console.log(m)
functionIds
.
push
({
functionId
:
m
.
parentId
,
mendId
:
m
.
superParentId
})
})
productList
.
push
({
productId
:
productObj
.
productId
,
functionIds
:
functionIds
,
...
...
@@ -1358,12 +1400,12 @@
getAuthList
()
console
.
log
(
merchantForm
)
console
.
log
(
requestList
)
// 草稿
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
// 草稿
if
(
merchantForm
.
status
==
1
)
{
params
.
status
=
2
}
else
{
...
...
html/merchant/index.html
View file @
41c56dd
...
...
@@ -240,7 +240,7 @@
align
:
'center'
,
width
:
160
},
{
field
:
'
cre
atedTime'
,
field
:
'
upd
atedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
...
...
html/role/detail.html
View file @
41c56dd
...
...
@@ -30,28 +30,17 @@
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleName"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"id"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色说明:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleDescription "
></div>
</div>
</div>
<h3
class=
"content-title layui-form"
>
角色权限
<!-- <select id="accountType" name="accountType" lay-filter="accountSelect">
</select> -->
</h3>
<div
class=
"layui-tab tabmutiple-content"
lay-filter=
"roleAuth"
>
<ul
class=
"layui-tab-title"
></ul>
<div
class=
"layui-tab-content"
></div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色号:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleCode"
></div>
</div>
<div
class=
"footer-close"
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"return"
>
关闭
</button>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
角色说明:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-mid layui-word-aux"
id=
"roleDescription"
></div>
</div>
</div>
</div>
...
...
@@ -72,7 +61,7 @@
var
$
=
layui
.
$
var
roleid
=
qs
(
'id'
)
var
merchantId
=
qs
(
'merchantId'
)
var
basicArr
=
[
'roleName'
,
'
id
'
,
'roleDescription'
]
var
basicArr
=
[
'roleName'
,
'
roleCode
'
,
'roleDescription'
]
var
roleData
=
{}
var
menuFunTreeData
=
[]
var
templateData
=
{}
...
...
@@ -178,7 +167,7 @@
console
.
log
(
roleData
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
for
(
var
i
in
basicArr
)
{
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]])
$
(
'#'
+
[
basicArr
[
i
]]).
text
(
roleData
[
basicArr
[
i
]]
||
''
)
}
callback
(
roleData
.
responseList
)
}
...
...
html/role/index.html
View file @
41c56dd
...
...
@@ -78,7 +78,7 @@
{
field
:
'roleCode'
,
title
:
'角色号'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'所属商户名'
,
align
:
'center'
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
},
{
field
:
'
cre
atedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
field
:
'
upd
atedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
120
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#roleBar'
}
]
]
...
...
js/qs.js
0 → 100644
View file @
41c56dd
This diff is collapsed.
Click to expand it.
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