Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
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 48f3a8f6
authored
Jun 05, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
edf52f87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
src/views/specialShop/addShop/index.vue
src/views/specialShop/addShop/index.vue
View file @
48f3a8f
...
...
@@ -9,8 +9,9 @@
label-width=
"135px"
:inline=
"true"
>
<el-form-item
class=
"special-shop-input"
label=
"特约店名称:"
prop=
"specialShop"
>
<el-form-item
class=
"special-shop-input"
label=
"特约店名称:"
prop=
"specialShop
Name
"
>
<el-cascader
:key=
"refresh"
ref=
"specialShopCascader"
v-model=
"form.specialShopName"
:value=
"form.specialShopName"
...
...
@@ -20,6 +21,7 @@
filterable
@
change=
"handleSpecialShopChange"
size=
"small"
clearable
:disabled=
"readonlyStatus"
></el-cascader>
</el-form-item>
...
...
@@ -121,13 +123,13 @@ import mapService from 'utils/mapService.js'
export
default
{
components
:
{
fenceMap
},
data
()
{
let
checkSpecialShop
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
specialShopId
==
""
){
cb
(
new
Error
(
'请选择特约店'
))
}
else
{
cb
();
}
let
checkSpecialShop
=
(
rule
,
value
,
cb
)
=>
{
if
(
!
this
.
form
.
specialShopName
){
cb
(
new
Error
(
'请选择特约店'
))
}
else
{
cb
();
}
}
let
checkLng
=
(
rule
,
vaule
,
cb
)
=>
{
if
(
this
.
form
.
shapeType
==
1
&&
!
/^
(\+
|-
)?(?:
180
(?:(?:\.
0
{1,6})?)
|
(?:[
0-9
]
|
[
1-9
][
0-9
]
|1
[
0-7
][
0-9
])(?:(?:\.[
0-9
]{1,6})?))
$/
.
test
(
this
.
form
.
lng
)){
...
...
@@ -166,6 +168,7 @@ export default {
}
return
{
refresh
:
new
Date
().
getTime
(),
btn_size
:
'small'
,
configForm
:
{},
mapData
:
[],
...
...
@@ -176,7 +179,7 @@ export default {
specialShopDefaultProps
:
{
children
:
'children'
,
label
:
'label'
,
value
:
'code'
value
:
'code'
,
},
readonlyStatus
:
false
,
form
:
{
...
...
@@ -227,9 +230,9 @@ export default {
msgtel
:
''
},
rules
:
{
specialShop
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
specialShop
Name
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
fenceName
:
[
{
required
:
true
,
message
:
'请输入特约店线路名称'
,
trigger
:
'blur'
},
{
pattern
:
/^
\S{2,200}
$/
,
message
:
'至少2字'
,
trigger
:
'blur'
},
...
...
@@ -346,10 +349,18 @@ export default {
},
handleSpecialShopChange
(
val
)
{
// 特约店级联选项
this
.
form
.
specialShopName
=
val
[
1
];
if
(
val
&&
val
.
length
>
1
)
{
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
this
.
form
.
specialShopId
=
thisNodes
.
data
.
id
;
this
.
form
.
specialShopCode
=
thisNodes
.
data
.
code
;
this
.
$nextTick
(()
=>
{
this
.
refresh
=
new
Date
().
getTime
();
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
if
(
thisNodes
&&
thisNodes
.
data
)
{
const
{
data
}
=
thisNodes
;
this
.
form
.
specialShopId
=
data
.
id
;
this
.
form
.
specialShopCode
=
data
.
code
;
this
.
form
.
specialShopName
=
data
.
label
;
}
})
}
},
updateFence
(){
...
...
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