Browse Source

add status recover

voice
刘嘉炜 4 years ago
parent
commit
07ce9eb98f
  1. 30
      src/pages/write_off/null/null.vue
  2. BIN
      src/static/images/code_null.png
  3. BIN
      src/static/images/scan_null.png
  4. 76
      src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
  5. 3
      src/subpackage/device/js/device_api.js
  6. 6
      src/subpackage/device/pages/order_details/order_details.vue

30
src/pages/write_off/null/null.vue

@ -1,18 +1,35 @@
<template>
<view class="null-container">
<image @click="isScan = !isScan"></image>
<view class="c-tip" v-if="isScan">很抱歉获取不到二维码订单信息</view>
<view class="c-tip" v-else>很抱歉获取不到验证码订单信息</view>
<view class="c-btn">返回</view>
<image mode="aspectFit" :src="imgPath"></image>
<view class="c-tip" v-if="operateType == 'decrypt_text'">很抱歉获取不到二维码订单信息</view>
<view class="c-tip" v-if="operateType == 'verify_code'">很抱歉获取不到验证码订单信息</view>
<view class="c-btn" @click="toBlack">返回</view>
</view>
</template>
<script>
import util from '../../../utils/util';
export default {
computed: {
imgPath(){
let { operateType } = this;
if(operateType == 'verify_code')return '/static/images/code_null.png';
if(operateType == 'decrypt_text')return '/static/images/scan_null.png';
}
},
onLoad(options){
let { type } = options;
this.operateType = options.type
},
data(){
return {
isScan: false
isScan: false,
operateType: '', // verify_code()/decrypt_text()
}
},
methods: {
toBlack(){
util.routeTo();
}
}
}
@ -30,7 +47,6 @@ export default {
margin: 0 auto 86upx;
width: 420upx;
height: 420upx;
background-color: skyblue;
}
.c-tip{
margin-bottom: 260upx;

BIN
src/static/images/code_null.png

After

Width: 380  |  Height: 380  |  Size: 7.7 KiB

BIN
src/static/images/scan_null.png

After

Width: 420  |  Height: 420  |  Size: 11 KiB

76
src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue

@ -46,10 +46,13 @@
<view class="rc-item" v-for="(e,i) in orderInfo.sessions" :key="i">
<view class="ri-tit">验证码{{i+1}}</view>
<view class="ri-section">
<view :class="['rs-view',e.status==1?'rs-active':'']">{{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})</view>
<view :class="['rs-view',e.status==1?'rs-active':'']">
<view>{{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})</view>
<view class="s-btn" v-if="e.status == 2" @click="recoverBtn(e)">恢复</view>
</view>
<block v-if="e.status==2">
<view class="rs-view">核销方式{{zh_verify_type(e.verify_type)}}</view>
<view class="rs-view">核销时间{{e.verify_time || '-'}}</view>
<view class="rs-view"><view>核销方式{{zh_verify_type(e.verify_type)}}</view></view>
<view class="rs-view"><view>核销时间{{e.verify_time || '-'}}</view></view>
</block>
</view>
</view>
@ -277,6 +280,44 @@ export default {
};
},
methods:{
recoverBtn(ele){
console.warn('orderInfo',this.orderInfo);
console.warn('ele', ele);
let { orderInfo } = this;
util.showModal({
title: '提示',
content: '是否确认恢复该验证码为待使用状态',
success: res=> {
if(res.confirm){
util.showLoad();
deviceServer.get({
url: deviceApi.recoveryToSuccess,
data: {
brand_id: orderInfo.brand_id || '',
order_no: orderInfo.order_no || '',
session_id: ele.id || '',
},
isDefaultGet: false
})
.then(e=>{
util.hideLoad();
if(e.data.code == 0){
util.showNone(e.data.message || '操作成功!');
setTimeout(_=>{
this.$emit('recoverBtn');
},1200)
}else{
util.showNone(e.data.message || '操作失败!');
}
})
.catch(util.hideLoad)
}
}
})
},
moveHandle(){},
modalBtn(type){
// type: 1ic 2ic
@ -566,18 +607,39 @@ export default {
justify-content: flex-start;
margin-top: 24rpx;
.ri-tit{
flex-shrink: 0;
color: #9A9A9D;
font-size: 28rpx;
line-height: 46rpx;
}
.ri-section{
flex-grow: 1;
.rs-view{
color: #333333;
font-size: 28rpx;
line-height: 46rpx;
display: flex;
align-items: center;
>view:first-child{
min-width: 0;
color: #333333;
font-size: 28rpx;
line-height: 46rpx;
@include textHide(1);
}
.s-btn{
flex-shrink: 0;
margin-left: 10upx;
padding: 0 22upx;
height: 44upx;
line-height: 44upx;
font-size: 28upx;
border-radius: 10upx;
background-color: $themeColor;
color: #fff;
}
}
.rs-active{
color: #009874;
>view:first-child{
color: #009874;
}
}
}
}

3
src/subpackage/device/js/device_api.js

@ -34,6 +34,9 @@ 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-订单管理-订单计时结束
// 20210521 恢复次卡核销状态
recoveryToSuccess:`${ORIGIN}/admin/stadium/order/recoveryToSuccess`, // 恢复次卡核销状态
}
export default DEVICE_API;

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

@ -2,7 +2,7 @@
<view class="order-details">
<block v-if="optionsQuery.order_type==3">
<reservation-site-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 0"></reservation-site-detail>
<reservation-people-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 1" @okChange="okChange"></reservation-people-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>
</view>
@ -58,6 +58,10 @@
})
},
methods: {
//
peopleRecoverBtn(){
this.okChange(); //
},
getApiUrl(type){
if(type == 1)return deviceApi.timeOrderDetail;
if(type == 3)return deviceApi.reservationDetail;

Loading…
Cancel
Save