Browse Source

fix all

course
刘嘉炜 4 years ago
parent
commit
125d11513e
  1. 27
      src/components/site/order_modal/order_modal.vue
  2. 3
      src/js/api.js
  3. 2
      src/pages/index/index.vue
  4. 26
      src/pages/site/confirm/confirm.vue
  5. 10
      src/pages/site/manage/manage.vue

27
src/components/site/order_modal/order_modal.vue

@ -105,7 +105,7 @@
<view class="om-btns" v-if="orderInfo.type == 'fixed_venue'">
<!-- 测试固定场地没有详情 -->
<view class="ob-view" v-if="orderInfo.pay_status != 0" @click="toOrderInfo">订单详情</view>
<view class="ob-view red" @click="cancelOccupy" v-if="orderInfo.pay_status!=2">取消订场</view>
<view class="ob-view red" @click="fixedCancelOccupy" v-if="orderInfo.pay_status!=2">取消订场</view>
<!-- <view class="ob-view red">退款</view> -->
</view>
</view>
@ -147,6 +147,27 @@ export default {
this.getOrderInfo();
},
methods: {
fixedCancelOccupy: util.debounce(function(){
let { orderInfo, queryInfo } = this;
util.showLoad();
servers.get({
url: API.venue.FixedOccupyCancel,
data: {
id: orderInfo.fix_venue_id,
},
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
setTimeout(_=>this.$emit('refresh'), 1200);
util.showNone(res.data.message || '操作成功!');
}else{
util.showNone(res.data.message || '操作失败!');
}
})
.catch(util.hideLoad)
}, 300, true),
toCouseInfo(){
util.showNone('待开放')
},
@ -190,7 +211,9 @@ export default {
case 1:
return '待使用'
case 2:
return '已完成'
return '已使用'
case 3:
return '已失效'
case 8:
return '使用中'
default: return '-'

3
src/js/api.js

@ -74,6 +74,9 @@ API['venue'] = {
takeUpCancel: `${ORIGIN}/admin/stadium/venue/takeUpCancel`, // 商家助手-取消占用场地
orderRefund: `${ORIGIN}/admin/stadium/order/cancel`, // 商家助手 - 退款
// 20210806
FixedOccupyCancel: `${ORIGIN}/admin/VenueNumberFixedOccupy/cancel`, // 固定场取消订场
}
// 2.1 核销

2
src/pages/index/index.vue

@ -109,7 +109,7 @@
},
{
id: 5,
name: '场地管理',
name: '场地看板',
// path: '/pages/site/order_list/order_list', // 20210804
path: '/pages/site/manage/manage',
serverKey: 1009 //

26
src/pages/site/confirm/confirm.vue

@ -28,6 +28,10 @@
</block>
</view>
</view>
<view class="soi-total">
<text>小计{{(occupyInfo.venueList&&occupyInfo.venueList.length) || 0}}</text>
¥{{ totalPrice || 0 }}
</view>
</view>
<view class="sc-switch">
<view><view><text>*</text>是否联动开灯</view><switch @change="switchChange" color="#009874"></switch></view>
@ -67,6 +71,15 @@ export default {
},
computed: {
...mapState([ 'occupyInfo' ]),
totalPrice(){
let { occupyInfo } = this;
let _list = occupyInfo.venueList || [];
if(!_list.length)return 0;
let _price = 0;
_list.forEach(e=>_price += +e.price);
console.warn(_price)
return _price.toFixed(2);
}
},
onLoad(){
console.log(this.occupyInfo)
@ -193,6 +206,19 @@ export default {
}
}
}
.soi-total{
margin-top: 30upx;
text-align: right;
font-size: 28upx;
line-height: 52upx;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
>text{
color: #9a9a9d;
}
}
}
.sc-switch{
padding: 40upx 24upx 0;

10
src/pages/site/manage/manage.vue

@ -201,6 +201,8 @@ export default {
},
methods: {
getVenueStatusnInfo(info){
//
if(info.overdue&&info.type == 'empty_venue')return { zh_text: info.message || info.price, type: 'overdue', className: 'gray', }
switch(info.type){
case 'no_price_venue':
return { zh_text: info.message || '无法订场', type: info.type, className: 'grey', }
@ -306,6 +308,7 @@ export default {
// this.showOccupyTip(_str)
// return
// }
if(_curTarget.overdue&&_curTarget.type == 'empty_venue')return //
//
if(_curTarget.type !== 'empty_venue'&& _curTarget.type !== 'no_price_venue'){
let { curStoreInfo } = this;
@ -697,6 +700,10 @@ export default {
background-color: #68C43B;
border-color: #68C43B;
}
&.gray{
border-color: #9A9A9D;
color: #9A9A9D;
}
}
}
&:first-child{
@ -796,7 +803,7 @@ export default {
width: 40upx;
height: 22upx;
border-radius: 6upx;
border: 1upx solid $themeColor;
border: 1px solid $themeColor;
margin-bottom: 8upx;
}
@ -821,6 +828,7 @@ export default {
background-color: #333333;
border-color: #333333;
}
}
}
}

Loading…
Cancel
Save