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 f34ea87d
authored
Apr 22, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
驻店电话校验规则修改,主营品牌交互修改
1 parent
a58b2bff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
46 deletions
src/views/account/addAccount.vue
src/views/account/components/baseInfo.vue
src/views/account/editAccount.vue
src/views/baseInfo/editInfo.vue
src/views/followUp/index.vue
src/views/account/addAccount.vue
View file @
f34ea87
...
@@ -276,15 +276,15 @@ export default {
...
@@ -276,15 +276,15 @@ export default {
},
100
)
},
100
)
return
return
}
}
if
(
this
.
accountAddForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
accountAddForm
.
residentPhone
))
{
//
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this
.
$message
.
error
(
'请输入正确的驻店电话'
)
//
this.$message.error('请输入正确的驻店电话')
document
.
querySelector
(
'#app'
).
scrollTop
=
0
//
document.querySelector('#app').scrollTop = 0
setTimeout
(()
=>
{
//
setTimeout(() => {
var
isError
=
document
.
getElementsByClassName
(
'phone-input'
)
//
var isError = document.getElementsByClassName('phone-input')
isError
[
0
].
querySelector
(
'input'
).
focus
()
//
isError[0].querySelector('input').focus()
},
100
)
//
}, 100)
return
//
return
}
//
}
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
)
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
)
if
(
params
.
bussinessTime
)
{
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
...
@@ -401,6 +401,7 @@ export default {
...
@@ -401,6 +401,7 @@ export default {
this
.
findMerchantDetail
()
this
.
findMerchantDetail
()
this
.
getCarbrandTree
()
this
.
getCarbrandTree
()
this
.
findAllDictData
(
'business_type'
)
this
.
findAllDictData
(
'business_type'
)
// this.$refs.baseInfoForm.brandList()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/account/components/baseInfo.vue
View file @
f34ea87
...
@@ -74,8 +74,8 @@
...
@@ -74,8 +74,8 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"驻店电话"
>
<el-form-item
label=
"驻店电话"
prop=
"residentPhone"
>
<el-input
maxlength=
"1
1
"
size=
"small"
class=
"phone-input"
v-model=
"accountAddForm.residentPhone"
placeholder=
"请输入驻店电话"
></el-input>
<el-input
maxlength=
"1
3
"
size=
"small"
class=
"phone-input"
v-model=
"accountAddForm.residentPhone"
placeholder=
"请输入驻店电话"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -179,6 +179,18 @@ export default {
...
@@ -179,6 +179,18 @@ export default {
callback
()
callback
()
}
}
}
}
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
34578
]\d{9}))
$/
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
callback
()
}
else
{
if
(
!
reg
.
test
(
value
)
&&
value
!=
''
)
{
callback
(
new
Error
(
'请输入正确的电话号码或者固话号码'
))
}
else
{
callback
()
}
}
}
return
{
return
{
imgIndex
:
''
,
imgIndex
:
''
,
filterText
:
''
,
filterText
:
''
,
...
@@ -193,7 +205,8 @@ export default {
...
@@ -193,7 +205,8 @@ export default {
merchantLegalPersonPhone
:
[
merchantLegalPersonPhone
:
[
{
required
:
true
,
message
:
'请输入联系电话'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入联系电话'
,
trigger
:
'blur'
},
{
validator
:
validatePhone
,
trigger
:
'blur'
}
{
validator
:
validatePhone
,
trigger
:
'blur'
}
]
],
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
},
},
brandListTree
:
[],
brandListTree
:
[],
provinceCode
:
''
,
provinceCode
:
''
,
...
@@ -209,12 +222,15 @@ export default {
...
@@ -209,12 +222,15 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
checkBrandList
(
chant
)
{
checkBrandList
()
{
let
merchantBrandMain
=
chant
.
filter
(
item
=>
item
)
// let merchantBrandMain = chant.filter(item => item)
this
.
$set
(
this
.
accountAddForm
,
'merchantBrandMain'
,
merchantBrandMain
)
// this.$set(this.accountAddForm, 'merchantBrandMain', merchantBrandMain)
console
.
log
(
this
.
accountAddForm
.
merchantBrandMain
)
console
.
log
(
222222222
)
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
this
.
accountAddForm
.
merchantBrandMain
=
[]
this
.
accountAddForm
.
merchantBrandMain
=
[]
}
}
this
.
brandList
()
// this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
// this.$refs.brandListTree.getCheckList(this.accountAddForm.merchantBrandMain)
},
},
checkBusinessType
(
type
)
{
checkBusinessType
(
type
)
{
...
@@ -251,7 +267,7 @@ export default {
...
@@ -251,7 +267,7 @@ export default {
// 点击主营品牌
// 点击主营品牌
clickBrand
(
val
)
{
clickBrand
(
val
)
{
if
(
!
this
.
isFirstBrand
)
{
if
(
!
this
.
isFirstBrand
)
{
this
.
brandList
()
//
this.brandList()
this
.
isFirstBrand
=
true
this
.
isFirstBrand
=
true
}
}
},
},
...
...
src/views/account/editAccount.vue
View file @
f34ea87
...
@@ -292,15 +292,15 @@ export default {
...
@@ -292,15 +292,15 @@ export default {
},
100
)
},
100
)
return
return
}
}
if
(
this
.
accountAddForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
accountAddForm
.
residentPhone
))
{
//
if (this.accountAddForm.residentPhone && !util.checkPhone(this.accountAddForm.residentPhone)) {
this
.
$message
.
error
(
'请输入正确的驻店电话'
)
//
this.$message.error('请输入正确的驻店电话')
document
.
querySelector
(
'#app'
).
scrollTop
=
0
//
document.querySelector('#app').scrollTop = 0
setTimeout
(()
=>
{
//
setTimeout(() => {
var
isError
=
document
.
getElementsByClassName
(
'phone-input'
)
//
var isError = document.getElementsByClassName('phone-input')
isError
[
0
].
querySelector
(
'input'
).
focus
()
//
isError[0].querySelector('input').focus()
},
100
)
//
}, 100)
return
//
return
}
//
}
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
)
let
params
=
Object
.
assign
({},
this
.
accountAddForm
,
this
.
accountInfoForm
)
if
(
params
.
bussinessTime
)
{
if
(
params
.
bussinessTime
)
{
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
params
.
bussinessBegintime
=
params
.
bussinessTime
[
0
]
...
@@ -432,8 +432,13 @@ export default {
...
@@ -432,8 +432,13 @@ export default {
})
})
// 省市回显
// 省市回显
this
.
$refs
.
baseInfoForm
.
init
(
this
.
accountAddForm
.
provinceName
,
this
.
accountAddForm
.
cityName
)
this
.
$refs
.
baseInfoForm
.
init
(
this
.
accountAddForm
.
provinceName
,
this
.
accountAddForm
.
cityName
)
merchantBrandMain
=
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
if
(
!
this
.
accountAddForm
.
merchantBrandMain
)
{
this
.
$refs
.
baseInfoForm
.
checkBrandList
(
merchantBrandMain
)
this
.
accountAddForm
.
merchantBrandMain
=
[]
}
else
{
this
.
accountAddForm
.
merchantBrandMain
=
this
.
accountAddForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
}
// merchantBrandMain = merchantBrandMain.replaceAll(';', ',').split(',')
this
.
$refs
.
baseInfoForm
.
brandList
()
this
.
$refs
.
baseInfoForm
.
checkBusinessType
(
businessType
)
this
.
$refs
.
baseInfoForm
.
checkBusinessType
(
businessType
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
()
this
.
$refs
.
baseInfoForm
.
$refs
.
baseForm
.
validate
()
...
...
src/views/baseInfo/editInfo.vue
View file @
f34ea87
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<div
class=
"main-information"
>
<div
class=
"main-information"
>
<div
class=
"information-title"
>
修改企业信息
</div>
<div
class=
"information-title"
>
修改企业信息
</div>
<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"
:rules=
"baseFormRules"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<el-form-item
size=
"small"
label=
"商户地址"
class=
"map-row"
>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
></Province>
<Province
ref=
"provinceForm"
:subdistrict=
"subdistrict"
@
selectProvince=
"selectProvince"
@
selectCity=
"selectCity"
></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>
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
<el-form-item
size=
"small"
label=
"营业时间"
class=
"time-row"
>
<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-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"
prop=
"residentPhone"
>
<el-input
v-model=
"infoForm.residentPhone"
class=
"phone-input"
maxlength=
"1
1
"
placeholder=
"此电话会在小程序上显示,请填写真实有效的电话或手机号"
></el-input>
<el-input
v-model=
"infoForm.residentPhone"
class=
"phone-input"
maxlength=
"1
3
"
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"
>
...
@@ -63,6 +63,18 @@ export default {
...
@@ -63,6 +63,18 @@ export default {
TelPosition
TelPosition
},
},
data
()
{
data
()
{
const
validatePhoneTwo
=
(
rule
,
value
,
callback
)
=>
{
const
reg
=
/^
((
0
\d{2,3}
-
\d{7,8})
|
(
1
[
34578
]\d{9}))
$/
if
(
value
==
''
||
value
==
undefined
||
value
==
null
)
{
callback
()
}
else
{
if
(
!
reg
.
test
(
value
)
&&
value
!=
''
)
{
callback
(
new
Error
(
'请输入正确的电话号码或者固话号码'
))
}
else
{
callback
()
}
}
}
return
{
return
{
subdistrict
:
2
,
subdistrict
:
2
,
checkedAll
:
false
,
checkedAll
:
false
,
...
@@ -80,13 +92,14 @@ export default {
...
@@ -80,13 +92,14 @@ export default {
},
},
businessType
:
[],
businessType
:
[],
brandListTree
:
[],
brandListTree
:
[],
isFirstBrand
:
false
isFirstBrand
:
false
,
baseFormRules
:
{
residentPhone
:
[{
validator
:
validatePhoneTwo
,
trigger
:
'blur'
}]
}
}
}
},
},
mounted
()
{
mounted
()
{
// this.brandList()
this
.
getUserInfo
()
this
.
getUserInfo
()
// this.$refs.provinceForm.mapInit()
},
},
methods
:
{
methods
:
{
async
brandList
()
{
async
brandList
()
{
...
@@ -139,6 +152,7 @@ export default {
...
@@ -139,6 +152,7 @@ export default {
}
else
{
}
else
{
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
this
.
infoForm
.
merchantBrandMain
=
this
.
infoForm
.
merchantBrandMain
.
replaceAll
(
';'
,
','
).
split
(
','
)
}
}
this
.
brandList
()
if
(
merchantBrandName
)
{
if
(
merchantBrandName
)
{
const
brandName
=
merchantBrandName
.
split
(
','
).
map
((
item
,
index
)
=>
{
const
brandName
=
merchantBrandName
.
split
(
','
).
map
((
item
,
index
)
=>
{
return
{
label
:
item
,
id
:
index
}
return
{
label
:
item
,
id
:
index
}
...
@@ -149,7 +163,7 @@ export default {
...
@@ -149,7 +163,7 @@ export default {
// 点击主营品牌
// 点击主营品牌
clickBrand
(
val
)
{
clickBrand
(
val
)
{
if
(
!
this
.
isFirstBrand
)
{
if
(
!
this
.
isFirstBrand
)
{
this
.
brandList
()
//
this.brandList()
this
.
isFirstBrand
=
true
this
.
isFirstBrand
=
true
}
}
},
},
...
@@ -218,15 +232,15 @@ export default {
...
@@ -218,15 +232,15 @@ export default {
},
},
handleSave
()
{
handleSave
()
{
const
params
=
this
.
infoForm
const
params
=
this
.
infoForm
if
(
this
.
infoForm
.
residentPhone
&&
!
util
.
checkPhone
(
this
.
infoForm
.
residentPhone
))
{
// if (this.infoForm.residentPhone && !util.validatePhoneTwo
(this.infoForm.residentPhone)) {
this
.
$message
.
error
(
'请输入正确的驻店电话'
)
//
this.$message.error('请输入正确的驻店电话')
document
.
querySelector
(
'#app'
).
scrollTop
=
0
//
document.querySelector('#app').scrollTop = 0
setTimeout
(()
=>
{
//
setTimeout(() => {
var
isError
=
document
.
getElementsByClassName
(
'phone-input'
)
//
var isError = document.getElementsByClassName('phone-input')
isError
[
0
].
querySelector
(
'input'
).
focus
()
//
isError[0].querySelector('input').focus()
},
100
)
//
}, 100)
return
//
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/followUp/index.vue
View file @
f34ea87
...
@@ -11,9 +11,12 @@
...
@@ -11,9 +11,12 @@
</div>
</div>
<div
class=
"follow-form"
:style=
"
{ 'min-height': formHeight + 'px' }">
<div
class=
"follow-form"
:style=
"
{ 'min-height': formHeight + 'px' }">
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:rowNumber=
"1"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:formObj=
"searchForm"
:rowNumber=
"1"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
:inline=
"true"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"follow-btn"
>
<div
class=
"table-header"
>
<GLButton
fn=
"新增"
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
plain
@
click=
"openDrawer"
>
跟进专员
</GLButton>
<div
class=
"header-text"
>
跟进专员列表
</div>
<!--
<el-button
size=
"small"
icon=
"el-icon-plus"
type=
"primary"
plain
@
click=
"openDrawer"
>
跟进专员
</el-button>
-->
<div
class=
"table-btn"
>
<GLButton
fn=
"新增"
size=
"small"
type=
"primary"
plain
@
click=
"openDrawer"
>
跟进专员
</GLButton>
<!--
<el-button
size=
"small"
type=
"primary"
plain
@
click=
"openDrawer"
>
跟进专员
</el-button>
-->
</div>
</div>
</div>
<GLTable
ref=
"table"
:layout=
"layout"
:tableData=
"tableData"
:tableTotal=
"tableTotal"
:pageConf=
"pageConf"
:tableParams=
"tableParams"
@
refreshTable=
"handleSearch"
>
<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"
>
<template
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
...
...
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