Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
199ae380
Commit
199ae380
authored
Feb 22, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
8937ab8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
addEditVehicle.vue
src/components/busManagement/BookAcar/addEditVehicle.vue
+23
-7
No files found.
src/components/busManagement/BookAcar/addEditVehicle.vue
View file @
199ae380
...
...
@@ -579,7 +579,8 @@
// 删除
deleteLine
(
index
){
this
.
msg
.
details
.
splice
(
index
,
1
)
this
.
msg
.
details
.
UseDayNum
=
this
.
msg
.
details
.
length
console
.
log
(
this
.
msg
.
details
.
length
,
'==-----'
)
this
.
msg
.
UseDayNum
=
this
.
msg
.
details
.
length
},
// 获取车型座位数
getBusType
(){
...
...
@@ -597,12 +598,10 @@
checkInteger
()
{
let
that
=
this
if
(
this
.
msg
.
UseDayNum
<
this
.
msg
.
details
.
length
){
console
.
log
(
this
.
msg
.
details
.
length
-
this
.
msg
.
UseDayNum
)
for
(
let
i
=
0
;
i
<
(
this
.
msg
.
details
.
length
-
this
.
msg
.
UseDayNum
);
i
++
){
this
.
msg
.
details
.
splice
(
this
.
msg
.
details
.
length
-
1
,
1
)
}
}
else
{
this
.
msg
.
details
=
[]
let
details2
=
[]
let
timelist
=
[]
if
(
this
.
msg
.
UseDayNum
&&
this
.
msg
.
UseDayNum
>
0
)
{
...
...
@@ -611,16 +610,33 @@
timelist
=
this
.
getDiffDate
(
this
.
msg
.
StartDate
,
list
)
if
(
timelist
&&
timelist
.
length
>
0
)
{
timelist
.
forEach
((
item
,
i
)
=>
{
details2
.
push
(
{
let
dataObj
=
{
DayNum
:
i
+
1
,
UseDate
:
item
,
//日期
UseType
:
''
,
//用车类型(接口返下拉列表)
// UseTime: '',//接送机时间
TripInfo
:
''
,
//行程信息
})
}
details2
.
push
(
dataObj
)
if
(
this
.
msg
.
details
&&
this
.
msg
.
details
.
length
==
0
){
this
.
msg
.
details
=
[]
this
.
msg
.
details
=
JSON
.
parse
(
JSON
.
stringify
(
details2
))
}
else
{
let
UseDateArr
=
this
.
msg
.
details
.
map
(
x
=>
{
return
x
.
UseDate
})
if
(
UseDateArr
.
indexOf
(
item
)
==-
1
){
this
.
msg
.
details
.
push
(
dataObj
)
this
.
msg
.
details
.
sort
((
a
,
b
)
=>
{
let
obj1
=
a
[
'UseDate'
]
let
obj2
=
b
[
'UseDate'
]
const
val1
=
Math
.
floor
(
new
Date
(
obj1
).
getTime
()
/
1000
)
const
val2
=
Math
.
floor
(
new
Date
(
obj2
).
getTime
()
/
1000
)
return
val1
-
val2
})
}
}
})
this
.
msg
.
details
=
JSON
.
parse
(
JSON
.
stringify
(
details2
))
}
}
...
...
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