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
8c32791b
Commit
8c32791b
authored
Mar 06, 2023
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增支付页面
parent
0c41724d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
357 additions
and
48 deletions
+357
-48
message.js
src/boot/message.js
+31
-0
user.js
src/boot/user.js
+1
-1
utils.js
src/boot/utils.js
+4
-4
orderPreview.vue
src/components/trip/orderPreview.vue
+1
-1
orderPreview.vue
src/pages/line/orderPreview.vue
+251
-27
pay.vue
src/pages/line/pay.vue
+49
-0
routes.js
src/router/routes.js
+20
-15
No files found.
src/boot/message.js
0 → 100644
View file @
8c32791b
import
{
Notify
,
QSpinnerIos
}
from
'quasar'
const
message
=
{
warn
:
(
msg
)
=>
{
Notify
.
create
({
message
:
msg
,
color
:
'warning'
,
textColor
:
'dark'
,
position
:
'top'
,
icon
:
'announcement'
})
},
error
:
(
msg
)
=>
{
Notify
.
create
({
message
:
msg
,
type
:
'negative'
,
position
:
'top'
})
},
success
:
(
msg
)
=>
{
Notify
.
create
({
message
:
msg
,
color
:
'positive'
,
position
:
'top'
,
textColor
:
'white'
,
icon
:
'check'
})
}
}
export
default
message
\ No newline at end of file
src/boot/user.js
View file @
8c32791b
...
@@ -18,7 +18,7 @@ const user = {
...
@@ -18,7 +18,7 @@ const user = {
if
(
u
)
{
if
(
u
)
{
localStorage
.
setItem
(
'b2bUser'
,
JSON
.
stringify
(
u
))
localStorage
.
setItem
(
'b2bUser'
,
JSON
.
stringify
(
u
))
}
else
{
}
else
{
localStorage
.
setItem
(
'b2bUser'
,
JSON
.
stringify
(
u
)
)
//localStorage.removeItem('b2bUser'
)
}
}
},
},
loginOut
()
{
loginOut
()
{
...
...
src/boot/utils.js
View file @
8c32791b
...
@@ -2,17 +2,17 @@ import Vue from 'vue'
...
@@ -2,17 +2,17 @@ import Vue from 'vue'
import
axios
from
'axios'
import
axios
from
'axios'
import
md5
from
'js-md5'
import
md5
from
'js-md5'
// import {eventBus} from './eventBus'
// import {eventBus} from './eventBus'
//
import VueCoreVideoPlayer from 'vue-core-video-players'
import
VueCoreVideoPlayer
from
'vue-core-video-players'
import
'viewerjs/dist/viewer.css'
import
'viewerjs/dist/viewer.css'
import
Vuelidate
from
'vuelidate'
import
user
from
'./user'
import
user
from
'./user'
import
message
from
'./message'
import
VueViewer
from
'v-viewer'
import
VueViewer
from
'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
// import VueCoreVideoPlayer from 'vue-core-video-player'
Vue
.
prototype
.
$EventBus
=
new
Vue
()
Vue
.
prototype
.
$EventBus
=
new
Vue
()
//
Vue.use(VueCoreVideoPlayer)
Vue
.
use
(
VueCoreVideoPlayer
)
Vue
.
use
(
VueViewer
)
Vue
.
use
(
VueViewer
)
Vue
.
prototype
.
$md5
=
md5
;
Vue
.
prototype
.
$md5
=
md5
;
Vue
.
use
(
Vuelidate
)
Vue
.
prototype
.
$message
=
message
//域名管理对象
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
let
domainUrl
=
''
;
...
...
src/components/trip/orderPreview.vue
View file @
8c32791b
...
@@ -381,7 +381,7 @@ export default {
...
@@ -381,7 +381,7 @@ export default {
if
(
this
.
p
.
startDate
)
{
if
(
this
.
p
.
startDate
)
{
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
();
this
.
calcMoney
();
if
(
this
.
p
.
unionCityList
&&
this
.
p
.
unionCityList
.
length
>
0
){
if
(
this
.
p
.
unionCityList
&&
this
.
p
.
unionCityList
.
length
>
0
&&
this
.
p
.
originalB2CPrice
==
this
.
p
.
RealPrice
){
this
.
currentUnionCity
=
this
.
p
.
unionCityList
[
0
]
this
.
currentUnionCity
=
this
.
p
.
unionCityList
[
0
]
}
}
}
}
...
...
src/pages/line/orderPreview.vue
View file @
8c32791b
...
@@ -50,8 +50,6 @@
...
@@ -50,8 +50,6 @@
standout
standout
v-model=
"userInfo.Name"
v-model=
"userInfo.Name"
label=
"名字"
label=
"名字"
mask=
"A"
reverse-fill-mask
ref=
"name"
ref=
"name"
:rules=
"[(val) => !!val || '請輸入名字']"
:rules=
"[(val) => !!val || '請輸入名字']"
/>
/>
...
@@ -62,8 +60,6 @@
...
@@ -62,8 +60,6 @@
v-model=
"userInfo.Surname"
v-model=
"userInfo.Surname"
ref=
"surname"
ref=
"surname"
label=
"姓氏"
label=
"姓氏"
mask=
"A"
reverse-fill-mask
:rules=
"[(val) => !!val || '請輸入姓氏']"
:rules=
"[(val) => !!val || '請輸入姓氏']"
/>
/>
</div>
</div>
...
@@ -171,7 +167,7 @@
...
@@ -171,7 +167,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.
First
Name"
v-model=
"x.
Sur
Name"
label=
"本國姓"
label=
"本國姓"
placeholder=
"例:張"
placeholder=
"例:張"
:rules=
"[(val) => !!val || '請輸本國姓']"
:rules=
"[(val) => !!val || '請輸本國姓']"
...
@@ -180,7 +176,7 @@
...
@@ -180,7 +176,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.
Last
Name"
v-model=
"x.Name"
label=
"本國名"
label=
"本國名"
placeholder=
"例:三"
placeholder=
"例:三"
:rules=
"[(val) => !!val || '請輸本國名']"
:rules=
"[(val) => !!val || '請輸本國名']"
...
@@ -202,7 +198,7 @@
...
@@ -202,7 +198,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.
PassFirst
Name"
v-model=
"x.
ESur
Name"
label=
"護照英文姓"
label=
"護照英文姓"
placeholder=
"例:ZHANG"
placeholder=
"例:ZHANG"
mask=
"A"
mask=
"A"
...
@@ -213,7 +209,7 @@
...
@@ -213,7 +209,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.
PassLast
Name"
v-model=
"x.
E
Name"
label=
"護照英文名"
label=
"護照英文名"
placeholder=
"例:SAN"
placeholder=
"例:SAN"
mask=
"A"
mask=
"A"
...
@@ -224,7 +220,7 @@
...
@@ -224,7 +220,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.Passport"
v-model=
"x.Passport
No
"
label=
"護照號"
label=
"護照號"
mask=
"X"
mask=
"X"
reverse-fill-mask
reverse-fill-mask
...
@@ -234,7 +230,7 @@
...
@@ -234,7 +230,7 @@
<div
:class=
"filedGuestWidth"
>
<div
:class=
"filedGuestWidth"
>
<q-input
<q-input
standout
standout
v-model=
"x.Pass
Validate
"
v-model=
"x.Pass
portExpiry
"
label=
"護照有效期"
label=
"護照有效期"
readonly
readonly
:rules=
"[(val) => !!val || '請選擇護照有效期']"
:rules=
"[(val) => !!val || '請選擇護照有效期']"
...
@@ -247,8 +243,28 @@
...
@@ -247,8 +243,28 @@
mask=
"YYYY-MM-DD"
mask=
"YYYY-MM-DD"
:title=
"$t('search_date_begin')"
:title=
"$t('search_date_begin')"
subtitle=
"選擇"
subtitle=
"選擇"
v-model=
"x.PassValidate"
v-model=
"x.PassportExpiry"
@
input=
"() => $refs.qDateProxy7.hide()"
/>
</q-popup-proxy>
</q-input>
</div>
<div
:class=
"filedGuestWidth"
>
<q-input
standout
v-model=
"x.Birthday"
label=
"出生日期"
readonly
:rules=
"[(val) => !!val || '請選擇旅客出生日期']"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
></q-icon>
</
template
>
<q-popup-proxy
:offset=
"[0, 0]"
ref=
"qDateProxy8"
>
<q-date
mask=
"YYYY-MM-DD"
:title=
"$t('search_date_begin')"
subtitle=
"選擇"
v-model=
"x.Birthday"
/>
/>
</q-popup-proxy>
</q-popup-proxy>
</q-input>
</q-input>
...
@@ -258,7 +274,7 @@
...
@@ -258,7 +274,7 @@
standout
standout
v-model=
"x.MobilePhone"
v-model=
"x.MobilePhone"
label=
"聯絡電話"
label=
"聯絡電話"
mask=
"
+# #
"
mask=
""
reverse-fill-mask
reverse-fill-mask
placeholder=
"格式:國家區號+號碼,例如:+81 25xxxx"
placeholder=
"格式:國家區號+號碼,例如:+81 25xxxx"
/>
/>
...
@@ -336,7 +352,7 @@
...
@@ -336,7 +352,7 @@
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
style=
"width: 80px"
>
出發日期:
</div>
<div
style=
"width: 80px"
>
出發日期:
</div>
<div
class=
"q-ml-md"
>
{{ price.startDate }}
</div>
<div
class=
"q-ml-md"
>
{{
unionCity
&&
unionCity.goFlight? unionCity.goFlight.startDate :
price.startDate }}
</div>
</div>
</div>
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
...
@@ -357,6 +373,30 @@
...
@@ -357,6 +373,30 @@
<div
class=
"col"
>
嬰兒不佔床 x {{ chosenObj.yeCount }}
</div>
<div
class=
"col"
>
嬰兒不佔床 x {{ chosenObj.yeCount }}
</div>
<div>
CNY {{ moneyFormat(price.babyPrice, 2) }}
</div>
<div>
CNY {{ moneyFormat(price.babyPrice, 2) }}
</div>
</div>
</div>
<div
v-if=
"price.safeMoney>0"
>
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm"
v-if=
"price.safeMoney > 0"
>
<div
class=
"col"
>
保險費 x {{ price.safeMoney }}/人
</div>
<div>
CNY {{ moneyFormat(price.safeMoney*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}
</div>
</div>
</div>
<div
v-if=
"price.visaPrice>0||price.otherPrice>0"
>
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm"
v-if=
"price.visaPrice > 0"
>
<div
class=
"col"
>
簽證費 x {{ price.visaPrice }}/人
</div>
<div>
CNY {{ moneyFormat(price.visaPrice*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}
</div>
</div>
<div
class=
"row q-mb-sm"
v-if=
"price.otherPrice > 0"
>
<div
class=
"col"
>
雜費 x {{ price.otherPrice }}/人
</div>
<div>
CNY {{ moneyFormat(price.otherPrice*(chosenObj.crCount+chosenObj.etCount+chosenObj.yeCount), 2) }}
</div>
</div>
</div>
<hr
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
class=
"bg-transparent q-mb-sm"
...
@@ -375,6 +415,7 @@
...
@@ -375,6 +415,7 @@
CNY {{ moneyFormat(sumPrice, 2) }}
CNY {{ moneyFormat(sumPrice, 2) }}
</div>
</div>
</div>
</div>
<hr
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
class=
"bg-transparent q-mb-sm"
...
@@ -416,6 +457,7 @@
...
@@ -416,6 +457,7 @@
import
coupon
from
"../../components/common/coupon.vue"
;
import
coupon
from
"../../components/common/coupon.vue"
;
import
NoneData
from
"src/components/common/noneData.vue"
;
import
NoneData
from
"src/components/common/noneData.vue"
;
import
auth
from
"src/components/common/auth.vue"
;
import
auth
from
"src/components/common/auth.vue"
;
import
{
date
}
from
'quasar'
export
default
{
export
default
{
components
:
{
components
:
{
coupon
,
coupon
,
...
@@ -464,19 +506,36 @@ export default {
...
@@ -464,19 +506,36 @@ export default {
countrys
:
[],
countrys
:
[],
areaCodes
:
[],
areaCodes
:
[],
guest
:
{
guest
:
{
FirstName
:
""
,
Id
:
0
,
LastName
:
""
,
TCID
:
0
,
Passport
:
""
,
OrderId
:
0
,
PassFirstName
:
""
,
VisaPlanId
:
0
,
PassLastName
:
""
,
SurName
:
"羅"
,
Name
:
"超"
,
PassportNo
:
"D56465465"
,
ESurName
:
"LUO"
,
EName
:
"CHAO"
,
GuestType
:
0
,
GuestType
:
0
,
EnableSignRoom
:
false
,
EnableSignRoom
:
false
,
Pass
Validate
:
"
"
,
Pass
portExpiry
:
"2035-12-31
"
,
FormatTypeName
:
""
,
FormatTypeName
:
""
,
MobilePhone
:
""
,
MobilePhone
:
"
17308037817
"
,
RoomType
:
0
,
RoomType
:
0
,
IsSignRoom
:
false
,
IsSignRoom
:
false
,
Sex
:
0
,
Sex
:
1
,
IdCard
:
''
,
PassportIssued
:
''
,
Purpose
:
"观光"
,
IsBed
:
1
,
IsNeedAirticket
:
2
,
IsNeedSafe
:
1
,
IsVisaFree
:
2
,
IssuingAuthority
:
2
,
IsCriminalRecord
:
2
,
IsDepartureRecord
:
2
,
IsHightSchool
:
2
,
IsB2B
:
1
,
Birthday
:
'1990-12-26'
},
},
guests
:
[],
guests
:
[],
disableSign
:
false
,
disableSign
:
false
,
...
@@ -486,7 +545,8 @@ export default {
...
@@ -486,7 +545,8 @@ export default {
price
:
null
,
price
:
null
,
unionCity
:
null
,
unionCity
:
null
,
sumPrice
:
0
,
sumPrice
:
0
,
submiting
:
false
submiting
:
false
,
CouponIds
:[]
};
};
},
},
computed
:
{
computed
:
{
...
@@ -527,11 +587,165 @@ export default {
...
@@ -527,11 +587,165 @@ export default {
}
}
}
}
if
(
flag
){
if
(
flag
){
this
.
submitOrderHandler
()
//this.submitB2COrderHandler(81192)
return
;
}
}
}
}
this
.
submiting
=
false
this
.
submiting
=
false
},
},
submitOrderHandler
(){
let
msg
=
{
OrderId
:
0
,
TCID
:
this
.
order
.
order
.
tcid
,
CustomerType
:
4
,
GroupType
:
1
,
ContactName
:
this
.
userInfo
.
Surname
+
this
.
userInfo
.
Name
,
ContactMobile
:
this
.
userInfo
.
PhoneCountryStr
+
' '
+
this
.
userInfo
.
Moblie
,
CustomerId
:
0
,
DepartureCityId
:
this
.
order
.
order
.
startCityId
,
IsIntermodal
:
this
.
unionCity
?
1
:
2
,
Unit_Price
:
this
.
price
.
originalB2CPrice
,
TC_Price
:
this
.
price
.
originalB2CPrice
,
ManNum
:
this
.
chosenObj
.
crCount
,
ChirdNum
:
this
.
chosenObj
.
etCount
,
ChirdNeedBedNum
:
this
.
chosenObj
.
etzcCount
,
BabyNum
:
this
.
chosenObj
.
yeCount
,
OldPeopleNum
:
0
,
SingleRoomNum
:
this
.
chosenObj
.
df
,
PreferPrice
:
this
.
sumPrice
,
DiscountMoney
:
this
.
discountPrice
,
CouponAllotIds
:
this
.
CouponIds
.
join
(
','
),
YSeatNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
,
ESeatNum
:
0
,
FSeatNum
:
0
,
Commission
:
0
,
//todo 提成
ClientSource
:
3
,
BrandId
:
0
,
TradeWay
:
0
,
PlatformOrder
:
''
,
GuestNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
,
IsChildrenTour
:
this
.
price
.
isSupportChildren
,
IsBirdDiscount
:
2
,
PredictRoomNum
:(
parseFloat
((
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etzcCount
-
this
.
chosenObj
.
df
))
/
2.0
)
+
this
.
chosenObj
.
df
,
BigRoomNum
:
0
,
TripleRoomNum
:
0
,
TradeDate
:
date
.
formatDate
(
new
Date
(),
'YYYY-MM-DD'
),
CostType
:
0
,
MinOrderPrice
:
0
,
Remarks
:
this
.
chosenObj
.
remark
,
VisaNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
yeCount
,
SafeNum
:
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
yeCount
,
AirticketNum
:
0
,
ReturnArriveCityId
:
this
.
unionCity
&&
this
.
unionCity
.
backFlight
?
this
.
unionCity
.
backFlight
.
arrivalCityId
:
this
.
trip
.
returnArriveCityId
,
IsReturnIntermodal
:
this
.
unionCity
&&
this
.
unionCity
.
backFlight
?
1
:
2
,
GoCityTime
:
this
.
unionCity
&&
this
.
unionCity
.
goFlight
?
this
.
unionCity
.
goFlight
.
startDate
:
''
,
BackCityTime
:
this
.
unionCity
&&
this
.
unionCity
.
backFlight
?
this
.
unionCity
.
backFlight
.
startDate
:
''
,
ScenicRefundArr
:[],
CommissionSharePeople
:
0
,
CommissionShareMoney
:
0
,
OrderSource
:
3
,
RedEnvelopeMoney
:
0
}
this
.
apipost
(
"sellorder_post_SetOrderInfoForB2B"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
uploadGuests
(
0
,
res
.
data
.
data
.
OrderId
)
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
this
.
submiting
=
false
}
},
err
=>
{
this
.
submiting
=
false
});
},
uploadGuests
(
i
,
orderId
){
let
currentGuest
=
this
.
guests
[
i
]
currentGuest
.
OrderId
=
orderId
currentGuest
.
TCID
=
this
.
order
.
order
.
tcid
this
.
apipost
(
'sellorder_post_SetTravelGuestInfo_V2'
,
currentGuest
,
r
=>
{
console
.
log
(
r
)
if
(
i
<
this
.
guests
.
length
-
1
){
this
.
uploadGuests
(
i
,
orderId
)
}
else
{
this
.
submitB2COrderHandler
(
orderId
)
}
})
},
submitB2COrderHandler
(
orderId
){
let
guestInfo
=
`成人x
${
this
.
chosenObj
.
crCount
}
; `
if
(
this
.
chosenObj
.
etzcCount
>
0
){
guestInfo
+=
`佔床兒童x
${
this
.
chosenObj
.
etzcCount
}
; `
}
if
(
this
.
chosenObj
.
etbzcCount
>
0
){
guestInfo
+=
`不佔床兒童x
${
this
.
chosenObj
.
etbzcCount
}
; `
}
if
(
this
.
chosenObj
.
yeCount
>
0
){
guestInfo
+=
`嬰兒x
${
this
.
chosenObj
.
yeCount
}
; `
}
if
(
this
.
chosenObj
.
df
>
0
){
guestInfo
+=
`單房x
${
this
.
chosenObj
.
df
}
; `
}
if
(
this
.
chosenObj
.
visaPrice
>
0
){
guestInfo
+=
`簽證x
${
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
yeCount
}
; `
}
if
(
this
.
chosenObj
.
safeMoney
>
0
){
guestInfo
+=
`旅行保險x
${
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
yeCount
}
;`
}
let
msg
=
{
SurName
:
this
.
userInfo
.
Surname
,
Name
:
this
.
userInfo
.
Name
,
ContactNumber
:
this
.
userInfo
.
PhoneCountryStr
+
' '
+
this
.
userInfo
.
Moblie
,
Mailbox
:
this
.
userInfo
.
Mailbox
,
GoodsId
:
this
.
order
.
order
.
tcid
,
GoodsName
:
this
.
trip
.
title
,
GoodsPic
:
this
.
trip
.
imgCover
[
0
].
Url
,
GoodsType
:
this
.
price
.
teamType
==
0
?
2
:(
this
.
price
.
teamType
==
2
?
1
:
3
),
OrderMake
:
`
${
this
.
unionCity
&&
this
.
unionCity
.
goFlight
?
this
.
unionCity
.
goFlight
.
startDate
:
this
.
price
.
startDate
}
從
${
this
.
unionCity
?
this
.
unionCity
.
cityName
:
this
.
trip
.
startCityName
}
出發
${
guestInfo
}
`
,
TotalPrice
:
this
.
sumPrice
,
PreferentialPrice
:
this
.
chosenObj
.
discountPrice
,
ErpOrderId
:
orderId
,
Country
:
this
.
userInfo
.
Country
,
PlatformTax
:
0
,
Income
:
0
,
Refund
:
0
}
this
.
apipost
(
"AddOrderInfo_post"
,
msg
,
r
=>
{
if
(
r
.
data
.
resultCode
==
1
){
this
.
$message
.
success
(
"訂單創建成功"
)
this
.
goPayHandler
(
r
.
data
.
data
)
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
}
})
},
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
lineCars
=
localStorage
.
getItem
(
'lineCars'
)
lineCars
=
lineCars
?
JSON
.
parse
(
lineCars
):[]
let
i
=
lineCars
.
findIndex
(
x
=>
x
.
key
==
this
.
orderKey
)
if
(
i
>=
0
){
lineCars
.
splice
(
i
,
1
)
localStorage
.
setItem
(
"lineCars"
,
JSON
.
stringify
(
lineCars
))
}
this
.
CommonJump
(
'/pay/'
+
key
,
{});
},
GUID
()
{
return
'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'
.
replace
(
/
[
xy
]
/g
,
function
(
c
)
{
var
r
=
Math
.
random
()
*
16
|
0
,
v
=
c
==
'x'
?
r
:
(
r
&
0x3
|
0x8
);
return
v
.
toString
(
16
);
})
},
async
formValidateHandler
(
formName
){
async
formValidateHandler
(
formName
){
let
temp
=
this
.
$refs
[
formName
]
let
temp
=
this
.
$refs
[
formName
]
let
formObj
=
temp
instanceof
Array
?
temp
[
0
]
:
temp
let
formObj
=
temp
instanceof
Array
?
temp
[
0
]
:
temp
...
@@ -562,7 +776,7 @@ export default {
...
@@ -562,7 +776,7 @@ export default {
}
}
if
(
this
.
orderKey
==
""
)
{
if
(
this
.
orderKey
==
""
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
//
location.href=location.origin
location
.
href
=
location
.
origin
},
3000
);
},
3000
);
}
}
return
this
.
orderKey
!=
""
;
return
this
.
orderKey
!=
""
;
...
@@ -583,7 +797,8 @@ export default {
...
@@ -583,7 +797,8 @@ export default {
money
+=
this
.
price
.
singleRoomPrice
*
this
.
chosenObj
.
df
;
money
+=
this
.
price
.
singleRoomPrice
*
this
.
chosenObj
.
df
;
let
sumCount
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
let
sumCount
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
//money += this.price.visaPrice * sumCount;
money
+=
this
.
price
.
visaPrice
*
sumCount
;
money
+=
this
.
price
.
safeMoney
*
sumCount
;
money
+=
this
.
price
.
otherPrice
*
sumCount
;
money
+=
this
.
price
.
otherPrice
*
sumCount
;
this
.
sumPrice
=
money
;
this
.
sumPrice
=
money
;
},
},
...
@@ -599,6 +814,8 @@ export default {
...
@@ -599,6 +814,8 @@ export default {
if
(
this
.
chosenObj
.
df
>
0
)
{
if
(
this
.
chosenObj
.
df
>
0
)
{
obj
.
EnableSignRoom
=
true
;
obj
.
EnableSignRoom
=
true
;
}
}
obj
.
IsBed
=
1
obj
.
IdCard
=
this
.
GUID
()
this
.
guests
.
push
(
obj
);
this
.
guests
.
push
(
obj
);
}
}
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
etzcCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
etzcCount
;
i
++
)
{
...
@@ -608,18 +825,24 @@ export default {
...
@@ -608,18 +825,24 @@ export default {
if
(
this
.
chosenObj
.
df
>
0
)
{
if
(
this
.
chosenObj
.
df
>
0
)
{
obj
.
EnableSignRoom
=
true
;
obj
.
EnableSignRoom
=
true
;
}
}
obj
.
IsBed
=
1
obj
.
IdCard
=
this
.
GUID
()
this
.
guests
.
push
(
obj
);
this
.
guests
.
push
(
obj
);
}
}
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
etbzcCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
etbzcCount
;
i
++
)
{
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
guest
));
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
guest
));
obj
.
GuestType
=
3
;
obj
.
GuestType
=
3
;
obj
.
FormatTypeName
=
`儿童不占床
${
i
+
1
}
:`
;
obj
.
FormatTypeName
=
`儿童不占床
${
i
+
1
}
:`
;
obj
.
IsBed
=
0
obj
.
IdCard
=
this
.
GUID
()
this
.
guests
.
push
(
obj
);
this
.
guests
.
push
(
obj
);
}
}
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
yeCount
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
yeCount
;
i
++
)
{
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
guest
));
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
guest
));
obj
.
GuestType
=
4
;
obj
.
GuestType
=
4
;
obj
.
FormatTypeName
=
`婴儿
${
i
+
1
}
:`
;
obj
.
FormatTypeName
=
`婴儿
${
i
+
1
}
:`
;
obj
.
IsBed
=
0
obj
.
IdCard
=
this
.
GUID
()
this
.
guests
.
push
(
obj
);
this
.
guests
.
push
(
obj
);
}
}
},
},
...
@@ -661,6 +884,7 @@ export default {
...
@@ -661,6 +884,7 @@ export default {
});
});
}
}
},
},
getTripData
()
{
getTripData
()
{
this
.
$q
.
loading
.
show
();
this
.
$q
.
loading
.
show
();
let
msg
=
{
let
msg
=
{
...
@@ -684,7 +908,7 @@ export default {
...
@@ -684,7 +908,7 @@ export default {
if
(
this
.
order
.
order
.
startCityId
!=
this
.
trip
.
startCityId
){
if
(
this
.
order
.
order
.
startCityId
!=
this
.
trip
.
startCityId
){
this
.
unionCity
=
this
.
price
.
unionCityList
.
find
(
x
=>
x
.
cityId
==
this
.
order
.
order
.
startCityId
)
this
.
unionCity
=
this
.
price
.
unionCityList
.
find
(
x
=>
x
.
cityId
==
this
.
order
.
order
.
startCityId
)
if
(
this
.
unionCity
.
backFlight
&&
this
.
unionCity
.
backFlight
.
addPrice
){
if
(
this
.
unionCity
.
backFlight
&&
this
.
unionCity
.
backFlight
.
addPrice
){
this
.
price
.
originalB2CPrice
+=
unionCity
.
backFlight
.
addPrice
this
.
price
.
originalB2CPrice
+=
this
.
unionCity
.
backFlight
.
addPrice
}
}
if
(
this
.
unionCity
.
goFlight
&&
this
.
unionCity
.
goFlight
.
addPrice
){
if
(
this
.
unionCity
.
goFlight
&&
this
.
unionCity
.
goFlight
.
addPrice
){
this
.
price
.
originalB2CPrice
+=
this
.
unionCity
.
goFlight
.
addPrice
this
.
price
.
originalB2CPrice
+=
this
.
unionCity
.
goFlight
.
addPrice
...
...
src/pages/line/pay.vue
0 → 100644
View file @
8c32791b
<
template
>
<div
class=
"content-page order-preview"
>
<q-stepper
v-model=
"step"
ref=
"stepper"
color=
"primary"
inactive-color=
"grey-5 "
done-color=
"primary"
class=
"bg-transparent"
flat
animated
>
<q-step
:name=
"1"
title=
"確認訂單"
icon=
"settings"
:done=
"step > 1"
></q-step>
<q-step
:name=
"2"
title=
"付款"
icon=
"iconfont iconPayment-1"
:done=
"step > 2"
></q-step>
<q-step
:name=
"3"
title=
"訂購完成"
icon=
"iconfont iconicon_finish_R"
:done=
"step == 3"
></q-step>
</q-stepper>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
step
:
2
}
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
8c32791b
...
@@ -51,91 +51,91 @@ const routes = [{
...
@@ -51,91 +51,91 @@ const routes = [{
},
},
{
{
path
:
'/account'
,
//用户信息
path
:
'/account'
,
//用户信息
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/account.vue'
)
import
(
'pages/usercenter/account.vue'
)
},
},
{
{
path
:
'/demandlist'
,
//需求单列表
path
:
'/demandlist'
,
//需求单列表
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/demandlist.vue'
)
import
(
'pages/usercenter/demandlist.vue'
)
},
},
{
{
path
:
'/demandinfo/:id'
,
//需求单详情
path
:
'/demandinfo/:id'
,
//需求单详情
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/demandinfo.vue'
)
import
(
'pages/usercenter/demandinfo.vue'
)
},
},
{
{
path
:
'/orderlist'
,
//订单列表
path
:
'/orderlist'
,
//订单列表
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/orderlist.vue'
)
import
(
'pages/usercenter/orderlist.vue'
)
},
},
{
{
path
:
'/orderinfo/:id'
,
//订单详情
path
:
'/orderinfo/:id'
,
//订单详情
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/orderinfo.vue'
)
import
(
'pages/usercenter/orderinfo.vue'
)
},
},
{
{
path
:
'/passengerList/:id'
,
//旅客名单
path
:
'/passengerList/:id'
,
//旅客名单
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/passengerList.vue'
)
import
(
'pages/usercenter/passengerList.vue'
)
},
},
{
{
path
:
'/register'
,
//用户注册
path
:
'/register'
,
//用户注册
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/register.vue'
)
import
(
'pages/usercenter/register.vue'
)
},
},
{
{
path
:
'/loginInfo'
,
//账户设置
path
:
'/loginInfo'
,
//账户设置
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/loginInfo.vue'
)
import
(
'pages/usercenter/loginInfo.vue'
)
},
},
{
{
path
:
'/setAddress'
,
//地址管理
path
:
'/setAddress'
,
//地址管理
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/setAddress.vue'
)
import
(
'pages/usercenter/setAddress.vue'
)
},
},
{
{
path
:
'/setInfo'
,
//账户设置
path
:
'/setInfo'
,
//账户设置
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/setInfo.vue'
)
import
(
'pages/usercenter/setInfo.vue'
)
},
},
{
{
path
:
'/setUserInfo'
,
//用户信息
path
:
'/setUserInfo'
,
//用户信息
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/setUserInfo.vue'
)
import
(
'pages/usercenter/setUserInfo.vue'
)
},
},
{
{
path
:
'/coupon'
,
//优惠券
path
:
'/coupon'
,
//优惠券
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/coupon.vue'
)
import
(
'pages/usercenter/coupon.vue'
)
},
},
{
{
path
:
'/order'
,
//用户订单
path
:
'/order'
,
//用户订单
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/order.vue'
)
import
(
'pages/usercenter/order.vue'
)
},
},
{
{
path
:
'/setUsersList'
,
//用户订单
path
:
'/setUsersList'
,
//用户订单
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/setUsersList.vue'
)
import
(
'pages/usercenter/setUsersList.vue'
)
},
},
{
{
path
:
'/payInfo'
,
//支付管理
path
:
'/payInfo'
,
//支付管理
meta
:
{
isUserCenter
:
true
},
meta
:
{
isUserCenter
:
true
},
component
:
()
=>
component
:
()
=>
import
(
'pages/usercenter/payInfo.vue'
)
import
(
'pages/usercenter/payInfo.vue'
)
},
},
...
@@ -154,6 +154,11 @@ const routes = [{
...
@@ -154,6 +154,11 @@ const routes = [{
component
:
()
=>
component
:
()
=>
import
(
'pages/line/orderPreview.vue'
)
import
(
'pages/line/orderPreview.vue'
)
},
},
{
path
:
'/pay/:id?'
,
//自定义页面
component
:
()
=>
import
(
'pages/line/pay.vue'
)
},
]
]
},
},
...
...
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