Browse Source

add split order

voice^2
刘嘉炜 4 years ago
parent
commit
f837e0e0e9
  1. 10
      src/components/organize_order/organize_order.vue
  2. 4
      src/components/reservation_order/reservation_order.vue
  3. 4
      src/components/timing_order/timing_order.vue
  4. 4
      src/js/api.js
  5. 2
      src/manifest.json
  6. 136
      src/pages/order_list/order_list.vue
  7. 29
      src/subpackage/device/pages/order_manage/order_manage.vue

10
src/components/organize_order/organize_order.vue

@ -2,7 +2,7 @@
<view class="timing-order" @click="toOrderDetails"> <view class="timing-order" @click="toOrderDetails">
<view class="ro-header"> <view class="ro-header">
<view class="rh-view">{{orderInfo.original_order.extension.stadium_name || '-'}}</view> <view class="rh-view">{{orderInfo.original_order.extension.stadium_name || '-'}}</view>
<text :class="[ 'rh-text', orderInfo.original_order.pay_status == 0?'rh-active':'' ]">{{zh_order_status(orderInfo.original_order.pay_status)}}</text>
<text :class="[ 'rh-text', orderInfo.original_order&&orderInfo.original_order.pay_status == 0?'rh-active':'' ]">{{zh_order_status(orderInfo.original_order&&orderInfo.original_order.pay_status)}}</text>
</view> </view>
<view class="ro-section"> <view class="ro-section">
<view class="rs-line"> <view class="rs-line">
@ -38,7 +38,7 @@
</view> </view>
</view> </view>
<view class="ro-bot" v-if="orderInfo.original_order.pay_status != 0">
<view class="ro-bot" v-if="orderInfo.original_order&&orderInfo.original_order.pay_status != 0">
<!-- status == End 可发放金额--> <!-- status == End 可发放金额-->
<!-- <view v-if="orderInfo.status=='End'" class="ro-btn" @click="clickSendAmount">发放金额</view> --> <!-- <view v-if="orderInfo.status=='End'" class="ro-btn" @click="clickSendAmount">发放金额</view> -->
<view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.original_order.pay_amount || 0}}</text></view> <view class="rb-total">实付款 <text class="rt-txt"> ¥{{orderInfo.original_order.pay_amount || 0}}</text></view>
@ -54,7 +54,7 @@ export default {
props: { props: {
orderInfo: { orderInfo: {
type: Object, type: Object,
default: ()=>({})
default: ()=>({ })
} }
}, },
computed: { computed: {
@ -174,10 +174,6 @@ export default {
.rv-active{ .rv-active{
color: $themeColor; color: $themeColor;
} }
>image{
width: 32rpx;
height: 32rpx;
}
} }
} }

4
src/components/reservation_order/reservation_order.vue

@ -16,7 +16,7 @@
<view class="rs-line"> <view class="rs-line">
<view class="rl-view">预订项目</view> <view class="rl-view">预订项目</view>
<view class="rl-view"> <view class="rl-view">
<view class="rv-view"><text>{{ zh_type_name(orderInfo.order_type) }}</text></view>
<view class="rv-view"><text class="rv-text">{{ zh_type_name(orderInfo.order_type) }}</text></view>
</view> </view>
</view> </view>
<!-- 场次 --> <!-- 场次 -->
@ -195,7 +195,7 @@ export default {
line-height: 40upx; line-height: 40upx;
font-size: 24upx; font-size: 24upx;
color: #9c9c9f; color: #9c9c9f;
>text{
>.rv-text{
color: #333; color: #333;
} }
} }

4
src/components/timing_order/timing_order.vue

