Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
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
pseer
gxpt_wechat
Commits
68c98580
Commit
68c98580
authored
Nov 27, 2023
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
9fdb18d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
order.vue
pages/order/order.vue
+23
-22
No files found.
pages/order/order.vue
View file @
68c98580
...
...
@@ -546,34 +546,35 @@
this
.
duration
=
Number
(
this
.
distanceMode
[
this
.
distanceIndex
].
duration
);
}
}
this
.
dateIntervalList
=
res
.
data
.
data
.
map
((
item
,
index
)
=>
{
// 设置可预定的开始时间
if
(
item
.
status
==
1
&&
moment
(
item
.
endHoldTime
).
format
(
"mm"
)
<
59
){
this
.
setStartTime
.
startTime
=
moment
(
item
.
endHoldTime
).
format
(
"HH:mm"
);
this
.
setStartTime
.
status
=
true
;
return
{
...
item
,
hour
:
index
>
0
&&
index
-
24
==
0
?
'次日'
:
index
>
24
?
index
-
24
:
index
}
if
(
item
.
status
===
0
&&
!
this
.
setStartTime
.
status
){
this
.
setStartTime
.
startTime
=
`
${
index
}
:00`
;
})
this
.
dateIntervalList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
moment
(
item
.
endHoldTime
).
format
(
"mm"
)
<
59
){
this
.
setStartTime
.
startTime
=
moment
(
item
.
endHoldTime
).
format
(
"HH:mm"
);
this
.
setStartTime
.
duration
=
0
;
this
.
setStartTime
.
status
=
true
;
}
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
status
){
this
.
setStartTime
.
duration
+=
1
;
}
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
>
0
&&
this
.
setStartTime
.
duration
<
this
.
duration
){
this
.
setStartTime
.
status
=
false
;
}
else
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
moment
(
item
.
endHoldTime
).
format
(
"mm"
)
>=
59
){
this
.
setStartTime
.
duration
=
0
;
}
else
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
duration
>=
this
.
duration
&&
moment
(
this
.
setStartTime
.
startTime
).
format
(
"mm"
)
<
moment
(
item
.
startHoldTime
).
format
(
"mm"
)){
this
.
setStartTime
.
status
=
false
;
}
else
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
status
&&
this
.
setStartTime
.
duration
===
this
.
duration
&&
moment
(
this
.
setStartTime
.
startTime
).
format
(
"mm"
)
<
moment
(
item
.
startHoldTime
).
format
(
"mm"
)){
this
.
startTime
=
this
.
setStartTime
.
startTime
;
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
>=
this
.
duration
){
this
.
setStartTime
.
duration
+=
1
;
}
else
if
(
item
.
status
==
1
&&
this
.
setStartTime
.
status
&&
this
.
setStartTime
.
duration
===
this
.
duration
&&
moment
(
this
.
setStartTime
.
startTime
).
format
(
"mm"
)
>=
moment
(
item
.
startHoldTime
).
format
(
"mm"
)){
this
.
setStartTime
.
duration
=
0
;
this
.
setStartTime
.
status
=
false
;
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
===
0
&&
!
this
.
setStartTime
.
status
){
this
.
setStartTime
.
duration
+=
1
;
this
.
setStartTime
.
startTime
=
`
${
index
}
:00`
;
this
.
setStartTime
.
status
=
true
;
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
>
0
&&
this
.
setStartTime
.
duration
<
this
.
duration
&&
this
.
setStartTime
.
status
){
this
.
setStartTime
.
duration
+=
1
;
}
else
if
(
item
.
status
===
0
&&
this
.
setStartTime
.
duration
==
this
.
duration
&&
this
.
setStartTime
.
status
){
this
.
startTime
=
this
.
setStartTime
.
startTime
;
}
return
{
...
item
,
hour
:
index
>
0
&&
index
-
24
==
0
?
'次日'
:
index
>
24
?
index
-
24
:
index
this
.
setStartTime
.
duration
+=
1
;
}
})
this
.
onSetEndTime
()
...
...
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