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 c2d30b63
authored
May 13, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feat_v2.1.1' into huy_dev_v2.3.0
2 parents
4dea41b8
eb85530f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
171 additions
and
95 deletions
src/assets/css/demo.scss
src/components/province-city/index.vue
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/baseInfo/editInfo.vue
src/views/employee/detail/config.vue
src/views/employee/index.vue
src/views/followUp/index.vue
src/views/role/index.vue
src/views/role/look.vue
src/assets/css/demo.scss
View file @
c2d30b6
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
.header-text
{
.header-text
{
font-size
:
16px
;
font-size
:
16px
;
color
:
#333333
;
color
:
#333333
;
font-weight
:
5
00
;
font-weight
:
6
00
;
}
}
.el-button--primary.is-plain
{
.el-button--primary.is-plain
{
...
...
src/components/province-city/index.vue
View file @
c2d30b6
<
template
>
<
template
>
<div>
<div
v-if=
"provinceView"
>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
inline=
"true"
class=
"province"
>
<el-form
ref=
"provinceForm"
:model=
"provinceForm"
inline=
"true"
class=
"province"
>
<el-select
:size=
"size
"
v-model=
"provinceForm.provinceName"
clearable
placeholder=
"选择省份"
:style=
"
{ width: defaultWidth }" @change="selectProvince" class="select-padding">
<el-select
size=
"small
"
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
:size=
"size
"
v-model=
"provinceForm.cityName"
clearable
placeholder=
"选择市"
:style=
"
{ width: defaultWidth }" @change="selectCity" class="select-padding">
<el-select
size=
"small
"
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-select
v-if=
"subdistrict == 3"
size=
"small
"
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-option
v-for=
"item in townList"
:key=
"item.adcode"
:label=
"item.name"
:value=
"item.name"
@
click
.
native=
"selectTown(item)"
></el-option>
</el-select>
</el-select>
</el-form>
</el-form>
...
@@ -15,107 +15,144 @@
...
@@ -15,107 +15,144 @@
</
template
>
</
template
>
<
script
>
<
script
>
let
map
export
default
{
export
default
{
name
:
'Province'
,
name
:
'
GL
Province'
,
props
:
{
props
:
{
// 省市级别,2--只显示省市,3--显示省市区,默认只显示省市
subdistrict
:
{
subdistrict
:
{
type
:
Number
,
type
:
Number
,
default
:
2
default
:
2
},
},
// 省市下拉组件宽度
defaultWidth
:
{
defaultWidth
:
{
type
:
String
,
type
:
String
,
default
:
'150px'
default
:
'150px'
},
// 组件是否展示,默认展示
provinceView
:
{
type
:
Boolean
,
default
:
true
}
}
},
},
data
()
{
data
()
{
return
{
return
{
// 所有数据
AllData
:
[],
AllData
:
[],
// 城市列表
cityList
:
[{
adcode
:
''
,
name
:
'全部'
}],
cityList
:
[{
adcode
:
''
,
name
:
'全部'
}],
// 地区列表
townList
:
[{
adcode
:
''
,
name
:
'全部'
}],
townList
:
[{
adcode
:
''
,
name
:
'全部'
}],
provinceForm
:
{
provinceForm
:
{
provinceName
:
''
,
// 省值
// 省份名称
cityName
:
''
,
// 市值
provinceName
:
''
,
// 城市名称
cityName
:
''
,
// 地区名称
townName
:
''
,
townName
:
''
,
// 省份代码
provinceCode
:
''
,
provinceCode
:
''
,
// 城市代码
cityCode
:
''
,
cityCode
:
''
,
// 地区代码
townCode
:
''
townCode
:
''
}
}
}
}
},
},
mounted
()
{
mounted
()
{},
this
.
mapInit
()
},
methods
:
{
methods
:
{
/*
* @params:传入的为一个key-value的对象
1、keywords --查询关键字,只支持单个关键词语搜索关键词支持:行政区名称、citycode、adcode
列如:this.provinceList({keywords: '山东省'}),这样就可以筛选出山东省下的市、区信息
2、subdistrict --设置显示下级行政区级数,0:不返回下级行政区;1:返回下一级行政区;2:返回下两级行政区;3:返回下三级行政区;
不传的话默认为2,可以在组件中穿,也可以在调用方法的时候传,如果需要展示省市组件,传值最小为2
3、page --最外层的districts最多会返回20个数据,若超过限制,请用page请求下一页数据。
例如page=2;page=3。默认page=1
4、extensions --控制行政区信息中返回行政区边界坐标点; 可选值:base、all;
base:不返回行政区边界坐标点;(默认)
all:只返回当前查询district的边界值,不返回子节点的边界值;目前不能返回乡镇/街道级别的边界值
5、filter -- 按照指定行政区划进行过滤,填入后则只返回该省/直辖市信息,需填入adcode,为了保证数据的正确,强烈建议填入此参数
6、callback -- callback值是用户定义的函数名称,此参数只在output=JSON时有效
7、output --返回数据格式类型,可选值:JSON,XML(默认JSON)
* @return:返回的是一个promise对象,如果不需要展示组件,只需要获取值,可以直接调用方法,异步获取返回值
列如:
const p = this.$refs.provinceForm.provinceList({xxxx(可传值,传值可参考上文params描述) })
p.then(r => {
// r 为返回结果
console.log(r)
})
**/
// 获取省市信息
provinceList
(
params
=
{})
{
params
?
(
params
.
subdistrict
?
''
:
(
params
.
subdistrict
=
this
.
subdistrict
))
:
(
params
.
subdistrict
=
this
.
subdistrict
)
let
data
=
''
for
(
let
key
in
params
)
{
data
+=
'&'
+
key
+
'='
+
params
[
key
]
}
let
path
=
`https://restapi.amap.com/v3/config/district?key=d22348363c34c266f772ae9b635eef2a`
path
=
path
+
data
const
pro
=
fetch
(
path
).
then
(
res
=>
{
return
res
.
json
()
})
if
(
this
.
provinceView
)
{
pro
.
then
(
r
=>
{
this
.
AllData
=
r
.
districts
[
0
].
districts
})
}
return
pro
},
// 省市回显
// 省市回显
init
(
province
,
city
)
{
init
(
province
,
city
,
town
)
{
this
.
provinceForm
=
{
this
.
provinceForm
=
{
provinceName
:
province
,
provinceName
:
province
,
cityName
:
city
cityName
:
city
,
townName
:
town
}
}
// this.mapInit(province, city)
if
(
province
)
{
if
(
province
)
{
this
.
AllData
.
map
(
item
=>
{
this
.
AllData
.
map
(
item
=>
{
if
(
item
.
name
.
indexOf
(
province
)
!=
-
1
)
{
if
(
item
.
name
.
indexOf
(
province
)
!=
-
1
)
{
this
.
provinceForm
.
provinceName
=
item
.
name
this
.
provinceForm
.
provinceName
=
item
.
name
this
.
cityList
=
item
.
district
List
this
.
cityList
=
item
.
district
s
this
.
provinceForm
.
provinceCode
=
item
.
adcode
this
.
provinceForm
.
provinceCode
=
item
.
adcode
if
(
city
)
{
this
.
cityList
.
map
(
itm
=>
{
this
.
cityList
.
map
(
itm
=>
{
if
(
itm
.
name
.
indexOf
(
city
)
!=
-
1
)
{
if
(
itm
.
name
.
indexOf
(
city
)
!=
-
1
)
{
this
.
provinceForm
.
cityCode
=
itm
.
adcode
this
.
provinceForm
.
cityCode
=
itm
.
adcode
this
.
provinceForm
.
cityName
=
itm
.
name
this
.
provinceForm
.
cityName
=
itm
.
name
this
.
townList
=
itm
.
districts
if
(
town
)
{
this
.
townList
.
map
(
itmx
=>
{
if
(
itmx
.
name
.
indexOf
(
town
)
!=
-
1
)
{
this
.
provinceForm
.
townCode
=
itmx
.
adcode
this
.
provinceForm
.
townName
=
itmx
.
name
}
}
})
})
}
}
}
})
}
}
})
})
}
}
},
},
// 选择省
// 选择省
selectProvince
(
val
)
{
selectProvince
(
val
)
{
this
.
provinceForm
.
cityName
=
''
this
.
provinceForm
.
cityName
=
''
this
.
cityList
=
val
.
districtList
this
.
provinceForm
.
townName
=
''
this
.
cityList
=
val
.
districts
this
.
$emit
(
'selectProvince'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectProvince'
,
val
.
name
,
val
.
adcode
)
},
},
// 选择市
// 选择市
selectCity
(
val
)
{
selectCity
(
val
)
{
this
.
provinceForm
.
townName
=
''
this
.
provinceForm
.
townName
=
''
this
.
townList
=
val
.
district
List
this
.
townList
=
val
.
district
s
this
.
$emit
(
'selectCity'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectCity'
,
val
.
name
,
val
.
adcode
)
},
},
// 选择区
// 选择区
selectTown
(
val
)
{
selectTown
(
val
)
{
this
.
$emit
(
'selectTown'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectTown'
,
val
.
name
,
val
.
adcode
)
},
mapInit
()
{
map
=
new
AMap
.
Map
(
'district'
,
{
resizeEnable
:
true
})
AMap
.
plugin
([
'AMap.DistrictSearch'
],
()
=>
{
var
opts
=
{
subdistrict
:
this
.
subdistrict
,
//返回下一级行政区
level
:
'city'
,
//查询的范围
showbiz
:
true
//查询行政级别为 市
}
var
districtSearch
=
new
AMap
.
DistrictSearch
(
opts
)
districtSearch
.
search
(
'中国'
,
(
status
,
result
)
=>
{
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
// }
// })
// }
// })
// }
})
})
}
}
}
}
}
}
...
...
src/views/account/addAccount.vue
View file @
c2d30b6
...
@@ -285,7 +285,7 @@ export default {
...
@@ -285,7 +285,7 @@ export default {
// }, 100)
// }, 100)
// return
// return
// }
// }
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
if
(
this
.
accountAddForm
.
residentPhone
)
{
if
(
this
.
accountAddForm
.
residentPhone
)
{
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
if
(
!
result
)
{
if
(
!
result
)
{
...
@@ -412,7 +412,8 @@ export default {
...
@@ -412,7 +412,8 @@ export default {
this
.
findMerchantDetail
()
this
.
findMerchantDetail
()
this
.
getCarbrandTree
()
this
.
getCarbrandTree
()
this
.
findAllDictData
(
'business_type'
)
this
.
findAllDictData
(
'business_type'
)
// this.$refs.baseInfoForm.brandList()
this
.
$refs
.
baseInfoForm
.
brandList
()
// 1
}
}
}
}
</
script
>
</
script
>
...
...
src/views/account/components/baseInfo.vue
View file @
c2d30b6
...
@@ -180,7 +180,7 @@ export default {
...
@@ -180,7 +180,7 @@ export default {
}
}
}
}
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
callback
()
callback
()
}
else
{
}
else
{
...
@@ -213,7 +213,8 @@ export default {
...
@@ -213,7 +213,8 @@ export default {
provinceName
:
''
,
provinceName
:
''
,
cityCode
:
''
,
cityCode
:
''
,
cityName
:
''
,
cityName
:
''
,
isFirstBrand
:
false
isFirstBrand
:
false
,
addressData
:
{}
}
}
},
},
watch
:
{
watch
:
{
...
@@ -296,11 +297,28 @@ export default {
...
@@ -296,11 +297,28 @@ export default {
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
accountAddForm
.
lat
=
lnglat
.
lat
this
.
accountAddForm
.
lat
=
lnglat
.
lat
this
.
accountAddForm
.
lng
=
lnglat
.
lng
this
.
accountAddForm
.
lng
=
lnglat
.
lng
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
var
fullAddress
=
''
var
provincecode
=
''
if
(
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
)
{
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
this
.
addressData
.
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
this
.
addressData
.
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
this
.
addressData
.
fullAddress
provincecode
=
this
.
addressData
.
provincecode
}
// 获取省市
// 获取省市
var
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
var
province
=
''
var
province
=
fullAddress
.
province
var
city
=
''
var
city
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
if
(
fullAddress
)
{
province
=
fullAddress
.
province
city
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
province
=
this
.
accountAddForm
.
provinceName
city
=
this
.
accountAddForm
.
cityName
provincecode
=
this
.
accountAddForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
if
(
municipality
)
{
if
(
municipality
)
{
...
@@ -335,6 +353,7 @@ export default {
...
@@ -335,6 +353,7 @@ export default {
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
this
.
$set
(
this
.
accountAddForm
,
'merchantAddress'
,
''
)
// 强制更新 merchantAddress
// 强制更新 merchantAddress
this
.
$forceUpdate
()
this
.
$forceUpdate
()
this
.
accountAddForm
.
cityName
=
''
this
.
accountAddForm
.
provinceName
=
provinceName
this
.
accountAddForm
.
provinceName
=
provinceName
this
.
accountAddForm
.
provinceCode
=
provinceCode
this
.
accountAddForm
.
provinceCode
=
provinceCode
},
},
...
@@ -398,6 +417,7 @@ export default {
...
@@ -398,6 +417,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
provinceForm
.
provinceList
()
this
.
getUserInfo
()
this
.
getUserInfo
()
}
}
}
}
...
...
src/views/account/detailAccount.vue
View file @
c2d30b6
...
@@ -350,7 +350,7 @@ export default {
...
@@ -350,7 +350,7 @@ export default {
},
},
//将后台返回数据中数值为空的字段全部替换为“-”
//将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData
(
initialData
)
{
formateNullFieldData
(
initialData
)
{
const
isEmpty
=
function
(
val
)
{
const
isEmpty
=
function
(
val
)
{
if
(
!
String
(
val
)
||
String
(
val
)
===
'null'
)
{
if
(
!
String
(
val
)
||
String
(
val
)
===
'null'
)
{
return
'-'
return
'-'
}
}
...
@@ -358,7 +358,7 @@ export default {
...
@@ -358,7 +358,7 @@ export default {
}
}
var
that
=
this
var
that
=
this
if
(
initialData
instanceof
Array
)
{
if
(
initialData
instanceof
Array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
initialData
.
forEach
(
function
(
val
,
key
,
array
)
{
array
[
key
]
=
that
.
formateNullFieldData
(
val
)
array
[
key
]
=
that
.
formateNullFieldData
(
val
)
})
})
}
else
if
(
initialData
instanceof
Object
)
{
}
else
if
(
initialData
instanceof
Object
)
{
...
@@ -664,7 +664,7 @@ export default {
...
@@ -664,7 +664,7 @@ export default {
padding-left
:
2px
;
padding-left
:
2px
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
.mainTitleWrap
{
.mainTitleWrap
{
height
:
32px
;
//
height
:
32px
;
display
:
flex
;
display
:
flex
;
.mainTitle
{
.mainTitle
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
...
@@ -684,8 +684,9 @@ export default {
...
@@ -684,8 +684,9 @@ export default {
margin
:
20px
10px
0
;
margin
:
20px
10px
0
;
.subTitleWrap
{
.subTitleWrap
{
height
:
40px
;
//
height
:
40px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
.subTitle
{
.subTitle
{
padding
:
0px
5px
;
padding
:
0px
5px
;
...
...
src/views/account/editAccount.vue
View file @
c2d30b6
...
@@ -301,7 +301,7 @@ export default {
...
@@ -301,7 +301,7 @@ export default {
// }, 100)
// }, 100)
// return
// return
// }
// }
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
if
(
this
.
accountAddForm
.
residentPhone
)
{
if
(
this
.
accountAddForm
.
residentPhone
)
{
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
const
result
=
reg
.
test
(
this
.
accountAddForm
.
residentPhone
)
if
(
!
result
)
{
if
(
!
result
)
{
...
...
src/views/account/index.vue
View file @
c2d30b6
...
@@ -73,7 +73,7 @@ export default {
...
@@ -73,7 +73,7 @@ export default {
{
{
label
:
'关联的企业微信'
,
label
:
'关联的企业微信'
,
prop
:
'entmicroName'
,
prop
:
'entmicroName'
,
width
:
'
14
0'
,
width
:
'
20
0'
,
line
:
1
,
line
:
1
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
'-'
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
'-'
...
@@ -99,7 +99,7 @@ export default {
...
@@ -99,7 +99,7 @@ export default {
{
{
label
:
'上级商户'
,
label
:
'上级商户'
,
prop
:
'parentMerchant'
,
prop
:
'parentMerchant'
,
width
:
'
18
0'
,
width
:
'
20
0'
,
line
:
1
,
line
:
1
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
'-'
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
'-'
...
@@ -401,7 +401,7 @@ export default {
...
@@ -401,7 +401,7 @@ export default {
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.follow-form
{
.follow-form
{
margin-top
:
2
0px
;
margin-top
:
1
0px
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
padding
:
10px
;
padding
:
10px
;
...
...
src/views/baseInfo/editInfo.vue
View file @
c2d30b6
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
},
},
data
()
{
data
()
{
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
callback
()
callback
()
}
else
{
}
else
{
...
@@ -96,10 +96,12 @@ export default {
...
@@ -96,10 +96,12 @@ export default {
isFirstBrand
:
false
,
isFirstBrand
:
false
,
baseFormRules
:
{
baseFormRules
:
{
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
}
},
addressData
:
{}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
provinceForm
.
provinceList
()
this
.
getUserInfo
()
this
.
getUserInfo
()
},
},
methods
:
{
methods
:
{
...
@@ -180,18 +182,34 @@ export default {
...
@@ -180,18 +182,34 @@ export default {
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
let
lnglat
=
this
.
$refs
.
mapForm
.
lnglat
this
.
infoForm
.
lat
=
lnglat
.
lat
this
.
infoForm
.
lat
=
lnglat
.
lat
this
.
infoForm
.
lng
=
lnglat
.
lng
this
.
infoForm
.
lng
=
lnglat
.
lng
var
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
var
fullAddress
=
''
var
provincecode
=
''
if
(
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
)
{
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
this
.
addressData
.
fullAddress
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
addressComponent
this
.
addressData
.
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
}
else
{
fullAddress
=
this
.
addressData
.
fullAddress
provincecode
=
this
.
addressData
.
provincecode
}
// 获取省市
// 获取省市
var
provincecode
=
this
.
$refs
.
mapForm
.
geocoderAddress
.
adcode
var
province
=
''
var
province
=
fullAddress
.
province
var
city
=
''
var
city
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
if
(
fullAddress
)
{
province
=
fullAddress
.
province
city
=
fullAddress
.
city
?
fullAddress
.
city
:
fullAddress
.
district
}
else
{
province
=
this
.
infoForm
.
provinceName
city
=
this
.
infoForm
.
cityName
provincecode
=
this
.
infoForm
.
cityCode
}
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
const
municipalities
=
[
'北京市'
,
'天津市'
,
'上海市'
,
'重庆市'
]
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
province
)
if
(
municipality
)
{
if
(
municipality
)
{
city
=
city
.
slice
(
0
,
2
)
+
'城区'
city
=
city
.
slice
(
0
,
2
)
+
'城区'
if
(
municipality
===
'重庆市'
)
{
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
=
provincecode
.
slice
(
0
,
4
)
console
.
log
(
provincecode
)
provincecode
==
5001
?
(
city
=
city
.
slice
(
0
,
2
)
+
'城区'
)
:
(
city
=
city
.
slice
(
0
,
2
)
+
'郊县'
)
provincecode
==
5001
?
(
city
=
city
.
slice
(
0
,
2
)
+
'城区'
)
:
(
city
=
city
.
slice
(
0
,
2
)
+
'郊县'
)
}
}
}
}
...
@@ -212,6 +230,7 @@ export default {
...
@@ -212,6 +230,7 @@ export default {
// 获取省
// 获取省
selectProvince
(
provinceName
,
provinceCode
)
{
selectProvince
(
provinceName
,
provinceCode
)
{
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
merchantAddress
=
''
this
.
infoForm
.
cityName
=
''
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
provinceName
=
provinceName
this
.
infoForm
.
provinceCode
=
provinceCode
this
.
infoForm
.
provinceCode
=
provinceCode
},
},
...
@@ -227,7 +246,7 @@ export default {
...
@@ -227,7 +246,7 @@ export default {
},
},
handleSave
()
{
handleSave
()
{
const
params
=
this
.
infoForm
const
params
=
this
.
infoForm
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
78
]\d{9}))
$/
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
345
6789
]\d{9}))
$/
if
(
params
.
residentPhone
)
{
if
(
params
.
residentPhone
)
{
const
result
=
reg
.
test
(
params
.
residentPhone
)
const
result
=
reg
.
test
(
params
.
residentPhone
)
if
(
!
result
)
{
if
(
!
result
)
{
...
...
src/views/employee/detail/config.vue
View file @
c2d30b6
...
@@ -171,8 +171,9 @@ export default {
...
@@ -171,8 +171,9 @@ export default {
padding-left
:
2px
;
padding-left
:
2px
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
.mainTitleWrap
{
.mainTitleWrap
{
height
:
32px
;
//
height
:
32px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
.mainTitle
{
.mainTitle
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
...
@@ -193,8 +194,9 @@ export default {
...
@@ -193,8 +194,9 @@ export default {
margin
:
20px
10px
0
;
margin
:
20px
10px
0
;
.subTitleWrap
{
.subTitleWrap
{
height
:
40px
;
//
height
:
40px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
.subTitle
{
.subTitle
{
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
...
...
src/views/employee/index.vue
View file @
c2d30b6
...
@@ -154,14 +154,14 @@ export default {
...
@@ -154,14 +154,14 @@ export default {
{
{
label
:
'员工姓名'
,
label
:
'员工姓名'
,
prop
:
'staffName'
,
prop
:
'staffName'
,
width
:
'
1
00'
,
width
:
'
2
00'
,
line
:
1
line
:
1
},
},
{
{
label
:
'员工企微号'
,
label
:
'员工企微号'
,
prop
:
'entmicroName'
,
prop
:
'entmicroName'
,
line
:
1
,
line
:
1
,
width
:
'
12
0'
,
width
:
'
20
0'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
entmicroName
||
'-'
return
cellValue
.
entmicroName
||
'-'
}
}
...
@@ -178,12 +178,12 @@ export default {
...
@@ -178,12 +178,12 @@ export default {
{
{
label
:
'登录手机号'
,
label
:
'登录手机号'
,
prop
:
'staffPhone'
,
prop
:
'staffPhone'
,
width
:
'
13
0'
width
:
'
20
0'
},
},
{
{
label
:
'所属门店'
,
label
:
'所属门店'
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
width
:
'3
0
0'
,
width
:
'3
5
0'
,
line
:
1
line
:
1
},
},
{
{
...
@@ -201,7 +201,7 @@ export default {
...
@@ -201,7 +201,7 @@ export default {
label
:
'更新时间'
,
label
:
'更新时间'
,
prop
:
'updatedTime'
,
prop
:
'updatedTime'
,
line
:
1
,
line
:
1
,
minWidth
:
'
18
0'
minWidth
:
'
20
0'
},
},
{
{
label
:
'启用开关'
,
label
:
'启用开关'
,
...
...
src/views/followUp/index.vue
View file @
c2d30b6
...
@@ -85,24 +85,19 @@ export default {
...
@@ -85,24 +85,19 @@ export default {
},
},
{
{
label
:
'部门'
,
label
:
'部门'
,
prop
:
'departmentName'
,
prop
:
'departmentName'
width
:
120
,
line
:
1
},
},
{
{
label
:
'跟进专员类型'
,
label
:
'跟进专员类型'
,
prop
:
'followerTypeName'
,
prop
:
'followerTypeName'
minWidth
:
150
},
},
{
{
label
:
'手机号'
,
label
:
'手机号'
,
prop
:
'staffPhone'
,
prop
:
'staffPhone'
minWidth
:
150
},
},
{
{
label
:
'首次开通时间'
,
label
:
'首次开通时间'
,
prop
:
'followerCreatedTime'
,
prop
:
'followerCreatedTime'
minWidth
:
150
},
},
{
{
label
:
'是否有外部联系人权限'
,
label
:
'是否有外部联系人权限'
,
...
@@ -317,7 +312,7 @@ export default {
...
@@ -317,7 +312,7 @@ export default {
}
}
.follow-form
{
.follow-form
{
min-height
:
calc
(
100%
-
200px
);
min-height
:
calc
(
100%
-
200px
);
margin-top
:
2
0px
;
margin-top
:
1
0px
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
padding
:
20px
;
padding
:
20px
;
...
...
src/views/role/index.vue
View file @
c2d30b6
...
@@ -93,12 +93,12 @@ export default {
...
@@ -93,12 +93,12 @@ export default {
{
{
label
:
'角色名称'
,
label
:
'角色名称'
,
prop
:
'roleName'
,
prop
:
'roleName'
,
minWidth
:
'2
0
0'
minWidth
:
'2
5
0'
},
},
{
{
label
:
'角色号'
,
label
:
'角色号'
,
prop
:
'roleCode'
,
prop
:
'roleCode'
,
minWidth
:
'2
0
0'
minWidth
:
'2
2
0'
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
...
@@ -108,12 +108,12 @@ export default {
...
@@ -108,12 +108,12 @@ export default {
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
prop
:
'createdTime'
,
prop
:
'createdTime'
,
w
idth
:
'180'
minW
idth
:
'180'
},
},
{
{
label
:
'更新时间'
,
label
:
'更新时间'
,
prop
:
'updatedTime'
,
prop
:
'updatedTime'
,
w
idth
:
'180'
,
minW
idth
:
'180'
,
formatter
:
val
=>
{
formatter
:
val
=>
{
if
(
!
val
.
updatedTime
)
{
if
(
!
val
.
updatedTime
)
{
return
'--'
return
'--'
...
@@ -297,7 +297,7 @@ export default {
...
@@ -297,7 +297,7 @@ export default {
let
accountLevel
=
session
.
accountLevel
let
accountLevel
=
session
.
accountLevel
console
.
log
(
accountLevel
)
console
.
log
(
accountLevel
)
if
(
accountLevel
!=
4
)
{
if
(
accountLevel
!=
4
)
{
this
.
tableParams
.
tableColumns
.
splice
(
2
,
0
,
{
label
:
'所属商户名'
,
prop
:
'merchantName'
,
width
:
'3
0
0'
,
line
:
1
})
this
.
tableParams
.
tableColumns
.
splice
(
2
,
0
,
{
label
:
'所属商户名'
,
prop
:
'merchantName'
,
width
:
'3
4
0'
,
line
:
1
})
this
.
getMerchantName
()
this
.
getMerchantName
()
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'merchantId'
)
let
idx
=
this
.
searchFormData
.
findIndex
(
item
=>
item
.
name
==
'merchantId'
)
this
.
searchFormData
[
idx
].
isHide
=
false
this
.
searchFormData
[
idx
].
isHide
=
false
...
...
src/views/role/look.vue
View file @
c2d30b6
...
@@ -290,6 +290,7 @@ export default {
...
@@ -290,6 +290,7 @@ export default {
padding
:
10px
;
padding
:
10px
;
.menu_line_two
{
.menu_line_two
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
align-items
:
center
;
.line_element_two
{
.line_element_two
{
//
width
:
111px
;
//
width
:
111px
;
...
...
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