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 9bdd51ee
authored
Apr 08, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
省市
1 parent
09692fb1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
216 additions
and
58 deletions
src/components/province-city/index.js
src/components/province-city/index.vue
src/config/index.js
src/views/account/components/baseInfo.vue
src/views/baseInfo/editInfo.vue
src/views/followUp/index.vue
src/views/role/index.vue
src/components/province-city/index.js
0 → 100644
View file @
9bdd51e
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
0 → 100644
View file @
9bdd51e
<
template
>
<div>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
label-width=
"80px"
inline=
"true"
class=
"province"
>
<el-select
v-model=
"provinceForm.province"
placeholder=
"选择省份"
@
change=
"selectProvince"
>
<el-option
v-for=
"item in AllData"
:key=
"item.provinceId"
:label=
"item.provinceName"
:value=
"item.provinceName"
@
click
.
native=
"selectProvince(item)"
></el-option>
</el-select>
<el-select
v-model=
"provinceForm.city"
placeholder=
"选择您所在的市"
style=
"width:250px"
@
change=
"selectCity"
>
<el-option
v-for=
"item in cityList"
:key=
"item.cityId"
:label=
"item.cityName"
:value=
"item.cityName"
@
click
.
native=
"selectCity(item)"
></el-option>
</el-select>
</el-form>
</div>
</
template
>
<
script
>
import
{
provinceList
}
from
'./index'
export
default
{
name
:
'Province'
,
// props: ['provinceName', 'cityName'],
data
()
{
return
{
provinceList
:
provinceList
(),
AllData
:
[],
cityList
:
[{
cityId
:
''
,
cityName
:
'请先选择省'
}],
provinceForm
:
{
province
:
''
,
// 省值
city
:
''
// 市值
}
}
},
mounted
()
{
// 初始化
this
.
getProvinceList
()
console
.
log
(
this
.
provinceName
)
},
methods
:
{
init
(
provinceName
,
cityName
)
{
this
.
provinceForm
=
{
province
:
provinceName
,
city
:
cityName
}
console
.
log
(
this
.
AllData
)
this
.
AllData
.
map
(
item
=>
{
if
(
provinceName
==
item
.
provinceName
)
{
this
.
cityList
=
item
.
cityInfoList
}
})
},
async
getProvinceList
()
{
const
{
provinceInfoList
:
provinceList
}
=
await
this
.
provinceList
// this.AllData = provinceList
this
.
$set
(
this
,
'AllData'
,
provinceList
)
console
.
log
(
this
.
AllData
)
},
// 选择省
selectProvince
(
val
)
{
console
.
log
(
val
)
this
.
provinceForm
.
city
=
''
this
.
cityList
=
val
.
cityInfoList
this
.
$emit
(
'getProvince'
,
val
.
provinceName
,
val
.
provinceId
)
},
// 选择市
selectCity
(
val
)
{
this
.
$emit
(
'getCity'
,
val
.
cityName
,
val
.
cityId
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.province
{
display
:
inline-flex
;
}
</
style
>
src/config/index.js
View file @
9bdd51e
...
...
@@ -11,17 +11,17 @@
let
cfg
=
require
(
'./conf.js'
)
import
{
Http
}
from
'glsx-common'
let
timeout
=
30000
//超时时间
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
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')
export
const
fetchConfig
=
function
(
isEnv
=
true
)
{
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
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')
}
export
const
config
=
{
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
\ No newline at end of file
install
(
vue
,
cfg
)
{
vue
.
prototype
.
$config
=
cfg
}
}
src/views/account/components/baseInfo.vue
View file @
9bdd51e
...
...
@@ -47,6 +47,7 @@
<el-row>
<el-col
:span=
"24"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"form-row"
>
<Province
ref=
"provinceForm"
@
getProvince=
"getProvince"
@
getCity=
"getCity"
></Province>
<el-input
readonly
v-model=
"accountAddForm.merchantAddress"
></el-input>
<el-button
type=
"primary"
class=
"form-btn"
@
click=
"hanleSelectMap"
>
选择地址
</el-button>
</el-form-item>
...
...
@@ -143,11 +144,13 @@
import
util
from
'@/utils/util'
import
mapView
from
'@/components/mapView/index'
import
SelectBrand
from
'../../baseInfo/selectBrand.vue'
import
Province
from
'@/components/province-city'
export
default
{
name
:
'base'
,
components
:
{
mapView
,
SelectBrand
SelectBrand
,
Province
},
props
:
{
accountAddForm
:
{
...
...
@@ -191,7 +194,11 @@ export default {
{
validator
:
validatePhone
,
trigger
:
'blur'
}
]
},
brandListTree
:
[]
brandListTree
:
[],
provinceCode
:
''
,
provinceName
:
''
,
cityCode
:
''
,
cityName
:
''
}
},
watch
:
{
...
...
@@ -201,7 +208,7 @@ export default {
},
methods
:
{
checkBrandList
(
chant
)
{
let
merchantBrandMain
=
chant
.
filter
(
item
=>
item
)
let
merchantBrandMain
=
chant
.
filter
(
item
=>
item
)
this
.
$set
(
this
.
accountAddForm
,
'merchantBrandMain'
,
merchantBrandMain
)
console
.
log
(
this
.
accountAddForm
.
merchantBrandMain
)
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
...
...
@@ -228,7 +235,7 @@ export default {
const
brandListTree
=
await
this
.
$apis
.
baseInfo
.
brandList
({})
brandListTree
.
forEach
(
item
=>
{
let
child
=
item
.
children
if
(
!
child
)
return
if
(
!
child
)
return
child
.
forEach
(
k
=>
{
delete
k
.
children
})
...
...
@@ -259,11 +266,42 @@ export default {
this
.
$message
.
error
(
'请选择地址'
)
return
}
this
.
dialogMapVisible
=
false
this
.
accountAddForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
var
address
=
this
.
accountAddForm
.
merchantAddress
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
accountAddForm
.
lat
=
lnglat
.
lat
this
.
accountAddForm
.
lng
=
lnglat
.
lng
// 截取省市
var
provinceIdx
=
address
.
indexOf
(
'省'
)
var
cityIdx
=
address
.
indexOf
(
'市'
)
var
province
=
address
.
slice
(
0
,
provinceIdx
)
var
city
=
address
.
slice
(
provinceIdx
+
1
,
cityIdx
)
// 判断省市是否匹配
if
(
this
.
provinceName
)
{
if
(
this
.
provinceName
!==
province
&&
this
.
cityName
!==
city
)
{
this
.
$message
.
error
(
'您选择的地址错误,请重新选择'
)
this
.
accountAddForm
.
merchantAddress
=
''
return
}
}
this
.
dialogMapVisible
=
false
this
.
provinceName
=
province
this
.
cityName
=
city
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
},
// 获取省
getProvince
(
provinceName
,
provinceId
)
{
console
.
log
(
this
.
accountAddForm
.
merchantAddress
)
this
.
accountAddForm
.
merchantAddress
=
''
console
.
log
(
this
.
accountAddForm
.
merchantAddress
)
this
.
provinceName
=
provinceName
this
.
provinceId
=
provinceId
},
// 获取市
getCity
(
cityName
,
cityId
)
{
this
.
cityName
=
cityName
this
.
cityId
=
cityId
this
.
accountAddForm
.
merchantAddress
=
''
},
delImg
(
index
)
{
this
.
accountAddForm
.
merchantFiles
.
splice
(
index
,
1
)
...
...
@@ -321,7 +359,7 @@ export default {
this
.
brandList
()
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.base-info
{
...
...
@@ -459,4 +497,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
</
style
>
src/views/baseInfo/editInfo.vue
View file @
9bdd51e
...
...
@@ -12,6 +12,7 @@
<div
class=
"information-form-box"
>
<el-form
ref=
"baseForm"
:model=
"infoForm"
class=
"account-body-form"
label-width=
"120px"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<Province
ref=
"provinceForm"
@
getProvince=
"getProvince"
@
getCity=
"getCity"
></Province>
<el-input
v-model=
"infoForm.merchantAddress"
placeholder=
"请选择商户地址"
readonly=
"readonly"
></el-input>
<el-button
@
click=
"hanleSelectMap"
type=
"primary"
>
选择地址
</el-button>
</el-form-item>
...
...
@@ -23,6 +24,10 @@
<el-form-item
size=
"small"
label=
"营业时间"
class=
"time-row"
>
<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
size=
"small"
label=
"驻店电话"
>
<el-input
v-model=
"infoForm.residentPhone"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<span>
显示位置
</span>
</el-form-item>
<el-form-item
size=
"small"
label=
"主营品牌"
style=
"height: 500px"
>
<select-brand
:brandListTree=
"brandListTree"
ref=
"brandListTree"
></select-brand>
</el-form-item>
...
...
@@ -45,9 +50,11 @@
<
script
>
import
mapView
from
'@/components/mapView/index'
import
SelectBrand
from
'./selectBrand.vue'
import
Province
from
'@/components/province-city/index.vue'
export
default
{
name
:
'EditInfo'
,
components
:
{
Province
,
mapView
,
SelectBrand
},
...
...
@@ -62,7 +69,9 @@ export default {
bussinessTime
:
[]
},
businessType
:
[],
brandListTree
:
[]
brandListTree
:
[],
provinceName
:
''
,
cityName
:
''
}
},
mounted
()
{
...
...
@@ -130,11 +139,38 @@ export default {
this
.
$message
.
error
(
'请选择地址'
)
return
}
this
.
dialogMapVisible
=
false
this
.
infoForm
.
merchantAddress
=
this
.
$refs
.
mapForm
.
address
var
address
=
this
.
infoForm
.
merchantAddress
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
infoForm
.
lat
=
lnglat
.
lat
this
.
infoForm
.
lng
=
lnglat
.
lng
// 截取省市
var
provinceIdx
=
address
.
indexOf
(
'省'
)
var
cityIdx
=
address
.
indexOf
(
'市'
)
var
province
=
address
.
slice
(
0
,
provinceIdx
)
var
city
=
address
.
slice
(
provinceIdx
+
1
,
cityIdx
)
// 判断省市是否匹配
if
(
this
.
provinceName
)
{
if
(
this
.
provinceName
!==
province
&&
this
.
cityName
!==
city
)
{
this
.
$message
.
error
(
'您选择的地址错误,请重新选择'
)
this
.
infoForm
.
merchantAddress
=
''
return
}
}
this
.
dialogMapVisible
=
false
this
.
provinceName
=
province
this
.
cityName
=
city
this
.
$refs
.
provinceForm
.
init
(
province
,
city
)
},
// 获取省
getProvince
(
val
)
{
this
.
provinceName
=
val
this
.
infoForm
.
merchantAddress
=
''
},
// 获取市
getCity
(
val
)
{
this
.
cityName
=
val
this
.
infoForm
.
merchantAddress
=
''
},
handleSave
()
{
const
params
=
this
.
infoForm
...
...
src/views/followUp/index.vue
View file @
9bdd51e
...
...
@@ -10,7 +10,7 @@
</p>
</div>
<div
class=
"follow-form"
:style=
"
{ 'min-height': formHeight + 'px' }">
<el-form
:inline=
"true"
:model=
"searchForm"
class=
"follow-form-item"
>
<
!--
<
el-form
:inline=
"true"
:model=
"searchForm"
class=
"follow-form-item"
>
<el-form-item
label=
"跟进专员类型"
>
<el-select
size=
"small"
v-model=
"searchForm.followerTypeId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in optionsType"
:key=
"item.id"
:label=
"item.followName"
:value=
"item.id"
></el-option>
...
...
@@ -23,11 +23,16 @@
<el-button
@
click=
"handleReset"
size=
"small"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
size=
"small"
>
查询
</el-button>
</el-form-item>
<el-form-item
class=
"follow-form-jump"
>
<!--
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</GLButton>
-->
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</el-button>
<el-form-item
class=
"follow-form-jump"
>
-->
<!--
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</GLButton>
-->
<!--
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</el-button>
</el-form-item>
</el-form>
</el-form>
-->
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"follow-btn"
>
<!--
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</GLButton>
-->
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
@
click=
"openDrawer"
>
跟进专员
</el-button>
</div>
<GLTable
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"handleSearch"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<GLButton
fn=
"删除"
type=
"text"
@
click=
"handleDele(scope.scope)"
>
删除
</GLButton>
...
...
@@ -44,11 +49,9 @@
import
addSale
from
'./components/addSale'
export
default
{
name
:
'index'
,
components
:
{
addSale
},
data
()
{
return
{
alertStatus
:
true
,
...
...
@@ -59,18 +62,23 @@ export default {
followerTypeId
:
''
,
staffName
:
''
},
optionsType
:
[
{
value
:
''
,
label
:
'全部'
},
searchFormData
:
[
{
value
:
'1'
,
label
:
'新车跟进专员'
label
:
'跟进专员类型'
,
name
:
'followerTypeId'
,
type
:
'select'
,
placeholder
:
'全部'
,
optionsType
:
[],
optionList
:
[],
optionId
:
'id'
,
optionLabel
:
'followName'
,
optionsName
:
'followName'
},
{
value
:
'2'
,
label
:
'售后跟进专员'
label
:
'员工搜索'
,
name
:
'staffName'
,
type
:
'input'
,
placeholder
:
'请输入员工姓名'
}
],
scope
:
{
...
...
@@ -158,7 +166,7 @@ export default {
userIds
,
businessTypeId
}
console
.
log
(
params
,
'1253715427'
)
;
console
.
log
(
params
,
'1253715427'
)
this
.
$apis
.
emp
.
saveFollowerStaff
(
params
).
then
(
res
=>
{
if
(
res
)
{
this
.
handleClose
()
...
...
@@ -190,6 +198,8 @@ export default {
listEntFollowerType
()
{
this
.
$apis
.
emp
.
listEntFollowerType
({
merchantId
:
this
.
$globalState
.
session
.
merchantId
}).
then
(
res
=>
{
this
.
optionsType
=
[{
followName
:
'全部'
,
id
:
''
}].
concat
(
res
)
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'followerTypeId'
)
this
.
searchFormData
[
idx
].
optionList
=
this
.
optionsType
})
},
handleDele
(
scope
)
{
...
...
@@ -247,7 +257,7 @@ export default {
this
.
formHeight
=
document
.
documentElement
.
clientHeight
-
230
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
.slide-fade-enter-active
{
...
...
@@ -321,4 +331,9 @@ export default {
overflow-y
:
auto
;
}
}
</
style
>
\ No newline at end of file
.follow-btn
{
display
:
flex
;
justify-content
:
flex-end
;
margin-bottom
:
20px
;
}
</
style
>
src/views/role/index.vue
View file @
9bdd51e
...
...
@@ -28,12 +28,7 @@
<el-button
size=
"small"
@
click=
"reSetFindData"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"toFindData"
>
查询
</el-button>
</div>
-->
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"toFindData"
@
handleRest=
"reSetFindData"
>
<!--
<span
slot=
"footer"
slot-scope=
"scope"
>
<el-button
size=
"small"
@
click=
"reSetFindData"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"toFindData"
>
查询
</el-button>
</span>
-->
</GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"toFindData"
@
handleRest=
"reSetFindData"
></GLCombiForm>
</div>
<GLTable
v-if=
"distoryTable"
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"getTableData"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
...
...
@@ -69,7 +64,7 @@ export default {
optionId
:
'id'
,
optionLabel
:
'merchantName'
,
optionsName
:
'merchantName'
,
is
Disabled
:
fals
e
is
Hide
:
tru
e
},
{
label
:
'状态'
,
...
...
@@ -167,7 +162,6 @@ export default {
getTableData
()
{
let
{
delFlag
,
roleName
,
merchantId
}
=
this
.
searchForm
let
para
=
{}
console
.
log
(
merchantId
)
if
(
!
this
.
distoryTable
)
{
//代表重置
para
=
{
...
...
@@ -204,16 +198,12 @@ export default {
getMerchantName
()
{
this
.
$apis
.
role
.
merchantDataList
({
source
:
'glsx'
}).
then
(
res
=>
{
this
.
merchantList
=
res
||
[]
// this.merchantList.unshift({
// merchantName: '全部',
// id: 0
// })
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'merchantId'
)
res
.
unshift
({
id
:
''
,
merchantName
:
'全部'
this
.
merchantList
.
unshift
({
merchantName
:
'全部'
,
id
:
''
})
this
.
materialFormData
[
idx
].
optionList
=
res
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'merchantId'
)
this
.
searchFormData
[
idx
].
optionList
=
this
.
merchantList
// this.filterList()
})
},
...
...
@@ -280,11 +270,12 @@ export default {
created
()
{
const
{
session
}
=
this
.
$globalState
let
accountLevel
=
session
.
accountLevel
console
.
log
(
accountLevel
)
if
(
accountLevel
!=
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
2
,
0
,
{
label
:
'所属商户名'
,
prop
:
'merchantName'
})
this
.
getMerchantName
()
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'merchantId'
)
this
.
searchFormData
[
idx
].
is
Disabled
=
tru
e
this
.
searchFormData
[
idx
].
is
Hide
=
fals
e
}
this
.
accountLevel
=
accountLevel
},
...
...
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