5 Commits

  1. 72
      src/components/reservation_order/reservation_order.vue
  2. 28
      src/components/timing_order/timing_order.vue
  3. 5
      src/js/api.js
  4. 12
      src/pages.json
  5. 8
      src/pages/index/index.vue
  6. 27
      src/pages/order_list/order_list.vue
  7. 1
      src/store/index.js
  8. 546
      src/subpackage/device/components/order/reservation_people/reservation_people.vue
  9. 828
      src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
  10. 103
      src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
  11. 120
      src/subpackage/device/components/order/timing_detail/timing_detail.vue
  12. 14
      src/subpackage/device/js/device_api.js
  13. 98
      src/subpackage/device/pages/order_details/order_details.vue
  14. 32
      src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue
  15. 2
      src/subpackage/device/pages/order_manage/order_manage.vue

72
src/components/reservation_order/reservation_order.vue

@ -1,5 +1,5 @@
<template>
<view class="reservation-order" @click="toOrderDetails">
<view class="reservation-order" @click="detailChange">
<view class="ro-header">
<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>
@ -14,56 +14,51 @@
<view class="rs-line">
<view class="rl-view">预订项目</view>
<view class="rl-view">
<view class="rv-view">{{ orderInfo.venue_type_name || '-'}}</view>
<view class="rv-view"><text>{{ zh_type_name(orderInfo.order_type) }}</text></view>
</view>
</view>
<!-- 场次 -->
<block v-if="true">
<block v-if="orderInfo.order_type == 0">
<view class="rs-line" >
<view class="rl-view">预订场数</view>
<view class="rl-view">
<view class="rv-view">{{ '-'}}</view>
<view class="rv-view">{{ orderInfo.number || '-'}}</view>
</view>
</view>
<!-- <view class="rs-line">
<view class="rl-view">预定场次</view>
<view class="rl-view">
<view class="rv-view" v-for="(e,i) in orderInfo.sessions" :key="i">{{e.venue_name}} {{e.duration}}</view>
</view>
</view> -->
<view class="rs-line">
<view class="rl-view">预订时间</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.date || '-'}}</view>
<view class="rv-view" v-for="(e,i) in orderInfo.sessions" :key="i">{{e.date}} {{e.duration}}{{orderInfo.sessions.length>1?'等':''}}</view>
</view>
</view>
</block>
<!-- 人次 -->
<block v-if="true">
<block v-if="orderInfo.order_type == 1">
<view class="rs-line">
<view class="rl-view">数量</view>
<view class="rl-view">
<view class="rv-view">{{ '-'}}</view>
<view class="rv-view">{{ orderInfo.number || '-'}}</view>
</view>
</view>
<view class="rs-line">
<view class="rl-view">类型</view>
<view class="rl-view">
<view class="rv-view">{{ '-'}}</view>
</view>
<!-- <view class="rv-view" v-for="(e, i) in orderInfo.person_number_spec_names" :key="i"><text>{{ e || '-'}}</text></view> -->
<view class="rv-view" >{{ zh_spec_names || '-'}}</view>
</view>
</view>
<!-- 人次+随时用 -->
<view class="rs-line" v-if="true">
<view class="rs-line" v-if="orderInfo.person_number_rule.order_method==1">
<view class="rl-view">有效期至</view>
<view class="rl-view">
<view class="rv-view">{{ '-'}}</view>
<view class="rv-view">{{orderInfo.end_time || '-'}}</view>
</view>
</view>
<!-- 人次+指定日期 -->
<view class="rs-line" v-if="true">
<view class="rs-line" v-if="orderInfo.person_number_rule.order_method==2">
<view class="rl-view">使用日期</view>
<view class="rl-view">
<view class="rv-view">{{ '-'}}</view>
<view class="rv-view">{{orderInfo.date || '-'}}</view>
</view>
</view>
</block>
@ -73,7 +68,7 @@
</view>
<!-- <view class="ro-bot-line" v-if="orderInfo.verify_type!=0">核销方式{{zh_verify_type(orderInfo.verify_type)}} {{orderInfo.verify_time || '-'}}</view>
<view class="ro-bot-line" v-if="orderInfo.pay_status == 4">退款时间{{orderInfo.refund_time || '-'}}</view> -->
</view>
</view>
</template>
<script>
@ -100,12 +95,12 @@ export default {
}
},
zh_pay_type(){
// 012
// 012
return status =>{
const _obj = {
'0': '微信支付',
'1': '支付宝支付',
'2': '会员卡支付',
'2': '储值卡支付',
}
return _obj[`${status}`] || '-'
}
@ -123,11 +118,35 @@ export default {
}
return _obj[`${status}`] || '-'
}
}
},
zh_type_name(){
// 0 1
let { orderInfo } = this
return status =>{
const _obj = {
'0': orderInfo.venue_type_name,
'1': orderInfo.person_number_rule_name,
}
return _obj[`${status}`] || '-'
}
},
zh_spec_names(){
let { orderInfo } = this
if(!orderInfo.person_number_spec_names)return '';
let spec = orderInfo.person_number_spec_names.join('+')
return spec || '';
},
},
methods:{
toOrderDetails(){
util.routeTo('/subpackage/device/pages/order_details/reservation_details/reservation_details','nT');
detailChange(){
console.log("点击了吗")
let { orderInfo } = this
let _query = {}
_query["stadium_id"] = orderInfo.stadium_id
_query["order_no"] = orderInfo.order_no
_query["order_type"] = 3
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
console.log("点击了吗444")
}
}
@ -173,6 +192,9 @@ export default {
line-height: 40upx;
font-size: 24upx;
color: #9c9c9f;
>text{
color: #333;
}
}
.rl-view{
&:first-child{

28
src/components/timing_order/timing_order.vue

@ -12,22 +12,22 @@
</view>
<image src="/static/images/icon/arrow_b2.png"></image>
</view>
<!-- 场次有 人次没有 -->
<view class="rs-line" v-if="true">
<!-- 场次有 人次没有 order_type: 1场次 2人次 -->
<view class="rs-line" v-if="orderInfo.order_type == 1">
<view class="rl-view">项目</view>
<view class="rl-view">
<view class="rv-view">{{'羽毛球(1号馆)' || '-'}}</view>
<view class="rv-view">{{orderInfo.project_name || '-'}}</view>
</view>
</view>
<view class="rs-line">
<view class="rl-view">时长</view>
<view class="rl-view">
<view class="rv-view">{{ '1小时58分46秒' || '-'}}</view>
<view :class="[ 'rv-view', orderInfo.pay_status == 0?'rv-active':'' ]">{{ orderInfo.extension.duration || '-'}}</view>
</view>
</view>
</view>
<view class="ro-bot">
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.pay_amount || '0'}}</text></view>
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.pay_amount || 0}}</text></view>
</view>
</view>
</template>
@ -35,6 +35,12 @@
<script>
import util from '@/utils/util';
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
zh_order_status(){
// 01
@ -53,7 +59,14 @@ export default {
},
methods:{
toOrderDetails(){
util.routeTo('/subpackage/device/pages/order_details/timing_details/timing_details','nT');
console.log("点击了吗")
let { orderInfo } = this
let _query = {}
_query["stadium_id"] = orderInfo.stadium_id
_query["order_no"] = orderInfo.order_no
_query["order_type"] = 1
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
// this.$emit('orderDetailChange');
}
}
@ -108,6 +121,9 @@ export default {
}
}
}
.rv-active{
color: $themeColor;
}
>image{
width: 32rpx;
height: 32rpx;

5
src/js/api.js

@ -19,7 +19,10 @@ export const API = {
collectionDetails: `${ORIGIN}/admin/assistant/collection/details`, // 收款记录-收款明细
reservationOrder: `${ORIGIN}/admin/stadium/order/list`, // 预约订单
// reservationOrder: `${ORIGIN}/admin/stadium/order/list`, // 预约订单
reservationOrder:`${ORIGIN}/admin/assistant/stadiumOrder/list`, //k-订单管理-预约订单列表 PM:2021/4/19
timeOrder:`${ORIGIN}/admin/assistant/timeOrder/list`, //k-订单管理-计时订单列表 PM:2021/4/19
membershipOrder: `${ORIGIN}/admin/member_card/order/list`, // 会员卡订单
integralOrder: `${ORIGIN}/admin/shop/order/list`, // 积分商城订单

12
src/pages.json

@ -250,15 +250,9 @@
}
},
{
"path": "pages/order_details/reservation_details/reservation_details",
"style" : {
"navigationBarTitleText": "预约订单详情"
}
},
{
"path": "pages/order_details/timing_details/timing_details",
"style" : {
"navigationBarTitleText": "计时订单详情"
"path": "pages/order_details/order_details",
"style": {
"navigationBarTitleText": ""
}
}
]

