Commit bcd66615 authored by 黄奎's avatar 黄奎

订单支付测试

parent dcc6a194
......@@ -183,7 +183,9 @@
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value')
})
this.g = this.g.concat(res.data.pageData);
console.log("res.data.pageData",res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
......
......@@ -49,6 +49,7 @@
<!-- #ifdef MP-DI -->
<view v-if="item.orderStatus==1||item.orderStatus==2" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancelZK(item)">取消</view>
<view v-if="item.orderStatus==1" class="jz_Zailai jz_ZailaiZF"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">
立即支付</view>
......@@ -56,7 +57,9 @@
@click.stop="AnotherOrder(item)">再来一单</view>
<!-- #endif -->
<!-- #ifdef MP-AG -->
<view v-if="item.income == 0&&item.orderStatus==1" class="jz_Zailai"
<view v-if="item.goodsType==7&&(item.orderStatus==1||item.orderStatus==2)" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="cancelHotelOrder(item)">取消</view>
<view v-if="item.goodsType!=7&&item.income == 0&&item.orderStatus==1" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancel(item)">取消</view>
<view v-if="item.goodsType==7&&item.orderStatus==1" class="jz_Zailai jz_ZailaiZF"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">
......@@ -105,6 +108,92 @@
cancelSuccess() {
this.$emit('research', 5)
},
//取消酒店订单
cancelHotelOrder(item) {
var that = this;
if (this.submitCancel) return
this.submitCancel = true;
var cancelMsg = {
OrderNo: item.directOrderNo, //注意这是直客表的订单流水号
ErpOrderId: item.erpOrderId, //这是第三方订单表的Id
OrderTypeStr: "Hotel", //订单类型为酒店
ConfirmID: "",
};
wx.showModal({
title: '提示',
content: '确定取消订单?',
success: (tip) => {
if (tip.confirm) {
that.submitCancel = true
//待付款-直接取消
if (item.orderStatus == 1) {
that.cancelOrder(cancelMsg)
}
//已付款,可能会有取消费用
else if (item.orderStatus == 2) {
var didaMsg = {
BookingID: item.thirdOrderNo
}
that.apipost("dmc_post_GetDiDaBookingCancel", didaMsg, (res) => {
if (res.resultCode == 1) {
var tempData = res.data;
if (tempData) {
cancelMsg.ConfirmID = tempData.ConfirmID;
//有取消费用
if (tempData.Amount && tempData.Amount > 0) {
var tipmsg = "取消订单将收取【" + tempData.Amount +
"】取消费用,是否确认取消订单?"
wx.showModal({
title: '提示',
content: tipmsg,
success: (tip) => {
if (tip.confirm) {
that.submitCancel = true;
that.cancelOrder(cancelMsg);
}
}
})
}
//无取消费用
else {
that.cancelOrder(cancelMsg);
}
}
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
that.submitCancel = false
})
}
}
}
})
},
cancelOrder(postMsg) {
this.apipost(
"post_CancelThirdHotelOrder", postMsg,
(res) => {
if (res.resultCode == 1) {
uni.showToast({
title: "操作成功",
icon: "success",
});
this.$emit('research');
}
},
(err) => {
uni.showToast({
title: err.message,
icon: "none",
});
this.submitCancel = false
}
);
},
//调用支付
submitGetCodeByOrderNo(item) {
console.log("item", item)
......@@ -224,7 +313,6 @@
url = "airTicket/airIndex"
}
// #endif
if (url) {
uni.navigateTo({
url: `/pages/${url}`,
......@@ -268,7 +356,7 @@
});
}
},
//取消订单
//取消订单(同行订单取消)
goCancel(item) {
let that = this
if (this.submit || this.submitCancel) return
......@@ -308,6 +396,7 @@
cancelModal() {
this.showModal = false
},
//直客订单取消
goCancelZK(item) {
if (item.orderStatus == 2) {
this.currentData = item
......
......@@ -46,7 +46,6 @@
<text></text>
</view>
</view>
</view>
</view>
</template>
......
......@@ -136,9 +136,7 @@
</view>
</view>
</view>
<u-popup v-model="showSalePreviwe" mode="bottom"
border-radius="50" length="60%"
:safe-area-inset-bottom="true">
<u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
<orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService>
</u-popup>
</view>
......@@ -147,7 +145,7 @@
<script>
import orderService from "@/components/serviceStaff/orderService";
export default {
props: ['roomMsg', 'dataList', 'search', 'rooms', 'qRoomType', 'qMealType','createById'],
props: ['roomMsg', 'dataList', 'search', 'rooms', 'qRoomType', 'qMealType', 'createById'],
components: {
orderService,
},
......@@ -171,7 +169,7 @@
qMealTypeList: [],
b2bUser: null,
SaleList: [],
msg:{
msg: {
SaleName: '',
SaleId: 0,
},
......@@ -263,30 +261,29 @@
});
},
methods: {
goReserce(item){
goReserce(item) {
this.msg.SaleName = item.SaleName
this.msg.SaleId = item.SaleId
setTimeout(()=>{
setTimeout(() => {
this.showSalePreviwe = false
},500)
}, 500)
this.goUrl()
},
getSale(){
if(!this.b2bUser.customerId) return
getSale() {
if (!this.b2bUser.customerId) return
this.apipost(
"b2b_get_GetCustomerCreateByList",
{
"b2b_get_GetCustomerCreateByList", {
CustomerId: this.b2bUser.customerId
},
(res) => {
if (res.resultCode == 1) {
if(res.data.length>0){
if (res.data.length > 0) {
this.SaleList = res.data
if(res.data.length==1&&this.createBy==0){
if (res.data.length == 1 && this.createBy == 0) {
this.msg.SaleName = res.data[0].EmName
this.msg.SaleId = res.data[0].CreateBy
}
}else{
} else {
this.msg.SaleName = ''
this.msg.SaleId = 0
}
......@@ -382,7 +379,7 @@
setOrder(subItem) {
this.subItem = subItem
// #ifdef MP-AG
if (this.SaleList&&this.SaleList.length>1&&this.msg.SaleId==0&&this.createBy==0) {
if (this.SaleList && this.SaleList.length > 1 && this.msg.SaleId == 0 && this.createBy == 0) {
// uni.showToast({
// title: "请选择服务人员",
// icon: "none",
......@@ -397,19 +394,17 @@
let subItem = this.subItem
let createBy = 0
// #ifdef MP-DI
let employeeId = this.b2bUser.salesBaseInfo&&this.b2bUser.salesBaseInfo.employeeId?this.b2bUser.salesBaseInfo.employeeId:0
createBy = this.createBy>0?this.createBy:employeeId
let employeeId = this.b2bUser.salesBaseInfo && this.b2bUser.salesBaseInfo.employeeId ? this.b2bUser
.salesBaseInfo.employeeId : 0
createBy = this.createBy > 0 ? this.createBy : employeeId
// #endif
// #ifdef MP-AG
if(this.createBy>0||this.msg.SaleId) createBy = this.createBy>0?this.createBy:this.msg.SaleId
if (this.createBy > 0 || this.msg.SaleId) createBy = this.createBy > 0 ? this.createBy : this.msg.SaleId
// #endif
let pHotel = {
hotelid: this.HotelInfo.hotelid,
name: this.HotelInfo.name,
address: "",
images: [],
destination: this.HotelInfo.location&&this.HotelInfo.location.destination&&this.HotelInfo.location.destination.name,
country: this.HotelInfo.location&&this.HotelInfo.location.country&&this.HotelInfo.location.country.name,
}
if (this.HotelInfo) {
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
......@@ -417,9 +412,6 @@
Path: this.HotelInfo.images[0].url
});
}
if (this.HotelInfo.location&&this.HotelInfo.location.address) {
pHotel.address = this.HotelInfo.location.address;
}
}
uni.navigateTo({
url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}&CreateBy=${createBy}`,
......@@ -1343,17 +1335,21 @@
line-height: 81rpx;
text-align: center;
}
.hotelDetailRPriceBook.active{
.hotelDetailRPriceBook.active {
position: relative;
top: -45rpx;
}
.hotelDetailMinXiRBBox {
margin-left: 16rpx;
}
.hotelDetailMinXiRBBox.active{
.hotelDetailMinXiRBBox.active {
position: relative;
top: -20rpx;
}
.hotelDetailMinXiRF {
height: 1px;
flex: 1;
......
This diff is collapsed.
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