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
6212380f
Commit
6212380f
authored
Aug 04, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d89cffa6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
983 additions
and
0 deletions
+983
-0
orderdetails.vue
pages/bus/orderdetails.vue
+2
-0
visa_SureOrder copy.vue
pages/visa/visa_SureOrder copy.vue
+979
-0
visa_SureOrder.vue
pages/visa/visa_SureOrder.vue
+2
-0
No files found.
pages/bus/orderdetails.vue
View file @
6212380f
...
@@ -457,6 +457,8 @@
...
@@ -457,6 +457,8 @@
// #ifdef MP-DI
// #ifdef MP-DI
this
.
orderData
.
OrderStatus
=
4
this
.
orderData
.
OrderStatus
=
4
// #endif
// #endif
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
isExpired
=
true
this
.
isExpired
=
true
}
else
{
}
else
{
const
now
=
Date
.
now
();
const
now
=
Date
.
now
();
...
...
pages/visa/visa_SureOrder copy.vue
0 → 100644
View file @
6212380f
<
style
scoped
>
@import
url("@/asset/css/flex.css")
;
.jz_SureOrder
{
position
:
relative
;
}
.jz_SureTop
{
width
:
100%
;
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
background-color
:
#fff
;
border-bottom-left-radius
:
60
rpx
;
border-bottom-right-radius
:
60
rpx
;
padding
:
40
rpx
;
}
.jz_SureDfk
{
color
:
#111111
;
font-size
:
40
rpx
;
font-weight
:
bold
;
margin-left
:
26
rpx
;
}
.jz_SureContent
{
width
:
90%
;
margin
:
auto
;
min-height
:
100px
;
}
.jz_SureCommodity
{
padding
:
30
rpx
0
;
display
:
flex
;
border-bottom
:
1px
solid
#e6e6e6
;
}
.jzSureMoney
{
color
:
#333333
;
font-weight
:
bold
;
font-size
:
20
rpx
;
}
.jz_SuOrder_img
{
width
:
100
rpx
;
height
:
100
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
flex-shrink
:
0
;
}
.jz_SuOrder_img
img
{
width
:
100%
;
height
:
100%
;
}
.jz_OrderNum
{
color
:
#8f8f90
;
font-size
:
24
rpx
;
margin-right
:
50
rpx
;
}
.jz_GoodName
{
color
:
#333333
;
font-size
:
28
rpx
;
width
:
70%
;
margin-left
:
15px
;
font-weight
:
bold
;
}
.jz_OrderBold
{
color
:
#08090e
;
font-weight
:
bold
;
}
.jz_PayDiv
{
position
:
absolute
;
width
:
90%
;
margin
:
auto
;
bottom
:
30
rpx
;
display
:
flex
;
justify-content
:
space-between
;
}
.jz_CancleBtn
{
width
:
310
rpx
;
height
:
80
rpx
;
border
:
1px
solid
#111111
;
border-radius
:
16
rpx
;
color
:
#111111
;
font-weight
:
bold
;
text-align
:
center
;
line-height
:
80
rpx
;
font-size
:
28
rpx
;
}
.jz_Reserve
{
padding-bottom
:
120
rpx
;
}
.jz_ReserTop
{
width
:
100%
;
min-height
:
300
rpx
;
box-shadow
:
0px
2px
15px
0px
rgba
(
76
,
76
,
76
,
0.13
);
background-color
:
#fff
;
border-bottom-left-radius
:
60
rpx
;
border-bottom-right-radius
:
60
rpx
;
padding
:
40
rpx
;
}
.jz_ReserTitle
{
color
:
#111111
;
font-weight
:
600
;
font-size
:
36
rpx
;
}
.jz_ReserIn
{
color
:
#111
;
font-size
:
24
rpx
;
font-weight
:
500
;
}
.jz_ReseQue
{
color
:
#dfbe6e
;
font-size
:
24
rpx
;
padding-top
:
30
rpx
;
border-top
:
1px
solid
#e7e7e7
;
margin-top
:
20px
;
}
.jz_ReseQue
img
{
width
:
16px
;
height
:
14px
;
position
:
relative
;
top
:
2px
;
margin-right
:
5px
;
}
.jz_ReseOrder
{
padding
:
40
rpx
;
}
.jz_ReDix
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
10px
;
}
.jz_RedixTitle
{
width
:
90px
;
flex-shrink
:
0
;
}
/* .jz_OrderDiv {
position: fixed;
width: 90%;
height: 100rpx;
background-color: #fff;
margin: auto;
bottom: 20px;
padding: 20rpx;
left: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2);
border-radius: 16px;
z-index: 999;
} */
.jz_orderbox
{
position
:
fixed
;
background-color
:
#fff
;
bottom
:
0
;
width
:
100vw
;
left
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-shadow
:
0px
0
rpx
50
rpx
0px
rgba
(
76
,
76
,
76
,
0.13
);
z-index
:
99
;
justify-content
:
flex-end
;
padding
:
20
rpx
30
rpx
;
}
.jz_OrderDiv
{
width
:
90%
;
height
:
100
rpx
;
background-color
:
#fff
;
margin
:
auto
;
padding
:
20
rpx
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
box-shadow
:
0px
10
rpx
30
rpx
0px
rgba
(
36
,
36
,
36
,
0.2
);
border-radius
:
16px
;
z-index
:
999
;
}
.jz_OrderReNow
{
min-width
:
170
rpx
;
height
:
80
rpx
;
background-color
:
#111111
;
text-align
:
center
;
line-height
:
80
rpx
;
color
:
#fff
;
font-weight
:
600
;
font-size
:
28
rpx
;
border-radius
:
16
rpx
;
}
.jz_form
{
margin-top
:
60
rpx
;
padding
:
0
45
rpx
;
}
.jz_form
.form-items
{
margin-bottom
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
padding-bottom
:
30
rpx
;
border-bottom
:
1px
solid
#f5f5f5
;
font-size
:
28px
;
font-weight
:
500
;
}
.jz_form
.form-items
.label
{
font-size
:
28
rpx
;
font-weight
:
600
;
margin-right
:
60
rpx
;
flex-shrink
:
0
;
width
:
115
rpx
;
}
.jz_form
.form-items
.val
{
flex
:
1
;
}
.jz_ReserTop
.o-timer
{
height
:
100
rpx
;
background
:
#ecf1f4
;
border-radius
:
20
rpx
;
padding
:
0
40
rpx
;
margin-bottom
:
30
rpx
;
}
.jz_ReserTop
.o-timer
.time-item
{
font-size
:
32
rpx
;
font-weight
:
800
;
}
/* .jz_ReserTop .o-timer .time-item:last-child{
text-align: right;
} */
.jz_ReserTop
.o-timer
.time-split
{
font-size
:
24
rpx
;
font-weight
:
400
;
text-align
:
center
;
margin
:
0
20
rpx
;
}
.jz_ReserTop
.o-timer
.update
{
font-size
:
24
rpx
;
font-weight
:
400
;
text-align
:
right
;
color
:
#000
;
display
:
flex
;
align-items
:
center
;
}
.jz_Reserve
.flex
{
display
:
flex
;
align-items
:
center
;
}
.jz_Reserve
.big-title
{
position
:
relative
;
}
.jz_Reserve
.big-title
::before
{
display
:
block
;
width
:
71
rpx
;
height
:
12
rpx
;
background
:
#dfbe6e
;
border-radius
:
4
rpx
;
content
:
" "
;
position
:
absolute
;
left
:
0
;
bottom
:
6
rpx
;
z-index
:
1
;
}
.jz_Reserve
.big-title
text
{
font-size
:
34
rpx
;
font-weight
:
bold
;
color
:
#1f1f1f
;
position
:
relative
;
z-index
:
2
;
}
.jz_Reserve
.empty-block
{
height
:
20
rpx
;
background
:
#ecf1f4
;
}
.jz_form
.form-items
.val
text
{
border
:
none
;
padding
:
0
;
margin
:
0
;
outline
:
none
;
height
:
38
rpx
;
line-height
:
38
rpx
;
font-size
:
28
rpx
;
font-weight
:
500
;
width
:
100%
;
}
.jz_Reserve
.grey
{
color
:
#6e6e6e
!important
;
}
.jz_Reserve
.f12
{
font-size
:
24
rpx
!important
;
}
.jz_Reserve
.f11
{
font-size
:
22
rpx
!important
;
}
.jz_Reserve
.f14
{
font-size
:
28
rpx
!important
;
}
.jz_Reserve
.regular
{
font-weight
:
500
!important
;
}
.jz_Reserve
.sheshi
{
margin-top
:
50
rpx
;
}
.jz_Reserve
.sheshi
.she-title
{
font-size
:
28
rpx
;
font-weight
:
800
;
}
.jz_Reserve
.sheshi
.she-content
{
margin-top
:
24
rpx
;
}
.jz_Reserve
.sheshi
.she-content
text
{
font-size
:
24
rpx
;
font-weight
:
500
;
color
:
#4a4a4a
;
line-height
:
40
rpx
;
margin-right
:
24
rpx
;
}
.jz_Reserve
.jz_SureVal
{
flex
:
1
;
font-size
:
28
rpx
;
font-weight
:
500
;
width
:
100%
;
}
.jz_MyGuestList
.label
{
width
:
115
rpx
;
}
.jz_MyGuestList
{
margin-top
:
40
rpx
;
}
/
deep
/
.showModalInfo
.u-drawer-bottom
{
background-color
:
rgba
(
23
,
23
,
23
,
0
)
!important
;
}
</
style
>
<
template
>
<view
class=
"jz_Reserve"
v-if=
"orderData"
>
<view
class=
"jz_ReserTop"
>
<view
class=
"orderStatusBox column"
style=
"margin-bottom: 30rpx;justify-content: space-between"
>
<view
class=
"row-sbas-n"
>
<view
class=
"row items-center"
>
<u-icon
customPrefix=
"iconfont"
name=
"icondaizhifu-"
size=
"52"
color=
"#DFBE6E"
v-if=
"orderStatus.code == 0"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconquxiao"
size=
"52"
color=
"#f26c6c"
v-if=
"orderStatus.code == -1"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconshenhezhong"
size=
"52"
color=
"#86d9a5"
v-if=
"orderStatus.code == -2"
></u-icon>
<u-icon
customPrefix=
"iconfont"
name=
"iconzhengchang"
size=
"52"
color=
"#111"
v-if=
"orderStatus.code == 1"
></u-icon>
<text
style=
"
margin-left: 26rpx;
font-size: 40rpx;
font-weight: 600;
color: #111;
"
>
{{
orderStatus
.
text
}}
</text>
</view>
<u-count-down
:showDays=
"false"
:showHours=
"false"
:timestamp=
"remainingSeconds"
@
change=
"changeSeconds"
v-if=
"orderData.OrderStatus==1&&b2b_user.isGuideOrLeader==1"
color=
"#000"
separator-color=
"#000"
:show-days=
"false"
bg-color=
"transparent"
></u-count-down>
</view>
<view
class=
"timecontent q-mt-sm"
>
<view
v-if=
"orderData.OrderStatus&&orderData.OrderStatus==1&&b2b_user.isGuideOrLeader==1"
>
<view
class=
"row"
>
<text>
请您于
{{
dielineTime
}}
前支付:¥
</text>
<text
class=
"bold"
>
{{
DanWei
}}{{
(
orderData
.
model
.
TotalPrice
-
orderData
.
model
.
DiscountMoney
).
toFixed
(
2
)
}}
</text>
</view>
<view
class=
"small"
>
完成支付才能锁定签证
</view>
</view>
<view
class=
"small"
v-else-if=
"orderData.OrderStatus==2||(orderData.OrderModel.OrderStatus&&orderData.OrderStatus==4)"
>
取消原因:用户超时未付款,自动取消
</view>
<view
class=
"small"
v-else
>
感谢您的预定,服务专员将会持续为您提供服务
</view>
</view>
</view>
<view
style=
"margin-bottom: 30rpx"
v-if=
"
orderData.OrderModel.RejectRemark && orderData.OrderModel.RejectRemark != ''
"
>
<u-alert-tips
type=
"error"
title=
"订单取消失败"
:description=
"orderData.OrderModel.RejectRemark"
></u-alert-tips>
</view>
<view
class=
"o-timer flex"
>
<view
class=
"time-item"
>
{{
orderData
.
OrderModel
.
EnterCountryTime
}}
</view>
<view
class=
"time-split"
>
<view>
出境
</view>
</view>
<view
class=
"time-item"
style=
"font-size: 26rpx; font-weight: 500; flex: 1"
>
<text
v-if=
"orderData.OrderModel.PeopleNum > 0"
>
{{
orderData
.
OrderModel
.
PeopleNum
}}
人
</text>
</view>
<view
class=
"update"
>
<!--
<text
style=
"margin-right: 8rpx;"
>
修改
</text>
<u-icon
name=
"arrow"
size=
"20"
/>
-->
</view>
</view>
<view
class=
"jz_ReserTitle"
@
click=
"goDetail"
>
{{
orderData
.
ProductModel
.
Name
}}
</view>
<view
class=
"jz_ReserIn"
style=
"margin: 33rpx 0 18rpx 0"
>
<!--
{{
currentPriceInfo
.
startCityName
}}
出发
{{
currentPriceInfo
.
startDate
}}
-->
<text
v-if=
"orderData.ProductModel.SendCityName"
style=
"margin-right: 35rpx;"
>
<text>
送签地:
</text>
<text>
{{
orderData
.
ProductModel
.
SendCityName
}}
</text>
</text>
<text
v-if=
"orderData.ProductModel.VisaValidity"
>
<text>
有效期:
</text>
<text>
{{
orderData
.
ProductModel
.
VisaValidity
}}
</text>
</text>
</view>
<view
class=
"big-title"
v-if=
"orderData.OrderModel.StartCityName"
>
<text>
{{
orderData
.
OrderModel
.
StartCityName
}}
出发
</text>
</view>
<view
class=
"jz_ReseQue"
>
<img
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/zuanshi.png"
/>
即时确认:本产品付款后可快速确认,放心期待您的办理
</view>
</view>
<view
class=
"jz_form"
v-if=
"orderData && orderData.OrderModel"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
订单编号
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
OrderModel
.
Id
}}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
下单日期
</view>
<view
class=
"jz_SureVal"
>
{{
orderData
.
OrderModel
.
CreateTime
.
replace
(
"T"
,
" "
)
}}
</view>
</view>
<view
class=
"form-items"
v-if=
"orderData.OrderModel.VisaOrderRelation.RelationName||orderData.OrderModel.VisaOrderRelation.RelationPhone"
>
<view
class=
"label"
>
联系人
</view>
<view
class=
"jz_SureVal"
>
<template
v-if=
"orderData.OrderModel.VisaOrderRelation.RelationName"
>
{{
orderData
.
OrderModel
.
VisaOrderRelation
.
RelationName
}}
</
template
>
<
template
v-if=
"orderData.OrderModel.VisaOrderRelation.RelationName&&orderData.OrderModel.VisaOrderRelation.RelationPhone"
>
/
</
template
>
<
template
v-if=
"orderData.OrderModel.VisaOrderRelation.RelationPhone"
>
{{
orderData
.
OrderModel
.
VisaOrderRelation
.
RelationPhone
}}
</
template
>
</view>
</view>
<!-- <view class="form-items">
<view class="label">下单日期</view>
<view class="jz_SureVal">
{{ orderData.OrderModel.CreateDate.replace("T", " ") }}
</view>
</view> -->
</view>
<view
class=
"empty-block"
></view>
<view
class=
"jz_form jz_MyGuestList"
v-for=
"(subItem, subIndex) in orderData.OrderModel.GuestList"
:key=
"subIndex"
>
<view
style=
"margin: 10rpx 0 20rpx 0"
>
游客{{ subIndex + 1 }}
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
游客姓名
</view>
<view
class=
"jz_SureVal"
>
{{ subItem.SurName }}{{ subItem.Name }}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
联系电话
</view>
<view
class=
"jz_SureVal"
>
{{ subItem.MobilePhone }}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
身份证
</view>
<view
class=
"jz_SureVal"
>
{{ subItem.IdCard }}
</view>
</view>
<view
class=
"form-items"
>
<view
class=
"label"
>
学生
</view>
<view
class=
"jz_SureVal"
>
{{ subItem.IsHightSchool == 1 ? "是" : "否" }}
</view>
</view>
</view>
<view
class=
"empty-block"
v-if=
"orderData.OrderModel&&orderData.OrderModel.GuestList&&orderData.OrderModel.GuestList.length>0"
></view>
<view
class=
"jz_form"
v-if=
"orderData.OrderModel.Remark"
>
<view
class=
"form-items"
style=
"border-bottom: 0"
>
<view
class=
"label"
>
备注
</view>
<view
class=
"jz_SureVal"
>
{{ orderData.OrderModel.Remark }}
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
<cancelProgress
v-if=
"orderData.OrderStatus==5"
:datas=
"orderData"
></cancelProgress>
<view
class=
"empty-block"
></view>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"orderData.OrderModel"
>
<view
class=
"big-title"
>
<text>
费用明细
</text>
</view>
<view
class=
"jz_form"
style=
"margin: 40rpx 0; padding: 0"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
总金额
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{ orderData.OrderModel.PeopleNum }}人
</text>
<text
class=
"red"
>
¥
<
template
v-if=
"orderData.OrderModel.DiscountMoney&&orderData.OrderModel.DiscountMoney>0"
>
{{
Number
(
orderData
.
OrderModel
.
TotalPrice
)
-
Number
(
orderData
.
OrderModel
.
DiscountMoney
)
}}
</
template
>
<
template
v-else
>
{{
Number
(
orderData
.
OrderModel
.
TotalPrice
)
}}
</
template
>
</text>
</view>
</view>
<view
class=
"form-items"
style=
"border-bottom: none"
>
<view
class=
"label"
>
明细
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
人数
</text>
</view>
<view
style=
"text-align: right"
>
{{ orderData.OrderModel.PeopleNum }}人 × ¥{{
$utils.getretailer()?orderData.ProductModel.VisaPrice:orderData.ProductModel.VisaB2CPrice
}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:style=
"{'color':mainColor+' !important'}"
:key=
"index"
v-if=
"orderData.OrderModel.DiscountMoney&&orderData.OrderModel.DiscountMoney>0"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
优惠金额
</text>
</view>
<view
style=
"text-align: right"
>
-{{ orderData.OrderModel.DiscountMoney}}
</view>
</view>
<view
class=
"flex f12 grey"
style=
"margin-bottom: 40rpx"
:key=
"index"
>
<view
style=
"flex: 1"
>
<text
style=
"margin-right: 30rpx"
>
合计应收
</text>
</view>
<view
style=
"text-align: right;color: #ff3166;font-size:32rpx;font-weight: bold;"
>
{{ (orderData.OrderModel.TotalPrice-orderData.OrderModel.DiscountMoney).toFixed(2)}}
</view>
</view>
</view>
</view>
<view
class=
"empty-block"
></view>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"Refund > 0 && orderStatus.code == -1"
>
<view
class=
"big-title"
>
<text>
取消订单
</text>
</view>
<view
class=
"jz_form"
style=
"margin: 40rpx 0; padding: 0"
>
<view
class=
"form-items"
>
<view
class=
"label"
>
已退款总额
</view>
<view
class=
"val f14 regular"
style=
"text-align: right"
>
<text
style=
"margin-right: 30rpx"
>
{{ orderData.OrderModel.PeopleNum }}人
</text>
<text
class=
"red"
>
¥{{ $utils.getretailer()?orderData.ProductModel.VisaPrice:orderData.ProductModel.VisaB2CPrice }}
</text>
</view>
</view>
</view>
</view>
<view
class=
"jz_orderbox flex"
v-if=
"showPayBtn"
>
<view
style=
"display: flex"
>
<!-- #ifdef MP-DI -->
<button
v-if=
"orderData.OrderStatus==1||orderData.OrderStatus==2"
class=
"jz_OrderReNow"
@
click=
"goCancelZK"
style=
"background: #fff; color: #111; border: 1px solid #111"
:disabled=
"submitCancel"
:loading=
"submitCancel"
>
取消
</button>
<button
v-if=
"orderData.OrderStatus==1"
class=
"jz_OrderReNow"
style=
"margin-left: 20rpx;"
@
click=
"submitGetCodeByOrderNo"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<button
v-if=
"((b2b_user.isGuideOrLeader==1&&orderData.OrderModel.Income==0&&orderData.OrderModel.VisaOrderStatus==3)||b2b_user.isGuideOrLeader!=1)"
class=
"jz_OrderReNow"
@
click=
"goCancel"
style=
"background: #fff; color: #111; border: 1px solid #111"
:disabled=
"submitCancel"
:loading=
"submitCancel"
>
取消
</button>
<button
v-if=
"b2b_user.isGuideOrLeader==1&&orderData.OrderModel.Income==0&&orderData.OrderModel.VisaOrderStatus==3"
class=
"jz_OrderReNow"
style=
"margin-left: 20rpx;"
@
click=
"submitGetCodeByOrderNo"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
<!-- #endif -->
</view>
</view>
<!-- #ifdef MP-ALIPAY -->
<subscribe-msg
/>
<!-- #endif -->
<cancelPrompt
v-if=
"showModal"
:showModal=
"showModal"
@
cancel=
"cancelModal"
:orderNo=
"orderData.OrderNo"
></cancelPrompt>
</view>
</template>
<
script
>
</
script
>
<
script
>
import
cancelPrompt
from
'@/components/cancelPrompt/cancelPrompt.vue'
import
cancelProgress
from
'@/components/cancelPrompt/cancelProgress.vue'
export
default
{
components
:
{
cancelPrompt
,
cancelProgress
},
data
()
{
return
{
pageTitle
:
"订单详情"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
MiniAppUserId
:
0
,
},
orderData
:
null
,
orderStatus
:
{
code
:
0
,
text
:
""
,
},
submit
:
false
,
submitCancel
:
false
,
showPayBtn
:
true
,
Refund
:
0
,
orderInfo
:
null
,
orderId
:
0
,
OrderTypeStr
:
0
,
OrderNo
:
''
,
showModal
:
false
,
b2b_user
:
{},
remainingSeconds
:
null
,
// 5分钟倒计时(秒)
isExpired
:
false
,
countdownInterval
:
null
,
currentTime
:
Date
.
now
(),
endts
:
0
,
dielineTime
:
''
,
};
},
created
()
{},
onLoad
(
option
)
{
this
.
b2b_user
=
uni
.
getStorageSync
(
"b2b_user"
);
if
(
option
.
orderData
)
{
this
.
orderData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
orderData
));
}
else
if
(
option
.
OrderNo
){
this
.
OrderNo
=
option
.
OrderNo
this
.
getOrderInfoHandler
()
}
else
if
(
option
.
orderId
)
{
this
.
orderId
=
option
.
orderId
this
.
initOrderInfo
(
option
.
orderId
);
}
},
methods
:
{
changeSeconds
(
seconds
)
{
if
(
seconds
<=
0
)
{
let
cancelMsg
=
{
OrderNo
:
this
.
OrderNo
,
ErpOrderId
:
this
.
orderId
,
OrderTypeStr
:
"Visa"
,
ConfirmID
:
""
,
Amount
:
0
,
};
this
.
cancelOrder
(
cancelMsg
)
}
},
cancelOrder
(
postMsg
)
{
this
.
apipost
(
"post_CancelThirdHotelOrder"
,
postMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
getOrderDetail
(
this
.
id
)
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
this
.
submitCancel
=
false
}
);
},
getOrderDetail
(
id
)
{
if
(
this
.
orderData
.
CreateTime
&&
this
.
orderData
.
OrderStatus
==
1
)
{
const
now
=
Date
.
now
();
// const customStr = '2025-05-12 14:33:47'
const
customStr
=
this
.
orderData
.
CreateTime
const
[
date
,
time
]
=
customStr
.
split
(
' '
)
const
[
year
,
month
,
day
]
=
date
.
split
(
'-'
)
const
[
hours
,
minutes
,
seconds
]
=
time
.
split
(
':'
)
const
parsedDate
=
new
Date
(
year
,
month
-
1
,
day
,
hours
,
minutes
,
seconds
)
this
.
orderTime
=
parsedDate
.
getTime
()
const
diff
=
this
.
orderTime
+
30
*
60
*
1000
-
now
;
let
remainingSeconds
=
Math
.
max
(
diff
,
0
);
// 确保不出现负数
this
.
remainingSeconds
=
Math
.
floor
(
remainingSeconds
/
1000
)
let
endTime
=
new
Date
(
this
.
orderData
.
CreateTime
)
endTime
.
setMinutes
(
endTime
.
getMinutes
()
+
30
)
this
.
endts
=
this
.
remainingSeconds
if
(
this
.
endts
<=
0
){
this
.
changeSeconds
(
this
.
remainingSeconds
)
}
this
.
dielineTime
=
`
${
endTime
.
getHours
()}
时
${
endTime
.
getMinutes
()}
分`
};
},
cancelModal
(){
this
.
showModal
=
false
},
submitGetCodeByOrderNo
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
this
.
submit
=
true
this
.
apipost
(
"GetCodeByOrderNo_post"
,
{
OrderNo
:
this
.
OrderNo
,
MallBaseId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
,
OpenId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
OpenId
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
this
.
goPayHandler
();
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
,
duration
:
3000
})
this
.
submit
=
false
;
}
});
},
goPayHandler
()
{
let
that
=
this
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
timeStamp
:
this
.
orderInfo
.
timeStamp
,
nonceStr
:
this
.
orderInfo
.
nonceStr
,
package
:
this
.
orderInfo
.
package
,
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
((
that
.
orderData
.
OrderModel
.
TotalPrice
-
that
.
orderData
.
OrderModel
.
DiscountMoney
).
toFixed
(
2
))
+
"&isFrom=3"
,
});
},
100
);
},
fail
:
function
(
err
)
{
console
.
log
(
"fail:"
,
err
);
that
.
submit
=
false
;
uni
.
showToast
({
title
:
"支付失败"
,
icon
:
"none"
,
});
},
});
},
getOrderInfoHandler
(){
this
.
apipost
(
"GetDetailsByErpOrderId_post"
,{
OrderNo
:
this
.
OrderNo
,
ErpOrderId
:
this
.
orderId
,
OrderTypeStr
:
'Visa'
,
},
res
=>
{
if
(
res
.
resultCode
==
1
){
this
.
OrderNo
=
res
.
data
.
OrderNo
this
.
orderId
=
res
.
data
.
ErpOrderId
this
.
orderData
=
{
...
res
.
data
}
this
.
initOrderInfo
(
res
.
data
.
ErpOrderId
);
this
.
formatStatus
(
res
.
data
.
OrderStatus
,
null
,
null
,
null
);
}
else
{
}
})
},
goDetail
()
{
uni
.
navigateTo
({
url
:
"/pages/visa/visaDetail?id="
+
this
.
orderData
.
ProductModel
.
Id
})
},
goback
()
{
uni
.
navigateBack
({
delta
:
1
,
});
},
goCancel
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
//未付款-调用后台取消
if
(
this
.
orderData
.
OrderModel
.
VisaOrderStatus
!=
2
&&
(
this
.
orderData
.
OrderModel
.
VisaOrderStatus
==
1
&&
this
.
orderData
.
OrderModel
.
Income
==
0
)
||
(
this
.
orderData
.
OrderModel
.
VisaOrderStatus
==
3
))
{
this
.
submitCancel
=
true
let
that
=
this
wx
.
showModal
({
title
:
'提示'
,
content
:
'确定取消订单?'
,
success
:
(
tip
)
=>
{
if
(
tip
.
confirm
)
{
uni
.
showLoading
()
that
.
apipost
(
"b2c_get_SetB2BOrderCancel"
,
{
OrderId
:
this
.
orderData
.
OrderModel
.
Id
,
OrderSource
:
5
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
initOrderInfo
(
this
.
orderId
)
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
}
uni
.
hideLoading
()
this
.
submitCancel
=
false
},
(
err
)
=>
{
uni
.
hideLoading
()
}
);
}
else
this
.
submitCancel
=
false
}
})
}
},
goCancelZK
()
{
let
that
=
this
if
(
this
.
orderData
.
OrderStatus
==
2
)
{
return
this
.
showModal
=
true
};
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
wx
.
showModal
({
title
:
'提示'
,
content
:
'确定取消订单?'
,
success
:
(
tip
)
=>
{
if
(
tip
.
confirm
)
{
that
.
submitCancel
=
true
;
that
.
apipost
(
"GetCancelOrder_post"
,
{
OrderNo
:
that
.
OrderNo
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
getOrderInfoHandler
()
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
}
that
.
submitCancel
=
false
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
that
.
submitCancel
=
false
}
);
}
}
})
},
getWeek
(
date
)
{
var
weekArray
=
new
Array
(
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
);
var
week
=
weekArray
[
new
Date
(
date
).
getDay
()];
//注意此处必须是先new一个Date
return
"周"
+
week
;
},
getDate
(
date
)
{
if
(
date
)
{
let
arr
=
date
.
split
(
"-"
);
return
arr
[
1
]
+
"月"
+
arr
[
2
]
+
"日"
;
}
},
initOrderInfo
(
orderId
)
{
let
msg
=
{
Id
:
orderId
,
};
this
.
apipost
(
"b2c_get_GetB2CVisaOrderInfo"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderData
=
{
...
this
.
orderData
,
OrderModel
:{
...
res
.
data
.
OrderModel
},
ProductModel
:{
...
res
.
data
.
ProductModel
}
}
// #ifdef MP-AG
this
.
formatStatus
(
res
.
data
.
OrderModel
.
VisaOrderStatus
,
res
.
data
.
OrderModel
.
Income
,
res
.
data
.
OrderModel
.
TotalPrice
,
res
.
data
.
OrderModel
.
PlatformTax
);
// #endif
}
},
(
e
)
=>
{
this
.
orderData
=
{
result
:
-
1
,
};
}
);
},
formatStatus
(
status
,
Income
,
TotalPrice
,
PlatformTax
)
{
// #ifdef MP-DI
if
(
status
==
1
){
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
showPayBtn
=
true
;
}
else
if
(
status
==
2
){
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"待出行"
;
this
.
showPayBtn
=
true
;
}
else
if
(
status
==
3
){
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"已完成"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
4
){
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
5
&&
this
.
orderData
.
AfterSalesOrderStatus
==
1
){
this
.
orderStatus
.
code
=
-
2
;
this
.
orderStatus
.
text
=
"等待审批"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
5
&&
this
.
orderData
.
AfterSalesOrderStatus
==
2
){
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"退款中"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
5
&&
this
.
orderData
.
AfterSalesOrderStatus
==
3
){
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已原路退回"
;
this
.
showPayBtn
=
false
;
}
// #endif
// #ifdef MP-AG
if
(
status
==
2
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
3
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
showPayBtn
=
true
;
}
else
if
(
status
==
1
&&
(
Income
+
PlatformTax
)
<
TotalPrice
)
{
this
.
orderStatus
.
code
=
-
2
;
this
.
orderStatus
.
text
=
"正常"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
1
&&
(
Income
+
PlatformTax
)
==
TotalPrice
)
{
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"待出行"
;
this
.
showPayBtn
=
false
;
}
// #endif
},
},
};
</
script
>
pages/visa/visa_SureOrder.vue
View file @
6212380f
...
@@ -725,6 +725,8 @@
...
@@ -725,6 +725,8 @@
// #ifdef MP-DI
// #ifdef MP-DI
this
.
orderData
.
OrderStatus
=
4
this
.
orderData
.
OrderStatus
=
4
// #endif
// #endif
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
isExpired
=
true
this
.
isExpired
=
true
}
else
{
}
else
{
const
now
=
Date
.
now
();
const
now
=
Date
.
now
();
...
...
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