diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue
index c2c3a2b..f176d05 100644
--- a/src/components/site/order_modal/order_modal.vue
+++ b/src/components/site/order_modal/order_modal.vue
@@ -5,7 +5,8 @@
{{ orderInfo.stadium_name || '-' }}
-
+
+ {{ getStatusTxt(orderInfo.pay_status) }}
订单编号:
@@ -85,26 +86,26 @@
- 实付款 ¥{{ orderInfo.amount || '0' }}
+ 实付款 ¥{{ orderInfo.amount || '0' }}
- 分享给朋友
+ 分享给朋友
取消占用
- 订单详情
- 退款
+ 订单详情
+ 退款
- 约课详情
+ 约课详情
- 取消订场
- 订单详情
- 退款
+ 订单详情
+ 取消订场
+
@@ -116,6 +117,19 @@ import { API } from '../../../js/api'
import { servers } from '../../../js/server'
import util from '../../../utils/util'
export default {
+ computed: {
+ // 是否显示使用状态
+ isShowStatus(){
+ let { orderInfo } = this;
+ return orderInfo.type == 'mini_program' || orderInfo.type == 'fixed_venue'
+ },
+
+ isShowTotalAmoutn(){
+ let { orderInfo } = this;
+
+ return orderInfo.type == 'mini_program' || orderInfo.type == 'course_venue' || orderInfo.type == 'fixed_venue'
+ }
+ },
props: {
queryInfo: {
type: Object,
@@ -132,6 +146,55 @@ export default {
this.getOrderInfo();
},
methods: {
+ toCouseInfo(){
+ util.showNone('待开放')
+ },
+ refundBtn: util.debounce(function(){
+ let { orderInfo, queryInfo } = this;
+ servers.post({
+ url: API.venue.orderRefund,
+ data: {
+ brand_id: queryInfo.brand_id,
+ order_no: orderInfo.order_no,
+ },
+ isDefaultGet: false,
+ })
+ .then(res=>{
+ if(res.data.code == 0){
+ util.showNone(res.data.message || '操作成功!');
+ setTimeout(_=>this.$emit('refresh'), 1200);
+ }else{
+ util.showNone(res.data.message || '操作失败!');
+ }
+ })
+ }, 300, true),
+ toOrderInfo(){
+ let { orderInfo, queryInfo } = this;
+ let _query = {}
+ _query["stadium_id"] = queryInfo.stadium_id
+ _query["order_no"] = orderInfo.order_no
+ _query["order_type"] = 3
+ util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
+ },
+ toShare(){
+ let { orderInfo, queryInfo } = this;
+ let _qyStr = `?brand_id=${queryInfo.brand_id}&order_no=${orderInfo.order_no}`
+ util.routeTo(`/pages/site/occupy_share/occupy_share${_qyStr}`, 'nT');
+ },
+
+ getStatusTxt(status){
+ switch(status){
+ case 0:
+ return '待扣款'
+ case 1:
+ return '使用中'
+ case 2:
+ return '已完成'
+ case 8:
+ return '使用中'
+ default: return '-'
+ }
+ },
getTitle(type){
switch(type){
case 'no_price_venue':
@@ -144,13 +207,11 @@ export default {
return '管理员占用'
case 'course_venue':
return '课程预定'
- case 'pay_venue':
+ case 'play_venue':
return '约玩占用'
case 'fixed_venue':
return '固定场锁定'
default: return '-'
-
-
}
},
cancelOccupy: util.debounce(function(){
@@ -165,7 +226,7 @@ export default {
})
.then(res=>{
if(res.data.code == 0){
- this.$emit('refresh');
+ setTimeout(_=>this.$emit('refresh'), 1200);
util.showNone(res.data.message || '操作成功!');
}else{
util.showNone(res.data.message || '操作失败!');
diff --git a/src/js/api.js b/src/js/api.js
index 859529e..7168133 100644
--- a/src/js/api.js
+++ b/src/js/api.js
@@ -72,7 +72,7 @@ API['venue'] = {
takeUpVerifyQr: `${ORIGIN}/admin/stadium/venue/takeUpVerifyQr`, // 商家助手 - 占用核销码
takeUpShareQr: `${ORIGIN}/admin/stadium/venue/takeUpShareQr`, // 商家助手 - 占用分享码
takeUpCancel: `${ORIGIN}/admin/stadium/venue/takeUpCancel`, // 商家助手-取消占用场地
-
+ orderRefund: `${ORIGIN}/admin/stadium/order/cancel`, // 商家助手 - 退款
}
diff --git a/src/pages/site/confirm/confirm.vue b/src/pages/site/confirm/confirm.vue
index 8ef82ea..f33b653 100644
--- a/src/pages/site/confirm/confirm.vue
+++ b/src/pages/site/confirm/confirm.vue
@@ -30,7 +30,7 @@
- *是否联动开灯
+ *是否联动开灯
联动开灯开启后,会根据占用时间自动开灯
@@ -61,7 +61,8 @@ export default {
data(){
return {
ocPrice: '',
- ocReaon: ''
+ ocReaon: '',
+ light_up: false,
}
},
computed: {
@@ -71,9 +72,12 @@ export default {
console.log(this.occupyInfo)
},
methods: {
+ switchChange(e){
+ this.light_up = e.detail.value
+ },
confirmOccupy: util.debounce(function(){
let { storeInfo, dateInfo, venueList, typeInfo } = this.occupyInfo;
- let { ocPrice, ocReaon } = this;
+ let { ocPrice, ocReaon, light_up } = this;
servers.post({
url: API.venue.venueTakeUp,
@@ -90,7 +94,8 @@ export default {
duration: el.durations,
price: el.price
}
- })
+ }),
+ light_up,
},
isDefaultGet: false
})
@@ -113,7 +118,7 @@ export default {
}
})
- }),
+ }, 300, true),
},
}
diff --git a/src/pages/site/manage/manage.vue b/src/pages/site/manage/manage.vue
index 79e39ee..174c47b 100644
--- a/src/pages/site/manage/manage.vue
+++ b/src/pages/site/manage/manage.vue
@@ -212,7 +212,7 @@ export default {
return { zh_text: info.message || '管理员占用', type: info.type, className: 'black', }
case 'course_venue':
return { zh_text: info.message || '课程预定', type: info.type, className: 'pistac', }
- case 'pay_venue':
+ case 'play_venue':
return { zh_text: info.message || '约玩占用', type: info.type, className: 'black', }
case 'fixed_venue':
return { zh_text: info.message || '固定场锁定', type: info.type, className: 'blue', }
@@ -311,7 +311,7 @@ export default {
let { curStoreInfo } = this;
let _venueInfo = { ..._venueList[i] };
return this.boardInfo = {
- brand_id: curStoreInfo.curStoreInfo,
+ brand_id: curStoreInfo.brand_id,
stadium_id: curStoreInfo.id,
venue_id: _venueInfo.venue_id,
date: _venueInfo.date,