Browse Source

add tid1553 logic

tid1731
刘嘉炜 5 months ago
parent
commit
bca51cd6e0
  1. 12121
      pnpm-lock.yaml
  2. 1
      src/subpackage/order/js/api.js
  3. 75
      src/subpackage/order/pages/timekeeping/modules/order_detail/end_billing_modal.vue
  4. 7
      src/subpackage/order/pages/timekeeping/modules/order_detail/header_temp.vue
  5. 2
      src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue
  6. 8
      src/subpackage/order/pages/timekeeping/modules/order_list/person.vue
  7. 139
      src/subpackage/order/pages/timekeeping/order_detail/person.vue
  8. 16
      src/subpackage/order/pages/timekeeping/order_list.vue
  9. 2
      yarn.lock

12121
pnpm-lock.yaml
File diff suppressed because it is too large
View File

1
src/subpackage/order/js/api.js

@ -39,6 +39,7 @@ export const ORDER_API = {
// 20240624 tid1553 计时订单拆分
stadiumList: `${ORIGIN}/admin/stadium/list`, // 店铺列表
billingOrderList: `${ORIGIN}/admin/stadium/billing/order/list`, // 计时订单列表
billingOrderDetail: `${ORIGIN}/admin/stadium/billing/order/detail`, // 散客计时订单详情
}
export default ORDER_API;

75
src/subpackage/order/pages/timekeeping/modules/order_detail/end_billing_modal.vue