@ -10,7 +10,7 @@
<view class="rl-view"> <view class="rl-view">
<view class="rv-view">{{orderInfo.order_no || '-'}}</view> <view class="rv-view">{{orderInfo.order_no || '-'}}</view>
</view> </view>
<image src="/static/images/icon/arrow_b2.png"></image>
<image class="rl-image" src="/static/images/icon/arrow_b2.png"></image>
</view> </view>
<!-- 场次有 人次没有 order_type: 1场次 2人次 --> <!-- 场次有 人次没有 order_type: 1场次 2人次 -->
<view class="rs-line" v-if="orderInfo.order_type == 1"> <view class="rs-line" v-if="orderInfo.order_type == 1">
@ -125,7 +125,7 @@ export default {
.rv-active{ .rv-active{
color: $themeColor; color: $themeColor;
} }
>image{
>.rl-image{
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }

4
src/js/api.js

@ -1,5 +1,5 @@
// export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试
export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式
export const ORIGIN = `https://testmanager.ouxuanzhineng.cn`; // 测试
// export const ORIGIN = `https://minimanage.ouxuanzhineng.cn`; // 正式
export const API = { export const API = {
wechatMiniAppLoginAndSync: `${ORIGIN}/assistant/WechatMiniAppGetToken`, // 小程序授权获取token,为空就登录 wechatMiniAppLoginAndSync: `${ORIGIN}/assistant/WechatMiniAppGetToken`, // 小程序授权获取token,为空就登录

2
src/manifest.json

@ -54,7 +54,7 @@
}, },
"mp-weixin": { /* */ "mp-weixin": { /* */
"appid": "wxf1294b279ad1b845",
"appid": "wx7106e84614cf0060",
"setting": { "setting": {
"urlCheck": false "urlCheck": false
}, },

136
src/pages/order_list/order_list.vue

@ -11,7 +11,12 @@
</picker> </picker>
</view> </view>
<view class="ol-select-type" v-if="orderType == 10"> <view class="ol-select-type" v-if="orderType == 10">
<view v-for="(oitem,oi) in selectOrderType" :key="oi" :class="oitem.active?'als-active':''" @click="tabTypeChange(oi)">{{oitem.name}}</view>
<view
v-for="(oitem,oi) in selectOrderType"
:key="oi"
:class="oitem.type == selectedOrderType ?'als-active':''"
@click="tabTypeChange(oitem)"
>{{oitem.name || '-'}}</view>
</view> </view>
<view class="oh-ctrl"> <view class="oh-ctrl">
@ -47,7 +52,7 @@
<view class="ox-dark-mask" v-if="isShowClassify" @click="hideClassify"> <view class="ox-dark-mask" v-if="isShowClassify" @click="hideClassify">
<view class="ol-classify" @click.stop="()=>false"> <view class="ol-classify" @click.stop="()=>false">
<view class="oc-title"> <view class="oc-title">
{{titleName}}
{{ titleName }}
</view> </view>
<view class="oc-tabs"> <view class="oc-tabs">
<view <view
@ -100,36 +105,21 @@
import { servers } from '../../js/server'; import { servers } from '../../js/server';
import { API } from '../../js/api'; import { API } from '../../js/api';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
const resClassify = [ // tab
{id:'', name:'全部'},
{id:1, name:'待使用'},
{id:2, name:'已使用'},
{id:3, name:'已失效'},
{id:4, name:'已退款'},
];
const memClassify = [ // tab
{id:'', name:'全部'},
{id:1, name:'使用中'},
{id:0, name:'已失效'},
]
const intClassify = [ // tab
{id:'', name:'全部'},
{id:1, name:'待发货'},
{id:2, name:'已发货'},
{id:3, name:'已完成'},
// tab
const resClassify = [ {id:'', name:'全部'}, {id:1, name:'待使用'}, {id:2, name:'已使用'}, {id:3, name:'已失效'}, {id:4, name:'已退款'}, ];
// tab
const memClassify = [
{id:'', name:'全部'}, {id:1, name:'使用中'}, {id:0, name:'已失效'},
] ]
const timClassify = [ // tab ///退 [/0/1/4]
{id:'', name:'全部'},
{id:0, name:'计费中'},
{id:1, name:'已完成'},
{id:4, name:'已退款'},
]
const orgClassify = [ // tab ///退 [/0/1/4]
{id:'', name:'全部'},
{id:1, name:'已付款'},
{id:2, name:'已完成'},
{id:4, name:'已退款'},
]
// tab
const intClassify = [ {id:'', name:'全部'}, {id:1, name:'待发货'}, {id:2, name:'已发货'}, {id:3, name:'已完成'}, ]
// tab ///退 [/0/1/4]
const timClassify = [ {id:'', name:'全部'}, {id:0, name:'计费中'}, {id:1, name:'已完成'}, {id:4, name:'已退款'}, ]
// tab ///退 [/0/1/4]
const orgClassify = [ {id:'', name:'全部'}, {id:1, name:'已付款'}, {id:2, name:'已完成'}, {id:4, name:'已退款'}, ]
export default { export default {
components: { components: {
// 'reservation-order': order.reservation, // 'reservation-order': order.reservation,
@ -150,8 +140,12 @@
return []; return [];
}, },
titleName(){ titleName(){
let { orderType } = this;
if(orderType == 3)return '预约订单';
let { orderType, appointOrderType } = this;
if(orderType == 3){
if(appointOrderType == 0)return '订场订单';
if(appointOrderType == 1)return '次卡订单';
return '预约订单';
}
if(orderType == 4)return '会员卡订单'; if(orderType == 4)return '会员卡订单';
if(orderType == 5)return '积分商城订单'; if(orderType == 5)return '积分商城订单';
if(orderType == 1)return '计时订单'; if(orderType == 1)return '计时订单';
@ -184,60 +178,52 @@
orderInfo: {}, // 退 orderInfo: {}, // 退
orderList: [], // orderList: [], //
page: 1, page: 1,
selectOrderType:[ // selectOrderType:[ //
{ {
name:"发起约玩", name:"发起约玩",
active:true,
type:"Main" type:"Main"
}, },
{ {
name:"参与约玩", name:"参与约玩",
active:false,
type:"Sub" type:"Sub"
} }
], ],
selectedOrderType:"Main",//
selectedOrderType: "Main",//
// 20210706 // , ->
appointOrderType: ''
} }
}, },
onReachBottom(){ onReachBottom(){
let { curTabID, periodInfo, orderType, curSelectedStore, page } = this;
let { curTabID, periodInfo, orderType, curSelectedStore, page, appointOrderType } = this;
let _curSelectedStore = curSelectedStore || {}; let _curSelectedStore = curSelectedStore || {};
this.getOrderList({ this.getOrderList({
begin: periodInfo.start, begin: periodInfo.start,
end: periodInfo.end,
//
// - 1 使 / 2 使 / 3 / 4 退
// - 1 '使' / 0 ''
// - 1 / 2 / 3 / 4
end: periodInfo.end,
status: curTabID, status: curTabID,
stadium_id: _curSelectedStore.id || '', stadium_id: _curSelectedStore.id || '',
page: ++page, page: ++page,
orderType: orderType, orderType: orderType,
order_type: appointOrderType,
}) })
}, },
onLoad(options){ onLoad(options){
let _type = options.order_type
let _type = options.order_type || '';
this.orderType = _type; this.orderType = _type;
this.$nextTick(_=>{
uni.setNavigationBarTitle({
title: this.titleName
})
})
let defaultTime = this.getDefaultTimeLimit(_type);
this.periodInfo = defaultTime;
//
if(options.order_type == 3&&options.type!=undefined)this.appointOrderType = options.type;
this.$nextTick(_=>{ uni.setNavigationBarTitle({ title: this.titleName }) });
this.periodInfo = this.getDefaultTimeLimit(_type);
this.getStoreList(); this.getStoreList();
this.getOrderList({
begin: defaultTime.start,
end: defaultTime.end,
orderType: _type
})
this.$nextTick(this.refreshList);
}, },
onUnload() {
},
methods: { methods: {
// //
// 3->,4->,5->,1-> // 3->,4->,5->,1->
@ -247,18 +233,18 @@
let _beforeSeven = _date.getTime() - _sevenTimeStemp; let _beforeSeven = _date.getTime() - _sevenTimeStemp;
let _afterSeven = _date.getTime() + _sevenTimeStemp; let _afterSeven = _date.getTime() + _sevenTimeStemp;
let _obj = {
start: '',
end: ''
}
let _obj = { start: '', end: '' };
if(type == 3 )_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven}); if(type == 3 )_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven});
if(type == 4 || type == 1)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({}); if(type == 4 || type == 1)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({});
console.log(_obj) console.log(_obj)
return _obj; return _obj;
}, },
// //
refreshList(){ refreshList(){
let { curTabID, periodInfo, orderType, curSelectedStore, page } = this;
let { curTabID, periodInfo, orderType, curSelectedStore, page, appointOrderType } = this;
let _curSelectedStore = curSelectedStore || {}; let _curSelectedStore = curSelectedStore || {};
this.orderList = []; this.orderList = [];
this.page = 1; this.page = 1;
@ -266,13 +252,10 @@
this.getOrderList({ this.getOrderList({
begin: periodInfo.start, begin: periodInfo.start,
end: periodInfo.end, end: periodInfo.end,
//
// - 1 使 / 2 使 / 3 / 4 退
// - 1 '使' / 0 ''
// - 1 / 2 / 3 / 4
status: curTabID, status: curTabID,
stadium_id: _curSelectedStore.id, stadium_id: _curSelectedStore.id,
orderType: orderType, orderType: orderType,
order_type: appointOrderType,
}) })
}, },
tabChange: util.debounce(function(ID){ tabChange: util.debounce(function(ID){
@ -283,14 +266,11 @@
},300,300), },300,300),
//type //type
tabTypeChange: util.debounce(function(index){
for(var i of this.selectOrderType){
i.active = false
}
this.selectOrderType[index].active = true
this.selectedOrderType = this.selectOrderType[index].type
tabTypeChange: util.debounce(function(item){
this.selectedOrderType = item.type
this.$nextTick(this.refreshList); this.$nextTick(this.refreshList);
},300,true), },300,true),
storeChange(e){ storeChange(e){
let { value } = e.detail; let { value } = e.detail;
let { storeList } = this; let { storeList } = this;
@ -383,6 +363,7 @@
page_size, page_size,
order_type, order_type,
} }
if(this.orderType == "10"){ //, 0430.0507() if(this.orderType == "10"){ //, 0430.0507()
postData['type'] = this.selectedOrderType; postData['type'] = this.selectedOrderType;
postData['filter_start_time'] = begin; postData['filter_start_time'] = begin;
@ -411,15 +392,6 @@
}, },
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> </script>

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

