Commit 1a375c82 authored by 罗超's avatar 罗超

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents 6381d644 24bb6891
......@@ -267,7 +267,7 @@
uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
this.price +
"&isFrom=1",
"&isFrom=4",
});
}, 100);
},
......
......@@ -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
......
......@@ -206,9 +206,17 @@
},
getDetail(orderId,s){
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({
url: `/pages/airTicket/airTicketOrderDetail?id=${orderId}&status=${status}`
});
// #endif
},
//微信支付
queren(OrderId,i) {
......
......@@ -57,6 +57,16 @@
:borderBottom="true"
required>
</u-field>
<!-- #ifdef MP-DI -->
<u-field
v-model="Mailbox"
label="邮箱地址"
placeholder="请填写邮箱地址"
padding="20rpx 28rpx"
:borderBottom="true"
required>
</u-field>
<!-- #endif -->
</view>
<!-- #ifdef MP-AG -->
<view class="flight-card q-mt-md" v-if="sales.length>1">
......@@ -250,6 +260,7 @@
backVisible:false,
goVisible:false,
orderInfo: {},
Mailbox: '',
}
},
components: {
......@@ -337,8 +348,8 @@
SurName: this.contactName,
Name: '',
ContactNumber: this.contactPhone,
Mailbox: this.customer.Mailbox,
GoodsId: this.currentPriceInfo.tcid,
Mailbox: this.Mailbox,
GoodsId: this.id,
GoodsName: `${this.goList[0].DepartureName}${this.backList[0].DepartureName}`,
GoodsPic: this.goList[0].AirlineUrl? this.goList[0].AirlineUrl : '',
GoodsType: 16,
......@@ -389,7 +400,7 @@
uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
that.price +
"&isFrom=1",
"&isFrom=4",
});
}, 100);
},
......@@ -462,6 +473,7 @@
})
},
validate(){
let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
let msg = ''
if(this.crCount+this.etCount+this.babyCount==0){
msg = '请选择乘机人'
......@@ -475,6 +487,14 @@
msg = '请输入联系人名称'
} else if(this.contactPhone=='' || this.contactPhone.length!=11){
msg = '请输入11位联系电话'
}else if(this.Mailbox==''){
// #ifdef MP-DI
msg = '请输入邮箱地址'
// #endif
}else if (!email.test(this.Mailbox)) {
// #ifdef MP-DI
msg = '请输入正确的邮箱地址'
// #endif
} else if(this.createBy.CreateBy==0){
// #ifdef MP-AG
msg = '请选择与你对接的服务人员'
......@@ -500,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
......@@ -507,15 +528,21 @@
//#ifdef MP-AG
PriceNum = this.flight.B2CPrice
CreateBy = this.createBy.CreateBy
CustomerId = this.customer.customerId
//#endif
const p = {
OrderId:0,
TCID:this.id,
CustomerType:2,
// #ifdef MP-DI
CustomerType: 4,
// #endif
// #ifdef MP-AG
CustomerType: 2,
// #endif
GroupType:5,
ContactName:this.contactName,
ContactMobile:this.contactPhone,
CustomerId:this.customer.customerId,
CustomerId:CustomerId,
OrderSource:5,
Unit_Price:PriceNum,
TC_Price:PriceNum,
......@@ -529,7 +556,6 @@
GuestNum:this.crCount+this.etCount+this.babyCount,
PlaceOrderFrom:2,
MiniAppUserId:mallUser.UserId,
DirectCustomerId:DirectCustomerId,
EnterID:0,
GuestList:list,
CreateBy:CreateBy,
......
......@@ -78,6 +78,11 @@ export default {
uni.redirectTo({
url: "/pages/visa/visa_MyOrder",
});
} else if (this.isLineOrder == 4) {
//机票订单
uni.redirectTo({
url: "/pages/airTicket/TicketOrderList",
});
}
},
goHome() {
......
......@@ -139,8 +139,15 @@
<!-- #ifdef MP-ALIPAY -->
<!-- <view class="jz_Zailai" style="width: 110rpx; margin-right: 10rpx" @click.stop="goZhifuAli(item)">付款</view> -->
<!-- #endif -->
<!-- #ifdef MP-DI -->
<button v-if="item.visaOrderStatus==1" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancelZK(item)"
:disabled="submitCancel">取消</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="item.visaOrderStatus==3" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancel(item)">取消</view>
<!-- #endif -->
</view>
</view>
</scroll-view>
......@@ -207,6 +214,7 @@
b2b_user_info: {},
userInfo: {},
showAuth: false,
submitCancel: false,
};
},
created() {
......@@ -270,9 +278,17 @@
}
},
goOrderDetail(item) {
// #ifdef MP-DI
uni.navigateTo({
url: `/pages/visa/visa_SureOrder?orderId=${item.id}&OrderTypeStr=Visa`,
});
// #endif
// #ifdef MP-AG
uni.navigateTo({
url: "/pages/visa/visa_SureOrder?orderId=" + item.id,
url: `/pages/visa/visa_SureOrder?orderId=${item.id}`,
});
// #endif
},
change(i) {
this.current = i;
......@@ -365,6 +381,36 @@
}
})
},
goCancelZK(item) {
let that = this
if(this.submitCancel) return
this.submitCancel = true
wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
that.apipost(
"GetCancelOrder_post", {
OrderNo: 0,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.research();
}
that.submitCancel = false
},
(err) => {}
);
}else that.submitCancel = false
}
})
},
//付款
// #ifdef MP-WEIXIN
......
......@@ -584,6 +584,8 @@
showPayBtn: true,
Refund: 0,
orderInfo:null,
orderId: 0,
OrderTypeStr: 0,
OrderNo: '',
};
},
......@@ -591,11 +593,19 @@
onLoad(option) {
if (option.orderData) {
this.orderData = JSON.parse(decodeURIComponent(option.orderData));
} else if (option.orderId) {
} else if (option.orderId&&!option.OrderTypeStr) {
this.initOrderInfo(option.orderId);
} else if(option.OrderNo){
} else if(option.OrderNo||(option.orderId&&option.OrderTypeStr)){
if(option.OrderTypeStr){
this.OrderTypeStr = option.OrderTypeStr
}
if(option.orderId){
this.orderId = option.orderId
}
if(option.orderId){
this.OrderNo = option.OrderNo
this.getOrderInfoHandler(this.OrderNo)
}
this.getOrderInfoHandler()
}
},
methods: {
......@@ -652,13 +662,16 @@
},
});
},
getOrderInfoHandler(OrderNo){
this.apipost("GetDetailsByOrderNo_post",{OrderNo},res=>{
getOrderInfoHandler(){
this.apipost("GetDetailsByErpOrderId_post",{
OrderNo: this.OrderNo,
ErpOrderId: this.orderId,
OrderTypeStr: this.OrderTypeStr,
},res=>{
if(res.resultCode==1){
this.orderData = {
...res.data
}
console.log(this.orderData,'---111111')
this.initOrderInfo(res.data.ErpOrderId);
this.formatStatus(
res.data.OrderStatus,
......
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