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 c2e3d96e
authored
Nov 25, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v2.9.0' into v2.12.1
2 parents
37ace8ca
dc850e6c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
87 deletions
html/employee/detail.html
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/map.html
html/role/detail.html
html/role/index.html
js/validator.js
html/employee/detail.html
View file @
c2e3d96
...
...
@@ -457,6 +457,7 @@
}
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
();
}
}
})
...
...
html/merchant/add.html
View file @
c2e3d96
...
...
@@ -424,7 +424,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<input
class=
"layui-input"
placeholder=
"
车型品牌
"
id=
"brand"
/>
<input
class=
"layui-input"
placeholder=
"
请输入品牌/子品牌名称搜索
"
id=
"brand"
/>
<button
id=
"checkCarBrand"
type=
"button"
class=
"layui-btn btn-no-border check-carbrand"
>
全选
</button>
<div
id=
"carBrandTree"
class=
"wrapper-tree hide"
style=
"height: 200px; overflow-y: scroll"
></div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
...
...
@@ -640,6 +640,7 @@
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
getProvinceList
()
// com.getSelect({
...
...
@@ -781,8 +782,8 @@
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
}
if
(
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为
11 位
纯数字'
}
},
merchantLoginPassword
:
function
(
value
)
{
...
...
@@ -1054,16 +1055,32 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
var
fullAddress
=
res
.
geocoderAddress
.
addressComponent
var
fullAddress
=
''
var
provincecode
=
''
if
(
res
.
geocoderAddress
)
{
fullAddress
=
res
.
geocoderAddress
.
addressComponent
provincecode
=
res
.
geocoderAddress
.
adcode
addressData
.
fullAddress
=
res
.
geocoderAddress
.
addressComponent
addressData
.
provincecode
=
res
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
addressData
.
fullAddress
provincecode
=
addressData
.
provincecode
}
// 获取省市
var
provincecode
=
res
.
geocoderAddress
.
adcode
var
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
var
provinceIdx
=
''
var
cityIdx
=
''
if
(
fullAddress
)
{
provinceIdx
=
fullAddress
.
province
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
provinceIdx
=
merchantForm
.
provinceName
cityIdx
=
merchantForm
.
cityName
provincecode
=
merchantForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
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
)
+
'郊县'
)
...
...
@@ -1095,7 +1112,6 @@
select
:
function
(
data
)
{
const
{
value
}
=
data
if
(
value
)
{
console
.
log
(
cityInfo
);
merchantForm
.
cityName
=
value
var
cityChange
=
cityInfo
.
find
(
item
=>
item
.
name
==
value
)
merchantForm
.
cityCode
=
cityChange
.
adcode
...
...
@@ -1104,7 +1120,6 @@
}
})
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
==
cityIdx
)
console
.
log
(
city
);
merchantForm
.
cityCode
=
city
.
adcode
merchantForm
.
cityName
=
city
.
name
$
(
'#startc'
).
val
(
merchantForm
.
cityName
)
...
...
html/merchant/addSubMerchant.html
View file @
c2e3d96
...
...
@@ -408,7 +408,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<input
class=
"layui-input"
placeholder=
"
车型品牌
"
id=
"brand"
/>
<input
class=
"layui-input"
placeholder=
"
请输入品牌/子品牌名称搜索
"
id=
"brand"
/>
<button
id=
"checkCarBrand"
type=
"button"
class=
"layui-btn btn-no-border check-carbrand"
>
全选
</button>
<div
id=
"carBrandTree"
class=
"hide"
style=
"height: 200px; overflow-y: scroll"
></div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
...
...
@@ -631,6 +631,7 @@
}
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
getProvinceList
()
// com.getSelect({
...
...
@@ -779,8 +780,8 @@
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
}
if
(
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为
11 位
纯数字'
}
},
merchantLoginPassword
:
function
(
value
)
{
...
...
@@ -1064,9 +1065,18 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
var
fullAddress
=
res
.
geocoderAddress
.
addressComponent
var
fullAddress
=
''
var
provincecode
=
''
if
(
res
.
geocoderAddress
)
{
fullAddress
=
res
.
geocoderAddress
.
addressComponent
provincecode
=
res
.
geocoderAddress
.
adcode
addressData
.
fullAddress
=
res
.
geocoderAddress
.
addressComponent
addressData
.
provincecode
=
res
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
addressData
.
fullAddress
provincecode
=
addressData
.
provincecode
}
// 获取省市
var
provincecode
=
res
.
geocoderAddress
.
adcode
var
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
...
...
html/merchant/detail.html
View file @
c2e3d96
...
...
@@ -704,6 +704,7 @@
// businessScopeCustomize
if
(
res
.
code
==
'0'
)
{
roleData
=
helper
.
clone
(
true
,
res
.
data
)
console
.
log
(
roleData
,
'===='
);
for
(
var
i
in
basicArr
)
{
// if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) {
// roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
...
...
@@ -717,6 +718,12 @@
$
(
'#sapBox'
).
removeClass
(
'hide'
)
}
roleData
.
bussinessBegintime
?
$
(
'#businessTime'
).
text
(
roleData
.
bussinessBegintime
+
'-'
+
roleData
.
bussinessEndtime
)
:
$
(
'#businessTime'
).
text
(
'-'
)
if
(
roleData
.
provinceName
)
{
roleData
.
merchantAddress
?
$
(
'#merchantAddress'
).
text
(
roleData
.
merchantAddress
)
:
$
(
'#merchantAddress'
).
text
(
roleData
.
provinceName
+
' '
+
roleData
.
cityName
)
}
else
{
$
(
'#merchantAddress'
).
text
(
'-'
)
}
// roleData.merchantAddress
// var effectiveTimeNameEl = $('#effectiveTimeName')
// if (roleData.merchantAccountLevel == 4) { // 门店
// if (roleData.status == 1 || roleData.status == 5) {
...
...
html/merchant/edit.html
View file @
c2e3d96
...
...
@@ -291,7 +291,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
<input
class=
"layui-input
disabled
"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
</div>
</div>
...
...
@@ -493,7 +493,7 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<input
class=
"layui-input"
placeholder=
"
车型品牌
"
id=
"brand"
/>
<input
class=
"layui-input"
placeholder=
"
请输入品牌/子品牌名称搜索
"
id=
"brand"
/>
<button
id=
"checkCarBrand"
type=
"button"
class=
"layui-btn btn-no-border check-carbrand"
>
全选
</button>
<div
id=
"carBrandTree"
class=
"hide"
style=
"height: 200px; overflow-y: scroll"
></div>
...
...
@@ -628,56 +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'
)
...
...
@@ -779,8 +736,8 @@
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
}
if
(
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为
11 位
纯数字'
}
},
merchantLoginPassword
:
function
(
value
)
{
...
...
@@ -944,9 +901,22 @@
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
=>
{
// 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
))
{
...
...
@@ -958,7 +928,6 @@
merchantBrandId
}
})
console
.
log
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
}
if
(
merchantForm
.
merchantFiles
.
length
)
{
...
...
@@ -1025,16 +994,33 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
var
fullAddress
=
res
.
geocoderAddress
.
addressComponent
var
fullAddress
=
''
var
provincecode
=
''
if
(
res
.
geocoderAddress
)
{
fullAddress
=
res
.
geocoderAddress
.
addressComponent
provincecode
=
res
.
geocoderAddress
.
adcode
addressData
.
fullAddress
=
res
.
geocoderAddress
.
addressComponent
addressData
.
provincecode
=
res
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
addressData
.
fullAddress
provincecode
=
addressData
.
provincecode
}
// 获取省市
var
provincecode
=
res
.
geocoderAddress
.
adcode
var
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
// 如果没有点击地图地址,省市信息从返回数据读取
var
provinceIdx
=
''
var
cityIdx
=
''
if
(
fullAddress
)
{
provinceIdx
=
fullAddress
.
province
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
provinceIdx
=
merchantForm
.
provinceName
cityIdx
=
merchantForm
.
cityName
provincecode
=
merchantForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
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
)
+
'郊县'
)
...
...
@@ -1051,7 +1037,6 @@
}
}
$
(
'#addrEl'
).
val
(
merchantForm
.
merchantAddress
)
console
.
log
(
provinceInfoList
);
var
province
=
provinceInfoList
.
find
(
item
=>
item
.
name
.
indexOf
(
provinceIdx
)
!=
-
1
)
$
(
'#startp'
).
val
(
province
.
name
)
cityInfo
=
province
.
districtList
...
...
@@ -1479,10 +1464,12 @@
}
}
})
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
.
indexOf
(
merchantForm
.
cityName
)
!=
-
1
)
merchantForm
.
cityName
=
city
.
name
// merchantForm.cityCode = city.cityId
$
(
'#startc'
).
val
(
city
.
name
)
if
(
merchantForm
.
cityName
)
{
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
.
indexOf
(
merchantForm
.
cityName
)
!=
-
1
)
merchantForm
.
cityName
=
city
.
name
// merchantForm.cityCode = city.cityId
$
(
'#startc'
).
val
(
city
.
name
)
}
form
.
render
(
'select'
);
}
if
(
step
==
1
)
{
...
...
@@ -1510,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
...
...
@@ -1741,6 +1726,7 @@
cityInfo
=
province
.
districtList
merchantForm
.
provinceCode
=
province
.
adcode
merchantForm
.
provinceName
=
province
.
name
merchantForm
.
merchantAddress
=
''
$
(
'#addrEl'
).
val
(
''
)
}
else
{
cityInfo
=
[]
...
...
html/merchant/map.html
View file @
c2e3d96
...
...
@@ -67,10 +67,10 @@
</button>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-inline"
style=
"width:
400px
; height: 300px;"
>
<div
class=
"layui-input-inline"
style=
"width:
100%
; height: 300px;"
>
<div
id=
"container"
></div>
</div>
<
div
class=
"poi-list layui-input-inline poi-list"
id=
"pois"
></div
>
<
!-- <div class="poi-list layui-input-inline poi-list" id="pois"></div> --
>
</div>
<div
class=
"layui-form-item"
>
<input
name=
"merchantAddress"
id=
"merchantAddress"
class=
"layui-input"
placeholder=
"请输入详细地址,如道路、门牌号等"
>
...
...
html/role/detail.html
View file @
c2e3d96
...
...
@@ -207,6 +207,7 @@
}
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
();
}
})
}
...
...
html/role/index.html
View file @
c2e3d96
...
...
@@ -305,7 +305,7 @@
</script>
<script
type=
"text/html"
id=
"roleBar"
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"detail"
>
查看
<
/a
>
{{
#
if
(
!
d
.
defalutRole
){
}}
{{
#
if
(
!
(
d
.
defalutRole
||
d
.
roleName
==
"系统默认角色"
)
){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
{{
#
}
}}
{{
#
if
(
!
d
.
defalutRole
&&
d
.
delFlag
==
1
){
}}
...
...
js/validator.js
View file @
c2e3d96
...
...
@@ -4,7 +4,7 @@ layui.define(['store'], function (exports) {
PHONEREG
:
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
,
/* 手机号码或固话格式校验正则 */
PHONETWO
:
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
,
PHONETWO
:
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
,
/* 同时包含字母和数字 */
ISNUMANDLETTERS
:
/^
[
a-zA-Z0-9
]
+$/
,
...
...
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