@ -1,10 +1,10 @@
<template> <template>
<view class="order-manage"> <view class="order-manage">
<view class="om-section" v-for="(e, i) in tabList" :key="e.id">
<view class="om-section" v-for="e in tabList" :key="e.id">
<view class="os-tit">{{e.name}}</view> <view class="os-tit">{{e.name}}</view>
<view class="os-tabs"> <view class="os-tabs">
<view class="ot-item" v-for="(j, k) in e.itemList" :key="k" @click="toPageInfo(j)"> <view class="ot-item" v-for="(j, k) in e.itemList" :key="k" @click="toPageInfo(j)">
<image mode="aspectFit" :src="'/subpackage/device/static/images/order/tab_'+ e.id + '_' + k + '.png'"></image>
<image mode="aspectFit" :src="j.icon"></image>
<view>{{j.name}}</view> <view>{{j.name}}</view>
</view> </view>
</view> </view>
@ -23,28 +23,39 @@ const tabList = [
itemList:[ itemList:[
{ {
id: 3, id: 3,
name: "预约订单",
path: '/pages/order_list/order_list',
name: "订场订单",
path: '/pages/order_list/order_list?order_type=3&type=0',
icon: '/subpackage/device/static/images/order/tab_0_0.png'
},
{
id: 3,
name: "次卡订单",
path: '/pages/order_list/order_list?order_type=3&type=1',
icon: '/subpackage/device/static/images/order/tab_0_0.png'
}, },
{ {
id: 1, id: 1,
name: "计时订单", name: "计时订单",
path: '/pages/order_list/order_list', path: '/pages/order_list/order_list',
icon: '/subpackage/device/static/images/order/tab_0_1.png'
}, },
{ {
id: 2, id: 2,
name: "商城订单", name: "商城订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_2.png'
}, },
{ {
id: 0, id: 0,
name: "课程订单", name: "课程订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_3.png'
}, },
{ {
id: 10, id: 10,
name: "约玩订单", name: "约玩订单",
path: '/pages/order_list/order_list', path: '/pages/order_list/order_list',
icon: '/subpackage/device/static/images/order/tab_0_4.png'
// path: '', // path: '',
}, },
{ {
@ -52,36 +63,43 @@ const tabList = [
name: "储值卡订单", name: "储值卡订单",
// path: '/pages/order_list/order_list', // path: '/pages/order_list/order_list',
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_5.png'
}, },
{ {
id: 6, id: 6,
name: "售货柜订单", name: "售货柜订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_6.png'
}, },
{ {
id: 7, id: 7,
name: "储物柜订单", name: "储物柜订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_7.png'
}, },
{ {
id: 8, id: 8,
name: "租售柜订单", name: "租售柜订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_8.png'
}, },
{ {
id: 9, id: 9,
name: "咖啡机订单", name: "咖啡机订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_9.png'
}, },
{ {
id: 5, id: 5,
name: "积分兑换订单", name: "积分兑换订单",
path: '/pages/order_list/order_list', path: '/pages/order_list/order_list',
icon: '/subpackage/device/static/images/order/tab_0_10.png'
}, },
{ {
id: 11, id: 11,
name: "浴室订单", name: "浴室订单",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_0_11.png'
} }
], ],
}, },
@ -93,6 +111,7 @@ const tabList = [
id: 0, id: 0,
name: "售后维权", name: "售后维权",
path: '', path: '',
icon: '/subpackage/device/static/images/order/tab_1_0.png'
}, },
], ],
}, },
@ -113,7 +132,7 @@ export default {
util.routeTo(tabInfo.path,'nT'); util.routeTo(tabInfo.path,'nT');
}, },
isOrderTab(ID){ isOrderTab(ID){
return ID == 3 || ID == 4 || ID == 5 || ID == 1 || ID == 10
return ID == 4 || ID == 5 || ID == 1 || ID == 10
}, },
} }
} }

Loading…
Cancel
Save