Commit 13f24301 authored by youjie's avatar youjie

机票

parent 088c517e
...@@ -303,7 +303,10 @@ ...@@ -303,7 +303,10 @@
cancelVisible:false, cancelVisible:false,
priceVisible:false, priceVisible:false,
dielineTime:'', dielineTime:'',
guest:[] guest:[],
submit: false,
OrderTypeStr: '',
OrderNo: '',
} }
}, },
computed:{ computed:{
...@@ -334,7 +337,18 @@ ...@@ -334,7 +337,18 @@
}, },
components:{Flight}, components:{Flight},
onLoad(options) { 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.id = options.id
this.order.status = options.status?options.status:1 this.order.status = options.status?options.status:1
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -342,12 +356,77 @@ ...@@ -342,12 +356,77 @@
}) })
this.setThemeHandle() this.setThemeHandle()
this.getOrderDetailHandle() this.getOrderDetailHandle()
return return
} }
this.navigatorToHomeHandle() this.navigatorToHomeHandle()
}, },
methods: { 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() { calcSafeArea() {
const { safeAreaInsets } = uni.getSystemInfoSync() const { safeAreaInsets } = uni.getSystemInfoSync()
this.bottomSafeHeight = safeAreaInsets.bottom > 0 ? (safeAreaInsets.bottom*2) : 30 this.bottomSafeHeight = safeAreaInsets.bottom > 0 ? (safeAreaInsets.bottom*2) : 30
......
...@@ -206,9 +206,17 @@ ...@@ -206,9 +206,17 @@
}, },
getDetail(orderId,s){ getDetail(orderId,s){
const status = s==1?1:(s==4?2:0) const status = s==1?1:(s==4?2:0)
// #ifdef MP-DI
uni.navigateTo({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}&OrderTypeStr=DMC`,
});
// #endif
// #ifdef MP-AG
uni.navigateTo({ uni.navigateTo({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}` url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}`
}); });
// #endif
}, },
//微信支付 //微信支付
queren(OrderId,i) { queren(OrderId,i) {
......
...@@ -520,6 +520,7 @@ ...@@ -520,6 +520,7 @@
let PriceNum = 0 let PriceNum = 0
var CreateBy = 0 var CreateBy = 0
var DirectCustomerId = 0 var DirectCustomerId = 0
var CustomerId = 0
//#ifdef MP-DI //#ifdef MP-DI
PriceNum = this.flight.B2CPrice PriceNum = this.flight.B2CPrice
DirectCustomerId = this.createBy.CreateBy DirectCustomerId = this.createBy.CreateBy
...@@ -527,6 +528,7 @@ ...@@ -527,6 +528,7 @@
//#ifdef MP-AG //#ifdef MP-AG
PriceNum = this.flight.B2CPrice PriceNum = this.flight.B2CPrice
CreateBy = this.createBy.CreateBy CreateBy = this.createBy.CreateBy
CustomerId = this.customer.customerId
//#endif //#endif
const p = { const p = {
OrderId:0, OrderId:0,
...@@ -540,7 +542,7 @@ ...@@ -540,7 +542,7 @@
GroupType:5, GroupType:5,
ContactName:this.contactName, ContactName:this.contactName,
ContactMobile:this.contactPhone, ContactMobile:this.contactPhone,
CustomerId:this.customer.customerId, CustomerId:CustomerId,
OrderSource:5, OrderSource:5,
Unit_Price:PriceNum, Unit_Price:PriceNum,
TC_Price:PriceNum, TC_Price:PriceNum,
...@@ -554,7 +556,6 @@ ...@@ -554,7 +556,6 @@
GuestNum:this.crCount+this.etCount+this.babyCount, GuestNum:this.crCount+this.etCount+this.babyCount,
PlaceOrderFrom:2, PlaceOrderFrom:2,
MiniAppUserId:mallUser.UserId, MiniAppUserId:mallUser.UserId,
DirectCustomerId:DirectCustomerId,
EnterID:0, EnterID:0,
GuestList:list, GuestList:list,
CreateBy:CreateBy, 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