8
src/pages/index/index.vue

@ -85,7 +85,7 @@
id: 2,
name: '订单管理',
path: '/subpackage/device/pages/order_manage/order_manage',
serverKey: 1011 //
serverKey: 1012 //
},
{
id: 3,
@ -175,7 +175,7 @@
let _permission = indexData.permission || {};
if(!app.isLogin())return this.showAuthor();
if(!tabInfo.path)return util.showNone('暂未开放!');
if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //
//if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //
if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!')
util.routeTo(tabInfo.path,'nT');
},
@ -460,9 +460,7 @@
margin-top: -12upx;
.it-item{
flex-shrink: 0;
flex-grow: 1;
max-width: 33.33%;
min-width: 33.33%;
width: 33.33%;
padding: 12upx;
>view{
padding: 40upx 10upx 0;

27
src/pages/order_list/order_list.vue

@ -110,10 +110,10 @@
{id:2, name:'已发货'},
{id:3, name:'已完成'},
]
const timClassify = [ // tab
const timClassify = [ // tab ///退 [/0/1/4]
{id:'', name:'全部'},
{id:1, name:'计费中'},
{id:2, name:'已完成'},
{id:0, name:'计费中'},
{id:1, name:'已完成'},
]
export default {
components: {
@ -155,7 +155,7 @@
start: '',
end: ''
},
orderType: 3, // 3->,4->,5->
orderType: 3, // 3->,4->,5->,1
storeList: [ //
{ id: '', name: '全部' }
@ -204,7 +204,7 @@
},
methods: {
//
// 3->,4->,5->
// 3->,4->,5->,1->
getDefaultTimeLimit(type){
let _date = new Date();
let _sevenTimeStemp = 7*24*60*60*1000;
@ -215,7 +215,7 @@
start: '',
end: ''
}
if(type == 3)_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven});
if(type == 3 || type == 1)_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven});
if(type == 4)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({});
console.log(_obj)
return _obj;
@ -308,7 +308,7 @@
if(type == 3)return API.reservationOrder;
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
if(type == 1)return ;
if(type == 1)return API.timeOrder;
},
getOrderList({
begin='',
@ -321,7 +321,8 @@
stadium_id='',
page=1,
page_size=15,
orderType = this.orderType
orderType = this.orderType,
order_type='', //:0,1; :/[1/2]
}){
let { brandInfo } = this;
util.showLoad();
@ -335,6 +336,7 @@
stadium_id,
page,
page_size,
order_type,
},
failMsg: '加载失败!'
})
@ -352,6 +354,15 @@
},
},
detailChange(){
console.log("点击了吗66")
// let _query = {}
// _query["stadium_id"] = e.stadium_id
// _query["order_no"] = e.order_no
// _query["order_type"] = this.orderType
// util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
},
}
</script>

1
src/store/index.js

