Browse Source

商家助手约玩订单简约版

voice
zmt 4 years ago
parent
commit
4fb46208a8
  1. 218
      src/components/organize_order/organize_order.vue
  2. 3
      src/js/api.js
  3. 39
      src/pages/order_list/order_list.vue
  4. 5
      src/pages/order_search/order_search.vue
  5. 0
      src/subpackage/device/components/order/organize_detail/organize_detail.vue
  6. 1
      src/subpackage/device/pages/order_details/order_details.vue
  7. 5
      src/subpackage/device/pages/order_manage/order_manage.vue

218
src/components/organize_order/organize_order.vue

@ -0,0 +1,218 @@
<template>
<view class="timing-order" >
<view class="ro-header">
<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>
</view>
<view class="ro-section">
<view class="rs-line">
<view class="rl-view">订单编号</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.order_no || '-'}}</view>
</view>
<!-- <image src="/static/images/icon/arrow_b2.png"></image> -->
</view>
<view class="rs-line">
<view class="rl-view">约玩主题</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.theme || '-'}}</view>
</view>
</view>
<view class="rs-line">
<view class="rl-view">约玩人数</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.person_applicants || '-'}}</view>
</view>
</view>
<view class="rs-line">
<view class="rl-view">约玩时间</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.label.Date+" "+ orderInfo.label.StartTime+" "+orderInfo.label.EndTime || '-'}}</view>
</view>
</view>
<view class="rs-line" v-if="orderInfo.status=='End'">
<view class="rl-view">未发放</view>
<view class="rl-view">
<view class="rv-view">{{orderInfo.un_amount_already_amount || '-'}}</view>
</view>
</view>
</view>
<view class="ro-bot" v-if="orderInfo.original_order.pay_status != 0">
<!-- status == End 可发放金额-->
<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>
</view>
</template>
<script>
import util from '@/utils/util';
import { servers } from '../../js/server';
import { API } from '../../js/api';
export default {
props: {
orderInfo: {
type: Object,
default: ()=>({})
}
},
computed: {
zh_order_status(){
// 01使2使34退5退6退
return status =>{
const _obj = {
'0': '未支付',
'1': '已支付',
'2': '已使用',
'3': '已失效',
'4': '已退款',
'5': '申请退款',
'6': '同意退款',
}
return _obj[`${status}`] || '-'
}
}
},
data() {
return {
}
},
methods:{
toOrderDetails(){
let { orderInfo } = this
let _query = {}
_query["stadium_id"] = orderInfo.stadium_id
_query["order_no"] = orderInfo.order_no
_query["order_type"] = 10
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT');
// this.$emit('orderDetailChange');
},
clickSendAmount(){
let that = this
console.log(999,this.orderInfo)
uni.showModal({
title: '发放金额',
content: `确定要将未发放金额${that.orderInfo.un_amount_already_amount}全部转给约玩发起人?`,
confirmColor:"#469576",
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
servers.get({
url: API.amountIssued,
data: {
order_no: that.orderInfo.order_no,
},
failMsg: '加载失败!'
})
.then(res=>{
console.log(888,res);
that.$emit('refreshList');//
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
</script>
<style lang="scss" >
@import '~style/public.scss';
.timing-order{
padding: 0 24upx;
border-radius: 10upx;
background-color: #fff;
.ro-header{
margin-bottom: 18upx;
height: 98upx;
line-height: 96upx;
border-bottom: 2upx solid #D8D8D8;
@include centerFlex(space-between);
.rh-view{
flex-grow: 1;
font-size: 28upx;
color: #1a1a1a;
@include textHide(1);
}
.rh-text{
margin-left: 20upx;
flex-shrink: 0;
font-size: 28upx;
color: #9C9C9F;
}
.rh-active{
color: $themeColor;
}
}
.ro-section{
padding-bottom: 20upx;
.rs-line{
display: flex;
.rl-view,.rv-view{
line-height: 40upx;
font-size: 24upx;
color: #9c9c9f;
}
.rl-view{
&:first-child{
flex-shrink: 0;
}
&+.rl-view{
flex-grow: 1;
.rv-view{
@include textHide(1);
}
}
}
.rv-active{
color: $themeColor;
}
>image{
width: 32rpx;
height: 32rpx;
}
}
}
.ro-bot{
// padding-top: 20rpx;
// padding-bottom: 30upx;
border-top: 2upx solid #D8D8D8;
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
.rb-total{
// display: flex;
// flex-direction: row;
// justify-content: center;
line-height: 70rpx;
// text-align: right;
font-size: 24upx;
color: #9c9c9f;
.rt-txt{
color: #1A1A1A;
margin-left: 10rpx;
}
}
.ro-btn{
width: 120rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
font-size: 24upx;
color: #469576;
position: absolute;
left: 32rpx;
}
}
}
</style>

3
src/js/api.js

@ -27,6 +27,9 @@ export const API = {
integralOrder: `${ORIGIN}/admin/shop/order/list`, // 积分商城订单
integralOrderSend: `${ORIGIN}/admin/shop/order/ship`, // 积分商城订单-发货
organizeOrderList: `${ORIGIN}/assistant/gaPlayTogetherOrder/list`, // 约玩订单列表
amountIssued: `${ORIGIN}/assistant/gaPlayTogetherOrder/amountIssued`, // 发放金额
// 营业额统计
turnoverBrand: `${ORIGIN}/admin/assistant/turnover/brand/calc`, // 营业额记录-品牌

39
src/pages/order_list/order_list.vue

@ -36,6 +36,7 @@
<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>
<organize-order :order-info="e" v-if="orderType == 10" @refreshList="refreshList"></organize-order>
</view>
</view>
<!-- 分类tab -->
@ -88,6 +89,8 @@
import integral_order from '../../components/integral_order/integral_order';
import membership_order from '../../components/membership_order/membership_order';
import timing_order from '../../components/timing_order/timing_order.vue'
import organize_order from '../../components/organize_order/organize_order.vue'
import util from '../../utils/util';
import { servers } from '../../js/server';
import { API } from '../../js/api';
@ -116,6 +119,13 @@
{id:1, name:'已完成'},
{id:4, name:'已退款'},
]
const orgClassify = [ // tab ///退 [/0/1/4]
{id:'', name:'全部'},
// {id:0, name:'使'},
// {id:1, name:'使'},
// {id:2, name:''},
// {id:3, name:'退'},
]
export default {
components: {
// 'reservation-order': order.reservation,
@ -123,6 +133,7 @@
'membership-order': membership_order,
'integral-order': integral_order,
'timing-order': timing_order,
'organize-order': organize_order,
},
computed:{
classifyArr(){
@ -131,6 +142,7 @@
if(orderType == 4)return memClassify;
if(orderType == 5)return intClassify;
if(orderType == 1)return timClassify;
if(orderType == 10)return orgClassify;
return [];
},
titleName(){
@ -139,6 +151,7 @@
if(orderType == 4)return '会员卡订单';
if(orderType == 5)return '积分商城订单';
if(orderType == 1)return '计时订单';
if(orderType == 10)return '约玩订单';
return '订单'
},
...mapState(['brandInfo']),
@ -202,7 +215,10 @@
end: defaultTime.end,
orderType: _type
})
},
onUnload() {
},
methods: {
//
// 3->,4->,5->,1->
@ -310,6 +326,7 @@
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
if(type == 1)return API.timeOrder;
if(type == 10)return API.organizeOrderList;
},
getOrderList({
begin='',
@ -327,18 +344,20 @@
}){
let { brandInfo } = this;
util.showLoad();
let postData = {
begin,
end,
status,
brand_id: brandInfo.brand.id,
stadium_id,
page,
page_size,
order_type,
}
if(this.orderType == "10")postData['type'] = "Main"
servers.get({
url: this.getApiUrl(orderType),
data: {
begin,
end,
status,
brand_id: brandInfo.brand.id,
stadium_id,
page,
page_size,
order_type,
},
data: postData,
failMsg: '加载失败!'
})
.then(res=>{

5
src/pages/order_search/order_search.vue

@ -18,6 +18,7 @@
<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>
<organize-order :order-info="e" v-if="orderType == 10"></organize-order>
</view>
</view>
</view>
@ -29,6 +30,8 @@ import reservation_order from '../../components/reservation_order/reservation_or
import integral_order from '../../components/integral_order/integral_order';
import membership_order from '../../components/membership_order/membership_order';
import timing_order from '../../components/timing_order/timing_order.vue'
import organize_order from '../../components/organize_order/organize_order.vue'
import { API } from '../../js/api';
import { servers } from '../../js/server';
import util from '../../utils/util';
@ -40,6 +43,7 @@ export default {
'membership-order': membership_order,
'integral-order': integral_order,
'timing-order': timing_order,
'organize-order': organize_order,
},
computed: {
...mapState(['brandInfo']),
@ -91,6 +95,7 @@ export default {
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
if(type == 1)return API.timeOrder;
if(type == 10)return API.organizeOrderList;
},
getOrderList({
key = "",

0
src/subpackage/device/components/order/organize_detail/organize_detail.vue

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

@ -29,6 +29,7 @@
if(optionsQuery.order_type == 3)return '预约订单详情'; //PM: 2021/4/19
if(optionsQuery.order_type == 4)return '储值卡订单详情';
if(optionsQuery.order_type == 5)return '积分商城订单详情';
if(optionsQuery.order_type == 10)return '约玩订单详情';
return '订单详情'
},
...mapState(['brandInfo']),

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

@ -44,7 +44,8 @@ const tabList = [
{
id: 10,
name: "约玩订单",
path: '',
path: '/pages/order_list/order_list',
// path: '',
},
{
id: 4,
@ -112,7 +113,7 @@ export default {
util.routeTo(tabInfo.path,'nT');
},
isOrderTab(ID){
return ID == 3 || ID == 4 || ID == 5 || ID == 1
return ID == 3 || ID == 4 || ID == 5 || ID == 1 || ID == 10
},
}
}

Loading…
Cancel
Save