Merge branch 'dev_1.0.0' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into dwb
This commit is contained in:
@@ -10,16 +10,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<ul class="payList">
|
<view class="payList">
|
||||||
<li v-for="item in list" :key="item.id">
|
<view class="li" v-for="(item,index) in list" :key="index">
|
||||||
<view style="text-align: center;">
|
<view style="text-align: center;">
|
||||||
{{item.payType}}
|
{{item.payType}}
|
||||||
</view>
|
</view>
|
||||||
<view style="text-align: center;">
|
<view style="text-align: center;" class="u-m-t-6">
|
||||||
{{item.payAmount}}
|
{{item.payAmount}}
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</view>
|
||||||
</ul>
|
</view>
|
||||||
|
|
||||||
|
<view class="u-m-t-8 u-flex u-row-center u-font-24 u-col-center color-666">
|
||||||
|
<view class="u-flex" @click="toggleShowAll">
|
||||||
|
<view>{{!showAll?'展开全部':'收起全部' }}</view>
|
||||||
|
<view class="u-flex u-col-center u-m-t-4 tranistion-2" :class="{rotate:showAll}">
|
||||||
|
<up-icon color="#666" name="arrow-down" :size="12"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<datePickerview @confirm="datePickerConfirm" ref="datePicker" style="z-index: 999;"></datePickerview>
|
<datePickerview @confirm="datePickerConfirm" ref="datePicker" style="z-index: 999;"></datePickerview>
|
||||||
@@ -39,6 +48,15 @@
|
|||||||
onShow
|
onShow
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
let selected = ref('today')
|
let selected = ref('today')
|
||||||
|
let showAll = ref(false);
|
||||||
|
let $list=[]
|
||||||
|
function toggleShowAll() {
|
||||||
|
showAll.value = !showAll.value
|
||||||
|
setList()
|
||||||
|
}
|
||||||
|
function setList(){
|
||||||
|
list.value=showAll.value?$list:$list.slice(0,4)
|
||||||
|
}
|
||||||
let list = ref()
|
let list = ref()
|
||||||
const emit = defineEmits(['totalRevenue'])
|
const emit = defineEmits(['totalRevenue'])
|
||||||
const timeList = [{
|
const timeList = [{
|
||||||
@@ -63,15 +81,15 @@
|
|||||||
]
|
]
|
||||||
const currentInstance = getCurrentInstance()
|
const currentInstance = getCurrentInstance()
|
||||||
onShow((options) => {
|
onShow((options) => {
|
||||||
let iToken = uni.getStorageSync('iToken')
|
let iToken = uni.getStorageSync('iToken')
|
||||||
console.log(iToken,'调试123')
|
if (iToken) {
|
||||||
if(iToken){
|
|
||||||
getlist()
|
getlist()
|
||||||
}else{
|
} else {
|
||||||
uni.redirectTo({url: '/pages/login/index'})
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/index'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getlist(start, end) {
|
function getlist(start, end) {
|
||||||
let startTime, endTime;
|
let startTime, endTime;
|
||||||
if (selected.value == 'today') {
|
if (selected.value == 'today') {
|
||||||
@@ -103,7 +121,8 @@
|
|||||||
startTime,
|
startTime,
|
||||||
endTime,
|
endTime,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
list.value = res.sale.payCount.slice(0, 4)
|
$list=res.sale.payCount
|
||||||
|
setList()
|
||||||
emit('totalRevenue', res.sale.incomeAmountAll)
|
emit('totalRevenue', res.sale.incomeAmountAll)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -150,22 +169,25 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rotate {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
.statistics {
|
.statistics {
|
||||||
padding: 0 28rpx;
|
padding: 0 28rpx;
|
||||||
|
|
||||||
.statisticsBox {
|
.statisticsBox {
|
||||||
width: 694rpx;
|
width: 694rpx;
|
||||||
height: 260rpx;
|
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||||
|
padding: 32rpx 22rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin-top: 54rpx;
|
||||||
|
|
||||||
.time-wrapper {
|
.time-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
padding-bottom: 16rpx;
|
|
||||||
padding-top: 16rpx;
|
|
||||||
margin-top: 54rpx;
|
|
||||||
|
|
||||||
.timelistbox {
|
.timelistbox {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -192,22 +214,24 @@
|
|||||||
.time-selected {
|
.time-selected {
|
||||||
color: #318afe;
|
color: #318afe;
|
||||||
font-size: 32rpx !important;
|
font-size: 32rpx !important;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.payList {
|
.payList {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 32rpx;
|
margin-top: 32rpx;
|
||||||
|
|
||||||
>li {
|
.li {
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
width: 170rpx;
|
width: 25%;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -4,13 +4,26 @@
|
|||||||
<!-- 导航条 -->
|
<!-- 导航条 -->
|
||||||
<up-navbar title="首页" bg-color="#318AFE" titleStyle="color:#fff;font-size:16px;" @leftClick="toSetting">
|
<up-navbar title="首页" bg-color="#318AFE" titleStyle="color:#fff;font-size:16px;" @leftClick="toSetting">
|
||||||
<template #left>
|
<template #left>
|
||||||
<up-icon name="/static/indexImg/icon-menu.svg" color="#fff" :size="16" ></up-icon>
|
<up-icon name="/static/indexImg/icon-menu.svg" color="#fff" :size="16"></up-icon>
|
||||||
</template>
|
</template>
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
<!-- <JeepayCustomNavbar title="首页" textColor="#fff" bgDefaultColor="#318AFE" /> -->
|
<!-- <JeepayCustomNavbar title="首页" textColor="#fff" bgDefaultColor="#318AFE" /> -->
|
||||||
<view class="income">
|
<view class="income">
|
||||||
<view>总收入</view>
|
<view class="u-flex u-row-center u-relative">
|
||||||
<view>¥{{totalRevenuedata}}</view>
|
<view class="u-flex u-col-center">
|
||||||
|
<view class="u-m-r-12">总收入</view>
|
||||||
|
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12"
|
||||||
|
@click="toggleTips"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view class="tips u-absolute color-666 u-font-20 u-text-left " :class="{'showTips':showTips}">
|
||||||
|
<view class="sanjiao u-flex"><up-icon name="play-left-fill" size="12" color="#fff"></up-icon></view>
|
||||||
|
总收入为除会员余额
|
||||||
|
支付外所有收入
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="u-flex u-row-center">
|
||||||
|
<view class="">¥{{totalRevenuedata}}</view>
|
||||||
|
</view>
|
||||||
<view>{{shopName}}</view>
|
<view>{{shopName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 统计 or 快捷扫码 -->
|
<!-- 统计 or 快捷扫码 -->
|
||||||
@@ -22,7 +35,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
ref,
|
ref,
|
||||||
@@ -56,10 +68,17 @@
|
|||||||
shopName.value = uni.getStorageSync('shopName');
|
shopName.value = uni.getStorageSync('shopName');
|
||||||
});
|
});
|
||||||
let totalRevenuedata = ref()
|
let totalRevenuedata = ref()
|
||||||
let totalRevenue= (d)=>{
|
let totalRevenue = (d) => {
|
||||||
totalRevenuedata.value=d
|
totalRevenuedata.value = d
|
||||||
}
|
}
|
||||||
function toSetting(){
|
|
||||||
|
let showTips = ref(false)
|
||||||
|
|
||||||
|
function toggleTips() {
|
||||||
|
showTips.value = !showTips.value
|
||||||
|
}
|
||||||
|
|
||||||
|
function toSetting() {
|
||||||
go.to('PAGES_SHOP_SETUP')
|
go.to('PAGES_SHOP_SETUP')
|
||||||
}
|
}
|
||||||
// 导航列表
|
// 导航列表
|
||||||
@@ -170,81 +189,81 @@
|
|||||||
icon: '/static/indexImg/icon-notification.svg',
|
icon: '/static/indexImg/icon-notification.svg',
|
||||||
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||||
},
|
},
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '进销存',
|
// // // title: '进销存',
|
||||||
// // // icon: '/static/indexImg/icon-invoicing.svg',
|
// // // icon: '/static/indexImg/icon-invoicing.svg',
|
||||||
// // // pageUrl: 'PAGES_INVOICING_INDEX',
|
// // // pageUrl: 'PAGES_INVOICING_INDEX',
|
||||||
// // // },
|
// // // },
|
||||||
|
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '预定座位',
|
// // // title: '预定座位',
|
||||||
// // // icon: '/static/indexImg/icon-yuyue-zuo.svg',
|
// // // icon: '/static/indexImg/icon-yuyue-zuo.svg',
|
||||||
// // // pageUrl: 'PAGES_RESERVE_SEAT_INDEX',
|
// // // pageUrl: 'PAGES_RESERVE_SEAT_INDEX',
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '预约管理',
|
// // // title: '预约管理',
|
||||||
// // // icon: '/static/indexImg/icon-yuyue.svg',
|
// // // icon: '/static/indexImg/icon-yuyue.svg',
|
||||||
// // // pageUrl: 'PAGES_BOOKING_INDEX',
|
// // // pageUrl: 'PAGES_BOOKING_INDEX',
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '充值管理',
|
// // // title: '充值管理',
|
||||||
// // // icon: '/static/indexImg/icon-recharge.svg',
|
// // // icon: '/static/indexImg/icon-recharge.svg',
|
||||||
// // // pageUrl: 'PAGES_RECHARGE_INDEX',
|
// // // pageUrl: 'PAGES_RECHARGE_INDEX',
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '存酒管理',
|
// // // title: '存酒管理',
|
||||||
// // // icon: '/static/indexImg/icon-wine.svg',
|
// // // icon: '/static/indexImg/icon-wine.svg',
|
||||||
// // // pageUrl: 'PAGES_STORING_WINE_INDEX',
|
// // // pageUrl: 'PAGES_STORING_WINE_INDEX',
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '进件管理',
|
// // // title: '进件管理',
|
||||||
// // // icon: '/static/indexImg/icon-passage.svg',
|
// // // icon: '/static/indexImg/icon-passage.svg',
|
||||||
// // // pageUrl: 'PAGES_APPLYMENT',
|
// // // pageUrl: 'PAGES_APPLYMENT',
|
||||||
// // // entId: 'ENT_MCH_APPLYMENT_LIST'
|
// // // entId: 'ENT_MCH_APPLYMENT_LIST'
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '商户管理',
|
// // // title: '商户管理',
|
||||||
// // // icon: '/static/indexImg/business.svg',
|
// // // icon: '/static/indexImg/business.svg',
|
||||||
// // // pageUrl: 'PAGES_APPLYMENT_BUSINESS',
|
// // // pageUrl: 'PAGES_APPLYMENT_BUSINESS',
|
||||||
// // // entId: 'ENT_MCH_APPLYMENT_LIST'
|
// // // entId: 'ENT_MCH_APPLYMENT_LIST'
|
||||||
// // // },
|
// // // },
|
||||||
// // // {
|
// // // {
|
||||||
// // // title: '门店管理',
|
// // // title: '门店管理',
|
||||||
// // // icon: '/static/indexImg/icon-store.svg',
|
// // // icon: '/static/indexImg/icon-store.svg',
|
||||||
// // // pageUrl: 'PAGES_STORE',
|
// // // pageUrl: 'PAGES_STORE',
|
||||||
// // // entId: 'ENT_MCH_STORE'
|
// // // entId: 'ENT_MCH_STORE'
|
||||||
// // // },
|
// // // },
|
||||||
// // {
|
// // {
|
||||||
// // title: '设备管理',
|
// // title: '设备管理',
|
||||||
// // icon: '/static/indexImg/icon-calc.svg',
|
// // icon: '/static/indexImg/icon-calc.svg',
|
||||||
// // pageUrl: 'PAGES_DEVICE_MAIN',
|
// // pageUrl: 'PAGES_DEVICE_MAIN',
|
||||||
// // entId: 'ENT_DEVICE'
|
// // entId: 'ENT_DEVICE'
|
||||||
// // },
|
// // },
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// title: '数据中心',
|
// title: '数据中心',
|
||||||
// icon: '/static/indexImg/icon-pro.svg',
|
// icon: '/static/indexImg/icon-pro.svg',
|
||||||
// pageUrl: 'PAGES_STAT',
|
// pageUrl: 'PAGES_STAT',
|
||||||
// entId: 'ENT_ORDER_STATISTIC'
|
// entId: 'ENT_ORDER_STATISTIC'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '商户应用',
|
// title: '商户应用',
|
||||||
// icon: '/static/indexImg/icon-app.svg',
|
// icon: '/static/indexImg/icon-app.svg',
|
||||||
// pageUrl: 'PAGES_APP',
|
// pageUrl: 'PAGES_APP',
|
||||||
// entId: 'ENT_MCH_APP_LIST'
|
// entId: 'ENT_MCH_APP_LIST'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '会员中心',
|
// title: '会员中心',
|
||||||
// icon: '/static/indexImg/icon-member.svg',
|
// icon: '/static/indexImg/icon-member.svg',
|
||||||
// pageUrl: 'PAGES_MEMBER_CENTER',
|
// pageUrl: 'PAGES_MEMBER_CENTER',
|
||||||
// entId: 'ENT_MCH_MEMBER'
|
// entId: 'ENT_MCH_MEMBER'
|
||||||
// },
|
// },
|
||||||
// {
|
// {
|
||||||
// title: '广告管理',
|
// title: '广告管理',
|
||||||
// icon: '/static/indexImg/icon-ad.svg',
|
// icon: '/static/indexImg/icon-ad.svg',
|
||||||
// pageUrl: 'PAGES_AD_LIST',
|
// pageUrl: 'PAGES_AD_LIST',
|
||||||
// entId: 'ENT_ADVERT_CONTROL'
|
// entId: 'ENT_ADVERT_CONTROL'
|
||||||
// },
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -344,6 +363,7 @@
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
padding-top: calc(84rpx);
|
padding-top: calc(84rpx);
|
||||||
|
|
||||||
/* #endif */
|
/* #endif */
|
||||||
>view {
|
>view {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -369,4 +389,26 @@
|
|||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
opacity: 0;
|
||||||
|
right: 28rpx;
|
||||||
|
transition: opacity .3s;
|
||||||
|
background: #FFFFFF;
|
||||||
|
padding: 20rpx 14rpx;
|
||||||
|
width: 211rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
|
||||||
|
&.showTips {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sanjiao {
|
||||||
|
position: absolute;
|
||||||
|
right: 100%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateX(10rpx) translateY(-50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
1
static/indexImg/icon-help.svg
Normal file
1
static/indexImg/icon-help.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><defs><style>.a{fill:#fff;}</style></defs><g transform="translate(-94.041 -94.041)"><path class="a" d="M386.1,290.86h0a.351.351,0,0,1-.348-.357,3.08,3.08,0,0,1,.07-.687,1.3,1.3,0,0,1,.209-.444,1.459,1.459,0,0,1,.313-.27c.1-.07.2-.148.3-.226a3.113,3.113,0,0,0,.609-.67,1.056,1.056,0,0,0,.13-.522,1.084,1.084,0,0,0-.383-.844,1.559,1.559,0,0,0-1.1-.365,1.215,1.215,0,0,0-.931.339,1.526,1.526,0,0,0-.461,1,.351.351,0,1,1-.7-.087,2.173,2.173,0,0,1,.7-1.435,1.9,1.9,0,0,1,1.392-.513,2.217,2.217,0,0,1,1.566.548,1.769,1.769,0,0,1,.609,1.357,1.7,1.7,0,0,1-.217.852,3.457,3.457,0,0,1-.757.852c-.122.1-.244.2-.339.27a1.833,1.833,0,0,0-.165.13.767.767,0,0,0-.1.209,1.918,1.918,0,0,0-.043.522A.361.361,0,0,1,386.1,290.86Z" transform="translate(-285.904 -189.239)"/><path class="a" d="M490.057,655.151m-.522,0a.522.522,0,1,0,.522-.522A.522.522,0,0,0,489.535,655.151Z" transform="translate(-389.89 -552.645)"/><path class="a" d="M100.041,106.041a6,6,0,1,1,6-6A6.008,6.008,0,0,1,100.041,106.041Zm0-11.4a5.4,5.4,0,1,0,5.4,5.4A5.406,5.406,0,0,0,100.041,94.641Z" transform="translate(0 0)"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user