Browse Source

fix 使用中 vtest 1.1.0

voice
刘嘉炜 4 years ago
parent
commit
d45e054e99
  1. 5
      src/components/reservation_order/reservation_order.vue
  2. 2
      src/pages.json
  3. 2
      src/pages/order_list/order_list.vue
  4. 9
      src/pages/write_off/confirm_order/confirm_order.vue
  5. 17
      src/pages/write_off/operate/operate.vue
  6. 37
      src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
  7. 36
      src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
  8. 1
      src/subpackage/device/pages/order_details/order_details.vue

5
src/components/reservation_order/reservation_order.vue

@ -2,7 +2,9 @@
<view class="reservation-order" @click="detailChange"> <view class="reservation-order" @click="detailChange">
<view class="ro-header"> <view class="ro-header">
<view class="rh-view">{{orderInfo.stadium_name || '-'}}</view> <view class="rh-view">{{orderInfo.stadium_name || '-'}}</view>
<text :class="[ 'rh-text', orderInfo.pay_status == 1?'rh-active':'', orderInfo.pay_status == 4?'rh-red':'' ]">{{zh_order_status(orderInfo.pay_status)}}</text>
<text
:class="[ 'rh-text', orderInfo.pay_status == 1?'rh-active':'', orderInfo.pay_status == 4?'rh-red':'' ]"
>{{zh_order_status(orderInfo.pay_status)}}</text>
</view> </view>
<view class="ro-section"> <view class="ro-section">
<view class="rs-line"> <view class="rs-line">
@ -108,6 +110,7 @@ export default {
zh_order_status(){ zh_order_status(){
// -101使2使34退 // -101使2使34退
return status =>{ return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = { const _obj = {
'-1': '已作废', '-1': '已作废',
'0': '未支付', '0': '未支付',

2
src/pages.json

@ -13,7 +13,7 @@
{ {
"path": "pages/site/order_list/order_list", "path": "pages/site/order_list/order_list",
"style": { "style": {
"navigationBarTitleText": "我的预约订单列表"
"navigationBarTitleText": "占用场地"
} }
}, },
{ {

2
src/pages/order_list/order_list.vue

@ -11,7 +11,7 @@
</picker> </picker>
</view> </view>
<view class="ol-select-type" v-if="orderType == 10"> <view class="ol-select-type" v-if="orderType == 10">
<view class="" v-for="(oitem,oi) in selectOrderType" :class="oitem.active?'als-active':''" @click="tabTypeChange(oi)">{{oitem.name}}</view>
<view v-for="(oitem,oi) in selectOrderType" :key="oi" :class="oitem.active?'als-active':''" @click="tabTypeChange(oi)">{{oitem.name}}</view>
</view> </view>
<view class="oh-ctrl"> <view class="oh-ctrl">

9
src/pages/write_off/confirm_order/confirm_order.vue

@ -99,10 +99,12 @@ import { WRITE_OFF_ORDER_INFO } from '../../../js/once_name';
export default { export default {
data(){ data(){
return { return {
orderInfo: {}
orderInfo: {},
type: '' // verify_code -> 5: () | decrypt_text -> 6: ()
} }
}, },
onLoad(){
onLoad(options){
if(options.type)this.type = options.type || '';
util.$_once(WRITE_OFF_ORDER_INFO, data => { util.$_once(WRITE_OFF_ORDER_INFO, data => {
console.warn(data) console.warn(data)
this.orderInfo = data; this.orderInfo = data;
@ -113,10 +115,11 @@ export default {
util.routeTo(); util.routeTo();
}, },
writeOffBtn: util.debounce(function(){ writeOffBtn: util.debounce(function(){
let { orderInfo } = this;
let { orderInfo, type } = this;
servers.get({ servers.get({
url: API.writeOff.assistantVerify, url: API.writeOff.assistantVerify,
data: { data: {
verify_type: type == 'verify_code'? 5 : 6,
brand_id: orderInfo.brand_id, brand_id: orderInfo.brand_id,
stadium_id: orderInfo.stadium_id, stadium_id: orderInfo.stadium_id,
verify_code: orderInfo.verify_code, verify_code: orderInfo.verify_code,

17
src/pages/write_off/operate/operate.vue

@ -81,8 +81,16 @@ export default {
brand_id: brandInfo.brand.id, brand_id: brandInfo.brand.id,
stadium_id: curStadium.id, stadium_id: curStadium.id,
} }
if(!!verify_code)_query['verify_code'] = verify_code;
if(!!decrypt_text)_query['decrypt_text'] = decrypt_text;
let type = '';
if(!!verify_code){
_query['verify_code'] = verify_code;
type = 'verify_code';
}
if(!!decrypt_text){
type = 'decrypt_text';
_query['decrypt_text'] = decrypt_text;
}
util.showLoad(); util.showLoad();
servers.get({ servers.get({
url: API.writeOff.enterVerifyOrder, url: API.writeOff.enterVerifyOrder,
@ -94,10 +102,9 @@ export default {
if(res.data.code == 0){ if(res.data.code == 0){
let _data = res.data.data || {} let _data = res.data.data || {}
util.$_emit(WRITE_OFF_ORDER_INFO, {..._data}) util.$_emit(WRITE_OFF_ORDER_INFO, {..._data})
util.routeTo(`/pages/write_off/confirm_order/confirm_order`, 'nT');
util.routeTo(`/pages/write_off/confirm_order/confirm_order?type=${type}`, 'nT');
}else{ }else{
if(!!verify_code)return util.routeTo(`/pages/write_off/null/null?type=${'verify_code'}`, 'nT');
if(!!decrypt_text)return util.routeTo(`/pages/write_off/null/null?type=${'decrypt_text'}`, 'nT');
util.routeTo(`/pages/write_off/null/null?type=${type}`, 'nT');
} }
console.log('订单查询---->', res); console.log('订单查询---->', res);
}) })

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

@ -1,4 +1,5 @@
<template> <template>
<!-- pageInfo.order_type 人次(1) -->
<view class="reservation-people"> <view class="reservation-people">
<view class="rp-head"> <view class="rp-head">
<view class="rh-store"> <view class="rh-store">
@ -48,7 +49,7 @@
<view class="ri-section"> <view class="ri-section">
<view :class="['rs-view',e.status==1?'rs-active':'']"> <view :class="['rs-view',e.status==1?'rs-active':'']">
<view>{{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})</view> <view>{{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})</view>
<view class="s-btn" v-if="e.status == 2" @click="recoverBtn(e)">恢复</view>
<view class="s-btn" v-if="e.is_recovery" @click="recoverBtn(e)">恢复</view>
</view> </view>
<block v-if="e.status==2"> <block v-if="e.status==2">
<view class="rs-view"><view>核销方式{{zh_verify_type(e.verify_type)}}</view></view> <view class="rs-view"><view>核销方式{{zh_verify_type(e.verify_type)}}</view></view>
@ -192,6 +193,7 @@ export default {
zh_pay_status(){ zh_pay_status(){
// 1使2使34退 // 1使2使34退
return status =>{ return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = { const _obj = {
'0': '未付款', '0': '未付款',
'1': '待使用', '1': '待使用',
@ -203,21 +205,36 @@ export default {
} }
}, },
zh_verify_type(){ zh_verify_type(){
// 1/2/3/4 ///
/**
* 20210527 新增核销方式
* verify_type: 核销方式
* 1: 验证码核销(pad)2: 人脸验证(pad)3: 扫码验证(pad)4: 扫码器验证(pad)
* 5: 验证码核销(商家助手)6: 扫码核销(商家助手) 7: 扫码器核销(门闸)
*/
return status =>{ return status =>{
const _obj = {
'0': '未核销',
'1': '核销码核销',
'2': '人脸核销',
'3': '扫码核销',
'4': '商家扫码',
}
return _obj[`${status}`] || '-'
return [
'扫码器核销(门闸)',
'验证码核销(pad)',
'人脸验证(pad)',
'扫码验证(pad)',
'扫码器验证(pad)',
'验证码核销(商家助手)',
'扫码核销(商家助手)',
][status] || '-';
// const _obj = {
// '0': '',
// '1': '',
// '2': '',
// '3': '',
// '4': '',
// }
// return _obj[`${status}`] || '-'
} }
}, },
zh_verify_status(){ zh_verify_status(){
// -1/0/1/2/3/4 //使///退 // -1/0/1/2/3/4 //使///退
return status =>{ return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = { const _obj = {
'-1': '已分享', '-1': '已分享',
'0': '无效', '0': '无效',

36
src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue

@ -1,4 +1,5 @@
<template> <template>
<!-- pageInfo.order_type 场次(0) -->
<view class="reservation-site"> <view class="reservation-site">
<view class="rs-head"> <view class="rs-head">
<view class="rh-store"> <view class="rh-store">
@ -121,6 +122,7 @@ export default {
zh_pay_status(){ zh_pay_status(){
// 1使2使34退 // 1使2使34退
return status =>{ return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = { const _obj = {
'0': '未付款', '0': '未付款',
'1': '待使用', '1': '待使用',
@ -132,16 +134,32 @@ export default {
} }
}, },
zh_verify_type(){ zh_verify_type(){
// 1/2/3/4 ///
/**
* 20210527 新增核销方式
* verify_type: 核销方式
* 1: 验证码核销(pad)2: 人脸验证(pad)3: 扫码验证(pad)4: 扫码器验证(pad)
* 5: 验证码核销(商家助手)6: 扫码核销(商家助手) 7: 扫码器核销(门闸)
*/
return status =>{ return status =>{
const _obj = {
'0': '未核销',
'1': '核销码核销',
'2': '人脸核销',
'3': '扫码核销',
'4': '商家扫码',
}
return _obj[`${status}`] || '-'
return [
'扫码器核销(门闸)',
'验证码核销(pad)',
'人脸验证(pad)',
'扫码验证(pad)',
'扫码器验证(pad)',
'验证码核销(商家助手)',
'扫码核销(商家助手)',
][status] || '-';
// const _obj = {
// '0': '',
// '1': '',
// '2': '',
// '3': '',
// '4': '',
// }
// return _obj[`${status}`] || '-'
} }
}, },
zh_pay_type(){ zh_pay_type(){

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

@ -1,6 +1,7 @@
<template> <template>
<view class="order-details"> <view class="order-details">
<block v-if="optionsQuery.order_type==3"> <block v-if="optionsQuery.order_type==3">
<!-- pageInfo.order_type 场次(0)/人次(1) -->
<reservation-site-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 0"></reservation-site-detail> <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" @recoverBtn="peopleRecoverBtn" @okChange="okChange"></reservation-people-detail> <reservation-people-detail :orderInfo="pageInfo" v-if="pageInfo.order_type == 1" @recoverBtn="peopleRecoverBtn" @okChange="okChange"></reservation-people-detail>
</block> </block>

Loading…
Cancel
Save