Browse Source

Merge branch 'all'

feat-230721
刘嘉炜 3 years ago
parent
commit
92685c42d1
  1. 193
      src/components/end_billing_modal/end_billing_modal.vue
  2. 16
      src/components/site/order_modal/order_modal.vue
  3. 45
      src/components/timing_order/timing_order.vue
  4. 11
      src/js/api.js
  5. 2
      src/js/once_name.js
  6. 24
      src/pages.json
  7. 2
      src/pages/order_list/order_list.vue
  8. 118
      src/pages/site/confirm/confirm.vue
  9. 284
      src/pages/write_off/confirm/confirm.vue
  10. 34
      src/pages/write_off/confirm_order/confirm_order.vue
  11. 187
      src/pages/write_off/events_order/events_order.vue
  12. 219
      src/pages/write_off/list/list.vue
  13. 152
      src/pages/write_off/number_of_people/number_of_people.vue
  14. 21
      src/pages/write_off/operate/operate.vue
  15. 50
      src/pages/write_off/search_result/search_result.vue
  16. 183
      src/pages/write_off/success/success.vue
  17. BIN
      src/static/images/icon/selected_ring.png
  18. BIN
      src/static/images/icon/selected_tag.png
  19. 144
      src/subpackage/device/components/order/timing_detail/timing_detail.vue
  20. 1
      src/subpackage/device/js/device_api.js
  21. 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>

16
src/components/site/order_modal/order_modal.vue

