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 a9b8992e
authored
Nov 23, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
0c5e60f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
html/merchant/edit.html
html/merchant/edit.html
View file @
a9b8992
...
...
@@ -20,16 +20,6 @@
color
:
#fff
!important
;
}
/* .layui-form-checked + div > span:first-child:hover {
background-color: red;
color: #fff !important;
} */
/* .highlighted-disabled + div > span:first-child:hover {
background-color: var(--btnBlue) !important;
color: inherit !important;
} */
.marCheckbox
{
display
:
flex
;
}
...
...
@@ -663,6 +653,7 @@
var
editData
=
{}
var
treeObj
=
null
var
all_nodes
=
[]
var
_checkedNodes
=
new
Set
()
// 1-创建新商户;2-创建子商户;3-修改
var
editLevel
=
1
// 1-基本信息;2-权限树
...
...
@@ -1302,8 +1293,7 @@ form.on('select(accountLevelFilter)', function(data) {
// params.businessScopeCustomize = tempList.join(',')
// if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
// params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
if
(
treeObj
)
{
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
if
(
!
getCheckedKeys
?.
length
){
...
...
@@ -1342,6 +1332,7 @@ form.on('select(accountLevelFilter)', function(data) {
}
})
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
console
.
log
(
params
.
merchantBrandListJson
)
}
if
(
merchantForm
.
merchantFiles
.
length
)
{
params
.
merchantFiles
=
JSON
.
stringify
(
merchantForm
.
merchantFiles
)
...
...
@@ -1367,7 +1358,7 @@ form.on('select(accountLevelFilter)', function(data) {
params
.
status
=
1
}
verifyMerchantName
(
params
.
merchantName
,
params
)
//
verifyMerchantName(params.merchantName,params)
// request(params, function (res) {
// if (res.code == '0') {
// layer.msg('操作成功', {
...
...
@@ -1827,8 +1818,7 @@ form.on('select(accountLevelFilter)', function(data) {
treeObj
.
showNodes
(
all_nodes
);
}
else
{
var
nodesList
=
treeObj
.
getNodesByParamFuzzy
(
'label'
,
txt
);
var
showNodes
=
[];
var
showNodes
=
[];
nodesList
.
forEach
(
function
(
node
)
{
showNodes
.
push
(
node
);
// 把当前匹配的节点加入显示列表
// 如果匹配的节点有父节点,也将其父节点加入显示列表
...
...
@@ -1841,10 +1831,8 @@ form.on('select(accountLevelFilter)', function(data) {
showNodes
=
showNodes
.
concat
(
node
.
children
);
}
});
// 去除重复节点
showNodes
=
uniqueNodes
(
showNodes
);
// 先隐藏所有节点,再显示匹配的节点及其相关的父或子节点
treeObj
.
hideNodes
(
all_nodes
);
treeObj
.
showNodes
(
showNodes
);
...
...
@@ -2075,7 +2063,7 @@ loadSuperiorMerchants(currentPage).then(function(list) {
// 设置为选中和禁用,并添加高亮类
if
(
isChecked
)
{
checkboxHtml
.
attr
(
'checked'
,
true
).
addClass
(
'highlighted'
)
.
attr
(
'disabled'
,
true
)
checkboxHtml
.
attr
(
'checked'
,
true
).
addClass
(
'highlighted'
)
}
if
(
isDisable
){
checkboxHtml
.
attr
(
'disabled'
,
true
).
addClass
(
'highlighted-disabled'
)
...
...
@@ -2110,6 +2098,7 @@ loadSuperiorMerchants(currentPage).then(function(list) {
})
if
(
checkedList
)
{
treeObj
.
checkNodes
(
checkedList
)
_checkedNodes
.
add
(
checkedList
)
}
all_nodes
=
treeObj
.
transformToArray
(
treeObj
.
getNodes
())
bindEvent
()
...
...
@@ -2578,7 +2567,11 @@ loadSuperiorMerchants(currentPage).then(function(list) {
}
}
}
// 显示加载层
var
loadingIndex
=
layer
.
load
(
1
,
{
shade
:
[
0.5
,
'#fff'
]});
// shade属性是可选的
request
(
params
,
function
(
res
)
{
// 关闭加载层
layer
.
close
(
loadingIndex
);
if
(
res
.
code
==
'0'
)
{
menuFunTreeData
=
res
.
data
check_arr
=
res
.
data
...
...
@@ -2822,7 +2815,6 @@ loadSuperiorMerchants(currentPage).then(function(list) {
}
else
{
params
.
status
=
merchantForm
.
status
}
console
.
log
(
params
.
accountTypes
)
request
(
params
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
...
...
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