Commit 13f24301 authored by youjie's avatar youjie

机票

parent 088c517e
......@@ -303,7 +303,10 @@
cancelVisible:false,
priceVisible:false,
dielineTime:'',
guest:[]
guest:[],
submit: false,
OrderTypeStr: '',
OrderNo: '',
}
},
computed:{
......@@ -334,7 +337,18 @@
},
components:{Flight},
onLoad(options) {
if (options.id) {
if(options.OrderNo||(options.id&&options.OrderTypeStr)){
this.id = options.id
this.order.status = options.status?options.status:1
this.OrderTypeStr = options.OrderTypeStr
this.OrderNo = options.OrderNo
uni.setNavigationBarTitle({
title:'特价机票订单详细信息'
})
this.setThemeHandle()
this.getOrderInfoHandler()
return
}else if(options.id){
this.id = options.id
this.order.status = options.status?options.status:1
uni.setNavigationBarTitle({
......@@ -342,12 +356,77 @@
})
this.setThemeHandle()
this.getOrderDetailHandle()
return
}
this.navigatorToHomeHandle()
},
methods: {
submitGetCodeByOrderNo() {
if (this.submit) return;
this.submit = true
this.apipost("GetCodeByOrderNo_post", {
OrderNo: this.OrderNo,
MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId
}, (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.price +
"&isFrom=4",
});
}, 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.id,
OrderTypeStr: this.OrderTypeStr,
},res=>{
if(res.resultCode==1){
this.id = res.data.id
}else{
}
})
},
calcSafeArea() {
const { safeAreaInsets } = uni.getSystemInfoSync()
this.bottomSafeHeight = safeAreaInsets.bottom > 0 ? (safeAreaInsets.bottom*2) : 30
......@@ -610,13 +689,13 @@
.f-order .small{
font-size: 22rpx;
}
.f-order .flight-status {
background: #E1C278;
border-radius: 8rpx;
font-size: 24rpx;
color: #111111;
font-weight: 400;
padding: 7rpx 14rpx;
.f-order .flight-status {
background: #E1C278;
border-radius: 8rpx;
font-size: 24rpx;
color: #111111;
font-weight: 400;
padding: 7rpx 14rpx;
}
.f-order .flight-time{
font-weight: bold;
......@@ -734,9 +813,9 @@
box-shadow: 0 0 20rpx #00000014;
background-color: #FFF;
}
.price-list-details {
margin-bottom: 40rpx;
color: #999;
font-size: 24rpx;
.price-list-details {
margin-bottom: 40rpx;
color: #999;
font-size: 24rpx;
}
</style>
......@@ -206,9 +206,17 @@
},
getDetail(orderId,s){
const status = s==1?1:(s==4?2:0)
uni.navigateTo({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}`
});
// #ifdef MP-DI
uni.navigateTo({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}&OrderTypeStr=DMC`,
});
// #endif
// #ifdef MP-AG
uni.navigateTo({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}`
});
// #endif
},
//微信支付
queren(OrderId,i) {
......
......@@ -520,6 +520,7 @@
let PriceNum = 0
var CreateBy = 0
var DirectCustomerId = 0
var CustomerId = 0
//#ifdef MP-DI
PriceNum = this.flight.B2CPrice
DirectCustomerId = this.createBy.CreateBy
......@@ -527,6 +528,7 @@
//#ifdef MP-AG
PriceNum = this.flight.B2CPrice
CreateBy = this.createBy.CreateBy
CustomerId = this.customer.customerId
//#endif
const p = {
OrderId:0,
......@@ -540,7 +542,7 @@
GroupType:5,
ContactName:this.contactName,
ContactMobile:this.contactPhone,
CustomerId:this.customer.customerId,
CustomerId:CustomerId,
OrderSource:5,
Unit_Price:PriceNum,
TC_Price:PriceNum,
......@@ -554,7 +556,6 @@
GuestNum:this.crCount+this.etCount+this.babyCount,
PlaceOrderFrom:2,
MiniAppUserId:mallUser.UserId,
DirectCustomerId:DirectCustomerId,
EnterID:0,
GuestList:list,
CreateBy:CreateBy,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment