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
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
83 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 @@
...
@@ -457,6 +457,7 @@
}
}
})
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
();
}
}
}
}
})
})
...
...
html/merchant/add.html
View file @
c2e3d96
...
@@ -424,7 +424,7 @@
...
@@ -424,7 +424,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<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>
<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=
"carBrandTree"
class=
"wrapper-tree hide"
style=
"height: 200px; overflow-y: scroll"
></div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
...
@@ -640,6 +640,7 @@
...
@@ -640,6 +640,7 @@
var
provinceInfoList
=
[]
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
// 省市区
getProvinceList
()
getProvinceList
()
// com.getSelect({
// com.getSelect({
...
@@ -781,8 +782,8 @@
...
@@ -781,8 +782,8 @@
if
(
value
&&
value
.
length
<
3
)
{
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
return
'登录账户名请填入3-15位字符'
}
}
if
(
!
isNaN
(
value
))
{
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
return
'登录账户名不可为
11 位
纯数字'
}
}
},
},
merchantLoginPassword
:
function
(
value
)
{
merchantLoginPassword
:
function
(
value
)
{
...
@@ -1054,16 +1055,32 @@
...
@@ -1054,16 +1055,32 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
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
=
''
var
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
''
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
if
(
fullAddress
)
{
provinceIdx
=
fullAddress
.
province
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
provinceIdx
=
merchantForm
.
provinceName
cityIdx
=
merchantForm
.
cityName
provincecode
=
merchantForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
console
.
log
(
cityIdx
);
if
(
municipality
===
'重庆市'
)
{
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
...
@@ -1095,7 +1112,6 @@
...
@@ -1095,7 +1112,6 @@
select
:
function
(
data
)
{
select
:
function
(
data
)
{
const
{
value
}
=
data
const
{
value
}
=
data
if
(
value
)
{
if
(
value
)
{
console
.
log
(
cityInfo
);
merchantForm
.
cityName
=
value
merchantForm
.
cityName
=
value
var
cityChange
=
cityInfo
.
find
(
item
=>
item
.
name
==
value
)
var
cityChange
=
cityInfo
.
find
(
item
=>
item
.
name
==
value
)
merchantForm
.
cityCode
=
cityChange
.
adcode
merchantForm
.
cityCode
=
cityChange
.
adcode
...
@@ -1104,7 +1120,6 @@
...
@@ -1104,7 +1120,6 @@
}
}
})
})
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
==
cityIdx
)
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
==
cityIdx
)
console
.
log
(
city
);
merchantForm
.
cityCode
=
city
.
adcode
merchantForm
.
cityCode
=
city
.
adcode
merchantForm
.
cityName
=
city
.
name
merchantForm
.
cityName
=
city
.
name
$
(
'#startc'
).
val
(
merchantForm
.
cityName
)
$
(
'#startc'
).
val
(
merchantForm
.
cityName
)
...
...
html/merchant/addSubMerchant.html
View file @
c2e3d96
...
@@ -408,7 +408,7 @@
...
@@ -408,7 +408,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<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>
<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=
"carBrandTree"
class=
"hide"
style=
"height: 200px; overflow-y: scroll"
></div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
<div
id=
"noCarbrand"
class=
"no-car hide"
>
暂无数据
</div>
...
@@ -631,6 +631,7 @@
...
@@ -631,6 +631,7 @@
}
}
var
provinceInfoList
=
[]
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
// 省市区
getProvinceList
()
getProvinceList
()
// com.getSelect({
// com.getSelect({
...
@@ -779,8 +780,8 @@
...
@@ -779,8 +780,8 @@
if
(
value
&&
value
.
length
<
3
)
{
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
return
'登录账户名请填入3-15位字符'
}
}
if
(
!
isNaN
(
value
))
{
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
return
'登录账户名不可为
11 位
纯数字'
}
}
},
},
merchantLoginPassword
:
function
(
value
)
{
merchantLoginPassword
:
function
(
value
)
{
...
@@ -1064,9 +1065,18 @@
...
@@ -1064,9 +1065,18 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
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
provinceIdx
=
fullAddress
.
province
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
...
...
html/merchant/detail.html
View file @
c2e3d96
...
@@ -704,6 +704,7 @@
...
@@ -704,6 +704,7 @@
// businessScopeCustomize
// businessScopeCustomize
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
roleData
=
helper
.
clone
(
true
,
res
.
data
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
console
.
log
(
roleData
,
'===='
);
for
(
var
i
in
basicArr
)
{
for
(
var
i
in
basicArr
)
{
// if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) {
// if (basicArr[i] == 'businessTypeName' && roleData.businessScopeCustomize) {
// roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
// roleData.businessTypeName = roleData.businessTypeName ? roleData.businessTypeName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize
...
@@ -717,6 +718,12 @@
...
@@ -717,6 +718,12 @@
$
(
'#sapBox'
).
removeClass
(
'hide'
)
$
(
'#sapBox'
).
removeClass
(
'hide'
)
}
}
roleData
.
bussinessBegintime
?
$
(
'#businessTime'
).
text
(
roleData
.
bussinessBegintime
+
'-'
+
roleData
.
bussinessEndtime
)
:
$
(
'#businessTime'
).
text
(
'-'
)
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')
// var effectiveTimeNameEl = $('#effectiveTimeName')
// if (roleData.merchantAccountLevel == 4) { // 门店
// if (roleData.merchantAccountLevel == 4) { // 门店
// if (roleData.status == 1 || roleData.status == 5) {
// if (roleData.status == 1 || roleData.status == 5) {
...
...
html/merchant/edit.html
View file @
c2e3d96
...
@@ -291,7 +291,7 @@
...
@@ -291,7 +291,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<div
class=
"layui-input-inline"
>
<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"
/>
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
</div>
</div>
</div>
</div>
...
@@ -493,7 +493,7 @@
...
@@ -493,7 +493,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<label
class=
"layui-form-label"
>
主营品牌:
</label>
<div
class=
"layui-input-inline"
style=
"position: relative;"
>
<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"
<button
id=
"checkCarBrand"
type=
"button"
class=
"layui-btn btn-no-border check-carbrand"
>
全选
</button>
class=
"layui-btn btn-no-border check-carbrand"
>
全选
</button>
<div
id=
"carBrandTree"
class=
"hide"
style=
"height: 200px; overflow-y: scroll"
></div>
<div
id=
"carBrandTree"
class=
"hide"
style=
"height: 200px; overflow-y: scroll"
></div>
...
@@ -628,56 +628,13 @@
...
@@ -628,56 +628,13 @@
busiScopeList
:
[],
busiScopeList
:
[],
accountTypeList
:
[]
accountTypeList
:
[]
}
}
var
provinceInfoList
=
[]
var
provinceInfoList
=
[]
var
cityInfo
=
[]
var
cityInfo
=
[]
var
addressData
=
{}
// 省市区
// 省市区
getProvinceList
()
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框的回车事件
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
...
@@ -779,8 +736,8 @@
...
@@ -779,8 +736,8 @@
if
(
value
&&
value
.
length
<
3
)
{
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
return
'登录账户名请填入3-15位字符'
}
}
if
(
!
isNaN
(
value
))
{
if
(
value
.
length
==
11
&&
!
isNaN
(
value
))
{
return
'登录账户名不可为纯数字'
return
'登录账户名不可为
11 位
纯数字'
}
}
},
},
merchantLoginPassword
:
function
(
value
)
{
merchantLoginPassword
:
function
(
value
)
{
...
@@ -944,9 +901,22 @@
...
@@ -944,9 +901,22 @@
if
(
treeObj
)
{
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
console
.
log
(
getCheckedKeys
)
// getCheckedNodes = getCheckedNodes.filter(item => item.children)
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
// let parentCheckNodes = getCheckedNodes.filter(item => item.children)
merchantForm
.
merchantBrandList
=
getCheckedNodes
.
map
(
car
=>
{
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
=
[]
let
merchantBrandId
=
[]
car
.
children
.
forEach
(
item
=>
{
car
.
children
.
forEach
(
item
=>
{
if
(
getCheckedKeys
.
includes
(
item
.
id
))
{
if
(
getCheckedKeys
.
includes
(
item
.
id
))
{
...
@@ -958,7 +928,6 @@
...
@@ -958,7 +928,6 @@
merchantBrandId
merchantBrandId
}
}
})
})
console
.
log
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
}
}
if
(
merchantForm
.
merchantFiles
.
length
)
{
if
(
merchantForm
.
merchantFiles
.
length
)
{
...
@@ -1025,16 +994,33 @@
...
@@ -1025,16 +994,33 @@
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lat
=
res
.
lat
merchantForm
.
lng
=
res
.
lng
merchantForm
.
lng
=
res
.
lng
merchantForm
.
merchantAddress
=
res
.
merchantAddress
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
provinceIdx
=
''
var
cityIdx
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
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
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
console
.
log
(
cityIdx
);
if
(
municipality
===
'重庆市'
)
{
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
...
@@ -1051,7 +1037,6 @@
...
@@ -1051,7 +1037,6 @@
}
}
}
}
$
(
'#addrEl'
).
val
(
merchantForm
.
merchantAddress
)
$
(
'#addrEl'
).
val
(
merchantForm
.
merchantAddress
)
console
.
log
(
provinceInfoList
);
var
province
=
provinceInfoList
.
find
(
item
=>
item
.
name
.
indexOf
(
provinceIdx
)
!=
-
1
)
var
province
=
provinceInfoList
.
find
(
item
=>
item
.
name
.
indexOf
(
provinceIdx
)
!=
-
1
)
$
(
'#startp'
).
val
(
province
.
name
)
$
(
'#startp'
).
val
(
province
.
name
)
cityInfo
=
province
.
districtList
cityInfo
=
province
.
districtList
...
@@ -1479,10 +1464,12 @@
...
@@ -1479,10 +1464,12 @@
}
}
}
}
})
})
if
(
merchantForm
.
cityName
)
{
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
.
indexOf
(
merchantForm
.
cityName
)
!=
-
1
)
var
city
=
cityInfo
.
find
(
item
=>
item
.
name
.
indexOf
(
merchantForm
.
cityName
)
!=
-
1
)
merchantForm
.
cityName
=
city
.
name
merchantForm
.
cityName
=
city
.
name
// merchantForm.cityCode = city.cityId
// merchantForm.cityCode = city.cityId
$
(
'#startc'
).
val
(
city
.
name
)
$
(
'#startc'
).
val
(
city
.
name
)
}
form
.
render
(
'select'
);
form
.
render
(
'select'
);
}
}
if
(
step
==
1
)
{
if
(
step
==
1
)
{
...
@@ -1510,11 +1497,9 @@
...
@@ -1510,11 +1497,9 @@
$
(
'#carBrandTree'
).
removeClass
(
'hide'
)
$
(
'#carBrandTree'
).
removeClass
(
'hide'
)
var
checkedList
=
[]
var
checkedList
=
[]
if
(
editLevel
==
3
&&
merchantForm
.
merchantBrandMain
)
{
if
(
editLevel
==
3
&&
merchantForm
.
merchantBrandMain
)
{
// checkedList = merchantForm.merchantBrandMain.split(',')
checkedList
=
merchantForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
checkedList
=
merchantForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
$
.
each
(
checkedList
,
function
(
index
,
item
)
{
checkedList
.
pop
()
checkedList
[
index
]
=
parseInt
(
item
)
checkedList
=
checkedList
.
map
(
item
=>
parseInt
(
item
))
})
}
}
treeObj
=
tree
.
create
(
'carBrandTree'
,
res
.
data
,
{
treeObj
=
tree
.
create
(
'carBrandTree'
,
res
.
data
,
{
checkedList
:
checkedList
checkedList
:
checkedList
...
@@ -1741,6 +1726,7 @@
...
@@ -1741,6 +1726,7 @@
cityInfo
=
province
.
districtList
cityInfo
=
province
.
districtList
merchantForm
.
provinceCode
=
province
.
adcode
merchantForm
.
provinceCode
=
province
.
adcode
merchantForm
.
provinceName
=
province
.
name
merchantForm
.
provinceName
=
province
.
name
merchantForm
.
merchantAddress
=
''
$
(
'#addrEl'
).
val
(
''
)
$
(
'#addrEl'
).
val
(
''
)
}
else
{
}
else
{
cityInfo
=
[]
cityInfo
=
[]
...
...
html/merchant/map.html
View file @
c2e3d96
...
@@ -67,10 +67,10 @@
...
@@ -67,10 +67,10 @@
</button>
</button>
</div>
</div>
<div
class=
"layui-form-item"
>
<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
id=
"container"
></div>
</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>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<input
name=
"merchantAddress"
id=
"merchantAddress"
class=
"layui-input"
placeholder=
"请输入详细地址,如道路、门牌号等"
>
<input
name=
"merchantAddress"
id=
"merchantAddress"
class=
"layui-input"
placeholder=
"请输入详细地址,如道路、门牌号等"
>
...
...
html/role/detail.html
View file @
c2e3d96
...
@@ -207,6 +207,7 @@
...
@@ -207,6 +207,7 @@
}
}
})
})
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
treeTab
.
tabChange
(
'roleAuth'
,
authList
[
0
].
accounttypeId
)
$
(
window
).
resize
();
}
}
})
})
}
}
...
...
html/role/index.html
View file @
c2e3d96
...
@@ -305,7 +305,7 @@
...
@@ -305,7 +305,7 @@
</script>
</script>
<script
type=
"text/html"
id=
"roleBar"
>
<script
type=
"text/html"
id=
"roleBar"
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"detail"
>
查看
<
/a
>
<
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
>
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"edit"
>
修改
<
/a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
(
!
d
.
defalutRole
&&
d
.
delFlag
==
1
){
}}
{{
#
if
(
!
d
.
defalutRole
&&
d
.
delFlag
==
1
){
}}
...
...
js/validator.js
View file @
c2e3d96
...
@@ -4,7 +4,7 @@ layui.define(['store'], function (exports) {
...
@@ -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}
$/
,
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
]
+$/
,
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