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
bcd66615
Commit
bcd66615
authored
Apr 28, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单支付测试
parent
dcc6a194
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
211 additions
and
279 deletions
+211
-279
AggregateOrdersList.vue
pages/AggregateOrders/AggregateOrdersList.vue
+2
-0
orders.vue
pages/AggregateOrders/components/orders.vue
+92
-3
hotel-good.vue
pages/hotel/components/hotel-good.vue
+0
-1
hotelRoom.vue
pages/hotel/components/hotelRoom.vue
+40
-44
orderdetails.vue
pages/hotel/orderdetails.vue
+77
-231
No files found.
pages/AggregateOrders/AggregateOrdersList.vue
View file @
bcd66615
...
@@ -183,7 +183,9 @@
...
@@ -183,7 +183,9 @@
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
x
.
orderStatusInfo
=
EnumHelper
.
ParseToEnum
(
OrderStatusEnum
,
x
.
orderStatus
,
'value'
)
'value'
)
})
})
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
console
.
log
(
"res.data.pageData"
,
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
this
.
status
=
"nomore"
;
...
...
pages/AggregateOrders/components/orders.vue
View file @
bcd66615
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
<!-- #ifdef MP-DI -->
<!-- #ifdef MP-DI -->
<view
v-if=
"item.orderStatus==1||item.orderStatus==2"
class=
"jz_Zailai"
<view
v-if=
"item.orderStatus==1||item.orderStatus==2"
class=
"jz_Zailai"
style=
"width: 110rpx;margin-left: 10rpx;"
@
click
.
stop=
"goCancelZK(item)"
>
取消
</view>
style=
"width: 110rpx;margin-left: 10rpx;"
@
click
.
stop=
"goCancelZK(item)"
>
取消
</view>
<view
v-if=
"item.orderStatus==1"
class=
"jz_Zailai jz_ZailaiZF"
<view
v-if=
"item.orderStatus==1"
class=
"jz_Zailai jz_ZailaiZF"
style=
"width: 150rpx;margin-left: 10rpx;"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
style=
"width: 150rpx;margin-left: 10rpx;"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
立即支付
</view>
立即支付
</view>
...
@@ -56,7 +57,9 @@
...
@@ -56,7 +57,9 @@
@
click
.
stop=
"AnotherOrder(item)"
>
再来一单
</view>
@
click
.
stop=
"AnotherOrder(item)"
>
再来一单
</view>
<!-- #endif -->
<!-- #endif -->
<!-- #ifdef MP-AG -->
<!-- #ifdef MP-AG -->
<view
v-if=
"item.income == 0&&item.orderStatus==1"
class=
"jz_Zailai"
<view
v-if=
"item.goodsType==7&&(item.orderStatus==1||item.orderStatus==2)"
class=
"jz_Zailai"
style=
"width: 110rpx;margin-left: 10rpx;"
@
click
.
stop=
"cancelHotelOrder(item)"
>
取消
</view>
<view
v-if=
"item.goodsType!=7&&item.income == 0&&item.orderStatus==1"
class=
"jz_Zailai"
style=
"width: 110rpx;margin-left: 10rpx;"
@
click
.
stop=
"goCancel(item)"
>
取消
</view>
style=
"width: 110rpx;margin-left: 10rpx;"
@
click
.
stop=
"goCancel(item)"
>
取消
</view>
<view
v-if=
"item.goodsType==7&&item.orderStatus==1"
class=
"jz_Zailai jz_ZailaiZF"
<view
v-if=
"item.goodsType==7&&item.orderStatus==1"
class=
"jz_Zailai jz_ZailaiZF"
style=
"width: 150rpx;margin-left: 10rpx;"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
style=
"width: 150rpx;margin-left: 10rpx;"
@
click
.
stop=
"submitGetCodeByOrderNo(item)"
>
...
@@ -105,6 +108,92 @@
...
@@ -105,6 +108,92 @@
cancelSuccess
()
{
cancelSuccess
()
{
this
.
$emit
(
'research'
,
5
)
this
.
$emit
(
'research'
,
5
)
},
},
//取消酒店订单
cancelHotelOrder
(
item
)
{
var
that
=
this
;
if
(
this
.
submitCancel
)
return
this
.
submitCancel
=
true
;
var
cancelMsg
=
{
OrderNo
:
item
.
directOrderNo
,
//注意这是直客表的订单流水号
ErpOrderId
:
item
.
erpOrderId
,
//这是第三方订单表的Id
OrderTypeStr
:
"Hotel"
,
//订单类型为酒店
ConfirmID
:
""
,
};
wx
.
showModal
({
title
:
'提示'
,
content
:
'确定取消订单?'
,
success
:
(
tip
)
=>
{
if
(
tip
.
confirm
)
{
that
.
submitCancel
=
true
//待付款-直接取消
if
(
item
.
orderStatus
==
1
)
{
that
.
cancelOrder
(
cancelMsg
)
}
//已付款,可能会有取消费用
else
if
(
item
.
orderStatus
==
2
)
{
var
didaMsg
=
{
BookingID
:
item
.
thirdOrderNo
}
that
.
apipost
(
"dmc_post_GetDiDaBookingCancel"
,
didaMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
;
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
.
cancelOrder
(
cancelMsg
);
}
}
})
}
//无取消费用
else
{
that
.
cancelOrder
(
cancelMsg
);
}
}
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
that
.
submitCancel
=
false
})
}
}
}
})
},
cancelOrder
(
postMsg
)
{
this
.
apipost
(
"post_CancelThirdHotelOrder"
,
postMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
title
:
"操作成功"
,
icon
:
"success"
,
});
this
.
$emit
(
'research'
);
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
this
.
submitCancel
=
false
}
);
},
//调用支付
//调用支付
submitGetCodeByOrderNo
(
item
)
{
submitGetCodeByOrderNo
(
item
)
{
console
.
log
(
"item"
,
item
)
console
.
log
(
"item"
,
item
)
...
@@ -224,7 +313,6 @@
...
@@ -224,7 +313,6 @@
url
=
"airTicket/airIndex"
url
=
"airTicket/airIndex"
}
}
// #endif
// #endif
if
(
url
)
{
if
(
url
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/
${
url
}
`
,
url
:
`/pages/
${
url
}
`
,
...
@@ -268,7 +356,7 @@
...
@@ -268,7 +356,7 @@
});
});
}
}
},
},
//取消订单
//取消订单
(同行订单取消)
goCancel
(
item
)
{
goCancel
(
item
)
{
let
that
=
this
let
that
=
this
if
(
this
.
submit
||
this
.
submitCancel
)
return
if
(
this
.
submit
||
this
.
submitCancel
)
return
...
@@ -308,6 +396,7 @@
...
@@ -308,6 +396,7 @@
cancelModal
()
{
cancelModal
()
{
this
.
showModal
=
false
this
.
showModal
=
false
},
},
//直客订单取消
goCancelZK
(
item
)
{
goCancelZK
(
item
)
{
if
(
item
.
orderStatus
==
2
)
{
if
(
item
.
orderStatus
==
2
)
{
this
.
currentData
=
item
this
.
currentData
=
item
...
...
pages/hotel/components/hotel-good.vue
View file @
bcd66615
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
<text>
起
</text>
<text>
起
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
</template>
...
...
pages/hotel/components/hotelRoom.vue
View file @
bcd66615
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<view
class=
"row"
>
<view
class=
"row"
>
<view
class=
"column"
>
<view
class=
"column"
>
<view
class=
"hotelDetailRPrice"
>
<view
class=
"hotelDetailRPrice"
>
{{subItem.Currency }}
{{subItem.Currency }}
<text>
<text>
{{subItem.TotalPrice}}
{{subItem.TotalPrice}}
</text>
起/晚
</text>
起/晚
...
@@ -64,11 +64,11 @@
...
@@ -64,11 +64,11 @@
</view>
</view>
<!--:class="[!index?'active':'']"-->
<!--:class="[!index?'active':'']"-->
<view
class=
"column hotelDetailRPriceBook"
>
<view
class=
"column hotelDetailRPriceBook"
>
<!--<text v-if="!index" class="hotelDetailMinXiRS">剩2间</text>-->
<!--<text v-if="!index" class="hotelDetailMinXiRS">剩2间</text>-->
<view
class=
"hotelDetailMinXiRB"
@
click=
"setOrder(subItem)"
>
<view
class=
"hotelDetailMinXiRB"
@
click=
"setOrder(subItem)"
>
订
订
</view>
</view>
</view>
</view>
<!-- <view class="hotelDetailRPriceBook" @click="setOrder(subItem)">
<!-- <view class="hotelDetailRPriceBook" @click="setOrder(subItem)">
订
订
</view> -->
</view> -->
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
<view
class=
"column"
>
<view
class=
"column"
>
<view
class=
"hotelDetailMinXiRF"
>
</view>
<view
class=
"hotelDetailMinXiRF"
>
</view>
<view
class=
"hotelDetailMinXiRP"
>
<view
class=
"hotelDetailMinXiRP"
>
{{subItem.Currency }}
{{subItem.Currency }}
<text>
<text>
{{subItem.TotalPrice}}
{{subItem.TotalPrice}}
</text>
</text>
...
@@ -136,18 +136,16 @@
...
@@ -136,18 +136,16 @@
</view>
</view>
</view>
</view>
</view>
</view>
<u-popup
v-model=
"showSalePreviwe"
mode=
"bottom"
<u-popup
v-model=
"showSalePreviwe"
mode=
"bottom"
border-radius=
"50"
length=
"60%"
:safe-area-inset-bottom=
"true"
>
border-radius=
"50"
length=
"60%"
<orderService
:msg=
"msg"
:list=
"SaleList"
@
goReserce=
"goReserce"
></orderService>
:safe-area-inset-bottom=
"true"
>
</u-popup>
<orderService
:msg=
"msg"
:list=
"SaleList"
@
goReserce=
"goReserce"
></orderService>
</u-popup>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
import
orderService
from
"@/components/serviceStaff/orderService"
;
import
orderService
from
"@/components/serviceStaff/orderService"
;
export
default
{
export
default
{
props
:
[
'roomMsg'
,
'dataList'
,
'search'
,
'rooms'
,
'qRoomType'
,
'qMealType'
,
'createById'
],
props
:
[
'roomMsg'
,
'dataList'
,
'search'
,
'rooms'
,
'qRoomType'
,
'qMealType'
,
'createById'
],
components
:
{
components
:
{
orderService
,
orderService
,
},
},
...
@@ -171,7 +169,7 @@
...
@@ -171,7 +169,7 @@
qMealTypeList
:
[],
qMealTypeList
:
[],
b2bUser
:
null
,
b2bUser
:
null
,
SaleList
:
[],
SaleList
:
[],
msg
:{
msg
:
{
SaleName
:
''
,
SaleName
:
''
,
SaleId
:
0
,
SaleId
:
0
,
},
},
...
@@ -263,39 +261,38 @@
...
@@ -263,39 +261,38 @@
});
});
},
},
methods
:
{
methods
:
{
goReserce
(
item
){
goReserce
(
item
)
{
this
.
msg
.
SaleName
=
item
.
SaleName
this
.
msg
.
SaleName
=
item
.
SaleName
this
.
msg
.
SaleId
=
item
.
SaleId
this
.
msg
.
SaleId
=
item
.
SaleId
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
showSalePreviwe
=
false
this
.
showSalePreviwe
=
false
},
500
)
},
500
)
this
.
goUrl
()
this
.
goUrl
()
},
},
getSale
(){
getSale
()
{
if
(
!
this
.
b2bUser
.
customerId
)
return
if
(
!
this
.
b2bUser
.
customerId
)
return
this
.
apipost
(
this
.
apipost
(
"b2b_get_GetCustomerCreateByList"
,
"b2b_get_GetCustomerCreateByList"
,
{
{
CustomerId
:
this
.
b2bUser
.
customerId
CustomerId
:
this
.
b2bUser
.
customerId
},
},
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
data
.
length
>
0
)
{
if
(
res
.
data
.
length
>
0
)
{
this
.
SaleList
=
res
.
data
this
.
SaleList
=
res
.
data
if
(
res
.
data
.
length
==
1
&&
this
.
createBy
==
0
)
{
if
(
res
.
data
.
length
==
1
&&
this
.
createBy
==
0
)
{
this
.
msg
.
SaleName
=
res
.
data
[
0
].
EmName
this
.
msg
.
SaleName
=
res
.
data
[
0
].
EmName
this
.
msg
.
SaleId
=
res
.
data
[
0
].
CreateBy
this
.
msg
.
SaleId
=
res
.
data
[
0
].
CreateBy
}
}
}
else
{
}
else
{
this
.
msg
.
SaleName
=
''
this
.
msg
.
SaleName
=
''
this
.
msg
.
SaleId
=
0
this
.
msg
.
SaleId
=
0
}
}
}
else
{
}
else
{
}
}
},
},
(
err
)
=>
{
(
err
)
=>
{
}
}
);
);
},
},
...
@@ -382,14 +379,14 @@
...
@@ -382,14 +379,14 @@
setOrder
(
subItem
)
{
setOrder
(
subItem
)
{
this
.
subItem
=
subItem
this
.
subItem
=
subItem
// #ifdef MP-AG
// #ifdef MP-AG
if
(
this
.
SaleList
&&
this
.
SaleList
.
length
>
1
&&
this
.
msg
.
SaleId
==
0
&&
this
.
createBy
==
0
)
{
if
(
this
.
SaleList
&&
this
.
SaleList
.
length
>
1
&&
this
.
msg
.
SaleId
==
0
&&
this
.
createBy
==
0
)
{
// uni.showToast({
// uni.showToast({
// title: "请选择服务人员",
// title: "请选择服务人员",
// icon: "none",
// icon: "none",
// });
// });
this
.
showSalePreviwe
=
true
;
this
.
showSalePreviwe
=
true
;
return
;
return
;
}
}
// #endif
// #endif
this
.
goUrl
()
this
.
goUrl
()
},
},
...
@@ -397,19 +394,17 @@
...
@@ -397,19 +394,17 @@
let
subItem
=
this
.
subItem
let
subItem
=
this
.
subItem
let
createBy
=
0
let
createBy
=
0
// #ifdef MP-DI
// #ifdef MP-DI
let
employeeId
=
this
.
b2bUser
.
salesBaseInfo
&&
this
.
b2bUser
.
salesBaseInfo
.
employeeId
?
this
.
b2bUser
.
salesBaseInfo
.
employeeId
:
0
let
employeeId
=
this
.
b2bUser
.
salesBaseInfo
&&
this
.
b2bUser
.
salesBaseInfo
.
employeeId
?
this
.
b2bUser
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
employeeId
.
salesBaseInfo
.
employeeId
:
0
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
employeeId
// #endif
// #endif
// #ifdef MP-AG
// #ifdef MP-AG
if
(
this
.
createBy
>
0
||
this
.
msg
.
SaleId
)
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
this
.
msg
.
SaleId
if
(
this
.
createBy
>
0
||
this
.
msg
.
SaleId
)
createBy
=
this
.
createBy
>
0
?
this
.
createBy
:
this
.
msg
.
SaleId
// #endif
// #endif
let
pHotel
=
{
let
pHotel
=
{
hotelid
:
this
.
HotelInfo
.
hotelid
,
hotelid
:
this
.
HotelInfo
.
hotelid
,
name
:
this
.
HotelInfo
.
name
,
name
:
this
.
HotelInfo
.
name
,
address
:
""
,
images
:
[],
images
:
[],
destination
:
this
.
HotelInfo
.
location
&&
this
.
HotelInfo
.
location
.
destination
&&
this
.
HotelInfo
.
location
.
destination
.
name
,
country
:
this
.
HotelInfo
.
location
&&
this
.
HotelInfo
.
location
.
country
&&
this
.
HotelInfo
.
location
.
country
.
name
,
}
}
if
(
this
.
HotelInfo
)
{
if
(
this
.
HotelInfo
)
{
if
(
this
.
HotelInfo
.
images
&&
this
.
HotelInfo
.
images
.
length
>
0
)
{
if
(
this
.
HotelInfo
.
images
&&
this
.
HotelInfo
.
images
.
length
>
0
)
{
...
@@ -417,9 +412,6 @@
...
@@ -417,9 +412,6 @@
Path
:
this
.
HotelInfo
.
images
[
0
].
url
Path
:
this
.
HotelInfo
.
images
[
0
].
url
});
});
}
}
if
(
this
.
HotelInfo
.
location
&&
this
.
HotelInfo
.
location
.
address
)
{
pHotel
.
address
=
this
.
HotelInfo
.
location
.
address
;
}
}
}
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/hotel/order?searchObj=
${
JSON
.
stringify
(
this
.
searchObj
)}
&HotelInfo=
${
JSON
.
stringify
(
pHotel
)}
&RoomInfo=
${
JSON
.
stringify
(
subItem
)}
&CreateBy=
${
createBy
}
`
,
url
:
`/pages/hotel/order?searchObj=
${
JSON
.
stringify
(
this
.
searchObj
)}
&HotelInfo=
${
JSON
.
stringify
(
pHotel
)}
&RoomInfo=
${
JSON
.
stringify
(
subItem
)}
&CreateBy=
${
createBy
}
`
,
...
@@ -1343,17 +1335,21 @@
...
@@ -1343,17 +1335,21 @@
line-height
:
81
rpx
;
line-height
:
81
rpx
;
text-align
:
center
;
text-align
:
center
;
}
}
.hotelDetailRPriceBook.active
{
.hotelDetailRPriceBook.active
{
position
:
relative
;
position
:
relative
;
top
:
-45
rpx
;
top
:
-45
rpx
;
}
}
.hotelDetailMinXiRBBox
{
.hotelDetailMinXiRBBox
{
margin-left
:
16
rpx
;
margin-left
:
16
rpx
;
}
}
.hotelDetailMinXiRBBox.active
{
.hotelDetailMinXiRBBox.active
{
position
:
relative
;
position
:
relative
;
top
:
-20
rpx
;
top
:
-20
rpx
;
}
}
.hotelDetailMinXiRF
{
.hotelDetailMinXiRF
{
height
:
1px
;
height
:
1px
;
flex
:
1
;
flex
:
1
;
...
...
pages/hotel/orderdetails.vue
View file @
bcd66615
...
@@ -202,11 +202,10 @@
...
@@ -202,11 +202,10 @@
<view
style=
"height: 1rpx;"
></view>
<view
style=
"height: 1rpx;"
></view>
</scroll-view>
</scroll-view>
<view
class=
"jz_orderbox flex"
v-if=
"showPayBtn"
>
<view
class=
"jz_orderbox flex"
>
<view
style=
"display: flex"
>
<view
style=
"display: flex"
>
<!-- #ifdef MP-DI -->
<button
v-if=
"orderData.model.OrderStatus==1||orderData.model.OrderStatus==5"
class=
"jz_OrderReNow"
<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"
@
click=
"
cancelHotelOrder
"
style=
"background: #fff; color: #111; border: 1px solid #111"
:disabled=
"submitCancel"
:loading=
"submitCancel"
>
:disabled=
"submitCancel"
:loading=
"submitCancel"
>
取消
取消
</button>
</button>
...
@@ -214,18 +213,6 @@
...
@@ -214,18 +213,6 @@
@
click=
"payHotelOrder"
:disabled=
"submit"
:loading=
"submit"
>
@
click=
"payHotelOrder"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
立即支付
</button>
</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<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=
"payHotelOrder"
:disabled=
"submit"
:loading=
"submit"
>
立即支付
</button>
<!-- #endif -->
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -255,7 +242,6 @@
...
@@ -255,7 +242,6 @@
text
:
"待支付"
,
text
:
"待支付"
,
code
:
0
,
code
:
0
,
},
},
showPayBtn
:
false
,
btnStyle
:
{
btnStyle
:
{
height
:
"80rpx"
,
height
:
"80rpx"
,
lineHeight
:
"80rpx"
,
lineHeight
:
"80rpx"
,
...
@@ -267,11 +253,6 @@
...
@@ -267,11 +253,6 @@
width
:
'193rpx'
,
width
:
'193rpx'
,
},
},
orderData
:
null
,
orderData
:
null
,
orderStatus
:
{
code
:
0
,
text
:
""
,
},
showPayBtn
:
true
,
submitCancel
:
false
,
submitCancel
:
false
,
submit
:
false
,
submit
:
false
,
hotelData
:
null
,
hotelData
:
null
,
...
@@ -281,47 +262,6 @@
...
@@ -281,47 +262,6 @@
roomNum
:
0
,
roomNum
:
0
,
RatePlanList
:
null
,
RatePlanList
:
null
,
HotelMealTypes
:
[],
HotelMealTypes
:
[],
orderMsg
:
{
ArrivalTime
:
''
,
//预计到达时间
EmployeeIdStr
:
""
,
//销售id
CheckInDate
:
""
,
//到店时间
RatePlanID
:
""
,
CheckOutDate
:
""
,
//离店时间
RoomCount
:
""
,
//房间数量
guestLastName
:
""
,
//英文姓
guestFirstName
:
""
,
//英文名
guestAddress
:
""
,
guestPhoneNumber
:
""
,
guestEmail
:
""
,
//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
:
''
,
//备注
},
customer
:
{},
customer
:
{},
};
};
},
},
...
@@ -353,7 +293,7 @@
...
@@ -353,7 +293,7 @@
var
payMsg
=
{
var
payMsg
=
{
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
OpenId
:
userInfo
.
OpenId
,
OpenId
:
userInfo
.
OpenId
,
MallBaseId
:
userInfo
.
MallBaseId
,
MallBaseId
:
userInfo
.
MallBaseId
,
};
};
this
.
submit
=
true
this
.
submit
=
true
this
.
apipost
(
"GetCodeByOrderNo_post"
,
payMsg
,
(
res
)
=>
{
this
.
apipost
(
"GetCodeByOrderNo_post"
,
payMsg
,
(
res
)
=>
{
...
@@ -400,160 +340,108 @@
...
@@ -400,160 +340,108 @@
},
},
});
});
},
},
goCancel
()
{
cancelHotelOrder
()
{
var
that
=
this
;
var
that
=
this
;
if
(
this
.
submitCancel
)
return
if
(
this
.
submitCancel
)
return
this
.
submitCancel
=
true
;
this
.
submitCancel
=
true
;
var
cancelMsg
=
{
let
cancelMsg
=
{
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
OrderNo
:
this
.
orderData
.
directOrder
.
OrderNo
,
ErpOrderId
:
this
.
orderData
.
model
.
OrderID
,
ErpOrderId
:
this
.
orderData
.
model
.
OrderID
,
OrderTypeStr
:
"Hotel"
,
//订单类型为酒店
OrderTypeStr
:
"Hotel"
,
//订单类型为酒店
ConfirmID
:
""
,
ConfirmID
:
""
,
};
};
//待付款-直接取消
wx
.
showModal
({
if
(
this
.
orderData
.
model
.
OrderStatus
==
1
)
{
title
:
'提示'
,
this
.
apipost
(
content
:
'确定取消订单?'
,
"post_CancelThirdHotelOrder"
,
cancelMsg
,
success
:
(
tip
)
=>
{
(
res
)
=>
{
if
(
tip
.
confirm
)
{
if
(
res
.
resultCode
==
1
)
{
that
.
submitCancel
=
true
uni
.
showToast
({
//待付款-直接取消
title
:
"操作成功"
,
if
(
that
.
orderData
.
model
.
OrderStatus
==
1
)
{
icon
:
"success"
,
that
.
cancelOrder
(
cancelMsg
)
});
this
.
getOrderDetail
(
this
.
id
)
}
}
},
//已付款,可能会有取消费用
(
err
)
=>
{
else
if
(
that
.
orderData
.
model
.
OrderStatus
==
5
)
{
uni
.
showToast
({
var
didaMsg
=
{
title
:
err
.
message
,
BookingID
:
that
.
orderData
.
model
.
ThirdOrderNo
icon
:
"none"
,
}
});
that
.
apipost
(
"dmc_post_GetDiDaBookingCancel"
,
didaMsg
,
(
res
)
=>
{
this
.
submitCancel
=
false
if
(
res
.
resultCode
==
1
)
{
}
var
tempData
=
res
.
data
;
);
if
(
tempData
)
{
}
cancelMsg
.
ConfirmID
=
tempData
.
ConfirmID
;
//已付款,可能会有取消费用
//有取消费用
else
if
(
this
.
orderData
.
model
.
OrderStatus
==
5
)
{
if
(
tempData
.
Amount
&&
tempData
.
Amount
>
0
)
{
var
didaMsg
=
{
var
tipmsg
=
"取消订单将收取【"
+
tempData
.
Amount
+
BookingID
:
this
.
orderData
.
model
.
ThirdOrderNo
"】取消费用,是否确认取消订单?"
}
wx
.
showModal
({
this
.
apipost
(
"dmc_post_GetDiDaBookingCancel"
,
didaMsg
,
(
res
)
=>
{
title
:
'提示'
,
if
(
res
.
resultCode
==
1
)
{
content
:
tipmsg
,
var
tempData
=
res
.
data
;
success
:
(
tip
)
=>
{
console
.
log
(
"tempData"
,
tempData
);
if
(
tip
.
confirm
)
{
if
(
tempData
)
{
that
.
submitCancel
=
true
;
cancelMsg
.
ConfirmID
=
tempData
.
ConfirmID
;
that
.
cancelOrder
(
cancelMsg
);
//有取消费用
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
.
cancelOrder
(
cancelMsg
);
//无取消费用
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"
,
});
that
.
submitCancel
=
false
})
}
}
},
}
(
err
)
=>
{
}
})
},
cancelOrder
(
postMsg
)
{
this
.
apipost
(
"post_CancelThirdHotelOrder"
,
postMsg
,
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
err
.
message
,
title
:
"操作成功"
,
icon
:
"
none
"
,
icon
:
"
success
"
,
});
});
this
.
submitCancel
=
false
this
.
getOrderDetail
(
this
.
id
)
})
}
}
},
(
err
)
=>
{
uni
.
showToast
({
title
:
err
.
message
,
icon
:
"none"
,
});
this
.
submitCancel
=
false
}
);
},
},
formatStatus
(
status
)
{
formatStatus
(
status
)
{
// #ifdef MP-DI
if
(
status
==
1
)
{
if
(
status
==
4
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
1
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
showPayBtn
=
true
;
}
else
if
(
status
==
3
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"已完成"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
2
)
{
}
else
if
(
status
==
2
)
{
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"正常"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
5
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"售后"
;
this
.
showPayBtn
=
false
;
}
// #endif
// #ifdef MP-AG
if
(
status
==
4
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
orderStatus
.
text
=
"已取消"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
1
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"待付款"
;
this
.
showPayBtn
=
true
;
}
else
if
(
status
==
3
)
{
}
else
if
(
status
==
3
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"已完成"
;
this
.
orderStatus
.
text
=
"退款中"
;
this
.
showPayBtn
=
false
;
}
else
if
(
status
==
4
)
{
}
else
if
(
status
==
2
)
{
this
.
orderStatus
.
code
=
-
1
;
this
.
orderStatus
.
code
=
1
;
this
.
orderStatus
.
text
=
"已退款"
;
}
else
if
(
status
==
5
)
{
this
.
orderStatus
.
code
=
0
;
this
.
orderStatus
.
text
=
"正常"
;
this
.
orderStatus
.
text
=
"正常"
;
this
.
showPayBtn
=
false
;
}
}
// #endif
},
},
scroll
(
e
)
{
scroll
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
...
@@ -595,48 +483,6 @@
...
@@ -595,48 +483,6 @@
this
.
peopleNum
++
this
.
peopleNum
++
})
})
})
})
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
.
formatStatus
(
res
.
data
.
model
.
OrderStatus
);
this
.
formatStatus
(
res
.
data
.
model
.
OrderStatus
);
}
}
},
err
=>
{
},
err
=>
{
...
...
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