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 0132beac
authored
Mar 30, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复子商户来源bug
1 parent
3c82ab2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
9 deletions
html/merchant/addSubMerchant.html
html/merchant/addSubMerchant.html
View file @
0132bea
...
...
@@ -987,7 +987,6 @@
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
console
.
log
(
getCheckedKeys
)
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
merchantForm
.
merchantBrandList
=
getCheckedNodes
.
map
(
car
=>
{
let
merchantBrandId
=
[]
...
...
@@ -1001,7 +1000,6 @@
merchantBrandId
}
})
console
.
log
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
}
if
(
merchantForm
.
merchantFiles
.
length
)
{
...
...
@@ -1029,8 +1027,17 @@
}
else
{
params
.
status
=
1
}
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
verifyMerchantName
(
params
.
merchantName
,
params
,
loading
)
layer
.
close
(
loading
)
return
false
})
function
nextStepRequest
(
params
,
loading
){
params
.
createdSource
=
1
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
loading
)
if
(
editLevel
==
3
)
{
...
...
@@ -1063,12 +1070,40 @@
}
})
}
}
else
{
layer
.
close
(
loading
)
}
})
layer
.
close
(
loading
)
}
function
verifyMerchantName
(
name
,
paramsM
,
loading
){
var
params
=
{
method
:
'merchants.api.merchant.checkMerchantNameRepeat'
,
merchantName
:
paramsM
.
merchantName
}
request
(
params
,
function
(
res
)
{
if
(
res
&&
res
.
data
==
true
){
return
nextStepRequest
(
paramsM
,
loading
)
}
else
if
(
res
&&
res
.
data
==
false
){
return
verifyDialog
(
paramsM
,
loading
)
}
})
return
false
})
}
function
verifyDialog
(
params
,
loading
){
// 验证商户名是否重复
layer
.
confirm
(
'商户名称已经被使用,是否确定继续使用'
,
{
title
:
"提示"
,
btn
:
[
'取消'
,
'确定'
]
//可以无限个按钮
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
nextStepRequest
(
params
,
loading
)
}
},
function
(
index
,
layero
){
//按钮【按钮一】的回调
layer
.
close
(
index
);
layer
.
close
(
loading
)
})
}
function
findId
(
nodeList
)
{
var
idList
=
[]
...
...
@@ -1115,7 +1150,6 @@
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
console
.
log
(
cityIdx
)
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
...
...
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