@ -1,21 +1,29 @@
<template>
<view class="end-billing-modal">
<view class="ebm-mask" v-if="false">
<view class="ebm-mask" v-show="isShow">
<view class="em-container">
<view class="ec-close"></view>
<view class="ec-close" @click="isShow = false"></view>
<view class="ec-title">结束计费</view>
<view class="ec-info">
<view class="ei-line"><text class="el-txt">操作人</text>张三</view>
<view class="ei-line"><text class="el-txt">时长合计</text>1小时25分9秒</view>
<view class="ei-line"><text class="el-txt">金额合计</text>¥100.2</view>
<view class="ei-line"><text class="el-txt">操作人</text>{{ info.operator || '-' }}</view>
<view class="ei-line"><text class="el-txt">时长合计</text>{{ info.duration || '-' }}</view>
<view class="ei-line"><text class="el-txt">金额合计</text>{{ info.amount || '-' }}</view>
</view>
<view class="ec-opts">
<view class="eo-item active">
<view
class="eo-item"
:class="{ active: end_type === 'end_timing' }"
@click="end_type = 'end_timing'"
>
<view class="ei-icon"></view>
<view class="ei-txt">停止计时</view>
</view>
<view class="eo-item">
<view
class="eo-item"
:class="{ active: end_type === 'end_order' }"
@click="end_type = 'end_order'"
>
<view class="ei-icon"></view>
<view class="ei-txt">完结订单</view>
</view>
@ -23,10 +31,10 @@
<view class="ec-amount">
<view class="et-name"><text class="en-txt">*</text>请输入金额</view>
<input type="digit" class="ea-ipt">
<input type="digit" class="ea-ipt" v-model="amount">
</view>
<view class="ec-btn">确认</view>
<view class="ec-btn" @click="confirmBtn">确认</view>
</view>
</view>
</view>
@ -34,7 +42,40 @@
<script>
export default {
data(){
return {
isShow: false,
info: {
// operator: '',
// duration: '1259',
// amount: '¥100.2'
},
end_type: 'end_timing', // end_timing/ end_order
amount: '',
initOptions: {}
}
},
methods: {
show(){
this.isShow = true;
},
hide(){
this.isShow = false;
},
initModal(data){
let { operator, duration, amount, ...opts } = data;
this.info.operator = operator || '';
this.info.duration = duration || '';
this.info.amount = amount || '';
this.initOptions = opts;
this.show();
},
confirmBtn(){
let { end_type, amount, initOptions } = this;
initOptions?.success?.({ type: end_type, amount: +amount || 0 });
this.hide();
}
}
}
</script>
@ -133,14 +174,7 @@ export default {
border: 4upx solid #d8d8d8;
border-radius: 50%;
@include ctf(center);
&::after{
content: '';
display: block;
width: 100%;
height: 100%;
background: #d8d8d8;
border-radius: 50%;
}
}
.ei-txt{
@include flcw(28upx, 48upx, #d8d8d8);
@ -149,7 +183,12 @@ export default {
.ei-icon{
border-color: $mColor;
&::after{
content: '';
display: block;
width: 100%;
height: 100%;
background: $mColor;
border-radius: 50%;
}
}
.ei-txt{

7
src/subpackage/order/pages/timekeeping/modules/order_detail/header_temp.vue

@ -1,8 +1,8 @@
<template>
<view class="order-detail-header">
<view class="odh-stadium">
<image class="os-img"></image>
<view class="os-name">欧轩智能场馆(羽毛球永泰店)</view>
<image class="os-img" mode="aspectFit" :src="stadiumLogo"></image>
<view class="os-name">{{ stadiumName || '-' }}</view>
</view>
<view class="odh-content">
<slot>content</slot>
@ -12,7 +12,7 @@
<script>
export default {
props: [ 'stadiumName', 'stadiumLogo' ]
}
</script>
@ -30,7 +30,6 @@ export default {
margin-right: 14upx;
width: 40upx;
height: 40upx;
background: skyblue;
}
.os-name{
@include flcw(28upx, 40upx, #333333, 500);

2
src/subpackage/order/pages/timekeeping/modules/order_list/item_temp.vue

@ -1,5 +1,5 @@
<template>
<view class="list-item-temp">
<view class="list-item-temp" @click="$emit('click:item')">
<view class="lit-stadium-status">
<view class="lss-stadium">{{ stadium || '' }}</view>
<view

8
src/subpackage/order/pages/timekeeping/modules/order_list/person.vue

@ -5,6 +5,7 @@
:price="order.pay_amount || ''"
:status-active="['待支付', '计费中'].includes(order.status_text)"
:price-show="['待支付', '已完成', '已退款'].includes(order.status_text)"
@click:item="toDetail"
>
<template v-slot:default>
<view class="lc-info">
@ -32,6 +33,7 @@
<script>
import kvLine from "../../../../components/kv_line.vue";
import listItemTemp from "./item_temp.vue";
import { routeTo } from '@/utils/util';
export default {
props: {
order: {
@ -42,6 +44,12 @@ export default {
components: {
'kv-line': kvLine,
'list-item-temp': listItemTemp
},
methods: {
toDetail(){
let { order } = this;
routeTo(`/subpackage/order/pages/timekeeping/order_detail/person?order_no=${order?.order_no || ''}&brand_id=${order?.brand_id || ''}`, 'nT');
}
}
}
</script>

139
src/subpackage/order/pages/timekeeping/order_detail/person.vue

@ -1,62 +1,79 @@
<template>
<view class="person-order-detail">
<header-temp>
<header-temp
:stadium-name="orderInfo.stadium_name"
:stadium-logo="orderInfo.stadium_logo"
>
<kv-line label="订单编号:">
<template v-slot:default>qp20200150150245569qp20200150150245569qp20200150150245569</template>
<template v-slot:default>{{ orderInfo.order_no || '-' }}</template>
<template v-slot:right>
<text class="pod-status">已完成</text>
<text
class="pod-status"
:class="{ active: [ '计费中', '待支付' ].includes(orderInfo.status_text) }"
>{{ orderInfo.status_text || '-' }}</text>
</template>
</kv-line>
<kv-line label="创建时间:">2019-08-17 18:02:58</kv-line>
<kv-line label="手机号码:">18316553478</kv-line>
<kv-line label="用户昵称:">i术生</kv-line>
<kv-line label="创建时间:">{{ orderInfo.created_at || '-' }}</kv-line>
<kv-line label="手机号码:">{{ orderInfo.mobile || '-' }}</kv-line>
<kv-line label="用户昵称:">{{ orderInfo.nickname || '-' }}</kv-line>
</header-temp>
<view class="pod-margin"></view>
<info-temp title="计时信息">
<kv-line label="项目类型:">人时(1号门闸)</kv-line>
<kv-line label="进场时间:">2020-01-10 15:02:24</kv-line>
<kv-line label="离场时间:">2020-01-10 17:20:24</kv-line>
<kv-line label="时长合计:">1小时35分9秒 </kv-line>
<view class="pod-pay-info">
<kvs-line label="金额小计">¥10.5</kvs-line>
<kvs-line label="折扣金额">-¥0</kvs-line>
<kvs-line label="积分抵扣">-¥0</kvs-line>
<kvs-line label="优惠券优惠">-¥1</kvs-line>
</view>
<view class="pod-total">
<text class="pt-name">合计支付</text>9.5
</view>
<kv-line label="项目类型:">人时({{ orderInfo.project_type_name || '-' }})</kv-line>
<kv-line label="进场时间:">{{ orderInfo.start_time || '-' }}</kv-line>
<kv-line label="离场时间:">{{ orderInfo.end_time || '-' }}</kv-line>
<kv-line label="时长合计:">{{ orderInfo.extension&&orderInfo.extension.duration || '-' }}</kv-line>
<block v-if="[ '已完成', '已退款', '待支付' ].includes(orderInfo.status_text)">
<view class="pod-pay-info">
<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>
<view class="pod-total">
<text class="pt-name">合计支付</text>{{ orderInfo.pay_amount || '0' }}
</view>
</block>
</info-temp>
<view class="pod-margin"></view>
<info-temp title="支付信息">
<kv-line label="支付方式:">微信支付</kv-line>
<kv-line label="支付时间:">2019年6月18日 10:30:40</kv-line>
<kv-line label="微信交易号:">424736746998493847989434</kv-line>
</info-temp>
<blcok v-if="[ '已完成', '已退款' ].includes(orderInfo.status_text)">
<view class="pod-margin"></view>
<info-temp title="支付信息">
<kv-line label="支付方式:">{{ orderInfo.pay_type_text || '-' }}</kv-line>
<kv-line label="支付时间:">{{ orderInfo.pay_time || '-' }}</kv-line>
<kv-line label="微信交易号:">{{ orderInfo.trace_no || '-' }}</kv-line>
</info-temp>
</blcok>
<block v-if="orderInfo.status_text === '已退款'">
<view class="pod-margin"></view>
<info-temp title="退款信息1">
<kv-line label="退款金额:">7</kv-line>
<kv-line label="退款单号:">TF-20195171564566</kv-line>
<kv-line label="退款时间:">2019-05-17 11:12:58</kv-line>
<kv-line label="退款原因:">商家主动退款</kv-line>
</info-temp>
</block>
<view class="pod-margin"></view>
<info-temp title="退款信息1">
<kv-line label="退款金额:">7</kv-line>
<kv-line label="退款单号:">TF-20195171564566</kv-line>
<kv-line label="退款时间:">2019-05-17 11:12:58</kv-line>
<kv-line label="退款原因:">商家主动退款</kv-line>
</info-temp>
<view class="pod-margin"></view>
<view class="pod-margin"></view>
<view class="pod-btn" v-if="false">完结订单</view>
<view class="pod-btn" v-else>结束计费</view>
<view
class="pod-btn"
v-if="orderInfo.status_text === '计费中'"
@click="endOrder"
>结束计费</view>
<!-- <view class="pod-fixed">
<view class="pf-btn">取消预约</view>
</view> -->
<bottom-fixed>
<fixed-button>取消预约</fixed-button>
<bottom-fixed v-if="orderInfo.status_text === '已完成'">
<fixed-button>退款</fixed-button>
</bottom-fixed>
<end-billing-modal></end-billing-modal>
<end-billing-modal ref="endBillingModal"></end-billing-modal>
</view>
</template>
@ -69,6 +86,10 @@ import endBillingModal from "../modules/order_detail/end_billing_modal.vue";
import bottomFixed from "../modules/order_detail/bottom_fixed.vue";
import fixedButton from "../modules/order_detail/fixed_button.vue";
// import bottomFixed from "../modules/order_detail/bf_button.vue";
import { ORDER_API } from '../../../js/api';
import server from '../../../js/server';
import { showLoad, hideLoad, formatDate, showNone } from '@/utils/util';
export default {
components: {
'header-temp': headerTemp,
@ -78,6 +99,47 @@ export default {
'end-billing-modal': endBillingModal,
'bottom-fixed': bottomFixed,
'fixed-button': fixedButton,
},
data(){
return {
orderInfo: {}
}
},
onLoad(options){
this.getOrderDetail({
brand_id: options?.brand_id || '',
order_no: options?.order_no || ''
});
},
methods: {
endOrder(){
let { orderInfo } = this;
this.$refs.endBillingModal.initModal({
operator: orderInfo?.end_bill_operator_name,
duration: orderInfo?.extension?.duration,
amount: orderInfo?.amount,
success: res=>{
console.log('endOrder res -->', res);
}
});
},
getOrderDetail({
brand_id = '', order_no = ''
}){
showLoad();
server.get({
url: ORDER_API.billingOrderDetail,
data: {
brand_id, order_no
},
failMsg: '加载失败!'
})
.then(res=>{
hideLoad();
console.log('person getOrderDetail -->', res);
this.orderInfo = res || {};
})
},
}
}
</script>
@ -89,6 +151,9 @@ export default {
margin-left: auto;
flex-shrink: 0;
@include flcw(28upx, 40upx, #9C9C9F);
&.active{
color: $mColor;
}
}
}
.pod-margin{

16
src/subpackage/order/pages/timekeeping/order_list.vue

@ -108,6 +108,7 @@ export default {
async onLoad(options){
let _bID = options?.brand_id || '';
let _order_type = options?.order_type || '';
this.setTitle(_order_type);
let { start, end } = this.initDefaultDate();
let { value } = this.initDefaultStatus(_order_type);
this.getOrderList({
@ -120,6 +121,7 @@ export default {
this.brand_id = _bID;
this.order_type = _order_type;
let _list = await this.$refs.orderListHeader.initStadiumSelect(_bID);
},
onReachBottom(){
let { brand_id, order_type, condition, page } = this;
@ -131,6 +133,20 @@ export default {
})
},
methods: {
setTitle(type){
let _title = '';
switch(type){
case enumOrderType.site:
_title = '场时订单';
break;
case enumOrderType.person:
_title = '散客计时订单';
break;
}
uni.setNavigationBarTitle({
title: _title
})
},
//
showFilterModal(){
this.$refs.filterModal.init({

2
yarn.lock

@ -9361,7 +9361,7 @@ sane@^4.0.3:
minimist "^1.1.1"
walker "~1.0.5"
sass@^1.63.3:
sass@1.63.3:
version "1.63.3"
resolved "https://registry.npmmirror.com/sass/-/sass-1.63.3.tgz#527746aa43bf2e4eac1ab424f67f6f18a081061a"
integrity sha512-ySdXN+DVpfwq49jG1+hmtDslYqpS7SkOR5GpF6o2bmb1RL/xS+wvPmegMvMywyfsmAV6p7TgwXYGrCZIFFbAHg==

Loading…
Cancel
Save