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 @@ ...@@ -267,7 +267,7 @@
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
this.price + this.price +
"&isFrom=1", "&isFrom=4",
}); });
}, 100); }, 100);
}, },
......
...@@ -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) {
......
...@@ -57,6 +57,16 @@ ...@@ -57,6 +57,16 @@
:borderBottom="true" :borderBottom="true"
required> required>
</u-field> </u-field>
<!-- #ifdef MP-DI -->
<u-field
v-model="Mailbox"
label="邮箱地址"
placeholder="请填写邮箱地址"
padding="20rpx 28rpx"
:borderBottom="true"
required>
</u-field>
<!-- #endif -->
</view> </view>
<!-- #ifdef MP-AG --> <!-- #ifdef MP-AG -->
<view class="flight-card q-mt-md" v-if="sales.length>1"> <view class="flight-card q-mt-md" v-if="sales.length>1">
...@@ -250,6 +260,7 @@ ...@@ -250,6 +260,7 @@
backVisible:false, backVisible:false,
goVisible:false, goVisible:false,
orderInfo: {}, orderInfo: {},
Mailbox: '',
} }
}, },
components: { components: {
...@@ -337,8 +348,8 @@ ...@@ -337,8 +348,8 @@
SurName: this.contactName, SurName: this.contactName,
Name: '', Name: '',
ContactNumber: this.contactPhone, ContactNumber: this.contactPhone,
Mailbox: this.customer.Mailbox, Mailbox: this.Mailbox,
GoodsId: this.currentPriceInfo.tcid, GoodsId: this.id,
GoodsName: `${this.goList[0].DepartureName}${this.backList[0].DepartureName}`, GoodsName: `${this.goList[0].DepartureName}${this.backList[0].DepartureName}`,
GoodsPic: this.goList[0].AirlineUrl? this.goList[0].AirlineUrl : '', GoodsPic: this.goList[0].AirlineUrl? this.goList[0].AirlineUrl : '',
GoodsType: 16, GoodsType: 16,
...@@ -389,7 +400,7 @@ ...@@ -389,7 +400,7 @@
uni.redirectTo({ uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + url: "/pages/jiuzhai/paysuccess?PreferPrice=" +
that.price + that.price +
"&isFrom=1", "&isFrom=4",
}); });
}, 100); }, 100);
}, },
...@@ -462,6 +473,7 @@ ...@@ -462,6 +473,7 @@
}) })
}, },
validate(){ validate(){
let email = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
let msg = '' let msg = ''
if(this.crCount+this.etCount+this.babyCount==0){ if(this.crCount+this.etCount+this.babyCount==0){
msg = '请选择乘机人' msg = '请选择乘机人'
...@@ -475,6 +487,14 @@ ...@@ -475,6 +487,14 @@
msg = '请输入联系人名称' msg = '请输入联系人名称'
} else if(this.contactPhone=='' || this.contactPhone.length!=11){ } else if(this.contactPhone=='' || this.contactPhone.length!=11){
msg = '请输入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){ } else if(this.createBy.CreateBy==0){
// #ifdef MP-AG // #ifdef MP-AG
msg = '请选择与你对接的服务人员' msg = '请选择与你对接的服务人员'
...@@ -500,6 +520,7 @@ ...@@ -500,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
...@@ -507,15 +528,21 @@ ...@@ -507,15 +528,21 @@
//#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,
TCID:this.id, TCID:this.id,
CustomerType:2, // #ifdef MP-DI
CustomerType: 4,
// #endif
// #ifdef MP-AG
CustomerType: 2,
// #endif
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,
...@@ -529,7 +556,6 @@ ...@@ -529,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,
......
...@@ -78,6 +78,11 @@ export default { ...@@ -78,6 +78,11 @@ export default {
uni.redirectTo({ uni.redirectTo({
url: "/pages/visa/visa_MyOrder", url: "/pages/visa/visa_MyOrder",
}); });
} else if (this.isLineOrder == 4) {
//机票订单
uni.redirectTo({
url: "/pages/airTicket/TicketOrderList",
});
} }
}, },
goHome() { goHome() {
......
...@@ -139,8 +139,15 @@ ...@@ -139,8 +139,15 @@
<!-- #ifdef MP-ALIPAY --> <!-- #ifdef MP-ALIPAY -->
<!-- <view class="jz_Zailai" style="width: 110rpx; margin-right: 10rpx" @click.stop="goZhifuAli(item)">付款</view> --> <!-- <view class="jz_Zailai" style="width: 110rpx; margin-right: 10rpx" @click.stop="goZhifuAli(item)">付款</view> -->
<!-- #endif --> <!-- #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" <view v-if="item.visaOrderStatus==3" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancel(item)">取消</view> style="width: 110rpx" @click.stop="goCancel(item)">取消</view>
<!-- #endif -->
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -207,6 +214,7 @@ ...@@ -207,6 +214,7 @@
b2b_user_info: {}, b2b_user_info: {},
userInfo: {}, userInfo: {},
showAuth: false, showAuth: false,
submitCancel: false,
}; };
}, },
created() { created() {
...@@ -270,9 +278,17 @@ ...@@ -270,9 +278,17 @@
} }
}, },
goOrderDetail(item) { goOrderDetail(item) {
// #ifdef MP-DI
uni.navigateTo({
url: `/pages/visa/visa_SureOrder?orderId=${item.id}&OrderTypeStr=Visa`,
});
// #endif
// #ifdef MP-AG
uni.navigateTo({ uni.navigateTo({
url: "/pages/visa/visa_SureOrder?orderId=" + item.id, url: `/pages/visa/visa_SureOrder?orderId=${item.id}`,
}); });
// #endif
}, },
change(i) { change(i) {
this.current = i; this.current = i;
...@@ -365,6 +381,36 @@ ...@@ -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 // #ifdef MP-WEIXIN
......
...@@ -584,6 +584,8 @@ ...@@ -584,6 +584,8 @@
showPayBtn: true, showPayBtn: true,
Refund: 0, Refund: 0,
orderInfo:null, orderInfo:null,
orderId: 0,
OrderTypeStr: 0,
OrderNo: '', OrderNo: '',
}; };
}, },
...@@ -591,11 +593,19 @@ ...@@ -591,11 +593,19 @@
onLoad(option) { onLoad(option) {
if (option.orderData) { if (option.orderData) {
this.orderData = JSON.parse(decodeURIComponent(option.orderData)); this.orderData = JSON.parse(decodeURIComponent(option.orderData));
} else if (option.orderId) { } else if (option.orderId&&!option.OrderTypeStr) {
this.initOrderInfo(option.orderId); 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.OrderNo = option.OrderNo
this.getOrderInfoHandler(this.OrderNo) }
this.getOrderInfoHandler()
} }
}, },
methods: { methods: {
...@@ -652,13 +662,16 @@ ...@@ -652,13 +662,16 @@
}, },
}); });
}, },
getOrderInfoHandler(OrderNo){ getOrderInfoHandler(){
this.apipost("GetDetailsByOrderNo_post",{OrderNo},res=>{ this.apipost("GetDetailsByErpOrderId_post",{
OrderNo: this.OrderNo,
ErpOrderId: this.orderId,
OrderTypeStr: this.OrderTypeStr,
},res=>{
if(res.resultCode==1){ if(res.resultCode==1){
this.orderData = { this.orderData = {
...res.data ...res.data
} }
console.log(this.orderData,'---111111')
this.initOrderInfo(res.data.ErpOrderId); this.initOrderInfo(res.data.ErpOrderId);
this.formatStatus( this.formatStatus(
res.data.OrderStatus, 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