Commit 146209a5 authored by 罗超's avatar 罗超

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

parents 9bab9df2 091cd729
......@@ -60,7 +60,20 @@
</scroll-view>
<view style="border-radius: 20rpx 20rpx 0 0;" class="airTicketDetailsFooter bgFFF">
<view class="TicketOrderDetailsFooter row-sbs-n"
v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3">
v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3||dataModel.OrderStatus==1">
<!-- #ifdef MP-DI -->
<view v-if="dataModel.OrderStatus==1&&dataModel.OrderStatus!=3"
class="fz32 relative TicketOrderListCard-PrQx MR20"
:class="[loading?'color9999A5':'colorDEBF7B']"
@click="cancelOrderZK()">取 消</view>
<view v-if="dataModel.OrderStatus==1"
class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold"
:class="[submit?'bgF5':'bgDEBF7B']"
@click="submitGetCodeByOrderNo">
<text class="fz32">立即支付</text>
</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="dataModel.OrderState==1||dataModel.OrderState==2||dataModel.OrderState==3"
class="airTicketDetailsFooter-order row-ajc-w fontBold ML50"
:class="[loading?'bgF5':'bgF5 colorDEBF7B']"
......@@ -73,6 +86,8 @@
@click="queren(orderMsg.ID)">
<text class="fz32">立即支付</text>
</view> -->
<!-- #endif -->
</view>
<view class="TicketOrderDetailsFooter row-ajc-n" v-if="dataModel.OrderState==5||dataModel.OrderState==4">
<view
......@@ -129,15 +144,14 @@
<view class="fz26 color9999A5 MT5">共 {{dataModel.GuestNum}} 人</view>
</view>
<view class="row-aic-n">
<!-- #ifdef MP-DI -->
<view v-if="dataModel.OrderState==1"
<view v-if="dataModel.OrderStatus==1&&dataModel.OrderStatus!=3"
class="fz32 relative TicketOrderListCard-PrQx MR20"
:class="[loading?'color9999A5':'colorDEBF7B']"
@click="cancelOrderZK()">取 消</view>
<view v-if="dataModel.OrderState==1"
<view v-if="dataModel.OrderStatus==1"
class="airTicketDetailsFooter-order PXY2463 row-ajc-w fontBold"
:class="[loading?'bgF5':'bgDEBF7B']"
:class="[submit?'bgF5':'bgDEBF7B']"
@click="submitGetCodeByOrderNo">
<text class="fz32">立即支付</text>
</view>
......@@ -196,6 +210,7 @@
],
title:'订单详情',
OrderNo: '',
submit: false,
}
},
onLoad(options){
......@@ -229,7 +244,7 @@
},
methods: {
submitGetCodeByOrderNo() {
if (this.submit || this.submitCancel) return;
if (this.submit || this.loading) return;
this.submit = true
this.apipost("GetCodeByOrderNo_post", {
OrderNo: this.OrderNo,
......@@ -284,7 +299,9 @@
getOrderInfoHandler(OrderNo){
this.apipost("GetDetailsByOrderNo_post",{OrderNo},res=>{
if(res.resultCode==1){
this.dataModel = res.data
this.dataModel = {
OrderStatus: res.data.OrderStatus
}
this.orderMsg.ID = res.data.ErpOrderId
this.getOrderDetails()
}else{
......@@ -315,9 +332,10 @@
this.orderData = res.data;
// IsChargeLossOrders 1是收损单 2否
// IsApplyForCancel 1是小程序端发起取消 2否
// #ifdef MP-AG
this.dataModel = res.data.model
// #endif
this.dataModel = {
...this.dataModel,
...res.data.model
}
this.orderData.model.GuestList.forEach(x=>{
let obj = {
SurName:x.SurName+x.Name,
......@@ -559,9 +577,7 @@
},
cancelOrderZK(){
let that = this
if(this.loading){
return
}
if (this.submit || this.loading) return;
uni.showLoading({
title: "请稍等片刻...",
})
......
......@@ -182,7 +182,7 @@
<view class="guest row items-center" v-for="(x,i) in order.GuestList" :key="i">
<text>{{String(i+1).padStart(2,'0')}}</text>
<view class="q-ml-md col">
<text class="bold" style="color: #000;">{{x.ESurName}}/{{x.EName}}</text>
<text class="bold" style="color: #000;">{{x.SurName}}/{{x.Name}}</text>
<text class="q-ml-sm">({{x.Sex==1?'男':'女'}})</text>
</view>
<view>
......@@ -205,7 +205,16 @@
<view style="padding-bottom: 20rpx;"></view>
</scroll-view>
<view class="botton-box" :style="{paddingBottom:`${bottomSafeHeight}rpx`}">
<!-- #ifdef MP-DI -->
<view style=" display: flex;justify-content: space-between;">
<view class="text-center cities-name" @click="goCancelZK" v-if="order.OrderStatus==1" style="background-color: #fff;border: 1px solid #1d1d20;flex:1; border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#333">取消订单</view>
<view class="text-center cities-name" @click="submitGetCodeByOrderNo" v-if="order.OrderStatus==1" style="background-color: #1d1d20;flex:1;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4;margin-left: 20rpx;">立即支付</view>
</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view class="text-center cities-name" @click="cancelVisible=true" v-if="order.status==0" style="background-color: #1d1d20;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4">取消订单</view>
<!-- #endif -->
<view class="text-center cities-name" @click="requeryHandle" v-if="order.status==2" style="background-color: #1d1d20;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4">再次预定</view>
<view class="row" v-if="order.ResultPrice && order.status==1">
<view class="col" style="color: #9999A5;">
......@@ -327,11 +336,12 @@
return this.order.TicketList[0].TicketProductList[0].B2BPrice
},
babyPrice() {
if(!this.order.TicketList) return 0
const p = this.order.TicketList[0].TicketProductList[0].B2BPrice
let bp = this.order.TicketList[0].TicketProductList[0].BabyPrecent
bp = bp && bp != '' ? (parseFloat(bp) / 100.00) : 0
return Math.ceil(bp * p)
},
},
......@@ -421,7 +431,12 @@
OrderTypeStr: this.OrderTypeStr,
},res=>{
if(res.resultCode==1){
this.id = res.data.id
this.OrderNo = res.data.OrderNo
this.id = res.data.ErpOrderId
this.order = {
OrderStatus:res.data.OrderStatus
}
this.getOrderDetailHandle()
}else{
}
......@@ -469,7 +484,10 @@
}
this.dielineTime = `${endTime.getHours()}${endTime.getMinutes()}分`
}
this.order = res.data
this.order = {
...this.order,
...res.data
}
this.setThemeHandle()
this.lowData = this.formatLowData(res.data.TicketList)
this.getGuestHandle()
......@@ -515,6 +533,36 @@
uni.hideLoading()
})
},
goCancelZK() {
let that = this
uni.showLoading()
wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
that.apipost(
"GetCancelOrder_post", {
OrderNo: that.OrderNo,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.setThemeHandle();
that.getOrderInfoHandler()
}
uni.hideLoading()
},
(err) => {}
);
}else uni.hideLoading()
}
})
},
requeryHandle(){
const x = this.lowData[0].GoFlightList
const d=[
......
......@@ -62,10 +62,23 @@
<text class="fz32">¥ </text>
{{item.preferPrice}}
</view>
<!-- #ifdef MP-DI -->
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="cancelOrderZK(item,i)">取 消</view>
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="getDetail(item.orderId,item.orderState)">立即支付</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="index==1&&(item.orderState==1||item.orderState==2||item.orderState==3)"
class="fz32 relative TicketOrderListCard-PrQx"
:class="[item.loading?'color9999A5':'colorDEBF7B']"
@click.stop="cancelOrder(item,i)">取 消</view>
<!-- #endif -->
</view>
</view>
<view class="row-w">
......@@ -204,6 +217,46 @@
);
}
},
cancelOrderZK(item,i){
let that = this
this.i = i
if(this.DataLists[this.i].loading){
return
}
//未付款-调用后台取消
uni.showLoading({
title: "请稍等片刻...",
})
this.DataLists[this.i].loading = true
if (
(item.paymentTime == null || item.paymentTime == "") &&
(item.orderState == 1||item.orderState == 2)
) {
this.apipost(
"GetCancelOrder_post",
{
OrderNo: '',
ErpOrderId: item.orderId,
OrderTypeStr: 'DMC',
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.$emit('research',that.dataMsg.orderState)
}
uni.hideLoading()
this.DataLists[this.i].loading = false
},
(err) => {
uni.hideLoading()
this.DataLists[this.i].loading = false
}
);
}
},
getDetail(orderId,s){
const status = s==1?1:(s==4?2:0)
// #ifdef MP-DI
......
......@@ -334,7 +334,7 @@
console.log(this.customer,'----')
this.getUserCouponList()
// #ifdef MP-DI
let employeeId = this.customer.directCustomerId?this.customer.directCustomerId:0
let employeeId = this.customer.salesBaseInfo&&this.customer.salesBaseInfo.employeeId?this.customer.salesBaseInfo.employeeId:0
this.createBy.CreateBy = employeeId
// #endif
// #ifdef MP-AG
......@@ -413,7 +413,7 @@
});
setTimeout(() => {
uni.redirectTo({
url: "/pages/airTicket/TicketOrderDetails?OrderNo=" + OrderNo,
url: "/pages/airTicket/airTicketOrderDetail?OrderNo=" + OrderNo,
});
}, 100);
},
......@@ -454,7 +454,7 @@
if(r.resultCode==1){
let tempData = r.data
// #ifdef MP-DI
this.submitB2COrderHandler(tempData.OrderId)
this.submitB2COrderHandler(tempData)
// #endif
// #ifdef MP-AG
this.successVisible=true
......
......@@ -1321,7 +1321,6 @@
})
}
this.customer = uni.getStorageSync("b2b_user");
console.log(this.customer,'----')
// #ifdef MP-DI
this.delMsg.directCustomerId = this.customer.customerId
// #endif
......
......@@ -139,8 +139,17 @@
<!-- #ifdef MP-ALIPAY -->
<view v-if="item.orderState == 2" class="jz_Zailai" style="width: 110rpx; margin-right: 10rpx" @click.stop="goZhifuAli(item)">付款</view>
<!-- #endif -->
<!-- #ifdef MP-DI -->
<view v-if="item.isApplyForCancel != 1 && item.orderState != 4 && item.customerPayMoney==0" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancelZK(item)">取消</view>
<view v-if="item.isApplyForCancel != 1 && item.orderState != 4 && item.customerPayMoney==0" class="jz_Zailai"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="goOrderDetail(item)">立即支付</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="item.isApplyForCancel != 1 && item.orderState != 4 && item.customerPayMoney==0" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancel(item)">取消</view>
<!-- #endif -->
</view>
</view>
</scroll-view>
......@@ -215,6 +224,7 @@
b2b_user_info: {},
userInfo: {},
showAuth: false,
submitCancel: false,
};
},
created() {
......@@ -392,6 +402,33 @@
);
}
},
goCancelZK(item) {
let that = this
if(this.submitCancel) return
this.submitCancel = true
if (
(item.paymentTime == null || item.paymentTime == "") &&
(item.orderState == 2 || item.orderState == 3)
) {
this.apipost(
"GetCancelOrder_post", {
OrderNo: '',
ErpOrderId: item.orderId,
OrderTypeStr: 'DMC',
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.research();
}
},
(err) => {}
);
}
},
//付款
// #ifdef MP-WEIXIN
goZhifu(item) {
......
......@@ -602,7 +602,8 @@
showPayBtn: true,
orderInfo:null,
OrderNo: '',
mainColor:''
mainColor:'',
orderId: 0,
};
},
created() {},
......@@ -613,7 +614,8 @@
this.OrderNo = option.OrderNo
this.getOrderInfoHandler(this.OrderNo)
} else if (option.orderId) {
this.initOrderInfo(option.orderId);
this.orderId = option.orderId
this.initOrderInfo();
}
this.mainColor = this.$uiConfig.mainColor
},
......@@ -681,7 +683,9 @@
getOrderInfoHandler(OrderNo){
this.apipost("GetDetailsByOrderNo_post",{OrderNo},res=>{
if(res.resultCode==1){
this.initOrderInfo(res.data.ErpOrderId);
this.OrderNo = res.data.OrderNo
this.orderId = res.data.ErpOrderId
this.initOrderInfo();
this.formatStatus(
res.data.OrderStatus,
null,
......@@ -807,9 +811,9 @@
return arr[1] + "月" + arr[2] + "日";
}
},
initOrderInfo(orderId) {
initOrderInfo() {
let msg = {
ID: orderId,
ID: this.orderId,
IsGetGuest: 1,
};
this.apipost(
......
......@@ -140,9 +140,13 @@
<!-- <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"
<!-- v-if="item.visaOrderStatus==1" -->
<button v-if="item.visaOrderStatus==3" class="jz_Zailai"
style="width: 110rpx" @click.stop="goCancelZK(item)"
:disabled="submitCancel">取消</button>
<button v-if="item.visaOrderStatus==3" class="jz_Zailai"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="goOrderDetail(item)"
:disabled="submitCancel">立即支付</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="item.visaOrderStatus==3" class="jz_Zailai"
......@@ -399,7 +403,9 @@
if (tip.confirm) {
that.apipost(
"GetCancelOrder_post", {
OrderNo: 0,
OrderNo: '',
ErpOrderId: item.id,
OrderTypeStr: 'Visa',
},
(res) => {
if (res.resultCode == 1) {
......
......@@ -887,6 +887,7 @@
});
},
goPayHandler(OrderNo) {
let that = this;
uni.requestPayment({
provider: "wxpay",
timeStamp: this.orderInfo.timeStamp,
......
......@@ -602,7 +602,7 @@
if(option.orderId){
this.orderId = option.orderId
}
if(option.orderId){
if(option.OrderNo){
this.OrderNo = option.OrderNo
}
this.getOrderInfoHandler()
......@@ -614,7 +614,7 @@
this.submit = true
this.apipost("GetCodeByOrderNo_post", {
OrderNo: this.OrderNo,
MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId
MallBaseId: uni.getStorageSync("mall_UserInfo").MallBaseId,
}, (res) => {
if (res.resultCode == 1) {
this.orderInfo =JSON.parse(res.data.sPayInfo)
......@@ -669,6 +669,8 @@
OrderTypeStr: this.OrderTypeStr,
},res=>{
if(res.resultCode==1){
this.OrderNo = res.data.OrderNo
this.orderId = res.data.ErpOrderId
this.orderData = {
...res.data
}
......
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