Browse Source

tapd 1000742&1000745

organize
郑锦全 3 years ago
parent
commit
39c74bb3e5
  1. 193
      src/components/end_billing_modal/end_billing_modal.vue
  2. 45
      src/components/timing_order/timing_order.vue
  3. 5
      src/js/api.js
  4. 2
      src/pages/order_list/order_list.vue
  5. 33
      src/pages/write_off/confirm_order/confirm_order.vue
  6. 154
      src/pages/write_off/number_of_people/number_of_people.vue
  7. 52
      src/pages/write_off/search_result/search_result.vue
  8. BIN
      src/static/images/icon/selected_ring.png
  9. 144
      src/subpackage/device/components/order/timing_detail/timing_detail.vue
  10. 1
      src/subpackage/device/js/device_api.js
  11. 34
      src/subpackage/device/pages/order_details/order_details.vue

193
src/components/end_billing_modal/end_billing_modal.vue

@ -0,0 +1,193 @@
<template>
<!-- 弹框 结束计费 -->
<view class="ox-dark-mask" @touchmove.stop.prevent="moveHandle" @click.stop="">
<view class="odm-end-modal" >
<view class="oem-close">
<image src="/static/images/icon/x_close.png" @click="closeChange"></image>
</view>
<view class="oem-tit">结束计费</view>
<view class="oem-line">操作人{{orderInfo.end_bill_operator_name || '-'}}</view>
<view class="oem-line">时长合计<text class="ol-txt1">{{orderInfo.extension.duration || '-'}}</text></view>
<view class="oem-line">金额合计<text class="ol-txt2">¥{{orderInfo.amount || 0}}</text></view>
<view class="oem-box">
<view @click="selectBtn(1)">
<image :class="[selectType==1?'ob-img':'']" :src="selectType==1?'/static/images/icon/selected_ring.png':''"></image>
<view :class="[selectType==1?'ov-active':'']">停止计时</view>
</view>
<view @click="selectBtn(2)">
<image :class="[selectType==2?'ob-img':'']" :src="selectType==2?'/static/images/icon/selected_ring.png':''"></image>
<view :class="[selectType==2?'ov-active':'']">完结订单</view>
</view>
</view>
<view class="oem-tips">*<text>请输入金额</text></view>
<view class="oem-ipt"><input type="digit" v-model="input_amount"/></view>
<view class="oem-btn" hover-class="hover-active" @click="confirmChange" >确认</view>
</view>
</view>
</template>
<script>
import util from '@/utils/util';
import deviceApi from '../../subpackage/device/js/device_api.js';
import deviceServer from '../../subpackage/device/js/device_server.js';
import { mapState } from 'vuex';
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
...mapState(['brandInfo']),
},
data() {
return {
input_amount: "",
selectType: 1, //1() 2()
}
},
methods: {
moveHandle(){},
closeChange(){
this.$emit('close');
},
confirmChange(){
let { brandInfo, orderInfo, input_amount, selectType } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
end_type: selectType==1?'end_timing':selectType==2?'end_order':'',
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.$emit('close');
// setTimeout(()=>uni.navigateBack(),1200);
this.$emit('timeEndBtn');
})
},
selectBtn(type){
this.selectType = type
},
},
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.odm-end-modal{
position: absolute;
left: 65rpx;
top: 12%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 60rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.oem-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.oem-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 34rpx;
}
.oem-line{
width: 456rpx;
color: #333;
font-size: 28rpx;
line-height: 48rpx;
.ol-txt1{
color: #009874;
}
.ol-txt2{
color: #FF873D;
}
}
.oem-box{
margin: 58rpx 0 48rpx;
width: 456rpx;
@include centerFlex(space-between);
>view{
@include centerFlex(flex-start);
>image{
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #D8D8D8;
&.ob-img{
width: 32rpx;
height: 32rpx;
border: 0rpx solid #D8D8D8;
}
}
>view{
margin-left: 12rpx;
font-size: 28rpx;
line-height: 48rpx;
color: #9C9C9F;
&.ov-active{
color: #1A1A1A;
}
}
}
}
.oem-tips{
width: 456rpx;
margin: 0rpx 0rpx 8rpx;
color: #EA5061;
font-size: 28rpx;
>text{
color: #333333;
}
}
.oem-ipt{
width: 456rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
& input {
flex-grow: 1;
height: 88rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
}
.oem-btn{
width: 240rpx;
height: 88rpx;
margin-top: 60rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
</style>

45
src/components/timing_order/timing_order.vue

@ -12,7 +12,7 @@
</view>
<image class="rl-image" src="/static/images/icon/arrow_b2.png"></image>
</view>
<!-- 次有 人次没有 order_type: 1 2人次 -->
<!-- 时有 人时没有 order_type: 1 2人时 -->
<view class="rs-line" v-if="orderInfo.order_type == 1">
<view class="rl-view">项目</view>
<view class="rl-view">
@ -25,16 +25,29 @@
<view :class="[ 'rv-view', orderInfo.pay_status == 0?'rv-active':'' ]">{{ orderInfo.extension.duration || '-'}}</view>
</view>
</view>
<view class="rs-btn" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==false"><view @click.stop="isEndBill=true">结束计费</view></view>
</view>
<view class="ro-bot" v-if="orderInfo.pay_status != 0">
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.pay_amount || 0}}</text></view>
</view>
<!-- 结束计费弹框 -->
<end-billing-modal
v-if="isEndBill==true"
@close="isEndBill=false"
@timeEndBtn="timeEndBtn"
:orderInfo="orderInfo"
></end-billing-modal>
</view>
</template>
<script>
import util from '@/utils/util';
import end_billing_modal from '../end_billing_modal/end_billing_modal.vue';
export default {
components: {
'end-billing-modal': end_billing_modal,
},
props: {
orderInfo: {
type: Object,
@ -44,23 +57,24 @@ export default {
computed: {
zh_order_status(){
// 01
let { orderInfo } = this
return status =>{
const _obj = {
'0': '计费中',
'0': orderInfo.early_end_timing==true?'待支付':'计费中',
'1': '已完成',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
}
},
},
data() {
return {
isEndBill: false,
}
},
methods:{
toOrderDetails(){
console.log("点击了吗")
let { orderInfo } = this
let _query = {}
_query["stadium_id"] = orderInfo.stadium_id
@ -68,7 +82,10 @@ export default {
_query["order_type"] = 1
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
// this.$emit('orderDetailChange');
}
},
timeEndBtn(){
this.$emit('refreshList');
},
}
}
@ -103,7 +120,7 @@ export default {
}
}
.ro-section{
padding-bottom: 20upx;
padding-bottom: 30upx;
.rs-line{
display: flex;
.rl-view,.rv-view{
@ -130,6 +147,22 @@ export default {
height: 32rpx;
}
}
.rs-btn{
margin-top: 8rpx;
@include centerFlex(flex-end);
>view{
width: 192rpx;
height: 80rpx;
border: 2rpx solid #009874;
border-radius: 10rpx;
color: #009874;
font-size: 32rpx;
font-weight: 500;
text-align: center;
line-height: 80rpx;
}
}
}
.ro-bot{

5
src/js/api.js

@ -108,6 +108,11 @@ API['writeOff'] = {
shop2WriteoffSet: `${ORIGIN}/admin/assistant/shop2/writeoffSet`, // 商城订单核销 - 确认核销
timingNumber: `${ORIGIN}/stadium/person/timing/number`, // 现场人数
setStadiumPresentNumber: `${ORIGIN}/admin/stadium/setStadiumPresentNumber`, // 商家助手散客人数校正
// 20220208 散客现场人数恢复凌晨清零功能+计时订单优化
leaveVerifyOrder:`${ORIGIN}/admin/stadium/order/leaveVerifyOrder`, //核销记录列表 - 手动离场
timingOpen:`${ORIGIN}/stadium/person/timing/open`, //凌晨自动清零【开/关】
notLeavingNums:`${ORIGIN}/stadium/person/timing/notLeavingNums`, //凌晨自动清零 - 未离场订单数量
}

2
src/pages/order_list/order_list.vue

@ -50,7 +50,7 @@
<reservation-order :order-info="e" v-if="orderType == 3"></reservation-order>
<membership-order :order-info="e" v-if="orderType == 4"></membership-order>
<integral-order :order-info="e" v-if="orderType == 5"></integral-order>
<timing-order :order-info="e" v-if="orderType == 1"></timing-order>
<timing-order :order-info="e" @refreshList="refreshList" v-if="orderType == 1"></timing-order>
<organize-order :order-info="e" v-if="orderType == 10" @refreshList="refreshList"></organize-order>
<curriculum :order-info="e" v-if="orderType == 12"></curriculum>

33
src/pages/write_off/confirm_order/confirm_order.vue

@ -8,7 +8,7 @@
<text>订单编号</text>
<view><view>{{ orderInfo.order_no || '-' }}</view></view>
</view>
<view>{{orderInfo.order_type == 0?'(租场)':orderInfo.order_type == 1?'(次卡)':''}}</view>
<view>{{orderInfo.order_type == 0?'(租场)':orderInfo.order_type == 1?'(次卡)':orderInfo.extension.verify_order_type=='match_order'?'(赛事)':''}}</view>
</view>
<view class="s-line">
<view>
@ -18,7 +18,7 @@
</view>
<view class="s-line">
<view>
<text>验证码</text>
<text>验证码 </text>
<view><view>{{ orderInfo.verify_code || '-' }}</view></view>
</view>
</view>
@ -72,6 +72,28 @@
</view>
</view>
</block>
<!-- 赛事 -->
<block v-if="orderInfo.extension.verify_order_type=='match_order'">
<view class="s-line">
<view>
<text>赛事名称</text>
<view><view>{{ orderInfo.match_name || '-' }}</view></view>
</view>
</view>
<view class="s-line">
<view>
<text>赛事类型</text>
<view><view>{{ orderInfo.match_type || '-' }}</view></view>
</view>
</view>
<view class="s-line">
<view>
<text>进场时间</text>
<view><view>{{ orderInfo.in_time || '-' }}</view></view>
</view>
</view>
</block>
</view>
<!-- <view class="c-more-ticket">
<view class="mt-tip">该次卡订单有多张票请选择验证码核销多选</view>
@ -85,7 +107,7 @@
<view class="c-dotted-line"></view>
<view class="c-btns">
<view @click="writeOffBtn">确认核销</view>
<view @click="cancelBtn">不核销</view>
<!-- <view @click="cancelBtn">不核销</view> -->
</view>
</view>
</view>
@ -109,6 +131,7 @@ export default {
console.warn(data)
this.orderInfo = data;
})
},
methods: {
cancelBtn(){
@ -159,6 +182,7 @@ export default {
font-weight: 500;
border-bottom: 2upx solid #D8D8D8;
color: #1A1A1A;
text-align: center;
@include textHide(1);
}
.c-main-section{
@ -183,6 +207,7 @@ export default {
font-size: 28upx;
line-height: 60upx;
color: #9C9C9F;
min-width: 140rpx;
}
&+view{
@ -259,7 +284,7 @@ export default {
font-size: 32upx;
color: $themeColor;
&:first-child{
margin-bottom: 24upx;
margin-bottom: 4upx;
color: #fff;
background-color: $themeColor;
}

154
src/pages/write_off/number_of_people/number_of_people.vue

@ -15,9 +15,16 @@
<image mode="aspectFit" src="/static/images/countdown_bg.png"></image>
<view class="nn-txt-num">{{peopleInfo.present_person_number || 0}}</view>
</view>
<view class="nm-txt" @click="checkNotLeave">查看未离场订单</view>
<view class="nm-btn" @click="isChangeNum = true">修改人数</view>
<view class="nm-line">
<view class="nl-txt">凌晨自动清零</view>
<view class="nl-switch" @click="switchChange">
<switch color="#009777" disabled style="transform:scale(0.8)" :checked="peopleInfo. present_person_number_clear"></switch>
</view>
</view>
<view class="nm-tip">
<text>温馨提示\n\r修改现场人数可能会影 响现场灯光开关请谨慎操作 如后台有开启散客开关灯功能的则散客人数达到阶梯最低X人时对应灯光会自动开灯;少于X人的已开启的灯会自动关闭</text>
<text>* 不开启凌晨自动清零则现场灯光按现场散客人数去判断是否开启或关闭修改人数会直接影响现场灯光开关\n\r* 开启凌晨自动清零则现场灯光按散客订单未离场数量去判断是否开启或关闭修改人数不会影响现场灯光开关但如有散客订单一直未扫码离场可能会无法关灯需要将未离场的散客订单设置为已离场后才可关闭灯光</text>
</view>
</view>
<view class="ox-dark-mask" v-if="isChangeNum">
@ -37,6 +44,25 @@
</view>
</view>
</view>
<view class="ox-dark-mask" v-if="isNotLeave">
<view class="nop-modifies-modal">
<image class="nmm-close" @click="isNotLeave = false" src="/static/images/icon/x_close.png"></image>
<view class="nmm-tit nmm-btm">未离场订单</view>
<view class="nmm-line" v-if="orderNum.person_number>0">
<view>次卡未离场{{orderNum.person_number || 0}}</view>
<view @click="checkBtn(0)">查看</view>
</view>
<view class="nmm-line" v-if="orderNum.person_timing>0">
<view>计时未离场{{orderNum.person_timing || 0}}</view>
<view @click="checkBtn(1)">查看</view>
</view>
<view class="nmm-line">
<view>年月卡未离场{{orderNum.monthly_card||0}}</view>
<view @click="checkBtn(0)">查看</view>
</view>
</view>
</view>
</view>
</template>
@ -60,13 +86,16 @@ export default {
peopleInfo: {},
dateStr: '-',
changeNum: '',
isNotLeave: false,
orderNum: {}, //
}
},
onLoad(options){
this.initStore();
this.dateStr = util.formatDate({ partition: 'zh' }) || '-';
},
onUnload(){
this.clearTime();
},
@ -83,7 +112,7 @@ export default {
servers.get({
url: API.writeOff.setStadiumPresentNumber,
data: {
brand_id: curStadium.curStadium,
brand_id: curStadium.brand_id,
stadium_id: curStadium.id,
number: +num,
},
@ -187,7 +216,64 @@ export default {
.then(res=>{
this.peopleInfo = res
})
}
},
// -
checkNotLeave(){
let { curStadium } = this;
util.showLoad();
servers.get({
url: API.writeOff.notLeavingNums,
data: {
brand_id: curStadium.brand_id,
stadium_id: curStadium.id,
},
// isDefaultGet: false,
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad();
this.orderNum = res
this.$nextTick(_=>{
this.isNotLeave = true
})
})
},
checkBtn(type){
if(type == 0)return util.routeTo(`/pages/write_off/search_result/search_result`, 'nT');
if(type == 1)return util.routeTo(`/pages/order_list/order_list?order_type=1`, 'nT');
},
switchChange(){
let { peopleInfo, curStadium } = this
this.$nextTick(_=>{
util.showModal({
title: '提示',
content: peopleInfo.present_person_number_clear==false?'是否确认开启凌晨自动清零?':peopleInfo.present_person_number_clear==true?'是否确认关闭凌晨自动清零?':'',
showCancel: true,
success: modalRes=>{
if(modalRes.confirm){
util.showLoad();
servers.get({
url: API.writeOff.timingOpen, ///
data: {
brand_id: curStadium.brand_id,
stadium_id: curStadium.id,
status: peopleInfo.present_person_number_clear==false?1:peopleInfo.present_person_number_clear==true?0:'',
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad();
util.showNone('操作成功!');
})
}
}
})
})
},
}
}
</script>
@ -223,22 +309,22 @@ export default {
}
}
.nop-main{
padding: 8upx 30upx 0;
padding: 8upx 0upx 0;
.nm-date{
margin-bottom: 86upx;
margin: 0 24rpx 86rpx;
line-height: 44upx;
font-size: 32upx;
color: #1a1a1a;
}
.nm-tit{
margin-bottom: 48upx;
margin: 0 30rpx 16rpx;
text-align: center;
font-size: 32upx;
font-weight: 500;
}
.nm-num{
position: relative;
margin: 0 auto 100upx;
margin: 0 auto;
display: block;
width: 400upx;
height: 400upx;
@ -267,8 +353,16 @@ export default {
100% {transform: rotate(0deg);}
}
}
.nm-txt{
margin: 10rpx auto 42rpx;
color: #9C9C9F;
font-size: 28rpx;
text-align: center;
line-height: 40rpx;
text-decoration: underline;
}
.nm-btn{
margin: 0 auto 106upx;
margin: 0 auto;
width: 618upx;
line-height: 112upx;
height: 112upx;
@ -278,8 +372,24 @@ export default {
color: #fff;
background-color: $themeColor;
}
.nm-line{
margin: 46rpx 0 0;
padding: 34rpx 28rpx 20rpx 34rpx;
border-top: 2rpx solid #F2F2F7;
@include centerFlex(space-between);
.nl-txt{
color: #1A1A1A;
font-size: 32rpx;
line-height: 44rpx;
}
.nl-switch{
flex-shrink: 0;
flex-grow: 0;
}
}
.nm-tip{
margin-bottom: 30upx;
margin: 0 32rpx 30rpx 34rpx;
font-size: 28upx;
line-height: 52upx;
color: #9C9C9F;
@ -356,6 +466,30 @@ export default {
}
}
}
.nmm-btm{
margin-bottom: 8rpx;
}
.nmm-line{
margin: 78rpx 70rpx 0 74rpx;
@include centerFlex(space-between);
>view{
&:first-child{
color: #1A1A1A;
font-size: 28rpx;
line-height: 48rpx;
}
&:nth-child(2){
width: 156rpx;
height: 68rpx;
border: 2rpx solid #009874;
border-radius: 10rpx;
color: #009874;
font-size: 32rpx;
line-height: 64rpx;
text-align: center;
}
}
}
}
}

52
src/pages/write_off/search_result/search_result.vue

@ -27,10 +27,10 @@
<view>{{ e.type || '-' }}</view>
</view>
<view>
<view>用户昵称{{ e.extension.nickname || '-' }}</view>
<view>用户信息{{ e.extension.user_phone || '-' }}{{ e.extension.nickname || '-' }}</view>
</view>
<view>
<view>核销码 {{ e.verify_code || '-' }}</view>
<view>核销码&#12288;{{e.verify_code || '-' }}</view>
</view>
<view>
<view>验证方式{{ e.desc || '-' }}</view>
@ -39,9 +39,10 @@
<view>核销时间{{ e.verify_time || '-'}}</view>
</view>
<view>
<view>离场时间{{ e.verify_leave_time || '未扫码离场'}}</view>
<view>离场时间{{ e.verify_leave_time || ''}}</view>
</view>
</view>
<view class="i-btn" v-if="e.verify_leave_time==''" @click="leaveBtn(e)">手动离场</view>
</view>
</view>
<view class="r-bottom-btn"><view @click="toOperate">核销订单</view></view>
@ -162,7 +163,34 @@ export default {
let _list = res.list || [];
return _list
})
}
},
leaveBtn(item){
let { curStadium } = this;
util.showModal({
title: '提示',
content: '是否确认手动离场?',
showCancel: true,
success: modalRes=>{
if(modalRes.confirm){
util.showLoad();
servers.get({
url: API.writeOff.leaveVerifyOrder,
data: {
brand_id: curStadium.brand_id,
id: item.id,
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad();
util.showNone('操作成功!');
this.refreshList()
})
}
}
})
},
}
}
</script>
@ -241,6 +269,7 @@ export default {
.r-order-list{
padding: 0 24upx;
.l-item{
position: relative;
margin-bottom: 24upx;
padding: 0 20upx;
border-radius: 10upx;
@ -269,9 +298,22 @@ export default {
color: $themeColor;
}
}
}
}
.i-btn{
position: absolute;
right: 20rpx;
bottom: 32rpx;
background-color: #009874;
border-radius: 10rpx;
width: 156rpx;
height: 68rpx;
color: #FFFFFF;
font-size: 28rpx;
text-align: center;
line-height: 68rpx;
}
}
}
.r-bottom-btn{

BIN
src/static/images/icon/selected_ring.png

After

Width: 32  |  Height: 32  |  Size: 503 B

144
src/subpackage/device/components/order/timing_detail/timing_detail.vue

@ -26,7 +26,7 @@
<view v-if="orderInfo.pay_status != 0">离场时间<text>{{orderInfo.end_time || '-'}}</text></view>
<view>时长合计<text>{{orderInfo.extension.duration || '-'}}</text></view>
</view>
<view class="tb-section" v-if="orderInfo.pay_status!= 0">
<view class="tb-section" v-if="!(orderInfo.pay_status== 0&&orderInfo.early_end_timing==false)">
<view class="ts-line">
<view>金额小计</view>
<view>¥{{orderInfo.amount || 0}}</view>
@ -53,26 +53,30 @@
<view class="tb-line">
<view>支付方式<text>{{zh_pay_type(orderInfo.pay_type)}}</text></view>
<view>支付时间<text>{{orderInfo.pay_time || '-'}}</text></view>
<view>微信交易号<text>{{orderInfo.trade_no || ''}}</text></view>
<view v-if="orderInfo.pay_type==0">微信交易号<text>{{orderInfo.trade_no || ''}}</text></view>
<view v-if="orderInfo.pay_type==3">操作人<text>{{orderInfo.end_bill_operator_name || ''}}</text></view>
</view>
</view>
<view class="td-btn" @click="isShowEnd = !isShowEnd" v-if="orderInfo.pay_status == 0">结束计费</view>
<!-- 弹框 结束计费 -->
<view class="ox-dark-mask" v-if="isShowEnd" @touchmove.stop.prevent="moveHandle">
<view class="odm-end-modal">
<view class="oem-close">
<image src="/static/images/icon/x_close.png" @click="isShowEnd = false"></image>
</view>
<view class="oem-tit">结束计费</view>
<view class="oem-line">操作人{{orderInfo.end_bill_operator_name || '-'}}</view>
<view class="oem-line">时长合计<text class="ol-txt1">{{orderInfo.extension.duration || '-'}}</text></view>
<view class="oem-line">金额合计<text class="ol-txt2">¥{{orderInfo.amount || '-'}}</text></view>
<view class="oem-tips">*<text>请输入金额</text></view>
<view class="oem-ipt"><input type="digit" v-model="input_amount"/></view>
<view class="oem-btn" hover-class="hover-active" @click="confirmChange" >确认</view>
<view class="td-box" v-if="orderInfo.pay_status == 4">
<view class="tb-title">退款信息</view>
<view class="tb-line">
<view>退款原因<text>{{orderInfo.refund_reason || '-'}}</text></view>
<view>退款时间<text>{{orderInfo.refund_time || '-'}}</text></view>
<view>退款单号<text>{{orderInfo.refund_no || '-'}}</text></view>
</view>
</view>
<view class="td-btn" @click="isEndBill = true" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==false">结束计费</view>
<view class="td-btn" @click="completeBtn" v-if="orderInfo.pay_status == 0&&orderInfo.early_end_timing==true">完结订单</view>
<!-- 结束计费弹框 -->
<end-billing-modal
v-if="isEndBill==true"
@close="isEndBill=false"
@timeEndBtn="timeEndBtn"
:orderInfo="orderInfo"
></end-billing-modal>
</view>
</template>
@ -81,7 +85,11 @@ import util from '@/utils/util';
import deviceServer from '../../../js/device_server';
import deviceApi from '../../../js/device_api';
import { mapState } from 'vuex';
import end_billing_modal from '../../../../../components/end_billing_modal/end_billing_modal.vue';
export default {
components: {
'end-billing-modal': end_billing_modal,
},
props: {
orderInfo: {
type: Object,
@ -92,9 +100,10 @@ export default {
...mapState(['brandInfo']),
zh_order_status(){
// 01
let { orderInfo } = this
return status =>{
const _obj = {
'0': '计费中',
'0': orderInfo.early_end_timing==true?'待支付':'计费中',
'1': '已完成',
'4': '已退款',
}
@ -116,30 +125,16 @@ export default {
},
data() {
return {
isShowEnd: false,
input_amount: "",
isEndBill: false,
}
},
methods: {
confirmChange(){
let { brandInfo, orderInfo, input_amount } = this
if(input_amount == '')return util.showNone('请输入金额!');
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderEnd,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
pay_amount: parseFloat(input_amount),
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
this.isShowEnd = false
setTimeout(()=>uni.navigateBack(),1200);
})
completeBtn(){
this.$emit('completeBtn');
},
timeEndBtn(){
this.$emit('refreshPage');
},
}
}
@ -265,77 +260,6 @@ export default {
line-height: 112rpx;
text-align: center;
}
.odm-end-modal{
position: absolute;
left: 65rpx;
top: 12%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.oem-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.oem-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 34rpx;
}
.oem-line{
width: 456rpx;
color: #333;
font-size: 28rpx;
line-height: 48rpx;
.ol-txt1{
color: #009874;
}
.ol-txt2{
color: #FF873D;
}
}
.oem-tips{
width: 456rpx;
margin: 34rpx 0rpx 8rpx;
color: #EA5061;
font-size: 28rpx;
>text{
color: #333333;
}
}
.oem-ipt{
width: 456rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
& input {
flex-grow: 1;
height: 88rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
}
.oem-btn{
width: 240rpx;
height: 88rpx;
margin-top: 60rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
}
</style>

1
src/subpackage/device/js/device_api.js

@ -36,6 +36,7 @@ export const DEVICE_API = {
iccardList:`${ORIGIN}/admin/assistant/iccard/list`, //k-ic卡列表
timeOrderDetail:`${ORIGIN}/admin/assistant/timeOrder/detail`, //k-订单管理-计时订单详情
timeOrderEnd:`${ORIGIN}/admin/assistant/timeOrder/end`, //k-订单管理-订单计时结束
timeOrderComplete:`${ORIGIN}/admin/assistant/timeOrder/complete`, //【20220208】k-订单管理-计时订单完结
// 20210521 恢复次卡核销状态
recoveryToSuccess:`${ORIGIN}/admin/stadium/order/recoveryToSuccess`, // 恢复次卡核销状态

34
src/subpackage/device/pages/order_details/order_details.vue

@ -5,7 +5,7 @@
<reservation-site-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 0" @refundbtn='refundBtn' ></reservation-site-detail>
<reservation-people-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 1" @recoverBtn="peopleRecoverBtn" @okChange="okChange"></reservation-people-detail>
</block>
<timing-detail :orderInfo="pageInfo" v-if="optionsQuery.order_type==1"></timing-detail>
<timing-detail :orderInfo="pageInfo" @completeBtn="completeBtn" @refreshPage="refreshPage" v-if="optionsQuery.order_type==1"></timing-detail>
<organize-detail :orderInfo="pageInfo" v-if="optionsQuery.order_type==10"></organize-detail>
<!-- 次卡订场退款弹窗 -->
@ -159,6 +159,38 @@
order_no: optionsQuery.order_no,
})
},
// -
completeBtn(){
let { pageInfo } = this
util.showModal({
title: '提示',
content: '是否确认完结订单?',
showCancel: true,
success: modalRes=>{
if(modalRes.confirm){
util.showLoad();
deviceServer.get({
url: deviceApi.timeOrderComplete, //
data: {
brand_id: pageInfo.brand_id,
order_no: pageInfo.order_no,
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad();
util.showNone('操作成功!');
this.refreshPage()
util.previousPageFunction({
fnName: 'refreshList',
query: { isLoad: false},
});
})
}
}
})
},
}
}
</script>

Loading…
Cancel
Save