|
@@ -7,6 +7,7 @@
|
|
|
<view :class="['inv-h',Inv==2?'inv-h-se':'']" @click="changeTab(2)">已支付</view>
|
|
<view :class="['inv-h',Inv==2?'inv-h-se':'']" @click="changeTab(2)">已支付</view>
|
|
|
<view :class="['inv-h',Inv==3?'inv-h-se':'']" @click="changeTab(3)">已入住</view>
|
|
<view :class="['inv-h',Inv==3?'inv-h-se':'']" @click="changeTab(3)">已入住</view>
|
|
|
<view :class="['inv-h',Inv==4?'inv-h-se':'']" @click="changeTab(4)">已取消</view>
|
|
<view :class="['inv-h',Inv==4?'inv-h-se':'']" @click="changeTab(4)">已取消</view>
|
|
|
|
|
+ <view :class="['inv-h',Inv==7?'inv-h-se':'']" @click="changeTab(7)">退款中</view>
|
|
|
<view :class="['inv-h',Inv==5?'inv-h-se':'']" @click="changeTab(5)">已退款</view>
|
|
<view :class="['inv-h',Inv==5?'inv-h-se':'']" @click="changeTab(5)">已退款</view>
|
|
|
<view :class="['inv-h',Inv==6?'inv-h-se':'']" @click="changeTab(6)">已退房</view>
|
|
<view :class="['inv-h',Inv==6?'inv-h-se':'']" @click="changeTab(6)">已退房</view>
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -27,15 +28,16 @@
|
|
|
<text v-else-if="item.status==3">已入住</text>
|
|
<text v-else-if="item.status==3">已入住</text>
|
|
|
<text v-else-if="item.status==4">已取消</text>
|
|
<text v-else-if="item.status==4">已取消</text>
|
|
|
<text v-else-if="item.status==5">已退款</text>
|
|
<text v-else-if="item.status==5">已退款</text>
|
|
|
- <text v-else="item.status==6">已退房</text>
|
|
|
|
|
|
|
+ <text v-else-if="item.status==6">已退房</text>
|
|
|
|
|
+ <text v-else="item.status==7">退款中</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="room-price">¥{{ item.pay_account }}</view>
|
|
<view class="room-price">¥{{ item.pay_account }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- <uni-countdown v-if="item.status == 0" class="room-count" color="#FF5733" :show-day="false" :second="timeupSecond"
|
|
<!-- <uni-countdown v-if="item.status == 0" class="room-count" color="#FF5733" :show-day="false" :second="timeupSecond"
|
|
|
@timeup="timeup(item.createTime)" />
|
|
@timeup="timeup(item.createTime)" />
|
|
|
<text v-if="item.status == 0" class="room-count-txt">之后取消</text> -->
|
|
<text v-if="item.status == 0" class="room-count-txt">之后取消</text> -->
|
|
|
- <view class="room-button" v-if="item.status != 3 && item.status != 4 && item.status != 5 && item.status != 6">
|
|
|
|
|
- <text v-if="item.status == 1 || item.status == 2" @click="openQu(item.id,'warn')">取消订单</text>
|
|
|
|
|
|
|
+ <view class="room-button3" v-if="item.status == 2">
|
|
|
|
|
+ <text v-if="item.status == 2" @click="openQu(item.order_num,'warn')">取消订单</text>
|
|
|
<!-- <text v-else-if="item.status == 0" @click="openDel(item.id,'warn')">删除</text> -->
|
|
<!-- <text v-else-if="item.status == 0" @click="openDel(item.id,'warn')">删除</text> -->
|
|
|
<!-- <text v-else="item.status == 5" @click="openDel(item.id,'warn')">删除</text> -->
|
|
<!-- <text v-else="item.status == 5" @click="openDel(item.id,'warn')">删除</text> -->
|
|
|
<!-- <text v-else-if="item.status == 2">取消订单</text> -->
|
|
<!-- <text v-else-if="item.status == 2">取消订单</text> -->
|
|
@@ -216,7 +218,7 @@
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$myRequest({
|
|
that.$myRequest({
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
- url: '/hotelReservation/zhotel2/apporder_pay.action',
|
|
|
|
|
|
|
+ url: '/hotelReservation/zhotel/apporder_pay.action',
|
|
|
data: {
|
|
data: {
|
|
|
'card_number': that.cardNumber,
|
|
'card_number': that.cardNumber,
|
|
|
'h_type': hType,
|
|
'h_type': hType,
|
|
@@ -274,12 +276,13 @@
|
|
|
var Inv2 = that.Inv
|
|
var Inv2 = that.Inv
|
|
|
that.troom = []
|
|
that.troom = []
|
|
|
that.room = []
|
|
that.room = []
|
|
|
- // if (that.Inv == 6) {
|
|
|
|
|
- // Inv2 = 0
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ if (that.Inv == 0) {
|
|
|
|
|
+ Inv2 = 'null'
|
|
|
|
|
+ }
|
|
|
that.$myRequest({
|
|
that.$myRequest({
|
|
|
- url: '/hotelReservation/zhotel2/appqueryOrder.action?card_number=' + that.cardNumber + '&state=' + Inv2
|
|
|
|
|
|
|
+ url: '/hotelReservation/zhotel/appqueryOrder.action?card_number=' + that.cardNumber + '&state=' + Inv2
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
|
|
+ // console.log(res.data);
|
|
|
var data = res.data
|
|
var data = res.data
|
|
|
if (data.code === 200) {
|
|
if (data.code === 200) {
|
|
|
data.data.forEach(item => {
|
|
data.data.forEach(item => {
|
|
@@ -336,19 +339,17 @@
|
|
|
},
|
|
},
|
|
|
// 取消订单弹框
|
|
// 取消订单弹框
|
|
|
openQu(id, type) {
|
|
openQu(id, type) {
|
|
|
- uni.showToast({
|
|
|
|
|
- title: '接口未完成'
|
|
|
|
|
- })
|
|
|
|
|
- // this.order_txt_id = id
|
|
|
|
|
- // this.msgType2 = type
|
|
|
|
|
- // this.order_txt2 = '确定取消订单?'
|
|
|
|
|
- // this.$refs.popup_order2.open()
|
|
|
|
|
|
|
+ // console.log(id, type);
|
|
|
|
|
+ this.order_txt_id = id
|
|
|
|
|
+ this.msgType2 = type
|
|
|
|
|
+ this.order_txt2 = '确定取消订单?'
|
|
|
|
|
+ this.$refs.popup_order2.open()
|
|
|
},
|
|
},
|
|
|
// 办理退房
|
|
// 办理退房
|
|
|
getOrderReturn(order_txt_id) {
|
|
getOrderReturn(order_txt_id) {
|
|
|
let _self = this
|
|
let _self = this
|
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
|
- this.$axios.put(`/hotelReservation/zhotel2/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`, ).then(res => {
|
|
|
|
|
|
|
+ this.$axios.put(`/hotelReservation/zhotel/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`, ).then(res => {
|
|
|
res = res.data
|
|
res = res.data
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
this.order_txt = '退房成功'
|
|
this.order_txt = '退房成功'
|
|
@@ -366,7 +367,7 @@
|
|
|
getOrderHold(order_txt_id) {
|
|
getOrderHold(order_txt_id) {
|
|
|
let _self = this
|
|
let _self = this
|
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
|
- this.$axios.put(`/hotelReservation/zhotel2/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`, ).then(res => {
|
|
|
|
|
|
|
+ this.$axios.put(`/hotelReservation/zhotel/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`, ).then(res => {
|
|
|
res = res.data
|
|
res = res.data
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
this.order_txt = '办理入住成功'
|
|
this.order_txt = '办理入住成功'
|
|
@@ -382,7 +383,7 @@
|
|
|
getOrderDelete(order_txt_id) {
|
|
getOrderDelete(order_txt_id) {
|
|
|
let _self = this
|
|
let _self = this
|
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
|
|
|
- this.$axios.delete(`/hotelReservation/zhotel2/ihotel/hotelOrder/user/order/${this.order_txt_id}`, ).then(res => {
|
|
|
|
|
|
|
+ this.$axios.delete(`/hotelReservation/zhotel/ihotel/hotelOrder/user/order/${this.order_txt_id}`, ).then(res => {
|
|
|
res = res.data
|
|
res = res.data
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
this.order_txt = '删除订单成功'
|
|
this.order_txt = '删除订单成功'
|
|
@@ -400,15 +401,15 @@
|
|
|
let that = this
|
|
let that = this
|
|
|
// that.$axios.defaults.headers.common['user_token'] = that.$utils.getEncryptedData('token');
|
|
// that.$axios.defaults.headers.common['user_token'] = that.$utils.getEncryptedData('token');
|
|
|
that.$myRequest({
|
|
that.$myRequest({
|
|
|
- url: '/hotelReservation/zhotel2/ihotel/hotelOrder/user/order/cancel/' + that.order_txt_id
|
|
|
|
|
|
|
+ url: '/hotelReservation/zhotel/apprefund.action?order_num=' + that.order_txt_id
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
- alert(JSON.stringify(res.data))
|
|
|
|
|
|
|
+ // console.log(res.data);
|
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
|
- that.order_txt = '取消成功'
|
|
|
|
|
|
|
+ that.order_txt = '退款成功'
|
|
|
that.$refs.popup_order.open()
|
|
that.$refs.popup_order.open()
|
|
|
that.getOrderPage()
|
|
that.getOrderPage()
|
|
|
} else {
|
|
} else {
|
|
|
- that.order_txt = res.message
|
|
|
|
|
|
|
+ that.order_txt = res.data.message
|
|
|
that.$refs.popup_order.open()
|
|
that.$refs.popup_order.open()
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|