@ -28,6 +28,7 @@ export default new Vuex.Store({
'1009': '场地管理',
'1010': '设备管理',
'1011': '商品零售',
'1012': '订单管理',
},
// 场地占用提交页面信息

546
src/subpackage/device/components/order/reservation_people/reservation_people.vue

@ -1,546 +0,0 @@
<template>
<view class="reservation-people">
<view class="rp-head">
<view class="rh-store">
<image></image>
<view>欧轩智能场馆(羽毛球永泰店)</view>
</view>
<view class="rh-line">
<view>订单编号<text>2352534645764747</text></view>
<view><text :class="[true?'rl-active':'']">待使用</text></view>
</view>
<view class="rh-line">
<view>创建时间<text>2019-06-06 12:00:06</text></view>
</view>
<view class="rh-line">
<view>用户昵称<text>i术生</text></view>
</view>
<view class="rh-line">
<view>创建时间<text>2019-06-06 12:00:06</text></view>
</view>
<!-- 待使用 已绑定ic卡 -->
<block v-if="false">
<view class="rh-line">
<view>已绑定IC卡<text>000000000213</text></view>
</view>
<view class="rh-line">
<view>绑定时间<text>2019-07-06 12:06:03</text></view>
</view>
</block>
<!-- 待使用 未绑定ic卡 -->
<view :class="['rh-ic', false?'rh-ic-untie':'']" @click="isShowBindIC = !isShowBindIC">{{ false?'解绑IC卡':'绑定IC卡' }}</view>
</view>
<view class="rp-box">
<view class="rb-title">验证信息<text>(1张可用)</text></view>
<!-- 人次+随时用 -->
<view class="rb-time" v-if="true">
<view>有效期至</view>
<text>2019年6月18日 10:30:40 </text>
</view>
<!-- 人次+指定日期 -->
<view class="rb-time" v-if="false">
<view>使用日期</view>
<text>2020-12-25周五 上午场</text>
</view>
<view class="rb-code">
<view class="rc-item" v-for="i in 2" :key="i">
<view class="ri-tit">验证码{{i+1}}</view>
<view class="ri-section">
<view class="rs-view">1223 5512 4534 (已使用)</view>
<view class="rs-view">核销方式扫码核销</view>
<view class="rs-view">核销时间2019-06-01 13:20</view>
</view>
</view>
</view>
</view>
<view class="rp-box">
<view class="rb-title">预订信息</view>
<view class="rb-name">
<view>单人羽毛球次卡<text>可随时使用</text></view>
</view>
<view class="rb-line">
<view>数量<text>3</text></view>
</view>
<view class="rb-line">
<view>类型<text>平日+上午场</text></view>
</view>
<view class="rb-section">
<view class="rs-line">
<view>金额小计</view>
<view>¥6</view>
</view>
<view class="rs-line">
<view>积分抵扣</view>
<view>-¥6</view>
</view>
<view class="rs-line">
<view>折扣金额</view>
<view>-¥0</view>
</view>
<view class="rs-line">
<view>优惠券优惠</view>
<view>-¥1</view>
</view>
</view>
<view class="rb-total">
<view>合计支付<text></text><text>5</text></view>
</view>
</view>
<view class="rp-box">
<view class="rb-title">支付信息</view>
<view class="rb-line">
<view>支付方式<text>微信支付</text></view>
</view>
<view class="rb-line">
<view>支付时间<text>2019年6月18日 10:30:40</text></view>
</view>
<view class="rb-line">
<view>微信交易号<text>424736746998493847989434</text></view>
</view>
</view>
<!-- 弹框 绑定ic卡 -->
<view class="ox-dark-mask" v-if="isShowBindIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-ic-modal">
<view class="oim-close">
<image src="/static/images/icon/x_close.png" @click="isShowBindIC = !isShowBindIC"></image>
</view>
<view class="oim-tit">绑定IC卡</view>
<view class="oim-card">
<view class="oc-sign">*</view>
<view class="oc-depot"></view>
<input type="number" placeholder="请输入卡号" v-model="icNumber" />
<image class="oc-icon" src="/subpackage/device/static/images/scan_code.png"></image>
</view>
<view class="oim-tips">可直接输入卡号扫描条码或在已选择仓库下选择卡号</view>
<view class="oim-ipt">
<input type="text" placeholder="单价" v-model="icPrice" />
</view>
<view class="oim-ipt">
<input type="text" placeholder="其他费用(选填)" v-model="icOtherFee" />
</view>
<view class="oim-ipt">
<input type="text" placeholder="备注说明(选填)" v-model="icRemarks" />
</view>
<view class="oim-btn" hover-class="hover-active" @click="modalBtn(1)">确认</view>
</view>
</view>
<!-- 弹框 选择ic卡 -->
<view class="ox-dark-mask" v-if="isShowSelectIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-select-modal">
<view class="osm-close">
<image src="/static/images/icon/x_close.png" @click="isShowSelectIC = !isShowSelectIC"></image>
</view>
<view class="osm-tit">筛选卡号</view>
<view class="osm-ipt">
<input type="text" placeholder="请选择仓库" v-model="icRemarks" />
<image src="/subpackage/device/static/images/arrow_b2.png"></image>
</view>
<view class="osm-ipt">
<input type="text" placeholder="请输入卡号" v-model="icRemarks" />
</view>
<view class="osm-btn" hover-class="hover-active" @click="modalBtn(2)">确认</view>
</view>
</view>
<!-- 弹框 ic卡绑定成功 -->
<view class="ox-dark-mask" v-if="isShowSuccessIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-select-modal">
<view class="osm-title">绑定成功</view>
<view class="osm-line">
<view>卡号0000023</view>
<view>关联订单号yy202101294566</view>
<view>门店名称广州欧轩智能场馆永泰店</view>
</view>
<view class="osm-line">
<view>订单类型预约订单</view>
<view>项目名称开业优惠卡(10)</view>
<view>购买者昵称yiming</view>
</view>
<view class="osm-btn" hover-class="hover-active" @click="isShowSuccessIC = !isShowSuccessIC">好的</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isShowBindIC: false,
isShowSelectIC: false,
isShowSuccessIC: false,
icNumber: '',
icPrice: '',
icOtherFee: '',
icRemarks: '',
};
},
methods:{
moveHandle(){},
modalBtn(type){
if(type == 1){
this.isShowBindIC = false
this.isShowSelectIC = true;
return;
}
if(type == 2){
this.isShowSelectIC = false;
this.isShowSuccessIC = true;
return;
}
}
}
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.reservation-people{
margin-bottom: 24rpx;
.rp-head{
margin: 24rpx 24rpx 0rpx;
padding: 30rpx;
background-color: #FFF;
border-radius: 10rpx 10rpx 0px 0px;
.rh-store{
padding-bottom: 26rpx;
margin-bottom: 18rpx;
border-bottom: 2rpx solid #D8D8D8;
display: flex;
justify-content: flex-start;
>image{
flex-shrink: 0;
width: 40rpx;
height: 40rpx;
background-color: skyblue;
}
>view{
flex-grow: 1;
margin-left: 14rpx;
color: #333333;
font-size: 28rpx;
}
}
.rh-line{
margin-top: 8rpx;
@include centerFlex(space-between);
>view{
line-height: 40rpx;
font-size: 28rpx;
&:first-child{
color: #9A9A9D;
>text{
color: #333333;
}
}
&:nth-child(2){
>text{
color: #9A9A9D;
}
.rl-active{
color: #009874;
}
}
}
}
.rh-ic{
margin-top: 40rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
text-align: center;
width: 500rpx;
// height: 112rpx;
// line-height: 112rpx;
padding: 34rpx 0rpx;
margin-left: 71rpx;
}
.rh-ic-untie{
padding: 32rpx 0rpx;
color: #009874;
border: 2rpx solid #009874;
background-color: #fff;
}
}
.rp-box{
margin: 24rpx 24rpx 0rpx;
padding: 30rpx;
background-color: #FFF;
border-radius: 10rpx;
.rb-title{
color: #9A9A9D;
font-size: 28rpx;
margin-bottom: 20rpx;
>text{
color: #333333;
font-size: 28rpx;
margin-left: 28rpx;
}
}
.rb-time{
line-height: 48rpx;
display: flex;
justify-content: flex-start;
>view{
color: #9A9A9D;
font-size: 28rpx;
}
>text{
color: #333333;
font-size: 28rpx;
}
}
.rb-code{
.rc-item{
display: flex;
justify-content: flex-start;
margin-top: 24rpx;
.ri-tit{
color: #9A9A9D;
font-size: 28rpx;
line-height: 46rpx;
}
.ri-section{
.rs-view{
color: #333333;
font-size: 28rpx;
line-height: 46rpx;
}
}
}
}
.rb-name{
margin-bottom: 8rpx;
color: #333333;
>view{
font-size: 28rpx;
}
>text{
font-size: 24rpx;
}
}
.rb-line{
>view{
line-height: 52rpx;
font-size: 28rpx;
color: #9A9A9D;
>text{
color: #333333;
}
}
}
.rb-section{
margin: 30rpx 0rpx 24rpx;
border-top: 2rpx solid #D8D8D8;
.rs-line{
margin-top: 26rpx;
@include centerFlex(space-between);
>view{
color: #333333;
&:first-child{
font-size: 28rpx;
}
&:nth-child(2){
font-size: 24rpx;
}
}
}
}
.rb-total{
@include centerFlex(flex-end);
>view{
color: #333333;
font-size: 28rpx;
>text{
color: #FF873D;
&:first-child{
font-size: 28rpx;
}
&:nth-child(2){
font-size: 36rpx;
}
}
}
}
}
.odm-ic-modal {
position: absolute;
left: 65rpx;
top: 10%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.oim-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.oim-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin-top: 16rpx;
}
.oim-card{
width: 538rpx;
position: relative;
padding: 20rpx 0rpx;
margin-top: 38rpx;
border-radius: 10rpx;
border: 2rpx solid #D8D8D8;
@include centerFlex(flex-start);
.oc-sign{
position: absolute;
color: #EA5061;
font-size: 28rpx;
margin-left: -20rpx;
}
.oc-depot{
width: 40rpx;
height: 40rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
border-radius: 6rpx;
background-color: #333333;
margin: 0rpx 20rpx;
}
& input {
height: 48rpx;
padding: 0rpx 20rpx;
font-size: 28rpx;
color: #333;
flex-grow: 1;
border-left: 2rpx solid #D8D8D8;
}
.oc-icon{
flex-shrink: 0;
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
}
.oim-tips{
width: 518rpx;
color: #9A9A9D;
font-size: 24rpx;
margin: 12rpx 0rpx 20rpx;
}
.oim-ipt{
width: 538rpx;
padding: 20rpx 0rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
margin-bottom: 36rpx;
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
}
.oim-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
.odm-select-modal{
position: absolute;
left: 65rpx;
top: 16%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.osm-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.osm-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 38rpx;
}
.osm-ipt{
width: 538rpx;
padding: 20rpx 0rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
margin-bottom: 36rpx;
@include centerFlex(flex-start);
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
>image{
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-right: 22rpx;
}
}
.osm-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
.osm-title{
margin: 48rpx 0rpx 34rpx;
color: #333;
font-size: 32rpx;
font-weight: 700;
}
.osm-line{
width: 504rpx;
margin-bottom: 26rpx;
>view{
color: #333333;
font-size: 28rpx;
line-height: 48rpx;
}
}
}
}
</style>

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

