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 15bb70f9
authored
Jun 07, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v2.3.0' into 'develop'
V2.3.0-0606 See merge request
!24
2 parents
4b7d3cfc
e851f178
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
53 deletions
html/merchant/edit.html
html/merchant/edit.html
View file @
15bb70f
...
...
@@ -628,57 +628,13 @@
busiScopeList
:
[],
accountTypeList
:
[]
}
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
getProvinceList
()
// com.getSelect({
// id: 'startp',
// name: 'provinceName',
// url: '/area/list',
// // value: 'provinceId',
// value: 'provinceName',
// text: 'provinceName',
// param: { provinceName: '广东', cityName: '深圳' },
// select: function (data) {
// const { value } = data
// if (value) {
// var province = provinceInfoList.find(item => item.provinceName == value)
// cityInfo = province.cityInfoList
// merchantForm.provinceCode = province.provinceId
// merchantForm.provinceName = province.provinceName
// $('#addrEl').val('')
// } else {
// cityInfo = []
// merchantForm.provinceCode = ''
// merchantForm.provinceName = ''
// }
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// com.getSelect({
// id: 'startc',
// name: 'cityName',
// url: '/area/list',
// // value: 'cityId',
// value: 'cityName',
// text: 'cityName',
// data: cityInfo,
// link: 'startp',
// select: function (data) {
// const { value } = data
// if (value) {
// var city = cityInfo.find(item => item.cityName == value)
// merchantForm.cityCode = city.cityId
// merchantForm.cityName = city.cityName
// } else {
// merchantForm.cityCode = ''
// merchantForm.cityName = ''
// }
// }
// })
// }
// })
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
...
...
@@ -945,8 +901,22 @@
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
merchantForm
.
merchantBrandList
=
getCheckedNodes
.
map
(
car
=>
{
// getCheckedNodes = getCheckedNodes.filter(item => item.children)
// let parentCheckNodes = getCheckedNodes.filter(item => item.children)
const
childCheckNodes
=
getCheckedNodes
.
filter
(
item
=>
!
item
.
children
)
let
parent
=
childCheckNodes
.
map
(
item
=>
{
return
item
.
getParentNode
()
})
const
removeDuplicateObj
=
(
arr
)
=>
{
let
obj
=
{}
arr
=
arr
.
reduce
((
newArr
,
next
)
=>
{
obj
[
next
.
id
]
?
''
:
(
obj
[
next
.
id
]
=
true
&&
newArr
.
push
(
next
))
return
newArr
},
[])
return
arr
}
const
parentCheckNodes
=
removeDuplicateObj
(
parent
)
merchantForm
.
merchantBrandList
=
parentCheckNodes
.
map
(
car
=>
{
let
merchantBrandId
=
[]
car
.
children
.
forEach
(
item
=>
{
if
(
getCheckedKeys
.
includes
(
item
.
id
))
{
...
...
@@ -1029,7 +999,7 @@
if
(
res
.
geocoderAddress
)
{
fullAddress
=
res
.
geocoderAddress
.
addressComponent
provincecode
=
res
.
geocoderAddress
.
adcode
addressData
.
fullAddress
=
res
.
geocoderAddress
.
addressComponent
addressData
.
fullAddress
=
res
.
geocoderAddress
.
addressComponent
addressData
.
provincecode
=
res
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
addressData
.
fullAddress
...
...
@@ -1527,11 +1497,9 @@
$
(
'#carBrandTree'
).
removeClass
(
'hide'
)
var
checkedList
=
[]
if
(
editLevel
==
3
&&
merchantForm
.
merchantBrandMain
)
{
// checkedList = merchantForm.merchantBrandMain.split(',')
checkedList
=
merchantForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
$
.
each
(
checkedList
,
function
(
index
,
item
)
{
checkedList
[
index
]
=
parseInt
(
item
)
})
checkedList
.
pop
()
checkedList
=
checkedList
.
map
(
item
=>
parseInt
(
item
))
}
treeObj
=
tree
.
create
(
'carBrandTree'
,
res
.
data
,
{
checkedList
:
checkedList
...
...
@@ -1758,6 +1726,7 @@
cityInfo
=
province
.
districtList
merchantForm
.
provinceCode
=
province
.
adcode
merchantForm
.
provinceName
=
province
.
name
merchantForm
.
merchantAddress
=
''
$
(
'#addrEl'
).
val
(
''
)
}
else
{
cityInfo
=
[]
...
...
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