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
af342763
Commit
af342763
authored
Mar 10, 2023
by
沈良进
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/million
parents
072db068
a335ca0c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
174 additions
and
154 deletions
+174
-154
orderPreview.vue
src/components/ScenicSpotTicket/orderPreview.vue
+12
-10
orderPreview.vue
src/components/car/orderPreview.vue
+31
-10
orderForm.vue
src/pages/Pickuporder/orderForm.vue
+56
-33
details.vue
src/pages/ScenicSpotTicket/details.vue
+2
-1
orderForm.vue
src/pages/ScenicSpotTicket/orderForm.vue
+73
-100
No files found.
src/components/ScenicSpotTicket/orderPreview.vue
View file @
af342763
...
...
@@ -10,14 +10,16 @@
flat
/>
</div>
<template
v-if=
"p&&p.startDate"
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇門票類型
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.TicketList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x,1)"
<q-chip
v-if=
"x.originalB2CPrice>0"
size=
"14px"
clickable
@
click=
"handleSelect(x,1)"
:text-color=
"x.checked?'white':'dark'"
:color=
"x.checked?'primary':'grey-3'"
square
>
{{
x
.
TicketName
}}
</q-chip>
</div>
</div>
</
template
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇取票方式
</div>
<div
class=
"row no-wrap"
>
<div
v-for=
"(x,i) in takeList"
:key=
"i"
>
...
...
@@ -37,13 +39,13 @@
</div>
<div
v-if=
"$q.platform.is.mobile"
>
<span
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{
moneyFormat
(
x
.
originalB2CPrice
,
0
)
}}
/每
票
CNY
{{
moneyFormat
(
x
.
originalB2CPrice
,
0
)
}}
/每
张
</span>
</div>
</div>
<div
class=
"row items-end"
v-if=
"x.checked"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{
moneyFormat
(
x
.
originalB2CPrice
,
0
)
}}
/每
票
CNY
{{
moneyFormat
(
x
.
originalB2CPrice
,
0
)
}}
/每
张
</span>
<q-input
style=
"width: 150px"
...
...
@@ -180,7 +182,7 @@ export default {
MailingMoney
:
this
.
p
.
MailingMoney
,
originalB2CPrice
:
this
.
p
.
originalB2CPrice
,
sumPrice
:
this
.
sumPrice
,
TicketList
:
this
.
dataList
.
TicketList
TicketList
:
this
.
dataList
.
TicketList
.
filter
(
x
=>
x
.
checked
)
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
pickuporderScenTickets
=
localStorage
.
getItem
(
'pickuporderScenTickets'
)
...
...
src/components/car/orderPreview.vue
View file @
af342763
...
...
@@ -43,15 +43,16 @@
</div>
</div>
<
template
v-if=
"TicketIds&&TicketIds.length>0"
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.CarTypeList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
<q-chip
v-if=
"TicketIds.indexOf(x.Id)!=-1"
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
:text-color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
CarName
}}
(
{{
x
.
PeopleNum
}}
人)
</q-chip>
</div>
</div>
</
template
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇數量
</div>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"{'column':$q.platform.is.mobile}"
>
...
...
@@ -150,6 +151,8 @@ export default {
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
let
arr
=
this
.
dataAll
.
filter
(
x
=>
x
.
Date
==
this
.
chosenObj
.
startDate
)
this
.
TicketIds
=
arr
[
0
].
Price
.
map
(
x
=>
{
return
x
.
TicketId
})
// this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.dataList.CarTypeList[0]
}
...
...
@@ -178,17 +181,17 @@ export default {
selectedAirportObj
:
null
,
onCarObj
:
null
,
unCarObj
:
null
,
TicketIds
:
null
};
},
created
()
{
this
.
initModel
();
console
.
log
(
this
.
p
,
'======='
)
if
(
this
.
p
.
startDate
){
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
getCarPriceData2
()
}
this
.
getCarPriceData
()
},
methods
:
{
goOrderHandler
(){
...
...
@@ -267,6 +270,24 @@ export default {
},
null
)
},
getCarPriceData
()
{
this
.
priceList
=
[]
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPriceAll"
,
{
ProductId
:
this
.
configId
,
Month
:
this
.
Month
,
// AirportId: '',
// CarTypeId: this.selectedCarObj.Id
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
dataAll
=
r
.
data
.
data
}
},
null
)
},
handleSelectAirport
(
item
){
this
.
selectedAirportObj
=
item
},
...
...
src/pages/Pickuporder/orderForm.vue
View file @
af342763
...
...
@@ -170,7 +170,7 @@
standout
v
-
model
=
"parameters.Mobile"
label
=
"電話"
:
rules
=
"[(val) => !!val
&& val.length == 11
|| '請輸正確電話']"
:
rules
=
"[(val) => !!val || '請輸正確電話']"
ref
=
"Mobile"
mask
=
"#"
reverse
-
fill
-
mask
...
...
@@ -423,6 +423,12 @@
<
q
-
input
standout
v
-
model
=
"parameters.Remark"
input
-
style
=
"height:170px;"
type
=
"textarea"
placeholder
=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength
=
"200"
counter
/>
<
/q-card
>
<
/q-form
>
<
coupon
v
-
if
=
"sumPrice>0&&productType"
:
product
-
type
=
"productType"
:
current
-
price
=
"sumPrice"
@
change
=
"changeDiscountHandler"
><
/coupon
>
<
/div
>
<
div
class
=
"relative-position"
v
-
if
=
"details"
...
...
@@ -510,15 +516,21 @@
<
div
class
=
"col"
>
{{
CarObj
.
CarName
}}
x
{{
chosenObj
.
Count
}}
<
/div
>
<
div
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
originalB2CPrice
,
2
)
}}
<
/div
>
<
/div
>
<!--
<
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
=
"col"
>
總金額
<
/div
>
<
div
class
=
"text-subtitle2 text-weight-bolder text-primary"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
/div> --
>
<
hr
style
=
"border:none;border-top:1px dashed #EEE !important;"
class
=
"bg-transparent q-mb-sm"
/>
<
div
class
=
"row q-mb-sm items-center"
>
<
div
class
=
"col"
>
優惠金額
<
/div
>
<
div
class
=
"text-subtitle2 text-weight-bolder text-teal"
v
-
if
=
"parameters.DiscountsMoney > 0"
>
CNY
-
{{
moneyFormat
(
parameters
.
DiscountsMoney
,
2
)
}}
<
/div
>
<
div
class
=
"text-grey-5"
v
-
else
>
暫無優惠
<
/div
>
<
/div
>
<
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
=
"col"
>
支付金額
<
/div
>
<
div
class
=
"text-h6 text-weight-bolder text-primary product-price"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
OrderDate
.
sumPrice
,
2
)
}}
<
/div
>
<
div
class
=
"text-h6 text-weight-bolder text-primary product-price"
>
{{
details
.
CurrencyCode
}}
{{
moneyFormat
(
parameters
.
Money
,
2
)
}}
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"text-right q-mt-md"
v
-
if
=
"step!=3"
>
...
...
@@ -570,6 +582,9 @@ export default {
}
,
data
()
{
return
{
CouponIds
:
[],
productType
:
null
,
sumPrice
:
0
,
//总金额
order
:
null
,
//订单信息
orderKey
:
""
,
isShowDialog
:
false
,
...
...
@@ -608,6 +623,8 @@ export default {
Unit_Price
:
''
,
//单价
Num
:
''
,
//数量
Money
:
0.0
,
DiscountsMoney
:
0
,
//优惠金额
DiscountsIds
:
''
,
//优惠券id
Sex
:
1
,
//1男2女
SurName
:
''
,
//姓
Name
:
''
,
//名
...
...
@@ -661,6 +678,19 @@ export default {
this
.
getUserInfoHandler
()
}
,
methods
:
{
changeDiscountHandler
(
coupon
)
{
if
(
coupon
)
{
this
.
parameters
.
DiscountsMoney
=
coupon
.
discountMoney
;
this
.
CouponIds
=
[
coupon
.
couponId
];
this
.
parameters
.
DiscountsIds
=
this
.
CouponIds
.
join
(
","
)
}
else
{
this
.
parameters
.
DiscountsMoney
=
0
;
this
.
CouponIds
=
[];
this
.
parameters
.
DiscountsIds
=
''
}
this
.
parameters
.
Money
=
this
.
sumPrice
-
this
.
parameters
.
DiscountsMoney
this
.
$forceUpdate
();
}
,
// 获取商品详情
getCarData
()
{
this
.
$q
.
loading
.
show
();
...
...
@@ -680,6 +710,14 @@ export default {
}
this
.
parameters
.
CarId
=
this
.
OrderDate
.
CarId
this
.
parameters
.
OrderType
=
this
.
details
.
CarType
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
this
.
productType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
this
.
productType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
this
.
productType
=
12
}
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
...
...
@@ -711,6 +749,7 @@ export default {
this
.
parameters
.
Unit_Price
=
this
.
OrderDate
.
originalB2CPrice
this
.
parameters
.
Num
=
this
.
chosenObj
.
Count
this
.
parameters
.
Money
=
this
.
OrderDate
.
sumPrice
this
.
sumPrice
=
this
.
OrderDate
.
sumPrice
}
}
}
...
...
@@ -780,15 +819,7 @@ export default {
}
)
}
,
AddOrderInfo
(
ErpOrderId
){
let
GoodsType
=
null
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
GoodsType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
GoodsType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
GoodsType
=
12
}
this
.
apipost
(
"AddOrderInfo_post"
,
{
...
...
@@ -799,10 +830,10 @@ export default {
GoodsId
:
this
.
parameters
.
ProductId
,
//商品id
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsPic
:
this
.
details
.
ImageList
[
0
],
//商品图片
GoodsType
:
Goods
Type
,
//商品类型(见枚举) 12包车 13 接机 14送机
GoodsType
:
this
.
product
Type
,
//商品类型(见枚举) 12包车 13 接机 14送机
OrderMake
:
this
.
parameters
.
OrderDate
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
PreferentialPrice
:
0
,
// 优惠总金额
PreferentialPrice
:
this
.
parameters
.
DiscountsMoney
,
// 优惠总金额
ErpOrderId
:
ErpOrderId
,
//erp订单id
Country
:
this
.
userInfo
.
Country
,
//国家id
PlatformTax
:
0
,
//平台税金默认0
...
...
@@ -821,22 +852,14 @@ export default {
}
)
}
,
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
))
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
,
{
}
);
this
.
CommonJump
(
"/pay/"
+
pay
.
OrderNo
,
{
}
);
}
,
// 航班起飞抵达时间
getTime
(
type
){
...
...
src/pages/ScenicSpotTicket/details.vue
View file @
af342763
...
...
@@ -920,13 +920,14 @@ export default {
let
arr
=
[]
r
.
data
.
data
.
forEach
(
x
=>
{
x
.
PriceList
=
x
.
PriceList
.
sort
((
a
,
b
)
=>
{
return
a
.
Price
-
b
.
Price
}
)
let
MailingMoneyList
=
x
.
PriceList
.
sort
((
a
,
b
)
=>
{
return
b
.
MailingMoney
-
a
.
MailingMoney
}
)
let
dataObj
=
{
startDate
:
x
.
Date
,
originalB2CPrice
:
x
.
PriceList
[
0
].
Price
,
remainNum
:
1
,
Count
:
1
,
safeMoney
:
0
,
MailingMoney
:
x
.
Price
List
[
0
].
MailingMoney
,
MailingMoney
:
MailingMoney
List
[
0
].
MailingMoney
,
PriceList
:
x
.
PriceList
,
}
if
(
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)
!=
x
.
Date
&&
x
.
Date
>
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)){
...
...
src/pages/ScenicSpotTicket/orderForm.vue
View file @
af342763
...
...
@@ -161,7 +161,7 @@
standout
v-model=
"parameters.Mobile"
label=
"電話"
:rules=
"[(val) => !!val
&& val.length == 11
|| '請輸正確電話']"
:rules=
"[(val) => !!val || '請輸正確電話']"
ref=
"Mobile"
mask=
"#"
reverse-fill-mask
...
...
@@ -170,6 +170,15 @@
<div
class=
"text-subtitle2"
>
+
{{
userInfo
.
areaCode
}}
</div>
</
template
>
</q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"parameters.MailingAddress"
label=
"郵寄地址"
:rules=
"[(val) => !!val || '請輸郵寄地址']"
ref=
"MailingAddress"
></q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<div
class=
"row items-center q-mt-md"
>
...
...
@@ -190,6 +199,12 @@
<q-input
standout
v-model=
"parameters.Remark"
input-style=
"height:170px;"
type=
"textarea"
placeholder=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength=
"200"
counter
/>
</q-card>
</q-form>
<coupon
v-if=
"sumPrice>0"
:product-type=
"productType"
:current-price=
"sumPrice"
@
change=
"changeDiscountHandler"
></coupon>
</div>
<div
class=
"relative-position"
v-if=
"details"
...
...
@@ -246,22 +261,6 @@
</div>
</div>
<div
class=
"q-mt-md text-grey-6"
>
<div
class=
"row q-pb-xs no-wrap"
v-if=
"AirportObj&&AirportObj.Name"
>
<div
style=
"width: 80px"
>
{{details.CarType==1?'接':'送'}}機機場:
</div>
<div
class=
"q-ml-md ellipsis-2-lines"
>
{{AirportObj.Name}}
</div>
</div>
<div
class=
"row q-pb-xs no-wrap"
v-if=
"AirportObj&&AirportObj.Name"
>
<div
style=
"width: 80px"
>
{{details.CarType==1?'抵達':'起飛'}}時間:
</div>
<div
class=
"q-ml-md ellipsis-2-lines"
>
{{parameters.FlightTime}}
</div>
</div>
<div
class=
"row q-pb-xs no-wrap"
v-if=
"parameters.GetonAddress"
>
<div
style=
"width: 80px"
>
上車點:
</div>
<div
class=
"q-ml-md ellipsis-2-lines"
>
{{parameters.GetonAddress}}
</div>
</div>
<div
class=
"row q-pb-xs no-wrap"
v-if=
"parameters.GetoffAddress"
>
<div
style=
"width: 80px"
>
下車點:
</div>
<div
class=
"q-ml-md ellipsis-2-lines"
>
{{parameters.GetoffAddress}}
</div>
</div>
<div
class=
"row"
>
<div
style=
"width: 80px"
>
门票日期:
</div>
...
...
@@ -280,14 +279,30 @@
</
template
>
</div>
</template>
<div
class=
"row q-mb-sm"
v-if=
"parameters.MailingState==2&¶meters.MailingMoney>0"
>
<div
class=
"col text-grey-6"
>
邮寄费
</div>
<div
class=
"text-red"
>
{{ moneyFormat(parameters.MailingMoney,2) }}
</div>
</div>
<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=
"parameters.MailingState==2&¶meters.MailingMoney>0"
>
<div
class=
"col"
>
邮寄费
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-grey-6"
>
CNY {{ moneyFormat(parameters.MailingMoney,2) }}
</div>
</div>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
優惠金額
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-teal"
v-if=
"parameters.DiscountsMoney > 0"
>
CNY - {{ moneyFormat(parameters.DiscountsMoney, 2) }}
</div>
<div
class=
"text-grey-5"
v-else
>
暫無優惠
</div>
</div>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
支付金額
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
{{details.CurrencyCode}} {{ moneyFormat(OrderDate.sumPrice,2) }}
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
CNY {{ moneyFormat(parameters.Money, 2) }}
</div>
</div>
</div>
<div
class=
"text-right q-mt-md"
v-if=
"step!=3"
>
...
...
@@ -300,18 +315,6 @@
</div>
</div>
</div>
<q-dialog
v-model=
"isShowDialog"
>
<q-card
class=
"q-pa-lg"
:style=
"{'width':$q.platform.is.desktop?'100%':'500px'}"
>
<div
class=
"text-h6Detail"
>
<span>
乘客{{onoffbus==1?'上':'下'}}車範圍
</span>
<i
class=
"iconfont iconbaseline-close-px"
@
click=
"isShowDialog=false"
></i>
</div>
<q-separator
/>
<div
style=
"max-height: 600px;padding:20px 0"
class=
"scroll"
>
<componentsMap
:AddressObj=
"onoptionObj"
/>
</div>
</q-card>
</q-dialog>
<div
v-if=
"!orderKey || orderKey == ''"
class=
"text-center q-my-xl"
>
<none-data
iconType=
"order"
...
...
@@ -329,6 +332,7 @@
import
{
date
}
from
'quasar'
import
{
json
}
from
"body-parser"
;
import
coupon
from
'src/components/common/coupon.vue'
import
ProductTypeEnum
from
"src/utils/producttypeenum"
;
import
componentsMap
from
"src/components/car/Map.vue"
;
export
default
{
components
:{
...
...
@@ -339,14 +343,12 @@
},
data
()
{
return
{
CouponIds
:
[],
productType
:
4
,
sumPrice
:
0
,
//总金额
order
:
null
,
//订单信息
orderKey
:
""
,
isShowDialog
:
false
,
AddressObj
:
null
,
onoptionObj
:
null
,
//上车范围
unoptionObj
:
null
,
//下车范围
optionObj
:
null
,
//车型
AirportObj
:
null
,
//机场
optionObj
:
null
,
//类型
details
:
null
,
//产品详情
options
:
{
//音频控件
currentPage
:
0
,
...
...
@@ -366,13 +368,14 @@
areaCode
:
""
,
Mailbox
:
""
,
},
chosenObj
:
{},
countrys
:
[],
areaCodes
:
[],
loading
:
false
,
parameters
:
{
OrderId
:
0
,
Money
:
0.0
,
DiscountsMoney
:
0
,
//优惠金额
DiscountsIds
:
''
,
//优惠券id
Remark
:
''
,
MailingState
:
''
,
//邮寄状态 1自取 2邮寄
MailingAddress
:
''
,
//MailingState =2 填写邮寄
...
...
@@ -388,11 +391,7 @@
DetailList
:[],
OrderSource
:
1
,
//类型 0 来源B2B 1 来源B2C
},
flightTime
:
null
,
//航班起飞抵达时间
getBusTime
:
null
,
//预约车时间
getBusTimeDate
:
null
,
//预约日期
TotalPeople
:
0
,
//总人数
onoffbus
:
1
,
//1 上车 2下车
};
},
computed
:
{
...
...
@@ -419,6 +418,19 @@
this
.
getUserInfoHandler
()
},
methods
:
{
changeDiscountHandler
(
coupon
)
{
if
(
coupon
)
{
this
.
parameters
.
DiscountsMoney
=
coupon
.
discountMoney
;
this
.
CouponIds
=
[
coupon
.
couponId
];
this
.
parameters
.
DiscountsIds
=
this
.
CouponIds
.
join
(
","
)
}
else
{
this
.
parameters
.
DiscountsMoney
=
0
;
this
.
CouponIds
=
[];
this
.
parameters
.
DiscountsIds
=
''
}
this
.
parameters
.
Money
=
this
.
sumPrice
-
this
.
parameters
.
DiscountsMoney
this
.
$forceUpdate
();
},
// 获取商品详情
getData
()
{
this
.
$q
.
loading
.
show
();
...
...
@@ -478,6 +490,7 @@
this
.
parameters
.
DetailList
.
push
(
y
)
}
})
this
.
sumPrice
=
this
.
OrderDate
.
sumPrice
}
}
}
...
...
@@ -497,6 +510,12 @@
this
.
$refs
.
SurName
.
validate
()
this
.
$refs
.
Name
.
validate
()
this
.
$refs
.
Mobile
.
validate
()
if
(
this
.
parameters
.
MailingState
==
2
){
this
.
$refs
.
MailingAddress
.
validate
()
}
else
{
this
.
parameters
.
MailingAddress
=
''
}
console
.
log
(
this
.
parameters
,
'----'
)
let
flag
=
true
flag
=
await
this
.
formValidateHandler
(
'baseUserInfo'
)
...
...
@@ -518,7 +537,6 @@
"ticket_post_SetTicketOrder"
,
this
.
parameters
,
(
r
)
=>
{
// this.$refs.myform.resetValidation()
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
step
=
2
let
ErpOrderId
=
r
.
data
.
data
.
Id
...
...
@@ -530,15 +548,6 @@
})
},
AddOrderInfo
(
ErpOrderId
){
let
GoodsType
=
null
//13接机 14送机 12包车
if
(
this
.
parameters
.
OrderType
==
1
){
GoodsType
=
13
}
else
if
(
this
.
parameters
.
OrderType
==
2
){
GoodsType
=
14
}
else
if
(
this
.
parameters
.
OrderType
==
3
){
GoodsType
=
12
}
this
.
apipost
(
"AddOrderInfo_post"
,
{
...
...
@@ -549,10 +558,10 @@
GoodsId
:
this
.
parameters
.
CouponsId
,
//商品id
GoodsName
:
this
.
details
.
Name
,
//商品名称
GoodsPic
:
this
.
details
.
PicPathList
[
0
],
//商品图片
GoodsType
:
4
,
GoodsType
:
this
.
productType
,
OrderMake
:
this
.
parameters
.
UseDate
,
//订单摘要(例如出行时间)
TotalPrice
:
this
.
parameters
.
Money
,
//总价格
PreferentialPrice
:
0
,
// 优惠总金额
PreferentialPrice
:
this
.
parameters
.
DiscountsMoney
,
// 优惠总金额
ErpOrderId
:
ErpOrderId
,
//erp订单id
Country
:
this
.
userInfo
.
Country
,
//国家id
PlatformTax
:
0
,
//平台税金默认0
...
...
@@ -571,37 +580,14 @@
})
},
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
pickuporderScenTickets
=
localStorage
.
getItem
(
'pickuporderScenTickets'
)
pickuporderScenTickets
=
pickuporderScenTickets
?
JSON
.
parse
(
pickuporderScenTickets
):[]
let
i
=
pickuporderScenTickets
.
findIndex
(
x
=>
x
.
key
==
this
.
orderKey
)
if
(
i
>=
0
){
pickuporderScenTickets
.
splice
(
i
,
1
)
localStorage
.
setItem
(
"pickuporderScenTickets"
,
JSON
.
stringify
(
pickuporderScenTickets
))
}
this
.
CommonJump
(
'/pay/'
+
key
,
{});
},
// 航班起飞抵达时间
getTime
(
type
){
// 1航班时间 2预约时间
this
.
onoffbus
=
type
if
(
type
==
1
){
this
.
parameters
.
FlightTime
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
flightTime
this
.
$refs
.
qDateProxy1
.
hide
()
}
else
if
(
type
==
2
){
this
.
parameters
.
UseDate
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
getBusTime
this
.
$refs
.
qDateProxy2
.
hide
()
}
else
if
(
type
==
3
){
this
.
parameters
.
UseDate
=
this
.
OrderDate
.
startDate
+
' '
+
this
.
getBusTime
let
pickuporderScenTickets
=
localStorage
.
getItem
(
"pickuporderScenTickets"
);
pickuporderScenTickets
=
pickuporderScenTickets
?
JSON
.
parse
(
pickuporderScenTickets
)
:
[];
let
i
=
pickuporderScenTickets
.
findIndex
((
x
)
=>
x
.
key
==
this
.
orderKey
);
if
(
i
>=
0
)
{
pickuporderScenTickets
.
splice
(
i
,
1
);
localStorage
.
setItem
(
"pickuporderScenTickets"
,
JSON
.
stringify
(
pickuporderScenTickets
));
}
this
.
CommonJump
(
"/pay/"
+
pay
.
OrderNo
,
{});
},
optionsFn
(
cd
)
{
return
(
...
...
@@ -609,19 +595,6 @@
date
.
formatDate
(
date
.
addToDate
(
new
Date
(),
{
days
:
0
}),
"YYYY/MM/DD"
)
);
},
// 地图上选址
getAddress
(
type
){
if
(
type
==
1
){
this
.
AddressObj
=
this
.
onoptionObj
}
else
{
this
.
AddressObj
=
this
.
unoptionObj
}
this
.
isShowDialog
=
true
},
// 计算人数
getNum
(){
this
.
TotalPeople
=
this
.
parameters
.
ManNum
+
this
.
parameters
.
ChildNum
+
this
.
parameters
.
BabyNum
},
// 音频
slideHandler
(
e
)
{
this
.
options
.
currentPage
=
e
.
currentPage
;
...
...
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