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
dcc6a194
Commit
dcc6a194
authored
Apr 28, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付调整
parent
bbd6ae3e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
188 additions
and
399 deletions
+188
-399
orders.vue
pages/AggregateOrders/components/orders.vue
+37
-210
hotelRoom.vue
pages/hotel/components/hotelRoom.vue
+0
-2
mapList.vue
pages/hotel/mapList.vue
+0
-8
order.vue
pages/hotel/order.vue
+25
-72
orderdetails.vue
pages/hotel/orderdetails.vue
+126
-107
No files found.
pages/AggregateOrders/components/orders.vue
View file @
dcc6a194
...
...
@@ -88,48 +88,6 @@
orderInfo
:
null
,
showModal
:
false
,
currentData
:
null
,
orderMsg
:
{
ArrivalTime
:
'14:00'
,
//预计到达时间
EmployeeIdStr
:
""
,
//销售id
CheckInDate
:
""
,
//到店时间
RatePlanID
:
""
,
CheckOutDate
:
""
,
//离店时间
RoomCount
:
""
,
//房间数量
guestLastName
:
"张"
,
//英文姓
guestFirstName
:
"无误"
,
//英文名
guestAddress
:
""
,
guestPhoneNumber
:
"13344445555"
,
guestEmail
:
"123@qq.com"
,
//Email
BookingID
:
""
,
HotelName
:
""
,
//酒店名称
HotelPic
:
""
,
//酒店封面
GuestList
:
[],
TotalPrice
:
0
,
//总价
CustomerPayMoney
:
0
,
DiscountMoney
:
0
,
//优惠
CouponAllotIds
:
''
,
//优惠券Id
// #ifdef MP-DI
OrderSource
:
7
,
// #endif
// #ifdef MP-AG
OrderSource
:
5
,
// #endif
// // #ifdef MP-WEIXIN
// OrderSource: 5,
// // #endif
// #ifdef MP-ALIPAY
OrderSource
:
6
,
// #endif
OrderForm
:
4
,
//订单来源
//备注
guestRequest
:
""
,
hotelId
:
''
,
//酒店Id
roomType
:
0
,
CustomerId
:
0
,
//同行Id
DirectCustomerId
:
0
,
//直客Id
Remarks
:
''
,
//备注
},
orderData
:{},
}
},
watch
:
{
...
...
@@ -147,15 +105,19 @@
cancelSuccess
()
{
this
.
$emit
(
'research'
,
5
)
},
//调用支付
submitGetCodeByOrderNo
(
item
)
{
console
.
log
(
"item"
,
item
)
let
mallUserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
uni
.
showLoading
({
title
:
"请稍等片刻..."
,
})
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
this
.
submit
=
true
this
.
apipost
(
"GetCodeByOrderNo_post"
,
{
OrderNo
:
item
.
orderNo
,
MallBaseId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
OrderNo
:
item
.
directOrderNo
,
OpenId
:
mallUserInfo
.
OpenId
,
MallBaseId
:
mallUserInfo
.
MallBaseId
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
...
...
@@ -170,138 +132,6 @@
})
this
.
submit
=
false
});
// if(item.goodsType > 7 && item.goodsType
<
12
){
// this.getOrderDetail(item.erpOrderId)
// }else{
// this.apipost("GetCodeByOrderNo_post", {
// OrderNo: item.orderNo,
// MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId
// }, (res) => {
// if (res.resultCode == 1) {
// this.orderInfo = JSON.parse(res.data.sPayInfo)
// this.goPayHandler(item);
// }
// }, e => {
// uni.hideLoading()
// uni.showToast({
// title: '无法发起支付,请稍后',
// icon: 'none',
// duration: 3000
// })
// this.submit = false
// });
// }
},
// 酒店详情
getOrderDetail
(
id
)
{
let
msg
=
{
orderId
:
id
,
};
this
.
apipost
(
"dmc_post_Get_GetJAPAN_OrderDetail"
,
msg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderData
=
res
.
data
let
RoomInfo
=
res
.
data
.
parmResultRoomInfo
this
.
orderMsg
=
{
ArrivalTime
:
RoomInfo
.
ArrivalTime
,
//预计到达时间
EmployeeIdStr
:
RoomInfo
.
EmployeeIdStr
,
//销售id
CheckInDate
:
RoomInfo
.
CheckInDate
,
//到店时间
RatePlanID
:
RoomInfo
.
RatePlanID
,
CheckOutDate
:
RoomInfo
.
CheckOutDate
,
//离店时间
RoomCount
:
RoomInfo
.
RoomCount
,
//房间数量
guestLastName
:
RoomInfo
.
guestLastName
,
//英文姓
guestFirstName
:
RoomInfo
.
guestFirstName
,
//英文名
guestAddress
:
RoomInfo
.
guestAddress
,
guestPhoneNumber
:
RoomInfo
.
guestPhoneNumber
,
guestEmail
:
RoomInfo
.
guestEmail
,
//Email
BookingID
:
RoomInfo
.
BookingID
,
HotelName
:
RoomInfo
.
HotelName
,
//酒店名称
HotelPic
:
RoomInfo
.
HotelPic
,
//酒店封面
GuestList
:
RoomInfo
.
GuestList
,
TotalPrice
:
RoomInfo
.
TotalPrice
,
//总价
CustomerPayMoney
:
RoomInfo
.
CustomerPayMoney
,
DiscountMoney
:
RoomInfo
.
DiscountMoney
,
//优惠
CouponAllotIds
:
RoomInfo
.
CouponAllotIds
,
//优惠券Id
// #ifdef MP-DI
OrderSource
:
7
,
// #endif
// #ifdef MP-AG
OrderSource
:
5
,
// #endif
// // #ifdef MP-WEIXIN
// OrderSource: 5,
// // #endif
// #ifdef MP-ALIPAY
OrderSource
:
6
,
// #endif
OrderForm
:
4
,
//订单来源
//备注
guestRequest
:
RoomInfo
.
guestRequest
,
hotelId
:
RoomInfo
.
hotelId
,
//酒店Id
roomType
:
RoomInfo
.
roomType
,
CustomerId
:
RoomInfo
.
CustomerId
,
//同行Id
DirectCustomerId
:
RoomInfo
.
DirectCustomerId
,
//直客Id
Remarks
:
RoomInfo
.
Remarks
,
//备注
}
this
.
submitB2COrderHandler
()
}
},
err
=>
{
}
);
},
// 酒店支付
submitB2COrderHandler
(){
let
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
model
=
this
.
orderData
.
parmResultRoomInfo
let
RoomInfo
=
this
.
orderData
.
parmResultRoomInfo
let
directOrder
=
this
.
orderData
.
directOrder
let
msg
=
{
SurName
:
RoomInfo
.
SurName
,
Name
:
RoomInfo
.
Name
,
ContactNumber
:
RoomInfo
.
guestPhoneNumber
,
Mailbox
:
RoomInfo
.
guestEmail
,
GoodsId
:
RoomInfo
.
hotelId
,
GoodsName
:
RoomInfo
.
HotelName
,
GoodsPic
:
model
.
HotelPic
,
GoodsType
:
directOrder
.
GoodsType
,
OrderMake
:
`
${
directOrder
.
OrderMake
}
`
,
TotalPrice
:
RoomInfo
.
TotalPrice
,
PreferentialPrice
:
RoomInfo
.
DiscountMoney
,
CouponAllotIds
:
""
,
ErpOrderId
:
0
,
Country
:
0
,
PlatformTax
:
0
,
Income
:
0
,
Refund
:
0
,
MallBaseId
:
userInfo
.
MallBaseId
,
CreateBy
:
0
,
// #ifdef MP-DI
DOrderType
:
1
,
// #endif
// #ifdef MP-AG
DOrderType
:
2
,
OpenId
:
userInfo
.
OpenId
?
userInfo
.
OpenId
:
''
,
// #endif
CreateBy
:
directOrder
.
CreateBy
,
DiDaHotelParams
:
{},
};
//道旅酒店参数
msg
.
DiDaHotelParams
=
this
.
orderMsg
;
this
.
apipost
(
"AddOrderInfo_post"
,
msg
,
(
res
)
=>
{
this
.
submit
=
false
;
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
this
.
goPayHandler
();
}
},
err
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
})
this
.
submit
=
false
;
});
},
goPayHandler
(
item
)
{
let
that
=
this
;
...
...
@@ -313,13 +143,12 @@
signType
:
this
.
orderInfo
.
signType
,
paySign
:
this
.
orderInfo
.
sign
,
success
:
function
(
res
)
{
console
.
log
(
"success"
,
res
);
that
.
submit
=
false
;
uni
.
hideLoading
()
uni
.
showToast
({
title
:
"支付成功"
,
});
that
.
goPayPage
(
item
)
that
.
cancelSuccess
();
},
fail
:
function
(
err
)
{
that
.
submit
=
false
;
...
...
@@ -360,42 +189,42 @@
AnotherOrder
(
item
)
{
let
url
=
''
// #ifdef MP-DI
if
(
item
.
goodsType
>
0
&&
item
.
goodsType
<
4
)
{
//线路
const
pts
=
[
''
,
2
,
0
,
1
]
const
productType
=
pts
[
item
.
goodsType
]
url
=
`jiuzhai/jz_Line?teamType=
${
productType
}
`
}
else
if
(
item
.
goodsType
>
3
&&
item
.
goodsType
<
8
)
{
//景点门票
if
(
item
.
goodsType
>
0
&&
item
.
goodsType
<
4
)
{
//线路
const
pts
=
[
''
,
2
,
0
,
1
]
const
productType
=
pts
[
item
.
goodsType
]
url
=
`jiuzhai/jz_Line?teamType=
${
productType
}
`
}
else
if
(
item
.
goodsType
>
3
&&
item
.
goodsType
<
8
)
{
//景点门票
}
else
if
(
item
.
goodsType
>
7
&&
item
.
goodsType
<
12
)
{
//酒店住宿
}
else
if
(
item
.
goodsType
>
7
&&
item
.
goodsType
<
12
)
{
//酒店住宿
}
else
if
(
item
.
goodsType
>
11
&&
item
.
goodsType
<
15
)
{
//目的地用车
}
else
if
(
item
.
goodsType
>
11
&&
item
.
goodsType
<
15
)
{
//目的地用车
}
else
if
(
item
.
goodsType
==
15
)
{
//签证
url
=
"visa/visaList"
}
else
if
(
item
.
goodsType
==
16
)
{
//机票
url
=
"airTicket/airIndex"
}
}
else
if
(
item
.
goodsType
==
15
)
{
//签证
url
=
"visa/visaList"
}
else
if
(
item
.
goodsType
==
16
)
{
//机票
url
=
"airTicket/airIndex"
}
// #endif
// #ifdef MP-AG
if
(
item
.
goodsType
==
2
)
{
//线路
const
pts
=
[
''
,
2
,
0
,
1
]
const
productType
=
pts
[
item
.
goodsType
]
url
=
`jiuzhai/jz_Line?teamType=
${
productType
}
`
}
else
if
(
item
.
goodsType
==
4
)
{
//景点门票
}
else
if
(
item
.
goodsType
==
3
)
{
//酒店住宿
}
else
if
(
item
.
goodsType
==
7
)
{
//道旅酒店住宿
url
=
"hotel/list"
}
else
if
(
item
.
goodsTyp
==
5
)
{
//目的地用车
}
else
if
(
item
.
goodsType
==
6
)
{
//签证
url
=
"visa/visaList"
}
else
if
(
item
.
goodsType
==
1
)
{
//机票
url
=
"airTicket/airIndex"
}
if
(
item
.
goodsType
==
2
)
{
//线路
const
pts
=
[
''
,
2
,
0
,
1
]
const
productType
=
pts
[
item
.
goodsType
]
url
=
`jiuzhai/jz_Line?teamType=
${
productType
}
`
}
else
if
(
item
.
goodsType
==
4
)
{
//景点门票
}
else
if
(
item
.
goodsType
==
3
)
{
//酒店住宿
}
else
if
(
item
.
goodsType
==
7
)
{
//道旅酒店住宿
url
=
"hotel/list"
}
else
if
(
item
.
goodsTyp
==
5
)
{
//目的地用车
}
else
if
(
item
.
goodsType
==
6
)
{
//签证
url
=
"visa/visaList"
}
else
if
(
item
.
goodsType
==
1
)
{
//机票
url
=
"airTicket/airIndex"
}
// #endif
if
(
url
)
{
uni
.
navigateTo
({
url
:
`/pages/
${
url
}
`
,
...
...
@@ -406,7 +235,6 @@
goDetails
(
item
)
{
let
url
=
null
let
msg
=
null
// #ifdef MP-DI
msg
=
`OrderNo=
${
item
.
orderNo
}
`
if
(
item
.
goodsType
>
0
&&
item
.
goodsType
<
4
)
url
=
`jiuzhai/jz_SureOrder?`
//线路
...
...
@@ -440,7 +268,6 @@
});
}
},
//取消订单
goCancel
(
item
)
{
let
that
=
this
...
...
pages/hotel/components/hotelRoom.vue
View file @
dcc6a194
...
...
@@ -421,8 +421,6 @@
pHotel
.
address
=
this
.
HotelInfo
.
location
.
address
;
}
}
console
.
log
(
"hotelRoom"
,
pHotel
);
console
.
log
(
"searchroomGroup"
,
this
.
searchObj
.
searchroomGroup
);
uni
.
navigateTo
({
url
:
`/pages/hotel/order?searchObj=
${
JSON
.
stringify
(
this
.
searchObj
)}
&HotelInfo=
${
JSON
.
stringify
(
pHotel
)}
&RoomInfo=
${
JSON
.
stringify
(
subItem
)}
&CreateBy=
${
createBy
}
`
,
});
...
...
pages/hotel/mapList.vue
View file @
dcc6a194
...
...
@@ -210,7 +210,6 @@
size
:
true
},
(
res
)
=>
{
that
.
mapCtx
=
wx
.
createMapContext
(
'myMap'
);
console
.
log
(
this
.
mapCtx
,
'--------地图实例'
)
}).
exec
();
},
fitMapToBounds
()
{
...
...
@@ -233,7 +232,6 @@
});
},
handleCalloutClick
(
marker
)
{
console
.
log
(
'点击了标记:'
,
marker
.
detail
);
for
(
let
i
=
0
;
i
<
this
.
markers
.
length
;
i
++
)
{
if
(
this
.
markers
[
i
].
id
==
marker
.
detail
.
markerId
){
this
.
current
=
i
...
...
@@ -274,13 +272,8 @@
success
:
(
res
)
=>
{
that
.
fitMapToBounds
();
// 更新地图中心点
// if(that.$refs.myMapRef)this.$refs.myMapRef.moveToLocation({
// longitude: res.longitude,
// latitude: res.latitude
// });
},
fail
:
(
err
)
=>
{
console
.
error
(
'定位失败'
,
err
);
wx
.
showModal
({
title
:
'提示'
,
content
:
'授权失败,请检查定位权限'
...
...
@@ -289,7 +282,6 @@
});
},
changeCurrent
(
e
)
{
// console.log(e.detail.current,'--------',this.HotelList.length-1)
this
.
prevCurrent
=
this
.
current
this
.
current
=
e
.
detail
.
current
;
this
.
setNewMarkers
()
...
...
pages/hotel/order.vue
View file @
dcc6a194
...
...
@@ -197,7 +197,7 @@
<
view
class
=
"flex f12"
>
<
view
style
=
"flex: 1"
>
小计
<
/view
>
<
view
>
{{
RoomInfo
.
Currency
}}
{{
RoomInfo
.
Currency
}}
<!--
{{
(
getPrice
(
orderMsg
.
TotalPrice
)
*
orderMsg
.
RoomCount
)
-
currentCoupon
.
discountMoney
}}
-->
{{
((
orderMsg
.
TotalPrice
*
orderMsg
.
RoomCount
*
dayObj
.
day
)
-
currentCoupon
.
discountMoney
).
toFixed
(
2
)
}}
<
/view
>
...
...
@@ -210,8 +210,7 @@
<
text
class
=
""
>
购买说明
<
/text
>
<
/view
>
<
view
class
=
"rule"
>
<
text
class
=
"king"
>
此房间
<
text
class
=
"king"
>
<
/text
>
<
text
v
-
if
=
"roomRateDetails&&
roomRateDetails.CancellationPolicyList &&
...
...
@@ -509,14 +508,14 @@
Name
:
this
.
orderMsg
.
Name
,
ContactNumber
:
this
.
orderMsg
.
guestPhoneNumber
,
Mailbox
:
this
.
orderMsg
.
guestEmail
,
GoodsId
:
this
.
HotelInfo
.
hotel
I
d
,
GoodsId
:
this
.
HotelInfo
.
hotel
i
d
,
GoodsName
:
this
.
HotelInfo
.
name
,
GoodsPic
:
""
,
GoodsType
:
9
,
OrderMake
:
`${this.orderMsg.CheckInDate
}
入住;${this.orderMsg.CheckOutDate
}
离店 ${guestInfo
}
`
,
TotalPrice
:
this
.
orderMsg
.
TotalPrice
,
PreferentialPrice
:
this
.
currentCoupon
.
discountMoney
,
CouponAllotIds
:
""
,
CouponAllotIds
:
""
,
ErpOrderId
:
0
,
Country
:
0
,
PlatformTax
:
0
,
...
...
@@ -529,10 +528,10 @@
// #endif
// #ifdef MP-AG
DOrderType
:
2
,
OpenId
:
userInfo
.
OpenId
?
userInfo
.
OpenId
:
""
,
OpenId
:
userInfo
.
OpenId
?
userInfo
.
OpenId
:
""
,
// #endif
DiDaHotelParams
:
{
}
,
CustomerId
:
0
,
}
;
let
CouponAllotIds
=
''
if
(
this
.
useCouponIds
.
length
>
0
)
{
...
...
@@ -545,26 +544,29 @@
//道旅酒店参数
let
that
=
this
;
var
CreateBy
=
0
//直客
// #ifdef MP-DI
if
(
this
.
customer
.
salesBaseInfo
&&
this
.
customer
.
salesBaseInfo
.
employeeId
)
{
msg
.
CreateBy
=
this
.
customer
.
salesBaseInfo
.
employeeId
;
}
that
.
orderMsg
.
DirectCustomerId
=
this
.
customer
.
customerId
;
if
(
this
.
customer
&&
this
.
customer
.
erpBaseInfo
&&
this
.
customer
.
erpBaseInfo
.
employeeId
)
{
that
.
orderMsg
.
EmployeeIdStr
=
this
.
customer
.
erpBaseInfo
.
employeeId
;
}
if
(
this
.
customer
.
salesBaseInfo
&&
this
.
customer
.
salesBaseInfo
.
employeeId
)
{
msg
.
CreateBy
=
this
.
customer
.
salesBaseInfo
.
employeeId
;
}
that
.
orderMsg
.
DirectCustomerId
=
this
.
customer
.
customerId
;
msg
.
CustomerId
=
this
.
customer
.
customerId
;
if
(
this
.
customer
&&
this
.
customer
.
erpBaseInfo
&&
this
.
customer
.
erpBaseInfo
.
employeeId
)
{
that
.
orderMsg
.
EmployeeIdStr
=
this
.
customer
.
erpBaseInfo
.
employeeId
;
}
// #endif
//同行
// #ifdef MP-AG
CreateBy
=
this
.
CreateBy
that
.
orderMsg
.
CustomerId
=
this
.
customer
.
customerId
that
.
orderMsg
.
EmployeeIdStr
=
CreateBy
that
.
orderMsg
.
CustomerId
=
this
.
customer
.
customerId
msg
.
CustomerId
=
this
.
customer
.
customerInfoChildrenId
;
if
(
this
.
customer
&&
this
.
customer
.
salesBaseInfo
&&
this
.
customer
.
salesBaseInfo
.
employeeId
)
{
that
.
orderMsg
.
EmployeeIdStr
=
this
.
customer
.
salesBaseInfo
.
employeeId
;
}
// #endif
this
.
orderMsg
.
CouponAllotIds
=
CouponAllotIds
;
msg
.
DiDaHotelParams
=
this
.
orderMsg
;
//道旅参数END
console
.
log
(
"AddOrderInfo_post"
,
msg
);
this
.
apipost
(
"AddOrderInfo_post"
,
msg
,
(
res
)
=>
{
this
.
submit
=
false
;
if
(
res
.
resultCode
==
1
)
{
...
...
@@ -601,15 +603,10 @@
title
:
"支付成功"
,
}
);
setTimeout
(()
=>
{
//创建道旅订单
//that.createDiDaOrder();
// uni.redirectTo(
{
// url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
// (that.orderMsg.TotalPrice - that.currentCoupon
// .discountMoney).toFixed(2) +
// "&isFrom=5",
//
}
);
//跳转到详情页面
uni
.
redirectTo
({
url
:
"/pages/hotel/orderdetails?orderId="
+
item
.
ErpOrderId
,
}
);
}
,
100
);
}
,
fail
:
function
(
err
)
{
...
...
@@ -626,50 +623,6 @@
}
,
}
);
}
,
//创建道旅订单
createDiDaOrder
()
{
let
that
=
this
;
var
CreateBy
=
0
// #ifdef MP-DI
that
.
orderMsg
.
DirectCustomerId
=
this
.
customer
.
customerId
;
if
(
this
.
customer
&&
this
.
customer
.
erpBaseInfo
&&
this
.
customer
.
erpBaseInfo
.
employeeId
)
{
that
.
orderMsg
.
EmployeeIdStr
=
this
.
customer
.
erpBaseInfo
.
employeeId
;
}
// #endif
// #ifdef MP-AG
CreateBy
=
this
.
CreateBy
that
.
orderMsg
.
CustomerId
=
this
.
customer
.
customerId
that
.
orderMsg
.
EmployeeIdStr
=
CreateBy
// #endif
let
CouponAllotIds
=
''
if
(
this
.
useCouponIds
.
length
>
0
)
{
CouponAllotIds
=
this
.
useCouponIds
.
join
(
','
)
}
this
.
orderMsg
.
CouponAllotIds
=
CouponAllotIds
console
.
log
(
"酒店下单"
,
that
.
orderMsg
);
that
.
apipost
(
'dmc_post_GetDiDaBookingConfirm'
,
that
.
orderMsg
,
res
=>
{
if
(
res
.
resultCode
==
1
)
{
const
tempData
=
res
.
data
// #ifdef MP-DI
//this.submitB2COrderHandler(tempData.orderId)
// #endif
// #ifdef MP-AG
this
.
submit
=
false
uni
.
showToast
({
title
:
'订单创建成功.'
,
icon
:
'none'
}
)
uni
.
redirectTo
({
url
:
`/pages/AggregateOrders/AggregateOrdersList?OrderTypeStr=7`
,
}
);
// #endif
}
}
);
}
,
//日期格式化
getformatDateStr
(
value
)
{
var
dt
=
new
Date
(
value
);
...
...
pages/hotel/orderdetails.vue
View file @
dcc6a194
...
...
@@ -34,8 +34,10 @@
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638766174213789755.png"
/>
</view>
<view
class=
"orderIforRzTime column col"
>
<view>
入住:
<text>
{{
getDate
(
orderData
.
parmResultRoomInfo
.
CheckInDate
)
}}
{{
getWeek
(
orderData
.
parmResultRoomInfo
.
CheckInDate
)
}}
14:00后
</text></view>
<view
style=
"margin-top: 28rpx;"
>
离店:
<text>
{{
getDate
(
orderData
.
parmResultRoomInfo
.
CheckOutDate
)
}}
{{
getWeek
(
orderData
.
parmResultRoomInfo
.
CheckOutDate
)
}}
12:00前
</text></view>
<view>
入住:
<text>
{{
getDate
(
orderData
.
parmResultRoomInfo
.
CheckInDate
)
}}
{{
getWeek
(
orderData
.
parmResultRoomInfo
.
CheckInDate
)
}}
14:00后
</text></view>
<view
style=
"margin-top: 28rpx;"
>
离店:
<text>
{{
getDate
(
orderData
.
parmResultRoomInfo
.
CheckOutDate
)
}}
{{
getWeek
(
orderData
.
parmResultRoomInfo
.
CheckOutDate
)
}}
12:00前
</text></view>
</view>
<view
class=
"orderIforRzNum"
>
{{
getDay
(
orderData
.
parmResultRoomInfo
.
CheckInDate
.
slice
(
0
,
10
),
orderData
.
parmResultRoomInfo
.
CheckOutDate
.
slice
(
0
,
10
))
}}
晚
...
...
@@ -148,7 +150,6 @@
</view>
</view>
</view>
<!-- <cancelProgress :datas="orderData"></cancelProgress> -->
<view
class=
"ReservationInforBox"
>
<view
class=
"big-title"
>
<text>
费用明细
</text>
...
...
@@ -204,24 +205,24 @@
<view
class=
"jz_orderbox flex"
v-if=
"showPayBtn"
>
<view
style=
"display: flex"
>
<!-- #ifdef MP-DI -->
<button
v-if=
"orderData.model.OrderStatus==1
"
class=
"jz_OrderReNow"
@
click=
"goCancel
"
style=
"background: #fff; color: #111; border: 1px solid #111"
:disabled=
"submitCancel
"
:loading=
"submitCancel"
>
<button
v-if=
"orderData.model.OrderStatus==1
||orderData.model.OrderStatus==5"
class=
"jz_OrderReNow
"
@
click=
"goCancel"
style=
"background: #fff; color: #111; border: 1px solid #111
"
:
disabled=
"submitCancel"
:
loading=
"submitCancel"
>
取消
</button>
<button
v-if=
"orderData.model.OrderStatus==1"
class=
"jz_OrderReNow"
style=
"margin-left: 20rpx;"
@
click=
"
submitB2COrderHandl
er"
:disabled=
"submit"
:loading=
"submit"
>
@
click=
"
payHotelOrd
er"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<button
v-if=
"orderData.model.OrderStatus==1
"
class=
"jz_OrderReNow"
@
click=
"goCancel
"
style=
"background: #fff; color: #111; border: 1px solid #111"
:disabled=
"submitCancel
"
:loading=
"submitCancel"
>
<button
v-if=
"orderData.model.OrderStatus==1
||orderData.model.OrderStatus==5"
class=
"jz_OrderReNow
"
@
click=
"goCancel"
style=
"background: #fff; color: #111; border: 1px solid #111
"
:
disabled=
"submitCancel"
:
loading=
"submitCancel"
>
取消
</button>
<button
v-if=
"orderData.model.OrderStatus==1"
class=
"jz_OrderReNow"
style=
"margin-left: 20rpx;"
@
click=
"
submitB2COrderHandl
er"
:disabled=
"submit"
:loading=
"submit"
>
@
click=
"
payHotelOrd
er"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
<!-- #endif -->
...
...
@@ -244,7 +245,6 @@
opacity
:
0
,
},
mainColor
:
""
,
Up
:
0
,
current
:
1
,
scrollTop
:
100
,
...
...
@@ -348,46 +348,15 @@
this
.
getdidaMealType
()
},
methods
:
{
submitB2COrderHandler
()
{
payHotelOrder
()
{
let
userInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
let
model
=
this
.
orderData
.
model
let
RoomInfo
=
this
.
orderData
.
parmResultRoomInfo
let
directOrder
=
this
.
orderData
.
directOrder
let
msg
=
{
SurName
:
RoomInfo
.
SurName
,
Name
:
RoomInfo
.
Name
,
ContactNumber
:
RoomInfo
.
guestPhoneNumber
,
Mailbox
:
RoomInfo
.
guestEmail
,
GoodsId
:
RoomInfo
.
hotelId
,
GoodsName
:
RoomInfo
.
HotelName
,
GoodsPic
:
model
.
HotelPic
,
GoodsType
:
directOrder
.
GoodsType
,
OrderMake
:
`
${
directOrder
.
OrderMake
}
`
,
TotalPrice
:
RoomInfo
.
TotalPrice
,
PreferentialPrice
:
RoomInfo
.
DiscountMoney
,
CouponAllotIds
:
""
,
ErpOrderId
:
0
,
Country
:
0
,
PlatformTax
:
0
,
Income
:
0
,
Refund
:
0
,
MallBaseId
:
userInfo
.
MallBaseId
,
CreateBy
:
0
,
// #ifdef MP-DI
DOrderType
:
1
,
// #endif
// #ifdef MP-AG
DOrderType
:
2
,
OpenId
:
userInfo
.
OpenId
?
userInfo
.
OpenId
:
''
,
// #endif
CreateBy
:
directOrder
.
CreateBy
,
DiDaHotelParams
:
{},
var
payMsg
=
{
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
OpenId
:
userInfo
.
OpenId
,
MallBaseId
:
userInfo
.
MallBaseId
,
};
//道旅酒店参数
msg
.
DiDaHotelParams
=
this
.
orderMsg
;
this
.
submit
=
true
this
.
apipost
(
"
AddOrderInfo_post"
,
m
sg
,
(
res
)
=>
{
this
.
apipost
(
"
GetCodeByOrderNo_post"
,
payM
sg
,
(
res
)
=>
{
this
.
submit
=
false
;
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
...
...
@@ -403,39 +372,8 @@
this
.
submit
=
false
;
});
},
submitGetCodeByOrderNo
()
{
if
(
this
.
submit
||
this
.
submitCancel
)
return
;
this
.
submit
=
true
var
payMsg
=
{
OrderNo
:
""
,
MallBaseId
:
uni
.
getStorageSync
(
"mall_UserInfo"
).
MallBaseId
}
if
(
this
.
orderData
&&
this
.
orderData
.
directOrder
&&
this
.
orderData
.
directOrder
.
OrderNo
)
{
payMsg
.
OrderNo
=
this
.
orderData
.
directOrder
.
OrderNo
;
}
this
.
apipost
(
"GetCodeByOrderNo_post"
,
payMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
orderInfo
=
JSON
.
parse
(
res
.
data
.
sPayInfo
)
this
.
goPayHandler
(
res
.
data
);
}
else
{
uni
.
showToast
({
title
:
res
.
message
,
icon
:
'none'
,
duration
:
3000
})
this
.
submit
=
false
;
}
},
e
=>
{
uni
.
showToast
({
title
:
'无法发起支付,请稍后'
,
icon
:
'none'
,
duration
:
3000
})
this
.
submit
=
false
});
},
goPayHandler
(
item
)
{
let
OrderNo
=
item
.
OrderNo
;
let
OrderNo
=
item
.
OrderNo
;
let
that
=
this
;
uni
.
requestPayment
({
provider
:
"wxpay"
,
...
...
@@ -450,11 +388,7 @@
title
:
"支付成功"
,
});
setTimeout
(()
=>
{
uni
.
redirectTo
({
url
:
"/pages/jiuzhai/paysuccess?PreferPrice="
+
(
that
.
orderData
.
model
.
TotalPrice
-
that
.
orderData
.
model
.
DiscountMoney
).
toFixed
(
2
)
+
"&isFrom=5"
,
});
that
.
getOrderDetail
(
that
.
id
)
},
100
);
},
fail
:
function
(
err
)
{
...
...
@@ -467,29 +401,115 @@
});
},
goCancel
()
{
var
that
=
this
;
if
(
this
.
submitCancel
)
return
this
.
submitCancel
=
true
this
.
apipost
(
"dmc_post_GetDiDaBookingCancel"
,
{
BookingID
:
this
.
orderData
.
model
.
OrderID
,
},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
submitCancel
=
true
;
var
cancelMsg
=
{
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
ErpOrderId
:
this
.
orderData
.
model
.
OrderID
,
OrderTypeStr
:
"Hotel"
,
//订单类型为酒店
ConfirmID
:
""
,
};
//待付款-直接取消
if
(
this
.
orderData
.
model
.
OrderStatus
==
1
)
{
this
.
apipost
(
"post_CancelThirdHotelOrder"
,
cancelMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
getOrderDetail
(
this
.
id
)
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"
success
"
,
title
:
err
.
message
,
icon
:
"
none
"
,
});
this
.
getOrderDetail
(
this
.
id
)
this
.
submitCancel
=
false
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
this
.
submitCancel
=
false
);
}
//已付款,可能会有取消费用
else
if
(
this
.
orderData
.
model
.
OrderStatus
==
5
)
{
var
didaMsg
=
{
BookingID
:
this
.
orderData
.
model
.
ThirdOrderNo
}
);
this
.
apipost
(
"dmc_post_GetDiDaBookingCancel"
,
didaMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
;
console
.
log
(
"tempData"
,
tempData
);
if
(
tempData
)
{
cancelMsg
.
ConfirmID
=
tempData
.
ConfirmID
;
//有取消费用
if
(
tempData
.
Amount
&&
tempData
.
Amount
>
0
)
{
var
tipmsg
=
"取消订单将收取【"
+
tempData
.
Amount
+
"】取消费用,是否确认取消订单?"
wx
.
showModal
({
title
:
'提示'
,
content
:
tipmsg
,
success
:
(
tip
)
=>
{
if
(
tip
.
confirm
)
{
that
.
submitCancel
=
true
that
.
apipost
(
"post_CancelThirdHotelOrder"
,
cancelMsg
,
(
res
)
=>
{
that
.
submitCancel
=
false
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
that
.
$emit
(
'research'
);
}
},
(
err
)
=>
{
that
.
submitCancel
=
false
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
})
}
);
}
}
})
}
//无取消费用
else
{
that
.
apipost
(
"post_CancelThirdHotelOrder"
,
cancelMsg
,
(
res
)
=>
{
that
.
submitCancel
=
false
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
that
.
$emit
(
'research'
);
}
},
(
err
)
=>
{
that
.
submitCancel
=
false
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
})
}
);
}
}
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
this
.
submitCancel
=
false
})
}
},
formatStatus
(
status
)
{
// #ifdef MP-DI
...
...
@@ -564,12 +584,11 @@
if
(
res
.
resultCode
==
1
)
{
uni
.
hideLoading
();
this
.
orderData
=
res
.
data
if
(
res
.
data
.
parmResult
&&
res
.
data
.
parmResult
.
Success
)
{
if
(
res
.
data
.
parmResult
&&
res
.
data
.
parmResult
.
Success
)
{
this
.
RatePlanList
=
res
.
data
.
parmResult
.
Success
.
BookingDetails
.
Hotel
.
RatePlanList
this
.
DanWei
=
res
.
data
.
parmResult
.
Success
.
BookingDetails
.
Hotel
.
RatePlanList
[
0
].
Currency
this
.
roomRateDetails
=
res
.
data
.
parmResult
.
Success
.
BookingDetails
.
Hotel
}
console
.
log
(
this
.
orderData
,
'-----'
)
res
.
data
.
parmResultRoomInfo
.
GuestList
.
forEach
((
item
,
index
)
=>
{
this
.
roomNum
++
item
.
GuestInfo
.
forEach
((
items
,
i
)
=>
{
...
...
@@ -577,7 +596,7 @@
})
})
let
RoomInfo
=
res
.
data
.
parmResultRoomInfo
this
.
orderMsg
=
{
this
.
orderMsg
=
{
ArrivalTime
:
RoomInfo
.
ArrivalTime
,
//预计到达时间
EmployeeIdStr
:
RoomInfo
.
EmployeeIdStr
,
//销售id
CheckInDate
:
RoomInfo
.
CheckInDate
,
//到店时间
...
...
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