@ -0,0 +1,828 @@
<template>
<view class="reservation-people">
<view class="rp-head">
<view class="rh-store">
<image :src="orderInfo.stadium_logo || '' "></image>
<view>{{orderInfo.stadium_name || '-'}}</view>
</view>
<view class="rh-line">
<view>订单编号<text>{{orderInfo.order_no || ''}}</text></view>
<view><text :class="[orderInfo.pay_status==1?'rl-active':'']">{{zh_pay_status(orderInfo.pay_status)}}</text></view>
</view>
<view class="rh-line">
<view>创建时间<text>{{orderInfo.created_at || '-'}}</text></view>
</view>
<view class="rh-line">
<view>用户昵称<text>{{orderInfo.nickname || '-'}}</text></view>
</view>
<!-- 门店是否开启ic卡 -->
<block v-if="orderInfo.stadium_has_iccard && orderInfo.pay_status==1">
<!-- 待使用 已绑定ic卡 卡id>0就是绑定了-->
<block v-if="orderInfo.bind_iccard_info.id > 0">
<view class="rh-line">
<view>已绑定IC卡<text>{{orderInfo.bind_iccard_info.erp_iccard_no || '-'}}</text></view>
</view>
<view class="rh-line">
<view>绑定时间<text>{{orderInfo.bind_iccard_info.bind_order_at || '-'}}</text></view>
</view>
</block>
<!-- 待使用 未绑定ic卡 -->
<view :class="['rh-ic', orderInfo.bind_iccard_info.id > 0?'rh-ic-untie':'']" @click="orderInfo.bind_iccard_info.id > 0?bindICCardChange(1):bindICCardChange(2)">{{ orderInfo.bind_iccard_info.id > 0?'解绑IC卡':'绑定IC卡' }}</view>
</block>
</view>
<view class="rp-box">
<view class="rb-title">验证信息<text>({{orderInfo.available_num || 0}}张可用)</text></view>
<!-- 人次+随时用 -->
<view class="rb-time" v-if="orderInfo.person_number_rule.order_method==1">
<view>有效期至</view>
<text>{{orderInfo.end_time || '-'}}</text>
</view>
<!-- 人次+指定日期 -->
<view class="rb-time" v-if="orderInfo.person_number_rule.order_method==2">
<view>使用日期</view>
<text>{{orderInfo.date || '-'}}</text>
</view>
<view class="rb-code">
<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.verify_code || '-'}} ({{zh_verify_status(e.status)}})</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>
</block>
</view>
</view>
</view>
</view>
<view class="rp-box">
<view class="rb-title">预订信息</view>
<view class="rb-name">
<view>{{orderInfo.person_number_rule_name || ''}} <text> {{orderInfo.person_number_rule.order_method==1?'(可随时使用)':'(固定日期)'}}</text></view>
</view>
<view class="rb-line">
<view>数量<text>{{orderInfo.number || 0}}</text></view>
</view>
<view class="rb-line">
<view>类型{{ zh_spec_names }}</view>
</view>
<view class="rb-section">
<view class="rs-line">
<view>金额小计</view>
<view>¥{{orderInfo.amount || 0}}</view>
</view>
<view class="rs-line">
<view>积分抵扣</view>
<view>-¥{{orderInfo.deduction_amount || 0}}</view>
</view>
<view class="rs-line">
<view>折扣金额</view>
<view>-¥{{orderInfo.deduction_amount || 0}}</view>
</view>
<view class="rs-line">
<view>优惠券优惠</view>
<view>-¥{{orderInfo.coupons_amount || 0}}</view>
</view>
</view>
<view class="rb-total">
<view>合计支付<text></text><text>{{orderInfo.pay_amount || 0}}</text></view>
</view>
</view>
<view class="rp-box">
<view class="rb-title">支付信息</view>
<view class="rb-line">
<view>支付方式<text>{{zh_pay_type(orderInfo.pay_type)}}</text></view>
</view>
<view class="rb-line">
<view>支付时间<text>{{orderInfo.pay_time || '-'}}</text></view>
</view>
<view class="rb-line">
<view>微信交易号<text>{{orderInfo.trade_no || ''}}</text></view>
</view>
</view>
<!-- 弹框 绑定ic卡 -->
<view class="ox-dark-mask" v-if="isShowBindIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-ic-modal">
<view class="oim-close">
<image src="/static/images/icon/x_close.png" @click="isShowBindIC = !isShowBindIC"></image>
</view>
<view class="oim-tit">绑定IC卡</view>
<view class="oim-card">
<view class="oc-sign">*</view>
<view class="oc-depot" @click="depotChange"></view>
<input type="number" placeholder="请输入卡号" v-model=" bindInfo.iccard_no" />
<image class="oc-icon" src="/subpackage/device/static/images/scan_code.png" @click="scanChange"></image>
</view>
<view class="oim-tips">可直接输入卡号扫描条码或在已选择仓库下选择卡号</view>
<view class="oim-ipt">
<input type="digit" placeholder="单价" v-model="bindInfo.iccard_price" />
</view>
<view class="oim-ipt">
<input type="text" placeholder="其他费用(选填)" v-model="bindInfo.iccard_otherfee" />
</view>
<view class="oim-ipt">
<input type="text" placeholder="备注说明(选填)" v-model="bindInfo.iccard_remarks" />
</view>
<view class="oim-btn" hover-class="hover-active" @click="modalBtn(1)">确认</view>
</view>
</view>
<!-- 弹框 仓库选择ic卡 -->
<view class="ox-dark-mask" v-if="isShowSelectIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-select-modal">
<view class="osm-close">
<image src="/static/images/icon/x_close.png" @click="isShowSelectIC = !isShowSelectIC"></image>
</view>
<view class="osm-tit">筛选卡号</view>
<picker class="osm-picker" :range="depotList" @change="pickerChange">
<view class="osm-ipt">
<input type="text" placeholder="请选择仓库" v-model="depotInfo.ic_name" />
<image src="/subpackage/device/static/images/arrow_b2.png"></image>
</view>
</picker>
<view class="osm-ipt">
<input type="text" placeholder="请输入卡号" v-model="depotInfo.ic_no" @change="inputChange"/>
</view>
<view class="osm-btn-box">
<picker class="osm-check" :range="iccardList" @change="checkPickerChange">
<view class="oc-btn" hover-class="hover-active">查询卡号</view>
</picker>
<view class="osm-btn" hover-class="hover-active" @click="modalBtn(2)">确认</view>
</view>
</view>
</view>
<!-- 弹框 ic卡绑定成功 -->
<view class="ox-dark-mask" v-if="isShowSuccessIC" @touchmove.stop.prevent="moveHandle">
<view class="odm-select-modal">
<view class="osm-title">绑定成功</view>
<view class="osm-line">
<view>卡号{{sucInfo.iccard.erp_iccard_no || '-'}}</view>
<view>关联订单号{{sucInfo.order_no || ''}}</view>
<view>门店名称{{sucInfo.stadium_name || '-'}}</view>
</view>
<view class="osm-line">
<view>订单类型{{zh_order_type(sucInfo.order_type)}}</view>
<view>项目名称{{sucInfo.project || '-'}}</view>
<view>购买者昵称{{sucInfo.nickname || '-'}}</view>
</view>
<view class="osm-btn" hover-class="hover-active" @click="okChange">好的</view>
</view>
</view>
</view>
</template>
<script>
import util from '@/utils/util';
import deviceServer from '../../../js/device_server';
import deviceApi from '../../../js/device_api';
import { mapState } from 'vuex';
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
...mapState(['brandInfo']),
zh_pay_status(){
// 1使2使34退
return status =>{
const _obj = {
'0': '未付款',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_verify_type(){
// 1/2/3/4 ///
return status =>{
const _obj = {
'0': '未核销',
'1': '核销码核销',
'2': '人脸核销',
'3': '扫码核销',
'4': '商家扫码',
}
return _obj[`${status}`] || '-'
}
},
zh_verify_status(){
// 0/1/2/3/4 /使///退
return status =>{
const _obj = {
'0': '无效',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_pay_type(){
// 012
return status =>{
const _obj = {
'0': '微信支付',
'1': '支付宝支付',
'2': '储值卡支付',
}
return _obj[`${status}`] || '-'
}
},
zh_spec_names(){
let { orderInfo } = this
if(!orderInfo.person_number_spec_names)return '';
let spec = orderInfo.person_number_spec_names.join('+')
return spec;
},
zh_order_type(){
// 0 1
return status =>{
const _obj = {
'0': '预约订单',
'1': '课程订单',
}
return _obj[`${status}`] || '-'
}
},
},
data() {
return {
isShowBindIC: false, //ic
isShowSelectIC: false, //ic
isShowSuccessIC: false,//ic
bindInfo: { //ic
iccard_no: '', //
iccard_price: '', //
iccard_otherfee: '', //
iccard_remarks: '', //
},
depotInfo: {
ic_name: '', //
ic_no: '', //
},
depotList: [], //picker
curIdx: -1,
storehouseList: [], //
iccardList: [], //ic
sucInfo: {}, //IC
};
},
methods:{
moveHandle(){},
modalBtn(type){
// type: 1ic 2ic
let { bindInfo, depotInfo } = this
if(type == 1){
if(bindInfo.iccard_no == '')return util.showNone('请输入ic卡卡号');
if(bindInfo.iccard_price == '')return util.showNone('请输入单价');
return this.getCheckIccard();
}
if(type == 2){
if(depotInfo.ic_name == '')return util.showNone('请选择仓库');
if(depotInfo.ic_no == '')return util.showNone('请输入ic卡卡号');
this.isShowModal()
this.bindInfo.iccard_no = depotInfo.ic_no
return;
}
},
isShowModal(){
this.isShowBindIC = !this.isShowBindIC;
this.isShowSelectIC = !this.isShowSelectIC;
},
//
depotChange(){
this.isShowModal();
this.getStoreHouseList()
},
//
pickerChange(e){
console.log(e);
this.curIdx = e.detail.value
let _list = this.depotList || [];
this.depotInfo.ic_name = _list[e.detail.value] || ''
},
//
getStoreHouseList(){
let { brandInfo } = this
util.showLoad();
deviceServer.get({
url: deviceApi.storeHouseList,
data: {
brand_id: brandInfo.brand.id,
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
// setTimeout(()=>uni.navigateBack(),1200);
let _list = res.list || []
this.storehouseList = _list
for(var i in _list){
this.depotList.push(_list[i].storehouse_name)
}
})
},
inputChange(e){
if(this.depotInfo.ic_name == '')return;
this.getICCardList({
key: e.detail.value,
})
},
// ic
checkPickerChange(e){
console.log(e);
let _list = this.iccardList || [];
this.depotInfo.ic_no = _list[e.detail.value] || ''
},
// ic
getICCardList({key=''}){
let { brandInfo, curIdx, storehouseList } = this
util.showLoad();
deviceServer.get({
url: deviceApi.iccardList,
data: {
brand_id: brandInfo.brand.id,
store_house_id: storehouseList[curIdx].id,
store_house_type: storehouseList[curIdx].store_house_type,
key,
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
this.iccardList = res.list || []
})
},
// ic
getCheckIccard(){
let { brandInfo, bindInfo } = this
util.showLoad();
deviceServer.get({
url: deviceApi.checkIccard,
data: {
brand_id: brandInfo.brand.id,
erp_iccard_no: bindInfo.iccard_no,
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad()
this.getBindIcCard()
})
},
// ic
getBindIcCard(){
let { brandInfo, bindInfo, orderInfo } = this
util.showLoad();
deviceServer.get({
url: deviceApi.bindIcCard,
data: {
brand_id: brandInfo.brand.id,
price: bindInfo.iccard_price, //
iccard_no: bindInfo.iccard_no, //IC
delivery_expenses: bindInfo.iccard_otherfee, //
delivery_order_number: orderInfo.order_no, //
delivery_desc: bindInfo.iccard_otherfee, //
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad()
this.sucInfo = res || {};
this.isShowBindIC = false;
this.isShowSuccessIC = true;
})
},
bindICCardChange: util.debounce(function(type){
// type: 1ic 2ic
let { brandInfo, orderInfo } = this
if(type == 1){
util.showModal({
title: '提示',
content: '确认解绑ic卡吗?',
showCancel: true,
success: modalRes => {
if (modalRes.confirm) {
util.showLoad();
deviceServer.get({
url: deviceApi.unbindIccard,
data: {
brand_id: brandInfo.brand.id,
order_no: orderInfo.order_no,
iccard_no: orderInfo.bind_iccard_info.erp_iccard_no,
},
failMsg: '请求失败!'
})
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
})
}
}
});
return;
}
if(type == 2){
this.isShowBindIC = !this.isShowBindIC
}
},300,300),
//
scanChange(){
let that = this;
//
uni.scanCode({
success: function(res) {
that.bindInfo.iccard_no = res.result;
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
}
});
},
okChange(){
this.isShowSuccessIC = !this.isShowSuccessIC
this.$emit('okChange');
},
}
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.reservation-people{
margin-bottom: 24rpx;
.rp-head{
margin: 24rpx 24rpx 0rpx;
padding: 30rpx;
background-color: #FFF;
border-radius: 10rpx 10rpx 0px 0px;
.rh-store{
padding-bottom: 26rpx;
margin-bottom: 18rpx;
border-bottom: 2rpx solid #D8D8D8;
display: flex;
justify-content: flex-start;
>image{
flex-shrink: 0;
width: 40rpx;
height: 40rpx;
background-color: skyblue;
}
>view{
flex-grow: 1;
margin-left: 14rpx;
color: #333333;
font-size: 28rpx;
}
}
.rh-line{
margin-top: 8rpx;
@include centerFlex(space-between);
>view{
line-height: 40rpx;
font-size: 28rpx;
&:first-child{
color: #9A9A9D;
>text{
color: #333333;
}
}
&:nth-child(2){
>text{
color: #9A9A9D;
}
.rl-active{
color: #009874;
}
}
}
}
.rh-ic{
margin-top: 40rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
text-align: center;
width: 500rpx;
// height: 112rpx;
// line-height: 112rpx;
padding: 34rpx 0rpx;
margin-left: 71rpx;
}
.rh-ic-untie{
padding: 32rpx 0rpx;
color: #009874;
border: 2rpx solid #009874;
background-color: #fff;
}
}
.rp-box{
margin: 24rpx 24rpx 0rpx;
padding: 30rpx;
background-color: #FFF;
border-radius: 10rpx;
.rb-title{
color: #9A9A9D;
font-size: 28rpx;
margin-bottom: 20rpx;
>text{
color: #333333;
font-size: 28rpx;
margin-left: 28rpx;
}
}
.rb-time{
line-height: 48rpx;
display: flex;
justify-content: flex-start;
>view{
color: #9A9A9D;
font-size: 28rpx;
}
>text{
color: #333333;
font-size: 28rpx;
}
}
.rb-code{
.rc-item{
display: flex;
justify-content: flex-start;
margin-top: 24rpx;
.ri-tit{
color: #9A9A9D;
font-size: 28rpx;
line-height: 46rpx;
}
.ri-section{
.rs-view{
color: #333333;
font-size: 28rpx;
line-height: 46rpx;
}
}
}
}
.rb-name{
margin-bottom: 8rpx;
color: #333333;
>view{
font-size: 28rpx;
}
>text{
font-size: 24rpx;
}
}
.rb-line{
>view{
line-height: 52rpx;
font-size: 28rpx;
color: #9A9A9D;
>text{
color: #333333;
}
}
}
.rb-section{
margin: 30rpx 0rpx 24rpx;
border-top: 2rpx solid #D8D8D8;
.rs-line{
margin-top: 26rpx;
@include centerFlex(space-between);
>view{
color: #333333;
&:first-child{
font-size: 28rpx;
}
&:nth-child(2){
font-size: 24rpx;
}
}
}
}
.rb-total{
@include centerFlex(flex-end);
>view{
color: #333333;
font-size: 28rpx;
>text{
color: #FF873D;
&:first-child{
font-size: 28rpx;
}
&:nth-child(2){
font-size: 36rpx;
}
}
}
}
}
.odm-ic-modal {
position: absolute;
left: 65rpx;
top: 10%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.oim-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.oim-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin-top: 16rpx;
}
.oim-card{
width: 538rpx;
position: relative;
padding: 20rpx 0rpx;
margin-top: 38rpx;
border-radius: 10rpx;
border: 2rpx solid #D8D8D8;
@include centerFlex(flex-start);
.oc-sign{
position: absolute;
color: #EA5061;
font-size: 28rpx;
margin-left: -20rpx;
}
.oc-depot{
width: 40rpx;
height: 40rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
border-radius: 6rpx;
background-color: #333333;
margin: 0rpx 20rpx;
}
& input {
height: 48rpx;
padding: 0rpx 20rpx;
font-size: 28rpx;
color: #333;
flex-grow: 1;
border-left: 2rpx solid #D8D8D8;
}
.oc-icon{
flex-shrink: 0;
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
}
.oim-tips{
width: 518rpx;
color: #9A9A9D;
font-size: 24rpx;
margin: 12rpx 0rpx 20rpx;
}
.oim-ipt{
width: 538rpx;
padding: 20rpx 0rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
margin-bottom: 36rpx;
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
}
.oim-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
.odm-select-modal{
position: absolute;
left: 65rpx;
top: 16%;
background-color: #fff;
width: 620rpx;
padding: 30rpx 0rpx 80rpx;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.osm-close{
width: 100%;
@include centerFlex(flex-end);
>image{
width: 32rpx;
height: 32rpx;
margin-right: 30rpx;
}
}
.osm-tit {
color: #333;
font-size: 32rpx;
font-weight: 700;
margin: 16rpx 0rpx 38rpx;
}
.osm-picker{
width: 538rpx;
}
.osm-ipt{
width: 538rpx;
padding: 20rpx 0rpx;
border: 2rpx solid #D8D8D8;
border-radius: 10rpx;
margin-bottom: 36rpx;
@include centerFlex(flex-start);
& input {
flex-grow: 1;
height: 48rpx;
color: #333;
font-size: 28rpx;
padding: 0rpx 20rpx;
}
>image{
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-right: 22rpx;
}
}
.osm-btn-box{
width: 100%;
padding: 0rpx 40rpx;
@include centerFlex(space-between);
}
.osm-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
background-color: #009874;
color: #FFFFFF;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
.osm-check{
width: 240rpx;
.oc-btn{
width: 240rpx;
height: 88rpx;
margin-top: 44rpx;
border-radius: 10rpx;
border: 2rpx solid #009874;
color: #009874;
font-size: 32rpx;
line-height: 88rpx;
text-align: center;
}
}
.osm-title{
margin: 48rpx 0rpx 34rpx;
color: #333;
font-size: 32rpx;
font-weight: 700;
}
.osm-line{
width: 504rpx;
margin-bottom: 26rpx;
>view{
color: #333333;
font-size: 28rpx;
line-height: 48rpx;
}
}
}
}
</style>

103
src/subpackage/device/components/order/reservation_site/reservation_site.vue → src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue

@ -2,35 +2,35 @@
<view class="reservation-site">
<view class="rs-head">
<view class="rh-store">
<image></image>
<view>欧轩智能场馆(羽毛球永泰店)</view>
<image :src="orderInfo.stadium_logo || '' "></image>
<view>{{orderInfo.stadium_name || '-'}}</view>
</view>
<view class="rh-line">
<view>订单编号<text>2352534645764747</text></view>
<view><text :class="[true?'rl-active':'']">待使用</text></view>
<view>订单编号<text>{{orderInfo.order_no || ''}}</text></view>
<view><text :class="[orderInfo.pay_status==1?'rl-active':'']">{{zh_pay_status(orderInfo.pay_status)}}</text></view>
</view>
<view class="rh-line">
<view>创建时间<text>2019-06-06 12:00:06</text></view>
<view>创建时间<text>{{orderInfo.created_at || '-'}}</text></view>
</view>
<view class="rh-line">
<view>用户昵称<text>i术生</text></view>
<view>用户昵称<text>{{orderInfo.nickname || '-'}}</text></view>
</view>
</view>
<view class="rs-box">
<view class="rb-title">验证信息</view>
<view class="rb-line">
<view class="rl-view">验证码</view>
<view :class="['rl-code1', false?'rl-code2':'', false?'rl-code3':'', false?'rl-code4':'']" >1233 5512 4565<text>(待使用)</text></view>
<view :class="['rl-code1', orderInfo.pay_status==2?'rl-code2':'', orderInfo.pay_status==3?'rl-code3':'', orderInfo.pay_status==4?'rl-code4':'']" >{{orderInfo.verify_code || '-'}}<text>({{zh_pay_status(orderInfo.pay_status)}})</text></view>
</view>
<!-- 已使用 -->
<block v-if="true">
<block v-if="orderInfo.pay_status==2">
<view class="rb-line">
<view class="rl-view">核销方式</view>
<text class="rl-text">扫码核销</text>
<text class="rl-text">{{zh_verify_type(orderInfo.verify_type)}}</text>
</view>
<view class="rb-line">
<view class="rl-view">核销时间</view>
<text class="rl-text">2019-05-17 11:12:58</text>
<text class="rl-text">{{orderInfo.verify_time || '-'}}</text>
</view>
</block>
</view>
@ -38,67 +38,69 @@
<view class="rb-title">预订信息</view>
<view class="rb-line">
<view class="rl-view">预订项目</view>
<text class="rl-text">羽毛球次卡</text>
<text class="rl-text">{{orderInfo.venue_type_name || '-'}}</text>
</view>
<view class="rb-line">
<view class="rl-view">预订日期</view>
<text class="rl-text">2019-05-18(周五)</text>
<text class="rl-text">{{orderInfo.date || '-'}}</text>
</view>
<view class="rb-line">
<view class="rl-view">预订场次</view>
<text class="rl-text">1号馆 10:00-12:00¥80\n3号馆 11:00-12:00¥80</text>
<block v-for="(e,i) in orderInfo.sessions" :key="i">
<text class="rl-text">{{e.venue_name||'-'}} {{e.duration||'-'}}¥{{e.price||0}}</text>
</block>
</view>
<view class="rb-section">
<view class="rs-line">
<view>金额小计</view>
<view>¥6</view>
<view>¥{{orderInfo.amount || 0}}</view>
</view>
<view class="rs-line">
<view>积分抵扣</view>
<view>-¥6</view>
<view>-¥{{orderInfo.deduction_amount || 0}}</view>
</view>
<view class="rs-line">
<view>折扣金额</view>
<view>-¥0</view>
<view>-¥{{orderInfo.deduction_amount || 0}}</view>
</view>
<view class="rs-line">
<view>优惠券优惠</view>
<view>-¥1</view>
<view>-¥{{orderInfo.coupons_amount || 0}}</view>
</view>
</view>
<view class="rb-total">
<view>合计支付<text></text><text>5</text></view>
<view>合计支付<text></text><text>{{orderInfo.pay_amount || 0}}</text></view>
</view>
</view>
<view class="rs-box">
<view class="rb-title">支付信息</view>
<view class="rb-line">
<view class="rl-view">支付方式</view>
<text class="rl-text">微信支付</text>
<text class="rl-text">{{zh_pay_type(orderInfo.pay_type)}}</text>
</view>
<view class="rb-line">
<view class="rl-view">支付时间</view>
<text class="rl-text">2019年6月18日 10:30:40</text>
<text class="rl-text">{{orderInfo.pay_time || '-'}}</text>
</view>
<view class="rb-line">
<view class="rl-view">微信交易号</view>
<text class="rl-text">424736746998493847989434</text>
<text class="rl-text">{{orderInfo.trade_no || ''}}</text>
</view>
<!-- 已退款 -->
<block v-if="true">
<block v-if="orderInfo.pay_status == 4">
<view class="rb-line">
<view class="rl-view">退款时间</view>
<text class="rl-text">2019年6月18日 10:30:40</text>
<text class="rl-text">{{orderInfo.refund_time || '-'}}</text>
</view>
<view class="rb-line">
<view class="rl-view">退款单号</view>
<text class="rl-text">424736746998493847989434</text>
<text class="rl-text">{{orderInfo.refund_no || '-'}}</text>
</view>
</block>
<!-- 已失效 -->
<view class="rb-line">
<view class="rb-line" v-if="orderInfo.pay_status == 3">
<view class="rl-view">失效时间</view>
<text class="rl-text">2019年6月18日 10:30:40</text>
<text class="rl-text">{{orderInfo.end_time || '-'}}</text>
</view>
</view>
</view>
@ -106,6 +108,51 @@
<script>
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
zh_pay_status(){
// 1使2使34退
return status =>{
const _obj = {
'0': '未付款',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_verify_type(){
// 1/2/3/4 ///
return status =>{
const _obj = {
'0': '未核销',
'1': '核销码核销',
'2': '人脸核销',
'3': '扫码核销',
'4': '商家扫码',
}
return _obj[`${status}`] || '-'
}
},
zh_pay_type(){
// 012
return status =>{
const _obj = {
'0': '微信支付',
'1': '支付宝支付',
'2': '储值卡支付',
}
return _obj[`${status}`] || '-'
}
},
},
data() {
return {
}
@ -211,14 +258,14 @@ export default {
color: #9A9A9D;
font-size: 28rpx;
>text{
color: #EA5061;
color: #9A9A9D;
}
}
.rl-code4{
color: #9A9A9D;
font-size: 28rpx;
>text{
color: #9A9A9D;
color: #EA5061;
}
}
}

120
src/subpackage/device/pages/order_details/timing_details/timing_details.vue → src/subpackage/device/components/order/timing_detail/timing_detail.vue

@ -2,61 +2,61 @@
<view class="timing-details">
<view class="td-head">
<view class="th-store">
<image></image>
<view>欧轩智能场馆(羽毛球永泰店)</view>
<image :src="orderInfo.stadium_logo || ''"></image>
<view>{{orderInfo.stadium_name || '-'}}</view>
</view>
<view class="th-line">
<view>订单编号<text>2352534645764747</text></view>
<view><text :class="[true?'tl-active':'']">计费中</text></view>
<view>订单编号<text>{{orderInfo.order_no || '-'}}</text></view>
<view><text :class="[orderInfo.pay_status == 0?'tl-active':'']">{{zh_order_status(orderInfo.pay_status)}}</text></view>
</view>
<view class="th-line">
<view>创建时间<text>2019-06-06 12:00:06</text></view>
<view>创建时间<text>{{orderInfo.model.created_at || '-'}}</text></view>
</view>
<view class="th-line">
<view>用户昵称<text>i术生</text></view>
<view>用户昵称<text>{{orderInfo.nickname || '-'}}</text></view>
</view>
</view>
<view class="td-box">
<view class="tb-title">计时信息</view>
<view class="tb-line">
<!-- 项目 场次有 人次没有 -->
<view v-if="false">项目<text>羽毛球(1号馆)</text></view>
<view>进场时间<text>2020-01-10 15:02:24</text></view>
<!-- 项目 场次有 人次没有 order_type: 1场次 2人次 -->
<view v-if="orderInfo.order_type==1">项目<text>{{orderInfo.project_name || '-'}}({{orderInfo.venue_name || '-'}})</text></view>
<view>进场时间<text>{{orderInfo.start_time || '-'}}</text></view>
<!-- 离场时间 已完成显示 -->
<view v-if="false">离场时间<text>2020-01-10 17:20:24</text></view>
<view>时长合计<text>1小时35分9秒</text></view>
<view v-if="orderInfo.pay_status == 1">离场时间<text>{{orderInfo.end_time || '-'}}</text></view>
<view>时长合计<text>{{orderInfo.extension.duration || '-'}}</text></view>
</view>
<view class="tb-section" v-if="false">
<view class="tb-section" v-if="orderInfo.pay_status == 1">
<view class="ts-line">
<view>金额小计</view>
<view>¥6</view>
<view>¥{{orderInfo.amount || 0}}</view>
</view>
<view class="ts-line">
<view>积分抵扣</view>
<view>-¥0</view>
<view>-¥{{orderInfo.deduction_amount ||0}}</view>
</view>
<view class="ts-line">
<view>折扣金额</view>
<view>-¥0</view>
<view>-¥{{orderInfo.discount_amount||0}}</view>
</view>
<view class="ts-line">
<view>优惠券优惠</view>
<view>-¥1</view>
<view>-¥{{orderInfo.coupons_amount || 0}}</view>
</view>
<view class="ts-total">
<view>合计支付<text></text><text>5</text></view>
<view>合计支付<text></text><text>{{orderInfo.pay_amount ||0}}</text></view>
</view>
</view>
</view>
<view class="td-box" v-if="false">
<view class="td-box" v-if="orderInfo.pay_status == 1">
<view class="tb-title">支付信息</view>
<view class="tb-line">
<view>支付方式<text>微信支付</text></view>
<view>支付时间<text>2019年6月18日 10:30:40</text></view>
<view>微信交易号<text>424736746998493847989434</text></view>
<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>
</view>
<view class="td-btn" @click="isShowEnd = !isShowEnd">结束计费</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">
@ -65,28 +65,82 @@
<image src="/static/images/icon/x_close.png" @click="isShowEnd = false"></image>
</view>
<view class="oem-tit">结束计费</view>
<view class="oem-line">操作人张三</view>
<view class="oem-line">时长合计<text class="ol-txt1">1小时25分9秒</text></view>
<view class="oem-line">金额合计<text class="ol-txt2">¥100.2</text></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.extension.refundable_amount || '-'}}</text></view>
<view class="oem-tips">*<text>请输入金额</text></view>
<view class="oem-ipt"><input type="text" /></view>
<view class="oem-btn" hover-class="hover-active" @click="isShowEnd = !isShowEnd">确认</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>
</view>
</template>
<script>
export default {
data() {
return {
isShowEnd: false,
import util from '@/utils/util';
import deviceServer from '../../../js/device_server';
import deviceApi from '../../../js/device_api';
import { mapState } from 'vuex';
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
...mapState(['brandInfo']),
zh_order_status(){
// 01
return status =>{
const _obj = {
'0': '计费中',
'1': '已完成',
}
return _obj[`${status}`] || '-'
}
},
methods: {
zh_pay_type(){
// 012
return status =>{
const _obj = {
'0': '微信支付',
'1': '支付宝支付',
'2': '储值卡支付',
}
return _obj[`${status}`] || '-'
}
},
},
data() {
return {
isShowEnd: false,
input_amount: "",
}
},
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);
})
},
}
}
</script>
<style lang="scss" >

14
src/subpackage/device/js/device_api.js

@ -17,9 +17,6 @@ export const DEVICE_API = {
leaseTest:`${ORIGIN}/admin/stadium/lease/cabinet/test`, // 储物柜打开
leaseReset:`${ORIGIN}/admin/stadium/lease/cabinet/reset`, // 储物柜补货
hardwareInfo:`${ORIGIN}/admin/stadium/hardware/get/`, // 设备信息
@ -27,7 +24,16 @@ export const DEVICE_API = {
ouxuanac:`${ORIGIN}/ouxuanac/sendPacket`, // 中控控制
// ouxuanac--> http://api.ouxuan.net/project/233/interface/api/10012 接口文档
// ouxuanac--> http://git.ouxuan.net/ouxuanac/ouxuanac-common/src/branch/master/cmd.ts // 接口参数结构 || ouxuanac.md
// PM:2021/4/19
reservationDetail:`${ORIGIN}/admin/assistant/stadiumOrder/detail`, //k-订单管理-场馆预约订单-预约场馆订单详情
unbindIccard:`${ORIGIN}/admin/assistant/unbindIccard`, //k-订单管理-解绑订单的ic卡
bindIcCard:`${ORIGIN}/admin/assiatant/bindIcCard`, //k-订单管理-绑定ic卡
checkIccard:`${ORIGIN}/admin/assistant/checkIccard`, //k-订单管理-校验ic卡
storeHouseList:`${ORIGIN}/admin/assistant/storeHouse/list`, //k-仓库列表
iccardList:`${ORIGIN}/admin/assistant/iccard/list`, //k-ic卡列表
timeOrderDetail:`${ORIGIN}/admin/assistant/timeOrder/detail`, //k-订单管理-计时订单详情
timeOrderEnd:`${ORIGIN}/admin/assistant/timeOrder/end`, //k-订单管理-订单计时结束
}
export default DEVICE_API;

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

@ -0,0 +1,98 @@
<template>
<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>
</block>
<timing-detail :orderInfo="pageInfo" v-if="optionsQuery.order_type==1"></timing-detail>
</view>
</template>
<script>
import timingDetail from '../../components/order/timing_detail/timing_detail.vue'
import reservationSiteDetail from '../../components/order/reservation_site_detail/reservation_site_detail.vue';
import reservationPeopleDetail from '../../components/order/reservation_people_detail/reservation_people_detail.vue';
import util from '@/utils/util';
import deviceServer from '../../js/device_server';
import deviceApi from '../../js/device_api';
import { mapState } from 'vuex';
export default {
components: {
'timing-detail': timingDetail,
'reservation-site-detail': reservationSiteDetail,
'reservation-people-detail': reservationPeopleDetail,
},
computed:{
titleName(){
let { optionsQuery } = this;
if(optionsQuery.order_type == 1)return '计时订单详情'; //PM: 2021/4/19
if(optionsQuery.order_type == 3)return '预约订单详情'; //PM: 2021/4/19
if(optionsQuery.order_type == 4)return '储值卡订单详情';
if(optionsQuery.order_type == 5)return '积分商城订单详情';
return '订单详情'
},
...mapState(['brandInfo']),
},
data() {
return {
optionsQuery: {
stadium_id: '',
order_type: -1,
},
pageInfo: {},
}
},
onLoad(options) {
let _query = util.jsonPar(options.query);
this.optionsQuery = _query
this.$nextTick(_=>{
uni.setNavigationBarTitle({
title: this.titleName
})
})
this.getPageInfo({
orderType: _query.order_type,
stadium_id: _query.stadium_id,
order_no: _query.order_no,
})
},
methods: {
getApiUrl(type){
if(type == 1)return deviceApi.timeOrderDetail;
if(type == 3)return deviceApi.reservationDetail;
},
getPageInfo({orderType, stadium_id, order_no}){
util.showLoad();
deviceServer.get({
url: this.getApiUrl(orderType),
data: {
stadium_id,
order_no,
},
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad()
this.pageInfo = res
})
.catch(util.hideLoad)
},
okChange(){
console.log("有了吗")
let { optionsQuery } = this
this.getPageInfo({
orderType: optionsQuery.order_type,
stadium_id: optionsQuery.stadium_id,
order_no: optionsQuery.order_no,
})
},
}
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.order-details{
}
</style>

32
src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue

@ -1,32 +0,0 @@
<template>
<view class="reservation-details">
<reservation-site v-if="false"></reservation-site>
<reservation-people v-if="true"></reservation-people>
</view>
</template>
<script>
import reservation_site from '../../../components/order/reservation_site/reservation_site.vue'
import reservation_people from '../../../components/order/reservation_people/reservation_people.vue'
export default {
components: {
'reservation-site': reservation_site,
'reservation-people': reservation_people,
},
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.reservation-details{
}
</style>

2
src/subpackage/device/pages/order_manage/order_manage.vue

@ -111,7 +111,7 @@ export default {
util.routeTo(tabInfo.path,'nT');
},
isOrderTab(ID){
return ID == 0 || ID == 4 || ID == 5 || ID == 1
return ID == 3 || ID == 4 || ID == 5 || ID == 1
},
}
}

Loading…
Cancel
Save