10 Commits

  1. 5
      src/components/order_refund/info.vue
  2. 4
      src/js/api.js
  3. 2
      src/manifest.json
  4. 24
      src/pages.json
  5. 5
      src/subpackage/order/components/order_list/header.vue
  6. 50
      src/subpackage/order/components/order_list/item_temp.vue
  7. 68
      src/subpackage/order/components/search_bar.vue
  8. 7
      src/subpackage/order/js/api.js
  9. 18
      src/subpackage/order/js/handle.js
  10. 259
      src/subpackage/order/pages/booking_card/modules/refund_modal.vue
  11. 84
      src/subpackage/order/pages/booking_card/modules/time_zone.vue
  12. 296
      src/subpackage/order/pages/booking_card/order_info.vue
  13. 201
      src/subpackage/order/pages/booking_card/order_list.vue
  14. 116
      src/subpackage/order/pages/booking_card/search.vue
  15. 191
      src/subpackage/order/pages/booking_card/use_record.vue
  16. 8
      src/subpackage/order/pages/order_manage/order_manage.vue
  17. 2
      src/subpackage/order/pages/timekeeping/modules/order_search/search_bar.vue
  18. BIN
      src/subpackage/order/static/images/order_manage/order_24.png
  19. BIN
      src/subpackage/party/static/index/p-arrow.png
  20. BIN
      src/subpackage/party/static/index/p-bg-1.png
  21. BIN
      src/subpackage/party/static/index/p-bg-2.png
  22. BIN
      src/subpackage/party/static/index/p-bg-3.png
  23. BIN
      src/subpackage/party/static/index/p-bg-s-1.png
  24. BIN
      src/subpackage/party/static/index/p-bg-s-2.png
  25. BIN
      src/subpackage/party/static/index/p-bg-s-3.png
  26. BIN
      src/subpackage/party/static/index/qr-img.png
  27. BIN
      src/subpackage/party/static/login/kuang.png
  28. BIN
      src/subpackage/party/static/login/logo.png
  29. BIN
      src/subpackage/party/static/login/slogn.png
  30. BIN
      src/subpackage/party/static/miniapp/can_auth_bg.png
  31. BIN
      src/subpackage/party/static/miniapp/no_can_auth_bg.png
  32. BIN
      src/subpackage/party/static/miniapp/regular_success.png
  33. BIN
      src/subpackage/party/static/regist/camera.png
  34. BIN
      src/subpackage/party/static/regist/daojishi.png
  35. BIN
      src/subpackage/party/static/upload/icon-camera.png

5
src/components/order_refund/info.vue

@ -5,6 +5,10 @@
<view class="ri-name">退款金额</view>
<view class="ri-value">{{ refund_price }}</view>
</view>
<view class="ri-line" v-if="refundIntegral">
<view class="ri-name">回退积分</view>
<view class="ri-value">{{ refundIntegral }}</view>
</view>
<view class="ri-line">
<view class="ri-name">退款单号</view>
<view class="ri-value">{{ refund_no }}</view>
@ -28,6 +32,7 @@ export default {
refund_no: { default: '-' },
refund_time: { default: '-' },
refund_reason: { default: '-' },
refundIntegral: { default: '' },
}
}
</script>

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 ORIGIN = `http://192.168.1.135:9090`; // 20210927 测试

2
src/manifest.json

@ -73,7 +73,7 @@
// }
// },
/* wxf1294b279ad1b845 */
"appid" : "wx7106e84614cf0060",
"appid" : "wxf1294b279ad1b845",
"setting" : {
"urlCheck" : false,
"minified" : true,

24
src/pages.json

@ -645,6 +645,30 @@
"style" : {
"navigationBarTitleText": "租球机订单详情"
}
},
{
"path": "pages/booking_card/order_list",
"style" : {
"navigationBarTitleText": "订场卡订单列表"
}
},
{
"path": "pages/booking_card/order_info",
"style" : {
"navigationBarTitleText": "订场卡订单详情"
}
},
{
"path": "pages/booking_card/use_record",
"style" : {
"navigationBarTitleText": "使用记录"
}
},
{
"path": "pages/booking_card/search",
"style" : {
"navigationBarTitleText": "搜索订单"
}
}
]
},

5
src/subpackage/order/components/order_list/header.vue

@ -8,13 +8,14 @@
></stadium-select>
<!-- 时间段 -->
<view class="olh-period">
<view class="op-txt" @click="$emit('click:time')">{{ startTime || '' }} ~ {{ endTime || '' }}</view>
<view v-if="!startTime&&!endTime" class="op-txt" @click="$emit('click:time')">请选择时间</view>
<view v-else class="op-txt" @click="$emit('click:time')">{{ startTime || '' }} ~ {{ endTime || '' }}</view>
<view class="op-icon" @click="$emit('click:time')"></view>
</view>
<!-- 交易明细&按钮 -->
<view class="olh-bot">
<view class="ob-desc">
<text>成功交易{{ successCount || 0 }}退款{{ refundCount || 0 }}</text>
<text v-if="successCount || refundCount">成功交易{{ successCount || 0 }}退款{{ refundCount || 0 }}</text>
</view>
<view class="ob-btns">
<image @click="$emit('click:search')" class="ob-icon" src="../../static/images/search.png"></image>

50
src/subpackage/order/components/order_list/item_temp.vue

