Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
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
zhengke
jz_Travel
Commits
5225039d
Commit
5225039d
authored
Jun 15, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
包车修改
parent
1876351a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2011 additions
and
48 deletions
+2011
-48
pages.json
pages.json
+2
-0
bookaCarList.vue
pages/guidecar/bookaCarList.vue
+79
-26
Calendar.vue
pages/guidecar/components/Calendar.vue
+1
-1
index.vue
pages/guidecar/components/time/index.vue
+669
-0
index.vue
pages/guidecar/index.vue
+123
-8
returncarList.vue
pages/guidecar/returncarList.vue
+1050
-0
specialCarReserve.vue
pages/guidecar/specialCarReserve.vue
+87
-13
No files found.
pages.json
View file @
5225039d
...
@@ -362,6 +362,8 @@
...
@@ -362,6 +362,8 @@
"path"
:
"pickcarcity2"
//出发和到达选择的地址
"path"
:
"pickcarcity2"
//出发和到达选择的地址
},{
},{
"path"
:
"bookaCarList"
//定制车页面
"path"
:
"bookaCarList"
//定制车页面
},{
"path"
:
"returncarList"
//定制车返程
},{
},{
"path"
:
"orderList"
"path"
:
"orderList"
},{
},{
...
...
pages/guidecar/bookaCarList.vue
View file @
5225039d
...
@@ -16,14 +16,14 @@
...
@@ -16,14 +16,14 @@
.box-top
{
.box-top
{
width
:
100%
;
width
:
100%
;
height
:
5
0px
;
height
:
6
0px
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
padding
:
0
15px
;
padding
:
0
15px
;
.box-top-b
{
.box-top-b
{
width
:
100%
;
width
:
100%
;
height
:
4
5px
;
height
:
5
5px
;
background
:
#ECF1F4
;
background
:
#ECF1F4
;
border-radius
:
23px
;
border-radius
:
23px
;
display
:
flex
;
display
:
flex
;
...
@@ -321,16 +321,19 @@
...
@@ -321,16 +321,19 @@
<view
class=
"box-top-b-l"
>
<view
class=
"box-top-b-l"
>
{{
carMsg
.
StartCityName
}}
{{
carMsg
.
StartCityName
}}
</view>
</view>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zhuanghuan.png"
mode=
"aspectFill"
style=
"width: 20px;height: 20px;"
></image>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/gocar.png"
mode=
"aspectFill"
style=
"width: 18px;height: 18px;"
></image>
<span
style=
'margin-top: 3px;font-size: 10px;color:#1B1D1E ;'
>
去程
</span>
</view>
<view
class=
"box-top-b-l"
>
<view
class=
"box-top-b-l"
>
{{
carMsg
.
ArriveCityName
}}
{{
carMsg
.
ArriveCityName
}}
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"box-rili"
>
<view
class=
"box-rili"
>
<view
class=
"box-rili-scroll"
>
<view
class=
"box-rili-scroll"
v-if=
"carMsg.returnId==1"
>
<scroll-view
:scroll-x=
'true'
style=
"width: 100%;"
@
scroll=
'getscroll'
:scroll-left=
"scrollleft"
>
<scroll-view
:scroll-x=
'true'
style=
"width: 100%;"
@
scroll=
'getscroll'
:scroll-left=
"scrollleft"
>
<view
style=
"display: flex;align-items: center;"
>
<view
style=
"display: flex;align-items: center;"
>
<view
class=
"box-rili-item"
:class=
"
{'box-rili-item2':msg.Q_Date == x.date}"
<view
class=
"box-rili-item"
:class=
"
{'box-rili-item2':msg.Q_Date == x.date}"
...
@@ -342,6 +345,18 @@
...
@@ -342,6 +345,18 @@
</scroll-view>
</scroll-view>
</view>
</view>
<view
class=
"box-rili-scroll"
v-if=
"carMsg.returnId==2"
>
<scroll-view
:scroll-x=
'true'
style=
"width: 100%;"
@
scroll=
'getscroll'
:scroll-left=
"scrollleft"
>
<view
style=
"display: flex;align-items: center;"
>
<view
class=
"box-rili-item"
:style=
"
{'color':x.show==true
&&
msg.Q_Date != x.date? '#111111':'#e2e2e2'}" :class="{'box-rili-item2':msg.Q_Date == x.date}"
v-for="(x,y) in topdateList" :key='y' @click="choicedatelist(x)">
<span
style=
'width: 50px;display: inline-block;text-align: center;'
>
{{
x
.
showdate
}}
</span>
<span>
{{
x
.
week
}}
</span>
</view>
</view>
</scroll-view>
</view>
<view
class=
"porili"
@
click=
"showcalendar = true"
>
<view
class=
"porili"
@
click=
"showcalendar = true"
>
<image
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dingcherilitubiao.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dingcherilitubiao.png"
...
@@ -355,7 +370,7 @@
...
@@ -355,7 +370,7 @@
<span
style=
'margin-top: 20px;'
>
真遗憾,没有相关数据
</span>
<span
style=
'margin-top: 20px;'
>
真遗憾,没有相关数据
</span>
</view>
</view>
<view
style=
"height: calc(100% - 1
3
0px);"
v-if=
"g.length > 0"
>
<view
style=
"height: calc(100% - 1
4
0px);"
v-if=
"g.length > 0"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%;width: 100%"
>
style=
"height: 100%;width: 100%"
>
<view
style=
"padding: 0 15px;"
>
<view
style=
"padding: 0 15px;"
>
...
@@ -437,7 +452,7 @@
...
@@ -437,7 +452,7 @@
</view>
</view>
</view>
</view>
<view
class=
"s-b-box-r"
v-if=
"x.ProductState==1"
@
click=
"yuding(x)"
>
<view
class=
"s-b-box-r"
v-if=
"x.ProductState==1"
@
click=
"yuding(x)"
>
预定
{{
carMsg
.
returnId
==
1
?
'预定'
:
'选定'
}}
</view>
</view>
</view>
</view>
...
@@ -470,7 +485,7 @@
...
@@ -470,7 +485,7 @@
</view>
</view>
</view>
</view>
<view
class=
"mask"
v-if=
"showcalendar"
></view>
<view
class=
"mask"
v-if=
"showcalendar"
></view>
<calendar
:is-show=
"showcalendar"
:start-date=
'msg.Q_Date'
@
callback=
"getDate"
@
closeback=
'getclose'
<calendar
:is-show=
"showcalendar"
:start-date=
'msg.Q_Date'
@
callback=
"getDate"
@
closeback=
'getclose'
:between-start=
'betweenStart'
:between-end=
'betweenEnd'
:init-month=
'3'
/>
:init-month=
'3'
/>
<u-popup
v-model=
"screenshow"
mode=
'bottom'
ref=
"onlyhover"
>
<u-popup
v-model=
"screenshow"
mode=
'bottom'
ref=
"onlyhover"
>
<view
class=
"popup-box"
>
<view
class=
"popup-box"
>
...
@@ -554,6 +569,7 @@
...
@@ -554,6 +569,7 @@
status
:
"loadmore"
,
status
:
"loadmore"
,
g
:
[],
g
:
[],
topdateList
:
[],
topdateList
:
[],
xuandateList
:[],
DepartList
:
[],
//出发点数组
DepartList
:
[],
//出发点数组
ArriveList
:
[],
//到达点数组
ArriveList
:
[],
//到达点数组
alltime
:
[],
//时间数组
alltime
:
[],
//时间数组
...
@@ -573,7 +589,9 @@
...
@@ -573,7 +589,9 @@
},
},
scrollleft
:
0
,
scrollleft
:
0
,
carMsgobj
:
''
,
carMsgobj
:
''
,
Up
:
0
Up
:
0
,
betweenStart
:
''
,
//日期可选开始
betweenEnd
:
''
,
//日期可选结束
}
}
...
@@ -584,7 +602,7 @@
...
@@ -584,7 +602,7 @@
//对象解码
//对象解码
this
.
carMsg
=
JSON
.
parse
(
decodeURIComponent
(
options
.
carMsg
))
this
.
carMsg
=
JSON
.
parse
(
decodeURIComponent
(
options
.
carMsg
))
this
.
carMsgobj
=
options
.
carMsg
;
//保存原始的用于分享
this
.
carMsgobj
=
options
.
carMsg
;
//保存原始的用于分享
console
.
log
(
this
.
carMsg
)
this
.
msg
.
StartCityId
=
this
.
carMsg
.
StartCityId
;
this
.
msg
.
StartCityId
=
this
.
carMsg
.
StartCityId
;
this
.
msg
.
StartCityType
=
this
.
carMsg
.
StartCityType
;
this
.
msg
.
StartCityType
=
this
.
carMsg
.
StartCityType
;
this
.
msg
.
ArriveCityId
=
this
.
carMsg
.
ArriveCityId
;
this
.
msg
.
ArriveCityId
=
this
.
carMsg
.
ArriveCityId
;
...
@@ -603,7 +621,6 @@
...
@@ -603,7 +621,6 @@
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
scrollleft
=
0
this
.
scrollleft
=
0
});
});
console
.
log
(
options
)
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
gettimeList
()
this
.
gettimeList
()
this
.
init
();
this
.
init
();
...
@@ -665,10 +682,19 @@
...
@@ -665,10 +682,19 @@
};
};
this
.
showAuth
=
true
;
this
.
showAuth
=
true
;
}
else
{
}
else
{
if
(
this
.
carMsg
.
returnId
==
1
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/guidecar/specialCarReserve?Id='
+
x
.
Id
+
'&Date='
+
this
.
msg
.
Q_Date
url
:
'/pages/guidecar/specialCarReserve?Id='
+
x
.
Id
+
'&Date='
+
this
.
msg
.
Q_Date
})
})
}
else
{
this
.
carMsg
.
Q_Date
=
this
.
msg
.
Q_Date
let
obj
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
carMsg
))
let
data
=
encodeURIComponent
(
JSON
.
stringify
(
x
))
uni
.
navigateTo
({
url
:
'/pages/guidecar/returncarList?carMsg='
+
obj
+
'&data='
+
data
})
}
}
}
},
},
...
@@ -689,6 +715,19 @@
...
@@ -689,6 +715,19 @@
let
nowtime
=
date1
.
getFullYear
()
+
"-"
+
(
date1
.
getMonth
()
+
1
)
+
"-"
+
date1
.
getDate
();
let
nowtime
=
date1
.
getFullYear
()
+
"-"
+
(
date1
.
getMonth
()
+
1
)
+
"-"
+
date1
.
getDate
();
let
htime
=
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
();
let
htime
=
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
();
this
.
topdateList
=
this
.
getDayAll
(
nowtime
,
htime
)
this
.
topdateList
=
this
.
getDayAll
(
nowtime
,
htime
)
this
.
betweenStart
=
this
.
carMsg
.
Q_Date
;
this
.
betweenEnd
=
this
.
carMsg
.
F_Date
;
if
(
this
.
carMsg
.
returnId
==
2
){
this
.
xuandateList
=
this
.
getDayAll
(
this
.
carMsg
.
Q_Date
,
this
.
carMsg
.
F_Date
)
this
.
topdateList
.
forEach
((
x
)
=>
{
this
.
xuandateList
.
map
(
j
=>
{
if
(
x
.
date
==
j
.
date
){
x
.
show
=
true
;
return
}
})
})
}
this
.
startDate
=
nowtime
;
this
.
startDate
=
nowtime
;
this
.
getscollwz
()
this
.
getscollwz
()
...
@@ -727,7 +766,8 @@
...
@@ -727,7 +766,8 @@
let
obj
=
{
let
obj
=
{
showdate
:
mouth
+
'/'
+
day
,
showdate
:
mouth
+
'/'
+
day
,
date
:
YYMMDD
,
date
:
YYMMDD
,
week
:
week
week
:
week
,
show
:
false
}
}
dates
.
push
(
obj
)
dates
.
push
(
obj
)
}
}
...
@@ -767,7 +807,7 @@
...
@@ -767,7 +807,7 @@
this
.
topdateList
.
map
((
x
,
i
)
=>
{
this
.
topdateList
.
map
((
x
,
i
)
=>
{
if
(
x
.
date
==
this
.
msg
.
Q_Date
){
if
(
x
.
date
==
this
.
msg
.
Q_Date
){
index
=
i
;
index
=
i
;
console
.
log
(
index
)
return
return
}
}
})
})
...
@@ -803,7 +843,20 @@
...
@@ -803,7 +843,20 @@
}
}
},
},
choicedatelist
(
x
)
{
choicedatelist
(
x
)
{
if
(
this
.
carMsg
.
returnId
==
1
){
this
.
msg
.
Q_Date
=
x
.
date
;
this
.
msg
.
Q_Date
=
x
.
date
;
}
else
{
if
(
x
.
show
==
false
){
uni
.
showToast
({
title
:
'不在往返时间内'
,
icon
:
'none'
})
return
}
else
{
this
.
msg
.
Q_Date
=
x
.
date
;
}
}
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
g
=
[];
this
.
init
()
this
.
init
()
...
...
pages/guidecar/components/Calendar.vue
View file @
5225039d
...
@@ -457,7 +457,7 @@ export default {
...
@@ -457,7 +457,7 @@ export default {
width:100%;
width:100%;
height:100%;
height:100%;
left:0;
left:0;
top:1
13
px;
top:1
22
px;
z-index: 900;
z-index: 900;
}
}
.sjx{
.sjx{
...
...
pages/guidecar/components/time/index.vue
0 → 100644
View file @
5225039d
<
template
>
<view
class=
"content"
>
<scroll-view
:scroll-y=
"true"
style=
"height: 100%;"
>
<view
class=
"header"
>
<view
style=
"font-size: 32rpx;color:#111;text-align: center;padding:30rpx 0;"
>
<text>
选择日期
</text>
</view>
<view
class=
"week"
>
<view>
日
</view>
<view>
一
</view>
<view>
二
</view>
<view>
三
</view>
<view>
四
</view>
<view>
五
</view>
<view>
六
</view>
</view>
</view>
<view
class=
"section"
>
<view
v-for=
"(res, line) in resDate"
class=
"item"
:key=
"line"
>
<view
class=
"year"
>
{{
res
.
year
}}
年
{{
res
.
month
}}
月
</view>
<view
class=
"day"
>
<view
v-for=
"week in res.oneDayWeek"
class=
"day-list"
:style=
"
{ width: (dayWidth - 10) / 7 + 'px' }">
</view>
<view
@
tap=
"selectDay(line, index,(line+1).toString()+index)"
v-for=
"(item, index) in res.day"
:key=
"index"
class=
"day-list"
:class=
"[
line == start[0] && index == start[1] ? 'bg-orange select-style' : '',
(line >= start[0] && line
<
=
end
[
0
]
&&
index
>
start[1]
&&
index
<
end
[
1
])
||
(
line
>
= start[0]
&&
index > start[1]
&&
line
<
end
[
0
])
||
(
line
<
=
end
[
0
]
&&
index
<
end
[
1
]
&&
line
>
start[0]) || (line
<
end
[
0
]
&&
line
>
start[0]) ? 'bg-higlt-orange' : '',
line == 0
&&
index + 1
<
nowDay
?
'
time-out
'
:
'',
isNaN
(
item
)
?
'
is-festival
'
:
'',
(
isNaN
(
item
)
&&
line =
=
start
[
0
]
&&
index =
=
start
[
1
])
||
(
isNaN
(
item
)
&&
line =
=
end
[
0
]
&&
index =
=
end
[
1
])
?
'
not-festival
'
:
'',
(
priceStauts
.
length
>
0
&&
priceStauts[line][index]
<0
&&
start
.
length
>
0
&&
end.length>0) ||(priceStauts.length > 0
&&
priceStauts[line][index]
<0
&&
start
.
length=
=0
&&
end
.
length=
=0)?'not-sub'
:
'',
priceStauts
.
length
>
0
&&
end.length==0
&&
start.length>0
&&
priceStauts[line][index]
<0
&&
line
+
index
*
2
!=
lastNot
[
0
]+
lastNot
[
1
]*
2
?
'
not-sub
'
:
'',
]"
:style=
"
{ width: (dayWidth - 10) / 7 + 'px',borderRadius:line == end[0]
&&
index == end[1]?'0px 6px 6px 0px':'',backgroundColor:line == end[0]
&&
index == end[1]?'#111':'',color:line == end[0]
&&
index == end[1]?'#FFFFFF':''}">
<view
style=
"padding-top:2px;padding-bottom:2px;"
>
{{
item
}}
</view>
<view
class=
"select-style"
v-if=
"line == start[0] && index == start[1]"
>
去程
</view>
<view
class=
"select-style"
v-if=
"line == end[0] && index == end[1]"
>
往返
</view>
</view>
</view>
</view>
</view>
<view
class=
"submit"
>
<button
class=
"sub-btn"
:disabled=
"!isSub"
@
click=
"submit"
>
<text
v-if=
"isSub"
>
确定
</text>
<text
v-if=
"!isSub"
>
请选择往返日期
</text>
</button>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
//引入节假日的数据,也可以用后台返回去渲染
import
json
from
'../../../hotel/components/time/day.js'
;
export
default
{
computed
:
{
//房间是否能预订
isSub
()
{
if
(
this
.
priceStauts
.
length
>
0
)
{
for
(
var
i
=
this
.
start
[
0
];
i
<=
this
.
end
[
0
];
i
++
)
{
if
(
i
==
this
.
start
[
0
])
{
for
(
var
j
=
this
.
start
[
1
];
j
<
this
.
date
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
return
false
}
}
else
if
(
this
.
end
[
0
]
==
this
.
start
[
0
])
{
for
(
var
j
=
this
.
start
[
1
];
j
<
this
.
end
[
1
];
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
return
false
}
}
else
if
(
i
==
this
.
end
[
0
])
{
for
(
var
j
=
0
;
j
<
this
.
end
[
1
];
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
return
false
}
}
else
{
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
return
false
}
}
}
}
return
this
.
start
.
length
==
2
&&
this
.
end
.
length
==
2
?
true
:
false
},
//计算日历里的节假日
resDate
()
{
if
(
this
.
date
.
length
==
0
)
return
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
this
.
festival
.
length
;
j
++
)
{
if
(
this
.
festival
[
j
].
year
==
this
.
date
[
i
].
year
&&
this
.
festival
[
j
].
month
==
this
.
date
[
i
].
month
)
{
for
(
var
k
=
0
;
k
<
this
.
festival
[
j
].
festival
.
length
;
k
++
)
{
if
(
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)
!=
-
1
)
{
this
.
date
[
i
].
day
[
this
.
date
[
i
].
day
.
indexOf
(
this
.
festival
[
j
].
festival
[
k
].
day
)]
=
this
.
festival
[
j
].
festival
[
k
].
name
;
}
}
}
}
}
return
this
.
date
;
}
},
data
()
{
return
{
out
:
0
,
festival
:
json
,
//节假日
type
:
'-'
,
//日期分隔符
date
:
[],
//日期数组对象
dayWidth
:
0
,
//日期的宽度
nowDay
:
0
,
//当前时间的日
start
:
[],
//入住时间
count
:
6
,
//显示月的数量
startDay
:
''
,
//入住日期
startWeek
:
''
,
//入住时间的周几
end
:
[],
//离开时间
endDay
:
''
,
//离开日期
endWeek
:
''
,
//离开时间的周几
day
:
0
,
//多少晚
priceStauts
:
[],
//价格状态
lastNot
:
[
0
,
10
]
//前置的无房操作
};
},
mounted
()
{
console
.
log
(
"进入了...."
)
uni
.
getSystemInfo
({
success
:
res
=>
{
this
.
dayWidth
=
res
.
windowWidth
;
}
});
this
.
setDate
();
this
.
nowDay
=
new
Date
().
getDate
();
/*默认入住离店日期,今日入住明日离店,此处应在setDefaultDate函数内传入vuex里保存的日期进行默认操作
*不推荐使用本地缓存,下边只是使用缓存的示例
*/
this
.
start
=
this
.
setDefaultDate
(
this
.
getDefaultDate
(
0
));
this
.
end
=
this
.
setDefaultDate
(
this
.
getDefaultDate
(
1
));
// uni.getStorage({
// key: 'returnTime',
// success: (res) => {
// console.log(res)
// if (res && res.data) {
// var obj = JSON.parse(res.data)
// this.start = this.setDefaultDate(obj.start);
// this.end = this.setDefaultDate(obj.end);
// }
// },
// fail: () => {
// this.start = this.setDefaultDate(this.getDefaultDate(0));
// this.end = this.setDefaultDate(this.getDefaultDate(1));
// }
// })
//如果需要日期的价格,-1为无房,其他价格代表正常
// if (option && option.request) {
// uni.request({
// url: 'http://api.tcdbp.com', //当需要日历价格的时候请求的后台接口地址
// method: 'GET',
// data: {
// count: this.count //获取几个月分的数据
// },
// success: res => {
// if (res.data.status != 1) {
// return uni.showToast({
// title: res.data.message,
// icon: 'none',
// mask: true
// });
// }
// this.priceStauts = res.data.data;
// },
// fail: () => {
// uni.showToast({
// title: '网络错误请稍后再试',
// icon: 'none',
// mask: true
// });
// }
// });
// }
},
watch
:
{
//离店日期
end
(
newVal
)
{
if
(
this
.
end
.
length
!=
0
)
{
//计算选择离店日期
this
.
endDay
=
this
.
setMonth
(
newVal
[
0
])
+
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
+
'日'
;
this
.
endWeek
=
this
.
getWeek
(
this
.
date
[
newVal
[
0
]].
year
+
'/'
+
this
.
date
[
newVal
[
0
]].
month
+
'/'
+
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
]));
//计算天数
var
startDay
=
this
.
date
[
this
.
start
[
0
]].
year
+
'/'
+
this
.
date
[
this
.
start
[
0
]].
month
+
'/'
+
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
]);
var
endDay
=
this
.
date
[
newVal
[
0
]].
year
+
'/'
+
this
.
date
[
newVal
[
0
]].
month
+
'/'
+
this
.
isFestival
(
this
.
end
[
0
],
this
.
end
[
1
]);
this
.
day
=
this
.
getDay
(
startDay
,
endDay
);
}
else
{
this
.
day
=
0
;
}
},
//入住日期
start
(
newVal
)
{
if
(
this
.
start
.
length
>
0
)
{
this
.
startDay
=
this
.
setMonth
(
newVal
[
0
])
+
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
])
+
'日'
;
this
.
startWeek
=
this
.
getWeek
(
this
.
date
[
newVal
[
0
]].
year
+
'/'
+
this
.
date
[
newVal
[
0
]].
month
+
'/'
+
this
.
isFestival
(
newVal
[
0
],
newVal
[
1
]));
}
if
(
this
.
priceStauts
.
length
>
0
)
{
console
.
log
(
this
.
lastNot
)
for
(
var
i
=
newVal
[
0
];
i
<
this
.
priceStauts
.
length
;
i
++
)
{
if
(
i
==
newVal
[
0
])
{
for
(
var
j
=
newVal
[
1
];
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
this
.
lastNot
=
[
i
,
j
]
console
.
log
(
this
.
lastNot
)
return
}
}
}
else
{
for
(
var
j
=
0
;
j
<
this
.
priceStauts
[
i
].
length
;
j
++
)
{
if
(
this
.
priceStauts
[
i
][
j
]
==
-
1
)
{
this
.
lastNot
=
[
i
,
j
];
console
.
log
(
this
.
lastNot
)
return
}
}
}
}
//清空
this
.
lastNot
=
[]
}
}
},
methods
:
{
//月份补零
setMonth
(
dateIndex
)
{
let
month
=
this
.
date
[
dateIndex
].
month
;
if
(
month
<
10
)
{
month
=
'0'
+
month
;
}
return
month
+
'月'
;
},
//如果是节假日名称则返回选择的日期天数
isFestival
(
line
,
index
,
push
=
false
)
{
var
date
=
this
.
date
[
line
].
day
[
index
];
if
(
isNaN
(
date
))
{
var
newIndex
=
this
.
date
[
line
].
day
.
indexOf
(
date
)
+
1
;
if
(
push
)
return
newIndex
;
return
newIndex
<
10
?
'0'
+
newIndex
:
newIndex
;
}
else
{
if
(
push
)
return
date
;
return
date
<
10
?
'0'
+
date
:
date
;
}
},
//获取今天明天的日期
getDefaultDate
(
AddDayCount
)
{
var
dd
=
new
Date
();
dd
.
setDate
(
dd
.
getDate
()
+
AddDayCount
);
//获取AddDayCount天后的日期
var
year
=
dd
.
getFullYear
();
var
mon
=
dd
.
getMonth
()
+
1
;
//获取当前月份的日期
var
day
=
dd
.
getDate
();
return
year
+
'-'
+
mon
+
'-'
+
day
;
},
//设置入住时间 如果没有传值则根据默认值设置
setDefaultDate
(
data
)
{
var
arr
=
[
0
,
parseInt
(
this
.
nowDay
-
1
)];
var
start
=
data
.
indexOf
(
'-'
)
!=
-
1
?
data
.
split
(
'-'
)
:
data
.
split
(
'/'
);
var
year
=
new
Date
().
getFullYear
();
var
month
=
new
Date
().
getMonth
()
+
1
;
for
(
var
i
=
0
;
i
<
this
.
date
.
length
;
i
++
)
{
if
(
this
.
date
[
i
].
year
==
start
[
0
]
&&
this
.
date
[
i
].
month
==
start
[
1
])
{
if
(
year
==
start
[
0
]
&&
month
==
start
[
1
]
&&
start
[
2
]
<
this
.
nowDay
)
{
arr
=
[
i
,
parseInt
(
this
.
nowDay
-
1
)];
}
else
{
arr
=
[
i
,
parseInt
(
start
[
2
]
-
1
)];
}
break
;
}
}
return
arr
;
},
//清空
reset
()
{
this
.
start
=
[];
this
.
end
=
[];
this
.
day
=
0
;
},
//补零操作
setPull
(
day
)
{
if
(
day
<
10
)
{
day
=
'0'
+
day
;
}
return
day
},
//计算天数
getDay
(
date1
,
date2
)
{
//获得天数
//date1:开始日期,date2结束日期
var
a1
=
Date
.
parse
(
new
Date
(
date1
));
var
a2
=
Date
.
parse
(
new
Date
(
date2
));
var
day
=
parseInt
((
a2
-
a1
)
/
(
1000
*
60
*
60
*
24
));
//核心:时间戳相减,然后除以天数
return
day
;
},
//计算周几
getWeek
(
date
)
{
var
weekDay
=
[
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
];
var
myDate
=
new
Date
(
Date
.
parse
(
date
));
return
weekDay
[
myDate
.
getDay
()];
},
//选择入住离开
selectDay
(
line
,
index
)
{
if
(
line
==
0
&&
index
+
1
<
this
.
nowDay
)
return
;
//如果没有入住时间
if
(
this
.
start
.
length
==
0
)
{
//填充入住时间
this
.
start
=
[
line
,
index
];
}
else
if
(
this
.
start
.
length
>
0
&&
this
.
start
[
0
]
==
line
&&
this
.
start
[
1
]
==
index
&&
this
.
end
.
length
==
0
)
{
// console.log('点击重复日期')
this
.
end
=
[
line
,
index
];
return
;
}
else
{
//如果没有离开时间
if
(
this
.
end
.
length
==
0
)
{
//如果有价格和入住离开情况则需要进行判断所选的离店时间时候包含无房日期
if
(
line
<
this
.
start
[
0
]
||
(
line
==
this
.
start
[
0
]
&&
index
<
this
.
start
[
1
]))
{
this
.
end
=
this
.
start
;
this
.
start
=
[
line
,
index
];
}
else
{
//如果离开时间比入住时间晚则填充
this
.
end
=
[
line
,
index
];
}
}
else
{
//如果有离开时间则清空离开时间重新填充入住时间
this
.
start
=
[
line
,
index
];
this
.
end
=
[];
}
}
},
//设置日历
setDate
()
{
//年份
var
year
=
new
Date
().
getFullYear
();
//月份
var
month
=
new
Date
().
getMonth
();
console
.
log
(
"执行了..."
)
for
(
let
i
=
0
;
i
<
this
.
count
;
i
++
)
{
var
day
=
[];
var
week
=
0
;
for
(
var
j
=
0
;
j
<
new
Date
(
year
,
month
+
1
,
0
).
getDate
();
j
++
)
{
day
.
push
(
j
+
1
);
}
this
.
date
.
push
({
year
:
year
,
month
:
month
+
1
,
day
:
day
,
oneDayWeek
:
new
Date
(
Date
.
parse
(
year
+
'/'
+
(
month
+
1
)
+
'/'
+
'01'
)).
getDay
()
});
if
(
month
==
11
)
{
year
+=
1
;
month
=
0
;
}
else
{
month
++
;
}
}
return
this
.
date
;
},
//关闭
close
()
{
uni
.
navigateBack
({
delta
:
1
});
},
//确定入住离店事件提交
submit
()
{
let
startmonth
=
this
.
date
[
this
.
start
[
0
]].
month
<
10
?
'0'
+
this
.
date
[
this
.
start
[
0
]].
month
:
this
.
date
[
this
.
start
[
0
]].
month
;
let
startday
=
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
)
<
10
?
'0'
+
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
):
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
);
let
endmonth
=
this
.
date
[
this
.
end
[
0
]].
month
<
10
?
'0'
+
this
.
date
[
this
.
end
[
0
]].
month
:
this
.
date
[
this
.
end
[
0
]].
month
;
let
endday
=
this
.
isFestival
(
this
.
end
[
0
],
this
.
end
[
1
],
true
)
<
10
?
'0'
+
this
.
isFestival
(
this
.
end
[
0
],
this
.
end
[
1
],
true
):
this
.
isFestival
(
this
.
end
[
0
],
this
.
end
[
1
],
true
);
var
obj
=
{
startWeek
:
this
.
startWeek
,
endWeek
:
this
.
endWeek
,
start
:
this
.
date
[
this
.
start
[
0
]].
year
+
this
.
type
+
startmonth
+
this
.
type
+
startday
,
end
:
this
.
date
[
this
.
end
[
0
]].
year
+
this
.
type
+
endmonth
+
this
.
type
+
endday
,
startDay
:
startmonth
+
'-'
+
startday
,
endDay
:
endmonth
+
'-'
+
endday
,
day
:
this
.
day
};
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例
*/
// uni.setStorage({
// key: 'returnTime',
// data: JSON.stringify(obj)
// })
this
.
$emit
(
"finish"
,
obj
)
},
}
};
</
script
>
<
style
>
/**确认按钮**/
.submit
{
width
:
100%
;
background
:
white
;
position
:
fixed
;
bottom
:
0
upx
;
height
:
auto
;
}
.sub-btn
{
height
:
auto
;
border-radius
:
10
upx
;
background
:
#111
;
color
:
white
;
}
.content
{
height
:
100%
;
z-index
:
999
;
}
/**不能预订**/
/* 入住离开时间的color */
.bg-orange
{
background
:
#111111
!important
;
border-radius
:
6px
0px
0px
6px
!important
;
}
.bg-higlt-orange
{
background-color
:
#fff
;
}
/* 节假日的日期样式 */
.is-festival
{
font-size
:
22
rpx
!important
;
color
:
#000
!important
;
}
/** 非节假日的日期样式**/
.not-festival
{
font-size
:
18
upx
;
color
:
white
;
}
/***入住离开时间的日历样式*/
.not-sub
{
color
:
#222222
;
background
:
#dddddd
;
}
.select-out-item
{
background
:
#ffffff
;
}
.select-style
{
color
:
white
!important
;
font-size
:
20
rpx
!important
;
/* font-size: 20upx; */
/* padding-top: 4upx; */
}
.time-out
{
/* text-decoration: line-through; */
color
:
#ccc
!important
;
}
/**
* 点击日期的样式
*/
.bg
{
background
:
orange
;
}
/**
* 日期部分
*/
.section
{
width
:
100%
;
padding-bottom
:
150
upx
;
height
:
auto
;
padding-top
:
176
rpx
;
background-color
:
#F1F4F6
;
}
.section
>
.item
>
.year
{
text-align
:
center
;
height
:
50
rpx
;
font-weight
:
bold
;
/* padding-left:30upx;
padding-right: 30upx; */
font-size
:
24
rpx
;
line-height
:
50
rpx
;
color
:
#1B1D1E
;
}
.section
>
.item
>
.day
{
display
:
flex
;
flex-wrap
:
wrap
;
text-align
:
center
;
margin-left
:
5px
;
margin-right
:
5px
;
}
.section
>
.item
>
.day
>
.day-list
{
margin-top
:
30
upx
;
margin-bottom
:
30
upx
;
min-height
:
100
upx
;
max-height
:
180
upx
;
display
:
flex
;
font-size
:
26
rpx
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
color
:
#1B1D1E
;
}
/**
* 头部固定
*/
.header
{
position
:
fixed
;
top
:
0
;
width
:
100%
;
/* height: 400upx; */
background
:
white
;
box-shadow
:
0px
10
rpx
30
rpx
0px
rgba
(
36
,
36
,
36
,
0.06
);
}
.bar
{
width
:
100%
;
height
:
var
(
--status-bar-height
);
background
:
#222222
;
}
/**
* 关闭清空
*/
.set
{
height
:
100
upx
;
padding-left
:
30
upx
;
padding-right
:
30
upx
;
align-items
:
center
;
display
:
flex
;
justify-content
:
space-between
;
}
/**
* 入住离开时间
*/
.in-and-out
{
height
:
210
upx
;
padding-left
:
30
upx
;
padding-right
:
30
upx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
/**
* 入住离开的view
*/
.in-and-out
>
.item
{
display
:
flex
;
flex-direction
:
column
;
height
:
100
upx
;
}
/**
* 未选择入离时间时的文字样式
*/
.in-and-out
>
.text
{
margin-top
:
100
upx
;
font-weight
:
bold
;
font-size
:
36
upx
;
color
:
#c0c0c0
;
}
/**
* 一共选择了多少晚的样式
*/
.in-and-out
>
.item
>
.count-border
{
width
:
200
upx
;
font-size
:
28
upx
;
height
:
40
upx
;
margin-top
:
48
upx
;
text-align
:
center
;
}
.gray
{
color
:
#c0c0c0
;
border-bottom
:
1px
solid
#c0c0c0
;
}
.orange
{
color
:
orange
;
border-bottom
:
1px
solid
orange
;
}
/**
* 共多少晚
*/
.in-and-out
>
.item
>
.count-border
>
.count
{
font-size
:
10px
;
}
/**
* 周一到周日
*/
.week
{
/* height: 70upx; */
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding-left
:
25px
;
padding-right
:
25px
;
font-size
:
24
rpx
;
color
:
#1B1D1E
;
background
:
white
;
margin-bottom
:
16
rpx
;
}
.isa
{
color
:
red
;
}
.isa2
{
color
:
red
;
}
</
style
>
pages/guidecar/index.vue
View file @
5225039d
...
@@ -19,6 +19,13 @@
...
@@ -19,6 +19,13 @@
</view>
</view>
<view
v-if=
"active==1"
style=
"width: 100%;padding: 10px 0;"
>
<view
v-if=
"active==1"
style=
"width: 100%;padding: 10px 0;"
>
<view
class=
"dingzhitop"
>
<view
style=
"font-size: 11px;color: #919191;"
>
出行类型
</view>
<view
class=
"dingzhitop_r"
>
<view
class=
"dingzhitop_r_item"
@
click=
"carMsg.returnId=1"
:class=
"carMsg.returnId==1?'xuanzhong':'weixuan'"
>
单程
</view>
<view
class=
"dingzhitop_r_item"
@
click=
"carMsg.returnId=2"
:class=
"carMsg.returnId==2?'xuanzhong':'weixuan'"
style=
"margin-left: 15px;"
>
往返
</view>
</view>
</view>
<view
class=
"c_row"
v-if=
"info.IsShowDate==1"
style=
"justify-content: space-between;border-bottom: 1px solid #E2E2E2;"
>
<view
class=
"c_row"
v-if=
"info.IsShowDate==1"
style=
"justify-content: space-between;border-bottom: 1px solid #E2E2E2;"
>
<view
class=
"ac_o"
@
click=
"goaddressx(1)"
>
<view
class=
"ac_o"
@
click=
"goaddressx(1)"
>
<span
class=
'ac_o_h'
v-if=
"carMsg.StartCityName =='' "
>
出发地
</span>
<span
class=
'ac_o_h'
v-if=
"carMsg.StartCityName =='' "
>
出发地
</span>
...
@@ -32,15 +39,31 @@
...
@@ -32,15 +39,31 @@
<span
class=
'ztext2'
v-else
>
{{
carMsg
.
ArriveCityName
}}
</span>
<span
class=
'ztext2'
v-else
>
{{
carMsg
.
ArriveCityName
}}
</span>
</view>
</view>
</view>
</view>
<view
style=
"width: 100%;color: #919191;font-size: 11px;height: 30px;line-height: 30px;border: none;"
>
<view
style=
"width: 100%;color: #919191;font-size: 11px;height: 30px;line-height: 30px;border: none;"
v-if=
'carMsg.returnId==1'
>
时间
时间
</view>
</view>
<view
style=
"width: 100%;height: 50px;display: flex;align-items: center;border-bottom: 1px solid #E2E2E2;font-size: 14px;color: #1B1D1E;font-weight: 800;"
>
<view
v-if=
'carMsg.returnId==1'
style=
"width: 100%;height: 50px;display: flex;align-items: center;border-bottom: 1px solid #E2E2E2;font-size: 14px;color: #1B1D1E;font-weight: 800;"
>
<picker
mode=
"date"
:value=
"cardate"
:start=
"startDate"
@
change=
"bindDateChange"
>
<picker
mode=
"date"
:value=
"cardate"
:start=
"startDate"
@
change=
"bindDateChange"
>
<span>
{{
showcardate
}}
</span>
<span>
{{
showcardate
}}
</span>
<span
style=
'margin-left: 5px;'
>
{{
showweek
}}
</span>
<span
style=
'margin-left: 5px;'
>
{{
showweek
}}
</span>
</picker>
</picker>
</view>
</view>
<view
style=
"width: 100%;display: flex;align-items: center;justify-content: space-between;border: none;height: 30px;color: #919191;font-size: 11px"
v-if=
'carMsg.returnId==2'
>
<span>
去程时间
</span>
<span>
返程时间
</span>
</view>
<view
v-if=
'carMsg.returnId==2'
style=
"width: 100%;height: 50px;display: flex;align-items: center;border-bottom: 1px solid #E2E2E2;font-size: 14px;color: #1B1D1E;font-weight: 800;
display: flex;align-items: center;justify-content: space-between;"
@
click=
"showTimePopup=true"
>
<view>
<span>
{{
showcardate2
}}
</span>
<span
style=
'margin-left: 5px;'
>
{{
showweek2
}}
</span>
</view>
<view>
<span>
{{
showcardate3
}}
</span>
<span
style=
'margin-left: 5px;'
>
{{
showweek3
}}
</span>
</view>
</view>
<view
class=
"carbtn"
@
click=
"godingche"
>
<view
class=
"carbtn"
@
click=
"godingche"
>
去订车
去订车
</view>
</view>
...
@@ -166,15 +189,25 @@
...
@@ -166,15 +189,25 @@
</view>
</view>
</u-popup>
</u-popup>
<u-picker
v-model=
"showStart"
mode=
"time"
:params=
"params"
@
confirm=
'btnStart'
:default-time=
'defaultTime'
></u-picker>
<u-picker
v-model=
"showStart"
mode=
"time"
:params=
"params"
@
confirm=
'btnStart'
:default-time=
'defaultTime'
></u-picker>
<!-- 定制包车的往返时间选择 -->
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"85%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
</u-popup>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
AddressParse
from
'../address/zh-address-parse.min.js'
import
AddressParse
from
'../address/zh-address-parse.min.js'
import
amap
from
'./components/amap-wx.js'
import
amap
from
'./components/amap-wx.js'
import
canlendar
from
'./components/time/index.vue'
export
default
{
export
default
{
components
:
{
canlendar
},
data
()
{
data
()
{
return
{
return
{
showTimePopup
:
false
,
info
:
{},
info
:
{},
contentHeight
:
0
,
contentHeight
:
0
,
navs
:[{
Name
:
'司导专车'
},{
Name
:
'景区专车'
}],
navs
:[{
Name
:
'司导专车'
},{
Name
:
'景区专车'
}],
...
@@ -231,12 +264,20 @@
...
@@ -231,12 +264,20 @@
StartCityName
:
''
,
StartCityName
:
''
,
ArriveCityName
:
''
,
ArriveCityName
:
''
,
Q_Date
:
''
,
Q_Date
:
''
,
returnId
:
1
,
//暂定1位单程 2为往返
F_Date
:
''
,
//返程时间
day
:
1
,
//间歇几天
},
},
cardate
:
''
,
cardate
:
''
,
startDate
:
''
,
startDate
:
''
,
showcardate
:
''
,
showcardate
:
''
,
showweek
:
''
showweek
:
''
,
showcardate2
:
''
,
showweek2
:
''
,
showcardate3
:
''
,
showweek3
:
''
,
qDate
:
''
,
fDate
:
''
,
}
}
},
},
created
()
{
created
()
{
...
@@ -279,6 +320,7 @@
...
@@ -279,6 +320,7 @@
this
.
intervalDay
=
'半天'
this
.
intervalDay
=
'半天'
}
}
}
}
//获取景区专车的 单程的出发时间
let
carDate
=
new
Date
();
let
carDate
=
new
Date
();
let
carMonth
=
(
carDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
carDate
.
getMonth
()
+
1
):(
carDate
.
getMonth
()
+
1
);
let
carMonth
=
(
carDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
carDate
.
getMonth
()
+
1
):(
carDate
.
getMonth
()
+
1
);
let
carDays
=
(
carDate
.
getDate
()
)
<
10
?
'0'
+
(
carDate
.
getDate
()
):(
carDate
.
getDate
());
let
carDays
=
(
carDate
.
getDate
()
)
<
10
?
'0'
+
(
carDate
.
getDate
()
):(
carDate
.
getDate
());
...
@@ -287,6 +329,17 @@
...
@@ -287,6 +329,17 @@
this
.
startDate
=
carDate
.
getFullYear
()
+
'-'
+
carMonth
+
'-'
+
carDays
;
//从啥时候开始
this
.
startDate
=
carDate
.
getFullYear
()
+
'-'
+
carMonth
+
'-'
+
carDays
;
//从啥时候开始
this
.
showcardate
=
carMonth
+
'-'
+
carDays
;
this
.
showcardate
=
carMonth
+
'-'
+
carDays
;
this
.
showweek
=
this
.
getweek
(
carday
)
//得到定制专车的周几
this
.
showweek
=
this
.
getweek
(
carday
)
//得到定制专车的周几
//获取景区专车的 往返情况下的 出发和到达时间
this
.
qDate
=
carDate
.
getFullYear
()
+
'-'
+
carMonth
+
'-'
+
carDays
;
this
.
showcardate2
=
carMonth
+
'-'
+
carDays
//定制专车的返程出发时间
this
.
showweek2
=
this
.
getweek
(
carday
)
//定制专车的返程出发周几
let
qcarMonth
=
(
myDate
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
myDate
.
getMonth
()
+
1
):(
myDate
.
getMonth
()
+
1
);
let
fcarDays
=
(
myDate
.
getDate
()
)
<
10
?
'0'
+
(
myDate
.
getDate
()
):(
myDate
.
getDate
());
let
fcarday
=
myDate
.
getDay
();
this
.
fDate
=
myDate
.
getFullYear
()
+
'-'
+
qcarMonth
+
'-'
+
fcarDays
;
this
.
showcardate3
=
qcarMonth
+
'-'
+
fcarDays
//定制专车的返程返程时间
this
.
showweek3
=
this
.
getweek
(
fcarday
)
//定制专车的返程 返程周几
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
...
@@ -308,6 +361,15 @@
...
@@ -308,6 +361,15 @@
}
}
},
},
methods
:
{
methods
:
{
//获取明天的日期
getDefaultDate
()
{
var
dd
=
new
Date
();
dd
.
setDate
(
dd
.
getDate
()
+
AddDayCount
);
//获取AddDayCount天后的日期
var
year
=
dd
.
getFullYear
();
var
mon
=
dd
.
getMonth
()
+
1
;
//获取当前月份的日期
var
day
=
dd
.
getDate
();
return
year
+
'-'
+
mon
+
'-'
+
day
;
},
godingche
(){
//跳入订车页面
godingche
(){
//跳入订车页面
if
(
this
.
carMsg
.
StartCityName
==
''
){
if
(
this
.
carMsg
.
StartCityName
==
''
){
uni
.
showToast
({
uni
.
showToast
({
...
@@ -323,8 +385,19 @@
...
@@ -323,8 +385,19 @@
})
})
return
return
}
}
if
(
this
.
carMsg
.
returnId
==
2
){
if
(
this
.
qDate
==
''
||
this
.
fDate
==
''
){
uni
.
showToast
({
title
:
'请选择往返时间'
,
icon
:
'none'
})
return
}
this
.
carMsg
.
Q_Date
=
this
.
qDate
;
this
.
carMsg
.
F_Date
=
this
.
fDate
;
}
//对象编码
//对象编码
console
.
log
(
this
.
carMsg
)
let
obj
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
carMsg
))
let
obj
=
encodeURIComponent
(
JSON
.
stringify
(
this
.
carMsg
))
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'/pages/guidecar/bookaCarList?carMsg='
+
obj
url
:
'/pages/guidecar/bookaCarList?carMsg='
+
obj
...
@@ -354,6 +427,7 @@
...
@@ -354,6 +427,7 @@
url
:
'/pages/guidecar/pickcarcity2?type='
+
type
url
:
'/pages/guidecar/pickcarcity2?type='
+
type
})
})
}
else
{
}
else
{
if
(
this
.
carMsg
.
StartCityName
==
''
){
if
(
this
.
carMsg
.
StartCityName
==
''
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'请先选择出发地'
,
title
:
'请先选择出发地'
,
...
@@ -371,7 +445,7 @@
...
@@ -371,7 +445,7 @@
bindDateChange
(
e
){
bindDateChange
(
e
){
let
value
=
e
.
detail
.
value
;
let
value
=
e
.
detail
.
value
;
console
.
log
(
value
)
let
carDate
=
new
Date
(
value
);
let
carDate
=
new
Date
(
value
);
if
(
carDate
>=
(
new
Date
())){
if
(
carDate
>=
(
new
Date
())){
this
.
carMsg
.
Q_Date
=
value
;
this
.
carMsg
.
Q_Date
=
value
;
...
@@ -385,8 +459,17 @@
...
@@ -385,8 +459,17 @@
icon
:
'none'
icon
:
'none'
})
})
}
}
},
chosenDateResult
(
obj
)
{
//往返的日期
this
.
qDate
=
obj
.
start
;
this
.
carMsg
.
day
=
obj
.
day
;
this
.
fDate
=
obj
.
end
;
this
.
showcardate2
=
obj
.
startDay
;
this
.
showweek2
=
obj
.
startWeek
this
.
showcardate3
=
obj
.
endDay
;
this
.
showweek3
=
obj
.
endWeek
this
.
showTimePopup
=
false
},
},
changeHandler2
(
e
){
changeHandler2
(
e
){
this
.
active
=
e
this
.
active
=
e
...
@@ -870,6 +953,38 @@
...
@@ -870,6 +953,38 @@
color
:
#FFF
;
color
:
#FFF
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.guidecar
.dingzhitop
{
width
:
100%
;
height
:
58px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
1px
solid
#E2E2E2
;
}
.guidecar
.dingzhitop_r
{
display
:
flex
;
align-items
:
center
;
}
.guidecar
.dingzhitop_r_item
{
width
:
50px
;
height
:
28px
;
font-size
:
12px
;
border-radius
:
5px
;
background
:
#FFFFFF
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.guidecar
.weixuan
{
border
:
1px
solid
#888888
;
color
:
#888888
;
}
.guidecar
.xuanzhong
{
border
:
1px
solid
#111111
;
color
:
#111111
;
font-weight
:
500
;
}
</
style
>
</
style
>
pages/guidecar/returncarList.vue
0 → 100644
View file @
5225039d
<
style
scoped
lang=
"scss"
>
.returncarList
{
width
:
100%
;
height
:
100vh
;
font-family
:
PingFang
SC
;
background
:
#FFF
;
.mask
{
width
:
100%
;
height
:
100%
;
background
:
rgba
(
17
,
17
,
17
,
0
.4
);
position
:
fixed
;
top
:
0
;
left
:
0
;
}
.box-top
{
width
:
100%
;
height
:
60px
;
display
:
flex
;
align-items
:
center
;
padding
:
0
15px
;
.box-top-b
{
width
:
100%
;
height
:
55px
;
background
:
#ECF1F4
;
border-radius
:
23px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
15px
;
.box-top-b-l
{
width
:
calc
((
100vw
-
30px
-
30px
-
30px
)
/
2
);
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-align
:
center
;
}
}
}
.box-rili
{
width
:
100%
;
height
:
80px
;
display
:
flex
;
align-items
:
center
;
padding
:
0
10px
;
position
:
relative
;
box-shadow
:
0px
5px
15px
0px
rgba
(
36
,
36
,
36
,
0
.06
);
.box-rili-scroll
{
width
:
100%
;
overflow-x
:
auto
;
display
:
flex
;
}
.box-rili-item
{
width
:
50px
;
//无效
height
:
50px
;
border-radius
:
10px
;
font-size
:
13px
;
color
:
#111111
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
8px
;
}
.box-rili-item2
{
color
:
#FFF
;
background
:
#111111
;
}
.porili
{
width
:
120rpx
;
height
:
100%
;
position
:
absolute
;
right
:
0
;
top
:
0
;
background
:
#FFF
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.scr-box
{
width
:
100%
;
box-shadow
:
0px
5px
10px
0px
rgba
(
36
,
36
,
36
,
0
.14
);
border-radius
:
10px
;
margin-top
:
15px
;
.scr-box-top
{
width
:
100%
;
padding
:
15px
;
.s-t-t
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
font-size
:
15px
;
font-weight
:
800
;
color
:
#111111
;
line-height
:
35px
;
}
}
.s-c-box
{}
.s-c-o
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.s-c-l
{
flex
:
1
;
width
:
1px
;
display
:
flex
;
align-items
:
flex-start
;
}
.s-c-r
{
width
:
80px
;
}
.chufatime
{
width
:
44px
;
font-size
:
11px
;
font-weight
:
500
;
color
:
#111111
;
line-height
:
25px
;
}
.setoutdian
{
width
:
5px
;
height
:
5px
;
border-radius
:
50%
;
background
:
#111111
;
margin-top
:
10px
;
margin-right
:
2px
;
}
.s-c-place
{
font-size
:
12px
;
font-weight
:
bold
;
color
:
#111111
;
line-height
:
25px
;
width
:
calc
(
100vw
-
60px
-
44px
-
5px
-
80px
-
2px
);
}
.prices
{
color
:
#FF3166
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
}
.sold
{
color
:
#111111
;
font-size
:
11px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
}
.shuxian
{
width
:
1px
;
height
:
10px
;
background
:
#111111
;
margin-left
:
46px
;
}
.s-b-box
{
width
:
100%
;
padding
:
15px
;
background
:
#F4F6F7
;
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
space-between
;
position
:
relative
;
.s-b-box-l
{
display
:
flex
;
align-items
:
flex-start
;
font-size
:
11px
;
color
:
#999999
;
margin-top
:
10px
;
}
.s-b-box-r
{
width
:
60px
;
height
:
30px
;
border
:
1px
solid
#111111
;
border-radius
:
5px
;
font-size
:
13px
;
color
:
#111111
;
text-align
:
center
;
line-height
:
30px
;
}
.s-b-box-posi
{
width
:
100%
;
position
:
absolute
;
left
:
0
;
top
:
-6px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
}
.screenbottom
{
width
:
calc
(
100vw
-
40px
);
height
:
50px
;
border-radius
:
8px
;
position
:
fixed
;
left
:
20px
;
bottom
:
30px
;
box-shadow
:
0px
5px
15px
0px
rgba
(
36
,
36
,
36
,
0
.2
);
display
:
flex
;
align-items
:
center
;
background
:
#FFF
;
z-index
:
9
;
.screenbottom-item
{
width
:
calc
((
100vw
-
40px
-
2px
)
/
3
);
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
font-size
:
12px
;
color
:
#6E6E6E
;
font-weight
:
500
;
}
.screenbottom-sx
{
width
:
1px
;
height
:
25px
;
background
:
rgba
(
17
,
17
,
17
,
0
.3
);
}
}
.popup-box
{
width
:
100%
;
background
:
#FFF
;
.picker-view
{
width
:
750rpx
;
height
:
300rpx
;
margin-top
:
20rpx
;
}
.item
{
height
:
50px
;
align-items
:
center
;
justify-content
:
center
;
text-align
:
center
;
}
.btn
{
width
:
100%
;
height
:
40px
;
margin
:
30px
0
;
padding
:
0
28px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.btn-item1
{
width
:
300rpx
;
height
:
40px
;
border-radius
:
10px
;
border
:
1px
solid
#111111
;
font-size
:
14px
;
color
:
#111111
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.btn-item2
{
width
:
300rpx
;
height
:
40px
;
font-size
:
14px
;
color
:
#FFFFFF
;
background
:
#111111
;
border-radius
:
10px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
}
.kongbai
{
width
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
font-size
:
14px
;
color
:
#999999
;
}
.gostyle
{
}
}
</
style
>
<
template
>
<view
class=
"returncarList"
>
<view
class=
"box-top"
>
<view
class=
"box-top-b"
>
<view
class=
"box-top-b-l"
>
{{
carMsg
.
ArriveCityName
}}
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/returncar.png"
mode=
"aspectFill"
style=
"width: 18px;height: 18px;"
></image>
<span
style=
'margin-top: 3px;font-size: 10px;color:#1B1D1E ;'
>
返程
</span>
</view>
<view
class=
"box-top-b-l"
>
{{
carMsg
.
StartCityName
}}
</view>
</view>
</view>
<view
class=
"gostyle"
style=
"width: 100%;padding: 0 15px;margin-bottom: 5px;margin-top: 5px;"
>
<view
class=
"scr-box"
>
<view
class=
"scr-box-top"
>
<view
class=
"s-t-t"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/gocar.png"
mode=
"aspectFill"
style=
"width: 13px;height: 13px;"
></image>
<span
style=
'margin-left: 5px;'
>
去程
</span>
<span
style=
'margin:0 5px;'
></span>
<span>
{{
carMsg
.
Q_Date
}}
</span>
</view>
<view
class=
"s-c-box"
>
<view
class=
"s-c-o"
>
<view
class=
"s-c-l"
>
<view
class=
'chufatime'
>
{{
godata
.
SiteList
[
0
].
AboutTime
}}
</view>
<view
class=
"setoutdian"
></view>
<view
class=
"s-c-place"
>
{{
godata
.
SiteList
[
0
].
Name
}}
</view>
</view>
<view
class=
"s-c-r prices"
>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
¥
</span>
<span
style=
'font-weight: bold;'
>
{{
$utils
.
getretailer
()
==
true
?
godata
.
Price
:
godata
.
B2CPrice
}}
</span>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
起
</span>
</view>
</view>
<view
class=
"shuxian"
></view>
<view
class=
"s-c-o"
>
<view
class=
"s-c-l"
>
<view
class=
'chufatime'
>
{{
godata
.
SiteList
[
godata
.
SiteList
.
length
-
1
].
AboutTime
!=
null
&&
godata
.
SiteList
[
godata
.
SiteList
.
length
-
1
].
AboutTime
!=
''
?
godata
.
SiteList
[
godata
.
SiteList
.
length
-
1
].
AboutTime
:
''
}}
</view>
<view
class=
"setoutdian"
style=
"background: #DFBE6E;"
></view>
<view
class=
"s-c-place"
>
{{
godata
.
SiteList
[
godata
.
SiteList
.
length
-
1
].
Name
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"box-rili"
>
<view
class=
"box-rili-scroll"
v-if=
"carMsg.returnId==1"
>
<scroll-view
:scroll-x=
'true'
style=
"width: 100%;"
@
scroll=
'getscroll'
:scroll-left=
"scrollleft"
>
<view
style=
"display: flex;align-items: center;"
>
<view
class=
"box-rili-item"
:class=
"
{'box-rili-item2':msg.Q_Date == x.date}"
v-for="(x,y) in topdateList" :key='y' @click="choicedatelist(x)">
<span
style=
'width: 50px;display: inline-block;text-align: center;'
>
{{
x
.
showdate
}}
</span>
<span>
{{
x
.
week
}}
</span>
</view>
</view>
</scroll-view>
</view>
<view
class=
"box-rili-scroll"
v-if=
"carMsg.returnId==2"
>
<scroll-view
:scroll-x=
'true'
style=
"width: 100%;"
@
scroll=
'getscroll'
:scroll-left=
"scrollleft"
>
<view
style=
"display: flex;align-items: center;"
>
<view
class=
"box-rili-item"
:style=
"
{'color':x.show==true
&&
msg.Q_Date != x.date? '#111111':'#e2e2e2'}" :class="{'box-rili-item2':msg.Q_Date == x.date}"
v-for="(x,y) in topdateList" :key='y' @click="choicedatelist(x)">
<span
style=
'width: 50px;display: inline-block;text-align: center;'
>
{{
x
.
showdate
}}
</span>
<span>
{{
x
.
week
}}
</span>
</view>
</view>
</scroll-view>
</view>
<view
class=
"porili"
@
click=
"showcalendar = true"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dingcherilitubiao.png"
mode=
"aspectFill"
style=
"width: 48rpx;height: 48rpx;"
></image>
</view>
</view>
<view
class=
"kongbai"
v-if=
"g.length == 0"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dingchekongbai.png"
mode=
"aspectFill"
style=
"width: 110px;height: 117px;margin-top: 140rpx;"
></image>
<span
style=
'margin-top: 20px;'
>
真遗憾,没有相关数据
</span>
</view>
<view
style=
"height: calc(100% - 280px);"
v-if=
"g.length > 0"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%;width: 100%"
>
<view
style=
"padding: 0 15px;"
>
<view
class=
"scr-box"
v-for=
"(x,y) in g"
:key=
'y'
>
<view
class=
"scr-box-top"
>
<view
class=
"s-t-t"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcchufa.png"
mode=
"aspectFill"
style=
"width: 13px;height: 11px;"
></image>
<span
style=
'margin-left: 5px;'
>
{{
x
.
StartCityName
}}
</span>
<span
style=
'margin:0 5px;'
>
-
</span>
<span>
{{
x
.
ArriveCityName
}}
</span>
</view>
<view
class=
"s-c-box"
v-if=
"x.show==false"
>
<view
class=
"s-c-o"
>
<view
class=
"s-c-l"
>
<view
class=
'chufatime'
>
{{
x
.
SiteList
[
0
].
AboutTime
}}
</view>
<view
class=
"setoutdian"
></view>
<view
class=
"s-c-place"
>
{{
x
.
SiteList
[
0
].
Name
}}
</view>
</view>
<view
class=
"s-c-r prices"
>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
¥
</span>
<span
style=
'font-weight: bold;'
>
{{
$utils
.
getretailer
()
==
true
?
x
.
Price
:
x
.
B2CPrice
}}
</span>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
起
</span>
</view>
</view>
<view
class=
"shuxian"
></view>
<view
class=
"s-c-o"
>
<view
class=
"s-c-l"
>
<view
class=
'chufatime'
>
{{
x
.
SiteList
[
x
.
SiteList
.
length
-
1
].
AboutTime
!=
null
&&
x
.
SiteList
[
x
.
SiteList
.
length
-
1
].
AboutTime
!=
''
?
x
.
SiteList
[
x
.
SiteList
.
length
-
1
].
AboutTime
:
''
}}
</view>
<view
class=
"setoutdian"
style=
"background: #DFBE6E;"
></view>
<view
class=
"s-c-place"
>
{{
x
.
SiteList
[
x
.
SiteList
.
length
-
1
].
Name
}}
</view>
</view>
<view
class=
"s-c-r sold"
>
<span
v-if=
'x.SurplusNum>0 && x.ProductState==1'
>
余位:
{{
x
.
SurplusNum
}}
</span>
<span
v-if=
'x.ProductState==2'
>
已售罄
</span>
</view>
</view>
</view>
<view
class=
"s-c-box"
v-if=
"x.show == true "
>
<view
v-for=
'(item,index) in x.SiteList'
:key=
'index'
>
<view
class=
"s-c-o"
>
<view
class=
"s-c-l"
>
<view
class=
'chufatime'
>
{{
item
.
AboutTime
!=
null
&&
item
.
AboutTime
!=
''
?
item
.
AboutTime
:
''
}}
</view>
<view
class=
"setoutdian"
v-if=
"x.SiteList.length-1 !=index"
></view>
<view
class=
"setoutdian"
v-else
style=
"background: #DFBE6E;"
></view>
<view
class=
"s-c-place"
>
{{
item
.
Name
}}
</view>
</view>
<view
class=
"s-c-r prices"
v-if=
"index==0"
>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
¥
</span>
<span
style=
'font-weight: bold;'
>
{{
$utils
.
getretailer
()
==
true
?
x
.
Price
:
x
.
B2CPrice
}}
</span>
<span
style=
'margin-top: 3px;font-size: 11px;'
>
起
</span>
</view>
<view
class=
"s-c-r sold"
v-if=
"index==x.SiteList.length-1"
>
<span
v-if=
'x.SurplusNum>0 && x.ProductState==1'
>
余位:
{{
x
.
SurplusNum
}}
</span>
<span
v-if=
'x.ProductState==2'
>
已售罄
</span>
</view>
</view>
<view
class=
"shuxian"
v-if=
'index!=x.SiteList.length-1'
></view>
</view>
</view>
</view>
<view
class=
"s-b-box"
>
<view
class=
"s-b-box-posi"
v-if=
"x.SiteList.length>2"
>
<u-icon
v-if=
'x.show == false'
name=
"arrow-down"
color=
"#111111"
size=
"30"
@
click=
"getlistshow(y)"
/>
<u-icon
v-if=
'x.show == true'
name=
"arrow-up"
color=
"#111111"
size=
"30"
@
click=
"getlistshow(y)"
/>
</view>
<view
class=
"s-b-box-l"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dctixing.png"
mode=
"aspectFill"
style=
"width: 9px;height: 13px;"
></image>
<view
style=
'margin-left: 3px;width: calc(100vw - 60px - 80px);'
>
{{
x
.
Description
}}
</view>
</view>
<view
class=
"s-b-box-r"
v-if=
"x.ProductState==1 && compareDate(godata.StartDate,x.StartDate) ==true"
@
click=
"yuding(x)"
>
预定
</view>
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
<view
style=
"width: 100%;height: 90px;"
></view>
</scroll-view>
</view>
<view
class=
"screenbottom"
>
<view
class=
"screenbottom-item"
@
click=
"goscreen(0)"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcchufa.png"
mode=
"aspectFill"
style=
"width: 20px;height: 16px;"
></image>
<span>
出发地点
</span>
</view>
<view
class=
"screenbottom-sx"
></view>
<view
class=
"screenbottom-item"
@
click=
"goscreen(1)"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcdaoda.png"
mode=
"aspectFill"
style=
"width: 23px;height: 16px;"
></image>
<span>
到达地点
</span>
</view>
<view
class=
"screenbottom-sx"
></view>
<view
class=
"screenbottom-item"
@
click=
"goscreen(2)"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/dcchufatime.png"
mode=
"aspectFill"
style=
"width: 16px;height: 16px;"
></image>
<span>
出发时间
</span>
</view>
</view>
<view
class=
"mask"
v-if=
"showcalendar"
></view>
<calendar
:is-show=
"showcalendar"
:start-date=
'msg.Q_Date'
@
callback=
"getDate"
@
closeback=
'getclose'
:between-start=
'betweenStart'
:between-end=
'betweenEnd'
:init-month=
'3'
/>
<u-popup
v-model=
"screenshow"
mode=
'bottom'
ref=
"onlyhover"
>
<view
class=
"popup-box"
>
<view
class=
"popup-box-t"
>
<u-tabs
style=
'width: 100%;'
:is-scroll=
"false"
name=
"name"
:list=
"popuplist"
:active-color=
"mainColor"
:current=
"popupcurrent"
@
change=
"popupchange"
:show-bar=
"false"
:activeFontSize=
"34"
:inactive-color=
"secondary"
:bold=
"true"
height=
"100"
duration=
"0"
font-size=
"28"
></u-tabs>
<picker-view
v-show=
"popupcurrent==0"
@
change=
"getpopupcu1"
class=
"picker-view"
>
<picker-view-column>
<view
class=
" item"
v-for=
"(item,index) in DepartList"
:key=
"index"
>
{{
item
}}
</view>
</picker-view-column>
</picker-view>
<picker-view
v-show=
"popupcurrent==1"
@
change=
"getpopupcu2"
class=
"picker-view"
>
<picker-view-column>
<view
class=
" item"
v-for=
"(item,index) in ArriveList"
:key=
"index"
>
{{
item
}}
</view>
</picker-view-column>
</picker-view>
<picker-view
v-show=
"popupcurrent==2"
@
change=
"getpopupcu3"
class=
"picker-view"
>
<picker-view-column>
<view
class=
" item"
v-for=
"(item,index) in alltime"
:key=
"index"
>
{{
item
}}
</view>
</picker-view-column>
</picker-view>
<view
class=
"btn"
>
<view
class=
"btn-item1"
@
click=
"chongzhi"
>
重置
</view>
<view
class=
"btn-item2"
@
click=
"queren"
>
确认
</view>
</view>
</view>
</view>
</u-popup>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
'gbAuth'
></auth>
</view>
</
template
>
<
script
>
import
auth
from
"@/components/auth/index.vue"
;
import
Calendar
from
'./components/Calendar.vue'
export
default
{
components
:
{
Calendar
,
auth
},
data
(
options
)
{
return
{
showAuth
:
false
,
screenshow
:
false
,
startDate
:
''
,
pageTitle
:
"去订车"
,
showcalendar
:
false
,
mainColor
:
''
,
u
:{},
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
StartCityId
:
0
,
StartCityType
:
0
,
ArriveCityId
:
0
,
ArriveCityType
:
0
,
Q_Date
:
''
,
StartCityName
:
''
,
ArriveCityName
:
''
,
StartDate
:
''
,
EndDate
:
''
,
},
carMsg
:
{},
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
page_count
:
1
,
status
:
"loadmore"
,
g
:
[],
topdateList
:
[],
xuandateList
:[],
DepartList
:
[],
//出发点数组
ArriveList
:
[],
//到达点数组
alltime
:
[],
//时间数组
popuplist
:
[{
name
:
'出发地点'
},
{
name
:
'到达地点'
},
{
name
:
'出发时间'
}],
popupcurrent
:
0
,
SMsg
:{
depart
:
''
,
Arrive
:
''
,
StartDate
:
''
,
EndDate
:
''
,
},
scrollleft
:
0
,
carMsgobj
:
''
,
Up
:
0
,
betweenStart
:
''
,
//日期可选开始
betweenEnd
:
''
,
//日期可选结束
godata
:{},
}
},
onLoad
(
options
)
{
if
(
options
&&
options
.
carMsg
)
{
//对象解码
this
.
carMsg
=
JSON
.
parse
(
decodeURIComponent
(
options
.
carMsg
))
this
.
godata
=
JSON
.
parse
(
decodeURIComponent
(
options
.
data
))
this
.
carMsgobj
=
options
.
carMsg
;
//保存原始的用于分享
this
.
msg
.
StartCityId
=
this
.
carMsg
.
ArriveCityId
;
//因为是前段之间跳转过来所以要把出发地赋值给结束地
this
.
msg
.
StartCityType
=
this
.
carMsg
.
ArriveCityType
;
this
.
msg
.
ArriveCityId
=
this
.
carMsg
.
StartCityId
;
this
.
msg
.
ArriveCityType
=
this
.
carMsg
.
StartCityType
;
if
(
new
Date
()
>
new
Date
(
this
.
carMsg
.
Q_Date
)){
//判断分享的时间是否过期过期了 就给与今天的日期
var
date1
=
new
Date
();
let
carMonth
=
(
date1
.
getMonth
()
+
1
)
<
10
?
'0'
+
(
date1
.
getMonth
()
+
1
):(
date1
.
getMonth
()
+
1
);
let
carDays
=
(
date1
.
getDate
()
)
<
10
?
'0'
+
(
date1
.
getDate
()
):(
date1
.
getDate
());
let
nowtime
=
date1
.
getFullYear
()
+
"-"
+
carMonth
+
"-"
+
carDays
;
this
.
msg
.
Q_Date
=
nowtime
}
else
{
this
.
msg
.
Q_Date
=
this
.
carMsg
.
Q_Date
;
}
}
this
.
$nextTick
(
function
()
{
this
.
scrollleft
=
0
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
gettimeList
()
this
.
init
();
this
.
getSelectCarSiteList
()
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
},
onShareTimeline
()
{
//朋友圈
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
){
uid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
return
{
title
:
this
.
carMsg
.
StartCityName
+
'-'
+
this
.
carMsg
.
ArriveCityName
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
+
'&carMsg='
+
this
.
carMsgobj
,
imageUrl
:
''
,
};
},
onShareAppMessage
(
res
)
{
//朋友圈
let
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
uid
=
u
.
UserId
?
u
.
UserId
:
0
;
if
(
uid
==
0
){
uid
=
uni
.
getStorageSync
(
"pid"
)?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
}
let
SmallShopId
=
u
.
SmallShopId
?
u
.
SmallShopId
:
0
;
if
(
SmallShopId
==
0
){
//如果微店id为0 去找所属微店id
SmallShopId
=
u
.
UserSmallShopId
?
u
.
UserSmallShopId
:
0
}
return
{
title
:
this
.
carMsg
.
StartCityName
+
'-'
+
this
.
carMsg
.
ArriveCityName
,
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
this
.
Up
+
'&carMsg='
+
this
.
carMsgobj
+
'&JumpType=17'
,
imageUrl
:
''
,
};
},
methods
:
{
getscroll
(
e
){
// console.log(e.detail.scrollLeft)
},
yuding
(
x
){
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
nickName
:
"未登录"
,
avatarUrl
:
""
};
this
.
showAuth
=
true
;
}
else
{
uni
.
navigateTo
({
url
:
'/pages/guidecar/specialCarReserve?Id='
+
this
.
godata
.
Id
+
'&Date='
+
this
.
carMsg
.
Q_Date
+
'&BackPlanId='
+
x
.
Id
+
'&BackDate='
+
this
.
msg
.
Q_Date
})
}
},
compareDate
(
t1
,
t2
){
//时分的对比
if
(
new
Date
(
this
.
carMsg
.
Q_Date
).
getTime
()
==
new
Date
(
this
.
msg
.
Q_Date
).
getTime
()){
//如果去程的日期和返程的日期是同一天
var
date
=
new
Date
();
var
a
=
t1
.
split
(
":"
);
var
b
=
t2
.
split
(
":"
);
return
date
.
setHours
(
a
[
0
],
a
[
1
])
<
date
.
setHours
(
b
[
0
],
b
[
1
]);
}
else
{
return
true
}
},
popupchange
(
e
)
{
//tab事件
this
.
popupcurrent
=
e
;
},
goscreen
(
type
)
{
//筛选的弹出
this
.
screenshow
=
true
;
this
.
popupcurrent
=
type
;
},
getlistshow
(
index
)
{
//点击是否展开全部
this
.
g
[
index
].
show
=
!
this
.
g
[
index
].
show
},
gettimeList
()
{
var
date1
=
new
Date
();
var
date2
=
new
Date
(
date1
);
date2
.
setDate
(
date1
.
getDate
()
+
60
);
let
nowtime
=
date1
.
getFullYear
()
+
"-"
+
(
date1
.
getMonth
()
+
1
)
+
"-"
+
date1
.
getDate
();
let
htime
=
date2
.
getFullYear
()
+
"-"
+
(
date2
.
getMonth
()
+
1
)
+
"-"
+
date2
.
getDate
();
this
.
topdateList
=
this
.
getDayAll
(
nowtime
,
htime
)
this
.
betweenStart
=
this
.
carMsg
.
Q_Date
;
this
.
betweenEnd
=
this
.
carMsg
.
F_Date
;
if
(
this
.
carMsg
.
returnId
==
2
){
this
.
xuandateList
=
this
.
getDayAll
(
this
.
carMsg
.
Q_Date
,
this
.
carMsg
.
F_Date
)
this
.
topdateList
.
forEach
((
x
)
=>
{
this
.
xuandateList
.
map
(
j
=>
{
if
(
x
.
date
==
j
.
date
){
x
.
show
=
true
;
return
}
})
})
}
this
.
startDate
=
nowtime
;
this
.
getscollwz
()
},
getDayAll
(
starDay
,
endDay
)
{
//根据2个时间段获取之间的所有日期
var
arr
=
[];
var
dates
=
[];
// 设置两个日期UTC时间
var
db
=
new
Date
(
starDay
);
var
de
=
new
Date
(
endDay
);
// 获取两个日期GTM时间
var
s
=
db
.
getTime
()
-
24
*
60
*
60
*
1000
;
var
d
=
de
.
getTime
()
-
24
*
60
*
60
*
1000
;
// 获取到两个日期之间的每一天的毫秒数
for
(
var
i
=
s
;
i
<=
d
;)
{
i
=
i
+
24
*
60
*
60
*
1000
;
arr
.
push
(
parseInt
(
i
))
}
// 获取每一天的时间 YY-MM-DD
for
(
var
j
in
arr
)
{
var
time
=
new
Date
(
arr
[
j
]);
var
year
=
time
.
getFullYear
(
time
);
var
mouth
=
(
time
.
getMonth
()
+
1
)
>=
10
?
(
time
.
getMonth
()
+
1
)
:
(
'0'
+
(
time
.
getMonth
()
+
1
));
var
day
=
time
.
getDate
()
>=
10
?
time
.
getDate
()
:
(
'0'
+
time
.
getDate
());
var
YYMMDD
=
year
+
'-'
+
mouth
+
'-'
+
day
;
let
showweek
=
time
.
getDay
();
let
week
=
this
.
getweek
(
showweek
)
if
(
j
==
0
)
{
week
=
'今天'
}
else
if
(
j
==
1
)
{
week
=
'明天'
}
else
if
(
j
==
2
)
{
week
=
'后天'
}
let
obj
=
{
showdate
:
mouth
+
'/'
+
day
,
date
:
YYMMDD
,
week
:
week
,
show
:
false
}
dates
.
push
(
obj
)
}
return
dates
},
setData
:
function
(
obj
){
let
that
=
this
;
let
keys
=
[];
let
val
,
data
;
Object
.
keys
(
obj
).
forEach
(
function
(
key
){
keys
=
key
.
split
(
'.'
);
val
=
obj
[
key
];
data
=
that
.
$data
;
keys
.
forEach
(
function
(
key2
,
index
){
if
(
index
+
1
==
keys
.
length
){
that
.
$set
(
data
,
key2
,
val
);
}
else
{
if
(
!
data
[
key2
]){
that
.
$set
(
data
,
key2
,{});
}
}
data
=
data
[
key2
];
})
});
},
//获取回调的日期数据
getDate
(
date
)
{
this
.
msg
.
Q_Date
=
date
.
startStr
.
dateStr
;
this
.
showcalendar
=
false
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
init
()
this
.
getscollwz
()
},
getscollwz
(){
//在日历上选择了列表上滚动
let
index
=
0
this
.
topdateList
.
map
((
x
,
i
)
=>
{
if
(
x
.
date
==
this
.
msg
.
Q_Date
){
index
=
i
;
return
}
})
if
(
index
>
3
){
this
.
$nextTick
(
function
()
{
this
.
scrollleft
=
(
index
-
2
)
*
58
});
}
else
{
this
.
$nextTick
(
function
()
{
this
.
scrollleft
=
0
});
}
},
getclose
()
{
this
.
showcalendar
=
false
;
},
getweek
(
day
)
{
//根据值返回当前时间的星期几
if
(
day
==
1
)
{
return
'周一'
}
else
if
(
day
==
2
)
{
return
'周二'
}
else
if
(
day
==
3
)
{
return
'周三'
}
else
if
(
day
==
4
)
{
return
'周四'
}
else
if
(
day
==
5
)
{
return
'周五'
}
else
if
(
day
==
6
)
{
return
'周六'
}
else
if
(
day
==
0
)
{
return
'周日'
}
},
choicedatelist
(
x
)
{
if
(
this
.
carMsg
.
returnId
==
1
){
this
.
msg
.
Q_Date
=
x
.
date
;
}
else
{
if
(
x
.
show
==
false
){
uni
.
showToast
({
title
:
'不在往返时间内'
,
icon
:
'none'
})
return
}
else
{
this
.
msg
.
Q_Date
=
x
.
date
;
}
}
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
init
()
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
msg
.
pageIndex
++
;
this
.
status
=
"loading"
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
init
()
{
uni
.
showLoading
({
title
:
'加载中...'
})
this
.
request2
({
url
:
'/api/AppletCar/GetAppletCarCustomPageList'
,
data
:
this
.
msg
},
res
=>
{
uni
.
hideLoading
()
if
(
res
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
pageData
;
data
.
map
(
x
=>
{
// 添加一个对象
x
.
show
=
false
})
this
.
g
=
this
.
g
.
concat
(
data
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
}
},
err
=>
{
uni
.
hideLoading
()
}
);
},
getSelectCarSiteList
()
{
this
.
request2
({
url
:
'/api/AppletCar/GetAppletSelectCarSiteList'
,
data
:
{
StartCityId
:
this
.
msg
.
StartCityId
,
StartCityType
:
this
.
msg
.
StartCityType
,
ArriveCityId
:
this
.
msg
.
ArriveCityId
,
ArriveCityType
:
this
.
msg
.
ArriveCityType
,
Q_Date
:
this
.
msg
.
Q_Date
,
StartCityName
:
''
,
ArriveCityName
:
''
,
StartDate
:
''
,
EndDate
:
''
,
}
},
res
=>
{
this
.
DepartList
=
res
.
data
.
DepartList
;
this
.
ArriveList
=
res
.
data
.
ArriveList
;
this
.
DepartList
.
unshift
(
'不限'
)
this
.
ArriveList
.
unshift
(
'不限'
)
this
.
alltime
=
[
'不限'
,
'00:00-03:00'
,
'03:00-06:00'
,
'06:00-09:00'
,
'09:00-12:00'
,
'12:00-15:00'
,
'15:00-18:00'
,
'18:00-21:00'
,
'21:00-24:00'
]
},
err
=>
{
uni
.
hideLoading
()
}
);
},
chongzhi
(){
this
.
msg
.
StartCityName
=
''
;
this
.
msg
.
ArriveCityName
=
''
;
this
.
msg
.
StartDate
=
''
;
this
.
msg
.
EndDate
=
''
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
init
();
this
.
screenshow
=
false
;
this
.
$forceUpdate
()
this
.
DepartList
=
[],
//出发点数组
this
.
ArriveList
=
[],
//到达点数组
this
.
alltime
=
[],
//时间数组
this
.
getSelectCarSiteList
()
},
queren
(){
this
.
msg
.
StartCityName
=
this
.
SMsg
.
depart
;
this
.
msg
.
ArriveCityName
=
this
.
SMsg
.
Arrive
;
this
.
msg
.
StartDate
=
this
.
SMsg
.
StartDate
;
this
.
msg
.
EndDate
=
this
.
SMsg
.
EndDate
;
this
.
msg
.
pageIndex
=
1
;
this
.
g
=
[];
this
.
init
();
this
.
screenshow
=
false
},
getpopupcu1
(
e
)
{
let
value
=
e
.
detail
.
value
[
0
];
if
(
value
==
0
){
this
.
SMsg
.
depart
=
''
}
else
{
this
.
SMsg
.
depart
=
this
.
DepartList
[
value
]
}
},
getpopupcu2
(
e
)
{
let
value
=
e
.
detail
.
value
[
0
];
if
(
value
==
0
){
this
.
SMsg
.
Arrive
=
''
}
else
{
this
.
SMsg
.
Arrive
=
this
.
ArriveList
[
value
]
}
},
getpopupcu3
(
e
)
{
let
value
=
e
.
detail
.
value
[
0
];
if
(
value
==
0
){
this
.
SMsg
.
StartDate
=
''
this
.
SMsg
.
EndDate
=
''
}
else
{
this
.
SMsg
.
StartDate
=
(
this
.
alltime
[
value
]).
split
(
'-'
)[
0
]
this
.
SMsg
.
EndDate
=
(
this
.
alltime
[
value
]).
split
(
'-'
)[
1
]
}
},
reloadUserinfo
()
{
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
// this.showAuth=false;
this
.
init
();
},
//关闭登录窗口
gbAuth
(){
this
.
showAuth
=
false
;
},
}
}
</
script
>
pages/guidecar/specialCarReserve.vue
View file @
5225039d
...
@@ -138,9 +138,9 @@
...
@@ -138,9 +138,9 @@
</
style
>
</
style
>
<
template
>
<
template
>
<view
class=
"specialCarReserve"
>
<view
class=
"specialCarReserve"
>
<view
class=
"box-top"
>
<view
class=
"box-top"
v-if=
"addMsg.BackPlanId==0"
>
<div
class=
'onetext'
>
<div
class=
'onetext'
>
{{
details
.
StartCityName
}}
{{
GoModel
.
StartCityName
}}
</div>
</div>
<view
class=
"box-top-c"
>
<view
class=
"box-top-c"
>
<view
class=
"box-top-ct"
>
<view
class=
"box-top-ct"
>
...
@@ -149,9 +149,48 @@
...
@@ -149,9 +149,48 @@
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/sanjiao.png"
mode=
"aspectFill"
style=
"width: 55px;height: 4px;"
></image>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/sanjiao.png"
mode=
"aspectFill"
style=
"width: 55px;height: 4px;"
></image>
</view>
</view>
<div
class=
'onetext'
>
<div
class=
'onetext'
>
{{
details
.
ArriveCityName
}}
{{
GoModel
.
ArriveCityName
}}
</div>
</div>
</view>
</view>
<view
class=
"box-top"
style=
"height: 130px;"
v-if=
"addMsg.BackPlanId>0"
>
<div
class=
'onetext'
>
{{
GoModel
.
StartCityName
}}
</div>
<view
class=
"box-top-c"
>
<view
class=
"box-top-ct"
>
{{
showtime
}}
</view>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zhuanghuan.png"
mode=
"aspectFill"
style=
"width: 20px;height: 20px;margin: 2px 0;"
></image>
<view
class=
"box-top-ct"
style=
"margin-bottom: 0;margin-top: 4px;"
>
{{
backtime
}}
</view>
</view>
<div
class=
'onetext'
>
{{
GoModel
.
ArriveCityName
}}
</div>
</view>
<view
class=
"addresStyle"
style=
"padding: 0 15px;height: 40px;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/gocar.png"
mode=
"aspectFill"
style=
"width: 20px;height: 20px;"
></image>
<span>
去程
</span>
</view>
<view
class=
"addresStyle"
>
<view
class=
"address-l-h"
></view>
<view
class=
"addresStyle-text"
@
click=
"shijiup(1)"
>
<span
v-if=
"addMsg.DepartAddress==''"
>
请选择实际上车点
</span>
<span
v-else
style=
'color: #111;'
>
{{
addMsg
.
DepartAddress
}}
</span>
</view>
</view>
<view
class=
"addresStyle"
>
<view
class=
"address-l-h2"
></view>
<view
class=
"addresStyle-text"
@
click=
"shijiup(2)"
>
<span
v-if=
"addMsg.ArriveAddress==''"
>
请选择实际下车点
</span>
<span
v-else
style=
'color: #111;'
>
{{
addMsg
.
ArriveAddress
}}
</span>
</view>
</view>
<view
class=
"addresStyle"
style=
"padding: 0 15px;height: 40px;"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/returncar.png"
mode=
"aspectFill"
style=
"width: 20px;height: 20px;"
></image>
<span>
返程
</span>
</view>
<view
class=
"addresStyle"
>
<view
class=
"addresStyle"
>
<view
class=
"address-l-h"
></view>
<view
class=
"address-l-h"
></view>
<view
class=
"addresStyle-text"
@
click=
"shijiup(1)"
>
<view
class=
"addresStyle-text"
@
click=
"shijiup(1)"
>
...
@@ -245,7 +284,8 @@
...
@@ -245,7 +284,8 @@
return
{
return
{
pageTitle
:
"订单填写"
,
pageTitle
:
"订单填写"
,
mainColor
:
''
,
mainColor
:
''
,
details
:{},
GoModel
:{},
BackModel
:{},
showtime
:
''
,
showtime
:
''
,
addMsg
:{
addMsg
:{
PlanId
:
0
,
PlanId
:
0
,
...
@@ -260,20 +300,41 @@
...
@@ -260,20 +300,41 @@
BuyerMessage
:
''
,
BuyerMessage
:
''
,
Consignee
:
''
,
Consignee
:
''
,
ConsigneeMobile
:
''
,
ConsigneeMobile
:
''
,
BackPlanId
:
0
,
BackDate
:
''
,
BackDepartureTime
:
''
,
BackDepartAddress
:
''
,
BackArriveAddress
:
''
,
},
},
upcar
:[],
upcar
:[],
downcar
:[],
downcar
:[],
Backupcar
:[],
Backdowncar
:[],
upid
:
0
,
upid
:
0
,
downid
:
0
,
downid
:
0
,
orderInfo
:{},
orderInfo
:{},
showtime2
:
''
,
showtime2
:
''
,
backtime
:
''
,
backtime2
:
''
,
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
&&
options
.
Id
){
if
(
options
&&
options
.
Id
){
this
.
addMsg
.
PlanId
=
options
.
Id
;
this
.
addMsg
.
PlanId
=
options
.
Id
;
if
(
options
&&
options
.
BackPlanId
&&
options
.
BackDate
){
this
.
addMsg
.
BackPlanId
=
options
.
BackPlanId
;
this
.
addMsg
.
BackDate
=
options
.
BackDate
;
var
time
=
new
Date
(
options
.
BackDate
);
let
showweek
=
time
.
getDay
()
let
week
=
this
.
getweek
(
showweek
)
this
.
backtime
=
options
.
BackDate
.
split
(
'-'
)[
1
]
+
'月'
+
options
.
BackDate
.
split
(
'-'
)[
2
]
+
'日'
+
' '
+
week
;
this
.
backtime2
=
options
.
BackDate
.
split
(
'-'
)[
1
]
+
'月'
+
options
.
BackDate
.
split
(
'-'
)[
2
]
+
'日'
}
this
.
getCarPlanInfo
()
//获取定制包车结算页面
this
.
getCarPlanInfo
()
//获取定制包车结算页面
}
}
if
(
options
&&
options
.
Date
){
if
(
options
&&
options
.
Date
){
this
.
addMsg
.
Date
=
options
.
Date
;
this
.
addMsg
.
Date
=
options
.
Date
;
var
time
=
new
Date
(
options
.
Date
);
var
time
=
new
Date
(
options
.
Date
);
...
@@ -297,7 +358,7 @@
...
@@ -297,7 +358,7 @@
}
}
let
obj
=
{
let
obj
=
{
type
:
type
,
//上车点
type
:
type
,
//上车点
SiteList
:
this
.
details
.
SiteList
,
SiteList
:
this
.
GoModel
.
SiteList
,
SelectID
:
SelectID
SelectID
:
SelectID
}
}
obj
=
encodeURIComponent
(
JSON
.
stringify
(
obj
))
obj
=
encodeURIComponent
(
JSON
.
stringify
(
obj
))
...
@@ -375,7 +436,7 @@
...
@@ -375,7 +436,7 @@
let
that
=
this
let
that
=
this
uni
.
requestSubscribeMessage
({
uni
.
requestSubscribeMessage
({
tmplIds
:
that
.
details
.
template_message_list
,
tmplIds
:
that
.
GoModel
.
template_message_list
,
complete
(
_res
)
{
complete
(
_res
)
{
console
.
log
(
_res
)
console
.
log
(
_res
)
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -401,7 +462,7 @@
...
@@ -401,7 +462,7 @@
},
},
queren
(
OrderId
){
queren
(
OrderId
){
let
url
=
'/api/WeChatPay/GetDmcPayInfo'
let
url
=
'/api/WeChatPay/GetDmcPayInfo'
let
GoodsName
=
this
.
showtime2
+
this
.
details
.
StartCityName
+
'-'
+
this
.
details
.
ArriveCityName
let
GoodsName
=
this
.
showtime2
+
this
.
GoModel
.
StartCityName
+
'-'
+
this
.
GoModel
.
ArriveCityName
GoodsName
=
GoodsName
.
slice
(
0
,
10
)
GoodsName
=
GoodsName
.
slice
(
0
,
10
)
this
.
request2
({
this
.
request2
({
url
:
url
,
url
:
url
,
...
@@ -463,25 +524,38 @@
...
@@ -463,25 +524,38 @@
title
:
'加载中...'
title
:
'加载中...'
})
})
this
.
request2
({
this
.
request2
({
url
:
'/api/AppletCar/GetAppletCarPlanSettlementInfo'
,
url
:
'/api/AppletCar/GetAppletCarPlanSettlementInfo
_V2
'
,
data
:
{
PlanId
:
this
.
addMsg
.
PlanId
}
data
:
{
PlanId
:
this
.
addMsg
.
PlanId
,
BackPlanId
:
this
.
addMsg
.
BackPlanId
}
},
},
res
=>
{
res
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
details
=
res
.
data
this
.
GoModel
=
res
.
data
.
GoModel
this
.
addMsg
.
DepartureTime
=
this
.
details
.
StartDate
;
this
.
BackModel
=
res
.
data
.
BackModel
this
.
addMsg
.
Unit_Price
=
(
this
.
$utils
.
getretailer
()
==
true
?
this
.
details
.
Price
:
this
.
details
.
B2CPrice
)
;
this
.
addMsg
.
DepartureTime
=
this
.
GoModel
.
StartDate
;
this
.
addMsg
.
Unit_Price
=
(
this
.
$utils
.
getretailer
()
==
true
?
this
.
GoModel
.
Price
:
this
.
GoModel
.
B2CPrice
)
;
this
.
addMsg
.
BackDepartureTime
=
this
.
BackModel
.
StartDate
?
this
.
BackModel
.
StartDate
:
''
;
// this.addMsg.Unit_Price = (this.$utils.getretailer()==true ? this.GoModel.Price :this.GoModel.B2CPrice) ;
this
.
upcar
=
[];
this
.
upcar
=
[];
this
.
downcar
=
[]
this
.
downcar
=
[]
this
.
details
.
SiteList
.
forEach
(
x
=>
{
this
.
GoModel
.
SiteList
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
if
(
x
.
Type
==
1
){
this
.
upcar
.
push
(
x
)
this
.
upcar
.
push
(
x
)
}
else
{
}
else
{
this
.
downcar
.
push
(
x
)
this
.
downcar
.
push
(
x
)
}
}
})
})
if
(
this
.
BackModel
.
SiteList
&&
this
.
BackModel
.
SiteList
.
length
>
0
){
this
.
BackModel
.
SiteList
.
forEach
(
x
=>
{
if
(
x
.
Type
==
1
){
this
.
Backupcar
.
push
(
x
)
}
else
{
this
.
Backdowncar
.
push
(
x
)
}
})
}
//出发点默认第一个
//出发点默认第一个
this
.
addMsg
.
DepartAddress
=
this
.
upcar
[
0
].
Name
;
this
.
addMsg
.
DepartAddress
=
this
.
upcar
[
0
].
Name
;
this
.
upid
=
this
.
upcar
[
0
].
Id
;
this
.
upid
=
this
.
upcar
[
0
].
Id
;
...
...
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