@ -14,6 +14,12 @@
<view class="ov-view">{{ orderInfo.order_no || '' }}</view>
</view>
</view>
<view class="om-info-line" v-if="orderInfo.is_show_take_up_use_text">
<view class="oil-view">占用用途</view>
<view class="oil-view">
<view class="ov-view">{{ orderInfo.take_up_use_text || '' }}</view>
</view>
</view>
<view class="om-info-line" v-if="orderInfo.type != 'take_up_venue'">
<view class="oil-view">创建时间</view>
<view class="oil-view">
@ -60,6 +66,7 @@
</view>
</block>
<view class="om-take-up-tip" v-if="orderInfo.is_show_back_stage_take_up_tips">{{ orderInfo.back_stage_take_up_tips || '' }}</view>
<view class="om-border"></view>
@ -113,8 +120,7 @@
<view class="om-btns" v-if="orderInfo.type == 'fixed_venue'">
<!-- 测试固定场地没有详情 -->
<view class="ob-view" v-if="orderInfo.pay_status != 0" @click="toOrderInfo">订单详情</view>
<!-- 20220309 测试&PM 直接不要取消订场是吧 -->
<!-- <view class="ob-view red" @click="fixedCancelOccupy" v-if="orderInfo.pay_status!=2&&orderInfo.overdue != true">取消订场</view> -->
<view class="ob-view red" @click="fixedCancelOccupy" v-if="orderInfo.pay_status==0&&orderInfo.overdue != true">取消订场</view>
<!-- <view class="ob-view red">退款</view> -->
</view>
</view>
@ -399,6 +405,12 @@ export default {
height: 2upx;
background-color: #D8D8D8;
}
.om-take-up-tip{
line-height: 34upx;
font-size: 24upx;
color: #EA5061;
@include textHide(1);
}
.om-total{
margin-top: 20upx;
margin-bottom: 40upx;

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{
@ -131,6 +148,22 @@ export default {
}
}
.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{
padding-top: 20upx;

11
src/js/api.js

@ -109,6 +109,16 @@ API['writeOff'] = {
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`, //凌晨自动清零 - 未离场订单数量
// 20220222 新增赛事核销
// matchOrderVerify: `${ORIGIN}/admin/assistant/matchOrder/verify`, // 赛事订单确认核销 /用回之前的核销
matchOrderGateLs: `${ORIGIN}/admin/assistant/matchOrderGate/list`, // 商家助手-赛事订单核销后获取门
matchOrderGateOpen: `${ORIGIN}/admin/assistant/matchOrderGate/open`, // 商家助手-赛事订单核销后-开门
}
@ -116,3 +126,4 @@ export default { ORIGIN, API };

2
src/js/once_name.js

@ -2,7 +2,7 @@
// 避免命名冲突,误触监听器
export const WRITE_OFF_STORE_INFO = 'stadium_list';
export const WRITE_OFF_ORDER_INFO = 'order_info';
export const WRITE_OFF_ORDER_INFO = 'order_info'; // 场地核销确认页/ 年月卡核销确认页/ 赛事核销确认页
export const WRITE_OFF_YM_ORDER_INFO = 'ym_order_info'; // 年月卡订单核销
export const WRITE_OFF_MALL_ORDER_INFO = 'mall_order_info'; // 商城订单核销
export const WRITE_OFF_MALL_ORDER_SUCCESS = 'mall_order_success'; // 商城订单核销成功!

24
src/pages.json

@ -134,6 +134,18 @@
}
},
{
"path": "pages/write_off/success/success",
"style": {
"navigationBarTitleText": "核销订单"
}
},
{
"path": "pages/write_off/events_order/events_order",
"style": {
"navigationBarTitleText": "核销订单"
}
},
{
"path": "pages/write_off/mall/success/success",
"style": {
"navigationBarTitleText": "核销订单"
@ -176,18 +188,6 @@
}
},
{
"path": "pages/write_off/confirm/confirm",
"style": {
"navigationBarTitleText": "确认订单信息"
}
},
{
"path": "pages/write_off/list/list",
"style": {
"navigationBarTitleText": "扫码核销"
}
},
{
"path": "pages/write_off/search_result/search_result",
"style": {
"navigationBarTitleText": "核销查询"

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>

118
src/pages/site/confirm/confirm.vue

@ -39,11 +39,31 @@
</view>
<view class="sc-ipt">
<view class="si-price">
<view class="sp-tit">收取金额</view>
<view class="sp-frame"><input v-model="ocPrice" type="number" /></view>
<view class="si-tit"><text>* </text>收取金额</view>
<view class="sp-frame"><text></text><input v-model="ocPrice" type="number" /></view>
</view>
<view class="si-usage">
<view class="su-line">
<view class="si-tit"><text>* </text>占用用途</view>
<view class="su-ls">
<view :class="[ocUsage == 1 ? 'active' : '']" @click="ocUsage = 1">
<text>客户订场</text>
<image v-if="ocUsage == 1" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image>
</view>
<view :class="[ocUsage == 2 ? 'active' : '']" @click="ocUsage = 2">
<text>散客</text>
<image v-if="ocUsage == 2" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image>
</view>
<view :class="[ocUsage == 3 ? 'active' : '']" @click="ocUsage = 3">
<text>锁场</text>
<image v-if="ocUsage == 3" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image>
</view>
</view>
</view>
<view class="su-tip">占用用途如选择散客用户端次卡列表将会显示该占用场次为散客时间</view>
</view>
<view class="si-reason">
<view class="sr-tit">占用原因</view>
<view class="si-tit">占用原因</view>
<view class="sr-frame">
<textarea placeholder="多行输入…" v-model="ocReaon"></textarea>
</view>
@ -65,6 +85,7 @@ export default {
return {
ocPrice: '',
ocReaon: '',
ocUsage: 1, // 1 -> 2-> 3->
light_up: false,
}
},
@ -88,8 +109,8 @@ export default {
this.light_up = e.detail.value
},
confirmOccupy: util.debounce(function(){
let { storeInfo, dateInfo, venueList, typeInfo } = this.occupyInfo;
let { ocPrice, ocReaon, light_up } = this;
let { storeInfo, dateInfo, venueList, typeInfo} = this.occupyInfo;
let { ocPrice, ocReaon, light_up, ocUsage } = this;
util.showLoad();
servers.post({
url: API.venue.venueTakeUp,
@ -99,12 +120,13 @@ export default {
amount: +ocPrice,
group: storeInfo.id,
date: dateInfo.dateStr,
take_up_use: ocUsage,
items: venueList.map(el=>{
return {
venue_id: el.parentObj.venue_id,
venue_name: el.parentObj.venue_name,
duration: el.durations,
price: el.price
price: el.price,
}
}),
light_up,
@ -248,37 +270,91 @@ export default {
padding-top: 40upx;
padding-bottom: 62upx;
width: 682upx;
.si-tit{
flex-shrink: 0;
margin-right: 28upx;
line-height: 40upx;
font-size: 28upx;
color: #333;
>text{
color: #EA5061;
}
}
.si-price{
margin-bottom: 12upx;
@include centerFlex(flex-start);
.sp-tit{
flex-shrink: 0;
margin-right: 28upx;
line-height: 40upx;
font-size: 28upx;
color: #333;
}
.sp-frame{
padding: 0 20upx;
width: 262upx;
height: 56upx;
width: 434upx;
height: 96upx;
border: 2upx solid #D8D8D8;
border-radius: 10upx;
@include centerFlex(flex-start);
>text{
flex-shrink: 0;
flex-grow: 0;
font-size: 32upx;
line-height: 44upx;
color: #333;
}
>input{
width: 100%;
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #333;
}
}
}
.si-usage{
padding: 24upx 0;
.su-line{
@include centerFlex(flex-start);
.su-ls{
margin-bottom: 20upx;
@include centerFlex(flex-start);
>view{
padding: 0 10upx;
width: 152upx;
height: 72upx;
line-height: 68upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid #D8D8D8;
font-size: 24upx;
color: #9a9a9d;
@include textHide(1);
&:not(:last-child){
margin-right: 20upx;
}
}
.active{
position: relative;
color: $themeColor;
border-color: $themeColor;
>image{
position: absolute;
right: -2upx;
top: -2upx;
width: 36upx;
height: 36upx;
}
}
}
}
.su-tip{
font-size: 24upx;
line-height: 34upx;
color: #9a9a9d;
}
}
.si-reason{
.sr-tit{
margin-bottom: 18upx;
font-size: 28upx;
color: #333;
}
.sr-frame{
margin-top: 20upx;
padding: 20upx 10upx;
width: 682upx;
height: 260upx;

284
src/pages/write_off/confirm/confirm.vue

@ -1,284 +0,0 @@
<template>
<view class="write-off-confirm">
<view class="woc-content">
<view class="wc-info">
<view class="wi-title">{{orderInfo.stadium_name || '-'}}</view>
<view class="wi-detail">
<view class="wd-line">
<view>订单编号</view>
<view>
<view>{{orderInfo.order_no || '-'}}</view>
</view>
</view>
<view class="wd-line">
<view>用户昵称</view>
<view>
<view>{{orderInfo.nickname || '-'}}</view>
</view>
</view>
<view class="wd-line">
<view>支付时间</view>
<view>
<view>{{orderInfo.pay_time || '-'}}</view>
</view>
</view>
<view class="wd-line">
<view>预定日期</view>
<view>
<view>{{ZH_order_date((orderInfo&&orderInfo.date) || '') || '-'}}</view>
</view>
</view>
<view class="wd-line">
<view>预定场次</view>
<view>
<view v-for="e in orderInfo.sessions" :key="e.id">{{e.venue_name + ' ' }} {{ ' '+e.duration}}</view>
</view>
</view>
</view>
</view>
<view class="wi-split-line"></view>
<view class="wi-btns">
<view hover-class="hover-active" @click="confirmVerify">确认核销</view>
<view class="white" hover-class="hover-active" @click="cancelVerify">不核销</view>
</view>
</view>
<view class="woc-fail-modal" v-if="orderInfo == null || orderInfo.pay_status !=1">
<image mode="aspectFit" src="/static/images/icon/write_off_fail.png"></image>
<view>{{errorTip}}</view>
<view hover-class="hover-active" @click="cancelVerify">返回</view>
</view>
</view>
</template>
<script>
import { API } from '../../../js/api'
import { servers } from '../../../js/server'
import util from '../../../utils/util'
export default {
computed: {
ZH_order_date(){
return date => {
if(!date)return '-'
let _date = date.replace(/\-/gi,'/');
return `${util.get_zh_date(_date)} ${util.get_zh_day(_date)}`;
}
},
errorTip(){
// 2使34退
// 使 使
// 退 退
//
//
let { orderInfo } = this;
if(orderInfo&&orderInfo.pay_status == 2)return '该订单已核销使用';
if(orderInfo&&orderInfo.pay_status == 3)return '该订单已失效';
if(orderInfo&&orderInfo.pay_status == 4)return '该订单已退款';
return '很抱歉,获取不到二维码订单信息';
},
},
data(){
return {
orderInfo: {},
}
},
onLoad(options){
console.log(options)
console.log(util.jsonPar(options.query))
this.getOrderInfo(util.jsonPar(options.query));
},
methods: {
confirmVerify: util.debounce(function(){
let { orderInfo } = this;
util.showLoad();
servers.get({
url: API.verifiedOrder,
data: {
brand_id: orderInfo.brand_id,
stadium_id: orderInfo.stadium_id,
verify_code: orderInfo.verify_code
},
isDefaultGet: false
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
util.previousPageFunction({
fnName: 'getOrderList',
query: null,
})
setTimeout(_=>util.routeTo(),1200);
}else{
util.showNone(res.data.message || '操作失败!')
}
})
.catch(util.hideLoad)
},300,300),
cancelVerify(){
util.routeTo();
},
getOrderInfo({
brand_id = '',
stadium_id = '',
verify_code = '',
}){
util.showLoad();
servers.get({
url: API.verifiedOrderInfo,
data: {
brand_id,
stadium_id,
verify_code,
},
isDefaultGet: false
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0)return this.orderInfo = res.data.data;
this.orderInfo = null
util.showNone(res.data.message || '加载失败!');
})
.catch(util.hideLoad)
}
}
}
</script>
<style lang="scss">
@import "../../../style/public.scss";
page{
background-color: $themeColor;
}
.write-off-confirm{
padding-top: 46upx;
}
.woc-content{
width: 702upx;
margin: 0 auto 46upx;
border-radius: 10upx;
background-color: #fff;
.wc-info{
padding: 20upx 40upx 66upx;
.wi-title{
height: 128upx;
line-height: 126upx;
text-align: center;
font-size: 32upx;
font-weight: 500;
color: #1a1a1a;
border-bottom: 2upx solid #D8D8D8;
}
.wi-detail{
padding-top: 34upx;
.wd-line{
display: flex;
view{
font-size: 28upx;
line-height: 60upx;
}
>view{
&:first-child{
flex-shrink: 0;
color: #9C9C9F;
}
&+view{
flex-grow: 1;
>view{
width: 100%;
color: #1A1A1A;
@include textHide(1);
}
}
}
}
}
}
.wi-split-line{
position: relative;
border-top: 2upx dashed #D8D8D8;
&::before{
content: '';
display: block;
position: absolute;
left: -10upx;
top: -11upx;
width: 20upx;
height: 20upx;
border-radius: 50%;
background-color: $themeColor;
}
&::after{
content: '';
display: block;
position: absolute;
right: -10upx;
top: -11upx;
width: 20upx;
height: 20upx;
border-radius: 50%;
background-color: $themeColor;
}
}
.wi-btns{
height: 450upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
>view{
height: 112upx;
width: 622upx;
line-height: 108upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid $themeColor;
font-size: 32upx;
color: #fff;
background-color: $themeColor;
&:first-child{
margin-bottom: 24upx;
}
}
.white{
background-color: #fff;
color: $themeColor;
}
}
}
.woc-fail-modal{
position: fixed;
left: 0;
top: var(--window-top);
right: 0;
bottom: 0;
background-color: #fff;
padding-top: 90upx;
>image{
display: block;
margin: 0 auto 86upx;
width: 420upx;
height: 420upx;
&+view{
margin-bottom: 260upx;
text-align: center;
line-height: 40upx;
font-size: 28upx;
color: #9c9c9f;
}
}
view+view{
margin: 0 auto;
width: 280upx;
height: 92upx;
line-height: 88upx;
text-align: center;
border-radius: 46upx;
border: 2upx solid $themeColor;
font-size: 32upx;
color: $themeColor;
}
}
</style>

34
src/pages/write_off/confirm_order/confirm_order.vue

@ -1,4 +1,5 @@
<template>
<!-- 场地/次卡订单 -->
<view class="confirm-order">
<view class="co-container">
<view class="c-store-name">{{orderInfo.stadium_name || '-'}}</view>
@ -8,7 +9,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 +19,7 @@
</view>
<view class="s-line">
<view>
<text>验证码</text>
<text>验证码 </text>
<view><view>{{ orderInfo.verify_code || '-' }}</view></view>
</view>
</view>
@ -72,6 +73,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 +108,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 +132,7 @@ export default {
console.warn(data)
this.orderInfo = data;
})
},
methods: {
cancelBtn(){
@ -159,6 +183,7 @@ export default {
font-weight: 500;
border-bottom: 2upx solid #D8D8D8;
color: #1A1A1A;
text-align: center;
@include textHide(1);
}
.c-main-section{
@ -183,6 +208,7 @@ export default {
font-size: 28upx;
line-height: 60upx;
color: #9C9C9F;
min-width: 140rpx;
}
&+view{
@ -259,7 +285,7 @@ export default {
font-size: 32upx;
color: $themeColor;
&:first-child{
margin-bottom: 24upx;
margin-bottom: 4upx;
color: #fff;
background-color: $themeColor;
}

187
src/pages/write_off/events_order/events_order.vue

@ -0,0 +1,187 @@
<template>
<view class="events-order">
<view class="eo-main">
<view class="em-info">
<view class="ei-title">{{ orderInfo.stadium_name || '-' }}</view>
<view class="ei-line-box">
<view class="elb-line">
<view class="el-name">订单编号</view>
<view class="el-txt">{{ orderInfo.order_no || '-' }}</view>
<view class="el-tag">(赛事)</view>
</view>
<view class="elb-line">
<view class="el-name">用户昵称</view>
<view class="el-txt">{{ orderInfo.nickname || '-' }}</view>
</view>
<view class="elb-line">
<view class="el-name">验证码</view>
<view class="el-txt">{{ orderInfo.verify_code || '-' }}</view>
</view>
<view class="elb-line">
<view class="el-name">赛事名称</view>
<view class="el-txt">{{ orderInfo.match_name || '-' }}</view>
</view>
<view class="elb-line">
<view class="el-name">赛事类型</view>
<view class="el-txt">{{ orderInfo.match_type || '-' }}</view>
</view>
<view class="elb-line">
<view class="el-name">进场时间</view>
<view class="el-txt">{{ orderInfo.in_time || '-' }}</view>
</view>
</view>
</view>
<view class="em-border"></view>
<view class="em-btn">
<view hover-class="hover-active" @click="confirmWriteOff">确认核销</view>
</view>
</view>
</view>
</template>
<script>
import util from '../../../utils/util';
import { API } from '../../../js/api';
import { servers } from '../../../js/server';
import { WRITE_OFF_ORDER_INFO } from '../../../js/once_name';
export default {
data(){
return {
orderInfo: {},
type: '' // verify_code -> 5: () | decrypt_text -> 6: ()
}
},
onLoad(options){
if(options.type)this.type = options.type || '';
util.$_once(WRITE_OFF_ORDER_INFO, data => {
console.warn(data)
this.orderInfo = data || {};
})
},
methods: {
confirmWriteOff: util.debounce(function(){
let { orderInfo, type } = this;
servers.post({
url: API.writeOff.assistantVerify,
data: {
verify_type: type == 'verify_code'? 5 : 6,
brand_id: orderInfo.brand_id,
stadium_id: orderInfo.stadium_id,
verify_code: orderInfo.verify_code,
},
isDefaultGet: false,
})
.then(res=>{
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
let _query = {
order_no: orderInfo.order_no || '',
brand_id: orderInfo.brand_id || '',
stadium_name: orderInfo.stadium_name || '',
}
setTimeout(_=>util.routeTo(`/pages/write_off/success/success?query=${util.jsonStr(_query)}`, 'rT'), 1200);
// setTimeout(_=>util.routeTo(`/pages/write_off/success/success`, 'nT'), 1200);
}else{
util.showNone(res.data.message || '操作失败!');
}
})
}, 300, true)
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
page{
background-color: $themeColor;
}
.events-order{
padding: 46upx 24upx;
.eo-main{
border-radius: 10upx;
background-color: #fff;
.em-info{
padding: 0 40upx 46upx;
.ei-title{
padding: 30upx 0;
text-align: center;
font-size: 32upx;
font-weight: 500;
line-height: 44upx;
color: #1a1a1a;
border-bottom: 2upx solid #D8D8D8;
}
.ei-line-box{
padding-top: 20upx;
.elb-line{
@include centerFlex(flex-start);
>view{
font-size: 28upx;
line-height: 60upx;
}
.el-name{
flex-shrink: 0;
color: #9c9c9f;
}
.el-txt{
color: #1a1a1a;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.el-tag{
margin-left: 10upx;
color: $themeColor;
flex-shrink: 0;
}
}
}
}
.em-border{
position: relative;
border-bottom: 2upx dashed #d8d8d8;
&::after{
content: '';
position: absolute;
left: -10upx;
top: -10upx;
display: block;
width: 20upx;
height: 20upx;
border-radius: 10upx;
background-color: $themeColor;
}
&::before{
content: '';
position: absolute;
right: -10upx;
top: -10upx;
display: block;
width: 20upx;
height: 20upx;
border-radius: 10upx;
background-color: $themeColor;
}
}
.em-btn{
padding: 60upx 40upx;
>view{
height: 112upx;
line-height: 112upx;
text-align: center;
font-size: 32upx;
border-radius: 10upx;
color: #fff;
background-color: $themeColor;
}
}
}
}
</style>

219
src/pages/write_off/list/list.vue

@ -1,219 +0,0 @@
<template>
<view class="write-off-list">
<view class="wol-btn" hover-class="hover-active" @click="scanCode">
<image mode="aspectFit" src="/static/images/icon/scan_code_btn.png"></image>
</view>
<view class="wol-bar">今日核销订单({{orderList.length || 0}})</view>
<view class="wol-list">
<view class="wl-item" v-for="e in orderList" :key="e.id">
<view class="wi-header">
<view>{{e.stadium_name || '-'}}</view>
<view>{{ZH_status(e.pay_type || '')}}</view>
</view>
<view class="wi-info">
<view class="wi-line">
<view>订单编号</view>
<view>
<view>{{e.order_no || '-'}}</view>
</view>
</view>
<view class="wi-line">
<view>用户昵称</view>
<view>
<view>{{e.nickname || '-'}} </view>
</view>
</view>
<view class="wi-line">
<view>支付时间</view>
<view>
<view>{{e.pay_time || '-'}}</view>
</view>
</view>
<view class="wi-line">
<view> 预定日期</view>
<view>
<view>{{ZH_order_date(e.date || '') || '-'}}</view>
</view>
</view>
<view class="wi-line">
<view>预定场次</view>
<view>
<view v-for="k in e.sessions" :key="k.id">{{k.venue_name+' '}}{{' '+k.duration}} </view>
</view>
</view>
</view>
<view class="wi-total">
<view>核销时间{{e.verify_time || '-'}}</view>
<view>{{e.sessions.length || 0}}场次</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { API } from '../../../js/api';
import { servers } from '../../../js/server';
import util from '../../../utils/util'
export default {
computed: {
ZH_status(){
return status=> (['未支付','待使用','已使用','已失效','已退款'][status] || '-') // [-101使2使34退]
},
ZH_order_date(){
return date => {
if(!date)return '-'
let _date = date.replace(/\-/gi,'/');
return `${util.get_zh_date(_date)} ${util.get_zh_day(_date)}`;
}
},
},
data(){
return {
orderList: []
}
},
onLoad(){
this.getOrderList(true);
},
methods: {
scanCode(){
uni.scanCode({
success: res=>{
let { result } = res;
if(
res.scanType !== 'QR_CODE' ||
result.indexOf('brand_id') == -1 ||
result.indexOf('stadium_id') == -1 ||
result.indexOf('verify_code') == -1
){
return util.showNone('无法识别!');
}
util.routeTo(`/pages/write_off/confirm/confirm?query=${res.result}`,'nT');
},
fail: err=>{
if(err.errMsg&&err.errMsg.indexOf('cancel')!=-1)return;
console.log(err)
util.showNone('扫码失败!')
}
})
},
// confirm
getOrderList(isLoad){
if(isLoad)util.showLoad();
servers.get({
url: API.verifiedOrderList,
data: {
status: 1, // 使
},
failMsg: '获取订单列表失败!'
})
.then(res=>{
if(isLoad)util.hideLoad();
let _list = res.list || [];
this.orderList = _list;
})
.catch(util.hideLoad)
}
}
}
</script>
<style lang="scss" scoped>
@import "../../../style/public.scss";
.write-off-list{
padding-top: 24upx;
.wol-btn{
margin: 0 auto 24upx;
height: 360upx;
width: 702upx;
border-radius: 10upx;
background-color: #fff;
@include centerFlex(center);
>image{
width: 172upx;
height: 172upx;
}
}
.wol-bar{
margin: 0 auto 24upx;
height: 112upx;
width: 702upx;
border-radius: 10upx;
line-height: 112upx;
text-align: center;
font-size: 32upx;
font-weight: 500;
color: #1a1a1a;
background-color: #fff;
}
.wol-list{
padding: 0 24upx;
.wl-item{
margin-bottom: 24upx;
>view{
padding: 0 20upx;
background-color: #fff;
}
.wi-header{
height: 96upx;
border-bottom: 2upx solid #D8D8D8;
border-radius: 10upx 10upx 0 0;
@include centerFlex(space-between);
>view{
&:first-child{
flex-grow: 1;
line-height: 40upx;
font-size: 28upx;
color: #1a1a1a;
@include textHide(1);
}
&+view{
flex-shrink: 0;
margin-left: 20upx;
line-height: 40upx;
font-size: 28upx;
color: #9c9c9f;
}
}
}
.wi-info{
padding: 20upx;
border-bottom: 2upx solid #D8D8D8;
.wi-line{
display: flex;
view{
margin-bottom: 6upx;
line-height: 34upx;
font-size: 24upx;
color: #9c9c9f;
&:first-child{
flex-shrink: 0;
}
&+view{
flex-grow: 1;
>view{
@include textHide(1);
}
}
}
}
}
.wi-total{
height: 90upx;
border-radius: 0 0 10upx 10upx;
@include centerFlex(space-between);
>view{
font-size: 24upx;
color: #1a1a1a;
}
}
}
}
}
</style>

152
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,6 +86,9 @@ export default {
peopleInfo: {},
dateStr: '-',
changeNum: '',
isNotLeave: false,
orderNum: {}, //
}
},
onLoad(options){
@ -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;
}
}
}
}
}

21
src/pages/write_off/operate/operate.vue

@ -111,11 +111,6 @@ export default {
let { iptCode } = this;
if(!iptCode)return util.showNone('请输入核销码!');
this.analysisOrder({ verify_code: this.iptCode });
return
let _timeSta = new Date().getTime();
if(_timeSta%3 == 0)return util.routeTo(`/pages/write_off/confirm_order/confirm_order`, 'nT');
if(_timeSta%2 < 1)return util.routeTo(`/pages/write_off/null/null`, 'nT');
return util.routeTo(`/pages/write_off/confirm_order/confirm_order`, 'nT');
}, 300, true),
@ -139,9 +134,11 @@ export default {
writeOffType == 'site'&&(_query['decrypt_text'] = decrypt_text);
writeOffType == 'mall'&&(_query['vcode'] = decrypt_text);
}
if(writeOffType == 'site')return this.siteGet({ query: _query, vType: _vType, });
if(writeOffType == 'mall')return this.mallGet({ query: _query, vType: _vType, });
},
//
mallGet({ query = {}, vType = '', }){
util.showLoad();
@ -168,7 +165,10 @@ export default {
})
.catch(util.hideLoad)
},
// /
// / /
// @vType verify_code()/ decrypt_text()
siteGet({ query = {}, vType = '', }){
util.showLoad();
servers.get({
@ -181,11 +181,20 @@ export default {
if(res.data.code == 0){
let _data = res.data.data || {}
//
if(_data.extension&&_data.extension.verify_order_type === 'monthly_card'){
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data});
util.routeTo(`/pages/write_off/ym_confirm/ym_confirm?type=${vType}`, 'nT');
return
}
//
if(_data.extension&&_data.extension.verify_order_type === 'match_order'){
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data});
util.routeTo(`/pages/write_off/events_order/events_order?type=${vType}`, 'nT');
return
}
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data});
util.routeTo(`/pages/write_off/confirm_order/confirm_order?type=${vType}`, 'nT');
}else{

50
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;
@ -272,6 +301,19 @@ export default {
}
}
.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{

183
src/pages/write_off/success/success.vue

@ -0,0 +1,183 @@
<template>
<view class="write-off-success">
<view class="wos-stadium">
<view class="ws-name">{{ optionsQuery.stadium_name || '-' }}</view>
</view>
<view class="wos-main">
<image class="wm-icon" mode="aspectFit" src="/static/images/icon/success_tip.png"></image>
<view class="wm-txt">核销成功</view>
<view class="wm-btn" hover-class="hover-active" @click="toBack">返回继续核销</view>
</view>
<view class="wos-gate-ls" v-if="gateLs&&gateLs.length">
<view class="wgl-tit">如需开门请点击</view>
<view class="wgl-ls">
<view class="wl-item" v-for="(e, i) in gateLs" :key="i">
<view class="wi-name">{{ e.hardware_name || '-' }}</view>
<view class="wi-btn" hover-class="hover-active" @click="openGate(e)">开门</view>
</view>
</view>
</view>
</view>
</template>
<script>
import util from '../../../utils/util';
import { API } from '../../../js/api';
import { servers } from '../../../js/server';
export default {
data(){
return {
gateLs: [],
optionsQuery: {
stadium_name: '',
brand_id: '',
order_no: ''
}
}
},
onLoad(options){
let _query = {};
try{
_query = util.jsonPar(options.query);
console.warn('_query======》', _query)
this.optionsQuery = _query || {};
}catch(err){
console.error('json err--->', err)
}
this.getGateLs({
order_no: _query.order_no || '',
brand_id: _query.brand_id || '',
});
},
methods: {
openGate: util.debounce(function(e){
let { optionsQuery } = this;
util.showLoad();
servers.post({
url: API.writeOff.matchOrderGateOpen,
data: {
brand_id: optionsQuery.brand_id,
order_no: optionsQuery.order_no,
gate_id: e.id,
},
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!')
}else{
util.showNone(res.data.message || '操作失败!');
}
})
}, 300, true),
getGateLs({
order_no,
brand_id,
}){
util.showLoad();
servers.get({
url: API.writeOff.matchOrderGateLs,
data: {
order_no,
brand_id
},
failMsg: '加载门禁列表失败!'
})
.then(res=>{
util.hideLoad();
let _ls = res.gates || [];
this.gateLs = _ls;
console.warn(res)
})
},
toBack(){
util.routeTo();
}
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
page{
background-color: #fff;
}
.write-off-success{
.wos-stadium{
padding: 0 24upx;
.ws-name{
padding: 40upx 0 30upx;
font-size: 32upx;
font-weight: 500;
color: #1a1a1a;
border-bottom: 2upx solid #D8D8D8;
@include textHide(1);
}
}
.wos-main{
padding: 134upx 64upx 124upx;
.wm-icon{
display: block;
margin: 0 auto 46upx;
width: 100upx;
height: 100upx;
}
.wm-txt{
margin-bottom: 90upx;
text-align: center;
line-height: 66upx;
font-size: 48upx;
font-weight: 500;
color: #333;
}
.wm-btn{
line-height: 108upx;
height: 112upx;
text-align: center;
font-size: 32upx;
border-radius: 10upx;
border: 2upx solid $themeColor;
color: $themeColor;
}
}
.wos-gate-ls{
padding: 0 24upx;
border-top: 24upx solid #f2f1f6;
.wgl-tit{
padding: 30upx 0;
line-height: 40upx;
font-size: 28upx;
color: #9c9c9f;
border-bottom: 2upx solid #D8D8D8;
}
.wgl-ls{
.wl-item{
height: 126upx;
border-bottom: 2upx solid #D8D8D8;
@include centerFlex(space-between);
.wi-name{
flex-grow: 1;
font-size: 28upx;
color: #333;
@include textHide(1);
}
.wi-btn{
margin-left: 24upx;
line-height: 68upx;
text-align: center;
flex-shrink: 0;
width: 156upx;
color: #fff;
border-radius: 10upx;
background-color: $themeColor;
}
}
}
}
}
</style>

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

After

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

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

After

Width: 72  |  Height: 72  |  Size: 856 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