Commit bcd66615 authored by 黄奎's avatar 黄奎

订单支付测试

parent dcc6a194
...@@ -183,7 +183,9 @@ ...@@ -183,7 +183,9 @@
x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus, x.orderStatusInfo = EnumHelper.ParseToEnum(OrderStatusEnum, x.orderStatus,
'value') 'value')
}) })
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
console.log("res.data.pageData",res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
if (this.page_count == 1) { if (this.page_count == 1) {
this.status = "nomore"; this.status = "nomore";
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<!-- #ifdef MP-DI --> <!-- #ifdef MP-DI -->
<view v-if="item.orderStatus==1||item.orderStatus==2" class="jz_Zailai" <view v-if="item.orderStatus==1||item.orderStatus==2" class="jz_Zailai"
style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancelZK(item)">取消</view> style="width: 110rpx;margin-left: 10rpx;" @click.stop="goCancelZK(item)">取消</view>
<view v-if="item.orderStatus==1" class="jz_Zailai jz_ZailaiZF" <view v-if="item.orderStatus==1" class="jz_Zailai jz_ZailaiZF"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)"> style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">
立即支付</view> 立即支付</view>
...@@ -56,7 +57,9 @@ ...@@ -56,7 +57,9 @@
@click.stop="AnotherOrder(item)">再来一单</view> @click.stop="AnotherOrder(item)">再来一单</view>
<!-- #endif --> <!-- #endif -->
<!-- #ifdef MP-AG --> <!-- #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> 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" <view v-if="item.goodsType==7&&item.orderStatus==1" class="jz_Zailai jz_ZailaiZF"
style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)"> style="width: 150rpx;margin-left: 10rpx;" @click.stop="submitGetCodeByOrderNo(item)">
...@@ -105,6 +108,92 @@ ...@@ -105,6 +108,92 @@
cancelSuccess() { cancelSuccess() {
this.$emit('research', 5) 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) { submitGetCodeByOrderNo(item) {
console.log("item", item) console.log("item", item)
...@@ -224,7 +313,6 @@ ...@@ -224,7 +313,6 @@
url = "airTicket/airIndex" url = "airTicket/airIndex"
} }
// #endif // #endif
if (url) { if (url) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/${url}`, url: `/pages/${url}`,
...@@ -268,7 +356,7 @@ ...@@ -268,7 +356,7 @@
}); });
} }
}, },
//取消订单 //取消订单(同行订单取消)
goCancel(item) { goCancel(item) {
let that = this let that = this
if (this.submit || this.submitCancel) return if (this.submit || this.submitCancel) return
...@@ -308,6 +396,7 @@ ...@@ -308,6 +396,7 @@
cancelModal() { cancelModal() {
this.showModal = false this.showModal = false
}, },
//直客订单取消
goCancelZK(item) { goCancelZK(item) {
if (item.orderStatus == 2) { if (item.orderStatus == 2) {
this.currentData = item this.currentData = item
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
<text></text> <text></text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
......
...@@ -136,9 +136,7 @@ ...@@ -136,9 +136,7 @@
</view> </view>
</view> </view>
</view> </view>
<u-popup v-model="showSalePreviwe" mode="bottom" <u-popup v-model="showSalePreviwe" mode="bottom" border-radius="50" length="60%" :safe-area-inset-bottom="true">
border-radius="50" length="60%"
:safe-area-inset-bottom="true">
<orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService> <orderService :msg="msg" :list="SaleList" @goReserce="goReserce"></orderService>
</u-popup> </u-popup>
</view> </view>
...@@ -147,7 +145,7 @@ ...@@ -147,7 +145,7 @@
<script> <script>
import orderService from "@/components/serviceStaff/orderService"; import orderService from "@/components/serviceStaff/orderService";
export default { export default {
props: ['roomMsg', 'dataList', 'search', 'rooms', 'qRoomType', 'qMealType','createById'], props: ['roomMsg', 'dataList', 'search', 'rooms', 'qRoomType', 'qMealType', 'createById'],
components: { components: {
orderService, orderService,
}, },
...@@ -171,7 +169,7 @@ ...@@ -171,7 +169,7 @@
qMealTypeList: [], qMealTypeList: [],
b2bUser: null, b2bUser: null,
SaleList: [], SaleList: [],
msg:{ msg: {
SaleName: '', SaleName: '',
SaleId: 0, SaleId: 0,
}, },
...@@ -263,30 +261,29 @@ ...@@ -263,30 +261,29 @@
}); });
}, },
methods: { methods: {
goReserce(item){ goReserce(item) {
this.msg.SaleName = item.SaleName this.msg.SaleName = item.SaleName
this.msg.SaleId = item.SaleId this.msg.SaleId = item.SaleId
setTimeout(()=>{ setTimeout(() => {
this.showSalePreviwe = false this.showSalePreviwe = false
},500) }, 500)
this.goUrl() this.goUrl()
}, },
getSale(){ getSale() {
if(!this.b2bUser.customerId) return if (!this.b2bUser.customerId) return
this.apipost( this.apipost(
"b2b_get_GetCustomerCreateByList", "b2b_get_GetCustomerCreateByList", {
{
CustomerId: this.b2bUser.customerId CustomerId: this.b2bUser.customerId
}, },
(res) => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
if(res.data.length>0){ if (res.data.length > 0) {
this.SaleList = res.data 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.SaleName = res.data[0].EmName
this.msg.SaleId = res.data[0].CreateBy this.msg.SaleId = res.data[0].CreateBy
} }
}else{ } else {
this.msg.SaleName = '' this.msg.SaleName = ''
this.msg.SaleId = 0 this.msg.SaleId = 0
} }
...@@ -382,7 +379,7 @@ ...@@ -382,7 +379,7 @@
setOrder(subItem) { setOrder(subItem) {
this.subItem = subItem this.subItem = subItem
// #ifdef MP-AG // #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({ // uni.showToast({
// title: "请选择服务人员", // title: "请选择服务人员",
// icon: "none", // icon: "none",
...@@ -397,19 +394,17 @@ ...@@ -397,19 +394,17 @@
let subItem = this.subItem let subItem = this.subItem
let createBy = 0 let createBy = 0
// #ifdef MP-DI // #ifdef MP-DI
let employeeId = this.b2bUser.salesBaseInfo&&this.b2bUser.salesBaseInfo.employeeId?this.b2bUser.salesBaseInfo.employeeId:0 let employeeId = this.b2bUser.salesBaseInfo && this.b2bUser.salesBaseInfo.employeeId ? this.b2bUser
createBy = this.createBy>0?this.createBy:employeeId .salesBaseInfo.employeeId : 0
createBy = this.createBy > 0 ? this.createBy : employeeId
// #endif // #endif
// #ifdef MP-AG // #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 // #endif
let pHotel = { let pHotel = {
hotelid: this.HotelInfo.hotelid, hotelid: this.HotelInfo.hotelid,
name: this.HotelInfo.name, name: this.HotelInfo.name,
address: "",
images: [], 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) {
if (this.HotelInfo.images && this.HotelInfo.images.length > 0) { if (this.HotelInfo.images && this.HotelInfo.images.length > 0) {
...@@ -417,9 +412,6 @@ ...@@ -417,9 +412,6 @@
Path: this.HotelInfo.images[0].url Path: this.HotelInfo.images[0].url
}); });
} }
if (this.HotelInfo.location&&this.HotelInfo.location.address) {
pHotel.address = this.HotelInfo.location.address;
}
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}&CreateBy=${createBy}`, url: `/pages/hotel/order?searchObj=${JSON.stringify(this.searchObj)}&HotelInfo=${JSON.stringify(pHotel)}&RoomInfo=${JSON.stringify(subItem)}&CreateBy=${createBy}`,
...@@ -1343,17 +1335,21 @@ ...@@ -1343,17 +1335,21 @@
line-height: 81rpx; line-height: 81rpx;
text-align: center; text-align: center;
} }
.hotelDetailRPriceBook.active{
.hotelDetailRPriceBook.active {
position: relative; position: relative;
top: -45rpx; top: -45rpx;
} }
.hotelDetailMinXiRBBox { .hotelDetailMinXiRBBox {
margin-left: 16rpx; margin-left: 16rpx;
} }
.hotelDetailMinXiRBBox.active{
.hotelDetailMinXiRBBox.active {
position: relative; position: relative;
top: -20rpx; top: -20rpx;
} }
.hotelDetailMinXiRF { .hotelDetailMinXiRF {
height: 1px; height: 1px;
flex: 1; 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