Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-settings
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 d8251392
authored
Apr 21, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'kuangyq_dev_2.1.0' into 'v2.1.0'
Kuangyq dev 2.1.0 See merge request
!38
2 parents
39513a45
800549c5
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
206 additions
and
66 deletions
src/assets/css/common.scss
src/components/mapView/index.vue
src/components/province-city/index.js
src/components/province-city/index.vue
src/config/index.js
src/views/account/components/baseInfo.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/baseInfo/editInfo.vue
src/views/baseInfo/selectBrand.vue
src/views/employee/index.vue
src/views/role/index.vue
src/assets/css/common.scss
View file @
d825139
...
@@ -172,3 +172,44 @@ img {
...
@@ -172,3 +172,44 @@ img {
z-index
:
999
;
z-index
:
999
;
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0
.1
);
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0
.1
);
}
}
.dot
{
display
:
inline-flex
;
align-items
:
center
;
span
{
display
:
inline-block
;
width
:
6px
;
height
:
6px
;
border-radius
:
50%
;
margin-right
:
8px
;
}
.normal
{
background-color
:
#2CCA74
;
}
.draft
{
background-color
:
#FDB757
;
}
.dot1
{
background-color
:
#FDB757
;
}
.dot2
{
background-color
:
#2CCA74
;
}
.dot3
{
background-color
:
#999999
;
}
.dot4
{
background-color
:
#EB4E4E
;
}
.dot5
{
background-color
:
#FDB757
;
}
}
\ No newline at end of file
\ No newline at end of file
src/components/mapView/index.vue
View file @
d825139
...
@@ -36,7 +36,7 @@ export default {
...
@@ -36,7 +36,7 @@ export default {
resizeEnable
:
true
,
resizeEnable
:
true
,
zoom
:
20
zoom
:
20
})
})
AMap
.
plugin
([
'AMap.PlaceSearch'
],
function
()
{
AMap
.
plugin
([
'AMap.PlaceSearch'
],
function
()
{
//构造地点查询类
//构造地点查询类
placeSearch
=
new
AMap
.
PlaceSearch
({
placeSearch
=
new
AMap
.
PlaceSearch
({
pageSize
:
8
,
// 单页显示结果条数
pageSize
:
8
,
// 单页显示结果条数
...
@@ -52,8 +52,7 @@ export default {
...
@@ -52,8 +52,7 @@ export default {
},
},
searchAddress
()
{
searchAddress
()
{
let
_this
=
this
let
_this
=
this
placeSearch
.
search
(
this
.
input
,
function
(
status
,
result
)
{
placeSearch
.
search
(
this
.
input
,
function
(
status
,
result
)
{
console
.
log
(
result
)
if
(
status
===
'complete'
&&
result
.
poiList
.
pois
.
length
)
{
if
(
status
===
'complete'
&&
result
.
poiList
.
pois
.
length
)
{
let
lnglat
=
result
.
poiList
.
pois
[
0
].
location
let
lnglat
=
result
.
poiList
.
pois
[
0
].
location
_this
.
getAddress
(
lnglat
)
_this
.
getAddress
(
lnglat
)
...
@@ -67,7 +66,6 @@ export default {
...
@@ -67,7 +66,6 @@ export default {
}
else
{
}
else
{
position
=
lnglat
position
=
lnglat
}
}
console
.
log
(
position
)
marker
=
new
AMap
.
Marker
({
marker
=
new
AMap
.
Marker
({
icon
:
new
AMap
.
Icon
({
icon
:
new
AMap
.
Icon
({
image
:
'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png'
,
image
:
'//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png'
,
...
@@ -81,7 +79,6 @@ export default {
...
@@ -81,7 +79,6 @@ export default {
map
.
setFitView
()
map
.
setFitView
()
},
},
getAddress
(
e
)
{
getAddress
(
e
)
{
console
.
log
(
e
)
let
self
=
this
let
self
=
this
let
lnglat
let
lnglat
if
(
e
.
type
==
'click'
)
{
if
(
e
.
type
==
'click'
)
{
...
...
src/components/province-city/index.js
deleted
100644 → 0
View file @
39513a4
import
{
Http
}
from
'glsx-common'
export
const
provinceList
=
function
()
{
return
new
Http
().
get
(
'https://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/provinceList'
)
}
src/components/province-city/index.vue
View file @
d825139
<
template
>
<
template
>
<div>
<div>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
label-width=
"80px"
inline=
"true"
class=
"province"
>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
inline=
"true"
class=
"province"
>
<el-select
v-model=
"provinceForm.provinceName"
placeholder=
"选择省份
"
@
change=
"selectProvince"
class=
"select-padding"
>
<el-select
:size=
"size"
v-model=
"provinceForm.provinceName"
clearable
placeholder=
"选择省份"
:style=
"
{ width: defaultWidth }
" @change="selectProvince" class="select-padding">
<el-option
v-for=
"item in AllData"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectProvince(item)"
></el-option>
<el-option
v-for=
"item in AllData"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectProvince(item)"
></el-option>
</el-select>
</el-select>
<el-select
v-model=
"provinceForm.cityName"
placeholder=
"选择您所在的市"
style=
"width: 250px
"
@
change=
"selectCity"
class=
"select-padding"
>
<el-select
:size=
"size"
v-model=
"provinceForm.cityName"
clearable
placeholder=
"选择市"
:style=
"
{ width: defaultWidth }
" @change="selectCity" class="select-padding">
<el-option
v-for=
"item in cityList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectCity(item)"
></el-option>
<el-option
v-for=
"item in cityList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectCity(item)"
></el-option>
</el-select>
</el-select>
<el-select
v-if=
"subdistrict == 3"
:size=
"size"
v-model=
"provinceForm.townName"
clearable
placeholder=
"选择区"
:style=
"
{ width: defaultWidth }" @change="selectTown" class="select-padding">
<el-option
v-for=
"item in townList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectTown(item)"
></el-option>
</el-select>
</el-form>
</el-form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
let
map
let
map
import
{
provinceList
}
from
'./index'
export
default
{
export
default
{
name
:
'Province'
,
name
:
'Province'
,
props
:
{
subdistrict
:
{
type
:
Number
,
default
:
2
},
defaultWidth
:
{
type
:
String
,
default
:
'150px'
}
},
data
()
{
data
()
{
return
{
return
{
provinceList
:
provinceList
(),
AllData
:
[],
AllData
:
[],
cityList
:
[{
adcode
:
''
,
name
:
'请先选择省'
}],
cityList
:
[{
adcode
:
''
,
name
:
'全部'
}],
townList
:
[{
adcode
:
''
,
name
:
'全部'
}],
provinceForm
:
{
provinceForm
:
{
provinceName
:
''
,
// 省值
provinceName
:
''
,
// 省值
cityName
:
''
,
// 市值
cityName
:
''
,
// 市值
townName
:
''
,
provinceCode
:
''
,
provinceCode
:
''
,
cityCode
:
''
cityCode
:
''
,
townCode
:
''
}
}
}
}
},
},
mounted
()
{},
mounted
()
{
this
.
mapInit
()
},
methods
:
{
methods
:
{
// 省市回显
init
(
province
,
city
)
{
init
(
province
,
city
)
{
this
.
provinceForm
=
{
this
.
provinceForm
=
{
provinceName
:
province
,
provinceName
:
province
,
cityName
:
city
cityName
:
city
}
}
this
.
mapInit
(
province
,
city
)
// this.mapInit(province, city)
if
(
province
)
{
this
.
AllData
.
map
(
item
=>
{
if
(
item
.
name
.
indexOf
(
province
)
!=
-
1
)
{
this
.
provinceForm
.
provinceName
=
item
.
name
this
.
cityList
=
item
.
districtList
this
.
provinceForm
.
provinceCode
=
item
.
adcode
this
.
cityList
.
map
(
itm
=>
{
if
(
itm
.
name
.
indexOf
(
city
)
!=
-
1
)
{
this
.
provinceForm
.
cityCode
=
itm
.
adcode
this
.
provinceForm
.
cityName
=
itm
.
name
}
})
}
})
}
},
},
// 选择省
// 选择省
selectProvince
(
val
)
{
selectProvince
(
val
)
{
this
.
provinceForm
.
cityName
=
''
this
.
provinceForm
.
cityName
=
''
this
.
cityList
=
val
.
districtList
this
.
cityList
=
val
.
districtList
this
.
$emit
(
'
ge
tProvince'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'
selec
tProvince'
,
val
.
name
,
val
.
adcode
)
},
},
// 选择市
// 选择市
selectCity
(
val
)
{
selectCity
(
val
)
{
this
.
$emit
(
'getCity'
,
val
.
name
,
val
.
adcode
)
this
.
provinceForm
.
townName
=
''
this
.
townList
=
val
.
districtList
this
.
$emit
(
'selectCity'
,
val
.
name
,
val
.
adcode
)
},
},
mapInit
(
provinceName
,
cityName
)
{
// 选择区
selectTown
(
val
)
{
this
.
$emit
(
'selectTown'
,
val
.
name
,
val
.
adcode
)
},
mapInit
()
{
map
=
new
AMap
.
Map
(
'district'
,
{
map
=
new
AMap
.
Map
(
'district'
,
{
resizeEnable
:
true
resizeEnable
:
true
})
})
AMap
.
plugin
([
'AMap.DistrictSearch'
],
()
=>
{
AMap
.
plugin
([
'AMap.DistrictSearch'
],
()
=>
{
var
opts
=
{
var
opts
=
{
subdistrict
:
2
,
//返回下一级行政区
subdistrict
:
this
.
subdistrict
,
//返回下一级行政区
level
:
'city'
,
//查询的范围
level
:
'city'
,
//查询的范围
showbiz
:
true
//查询行政级别为 市
showbiz
:
true
//查询行政级别为 市
}
}
var
districtSearch
=
new
AMap
.
DistrictSearch
(
opts
)
var
districtSearch
=
new
AMap
.
DistrictSearch
(
opts
)
districtSearch
.
search
(
'中国'
,
(
status
,
result
)
=>
{
districtSearch
.
search
(
'中国'
,
(
status
,
result
)
=>
{
this
.
AllData
=
result
.
districtList
[
0
].
districtList
this
.
AllData
=
result
.
districtList
[
0
].
districtList
// if (provinceName) {
// this.AllData.map(item => {
// if (item.name.indexOf(provinceName) != -1) {
// this.provinceForm.provinceName = item.name
// this.cityList = item.districtList
// this.provinceForm.provinceCode = item.adcode
// this.cityList.map(itm => {
// if (itm.name.indexOf(cityName) != -1) {
// this.provinceForm.cityCode = itm.adcode
// this.provinceForm.cityName = itm.name
// }
// })
// }
// })
// }
})
})
console
.
log
(
this
.
AllData
)
})
})
console
.
log
(
this
.
AllData
)
if
(
provinceName
)
{
this
.
AllData
.
map
(
item
=>
{
if
(
item
.
name
.
indexOf
(
provinceName
)
!=
-
1
)
{
this
.
provinceForm
.
provinceName
=
item
.
name
this
.
cityList
=
item
.
districtList
this
.
provinceForm
.
provinceCode
=
item
.
adcode
this
.
cityList
.
map
(
itm
=>
{
if
(
itm
.
name
.
indexOf
(
cityName
)
!=
-
1
)
{
this
.
provinceForm
.
cityCode
=
itm
.
adcode
this
.
provinceForm
.
cityName
=
itm
.
name
}
})
}
})
}
}
}
}
}
}
}
...
...
src/config/index.js
View file @
d825139
...
@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = false) {
...
@@ -17,8 +17,8 @@ export const fetchConfig = function(isEnv = false) {
Object
.
assign
(
request
,
{
timeout
})
Object
.
assign
(
request
,
{
timeout
})
return
Promise
.
resolve
(
cfg
)
return
Promise
.
resolve
(
cfg
)
}
}
//
return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
return
new
Http
().
get
(
'https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
return
new
Http
().
get
(
'http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config'
)
//
return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
}
}
export
const
config
=
{
export
const
config
=
{
install
(
vue
,
cfg
)
{
install
(
vue
,
cfg
)
{
...
...
src/views/account/components/baseInfo.vue
View file @
d825139
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<!-- 省市 -->
<!-- 省市 -->
<ProvinceCity
ref=
"provinceForm"
@
getProvince=
"getProvince"
@
getCity=
"ge
tCity"
></ProvinceCity>
<ProvinceCity
ref=
"provinceForm"
@
selectProvince=
"selectProvince"
@
selectCity=
"selec
tCity"
></ProvinceCity>
<el-input
readonly
v-model=
"accountAddForm.merchantAddress"
placeholder=
"请选择商户地址"
></el-input>
<el-input
readonly
v-model=
"accountAddForm.merchantAddress"
placeholder=
"请选择商户地址"
></el-input>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"hanleSelectMap"
>
选择地址
</el-button>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"hanleSelectMap"
>
选择地址
</el-button>
</el-form-item>
</el-form-item>
...
@@ -215,7 +215,7 @@ export default {
...
@@ -215,7 +215,7 @@ export default {
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
this
.
accountAddForm
.
merchantBrandMain
=
[]
this
.
accountAddForm
.
merchantBrandMain
=
[]
}
}
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
accountAddForm
.
merchantBrandMain
)
//
this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
},
},
checkBusinessType
(
type
)
{
checkBusinessType
(
type
)
{
if
(
!
type
)
{
if
(
!
type
)
{
...
@@ -240,6 +240,7 @@ export default {
...
@@ -240,6 +240,7 @@ export default {
})
})
})
})
this
.
brandListTree
=
brandListTree
this
.
brandListTree
=
brandListTree
this
.
$refs
.
brandListTree
.
getCheckList
(
this
.
accountAddForm
.
merchantBrandMain
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
brandListTree
.
loading
=
false
this
.
$refs
.
brandListTree
.
loading
=
false
})
})
...
@@ -281,8 +282,18 @@ export default {
...
@@ -281,8 +282,18 @@ export default {
this
.
accountAddForm
.
lng
=
lnglat
.
lng
this
.
accountAddForm
.
lng
=
lnglat
.
lng
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
// 获取省市
// 获取省市
var
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
var
province
=
fullAddress
.
province
var
province
=
fullAddress
.
province
var
city
=
fullAddress
.
city
var
city
=
fullAddress
.
city
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
if
(
municipality
)
{
city
=
city
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
city
=
city
.
slice
(
0
,
2
)
+
'城区'
)
:
(
city
=
city
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
// 判断省市是否匹配
// 判断省市是否匹配
if
(
this
.
accountAddForm
.
provinceName
)
{
if
(
this
.
accountAddForm
.
provinceName
)
{
if
(
this
.
accountAddForm
.
provinceName
!==
province
||
this
.
accountAddForm
.
cityName
!==
city
)
{
if
(
this
.
accountAddForm
.
provinceName
!==
province
||
this
.
accountAddForm
.
cityName
!==
city
)
{
...
@@ -304,7 +315,7 @@ export default {
...
@@ -304,7 +315,7 @@ export default {
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
},
},
// 获取省
// 获取省
ge
tProvince
(
provinceName
,
provinceCode
)
{
selec
tProvince
(
provinceName
,
provinceCode
)
{
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
// 强制更新 merchantAddress
// 强制更新 merchantAddress
this
.
$forceUpdate
()
this
.
$forceUpdate
()
...
@@ -312,7 +323,7 @@ export default {
...
@@ -312,7 +323,7 @@ export default {
this
.
accountAddForm
.
provinceCode
=
provinceCode
this
.
accountAddForm
.
provinceCode
=
provinceCode
},
},
// 获取市
// 获取市
ge
tCity
(
cityName
,
cityCode
)
{
selec
tCity
(
cityName
,
cityCode
)
{
this
.
accountAddForm
.
cityName
=
cityName
this
.
accountAddForm
.
cityName
=
cityName
this
.
accountAddForm
.
cityCode
=
cityCode
this
.
accountAddForm
.
cityCode
=
cityCode
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
...
@@ -372,8 +383,6 @@ export default {
...
@@ -372,8 +383,6 @@ export default {
mounted
()
{
mounted
()
{
this
.
getUserInfo
()
this
.
getUserInfo
()
// this.$refs.provinceForm.getProvinceList()
this
.
$refs
.
provinceForm
.
mapInit
()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/account/editAccount.vue
View file @
d825139
...
@@ -364,7 +364,7 @@ export default {
...
@@ -364,7 +364,7 @@ export default {
})
})
},
},
renderView
(
res
)
{
renderView
(
res
)
{
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
merchantBrandMain
,
businessType
,
lng
,
merchantAddress
,
provinceName
,
cityName
,
provinceCode
,
cityCode
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
businessScope
,
businessScopeCustomize
,
merchantBrand
,
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
}
=
res
let
{
isloginName
,
bussinessBegintime
,
bussinessEndtime
,
lat
,
merchantBrandMain
,
businessType
,
lng
,
merchantAddress
,
provinceName
,
cityName
,
provinceCode
,
cityCode
,
merchantName
,
merchantAbbreviation
,
merchantType
,
merchantOrgcode
,
merchantLegalPerson
,
merchantLegalPersonPhone
,
residentContact
,
residentPhone
,
merchantLoginAccount
,
merchantLoginPassword
,
merchantAccountLevel
,
businessScope
,
businessScopeCustomize
,
merchantBrand
,
merchantFileResponses
,
merchantModel
,
accountTypes
,
accountType
,
accounttypeId
,
channelId
,
status
,
parentId
,
merchantBrandName
}
=
res
this
.
accountInfoForm
.
merchantLoginAccount
=
merchantLoginAccount
this
.
accountInfoForm
.
merchantLoginAccount
=
merchantLoginAccount
this
.
accountInfoForm
.
merchantLoginPassword
=
merchantLoginPassword
this
.
accountInfoForm
.
merchantLoginPassword
=
merchantLoginPassword
this
.
accountTypes
=
accountTypes
this
.
accountTypes
=
accountTypes
...
@@ -439,6 +439,13 @@ export default {
...
@@ -439,6 +439,13 @@ export default {
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
()
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
()
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
if
(
merchantBrandName
)
{
const
brandName
=
merchantBrandName
.
split
(
','
).
map
((
item
,
index
)
=>
{
return
{
label
:
item
,
id
:
index
}
})
this
.
$refs
.
baseInfoForm
.
$refs
.
brandListTree
.
getCheckedArr
=
brandName
// console.log(this.$refs.baseInfoForm.$refs.brandListTree.getCheckedArr)
}
},
},
getCarbrandTree
()
{
getCarbrandTree
()
{
this
.
$apis
.
store
.
getCarbrandTree
({}).
then
(
res
=>
{
this
.
$apis
.
store
.
getCarbrandTree
({}).
then
(
res
=>
{
...
...
src/views/account/index.vue
View file @
d825139
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
</span>
</span>
</span>
</span>
</div>
</div>
<div
slot=
"statusName"
class=
"dot"
slot-scope=
"scope"
>
<span
:class=
"`dot$
{baseData.merchantStatusList.find(item => item.dictLabel == scope.scope.statusName).dictValue}`">
</span>
{{
scope
.
scope
.
statusName
}}
</div>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<!--
<el-button
type=
"text"
@
click=
"handleLook(scope.scope)"
>
查看
</el-button>
-->
<!--
<el-button
type=
"text"
@
click=
"handleLook(scope.scope)"
>
查看
</el-button>
-->
...
@@ -107,6 +111,7 @@ export default {
...
@@ -107,6 +111,7 @@ export default {
label
:
'账户状态'
,
label
:
'账户状态'
,
prop
:
'statusName'
,
prop
:
'statusName'
,
width
:
'100'
,
width
:
'100'
,
addHtml
:
'statusName'
,
line
:
1
line
:
1
},
},
{
{
...
...
src/views/baseInfo/editInfo.vue
View file @
d825139
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-1
4 17:50:13
* @LastEditTime: 2022-04-1
9 18:08:55
* @LastEditors: huyue
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<div
class=
"information-form-box"
>
<div
class=
"information-form-box"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"120px"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"120px"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<Province
ref=
"provinceForm"
@
getProvince=
"getProvince"
@
getCity=
"ge
tCity"
></Province>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selec
tCity"
></Province>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-input
class=
"input-width"
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-button
@
click=
"hanleSelectMap"
type=
"primary"
>
选择地址
</el-button>
<el-button
@
click=
"hanleSelectMap"
type=
"primary"
>
选择地址
</el-button>
</el-form-item>
</el-form-item>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<el-time-picker
size=
"small"
value-format=
"HH:mm:ss"
is-range
v-model=
"infoForm.bussinessTime"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
></el-time-picker>
<el-time-picker
size=
"small"
value-format=
"HH:mm:ss"
is-range
v-model=
"infoForm.bussinessTime"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
></el-time-picker>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"驻店电话"
style=
"position: relative"
>
<el-form-item
size=
"small"
label=
"驻店电话"
style=
"position: relative"
>
<el-input
v-model=
"infoForm.residentPhone"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<el-input
v-model=
"infoForm.residentPhone"
class=
"phone-input"
maxlength=
"11"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<div
@
click=
"showTelDia"
class=
"show-address"
>
显示位置
</div>
<div
@
click=
"showTelDia"
class=
"show-address"
>
显示位置
</div>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"主营品牌"
style=
"height: 500px"
>
<el-form-item
size=
"small"
label=
"主营品牌"
style=
"height: 500px"
>
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
util
from
'@/utils/util'
import
mapView
from
'@/components/mapView/index'
import
mapView
from
'@/components/mapView/index'
import
SelectBrand
from
'./selectBrand.vue'
import
SelectBrand
from
'./selectBrand.vue'
import
TelPosition
from
'./telPosition.vue'
import
TelPosition
from
'./telPosition.vue'
...
@@ -63,6 +64,7 @@ export default {
...
@@ -63,6 +64,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
subdistrict
:
2
,
checkedAll
:
false
,
checkedAll
:
false
,
filterText
:
''
,
filterText
:
''
,
dialogMapVisible
:
false
,
dialogMapVisible
:
false
,
...
@@ -84,7 +86,7 @@ export default {
...
@@ -84,7 +86,7 @@ export default {
mounted
()
{
mounted
()
{
// this.brandList()
// this.brandList()
this
.
getUserInfo
()
this
.
getUserInfo
()
this
.
$refs
.
provinceForm
.
mapInit
()
//
this.$refs.provinceForm.mapInit()
},
},
methods
:
{
methods
:
{
async
brandList
()
{
async
brandList
()
{
...
@@ -106,7 +108,7 @@ export default {
...
@@ -106,7 +108,7 @@ export default {
async
getUserInfo
()
{
async
getUserInfo
()
{
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
this
.
businessType
=
await
this
.
$apis
.
store
.
findAllDictData
({
dictType
:
'business_type'
})
const
infoForm
=
await
this
.
$apis
.
store
.
findMerchantBaseInfo
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
})
const
infoForm
=
await
this
.
$apis
.
store
.
findMerchantBaseInfo
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
})
const
{
merchantAddress
,
provinceName
,
residentPhone
,
cityName
,
provinceCode
,
cityCode
,
lng
,
lat
,
id
,
merchantName
,
businessType
,
bussinessTime
,
bussinessBegintime
,
bussinessEndtime
,
channelId
,
merchantNo
,
merchantBrandMain
}
=
infoForm
const
{
merchantAddress
,
provinceName
,
residentPhone
,
cityName
,
provinceCode
,
cityCode
,
lng
,
lat
,
id
,
merchantName
,
businessType
,
bussinessTime
,
bussinessBegintime
,
bussinessEndtime
,
channelId
,
merchantNo
,
merchantBrandMain
,
merchantBrandName
}
=
infoForm
this
.
infoForm
=
{
this
.
infoForm
=
{
merchantAddress
,
merchantAddress
,
lng
,
lng
,
...
@@ -137,6 +139,12 @@ export default {
...
@@ -137,6 +139,12 @@ export default {
}
else
{
}
else
{
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
}
}
if
(
merchantBrandName
)
{
const
brandName
=
merchantBrandName
.
split
(
','
).
map
((
item
,
index
)
=>
{
return
{
label
:
item
,
id
:
index
}
})
this
.
$refs
.
brandListTree
.
getCheckedArr
=
brandName
}
},
},
// 点击主营品牌
// 点击主营品牌
clickBrand
(
val
)
{
clickBrand
(
val
)
{
...
@@ -165,8 +173,19 @@ export default {
...
@@ -165,8 +173,19 @@ export default {
this
.
infoForm
.
lng
=
lnglat
.
lng
this
.
infoForm
.
lng
=
lnglat
.
lng
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
// 获取省市
// 获取省市
var
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
var
province
=
fullAddress
.
province
var
province
=
fullAddress
.
province
var
city
=
fullAddress
.
city
var
city
=
fullAddress
.
city
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
if
(
municipality
)
{
city
=
city
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
console
.
log
(
provincecode
)
provincecode
==
5001
?
(
city
=
city
.
slice
(
0
,
2
)
+
'城区'
)
:
(
city
=
city
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
// 判断省市是否匹配
// 判断省市是否匹配
if
(
this
.
infoForm
.
provinceName
)
{
if
(
this
.
infoForm
.
provinceName
)
{
if
(
this
.
infoForm
.
provinceName
!==
province
||
this
.
infoForm
.
cityName
!==
city
)
{
if
(
this
.
infoForm
.
provinceName
!==
province
||
this
.
infoForm
.
cityName
!==
city
)
{
...
@@ -182,13 +201,13 @@ export default {
...
@@ -182,13 +201,13 @@ export default {
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
},
},
// 获取省
// 获取省
ge
tProvince
(
provinceName
,
provinceCode
)
{
selec
tProvince
(
provinceName
,
provinceCode
)
{
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
provinceCode
=
provinceCode
this
.
infoForm
.
provinceCode
=
provinceCode
},
},
// 获取市
// 获取市
ge
tCity
(
cityName
,
cityCode
)
{
selec
tCity
(
cityName
,
cityCode
)
{
this
.
infoForm
.
cityName
=
cityName
this
.
infoForm
.
cityName
=
cityName
this
.
infoForm
.
cityCode
=
cityCode
this
.
infoForm
.
cityCode
=
cityCode
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
merchantAddress
=
''
...
@@ -199,6 +218,15 @@ export default {
...
@@ -199,6 +218,15 @@ export default {
},
},
handleSave
()
{
handleSave
()
{
const
params
=
this
.
infoForm
const
params
=
this
.
infoForm
if
(
this
.
infoForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
infoForm
.
residentPhone
))
{
this
.
$message
.
error
(
'请输入正确的驻店电话'
)
document
.
querySelector
(
'#app'
).
scrollTop
=
0
setTimeout
(()
=>
{
var
isError
=
document
.
getElementsByClassName
(
'phone-input'
)
isError
[
0
].
querySelector
(
'input'
).
focus
()
},
100
)
return
}
params
.
merchantBrandMain
=
''
params
.
merchantBrandMain
=
''
// 获取省市信息
// 获取省市信息
const
{
provinceName
,
provinceCode
,
cityName
,
cityCode
}
=
this
.
$refs
.
provinceForm
.
provinceForm
const
{
provinceName
,
provinceCode
,
cityName
,
cityCode
}
=
this
.
$refs
.
provinceForm
.
provinceForm
...
...
src/views/baseInfo/selectBrand.vue
View file @
d825139
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2022-03-07 14:32:50
* @Date: 2022-03-07 14:32:50
* @LastEditTime: 2022-04-1
4 17:41:10
* @LastEditTime: 2022-04-1
9 18:03:04
* @LastEditors: huyue
* @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
* @FilePath: \scrm-micro-settings\src\views\baseInfo\editInfo.vue
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</div>
</div>
<div
class=
"tree-box"
v-show=
"brandTree"
>
<div
class=
"tree-box"
v-show=
"brandTree"
>
<el-input
class=
"tree-input"
prefix-icon=
"el-icon-search"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
></el-input>
<el-input
class=
"tree-input"
prefix-icon=
"el-icon-search"
placeholder=
"输入关键字进行过滤"
v-model=
"filterText"
></el-input>
<el-tree
class=
"filter-tree"
@
check=
"handleCheck"
:data=
"brandListTree"
:props=
"defaultProps"
node-key=
"id"
default-expand-all
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
></el-tree>
<el-tree
class=
"filter-tree"
@
check=
"handleCheck"
:data=
"brandListTree"
:props=
"defaultProps"
node-key=
"id"
show-checkbox
:filter-node-method=
"filterNode"
ref=
"tree"
></el-tree>
<div
class=
"tree-footer"
>
<div
class=
"tree-footer"
>
<div
class=
"tree-footer-checkbox"
>
<div
class=
"tree-footer-checkbox"
>
<el-checkbox
v-model=
"checkedAll"
@
change=
"selectAll"
>
全部
</el-checkbox>
<el-checkbox
v-model=
"checkedAll"
@
change=
"selectAll"
>
全部
</el-checkbox>
...
@@ -119,7 +119,6 @@ export default {
...
@@ -119,7 +119,6 @@ export default {
},
},
getCheckList
(
checkArr
=
[])
{
getCheckList
(
checkArr
=
[])
{
checkArr
.
forEach
(
item
=>
(
item
=
parseInt
(
item
)))
checkArr
.
forEach
(
item
=>
(
item
=
parseInt
(
item
)))
console
.
log
(
checkArr
)
this
.
$refs
.
tree
.
setCheckedKeys
(
checkArr
)
this
.
$refs
.
tree
.
setCheckedKeys
(
checkArr
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
handleCheck
()
this
.
handleCheck
()
...
@@ -186,7 +185,7 @@ export default {
...
@@ -186,7 +185,7 @@ export default {
//过滤
//过滤
filterNode
(
value
,
data
)
{
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
if
(
!
value
)
return
true
return
data
.
name
.
indexOf
(
value
)
!==
-
1
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
},
// 显示隐藏
// 显示隐藏
switchBrand
()
{
switchBrand
()
{
...
...
src/views/employee/index.vue
View file @
d825139
<!-- 员工管理 -->
<!-- 员工管理 -->
<
template
>
<
template
>
<div
class=
"config-employee employee-list"
>
<div
class=
"config-employee employee-list"
>
<div
style=
"margin-bottom:
2
0px"
>
<div
style=
"margin-bottom:
1
0px"
>
<GLButton
@
click=
"handleEdit(1)"
:size=
"size"
class=
"el-icon-plus"
fn=
"创建员工"
type=
"primary"
mode=
"el-button"
>
创建员工
</GLButton>
<GLButton
@
click=
"handleEdit(1)"
:size=
"size"
class=
"el-icon-plus"
fn=
"创建员工"
type=
"primary"
mode=
"el-button"
>
创建员工
</GLButton>
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
>
创建员工
</el-button>
-->
<!--
<el-button
:size=
"size"
type=
"primary"
class=
"el-icon-plus"
>
创建员工
</el-button>
-->
</div>
</div>
...
@@ -31,9 +31,9 @@
...
@@ -31,9 +31,9 @@
<p>
启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:
</p>
<p>
启用前,你可先为该员工创建角色,配置其所需的功能权限。如下所示:
</p>
<p>
1. 角色管理-创建角色
</p>
<p>
1. 角色管理-创建角色
</p>
<p>
2. 选择员工账户-修改角色
</p>
<p>
2. 选择员工账户-修改角色
</p>
<GLButton
mode=
"el-switch"
fn=
"开关"
size=
"mini"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
<GLButton
mode=
"el-switch"
fn=
"开关"
width=
"32"
size=
"mini"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
</el-popover>
</el-popover>
<GLButton
mode=
"el-switch"
fn=
"开关"
v-else
size=
"mini"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
<GLButton
mode=
"el-switch"
fn=
"开关"
width=
"32"
v-else
size=
"mini"
slot=
"reference"
v-model=
"scope.scope.statusName"
active-value=
"启用"
inactive-value=
"禁用"
@
change=
"e => handleSwitchChange(e, scope.scope)"
></GLButton>
<span
style=
"margin-left: 8px"
>
{{
scope
.
scope
.
statusName
}}
</span>
<span
style=
"margin-left: 8px"
>
{{
scope
.
scope
.
statusName
}}
</span>
</GLButton>
</GLButton>
</
template
>
</
template
>
...
@@ -431,7 +431,7 @@ export default {
...
@@ -431,7 +431,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
scoped
>
.config-employee
{
.config-employee
{
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
...
@@ -459,4 +459,17 @@ export default {
...
@@ -459,4 +459,17 @@ export default {
padding
:
0
;
padding
:
0
;
border
:
0
;
border
:
0
;
}
}
/
deep
/
{
.el-switch__core
{
height
:
16px
;
&::after
{
top
:
0
;
width
:
14px
;
height
:
14px
;
}
}
.el-switch.is-checked
.el-switch__core
::after
{
margin-left
:
-14px
;
}
}
</
style
>
</
style
>
src/views/role/index.vue
View file @
d825139
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"toFindData"
@
handleRest=
"reSetFindData"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"toFindData"
@
handleRest=
"reSetFindData"
></GLCombiForm>
</div>
</div>
<GLTable
v-if=
"distoryTable"
ref=
"table"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"getTableData"
>
<GLTable
v-if=
"distoryTable"
ref=
"table"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"getTableData"
>
<div
slot=
"statusName"
class=
"dot"
slot-scope=
"scope"
>
<span
:class=
"roleStatus[scope.scope.statusName]"
></span>
{{
scope
.
scope
.
statusName
}}
</div>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope.scope"
></GLTableButton>
<!--
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
<!--
<el-button
type=
"text"
@
click=
"toLookPage(scope.scope)"
>
查看
</el-button>
...
@@ -21,11 +25,16 @@
...
@@ -21,11 +25,16 @@
</template>
</template>
<
script
>
<
script
>
const
roleStatus
=
{
正常
:
'normal'
,
草稿
:
'draft'
}
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
roleStatus
:
roleStatus
,
searchForm
:
{
searchForm
:
{
delFlag
:
''
,
delFlag
:
''
,
roleName
:
''
,
roleName
:
''
,
...
@@ -93,7 +102,8 @@ export default {
...
@@ -93,7 +102,8 @@ export default {
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'statusName'
prop
:
'statusName'
,
addHtml
:
'statusName'
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
...
@@ -313,7 +323,7 @@ export default {
...
@@ -313,7 +323,7 @@ export default {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
0
20px
2
0px
0
;
padding
:
0
20px
1
0px
0
;
}
}
.table_widget
{
.table_widget
{
width
:
100%
;
width
:
100%
;
...
...
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