Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
web
soss
Commits
2f359b85
Commit
2f359b85
authored
Aug 05, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改店铺最远距离
parent
f3069ff7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
src/views/shop/shop/components/addShop.vue
+28
-11
No files found.
src/views/shop/shop/components/addShop.vue
View file @
2f359b85
...
...
@@ -27,16 +27,25 @@
<el-form-item
label=
"详细地址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入详细地址"
/>
</el-form-item>
<el-form-item
label=
"营业时间"
prop=
"time"
>
<el-time-picker
is-range
v-model=
"form.time"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
format=
"HH:mm"
value-format=
"HH:mm"
>
</el-time-picker>
</el-form-item>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"营业时间"
prop=
"time"
>
<el-time-picker
is-range
v-model=
"form.time"
range-separator=
"至"
start-placeholder=
"开始时间"
end-placeholder=
"结束时间"
placeholder=
"选择时间范围"
format=
"HH:mm"
value-format=
"HH:mm"
>
</el-time-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"最远下单距离"
>
<el-input
v-model=
"form.distanceLimit"
placeholder=
"请输入最远下单距离单位:km"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
...
...
@@ -109,6 +118,13 @@ export default {
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
var
regular
=
/
(
^
[
+
]{0,1}([
0-9
]
+
)
$
)
|
(
^
[
+
]{0,1}([
0-9
]
+
)[\.]{1,3}[
0-9
]{1,3}
$
)
/
;
if
(
this
.
form
.
distanceLimit
!=
""
&&
this
.
form
.
distanceLimit
!=
null
){
if
(
!
regular
.
test
(
this
.
form
.
distanceLimit
)){
this
.
$message
.
error
(
"最远下单距离最多输入3位小数"
);
return
;
}
}
const
{
time
,
province
,
...
surplus
}
=
this
.
form
surplus
.
startTime
=
time
[
0
]
surplus
.
endTime
=
time
[
1
]
...
...
@@ -150,7 +166,8 @@ export default {
city
:
null
,
zone
:
null
,
state
:
null
,
time
:
null
time
:
null
,
distanceLimit
:
null
,
};
this
.
resetForm
(
"form"
);
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment