Commit a7652d90 authored by youjie's avatar youjie

支付

parent b0733978
......@@ -252,7 +252,7 @@
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view style=" display: flex;justify-content: space-between;">
<view class="text-center cities-name" @click="cancelVisible=true" v-if="!submit&&order.status==0&&((b2b_user.isGuideOrLeader!=1)||(b2b_user.isGuideOrLeader==1&&order.Income==0))" 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="cancelVisible=true" v-if="order.status==0&&((b2b_user.isGuideOrLeader!=1)||(b2b_user.isGuideOrLeader==1&&order.Income==0))" 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="b2b_user.isGuideOrLeader==1&&order.Income==0&&order.status==0" style="background-color: #1d1d20;flex:1;border-radius: 10rpx;height: 80rpx; line-height: 80rpx;color:#EEF1F4;margin-left: 20rpx;">立即支付</view>
</view>
<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>
......
......@@ -245,12 +245,12 @@
</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<button v-if="!submit&&((orderData.OrderStatus==1&&customer.isGuideOrLeader!=1)||(customer.isGuideOrLeader==1&&orderData.Income==0&&orderData.OrderStatus==1))" class="jz_OrderReNow"
<button v-if="((orderData.OrderStatus==1&&customer.isGuideOrLeader!=1)||(customer.isGuideOrLeader==1&&orderData.Income==0&&orderData.OrderStatus==1))" class="jz_OrderReNow"
@click="goCancel" style="background: #fff; color: #111; border: 1px solid #111"
:disabled="submitCancel" :loading="submitCancel">
取消
</button>
<button v-if="!submitCancel&&(customer.isGuideOrLeader==1&&orderData.Income==0&&orderData.OrderStatus==1)" class="jz_OrderReNow" style="margin-left: 20rpx;"
<button v-if="(customer.isGuideOrLeader==1&&orderData.Income==0&&orderData.OrderStatus==1)" class="jz_OrderReNow" style="margin-left: 20rpx;"
@click="payHotelOrder" :disabled="submit" :loading="submit">
立即支付
</button>
......@@ -394,7 +394,7 @@
this.showModal = false
},
payHotelOrder() {
if(this.submit) return
if(this.submit ||this.submitCancel) return
let userInfo = uni.getStorageSync("mall_UserInfo");
var payMsg = {
OrderNo: this.OrderNo,
......@@ -491,8 +491,7 @@
},
goCancel() {
let that = this
if (this.submitCancel) return
//待付款-直接取消
if (this.submit || this.submitCancel) return;
if (this.orderData.OrderStatus == 1) {
wx.showModal({
title: '提示',
......
......@@ -580,7 +580,7 @@
</button>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<button v-if="!submit&&((orderData.model.OrderState==2&&b2b_user.isGuideOrLeader==1&&orderData.model.Income==0)||(orderData.model.OrderState==2&&b2b_user.isGuideOrLeader!=1))" class="jz_OrderReNow" @click="goCancel"
<button v-if="((orderData.model.OrderState==2&&b2b_user.isGuideOrLeader==1&&orderData.model.Income==0)||(orderData.model.OrderState==2&&b2b_user.isGuideOrLeader!=1))" class="jz_OrderReNow" @click="goCancel"
style="background: #fff; color: #111; border: 1px solid #111"
:disabled="submitCancel"
:loading="submitCancel">
......@@ -588,7 +588,7 @@
<!-- <text v-if="!submitCancel">取消</text>
<u-loading v-if="submitCancel" size="32" color="#111"></u-loading> -->
</button>
<button v-if="!submitCancel&&(orderData.model.OrderState==2&&b2b_user.isGuideOrLeader==1&&orderData.model.Income==0)" class="jz_OrderReNow"
<button v-if="(orderData.model.OrderState==2&&b2b_user.isGuideOrLeader==1&&orderData.model.Income==0)" class="jz_OrderReNow"
style="margin-left: 20rpx;"
@click="submitGetCodeByOrderNo" :disabled="submit" :loading="submit">
立即支付
......@@ -774,67 +774,78 @@
});
},
goCancel() {
let that = this
if (this.submit || this.submitCancel) return;
this.submitCancel = true;
//未付款-调用后台取消
if (this.orderData.model.OrderState == 2 || this.orderData.model.OrderState == 3) {
this.apipost(
"sellorder_post_B2BRemoveOrder", {
ID: this.orderData.model.OrderId,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
this.initOrderInfo();
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
this.submitCancel = false
}
);
} else {
this.submitCancel = true
let msg = {
OrderId: this.orderData.model.OrderId,
UserId: uni.getStorageSync("mall_UserInfo").UserId,
};
//已付款取消申请
this.apipost(
"sellorder_post_AppletUserCancelOrder",
msg,
(res) => {
this.submitCancel = false
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
this.initOrderInfo();
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
that.submitCancel = true;
//未付款-调用后台取消
if (that.orderData.model.OrderState == 2 || that.orderData.model.OrderState == 3) {
that.apipost(
"sellorder_post_B2BRemoveOrder", {
ID: that.orderData.model.OrderId,
},
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.initOrderInfo();
that.submitCancel = false
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
that.submitCancel = false
}
);
} else {
that.submitCancel = true
let msg = {
OrderId: that.orderData.model.OrderId,
UserId: uni.getStorageSync("mall_UserInfo").UserId,
};
//已付款取消申请
that.apipost(
"sellorder_post_AppletUserCancelOrder",
msg,
(res) => {
that.submitCancel = false
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
that.initOrderInfo();
// uni.navigateTo({
// url: "/pages/AggregateOrders/AggregateOrdersList",
// });
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
that.submitCancel = false
}
);
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
this.submitCancel = false
}
);
}
}
})
},
goCancelZK() {
let that = this
......
......@@ -179,7 +179,7 @@
}
.jz_OrderReNow {
width: 170rpx;
min-width: 170rpx;
height: 80rpx;
background-color: #111111;
text-align: center;
......@@ -601,8 +601,7 @@
this.b2b_user = uni.getStorageSync("b2b_user");
if (option.orderData) {
this.orderData = JSON.parse(decodeURIComponent(option.orderData));
}else if(option.OrderNo&&option.orderId){
this.orderId = option.orderId
}else if(option.OrderNo){
this.OrderNo = option.OrderNo
this.getOrderInfoHandler()
} else if (option.orderId) {
......
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