Browse Source

add rental ball order

tags/v1.1.30
刘嘉炜 2 years ago
parent
commit
d8b869ec66
  1. 8
      src/components/order_list/club_rental/club_rental.vue
  2. 6
      src/components/order_list/value_card/value_card.vue
  3. 3
      src/manifest.json
  4. 5
      src/pages/order_list/order_list.vue
  5. 6
      src/pages/order_search/order_search.vue
  6. 2
      src/subpackage/order/js/api.js
  7. 241
      src/subpackage/order/pages/club_rental/detail/detail.vue
  8. 2
      src/subpackage/order/pages/order_manage/order_manage.vue
  9. 7
      src/subpackage/order/pages/value_card/detail/detail.vue

8
src/components/order_list/club_rental/club_rental.vue

@ -1,6 +1,6 @@
<template>
<!-- 租球机 -->
<view class="club-rental-container" @click="toInfo">
<view class="club-rental-container" @click="toInfo(0)">
<a-header :source="orderInfo.source || '-'" :status="orderInfo.extension.status_text || '-'">
<view slot="line" class="crc-line">
<image class="cl-img" mode="aspectFit" src="/static/images/icon/location.png"></image>
@ -34,7 +34,7 @@
<view class="vcc-total" v-if="orderInfo.pay_status != 1">
<view class="vt-view"><text class="vv-text">合计支付</text>{{ orderInfo.pay_amount || '0' }}</view>
</view>
<view class="vcc-end-btn" v-if="orderInfo.order_type != 'deposit'&&orderInfo.pay_status == 1">
<view class="vcc-end-btn" v-if="orderInfo.order_type == 'rent'&&orderInfo.pay_status == 0">
<view class="veb-item" @click.stop="toInfo(1)">结束计费</view>
</view>
</view>
@ -60,9 +60,9 @@ export default {
mounted(){
},
methods: {
toInfo(isEnd = 0){
toInfo(isEnd=0){
let { orderInfo } = this;
util.routeTo(`/subpackage/order/pages/club_rental/detail/detail?order_no=${orderInfo.order_no}&is_end=${ isEnd }`, 'nT');
util.routeTo(`/subpackage/order/pages/club_rental/detail/detail?order_no=${orderInfo.order_no}&is_end=${isEnd}`, 'nT');
},
getStatusTxt(status = -1){
let _obj = {

6
src/components/order_list/value_card/value_card.vue

@ -39,8 +39,10 @@ export default {
methods: {
getStatus(status){
let _obj = {
1: '已付款',
4: '已退卡',
0: '待激活',
1: '使用中',
2: '已失效',
3: '已退卡',
}
return _obj[status] || '-'
},

3
src/manifest.json

@ -57,7 +57,8 @@
/* */
"appid" : "wx7106e84614cf0060",
"setting" : {
"urlCheck" : false
"urlCheck" : false,
"minified" : true
},
"usingComponents" : true
},

5
src/pages/order_list/order_list.vue

@ -577,8 +577,9 @@
case 12: // tab ///退 [/0/1/4]
return [ {id: -1, name: '全部'}, {id: 0, name: '待付款'}, {id: 1, name: '进行中'}, {id: 2, name: '已结束'}, {id: 3, name: '已退款'}, ];
case 18: // 01使23退 ---> 20220725 14退
// return [ {id: '', name: ''}, {id: 0, name: ''}, {id: 1, name: '使'}, {id: 2, name: ''}, {id: 3, name: '退'},];
return [ {id: '', name: '全部'}, {id: 1, name: '已付款'}, {id: 4, name: '已退款'},];
// 20220727
return [ {id: '', name: '全部'}, {id: 0, name: '待激活'}, {id: 1, name: '使用中'}, {id: 2, name: '已失效'}, {id: 3, name: '已退卡'},];
// return [ {id: '', name: ''}, {id: 1, name: ''}, {id: 4, name: '退'},];
case 15: // ( 1,2,4 1 3 退 4 pay_status)
return [ {id: '1,2,4', name: '全部'}, {id: 1, name: '生效中'}, {id: 3, name: '已失效'}, {id: 4, name: '已退款'}];
case 16: // (status 1,2,4 1 2 退 4)

6
src/pages/order_search/order_search.vue

@ -32,7 +32,8 @@
<mall v-if="orderType == 2" :order-info="e"></mall>
<rent-and-sale v-if="orderType == 8" :order-info="e"></rent-and-sale>
<retail v-if="orderType == 19" :order-info="e"></retail>
<ym-card v-if="orderType == 20" :order-info="e"></ym-card>
<ym-card v-if="orderType == 20" :order-info="e"></ym-card>
<stored-value-card v-if="orderType == 21" :order-info="e"></stored-value-card>
</view>
</view>
</view>
@ -58,6 +59,7 @@ import device from '../../components/order_list/device/device.vue'; // 售货
import competition from '../../components/order_list/competition/competition.vue'; //
import retail from '../../components/order_list/retail/retail.vue'; //
import ym_card from '../../components/order_list/ym_card/ym_card.vue'; //
import stored_value_card from '../../components/order_list/stored_value_card/stored_value_card.vue'; //
import { API } from '../../js/api';
import { servers } from '../../js/server';
@ -84,6 +86,7 @@ export default {
'competition': competition,
'retail': retail,
'ym-card': ym_card,
'stored-value-card': stored_value_card,
},
computed: {
...mapState(['brandInfo']),
@ -145,6 +148,7 @@ export default {
if(type == 2)return API.shop2OrderList; //
if(type == 19)return API.retailOrderList; //
if(type == 20)return API.userMonthlyCardLs; // -
if(type == 21)return API.userValueOrderLs; // -
},
//
isDevice(){

2
src/subpackage/order/js/api.js

@ -32,6 +32,8 @@ export const ORDER_API = {
userValueOrderGet:`${ORIGIN}/admin/userValueOrder/get`, // 储值卡订单详情
// 20220726
rentballEndBilling:`${ORIGIN}/admin/stadium/rentball/order/end`, // 结束订单-后台
// 20220727
rentBallOrderDetails:`${ORIGIN}/admin/stadium/hardware/order/rentBallOrderDetails`, // 硬件管理-订单详情_copy
}
export default ORDER_API;

241
src/subpackage/order/pages/club_rental/detail/detail.vue

@ -8,42 +8,64 @@
<view class="ch-user">
<view class="cu-line">
<view><text>手机号码</text>{{ orderInfo.mobile || '-' }}</view>
<view>{{ orderInfo.extension.status_text || '-' }}</view>
<view>{{ extension.status_text || '-' }}</view>
</view>
<view class="cu-line">
<view><text>用户昵称</text>{{ orderInfo.extension.nickname || '-' }}</view>
<view><text>用户昵称</text>{{ extension.nickname || '-' }}</view>
</view>
</view>
</view>
<!-- 押金 -->
<block v-if="orderInfo.order_type == 'deposit'">
<view class="cr-box cr-expense-info">
<view class="cr-tit">押金信息</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>押金金额</text>{{ orderInfo.pay_amount || '0' }}
</view>
</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>押金订单号</text>{{ orderInfo.deposit_order_no || '-' }}
</view>
</view>
</view>
<view class="cr-box cr-expense-info">
<view class="cr-tit">租用详情</view>
<a-line :value="orderInfo.cabinet.rent_ball_price.goods_name || '-'">
<block slot="name">租用设备</block>
</a-line>
<a-line :value="orderInfo.deposit_order_no || '-'">
<block slot="name">订单编号</block>
</a-line>
<a-line :value="'¥' + (orderInfo.extension.buy_price || 0)">
<block slot="name">押金金额</block>
</a-line>
<view class="cei-line">
<view>积分抵扣</view>
<view>¥{{ orderInfo.deduction_amount || 0 }}</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>租用商品</text>{{ orderInfo.cabinet.rent_ball_price.goods_name || '-' }}
</view>
</view>
<view class="cei-line">
<view>折扣金额</view>
<view>-¥{{ orderInfo.discount_amount || 0 }}</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>柜子编号</text>{{ orderInfo.hardware_name || '-' }}
</view>
</view>
<view class="cei-line">
<view>优惠券优惠</view>
<view>-¥{{ orderInfo.coupons_amount || 0 }}</view>
<view class="cei-deposit-line">
<view class="cdl-left green">
<text>租用时长</text>{{ orderInfo.rent_duration || '-' }}
</view>
</view>
<view class="cei-total">
<text>合计支付</text>{{ orderInfo.pay_amount || 0 }}
<view class="cei-deposit-line">
<view class="cdl-left">
<text>租用时间</text>{{ orderInfo.start_time || '-' }}
</view>
</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>订单编号</text>{{ extension.rent_order_no || '-' }}
</view>
<view class="cdl-right main-color" @click="toDepositOrder(extension.rent_order_no)">
查看租用订单
</view>
</view>
</view>
</block>
<block v-else>
<view class="cr-rent-info cr-box">
<view class="cr-tit">租用详情</view>
@ -69,32 +91,60 @@
<block slot="name">租借时长</block>
</a-line>
</view>
<view class="cr-box cr-expense-info">
<view class="cr-tit">费用详情</view>
<a-line :value="orderInfo.extension.cost_standard || '-'">
<a-line :value="extension.cost_standard || '-'">
<block slot="name">收费标准 </block>
</a-line>
<a-line :value="orderInfo.amount ">
<block slot="name">产生费用</block>
</a-line>
<a-line :value="orderInfo.buy_price " v-if="orderInfo.order_type == 'buy'&&orderInfo.pay_status == 2">
<block slot="name">购买金额</block>
</a-line>
<view class="cei-line">
<view>积分抵扣</view>
<view>¥{{ orderInfo.deduction_amount || 0 }}</view>
</view>
<view class="cei-line">
<view>折扣金额</view>
<view>¥{{ orderInfo.discount_amount || 0 }}</view>
</view>
<view class="cei-line">
<view>优惠券优惠</view>
<view>¥{{ orderInfo.coupons_amount || 0 }}</view>
</view>
<view class="cei-total">
<text>合计支付</text>{{ orderInfo.pay_amount || 0 }}
<view class="cei-deposit-line">
<view class="cdl-left green">
<text>产生费用</text>{{ orderInfo.amount || 0 }}
</view>
<view class="cdl-right" v-if="orderInfo.order_type != 'buy'&&orderInfo.pay_status !=1">
产生费用已从押金扣取
</view>
</view>
<block v-if="orderInfo.pay_status !=1">
<view class="cei-deposit-line" v-if="orderInfo.order_type == 'buy'">
<view class="cdl-left orange">
<text>购买金额</text>{{ orderInfo.buy_price || 0 }}
</view>
<view class="cdl-right">
购买费用已从押金扣取
</view>
</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>已有押金</text>{{ deposit_order.pay_amount || 0 }}
</view>
</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>退回押金</text>{{ deposit_order.refund_amount || 0 }}
</view>
<view class="cdl-right" v-if="orderInfo.order_type != 'buy'">
回退押金已原路退返账户
</view>
</view>
<view class="cei-deposit-line">
<view class="cdl-left">
<text>押金订单号</text>{{ orderInfo.deposit_order_no || '-' }}
</view>
<view class="cdl-right main-color" @click="toDepositOrder(orderInfo.deposit_order_no)">
查看押金订单
</view>
</view>
<view class="cei-deposit-line" v-if="orderInfo.order_type == 'buy'">
<view class="cdl-left">
<text>备注</text>已购买该商品
</view>
</view>
</block>
</view>
</block>
<view class="cr-box cr-pay-info">
@ -102,20 +152,30 @@
<view class="cpi-line">
<view>订单编号</view>
<view>{{ orderInfo.order_no || '-' }}</view>
<view @click="copyOrderNo(orderInfo.order_no)">复制</view>
</view>
<view class="cpi-line">
<view>支付方式</view>
<view>{{ payTypeTxt(orderInfo.pay_type) }}</view>
</view>
<view class="cpi-line">
<view>支付时间</view>
<view>{{ orderInfo.pay_time || '-' }}</view>
</view>
<view class="cpi-line">
<view>交易流水号</view>
<view>{{ orderInfo.trade_no || '-' }}</view>
</view>
<block v-if="orderInfo.pay_status == 4">
<block v-if="orderInfo.pay_status != 0">
<view class="cpi-line">
<view>支付方式</view>
<view>{{ orderInfo.pay_type_text || '-' }}</view>
</view>
<view class="cpi-line">
<view>支付时间</view>
<view>{{ orderInfo.pay_time || '-' }}</view>
</view>
<view class="cpi-line" v-if="orderInfo.order_type == 'deposit'">
<view>交易流水号</view>
<view>{{ orderInfo.trade_no || '-' }}</view>
</view>
</block>
</view>
<view class="cr-box cr-pay-info" v-if="orderInfo.pay_status == 4&&orderInfo.order_type == 'deposit'">
<view class="cr-tit">退款信息</view>
<view class="cpi-line">
<view>退款金额</view>
<view>{{ orderInfo.refund_amount || 0 }}</view>
</view>
<view class="cpi-line">
<view>退款单号</view>
<view>{{ orderInfo.refund_no || '-' }}</view>
@ -125,15 +185,13 @@
<view>{{ orderInfo.refund_time || '-' }}</view>
</view>
<view class="cpi-line">
<view>退款金额</view>
<view>{{ orderInfo.refund_amount || 0 }}</view>
<view>退款原因</view>
<view>{{ orderInfo.refund_reason || '-' }}</view>
</view>
</block>
</view>
<view class="cr-btn" @click="depositRefundBtn" v-if="orderInfo.order_type == 'deposit'&&orderInfo.pay_status == 2">退押金</view>
<view class="cr-btn" @click="overBillingBtn" v-if="orderInfo.order_type != 'deposit'&&orderInfo.pay_status == 1">结束计费</view>
<view class="cr-btn" @click="overBillingBtn" v-if="orderInfo.order_type == 'rent'&&orderInfo.pay_status == 0">结束计费</view>
<!-- <view class="cr-btn" @click="overBillingBtn">结束计费</view> -->
<end-billing
@ -160,6 +218,18 @@ export default {
'a-line': a_line,
'end-billing': end_billing
},
computed: {
deposit_order(){
let { extension } = this;
if(extension.deposit_order)return extension.deposit_order || {};
return {};
},
extension(){
let { orderInfo } = this;
if(orderInfo.extension)return orderInfo.extension || {};
return {};
}
},
data(){
return {
orderInfo: {
@ -176,6 +246,12 @@ export default {
});
},
methods: {
copyOrderNo(data){
uni.setClipboardData({ data });
},
toDepositOrder(orderNo){
util.routeTo(`/subpackage/order/pages/club_rental/detail/detail?order_no=${orderNo}&is_end=0`, 'nT');
},
endBillingBtn: util.debounce(function(e){
this.isShowEndBilling = false;
util.showModal({
@ -226,20 +302,19 @@ export default {
})
.catch(util.hideLoad)
},
payTypeTxt: util.order_pay_type_txt,
getOrderInfo({
order_no = '',
isEndBilling = false
}){
util.showLoad();
server.get({
url: ORDER_API.hardwareOrderInfo,
url: ORDER_API.rentBallOrderDetails,
data: { order_no },
failMsg: '加载失败!'
})
.then(res=>{
util.hideLoad();
let _order = res || { extension: {} };
let _order = res.order || { extension: {} };
this.orderInfo = _order;
this.isShowEndBilling = isEndBilling;
})
@ -380,9 +455,14 @@ export default {
width: 150upx;
color: #9A9A9D;
}
&+view{
&:nth-child(2){
@include textHide(1);
}
&:nth-child(3){
margin-left: 12upx;
flex-shrink: 0;
color: $themeColor;
}
}
}
}
@ -397,5 +477,34 @@ export default {
background-color: $themeColor;
}
}
.cei-deposit-line{
@include centerFlex(flex-start);
.cdl-left{
line-height: 52upx;
font-size: 28upx;
color: #1a1a1a;
@include textHide(1);
>text{
color: #9a9a9d;
}
&.green{
color: $themeColor;
}
&.orange{
color: #FF873D;
}
}
.cdl-right{
flex-shrink: 0;
margin-left: 12upx;
font-size: 24upx;
color: #9a9a9d;
&.main-color{
color: $themeColor;
}
}
}
</style>

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

@ -58,7 +58,7 @@ function getTabList(){
{ id: 1, name: '订场订单', key: 1, iconName: 'order_14', orderType: 3 },
{ id: 2, name: '次卡订单', key: 2, iconName: 'order_2', orderType: 3 },
{ id: 3, name: '计时订单', key: 3, iconName: 'order_6', orderType: 1 },
{ id: 4, name: '储值卡订单', key: 4, iconName: 'order_1', orderType: 18 },
{ id: 4, name: '储值卡订单', key: 4, iconName: 'order_1', orderType: 21 },
{ id: 10, name: '年月卡订单', key: 19, iconName: 'order_19', orderType: 20 },
{ id: 5, name: '课程订单', key: 5, iconName: 'order_8', orderType: 12 },
{ id: 6, name: '赛事订单', key: 6, iconName: 'order_9', orderType: 14 },

7
src/subpackage/order/pages/value_card/detail/detail.vue

@ -31,7 +31,7 @@
<a-line :value="orderInfo.name || '-'">
<block slot="name">储值卡名称</block>
</a-line>
<a-line :value="orderInfo.kind || '-'">
<a-line :value="cardType(orderInfo.kind)">
<block slot="name">卡类型</block>
</a-line>
<a-line :value="'至' + (orderInfo.expired_at || '-')">
@ -273,6 +273,11 @@ export default {
this.getConsumeTypeList();
},
methods: {
cardType(type){
if(type == 1)return '个人卡';
if(type == 2 || type == 3)return '团体卡';
return '-'
},
rechargeConfirm: util.debounce(function(){
let { rechargeInfo, orderInfo } = this;
if(rechargeInfo.amount< 0)return util.showNone('充值金额有误!');

Loading…
Cancel
Save