@ -0,0 +1,50 @@
<template>
<view class="list-item-temp" @click="$emit('click:item')">
<view class="lit-stadium-status">
<view class="lss-stadium">{{ stadium || '' }}</view>
<view
class="lss-status"
:class="{ active: statusActive }"
>{{ status }}</view>
</view>
<slot name="default">content</slot>
</view>
</template>
<script>
export default {
props: {
stadium: String,
status: String,
statusActive: Boolean,
},
data(){
return{ }
}
}
</script>
<style lang="scss">
.list-item-temp{
padding: 0 20upx 30upx;
border-radius: 10upx;
background: #fff;
.lit-stadium-status{
padding: 30upx 0 26upx;
border-bottom: 1px solid #D8D8D8;
@include ctf(space-between);
.lss-stadium{
@include flcw(28upx, 40upx, #1A1A1A, 500);
@include tHide;
}
.lss-status{
flex-shrink: 0;
margin-left: 12upx;
@include flcw(28upx, 40upx, #9A9A9D);
&.active{
color: $mColor;
}
}
}
}
</style>

68
src/subpackage/order/components/search_bar.vue

@ -0,0 +1,68 @@
<template>
<view class="search-bar">
<view class="sb-box">
<image class="sb-search-icon" mode="aspectFit" src="/subpackage/order/static/images/search.png"></image>
<input class="sb-ipt" :placeholder="placeholder" v-model="searchTxt" confirm-type="search" @confirm="iptConfirm" />
<image class="sb-clear-icon" v-if="searchTxt!=''" mode="aspectFit" src="/subpackage/order/static/images/round_close.png" @click="clearSearch"></image>
</view>
</view>
</template>
<script>
export default {
props: {
placeholder: {
type: String,
default: '请输入订单号'
}
},
data() {
return {
searchTxt: ''
}
},
methods: {
iptConfirm(){
this.$emit('confirm:search', this.searchTxt);
},
clearSearch(){
this.searchTxt = '';
this.$emit('click:clear', '');
}
}
}
</script>
<style lang="scss">
.search-bar{
margin-bottom: 24upx;
height: 144upx;
background-color: #fff;
@include ctf(center);
.sb-box{
padding: 0 20upx;
height: 92upx;
width: 702upx;
border-radius: 10upx;
background-color: #f2f2f7;
@include ctf(center);
.sb-search-icon{
margin-right: 20upx;
flex-shrink: 0;
width: 40upx;
height: 40upx;
}
.sb-clear-icon{
flex-shrink: 0;
margin-right: 0;
margin-left: 20upx;
width: 32upx;
height: 32upx;
}
.sb-ipt{
flex-grow: 1;
@include flcw(32upx, 44upx, #1A1A1A);
}
}
}
</style>

7
src/subpackage/order/js/api.js

@ -49,6 +49,13 @@ export const ORDER_API = {
userValueCardRefundFixed:`${ORIGIN}/admin/userValueCard/refundFixed`, // 储值卡订单-退款
orderRefund:`${ORIGIN}/admin/stadium/order/refund`, // A订单管理-场馆预订订单-订单退款 (零售订单、场地、次卡)
userMonthlyCardRefundFixed:`${ORIGIN}/admin/userMonthlyCard/refundFixed`, // 年月卡订单-订单退款
// 20250318 tid1929 订场卡
cardOrderList:`${ORIGIN}/admin/venue/number/card/order/list`, // 订场卡订单 - 列表
cardOrderGet:`${ORIGIN}/admin/venue/number/card/order/get`, // 订场卡订单 - 详情
cardOrderRefund:`${ORIGIN}/admin/venue/number/card/order/refund`, // 订场卡订单 - 退款
cardSoldUsage:`${ORIGIN}/admin/venue/number/card/sold/usage`, // 已售订场卡 - 使用记录
}
export default ORDER_API;

18
src/subpackage/order/js/handle.js

@ -0,0 +1,18 @@
import { formatDate } from '@/utils/util';
// 初始化默认时间
export function initPeriod({ beforeDays, afterDays }) {
let _dateTimeStemp = new Date().getTime();
let _daysTimeStemp = (beforeDays || afterDays || 0) * 24 * 60 * 60 * 1000;
let _curDate = formatDate({});
if (beforeDays) return {
start: formatDate({ date: _dateTimeStemp - _daysTimeStemp }),
end: _curDate
}
if (afterDays) return {
start: _curDate,
end: formatDate({ date: _dateTimeStemp + _daysTimeStemp })
}
return {};
}

259
src/subpackage/order/pages/booking_card/modules/refund_modal.vue

@ -0,0 +1,259 @@
<template>
<view class="order-refund-modal">
<view class="orm-mask" v-show="isShow">
<view class="om-content">
<image class="oc-close" mode="aspectFit" src="/subpackage/order/static/images/close.png" @click="hide"></image>
<view class="oc-title">退款</view>
<view class="oc-section">
<view class="os-info">
<view class="oi-name">{{ refundInfo.stadium_name || '' }}</view>
<view class="oi-line">订单编号{{ refundInfo.order_no || '' }}</view>
<view class="oi-line">手机号码{{ refundInfo.mobile || '' }}</view>
<view class="os-ipts">
<view class="oi-item">
<view class="oi-name">
<text class="on-txt">*</text>
退款金额
</view>
<view class="oi-right">
<input
class="or-ipt"
type="digit"
v-model="iptInfo.refund_amount"
:disabled="refundInfo.refund_times > 0"
:class="{ 'or-disabled': refundInfo.refund_times > 0 }"
/>
<view class="or-tip">可退{{ refundInfo.refundable_amount || 0 }}</view>
</view>
</view>
<view class="oi-item">
<view class="oi-name">
<text class="on-txt">*</text>
退款积分
</view>
<view class="oi-right">
<input
class="or-ipt" type="digit"
v-model="iptInfo.refund_integral"
:disabled="refundInfo.refund_times > 0"
:class="{ 'or-disabled': refundInfo.refund_times > 0 }"
/>
<view class="or-tip">可退{{ refundInfo.refundable_integral || 0 }}积分</view>
</view>
</view>
<view class="oi-item">
<view class="oi-name">
<text class="on-txt">*</text>
扣减时间
</view>
<view class="oi-right">
<input
class="or-ipt" type="digit"
v-model="iptInfo.refund_time"
/>
<view class="or-tip">可扣减时间{{ refundInfo.refundable_hours || 0 }}小时</view>
</view>
</view>
</view>
<view class="os-remark">
<view class="or-txt">备注</view>
<view class="or-txt">订场卡订单退款后根据输入的扣减时间将会从订场卡剩余可用时间里扣减相对应的时间</view>
</view>
</view>
</view>
<view class="oc-btns">
<view class="ob-item" @click="cancelBtn">取消</view>
<view class="ob-item" @click="confirmBtn">确认</view>
</view>
</view>
</view>
</view>
</template>
<script>
/**
* PM:
* 什么状态下都能退
* 全部订单都能退两次, 所有订单最多只能退2次款
* 只要订单金额是未全退的都能退
* 0元订单不能退
*
*/
import { mapState } from 'vuex';
import { showModal } from '@/utils/util';
export default {
computed: {
...mapState([ 'brandInfo' ])
},
data() {
return {
isShow: false,
refundInfo: {
/**
* @param {String} stadium_name 店铺名称
* @param {String} order_no 订单编号
* @param {String} mobile 手机号码
* @param {String} refundable_amount 退款金额
* @param {String} refundable_integral 退款积分
* @param {String} refundable_hours 可退时间
* @param {Number} refund_times 退款次数
* @param {Function} cancel 取消回调
* @param {Function} confirm 确认回调
*/
},
iptInfo: {
refund_amount: '',
refund_integral: '',
refund_time: ''
}
}
},
methods: {
show(initData){
let { brandInfo } = this;
if(brandInfo?.permission?.['1018']){
this.isShow = true;
this.init(initData);
}else{
showModal({
content: '您没有退款权限',
})
}
},
init(data){
this.iptInfo.refund_amount = data?.refundable_amount || '0';
this.iptInfo.refund_integral = data?.refundable_integral || '0';
this.iptInfo.refund_time = data?.refundable_hours || '0';
this.refundInfo = data;
},
hide(){
this.isShow = false;
},
cancelBtn() {
this.hide();
this.$emit('click:cancel');
this.refundInfo?.cancel?.(0);
},
confirmBtn() {
let { iptInfo, refundInfo } = this;
this.$emit('click:confirm');
this.refundInfo?.confirm?.({
refund_amount: +iptInfo?.refund_amount || 0,
refund_integral: +iptInfo?.refund_integral || 0,
refund_time: +iptInfo?.refund_time || 0,
});
this.hide();
}
}
}
</script>
<style lang="scss">
.order-refund-modal{}
.orm-mask{
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,.5);
z-index: 10;
}
.om-content{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding-bottom: 80upx;
width: 620upx;
border-radius: 10px;
background: #fff;
.oc-close{
position: absolute;
top: 30upx;
right: 30upx;
width: 34upx;
height: 34upx;
}
.oc-title{
padding-top: 78upx;
text-align: center;
@include flcw(32upx, 44upx, #333, 500);
}
.oc-section{
padding: 30upx 30upx 0;
@include ctf(center);
.os-info{
.oi-name{
@include flcw(28upx, 48upx, #333);
}
.oi-line{
@include flcw(28upx, 48upx, #9C9C9F);
}
.os-ipts{
padding-top: 34upx;
.oi-item{
display: flex;
align-items: flex-start;
.oi-name{
@include flcw(28upx, 56upx, #333333);
.on-txt{
color: #EA5061;
}
}
.oi-right{
margin-left: 16upx;
flex-shrink: 0;
width: 312upx;
.or-ipt{
display: block;
box-sizing: border-box;
padding: 0 20upx;
width: 100%;
height: 56upx;
border-radius: 10upx;
border: 2upx solid #D8D8D8;
@include flcw(28upx, 48upx, #9C9C9F);
&.or-disabled{
background: #cecece;
color: #9C9C9F;
}
}
.or-tip{
padding-left: 8upx;
@include flcw(24upx, 48upx, #EA5061);
@include tHide;
}
}
}
}
.os-remark{
.or-txt{
@include flcw(28upx, 48upx, #1A1A1A);
}
}
}
}
.oc-btns{
margin-top: 32upx;
padding: 0 54upx;
@include ctf(space-between);
.ob-item{
width: 240upx;
height: 88upx;
text-align: center;
border: 2upx solid $mColor;
border-radius: 10upx;
@include flcw(32upx, 84upx, $mColor, 500);
&+.ob-item{
background: $mColor;
color: #fff;
}
}
}
}
</style>

84
src/subpackage/order/pages/booking_card/modules/time_zone.vue

@ -0,0 +1,84 @@
<template>
<view class="time-zone">
<picker mode="date" @change="startTimeChange">
<view class="tz-box">
<input disabled class="tb-ipt" placeholder="选择时间" :value="timeStart" />
<view class="tb-icon"></view>
</view>
</picker>
<text class="tz-txt"></text>
<picker mode="date" @change="endTimeChange">
<view class="tz-box">
<input disabled class="tb-ipt" placeholder="选择时间" :value="timeEnd" />
<view class="tb-icon"></view>
</view>
</picker>
</view>
</template>
<script>
import { showNone } from "@/utils/util";
export default {
data(){
return {
timeStart: '',
timeEnd: ''
}
},
methods: {
startTimeChange(e){
let { timeEnd } = this;
let _curTime = e?.detail?.value || '';
let _startTimeStamps = new Date(_curTime.replace(/\-/g, '/')).getTime();
let _endTimeStamps = new Date(timeEnd.replace(/\-/g, '/')).getTime();
if(_endTimeStamps && _startTimeStamps > _endTimeStamps)return showNone('开始时间不能大于结束时间');
this.timeStart = _curTime;
this.$emit('change:time', { start: _curTime, end: timeEnd });
},
endTimeChange(e){
let { timeStart } = this;
let _curTime = e?.detail?.value || '';
let _startTimeStamps = new Date(timeStart.replace(/\-/g, '/')).getTime();
let _endTimeStamps = new Date(_curTime.replace(/\-/g, '/')).getTime();
if(_startTimeStamps && _startTimeStamps > _endTimeStamps)return showNone('结束时间不能小于开始时间');
this.timeEnd = _curTime;
this.$emit('change:time', { start: timeStart, end: _curTime });
}
}
}
</script>
<style lang="scss">
.time-zone{
padding: 26upx 30upx;
background: #fff;
@include ctf(space-between);
.tz-box{
width: 312upx;
height: 92upx;
padding: 0 20upx;
background: #F2F2F7;
border-radius: 10upx;
@include ctf;
.tb-ipt{
flex-grow: 1;
height: 100%;
@include flcw(32upx, 44upx, #333333);
}
.tb-icon{
flex-shrink: 0;
width: 0;
height: 0;
border-left: 12upx solid transparent;
border-right: 12upx solid transparent;
border-top: 12upx solid #333333;
}
}
.tz-txt{
@include flcw(28upx, 40upx, #9A9A9D);
}
}
</style>

296
src/subpackage/order/pages/booking_card/order_info.vue

@ -0,0 +1,296 @@
<template>
<view class="booking-card">
<view class="bc-header">
<view class="odh-stadium">
<image v-if="extension.stadium_logo" class="os-img" mode="aspectFit" :src="extension.stadium_logo"></image>
<view class="os-name">{{ extension.stadium_name || '-' }}</view>
</view>
<view class="bh-content">
<kv-line label="订单编号:">
<template v-slot:default>{{ orderInfo.order_no || '-' }}</template>
<template v-slot:right>
<text
class="od-status"
:class="false ? 'active' : ''"
>{{ orderInfo.pay_status_text || '-' }}</text>
</template>
</kv-line>
<kv-line label="创建时间:">{{ orderInfo.created_at || '-' }}</kv-line>
<kv-line label="手机号码:">{{ orderInfo.mobile || '-' }}</kv-line>
<kv-line label="用户昵称:">{{ orderInfo.nickname || '-' }}</kv-line>
</view>
</view>
<view class="bc-box bc-cards">
<view class="bb-tit">
<view class="bt-name">订场卡信息</view>
<view class="bt-record" @click="toRecord">使用记录</view>
</view>
<view class="bb-content">
<kv-line label="订场卡名称:">{{ orderInfo.card_info_name || '-' }}</kv-line>
<kv-line label="订场卡号:">{{ orderInfo.user_card_no || '-' }}</kv-line>
<kv-line label="来源:">{{ orderInfo.source || '-' }}</kv-line>
</view>
<view class="bc-discount">
<kvs-line label="金额小计">¥{{ orderInfo.amount || '0' }}</kvs-line>
<kvs-line label="折扣金额">-¥{{ orderInfo.discount_amount || '0' }}</kvs-line>
<kvs-line label="积分抵扣">-¥{{ orderInfo.deduction_amount || '0' }}</kvs-line>
<kvs-line label="优惠券优惠">-¥{{ orderInfo.coupons_amount || '0' }}</kvs-line>
<view class="od-total">
<text class="pt-name">合计支付</text>{{ orderInfo.pay_amount || '0' }}
</view>
</view>
</view>
<view class="bc-box bc-payment">
<view class="bb-tit">
<view class="bt-name">支付信息</view>
</view>
<view class="bb-content">
<kv-line label="支付方式:">{{ orderInfo.pay_type_text || '-' }}</kv-line>
<kv-line label="支付时间:">{{ orderInfo.pay_time || '-' }}</kv-line>
<kv-line label="交易号:" v-if="orderInfo.trade_no">{{ orderInfo.trade_no || '-' }}</kv-line>
</view>
</view>
<!-- 退款列表 -->
<view v-for="(e, i) in refunds" :key="i">
<view style="height: 24rpx;"></view>
<order-refund-info
:refund_price="e.amount || 0"
:refund_no="e.refund_no || '-'"
:refund_time="e.refund_time || '-'"
:refund_reason="e.reason || '-'"
:nameKey="i + 1"
:refund-integral="e.deduction_integral"
></order-refund-info>
</view>
<view class="bc-fixed" v-if="refunds.length < 2 && extension.refundable_amount > 0">
<view class="bf-btn" @click="refundBtn">退款</view>
</view>
<!-- 退款弹窗 -->
<order-refund-modal ref="orderRefundModal" ></order-refund-modal>
</view>
</template>
<script>
import kvLine from "../../components/kv_line.vue";
import kvsLine from "../../components/kvs_line.vue";
import orderRefundModal from './modules/refund_modal.vue';
import orderRefundInfo from '@/components/order_refund/info.vue';
import { ORDER_API } from '../../js/api';
import server from '../../js/server';
import { showLoad, hideLoad, showNone, routeTo } from '@/utils/util';
export default {
components: {
kvLine,
kvsLine,
orderRefundModal,
orderRefundInfo
},
computed: {
extension(){
return this.orderInfo?.extension ?? {};
},
refunds(){
return this.orderInfo?.refunds ?? [];
}
},
data(){
return {
orderInfo: {},
}
},
onLoad(options){
this.cardOrderGet({
brand_id: options.brand_id ?? '',
order_no: options.order_no ?? '',
});
},
methods: {
toRecord(){
let { orderInfo } = this;
let _qryStr = `card_no=${orderInfo?.user_card_no || ''}&brand_id=${orderInfo?.brand_id || ''}`;
routeTo(`/subpackage/order/pages/booking_card/use_record?${_qryStr}`, 'nT');
},
refundBtn(){
let { orderInfo, extension, refunds } = this;
this.$refs.orderRefundModal.show({
stadium_name: extension?.stadium_name ?? '',
order_no: orderInfo?.order_no ?? '',
mobile: orderInfo?.mobile ?? '',
refundable_amount: extension?.refundable_amount ?? 0,
refundable_integral: extension?.refundable_integral ?? 0,
refundable_hours: extension?.refundable_hours ?? 0,
refund_times: refunds?.length || -1,
confirm: e => {
this.cardOrderRefund({
brand_id: orderInfo?.brand_id ?? '',
stadium_id: orderInfo?.stadium_id ?? '',
order_no: orderInfo?.order_no ?? '',
amount: e.refund_amount ?? 0,
deduction_integral: e.refund_integral ?? 0,
hours: e.refund_time ?? 0,
})
.finally(()=>{
setTimeout(()=>{
this.cardOrderGet({
brand_id: orderInfo?.brand_id || '',
order_no: orderInfo?.order_no || ''
});
}, 1000);
})
}
});
},
// -
cardOrderGet({ brand_id, order_no }){
showLoad();
return server.post({
url: ORDER_API.cardOrderGet,
data: {
brand_id: +brand_id, order_no,
},
isDefaultGet: false,
})
.then(res => {
hideLoad();
let _data = res?.data || {};
if(_data.code === 0){
this.orderInfo = _data.data ?? {};
}else{
return Promise.reject(_data);
}
})
.catch(err => {
hideLoad();
showModal({ content: err.message || '加载列表失败!' })
console.warn('subpackage order bookingcard order info cardOrderGet err --->', err);
})
},
// - 退
cardOrderRefund({ brand_id, stadium_id, order_no, amount, deduction_integral, hours }){
showLoad();
return server.post({
url: ORDER_API.cardOrderRefund,
data: {
brand_id: +brand_id, stadium_id, order_no,
amount, deduction_integral, hours
},
failMsg: '操作失败!'
})
.then(res=>{
hideLoad();
showNone('操作成功!');
// this.orderInfo = res || {};
return 'success';
})
.catch(err=>{
hideLoad();
showNone('操作失败!');
console.warn('subpackage order bookingcard order info cardOrderRefund err -->', err);
})
}
}
}
</script>
<style lang="scss">
.booking-card{
padding: 24upx;
@include isPd(132upx);
.bc-header{
padding: 0 30upx 40upx;
border-radius: 10upx;
background: #fff;
.odh-stadium{
padding: 26upx 0;
border-bottom: 1px solid #D8D8D8;
@include ctf(flex-start);
.os-img{
flex-shrink: 0;
margin-right: 14upx;
width: 40upx;
height: 40upx;
}
.os-name{
@include flcw(28upx, 40upx, #333333, 500);
@include tHide;
}
}
.bh-content{
margin-top: 26upx;
.od-status{
margin-left: auto;
flex-shrink: 0;
@include flcw(28upx, 40upx, #9C9C9F);
&.active{
color: $mColor;
}
}
}
}
.bc-box{
margin-top: 24upx;
padding: 30upx;
border-radius: 10upx;
background: #fff;
.bb-tit{
@include ctf(space-between);
.bt-name{
@include flcw(28upx, 40upx, #9C9C9F);
@include tHide;
}
.bt-record{
flex-shrink: 0;
max-width: 250upx;
@include flcw(28upx, 40upx, $mColor);
@include tHide;
}
}
.bb-content{
padding-top: 20upx;
}
}
.bc-cards{
.bc-discount{
margin-top: 20upx;
border-top: 1px solid #D8D8D8;
.od-total{
padding-top: 10upx;
text-align: right;
@include flcw(28upx, 50upx, #1A1A1A, 500);
@include tHide;
.pt-name{
color: #9A9A9D;
font-weight: 400;
}
}
}
}
.bc-fixed{
position: fixed;
left: 0;
bottom: 0;
padding: 10upx 24upx;
width: 100%;
background: #f2f2f7;
@include ctf(flex-end);
.bf-btn{
width: 192upx;
border-radius: 10upx;
text-align: center;
background: #fff;
@include flcw(32upx, 88upx, $mColor, 500);
}
}
}
</style>

201
src/subpackage/order/pages/booking_card/order_list.vue

@ -0,0 +1,201 @@
<template>
<view class="booking-cards">
<order-list-header
ref="orderListHeader"
@change:stadium="changeStadium"
@click:filter="showFilterModal"
@click:time="showPeriodModal"
@click:search="searchOrder"
:start-time="condition.start"
:end-time="condition.end"
:success-count="lsInfo.success_count"
:refund-count="lsInfo.refund_count"
></order-list-header>
<view class="bc-list">
<block v-for="(e, i) in orderLs" :key="i">
<view style="height: 24rpx;"></view>
<item-temp
:stadium="e.brand_name"
:status="e.pay_status_text"
@click:item="itemClick(e)"
>
<kv-line label="订单号:">{{ e.order_no || '-' }}</kv-line>
<kv-line label="订场卡名称:">{{ e.card_info_name || '-' }}</kv-line>
<kv-line label="手机号码:">{{ e.mobile || '-' }}</kv-line>
<kv-line label="支付时间:">{{ e.pay_time || '-' }}</kv-line>
<kv-line label="来源:">{{ e.source || '-' }}</kv-line>
<view class="bl-price"><text class="bp-txt">支付金额</text>{{ e.pay_amount || '0' }}</view>
</item-temp>
</block>
</view>
<!-- 时间段选择 -->
<period-modal ref="periodModal" ></period-modal>
<!-- status窗口 -->
<filter-modal ref="filterModal"></filter-modal>
</view>
</template>
<script>
import orderListHeader from "../../components/order_list/header.vue";
import periodModal from "../../components/order_list/period_modal.vue";
import filterModal from "../../components/order_list/filter_modal.vue";
import itemTemp from "../../components/order_list/item_temp.vue";
import kvLine from "../../components/kv_line.vue";
import { ORDER_API } from '../../js/api';
import server from '../../js/server';
import { showLoad, hideLoad, showNone, routeTo } from '@/utils/util';
import { initPeriod } from "../../js/handle";
export default {
components: {
orderListHeader,
itemTemp,
kvLine,
periodModal,
filterModal
},
data(){
return {
brand_id: '',
condition: { //
stadium_id: '', // id
start: '', //
end: '', //
status: '', //
},
orderLs: [],
page: 1,
lsInfo: {}
}
},
watch: {
condition: {
handler(nVal, oVal){
let { brand_id } = this;
this.orderLs = [];
this.page = 1;
this.cardOrderList({
brand_id: brand_id || '',
stadium_id: nVal?.stadium_id ?? '',
status: nVal?.status ?? '',
begin: nVal?.start ?? '',
end: nVal?.end ?? '',
})
},
deep: true
}
},
onLoad(options){
let _bid = options?.brand_id || '';
this.brand_id = _bid;
this.$refs.orderListHeader.initStadiumSelect(_bid);
this.cardOrderList({ brand_id: _bid });
// this.initCondition();
},
onReachBottom(){
let { brand_id, condition, page } = this;
this.cardOrderList({
brand_id: brand_id || '',
stadium_id: condition?.stadium_id ?? '',
status: condition?.status ?? '',
begin: condition?.start ?? '',
end: condition?.end ?? '',
page: page + 1
})
},
methods: {
//
searchOrder(){
let { brand_id } = this;
let _qryStr = `brand_id=${brand_id || ''}`;
routeTo(`/subpackage/order/pages/booking_card/search?${_qryStr}`, 'nT');
},
//
showPeriodModal(){
let { start, end } = this.condition;
this.$refs.periodModal.init({
start: start,
end: end,
success: res=>{
this.condition.start = res.start;
this.condition.end = res.end;
}
});
},
//
showFilterModal(){
this.$refs.filterModal.init({
title: '订单状态',
list: [{ label: '全部', value: '' }, { label: '已付款', value: '1' }, { label: '已退款', value: '4' }],
curValue: this.condition.status,
success: item =>{
this.condition.status = item.value;
}
});
},
//
changeStadium(e){
this.condition.stadium_id = e.id;
},
initCondition(){
let { start, end } = initPeriod({ beforeDays: 100 });
this.condition.start = start;
this.condition.end = end;
},
itemClick(e){
let _qryStr = `brand_id=${e.brand_id ?? ''}&order_no=${e.order_no ?? ''}`;
routeTo(`/subpackage/order/pages/booking_card/order_info?${_qryStr}`, 'nT');
},
// -
cardOrderList({ brand_id, stadium_id = '', status = '', key = '', begin = '', end = '', page = 1, page_size = 10 }){
showLoad();
let _beginStr = begin ? `${begin} 00:00:00` : '';
let _endStr = end ? `${end} 23:59:59` : '';
return server.post({
url: ORDER_API.cardOrderList,
data: {
brand_id: +brand_id, stadium_id,
status, key,
begin: _beginStr, end: _endStr,
page, page_size
},
isDefaultGet: false,
})
.then(res => {
hideLoad();
let _data = res?.data || {};
if(_data.code === 0){
let { list, ..._lsInfo } = _data?.data || {};
let _ls = list || [];
this.lsInfo = _lsInfo;
if(page === 1)return this.orderLs = _ls;
if(_ls.length <= 0)return showNone('没有更多!');
this.orderLs = [...this.orderLs, ..._ls];
this.page = page;
}else{
return Promise.reject(_data);
}
})
.catch(err => {
hideLoad();
showModal({ content: err.message || '加载列表失败!' })
console.warn('subpackage order bookingcard order list cardSoldList err --->', err);
})
},
}
}
</script>
<style lang="scss">
.bc-list{
padding: 0 24upx;
@include isPd(24upx);
.bl-price{
text-align: right;
@include flcw(28upx, 40upx, #333, 500);
@include tHide;
.bp-txt{
color: #9a9a9d;
font-weight: 400;
}
}
}
</style>

116
src/subpackage/order/pages/booking_card/search.vue

@ -0,0 +1,116 @@
<template>
<view class="order-search">
<search-bar
placeholder="请输入订单号/手机号码"
@confirm:search="searchOrder"
></search-bar>
<view class="os-list">
<block v-for="(e, i) in orderLs" :key="i">
<view class="tl-item">
<item-temp
:stadium="e.brand_name"
:status="e.pay_status_text"
@click:item="itemClick(e)"
>
<kv-line label="订单号:">{{ e.order_no || '-' }}</kv-line>
<kv-line label="订场卡名称:">{{ e.card_info_name || '-' }}</kv-line>
<kv-line label="手机号码:">{{ e.mobile || '-' }}</kv-line>
<kv-line label="支付时间:">{{ e.pay_time || '-' }}</kv-line>
<kv-line label="来源:">{{ e.source || '-' }}</kv-line>
</item-temp>
</view>
</block>
</view>
</view>
</template>
<script>
import search_bar from '../../components/search_bar.vue';
import itemTemp from "../../components/order_list/item_temp.vue";
import kvLine from "../../components/kv_line.vue";
import { ORDER_API } from '../../js/api';
import server from '../../js/server';
import { showLoad, hideLoad, showNone, routeTo } from '@/utils/util';
export default {
components: {
'search-bar': search_bar,
itemTemp,
kvLine,
},
data() {
return {
brand_id: '',
orderLs: [],
page: 1,
searchTxt: ''
}
},
onLoad(options) {
let _bid = options?.brand_id || '';
this.brand_id = _bid;
},
onReachBottom(){
let { page, brand_id, searchTxt } = this;
this.cardOrderList({
brand_id: brand_id ?? '',
key: searchTxt ?? '',
page: ++page
})
},
methods: {
itemClick(e){
let _qryStr = `brand_id=${e.brand_id ?? ''}&order_no=${e.order_no ?? ''}`;
routeTo(`/subpackage/order/pages/booking_card/order_info?${_qryStr}`, 'nT');
},
searchOrder(value){
let { brand_id } = this;
this.searchTxt = value;
this.page = 1;
this.cardOrderList({ brand_id: +brand_id, key: value });
},
// -
cardOrderList({ brand_id, stadium_id = '', status = '', key = '', begin = '', end = '', page = 1, page_size = 10 }){
showLoad();
return server.post({
url: ORDER_API.cardOrderList,
data: {
brand_id: +brand_id, stadium_id,
status, key,
begin, end,
page, page_size
},
isDefaultGet: false,
})
.then(res => {
hideLoad();
let _data = res?.data || {};
if(_data.code === 0){
let _ls = _data?.data?.list || [];
if(page === 1)return this.orderLs = _ls;
if(_ls.length <= 0)return showNone('没有更多!');
this.orderLs = [...this.orderLs, ..._ls];
this.page = page;
}else{
return Promise.reject(_data);
}
})
.catch(err => {
hideLoad();
showModal({ content: err.message || '加载列表失败!' })
console.warn('subpackage order bookingcard order list cardSoldList err --->', err);
})
},
}
}
</script>
<style lang="scss">
.os-list{
padding: 24upx;
@include isPd(24upx);
.tl-item + .tl-item{
margin-top: 24upx;
}
}
</style>

191
src/subpackage/order/pages/booking_card/use_record.vue

@ -0,0 +1,191 @@
<template>
<view class="use-record">
<time-zone @change:time="timeChange"></time-zone>
<view class="ur-ls">
<view class="ul-item" v-for="(e, i) in usageLs" :key="i">
<view class="ui-tit-bar">
<view class="utb-status">{{ e.usage_type || '-' }}</view>
<view class="utb-time" :class="{ 'ut-active': e.card_hours_usage > 0 }">{{ e.card_hours_usage || '-' }}小时</view>
</view>
<view class="ui-lines">
<view class="uli-item">
<view class="ui-label">操作人</view>
<view class="ui-value">{{ e.source || '-' }}</view>
</view>
<view class="uli-item">
<view class="ui-label">余额</view>
<view class="ui-value">{{ e.card_hours_surplus || '0' }}小时</view>
</view>
<view class="uli-item" v-if="e.link_order_no">
<view class="ui-label">订单号</view>
<view class="ui-num" @click="toOrderInfo(e)">
<view class="un-txt">{{ e.link_order_no || '-' }}</view>
<!-- <image class="un-icon" mode="aspectFit" src="/subpackage/booking_card/static/images/arrow_green.png"></image> -->
</view>
</view>
<view class="uli-item">
<view class="ui-label">使用时间</view>
<view class="ui-value">{{ e.created_at || '-' }}</view>
</view>
<view class="uli-item">
<view class="ui-label">说明</view>
<view class="ui-value">{{ e.desc || '-' }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import time_zone from "./modules/time_zone.vue";
import { ORDER_API } from '../../js/api';
import server from '../../js/server';
import { showLoad, hideLoad, showNone, routeTo } from '@/utils/util';
export default {
components: {
"time-zone": time_zone
},
data(){
return {
usageLs: [],
times: {
start: '',
end: ''
},
page: 1,
optionsQuery: {}
}
},
onLoad(options){
this.getUsercardUsage({
brand_id: options?.brand_id || '',
card_no: options?.card_no || ''
})
this.optionsQuery = options || {};
},
onReachBottom(){
let { page, times, optionsQuery } = this;
this.getUsercardUsage({
brand_id: optionsQuery?.brand_id || '',
card_no: optionsQuery?.card_no || '',
page: ++page,
start_time: times.start,
end_time: times.end
})
},
methods: {
toOrderInfo(e){
// if(!e.link_order_no)return;
// let _qryStr = `order_no=${e.link_order_no}&brand_id=${e.brand_id || ''}&stadium_id=${ e.stadium_id || '' }`;
// // 20241127 usage_type === '' || usage_type === '退'
// let _pathStr = '/subpackage/booking_card/pages/mine/detail';
// if(['', '退' ].includes(e.usage_type))_pathStr = `/pages/venue/venue_order_detail/venue_order_detail`;
// routeTo(`${_pathStr}?${_qryStr}`, 'nT');
},
timeChange(e){
let { optionsQuery } = this;
let { start, end } = e;
this.times = { start, end };
this.usageLs = [];
this.page = 1;
this.getUsercardUsage({
brand_id: optionsQuery?.brand_id || '',
card_no: optionsQuery?.card_no || '',
start_time: start,
end_time: end
})
},
getUsercardUsage({ brand_id = '', card_no = '', page = 1, page_size = 10, start_time = '', end_time = '' }){
showLoad();
return server.get({
url: ORDER_API.cardSoldUsage,
data: { brand_id, card_no, page, page_size, start_time, end_time },
failMsg: '获取记录失败'
})
.then(res => {
hideLoad();
let _ls = res.list || [];
// let _ls = res?.list || [];
if(page === 1)return this.usageLs = _ls;
if(!_ls.length)return showNone('没有更多!');
this.page = page;
return this.usageLs = [...this.usageLs, ..._ls];
})
.catch(err => {
hideLoad();
console.warn('subpackage order booking card use record getUsercardUsage err --->', err);
// return Promise.reject(err);
})
},
}
}
</script>
<style lang="scss">
.use-record{
@include isPd(24upx);
}
.ur-ls{
padding-top: 24upx;
.ul-item{
padding: 28upx;
background: #fff;
& + .ul-item{
margin-top: 24upx;
}
.ui-tit-bar{
padding-bottom: 30upx;
border-bottom: 1px solid #E5E5E5;
@include ctf(space-between);
.utb-status{
max-width: 50%;
@include tHide;
@include flcw(32upx, 44upx, #333333);
}
.utb-time{
max-width: 50%;
@include tHide;
@include flcw(32upx, 44upx, #9A9A9D);
&.ut-active{
color: #FF873D;
}
}
}
.ui-lines{
padding: 16upx 20upx;
.uli-item{
@include ctf;
&+&{
margin-top: 24upx;
}
.ui-label{
flex-shrink: 0;
@include flcw(28upx, 52upx, #9A9A9D);
}
.ui-value{
@include tHide;
@include flcw(28upx, 52upx, #333333);
}
.ui-num{
@include ctf;
.un-txt{
@include tHide;
@include flcw(28upx, 52upx, $mColor);
}
.un-icon{
flex-shrink: 0;
margin-left: 16upx;
width: 24upx;
height: 24upx;
}
}
}
}
}
}
</style>

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

@ -38,6 +38,11 @@ export default {
let _qryStr = `order_type=${ele.orderType}&brand_id=${brandInfo?.brand?.id || ''}`;
return util.routeTo(`/subpackage/order/pages/timekeeping/order_list?${_qryStr}`, 'nT');
}
// 20250319 tid1929
if([24].includes(ele.key)){
let _qryStr = `brand_id=${brandInfo?.brand?.id || ''}`;
return util.routeTo(`/subpackage/order/pages/booking_card/order_list?${_qryStr}`, 'nT');
}
if(ele.orderType === 3){ // &
let _type = ele.key - 1; // 0 -> / 1 ->
@ -48,7 +53,7 @@ export default {
util.routeTo(getTabRoutePath() + `?order_type=${ele.orderType}`,'nT');
},
isFinish(key){
let _endKeyArr = [ 1, 2, 4, 5, 7, 9, 10, 14, 16, 15, 13, 6, 8, 11, 12, 18, 19, 22, 23];
let _endKeyArr = [ 1, 2, 4, 5, 7, 9, 10, 14, 16, 15, 13, 6, 8, 11, 12, 18, 19, 22, 23, 24];
return _endKeyArr.includes(key);
}
}
@ -77,6 +82,7 @@ function getTabList(){
{ id: 8, name: '商城订单', key: 8, iconName: 'order_4', orderType: 2 },
{ id: 9, name: '积分兑换订单', key: 9, iconName: 'order_5', orderType: 5 },
{ id: 9, name: '零售订单', key: 18, iconName: 'order_18', orderType: 19 },
{ id: 24, name: '订场卡订单', key: 24, iconName: 'order_24', orderType: 24 },
]
}

2
src/subpackage/order/pages/timekeeping/modules/order_search/search_bar.vue

@ -2,7 +2,7 @@
<view class="search-bar">
<view class="sb-box">
<image class="sb-search-icon" mode="aspectFit" src="/subpackage/order/static/images/search.png"></image>
<input class="sb-ipt" placeholder="输入订单号" v-model="searchTxt" confirm-type="search" @confirm="iptConfirm" />
<input class="sb-ipt" placeholder="输入订单号" v-model="searchTxt" confirm-type="search" @confirm="iptConfirm" />
<image class="sb-clear-icon" v-if="searchTxt!=''" mode="aspectFit" src="/subpackage/order/static/images/round_close.png" @click="clearSearch"></image>
</view>
</view>

BIN
src/subpackage/order/static/images/order_manage/order_24.png

After

Width: 30  |  Height: 30  |  Size: 391 B

BIN
src/subpackage/party/static/index/p-arrow.png

Before

Width: 24  |  Height: 25  |  Size: 1.1 KiB

After

Width: 24  |  Height: 25  |  Size: 960 B

BIN
src/subpackage/party/static/index/p-bg-1.png

Before

Width: 160  |  Height: 88  |  Size: 7.0 KiB

After

Width: 160  |  Height: 88  |  Size: 4.9 KiB

BIN
src/subpackage/party/static/index/p-bg-2.png

Before

Width: 160  |  Height: 88  |  Size: 7.9 KiB

After

Width: 160  |  Height: 88  |  Size: 5.5 KiB

BIN
src/subpackage/party/static/index/p-bg-3.png

Before

Width: 335  |  Height: 88  |  Size: 13 KiB

After

Width: 335  |  Height: 88  |  Size: 7.5 KiB

BIN
src/subpackage/party/static/index/p-bg-s-1.png

Before

Width: 88  |  Height: 88  |  Size: 4.7 KiB

After

Width: 88  |  Height: 88  |  Size: 3.6 KiB

BIN
src/subpackage/party/static/index/p-bg-s-2.png

Before

Width: 88  |  Height: 88  |  Size: 4.8 KiB

After

Width: 88  |  Height: 88  |  Size: 3.3 KiB

BIN
src/subpackage/party/static/index/p-bg-s-3.png

Before

Width: 88  |  Height: 88  |  Size: 4.6 KiB

After

Width: 88  |  Height: 88  |  Size: 3.4 KiB

BIN
src/subpackage/party/static/index/qr-img.png

Before

Width: 424  |  Height: 434  |  Size: 26 KiB

After

Width: 424  |  Height: 434  |  Size: 13 KiB

BIN
src/subpackage/party/static/login/kuang.png

Before

Width: 40  |  Height: 40  |  Size: 437 B

After

Width: 40  |  Height: 40  |  Size: 341 B

BIN
src/subpackage/party/static/login/logo.png

Before

Width: 112  |  Height: 112  |  Size: 6.4 KiB

After

Width: 112  |  Height: 112  |  Size: 3.7 KiB

BIN
src/subpackage/party/static/login/slogn.png

Before

Width: 700  |  Height: 550  |  Size: 130 KiB

After

Width: 700  |  Height: 550  |  Size: 65 KiB

BIN
src/subpackage/party/static/miniapp/can_auth_bg.png

Before

Width: 670  |  Height: 176  |  Size: 56 KiB

After

Width: 670  |  Height: 176  |  Size: 24 KiB

BIN
src/subpackage/party/static/miniapp/no_can_auth_bg.png

Before

Width: 670  |  Height: 176  |  Size: 66 KiB

After

Width: 670  |  Height: 176  |  Size: 25 KiB

BIN
src/subpackage/party/static/miniapp/regular_success.png

Before

Width: 100  |  Height: 102  |  Size: 3.6 KiB

After

Width: 100  |  Height: 102  |  Size: 2.7 KiB

BIN
src/subpackage/party/static/regist/camera.png

Before

Width: 48  |  Height: 40  |  Size: 780 B

After

Width: 48  |  Height: 40  |  Size: 640 B

BIN
src/subpackage/party/static/regist/daojishi.png

Before

Width: 100  |  Height: 100  |  Size: 3.5 KiB

After

Width: 100  |  Height: 100  |  Size: 2.5 KiB

BIN
src/subpackage/party/static/upload/icon-camera.png

Before

Width: 24  |  Height: 20  |  Size: 445 B

After

Width: 24  |  Height: 20  |  Size: 381 B

Loading…
Cancel
Save