Browse Source

Merge branch 'dev'

feat-230721
刘嘉炜 3 years ago
parent
commit
d8ec9e1e0c
  1. 32
      src/components/reservation_order/reservation_order.vue
  2. 33
      src/components/site/order_modal/order_modal.vue
  3. 4
      src/js/api.js
  4. 2
      src/js/server.js
  5. 17
      src/pages.json
  6. 10
      src/pages/index/index.vue
  7. 212
      src/pages/turnover/turnover.vue
  8. BIN
      src/static/images/icon/toggle.png
  9. BIN
      src/static/images/icon/triangle_c33.png
  10. 43
      src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
  11. 87
      src/subpackage/income/components/details_item/details_item.vue
  12. 9
      src/subpackage/income/js/api.js
  13. 10
      src/subpackage/income/js/server.js
  14. 685
      src/subpackage/income/pages/details_record/details_record.vue
  15. 183
      src/subpackage/income/pages/search/search.vue
  16. BIN
      src/subpackage/income/static/images/account_null.png
  17. BIN
      src/subpackage/income/static/images/bot_arrow.png
  18. BIN
      src/subpackage/income/static/images/calendar.png
  19. BIN
      src/subpackage/income/static/images/close.png
  20. BIN
      src/subpackage/income/static/images/filter.png
  21. BIN
      src/subpackage/income/static/images/search.png
  22. 5
      src/subpackage/order/components/club_rental/end_billing/end_billing.vue
  23. 10
      src/subpackage/order/pages/club_rental/detail/detail.vue

32
src/components/reservation_order/reservation_order.vue

