Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
c7c8ab67
Commit
c7c8ab67
authored
Mar 06, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7cbd3931
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
80 deletions
+107
-80
orderPreview.vue
src/components/car/orderPreview.vue
+15
-36
kkday.vue
src/components/searchdata/kkday.vue
+2
-2
orderForm.vue
src/pages/Pickuporder/orderForm.vue
+90
-42
No files found.
src/components/car/orderPreview.vue
View file @
c7c8ab67
...
@@ -201,45 +201,24 @@ export default {
...
@@ -201,45 +201,24 @@ export default {
methods
:
{
methods
:
{
goOrderHandler
(){
goOrderHandler
(){
let
order
=
{
let
order
=
{
key
:
null
,
CarId
:
this
.
selectedCarObj
.
Id
,
CarObj
:
this
.
selectedCarObj
,
AirportId
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
Id
:
''
,
AirportObj
:
{
startDate
:
this
.
p
.
startDate
,
Address
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
Address
:
''
,
originalB2CPrice
:
this
.
p
.
originalB2CPrice
,
AirportId
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
AirportId
:
''
,
orderInfo
:
this
.
chosenObj
,
AirportName
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
AirportName
:
''
,
Id
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
Id
:
''
,
Name
:
this
.
selectedAirportObj
?
this
.
selectedAirportObj
.
Name
:
''
},
calculationAmount
:
this
.
p
,
calculationNum
:
this
.
chosenObj
,
sumPrice
:
this
.
sumPrice
,
sumPrice
:
this
.
sumPrice
,
details
:
{
Name
:
this
.
dataList
.
Name
,
Description
:
this
.
dataList
.
Description
,
videoStr
:
this
.
dataList
.
videoStr
,
imgCover
:
this
.
dataList
.
imgCover
,
CarType
:
this
.
dataList
.
CarType
,
Id
:
this
.
dataList
.
Id
,
Id
:
this
.
dataList
.
Id
,
CurrencyCode
:
this
.
dataList
.
CurrencyCode
,
onCarId
:
this
.
onCarObj
.
Id
,
},
unCarId
:
this
.
unCarObj
.
Id
,
onCarObj
:
{
Address
:
this
.
onCarObj
?
this
.
onCarObj
.
Address
:
''
,
Name
:
this
.
onCarObj
?
this
.
onCarObj
.
Name
:
''
,
Lat
:
this
.
onCarObj
?
this
.
onCarObj
.
Lat
:
''
,
Lng
:
this
.
onCarObj
?
this
.
onCarObj
.
Lng
:
''
,
Range
:
this
.
onCarObj
?
this
.
onCarObj
.
Range
:
''
,
},
unCarObj
:
{
Address
:
this
.
unCarObj
?
this
.
unCarObj
.
Address
:
''
,
Name
:
this
.
unCarObj
?
this
.
unCarObj
.
Name
:
''
,
Lat
:
this
.
unCarObj
?
this
.
unCarObj
.
Lat
:
''
,
Lng
:
this
.
unCarObj
?
this
.
unCarObj
.
Lng
:
''
,
Range
:
this
.
unCarObj
?
this
.
unCarObj
.
Range
:
''
},
}
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
order
.
key
=
key
let
pickuporderCars
=
localStorage
.
getItem
(
'pickuporderCars'
)
localStorage
.
setItem
(
"pickuporderCars"
,
JSON
.
stringify
(
order
))
pickuporderCars
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
):[]
pickuporderCars
.
push
({
key
,
order
})
localStorage
.
setItem
(
"pickuporderCars"
,
JSON
.
stringify
(
pickuporderCars
))
this
.
CommonJump
(
'/PickuporderForm/'
+
key
,
{});
this
.
CommonJump
(
'/PickuporderForm/'
+
key
,
{});
},
},
// 获取车的详情
// 获取车的详情
...
...
src/components/searchdata/kkday.vue
View file @
c7c8ab67
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</p>
</p>
</div>
</div>
</div>
</div>
<div
style="
display
:
flex
;
justify
-
content
:
center
">
<div
class="
row
justify
-
end
">
<q-pagination
<q-pagination
v-if="
PageCount
>
1
"
v-if="
PageCount
>
1
"
v-model="
msg
.
pageIndex
"
v-model="
msg
.
pageIndex
"
...
@@ -661,7 +661,7 @@ export default {
...
@@ -661,7 +661,7 @@ export default {
this.$q.loading.hide();
this.$q.loading.hide();
if (res.data.resultCode == 1) {
if (res.data.resultCode == 1) {
this.PageCount = res.data.data.page
Data.page
Count;
this.PageCount = res.data.data.pageCount;
this.TotalCount = res.data.data.pageData.count;
this.TotalCount = res.data.data.pageData.count;
var tempArray = res.data.data.pageData.list;
var tempArray = res.data.data.pageData.list;
console.log('getSearch data', tempArray)
console.log('getSearch data', tempArray)
...
...
src/pages/Pickuporder/orderForm.vue
View file @
c7c8ab67
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
/>
/>
<q-img
<q-img
v-else
v-else
:src=
"details?details.
imgCover
[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
:src=
"details?details.
ImageList
[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class=
"rounded-borders"
class=
"rounded-borders"
spinner-color=
"grey-3"
spinner-color=
"grey-3"
style=
"width: 80px"
style=
"width: 80px"
...
@@ -108,11 +108,11 @@
...
@@ -108,11 +108,11 @@
<div
class=
"q-mt-md row"
>
<div
class=
"q-mt-md row"
>
<div
class=
"text-grey-9"
>
<div
class=
"text-grey-9"
>
<q-icon
name=
"iconfont iconrili"
size=
"20px"
class=
"q-mr-sm"
/>
<q-icon
name=
"iconfont iconrili"
size=
"20px"
class=
"q-mr-sm"
/>
<span>
{{
calculationAmount
.
startDate
}}
</span>
<span>
{{
OrderDate
.
startDate
}}
</span>
</div>
</div>
<div
class=
"text-grey-9 q-ml-md"
>
<div
class=
"text-grey-9 q-ml-md"
v-if=
"chosenObj.Count > 0&&CarObj"
>
<q-icon
name=
"iconfont iconjiaotong"
size=
"20px"
class=
"q-mr-sm"
/>
<q-icon
name=
"iconfont iconjiaotong"
size=
"20px"
class=
"q-mr-sm"
/>
<span
class=
"q-mr-sm"
v-if=
"chosenObj.Count > 0"
<span
class=
"q-mr-sm"
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
辆
</span
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
辆
</span
>
>
<span
class=
"q-mr-sm"
<span
class=
"q-mr-sm"
...
@@ -447,7 +447,7 @@
...
@@ -447,7 +447,7 @@
/>
/>
<q-img
<q-img
v-else
v-else
:src=
"details?details.
imgCover
[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
:src=
"details?details.
ImageList
[0]:'https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg'"
class=
"rounded-borders"
class=
"rounded-borders"
spinner-color=
"grey-3"
spinner-color=
"grey-3"
style=
"width: 80px"
style=
"width: 80px"
...
@@ -480,25 +480,24 @@
...
@@ -480,25 +480,24 @@
接駁日期:
</div>
接駁日期:
</div>
<div
class=
"q-ml-md"
>
<div
class=
"q-ml-md"
>
{{parameters.OrderDate}}
{{parameters.OrderDate}}
<!-- {{calculationAmount.startDate}} -->
</div>
</div>
</div>
</div>
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<div
class=
"text-grey-9"
>
<div
class=
"text-grey-9"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.Count>0"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.Count>0
&&CarObj
"
>
<div
class=
"col"
>
{{CarObj.CarName}} x {{ chosenObj.Count }}
</div>
<div
class=
"col"
>
{{CarObj.CarName}} x {{ chosenObj.Count }}
</div>
<div>
{{details.CurrencyCode}} {{ moneyFormat(
sum
Price,2) }}
</div>
<div>
{{details.CurrencyCode}} {{ moneyFormat(
OrderDate.originalB2C
Price,2) }}
</div>
</div>
</div>
<!-- <hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<!-- <hr style="border:none;border-top:1px dashed #EEE !important;" class="bg-transparent q-mb-sm" />
<div class="row q-mb-sm items-center" v-if="(chosenObj.Count)>0">
<div class="row q-mb-sm items-center" v-if="(chosenObj.Count)>0">
<div class="col">總金額</div>
<div class="col">總金額</div>
<div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(sumPrice,2) }}</div>
<div class="text-subtitle2 text-weight-bolder text-primary">{{details.CurrencyCode}} {{ moneyFormat(
OrderDate.
sumPrice,2) }}</div>
</div> -->
</div> -->
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm items-center"
v-if=
"chosenObj.Count>0"
>
<div
class=
"row q-mb-sm items-center"
v-if=
"chosenObj.Count>0"
>
<div
class=
"col"
>
支付金額
</div>
<div
class=
"col"
>
支付金額
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
{{details.CurrencyCode}} {{ moneyFormat(sumPrice,2) }}
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
{{details.CurrencyCode}} {{ moneyFormat(
OrderDate.
sumPrice,2) }}
</div>
</div>
</div>
</div>
</div>
<div
class=
"text-right q-mt-md"
v-if=
"step!=3"
>
<div
class=
"text-right q-mt-md"
v-if=
"step!=3"
>
...
@@ -550,19 +549,22 @@ export default {
...
@@ -550,19 +549,22 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
order
:
null
,
//订单信息
orderKey
:
""
,
orderKey
:
""
,
isRangeClick
:
true
,
isRangeClick
:
true
,
isShowDialog
:
false
,
isShowDialog
:
false
,
AddressObj
:
null
,
AddressObj
:
null
,
onCarObj
:
null
,
//上车范围
onCarObj
:
null
,
//上车范围
unCarObj
:
null
,
//下车范围
unCarObj
:
null
,
//下车范围
onCarId
:
null
,
//上车范围
unCarId
:
null
,
//下车范围
CarObj
:
null
,
//车型
CarObj
:
null
,
//车型
AirportObj
:
null
,
//机场
AirportObj
:
null
,
//机场
calculationAmount
:
null
,
//日期
CarId
:
null
,
//车型
calculationNum
:
null
,
//数量
AirportId
:
null
,
//机场
s
umPrice
:
null
,
//总价
s
tartDate
:
null
,
details
:
null
,
//产品详情
details
:
null
,
//产品详情
options
:
{
options
:
{
//音频控件
currentPage
:
0
,
currentPage
:
0
,
speed
:
300
,
speed
:
300
,
itemAnimation
:
true
,
itemAnimation
:
true
,
...
@@ -640,39 +642,64 @@ export default {
...
@@ -640,39 +642,64 @@ export default {
},
},
created
()
{},
created
()
{},
mounted
()
{
mounted
()
{
this
.
checkParamsHandler
()
if
(
this
.
checkParamsHandler
()){
this
.
getCarData
()
}
this
.
initCountry
();
this
.
initCountry
();
this
.
initGuestHandler
();
this
.
initGuestHandler
();
},
},
methods
:
{
methods
:
{
// 获取商品详情
getCarData
()
{
this
.
$q
.
loading
.
show
();
this
.
apipost
(
"b2c_get_GetCarSingleProductDetail"
,
{
ProductId
:
this
.
parameters
.
ProductId
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
details
=
r
.
data
.
data
;
this
.
CarObj
=
this
.
details
.
CarTypeList
.
find
((
x
)
=>
this
.
OrderDate
.
CarId
==
x
.
Id
);
this
.
onCarObj
=
this
.
details
.
PlaceList
.
find
((
x
)
=>
this
.
onCarId
==
x
.
Id
)
//上车范围
this
.
unCarObj
=
this
.
details
.
PlaceList
.
find
((
x
)
=>
this
.
unCarId
==
x
.
Id
)
//下车范围
if
(
this
.
details
.
CarType
!=
3
){
this
.
AirportObj
=
this
.
details
.
AirportList
.
find
((
x
)
=>
this
.
OrderDate
.
AirportId
==
x
.
Id
);
this
.
parameters
.
AirportId
=
this
.
OrderDate
.
AirportId
this
.
parameters
.
FlightTime
=
this
.
OrderDate
.
startDate
}
this
.
parameters
.
CarId
=
this
.
OrderDate
.
CarId
this
.
parameters
.
OrderType
=
this
.
details
.
CarType
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
message
:
r
.
data
.
message
,
position
:
"top"
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
});
}
this
.
$q
.
loading
.
hide
();
},
null
);
},
checkParamsHandler
()
{
checkParamsHandler
()
{
try
{
try
{
if
(
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
)
{
if
(
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
)
{
let
key
=
this
.
$route
.
params
.
id
;
let
key
=
this
.
$route
.
params
.
id
;
let
pickuporderCars
=
localStorage
.
getItem
(
"pickuporderCars"
);
let
pickuporderCars
=
localStorage
.
getItem
(
"pickuporderCars"
);
let
OrderDate
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
)
:
null
;
pickuporderCars
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
)
:
[];
if
(
OrderDate
)
{
if
(
pickuporderCars
.
length
>
0
)
{
this
.
CarObj
=
OrderDate
.
CarObj
,
//车型
this
.
order
=
pickuporderCars
.
find
((
x
)
=>
x
.
key
==
key
);
this
.
AirportObj
=
OrderDate
.
AirportObj
,
//机场
if
(
this
.
order
)
{
this
.
calculationAmount
=
OrderDate
.
calculationAmount
,
//日期
this
.
chosenObj
=
OrderDate
.
calculationNum
,
//数量
this
.
sumPrice
=
OrderDate
.
sumPrice
,
//总金额
this
.
details
=
OrderDate
.
details
//产品详情
this
.
onCarObj
=
OrderDate
.
onCarObj
//上车范围
this
.
unCarObj
=
OrderDate
.
unCarObj
//下车范围
this
.
parameters
.
ProductId
=
this
.
details
.
Id
this
.
parameters
.
OrderDate
=
this
.
calculationAmount
.
startDate
if
(
this
.
details
.
CarType
!=
3
){
this
.
parameters
.
AirportId
=
this
.
AirportObj
.
Id
this
.
parameters
.
FlightTime
=
this
.
calculationAmount
.
startDate
}
this
.
parameters
.
CarId
=
this
.
CarObj
.
Id
this
.
parameters
.
OrderType
=
this
.
details
.
CarType
this
.
parameters
.
Unit_Price
=
this
.
calculationAmount
.
originalB2CPrice
this
.
parameters
.
Num
=
this
.
chosenObj
.
Count
this
.
parameters
.
Money
=
this
.
sumPrice
if
(
OrderDate
)
{
this
.
orderKey
=
key
;
this
.
orderKey
=
key
;
this
.
chosenObj
=
this
.
order
.
order
.
orderInfo
;
this
.
OrderDate
=
this
.
order
.
order
this
.
parameters
.
ProductId
=
this
.
order
.
order
.
Id
this
.
parameters
.
OrderDate
=
this
.
OrderDate
.
startDate
this
.
parameters
.
Unit_Price
=
this
.
OrderDate
.
originalB2CPrice
this
.
parameters
.
Num
=
this
.
chosenObj
.
Count
this
.
parameters
.
Money
=
this
.
OrderDate
.
sumPrice
this
.
onCarId
=
this
.
OrderDate
.
onCarId
//上车范围
this
.
unCarId
=
this
.
OrderDate
.
unCarId
//下车范围
}
}
}
}
}
}
...
@@ -725,6 +752,7 @@ export default {
...
@@ -725,6 +752,7 @@ export default {
&&
!
this
.
$refs
.
GetonAddress
.
hasError
&&
!
this
.
$refs
.
GetoffAddress
.
hasError
&&
!
this
.
$refs
.
mail
.
hasError
&&
!
this
.
$refs
.
GetonAddress
.
hasError
&&
!
this
.
$refs
.
GetoffAddress
.
hasError
&&
!
this
.
$refs
.
mail
.
hasError
}
}
if
(
!
flag
)
return
this
.
goScrollToForm
(
'baseUserInfoTitle'
)
if
(
!
flag
)
return
this
.
goScrollToForm
(
'baseUserInfoTitle'
)
this
.
SetCarOrder
()
this
.
SetCarOrder
()
},
},
goScrollToForm
(
formName
){
goScrollToForm
(
formName
){
...
@@ -773,8 +801,8 @@ export default {
...
@@ -773,8 +801,8 @@ export default {
Mailbox
:
this
.
userInfo
.
mail
,
//邮箱
Mailbox
:
this
.
userInfo
.
mail
,
//邮箱
GoodsId
:
this
.
parameters
.
ProductId
,
//商品id
GoodsId
:
this
.
parameters
.
ProductId
,
//商品id
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsPic
:
this
.
details
.
imgCover
[
0
],
//商品图片
GoodsPic
:
this
.
details
.
ImageList
[
0
],
//商品图片
GoodsType
:
GoodsType
,
//商品类型(见枚举)
GoodsType
:
GoodsType
,
//商品类型(见枚举)
12包车 13 接机 14送机
OrderMake
:
this
.
parameters
.
OrderDate
,
//订单摘要(例如出行时间)
OrderMake
:
this
.
parameters
.
OrderDate
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
PreferentialPrice
:
0
,
// 优惠总金额
PreferentialPrice
:
0
,
// 优惠总金额
...
@@ -791,10 +819,12 @@ export default {
...
@@ -791,10 +819,12 @@ export default {
this
.
$q
.
notify
({
this
.
$q
.
notify
({
color
:
"green-4"
,
color
:
"green-4"
,
textColor
:
"white"
,
textColor
:
"white"
,
icon
:
"c
loud_done
"
,
icon
:
"c
heck
"
,
message
:
"訂單提交成功"
,
message
:
"訂單提交成功"
,
position
:
'center'
,
position
:
'center'
,
});
});
return
this
.
goPayHandler
(
r
.
data
.
data
)
}
else
{
}
else
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
type
:
"negative"
,
type
:
"negative"
,
...
@@ -806,15 +836,33 @@ export default {
...
@@ -806,15 +836,33 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
goPayHandler
(
pay
){
let
key
=
this
.
$md5
(
JSON
.
stringify
(
pay
))
let
pays
=
localStorage
.
getItem
(
'pays'
)
pays
=
pays
?
JSON
.
parse
(
pays
):[]
pays
.
push
({
key
,
pay
})
localStorage
.
setItem
(
"pays"
,
JSON
.
stringify
(
pays
))
let
pickuporderCars
=
localStorage
.
getItem
(
'pickuporderCars'
)
pickuporderCars
=
pickuporderCars
?
JSON
.
parse
(
pickuporderCars
):[]
let
i
=
pickuporderCars
.
findIndex
(
x
=>
x
.
key
==
this
.
orderKey
)
if
(
i
>=
0
){
pickuporderCars
.
splice
(
i
,
1
)
localStorage
.
setItem
(
"pickuporderCars"
,
JSON
.
stringify
(
pickuporderCars
))
}
this
.
CommonJump
(
'/pay/'
+
key
,
{});
},
// 航班起飞抵达时间
// 航班起飞抵达时间
getTime
(
type
){
getTime
(
type
){
// 1航班时间 2预约时间
// 1航班时间 2预约时间
this
.
onoffbus
=
type
this
.
onoffbus
=
type
if
(
type
==
1
){
if
(
type
==
1
){
this
.
parameters
.
FlightTime
=
this
.
calculationAmount
.
startDate
+
' '
+
this
.
flightTime
this
.
parameters
.
FlightTime
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
flightTime
this
.
$refs
.
qDateProxy1
.
hide
()
this
.
$refs
.
qDateProxy1
.
hide
()
}
else
if
(
type
==
2
){
}
else
if
(
type
==
2
){
this
.
parameters
.
OrderDate
=
this
.
calculationAmount
.
startDate
+
' '
+
this
.
getBusTime
this
.
parameters
.
OrderDate
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
getBusTime
this
.
$refs
.
qDateProxy2
.
hide
()
this
.
$refs
.
qDateProxy2
.
hide
()
}
}
...
...
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