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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
src/views/specialShop/addShop/index.vue
src/views/specialShop/addShop/index.vue
View file @
48f3a8f
...
@@ -9,8 +9,9 @@
...
@@ -9,8 +9,9 @@
label-width=
"135px"
label-width=
"135px"
:inline=
"true"
: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
<el-cascader
:key=
"refresh"
ref=
"specialShopCascader"
ref=
"specialShopCascader"
v-model=
"form.specialShopName"
v-model=
"form.specialShopName"
:value=
"form.specialShopName"
:value=
"form.specialShopName"
...
@@ -20,6 +21,7 @@
...
@@ -20,6 +21,7 @@
filterable
filterable
@
change=
"handleSpecialShopChange"
@
change=
"handleSpecialShopChange"
size=
"small"
size=
"small"
clearable
:disabled=
"readonlyStatus"
:disabled=
"readonlyStatus"
></el-cascader>
></el-cascader>
</el-form-item>
</el-form-item>
...
@@ -121,8 +123,8 @@ import mapService from 'utils/mapService.js'
...
@@ -121,8 +123,8 @@ import mapService from 'utils/mapService.js'
export
default
{
export
default
{
components
:
{
fenceMap
},
components
:
{
fenceMap
},
data
()
{
data
()
{
let
checkSpecialShop
=
(
rule
,
va
ul
e
,
cb
)
=>
{
let
checkSpecialShop
=
(
rule
,
va
lu
e
,
cb
)
=>
{
if
(
this
.
form
.
specialShopId
==
""
){
if
(
!
this
.
form
.
specialShopName
){
cb
(
new
Error
(
'请选择特约店'
))
cb
(
new
Error
(
'请选择特约店'
))
}
else
{
}
else
{
cb
();
cb
();
...
@@ -166,6 +168,7 @@ export default {
...
@@ -166,6 +168,7 @@ export default {
}
}
return
{
return
{
refresh
:
new
Date
().
getTime
(),
btn_size
:
'small'
,
btn_size
:
'small'
,
configForm
:
{},
configForm
:
{},
mapData
:
[],
mapData
:
[],
...
@@ -176,7 +179,7 @@ export default {
...
@@ -176,7 +179,7 @@ export default {
specialShopDefaultProps
:
{
specialShopDefaultProps
:
{
children
:
'children'
,
children
:
'children'
,
label
:
'label'
,
label
:
'label'
,
value
:
'code'
value
:
'code'
,
},
},
readonlyStatus
:
false
,
readonlyStatus
:
false
,
form
:
{
form
:
{
...
@@ -227,7 +230,7 @@ export default {
...
@@ -227,7 +230,7 @@ export default {
msgtel
:
''
msgtel
:
''
},
},
rules
:
{
rules
:
{
specialShop
:
[
specialShop
Name
:
[
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
{
required
:
true
,
validator
:
checkSpecialShop
,
trigger
:
'change'
}
],
],
fenceName
:
[
fenceName
:
[
...
@@ -346,10 +349,18 @@ export default {
...
@@ -346,10 +349,18 @@ export default {
},
},
handleSpecialShopChange
(
val
)
{
handleSpecialShopChange
(
val
)
{
// 特约店级联选项
// 特约店级联选项
this
.
form
.
specialShopName
=
val
[
1
];
if
(
val
&&
val
.
length
>
1
)
{
if
(
val
&&
val
.
length
>
1
)
{
this
.
$nextTick
(()
=>
{
this
.
refresh
=
new
Date
().
getTime
();
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
const
thisNodes
=
this
.
$refs
[
'specialShopCascader'
].
getCheckedNodes
()[
0
];
this
.
form
.
specialShopId
=
thisNodes
.
data
.
id
;
if
(
thisNodes
&&
thisNodes
.
data
)
{
this
.
form
.
specialShopCode
=
thisNodes
.
data
.
code
;
const
{
data
}
=
thisNodes
;
this
.
form
.
specialShopId
=
data
.
id
;
this
.
form
.
specialShopCode
=
data
.
code
;
this
.
form
.
specialShopName
=
data
.
label
;
}
})
}
}
},
},
updateFence
(){
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