@ -4,7 +4,7 @@
<view class="rh-view">{{orderInfo.stadium_name || '-'}}</view>
<text
:class="[ 'rh-text', orderInfo.pay_status == 1?'rh-active':'', orderInfo.pay_status == 4?'rh-red':'' ]"
>{{zh_order_status(orderInfo.pay_status)}}</text>
>{{zh_order_status(orderInfo)}}</text>
</view>
<view class="ro-section">
<view class="rs-line">
@ -107,21 +107,6 @@ export default {
return _obj[`${status}`] || '-'
}
},
zh_order_status(){
// -101使2使34退
return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = {
'-1': '已作废',
'0': '未支付',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_type_name(){
// 0 1
let { orderInfo } = this
@ -141,6 +126,21 @@ export default {
},
},
methods:{
zh_order_status(orderInfo = {}){
// -101使2使34退
let _status = orderInfo.pay_status || '';
if(_status == 3&&orderInfo.is_active_release)return '已失效*'; // 20220929 '*'
const _obj = {
'-1': '已作废',
'0': '未支付',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
'8': '使用中', // 20210528
}
return _obj[`${_status}`] || '-'
},
detailChange(){
let { orderInfo } = this
let _query = {}

33
src/components/site/order_modal/order_modal.vue

@ -109,6 +109,7 @@
</view>
<!-- 小程序预定 -->
<view class="om-btns" v-if="orderInfo.type == 'mini_program'">
<view class="ob-view red" @click="releaseBtn" v-if="orderInfo.pay_status == 1">释放场地</view>
<view class="ob-view" @click="toOrderInfo">订单详情</view>
<!-- <view class="ob-view red" @click="refundBtn">退款</view> -->
</view>
@ -161,6 +162,38 @@ export default {
this.getOrderInfo();
},
methods: {
releaseBtn(){
util.showModal({
title: '是否确认释放场地',
content: '释放场地仅是释放场地给其他人预订,如需退款请登录后台操作',
showCancel: true,
success: mRes =>{
if(mRes.confirm)this.releaseReq();
}
})
},
releaseReq(){
util.showLoad();
let { orderInfo } = this;
servers.get({
url: API.venue.releaseVenue,
data: {
id: 0, // 0
brand_id: orderInfo.stadium_order.brand_id || '',
order_no: orderInfo.order_no || ''
},
isDefaultGet: false,
})
.then(res=>{
util.hideLoad();
if(res.data.code == 0){
util.showNone(res.data.message || '操作成功!');
setTimeout(_=>this.$emit('refresh'), 1200);
}else{
util.showNone(res.data.message || '操作失败!');
}
})
},
fixedCancelOccupy: util.debounce(function(){
let { orderInfo, queryInfo } = this;
util.showLoad();

4
src/js/api.js

@ -105,6 +105,10 @@ API['venue'] = {
// 20210806
FixedOccupyCancel: `${ORIGIN}/admin/VenueNumberFixedOccupy/cancel`, // 固定场取消订场
// 20220921
releaseVenue: `${ORIGIN}/admin/stadium/order/releaseVenue`, // 【1000995】释放场地
}
// 2.1 核销

2
src/js/server.js

@ -17,7 +17,7 @@ export class Server {
url,
data,
method, // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
header: {...header}, // 设置请求的 header // {'custom-header': 'application/json'}
header: {...header, Pcassistant: 2}, // 设置请求的 header // {'custom-header': 'application/json'}
success: res=>{
if(islog)console.log('req success---->',{
link: url,

17
src/pages.json

@ -278,6 +278,23 @@
],
"subpackages": [
{
"root": "subpackage/income",
"pages": [
{
"path": "pages/search/search",
"style" : {
"navigationBarTitleText": "收款明细"
}
},
{
"path": "pages/details_record/details_record",
"style" : {
"navigationBarTitleText": "收款明细"
}
}
]
},
{
"root": "subpackage/device",
"pages": [
{

10
src/pages/index/index.vue

@ -70,7 +70,6 @@
</view>
</view>
</template>
<script>
import util from '../../utils/util';
@ -86,7 +85,7 @@
{
id: 1,
name: '收款记录',
path: '/pages/collection/list/list',
path: '/subpackage/income/pages/details_record/details_record',
serverKey: 1002 //
},
{
@ -208,6 +207,13 @@
if(!tabInfo.path)return util.showNone('暂未开放!');
//if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //
if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!')
if(tabInfo.id === 1){
util.$_emit('turnoverToDetailsRecord', {
stadiumInfo: null,
brandInfo: indexData&&indexData.brand ? indexData.brand : null,
});
}
util.routeTo(tabInfo.path,'nT');
},

212
src/pages/turnover/turnover.vue

@ -5,7 +5,6 @@
<view :class="[tabID == 3?'active':'']" @click="tabChange(3)">门店统计</view>
</view>
<view class="tc-total-section">
<!-- 品牌 -->
<view class="tts-address" v-if="tabID == 4&&storeList.length > 1">
<image class="ta-logo" :src="totalData.logo" mode="aspectFit"></image>
@ -13,13 +12,15 @@
</view>
<!-- 仅有一家店铺情况下没有品牌查看权限 -->
<view class="tts-address" v-else-if="tabID == 3&&storeList.length ==1">
<image class="ta-logo" :src="totalData.logo" mode="aspectFit"></image>
<view>{{curSelectStore.name || '-'}}</view>
<!-- <image mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image> -->
</view>
<picker v-else-if="tabID == 3" :range="storeList" range-key="name" @change="storeChange">
<view class="tts-address">
<image class="ta-logo" :src="totalData.logo" mode="aspectFit"></image>
<view>{{curSelectStore.name || '-'}}</view>
<image mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image>
<image mode="aspectFit" src="/static/images/icon/toggle.png"></image>
</view>
</picker>
@ -31,10 +32,30 @@
</view>
<view><text>¥</text>{{totalData.count_type_actual_income_amount || '0'}}</view>
</view>
<view class="tts-preview">
<view>线上 ¥{{totalData.online_actual_income_amount || '0'}}</view>
<view>线下 ¥{{totalData.offline_actual_income_amount || '0'}}</view>
<view class="tts-preview-ls">
<view class="tpl-item">
<view class="ti-name">
<text>线上</text>
<image mode="aspectFit" @click="incomeQusModal(totalData.online_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.online_actual_income_amount || '0'}}</view>
</view>
<view class="tpl-item">
<view class="ti-name">
<text>线下</text>
<image mode="aspectFit" @click="incomeQusModal(totalData.offline_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.offline_actual_income_amount || '0'}}</view>
</view>
<view class="tpl-item">
<view class="ti-name">
<text>联营</text>
<image mode="aspectFit" @click="incomeQusModal(totalData.joint_tips)" src="/static/images/icon/question_mark.png"></image>
</view>
<view class="ti-price">¥{{totalData.joint_actual_income_amount || '0'}}</view>
</view>
</view>
</view>
<view class="tc-info-section">
<view class="tis-tab">
@ -57,36 +78,32 @@
<view class="td-tip">总收入</view>
<view class="td-price"><text>¥</text>{{botData.count_type_actual_income_amount || 0}}</view>
<view class="td-detail">
<view>
<view class="td-first">
线上 ¥{{ botData.online_actual_income_amount || '0' }}
</view>
<view>
<text class="margin">收款{{ botData.online_income_num || '0' }} </text>
{{ botData.online_income_amount || '0' }}
</view>
<view>
<text class="margin">退款{{ botData.online_refund_num || '0' }} </text>
<text class="orange"> {{ botData.online_refund_amount || '0' }} </text>
<view class="td-check-btn">
<text @click="toDetailsRecord">查看收款明细</text>
<image mode="aspectFit" src="/static/images/icon/triangle_c33.png"></image>
</view>
<view class="td-income-info">
<view class="tii-line">
<view class="tl-tit">线上 ¥{{ botData.online_actual_income_amount || '0' }}</view>
<view class="tl-detail">
<view class="td-item">收款{{ botData.online_income_num || '0' }}{{ botData.online_income_amount || '0' }}</view>
<view class="td-item">退款{{ botData.online_refund_num || '0' }}<text>{{ botData.online_refund_amount || '0' }}</text></view>
</view>
</view>
<view>
<view class="td-first">
线下 ¥{{ botData.offline_actual_income_amount || '0' }}
<view class="tii-line">
<view class="tl-tit">线下 ¥{{ botData.offline_actual_income_amount || '0' }}</view>
<view class="tl-detail">
<view class="td-item">收款{{ botData.offline_income_num || '0' }}{{ botData.offline_income_amount || '0' }}</view>
<view class="td-item">退款{{ botData.offline_refund_num || '0' }}<text>{{ botData.offline_refund_amount || '0' }}</text></view>
</view>
<view>
<text class="margin">收款{{ botData.offline_income_num || '0' }} </text>
{{botData.offline_income_amount || '0'}}
</view>
<view>
<text class="margin">退款{{ botData.offline_refund_num || '0' }} </text>
<text class="orange"> {{ botData.offline_refund_amount || '0' }} </text>
</view>
<view class="tii-line">
<view class="tl-tit">联营 ¥{{ botData.joint_actual_income_amount || '0' }}</view>
<view class="tl-detail">
<view class="td-item">收款{{ botData.joint_income_num || '0' }}{{ botData.joint_income_amount || '0' }}</view>
<view class="td-item">退款{{ botData.joint_refund_num || '0' }}<text>{{ botData.joint_refund_amount || '0' }}</text></view>
</view>
</view>
</view>
</view>
</view>
@ -116,7 +133,7 @@ export default {
},
data(){
return {
tabID: 4,
tabID: 4, // 4 3
timeTabIdx: 0,
totalData: {},
@ -155,6 +172,14 @@ export default {
},
methods: {
toDetailsRecord(){
let { curSelectStore, brandInfo, tabID } = this;
util.$_emit('turnoverToDetailsRecord', {
stadiumInfo: (tabID == 3&&curSelectStore&&curSelectStore.id) ? curSelectStore : null,
brandInfo: brandInfo&&brandInfo.brand ? brandInfo.brand : null,
});
util.routeTo(`/subpackage/income/pages/details_record/details_record`, 'nT');
},
/*
count_type
@ -169,7 +194,6 @@ export default {
7 统计品牌的某一年
*/
getCountType({ tab_id = -1, time_tab_idx = -1 }){
console.warn(tab_id, time_tab_idx, getType(time_tab_idx) + 5);
if(time_tab_idx == -1)return tab_id;
let _type = getType(time_tab_idx)
@ -193,11 +217,17 @@ export default {
}
}
},
incomeQusModal(data){
util.showModal({
title: '提示',
content: data || '-',
})
},
showQuestionModal(){
let { totalData } = this
util.showModal({
title: totalData.income_record_name|| '提示',
content: totalData.income_record_tips || '总收入为:线上(微信支付)+ 线下的总收入(退款已删除)',
content: totalData.income_record_tips || '-',
showCancel: true,
success: mRes => {
@ -387,7 +417,9 @@ export default {
background-color: #fff;
}
.turnover-container{
padding-bottom: 40upx;
padding-bottom: calc( 40upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 40upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
}
.tc-tab{
height: 134upx;
@ -445,7 +477,6 @@ export default {
}
.tts-money{
padding-top: 48upx;
>view{
margin-bottom: 34upx;
text-align: center;
@ -481,21 +512,39 @@ export default {
}
}
}
.tts-preview{
padding-bottom: 70upx;
.tts-preview-ls{
padding-top: 50upx;
padding-bottom: 36upx;
@include centerFlex(space-between);
>view{
width: 50%;
padding: 0 24upx;
line-height: 40upx;
text-align: center;
font-size: 28upx;
font-weight: 500;
color: #1a1a1a;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
.tpl-item{
padding: 0 10upx;
flex-shrink: 0;
flex-grow: 1;
width: 33.33%;
.ti-name{
@include centerFlex(center);
margin-bottom: 6upx;
line-height: 34upx;
font-weight: 500;
font-size: 24upx;
color: #1A1A1A;
>image{
margin-left: 10upx;
flex-shrink: 0;
width: 28upx;
height: 28upx;
}
}
.ti-price{
text-align: center;
line-height: 34upx;
font-size: 24upx;
font-weight: 500;
color: #1A1A1A;
@include textHide(1);
}
}
}
}
@ -577,37 +626,46 @@ export default {
}
@include textHide(1);
}
.td-detail{
padding: 0 24upx;
width: 100%;
@include centerFlex(center);
>view{
max-width: 50%;
flex-shrink: 0;
.td-first{
.td-check-btn{
padding-bottom: 12upx;
width: 642upx;
line-height: 40upx;
font-size: 28upx;
border-bottom: 2upx solid #D8D8D8;
color: #9C9C9F;
@include centerFlex(flex-end);
>image{
margin-left: 6upx;
width: 22upx;
height: 22upx;
}
}
.td-income-info{
padding: 40upx 0 0;
width: 642upx;
.tii-line{
margin-bottom: 50upx;
.tl-tit{
margin-bottom: 24upx;
color: #1A1A1A;
font-weight: 500;
line-height: 40upx;
font-size: 28upx;
}
&:first-child{
margin-right: 24upx;
}
&+view{
margin-left: 24upx;
}
>view{
font-size: 24upx;
color: #9C9C9F;
font-weight: 500;
color: #1A1A1A;
@include textHide(1);
>text{
}
.orange{
color: #F6843E;
}
.margin{
margin-right: 12upx;
}
.tl-detail{
@include centerFlex(space-between);
flex-wrap: nowrap;
.td-item{
width: 50%;
flex-grow: 0;
flex-shrink: 0;
font-size: 24upx;
color: #9C9C9F;
>text{
color: #F6843E;
}
}
}
}

BIN
src/static/images/icon/toggle.png

After

Width: 56  |  Height: 56  |  Size: 393 B

BIN
src/static/images/icon/triangle_c33.png

After

Width: 44  |  Height: 44  |  Size: 339 B

43
src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue

@ -8,7 +8,7 @@
</view>
<view class="rh-line">
<view>订单编号<text>{{orderInfo.order_no || ''}}</text></view>
<view><text :class="[orderInfo.pay_status==1?'rl-active':'']">{{zh_pay_status(orderInfo.pay_status)}}</text></view>
<view><text :class="[orderInfo.pay_status==1?'rl-active':'']">{{zh_pay_status(orderInfo)}}</text></view>
</view>
<view class="rh-line">
<view>创建时间<text>{{orderInfo.created_at || '-'}}</text></view>
@ -24,7 +24,7 @@
<view class="rb-title">验证信息</view>
<view class="rb-line">
<view class="rl-view">验证码</view>
<view :class="['rl-code1', orderInfo.pay_status==2?'rl-code2':'', orderInfo.pay_status==3?'rl-code3':'', orderInfo.pay_status==4?'rl-code4':'']" >{{orderInfo.verify_code || '-'}}<text>({{zh_pay_status(orderInfo.pay_status)}})</text></view>
<view :class="['rl-code1', orderInfo.pay_status==2?'rl-code2':'', orderInfo.pay_status==3?'rl-code3':'', orderInfo.pay_status==4?'rl-code4':'']" >{{orderInfo.verify_code || '-'}}<text>({{zh_pay_status(orderInfo)}})</text></view>
</view>
<!-- 已使用 -->
<block v-if="orderInfo.pay_status==2 || orderInfo.pay_status==8">
@ -137,20 +137,6 @@ export default {
}
},
computed: {
zh_pay_status(){
// 1使2使34退
return status =>{
if(status == 8)return '使用中'; // 20210528
const _obj = {
'0': '未付款',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
}
return _obj[`${status}`] || '-'
}
},
zh_verify_type(){
/**
* 20210527 新增核销方式
@ -169,15 +155,6 @@ export default {
'扫码核销(商家助手)',
][status] || '-';
// const _obj = {
// '0': '',
// '1': '',
// '2': '',
// '3': '',
// '4': '',
// }
// return _obj[`${status}`] || '-'
}
},
zh_pay_type(){
@ -198,8 +175,22 @@ export default {
}
},
methods: {
zh_pay_status(orderInfo = {}){
// -101使2使34退
let _status = orderInfo.pay_status || '';
if(_status == 3&&orderInfo.is_active_release)return '已失效*'; // 20220929 '*'
const _obj = {
'-1': '已作废',
'0': '未支付',
'1': '待使用',
'2': '已使用',
'3': '已失效',
'4': '已退款',
'8': '使用中', // 20210528
}
return _obj[`${_status}`] || '-'
},
refunndBtn(){
console.warn(123);
this.$emit('refundbtn');
}
}

87
src/subpackage/income/components/details_item/details_item.vue

@ -0,0 +1,87 @@
<template>
<view class="dl-item">
<view class="di-name">{{ incomeInfo.source || '-' }}</view>
<view class="di-top-line">
<view class="dtl-view">{{ incomeInfo.scene_name || '-' }}</view>
<view :class="[ 'dtl-view', incomeInfo.amount > 0 ? 'orange' : '' ]">{{ incomeInfo.amount || '-' }}</view>
</view>
<view class="di-bot-line">
<view class="dbl-view">{{ incomeInfo.operator_text || '-' }}</view>
<view class="dbl-view" v-if="incomeInfo.amount < 0">{{ incomeInfo.refund_desc || '-' }}</view>
</view>
<view class="di-bot-line">
<view class="dbl-view">{{ incomeInfo.order_no || '-' }}</view>
</view>
<view class="di-bot-line">
<view class="dbl-view">{{ incomeInfo.created_at || '-' }}</view>
</view>
</view>
</template>
<script>
export default {
props: {
incomeInfo: {
default: {},
type: Object,
}
}
}
</script>
<style lang="scss">
@import '~style/public.scss';
.dl-item{
padding: 30upx 40upx 30upx 0;
border-bottom: 2upx solid #D8D8D8;
.di-name{
margin-bottom: 20upx;
line-height: 40upx;
font-size: 28upx;
color: #1A1A1A;
@include textHide(1);
}
.di-top-line{
margin-bottom: 20upx;
@include centerFlex(space-between);
>.dtl-view{
font-size: 32upx;
line-height: 44upx;
color: #1A1A1A;
@include textHide(1);
&:first-child{
flex-shrink: 0;
max-width: 50%;
}
&+.dtl-view{
font-weight: 500;
text-align: right;
&.orange{
color: #F6843E;
}
}
}
}
.di-bot-line{
@include centerFlex(space-between);
>.dbl-view{
font-size: 24upx;
line-height: 34upx;
color: #9C9C9F;
&:first-child{
flex-grow: 1;
@include textHide(1);
}
&+.dbl-view{
margin-left: 16upx;
flex-shrink: 0;
text-align: right;
}
}
}
}
</style>

9
src/subpackage/income/js/api.js

@ -0,0 +1,9 @@
import { ORIGIN } from '../../../js/api';
export const INCOME_API = {
consumeCountDetailList:`${ORIGIN}/admin/stadium/consumeCountDetail/list`, // 收款明细列表
consumeRecordSceneLs:`${ORIGIN}/consumeRecordScene/list`, // 收款明细列表
stadiumList: `${ORIGIN}/admin/stadium/list`, // 店铺列表
}
export default { ORIGIN, INCOME_API };

10
src/subpackage/income/js/server.js

@ -0,0 +1,10 @@
import { Server } from '../../../js/server';
class Servers extends Server {
constructor(props){
super(props)
}
}
export default new Servers();

685
src/subpackage/income/pages/details_record/details_record.vue

@ -0,0 +1,685 @@
<template>
<view class="details-record">
<view class="dr-header">
<view class="dh-filter">
<view class="df-date">
<view class="df-name">收款日期</view>
<picker mode="date" @change="dateChange">
<view class="dd-frame">
<input disabled :value="incomeTime" v-if="!isFilterModal" />
<view></view>
<image mode="aspectFit" src="/subpackage/income/static/images/calendar.png"></image>
</view>
</picker>
</view>
<view class="df-right">
<view :class="[ 'df-name', isFilter? 'df-active' : '' ]" @click="filterShow">筛选</view>
<view class="dr-icons">
<image @click="filterShow" mode="aspectFit" src="/subpackage/income/static/images/filter.png"></image>
<view></view>
<image @click="toSearch" mode="aspectFit" src="/subpackage/income/static/images/search.png"></image>
</view>
</view>
</view>
<view class="type-bar">
<view
v-for="(e, i) in incomeTypeLs" :key="i"
:class="['tb-item', e.eng == incomeTypeInfo.eng ?'ti-active': '']"
@click="incomeTypeChange(e)"
>{{ e.name || '-' }}</view>
</view>
<view class="tab-bar">
<view :class="[ 'tb-item', type == '全部'? 'tb-active' : '' ]" @click="typeChange('全部')"><view>全部</view></view>
<view :class="[ 'tb-item', type == '退款'? 'tb-active' : '' ]" @click="typeChange('退款')"><view>退款</view></view>
</view>
<view class="dh-total">
收款{{ incomeMes.income_num || 0 }}<text>{{ incomeMes.income_amount || 0 }}</text>
退款{{ incomeMes.refund_num || 0 }}<text>{{ incomeMes.refund_amount || 0 }}</text>
</view>
</view>
<view class="dr-ls" v-if="incomeLs&&incomeLs.length">
<details-item
v-for="(e, i) in incomeLs"
:key = "i"
:income-info = "e"
></details-item>
</view>
<view class="dr-mask" v-if="isFilterModal" @touchmove.stop.prevent='_=>false' @click="isFilterModal = false">
<view class="dm-content" @click.stop="_=>false">
<image
class="dc-close"
mode="aspectFit"
src="/subpackage/income/static/images/close.png"
@click="isFilterModal = false"
></image>
<view class="dc-header" id="dcheader">
<view class="dc-tit">筛选</view>
<view class="dc-stadium">
<view class="ds-name">门店</view>
<picker :range="storeList" range-key="name" @change="stadiumChange">
<view class="ds-frame">
<input :value="modalSelectStore.name || ''" placeholder="全部" disabled />
<image mode="aspectFit" src="/subpackage/income/static/images/bot_arrow.png"></image>
</view>
</picker>
</view>
<view class="dc-scene-name">收款场景{{ incomeTypeInfo.name || '-' }}</view>
</view>
<scroll-view class="dc-scroll" scroll-y :style="modalScrollViewHeight?('height:'+ modalScrollViewHeight + 'px;'): ''">
<view class="dc-scene-ls">
<view
v-for="(e, i) in sceneLs"
:key="i"
:class="['dsl-item', (modalSelectScene.scene === e.scene || (modalSelectScene == null&&e.scene==-1))?'dsl-active': '' ]"
@click="sceneSelect(e)"
>{{ e.name || '-' }}</view>
</view>
</scroll-view>
<view class="dc-btn-bar" id="dcbotbar">
<view class="dbb-btns">
<view @click="modalResetBtn">重置</view>
<view @click="modalConfirm">确定</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import details_item from '../../components/details_item/details_item.vue';
import util from '../../../../utils/util';
import { INCOME_API } from '../../js/api';
import server from '../../js/server';
let incomeTypeLs = [
{
name: '线上收款',
eng: 'online',
},
{
name: '线下收款',
eng: 'offline'
},
{
name: '联营收款',
eng: 'joint'
},
];
export default {
components: {
'details-item': details_item
},
computed: {
isFilter(){
let { confirmSelectStore, confirmSelectScene } = this
if(confirmSelectStore || confirmSelectScene)return true;
return false
}
},
data(){
return {
brandInfo: {},
modalScrollViewHeight: '',
incomeTime: '',
incomeLs: [],
incomeMes: {},
page: 1,
type: '全部', // /退
incomeTypeLs,
incomeTypeInfo: {}, // online 线 offline 线 joint
isFilterModal: false,
sceneLs: [], //
storeList: [], //
confirmSelectScene: null, // &
confirmSelectStore: null, // &
modalSelectScene: null, //
modalSelectStore: null, //
}
},
onLoad(){
let _timeStr = util.formatDate({});
this.incomeTime = _timeStr;
this.incomeTypeInfo = incomeTypeLs[0];
util.$_once('turnoverToDetailsRecord', data=>{
let { brandInfo, stadiumInfo } = data;
this.confirmSelectStore = stadiumInfo || null;
this.brandInfo = brandInfo || {};
this.refreshPage();
})
},
onReachBottom(){
let { brandInfo, incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene, page } = this;
this.getRecordLs({
brand_id: brandInfo.id || '',
type: type || '',
time_str: incomeTime || '',
income_type: incomeTypeInfo.eng || '',
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '',
scene: (confirmSelectScene&&confirmSelectScene.scene + '') || '',
page: ++page,
});
},
methods: {
//
modalResetBtn(){
let { brandInfo, incomeTypeInfo } = this;
this.modalSelectScene = null;
this.modalSelectStore = null;
//
this.sceneLs = [];
this.getSceneLs({
brand_id: brandInfo.id || '',
income_type: incomeTypeInfo.eng || '',
});
},
//
modalConfirm(){
let { modalSelectScene, modalSelectStore } = this;
this.confirmSelectScene = modalSelectScene;
this.confirmSelectStore = modalSelectStore;
this.isFilterModal = false;
this.refreshPage();
},
sceneSelect(e){
this.modalSelectScene = e || null;
},
stadiumChange(e){
let { brandInfo, incomeTypeInfo, storeList, modalSelectStore } = this;
let _idx = e.detail.value;
let _stadium = storeList[_idx] || {};
if(modalSelectStore&&(modalSelectStore.id == _stadium.id))return;
this.modalSelectStore = _stadium || null;
this.modalSelectScene = null;
//
this.sceneLs = [];
this.getSceneLs({
brand_id: brandInfo.id || '',
income_type: incomeTypeInfo.eng || '',
stadium_id: _stadium.id
});
},
//
filterShow(){
let { brandInfo, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this;
this.modalSelectScene = confirmSelectScene || null;
this.modalSelectStore = confirmSelectStore || null;
this.isFilterModal = true;
this.$nextTick(async _=>{
this.initFilterScrollView();
if(true)try{
await this.getStoreList(brandInfo.id || '',);
}catch(err){
console.warn('getStore err ->', err)
};
this.getSceneLs({
brand_id: brandInfo.id || '',
income_type: incomeTypeInfo.eng || '',
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || ''
});
});
},
//
getStoreList(brand_id){
util.showLoad();
return server.get({
url: INCOME_API.stadiumList,
data: { brand_id },
failMsg: '加载店铺列表失败!',
})
.then(res=>{
util.hideLoad();
// let _list = [res.list[0]] || [];
let _list = res.list || [];
_list.unshift({ name: '全部', id: '' });
this.storeList = _list;
return _list || [];
})
},
//
getSceneLs({
brand_id = '',
stadium_id = '',
income_type = '',
}){
util.showLoad();
server.get({
url: INCOME_API.consumeRecordSceneLs,
data: {
brand_id,
stadium_id, // -1 id
income_type, // online线 offline线 joint
},
failMsg: '加载场景列表失败!'
})
.then(res=>{
util.hideLoad();
this.sceneLs = res || [];
})
},
incomeTypeChange(incomeTypeInfo){
this.incomeTypeInfo = incomeTypeInfo || {};
this.refreshPage();
},
typeChange(type){
this.type = type;
this.refreshPage();
},
dateChange(e){
let _time = e.detail.value || ''
this.incomeTime = _time;
this.refreshPage();
},
refreshPage(){
this.$nextTick(_=>{
let { brandInfo, incomeTime, type, incomeTypeInfo, confirmSelectStore, confirmSelectScene } = this;
this.page = 1;
this.incomeLs = [];
this.incomeMes = {};
this.getRecordLs({
brand_id: brandInfo.id || '',
type: type || '',
time_str: incomeTime || '',
income_type: incomeTypeInfo.eng || '',
stadium_id: (confirmSelectStore&&confirmSelectStore.id) || '',
scene: (confirmSelectScene&&confirmSelectScene.scene + '') || '',
});
})
},
getRecordLs({
brand_id = '',
stadium_id = '', // -1 id
time_str = '', // y-m-d
scene = '', // int
type = '全部', // /退
income_type = '', // online 线 offline线 joint
page = 1,
page_size = 20,
}){
util.showLoad();
server.get({
url: INCOME_API.consumeCountDetailList,
data: {
brand_id,
stadium_id,
time_str,
page,
page_size,
scene,
type,
income_type,
},
failMsg: '加载失败!',
})
.then(res=>{
util.hideLoad();
let { list, ...data } = res;
this.incomeMes = data || {};
let _ls = list || [];
if(page == 1)return this.incomeLs = _ls;
if(!_ls || !_ls.length)return util.showNone('没有更多!');
this.incomeLs = [ ...this.incomeLs, ..._ls ];
this.page = page;
})
},
toSearch(){
util.routeTo(`/subpackage/income/pages/search/search`, 'nT');
},
async initFilterScrollView(){
try{
let _header = await util.getNodeMes('#dcheader');
let _botBar = await util.getNodeMes('#dcbotbar');
let _sysInfo = uni.getSystemInfoSync();
this.modalScrollViewHeight = (_sysInfo.windowHeight || 0) - ((_header.height || 0) + (_botBar.height || 0))
}catch(err){
console.warn('initFilterScrollView err -->', err);
}
},
},
}
</script>
<style lang="scss">
@import '~style/public.scss';
.dr-header{
margin-bottom: 24upx;
background-color: #fff;
.dh-filter{
padding: 26upx 24upx;
@include centerFlex(space-between);
.df-name{
flex-shrink: 0;
font-size: 28upx;
line-height: 40upx;
color: #9C9C9F;
&.df-active{
color: $themeColor
}
}
.df-date{
@include centerFlex(flex-start);
.dd-frame{
flex-shrink: 0;
padding: 0 20upx;
margin-left: 20upx;
width: 286upx;
height: 92upx;
border-radius: 10upx;
background-color: #F2F2F7;
@include centerFlex(space-between);
>input{
flex-grow: 1;
height: 100%;
font-weight: 400;
font-size: 28upx;
color: #1a1a1a;
}
>view{
flex-shrink: 0;
margin: 0 20upx;
height: 40upx;
width: 1px;
background-color: #B2B2B2;
}
>image{
flex-shrink: 0;
width: 40upx;
height: 40upx;
}
}
}
.df-right{
flex-shrink: 0;
@include centerFlex(flex-end);
.dr-icons{
margin-left: 12upx;
flex-shrink: 0;
flex-wrap: nowrap;
@include centerFlex(center);
>image{
flex-shrink: 0;
flex-grow: 0;
width: 40upx;
height: 40upx;
}
>view{
flex-grow: 0;
flex-shrink: 0;
margin: 0 30upx;
height: 40upx;
width: 1px;
background-color: #B2B2B2;
}
}
}
}
.type-bar{
padding: 20upx 0;
@include centerFlex(center);
.tb-item{
margin: 0 16upx;
padding: 0 28upx;
line-height: 72upx;
text-align: center;
font-size: 36upx;
font-weight: 500;
border-radius: 36upx;
color: #1A1A1A;
&.ti-active{
color: #fff;
background-color: $themeColor;
}
}
}
.tab-bar{
@include centerFlex(center);
border-top: 2upx solid #D8D8D8;
border-bottom: 2upx solid #D8D8D8;
.tb-item{
margin: 0 92upx;
padding: 0 28upx;
&.tb-active{
position: relative;
&::after{
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 8upx;
border-radius: 4upx;
background-color: $themeColor;
}
>view{
color: $themeColor;
}
}
>view{
line-height: 110upx;
text-align: center;
font-size: 32upx;
color: #9C9C9F;
}
}
}
.dh-total{
padding: 0 48upx;
line-height: 110upx;
font-size: 24upx;
color: #9C9C9F;
@include textHide(1);
>text{
color: #F6843E;
}
}
}
.dr-ls{
padding-bottom: 120upx;
padding-bottom: calc( 120upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 120upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
padding-left: 40upx;
background-color: #fff;
.dl-item{
padding: 30upx 40upx 30upx 0;
border-bottom: 2upx solid #D8D8D8;
.di-name{
margin-bottom: 20upx;
line-height: 40upx;
font-size: 28upx;
color: #1A1A1A;
@include textHide(1);
}
.di-top-line{
margin-bottom: 20upx;
@include centerFlex(space-between);
>view{
font-size: 32upx;
line-height: 44upx;
color: #1A1A1A;
@include textHide(1);
&:first-child{
flex-shrink: 0;
max-width: 50%;
}
&+view{
font-weight: 500;
text-align: right;
}
}
}
.di-bot-line{
@include centerFlex(space-between);
>view{
font-size: 24upx;
line-height: 34upx;
color: #9C9C9F;
&:first-child{
flex-grow: 1;
@include textHide(1);
}
&+view{
margin-left: 16upx;
flex-shrink: 0;
text-align: right;
}
}
}
}
}
.dr-mask{
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba($color: #000000, $alpha: .5);
.dm-content{
position: absolute;
right: 0;
bottom: 0;
top: 0;
width: 600upx;
background-color: #fff;
.dc-header{
padding-top: 36upx;
padding-bottom: 40upx;
}
.dc-close{
position: absolute;
right: 34upx;
top: 20upx;
width: 40upx;
height: 40upx;
}
.dc-tit{
margin-bottom: 20upx;
text-align: center;
line-height: 40upx;
font-size: 28upx;
color: #9C9C9F;
}
.dc-stadium{
margin-bottom: 20upx;
padding: 26upx 30upx;
@include centerFlex(space-between);
.ds-name{
flex-shrink: 0;
font-size: 28upx;
line-height: 40upx;
color: #9C9C9F;
}
.ds-frame{
padding: 0 20upx;
width: 476upx;
height: 92upx;
border-radius: 10upx;
background-color: #F2F2F7;
@include centerFlex(space-between);
>image{
flex-shrink: 0;
margin-left: 12upx;
width: 28upx;
height: 28upx;
}
>input{
flex-grow: 1;
height: 100%;
font-size: 28upx;
color: #1a1a1a;
}
}
}
.dc-scene-name{
padding-left: 34upx;
line-height: 44upx;
font-weight: 500;
font-size: 32upx;
color: #1A1A1A;
}
.dc-scroll{
width: 100%;
height: 600upx;
.dc-scene-ls{
padding: 0 20upx;
display: flex;
flex-wrap: wrap;
.dsl-item{
margin: 14upx 10upx;
width: 164upx;
height: 64upx;
line-height: 60upx;
text-align: center;
border-radius: 10upx;
border: 2upx solid #F2F2F7;
font-size: 24upx;
color: #1A1A1A;
background-color: #F2F2F7;
@include textHide(1);
&.dsl-active{
color: $themeColor;
border-color: $themeColor;
background-color: rgba($color: $themeColor, $alpha: .16);
}
}
}
}
.dc-btn-bar{
padding: 20upx 30upx;
padding-bottom: calc( 20upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 20upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
.dbb-btns{
height: 80upx;
border: 2upx solid $themeColor;
background-color: $themeColor;
border-radius: 40upx;
@include centerFlex(space-between);
>view{
flex-shrink: 0;
flex-grow: 0;
text-align: center;
line-height: 76upx;
width: 50%;
height: 100%;
font-size: 28upx;
color: #fff;
border-radius: 40upx;
&:first-child{
background-color: #fff;
color: $themeColor;
border-top-right-radius: 0;
}
}
}
}
}
}
</style>

183
src/subpackage/income/pages/search/search.vue

@ -0,0 +1,183 @@
<template>
<view class="income-search">
<view class="is-search-bar">
<view class="isb-frame">
<view class="if-search-icon" >
<image
mode="aspectFit"
src="/subpackage/income/static/images/search.png"
></image>
</view>
<input
confirm-type = "search"
v-model = "searchKey"
@focus = 'iptFocus'
@blur = 'iptBlur'
@confirm = 'searchConfirm'
hold-keyboard
placeholder = "请输入订单号/手机号码搜索"
/>
<view class="if-close-icon" >
<image
mode="aspectFit"
src="/subpackage/income/static/images/close.png"
v-if="isFocus&&searchKey!=''"
@click="searchKey = ''"
></image>
</view>
</view>
</view>
<view class="is-main">
<view class="im-ls" v-if="incomeLs.length">
<details-item v-for="(e, i) in incomeLs" :key = "i" :income-info = "e"></details-item>
</view>
<view class="im-null" v-else>
<image mode="aspectFit" src="/subpackage/income/static/images/account_null.png"></image>
</view>
</view>
</view>
</template>
<script>
import details_item from '../../components/details_item/details_item.vue';
import util from '../../../../utils/util';
import { INCOME_API } from '../../js/api';
import server from '../../js/server';
export default {
components: {
'details-item': details_item
},
data(){
return {
incomeLs: [],
isFocus: false,
searchKey: '',
page: 1,
}
},
onLoad(){
},
onReachBottom(){
let { searchKey, page } = this;
this.getRecordLs({
page: ++page,
key: searchKey,
})
},
methods: {
searchConfirm(e){
console.warn(e);
this.page = 1;
this.incomeLs = [];
this.getRecordLs({
key: e.detail.value || ''
})
},
iptFocus(){
this.isFocus = true;
},
iptBlur(){
this.isFocus = false;
},
getRecordLs({
brand_id = '',
stadium_id = '', // -1 id
time_str = '', // y-m-d
scene = '', // int
type = '全部', // /退
income_type = '', // online 线 offline线 joint
page = 1,
page_size = 20,
key= '',
}){
util.showLoad();
server.get({
url: INCOME_API.consumeCountDetailList,
data: {
brand_id,
stadium_id,
time_str,
page,
page_size,
scene,
type,
income_type,
key
},
failMsg: '加载失败!',
})
.then(res=>{
util.hideLoad();
let { list, ...data } = res;
let _ls = list || [];
if(page == 1)return this.incomeLs = _ls;
if(!_ls || !_ls.length)return util.showNone('没有更多!');
this.incomeLs = [ ...this.incomeLs, ..._ls ];
this.page = page;
})
},
},
}
</script>
<style lang="scss">
@import '~style/public.scss';
page{
background-color: #fff;
}
.is-search-bar{
padding: 30upx 24upx;
.isb-frame{
padding: 0 24upx;
height: 72upx;
border: 2upx solid $themeColor;
border-radius: 36upx;
@include centerFlex(space-between);
>input{
flex-grow: 1;
height: 68upx;
font-size: 28upx;
color: #1a1a1a;
}
>view{
flex-shrink: 0;
width: 30upx;
height: 30upx;
font-size: 0;
>image{
width: 100%;
height: 100%;
}
}
.if-search-icon{
margin-right: 24upx;
}
.if-close-icon{
margin-left: 24upx;
}
}
}
.is-main{
border-top: 24upx solid #f2f1f6;
.im-null{
padding-top: 106upx;
>image{
margin: 0 auto;
display: block;
width: 370upx;
height: 370upx;
}
}
.im-ls{
padding-bottom: 120upx;
padding-bottom: calc( 120upx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
padding-bottom: calc( 120upx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
padding-left: 40upx;
background-color: #fff;
}
}
</style>

BIN
src/subpackage/income/static/images/account_null.png

After

Width: 370  |  Height: 370  |  Size: 10 KiB

BIN
src/subpackage/income/static/images/bot_arrow.png

After

Width: 56  |  Height: 56  |  Size: 401 B

BIN
src/subpackage/income/static/images/calendar.png

After

Width: 80  |  Height: 80  |  Size: 430 B

BIN
src/subpackage/income/static/images/close.png

After

Width: 64  |  Height: 72  |  Size: 769 B

BIN
src/subpackage/income/static/images/filter.png

After

Width: 80  |  Height: 80  |  Size: 483 B

BIN
src/subpackage/income/static/images/search.png

After

Width: 80  |  Height: 80  |  Size: 660 B

5
src/subpackage/order/components/club_rental/end_billing/end_billing.vue

@ -10,7 +10,7 @@
<view class="em-settlement">
<view class="es-tit">结算金额()</view>
<view class="es-frame">
<input class="ef-ipt" type="number" v-model="amount" />
<input class="ef-ipt" type="digit" v-model="amount" />
</view>
</view>
@ -46,6 +46,9 @@ export default {
}
},
methods: {
setAmount(amount){
this.amount = amount || '';
},
close(){
this.$emit('close');
},

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

@ -227,7 +227,7 @@
<!-- 20220728 取消退押金操作 -->
<!-- <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 == 'rent'&&orderInfo.status_type == 5">结束计费</view>
<view class="cr-btn" @click="overBillingBtn" v-if="orderInfo.order_type == 'rent'&&orderInfo.status_type == 5 || true">结束计费</view>
<!-- <view class="cr-btn" @click="overBillingBtn">结束计费</view> -->
<end-billing
@ -235,6 +235,7 @@
@close = 'isShowEndBilling = false'
@confirm = 'endBillingBtn'
:orderInfo = 'orderInfo'
ref="endBilling"
></end-billing>
</view>
@ -368,6 +369,13 @@ export default {
let _order = res.order || { extension: {} };
this.orderInfo = _order;
this.isShowEndBilling = isEndBilling;
//
this.$nextTick(_=>{
if(this.$refs&&this.$refs.endBilling&&this.$refs.endBilling.setAmount){
this.$refs.endBilling.setAmount(_order.amount || 0);
}
})
})
},
// 20220728 退

Loading…
Cancel
Save