修改文字描述

main
ihzero 2024-05-24 20:11:12 +08:00
parent 3866223374
commit 13a3e48d18
3 changed files with 37 additions and 18 deletions

View File

@ -37,7 +37,8 @@
<uv-line direction="vertical"></uv-line>
</view>
<view class="flex-1 text-center">
<view>支出</view>
<view v-if="isLotteryStore"></view>
<view v-else></view>
<view>{{ yesday_ledger.expenditure }}</view>
</view>
</view>
@ -54,7 +55,8 @@
<uv-line direction="vertical"></uv-line>
</view>
<view class="flex-1 text-center">
<view>支出</view>
<view v-if="isLotteryStore"></view>
<view v-else></view>
<view>{{ current_month_ledger.expenditure }}</view>
</view>
</view>
@ -103,6 +105,9 @@ const onConnected = () => {
const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
const isLotteryStore = computed(
() => (userStore.userInfo?.store?.is_lottery_store || checkPermission(['admin']))
)
const unread_notifications = computed(
() => userInfo.value.unread_notifications || 0
)
@ -138,16 +143,30 @@ const opts = {
},
}
const list = ref([
{
name: '销售金额',
key: 'sales',
},
{
name: '支出金额',
key: 'expenditure',
},
])
// const list = ref([
// {
// name: '',
// key: 'sales',
// },
// {
// name: '',
// key: 'expenditure',
// },
// ])
const list = computed(() => {
return [
{
name: '销售金额',
key: 'sales',
},
{
name: isLotteryStore.value ? '兑奖金额' : '支出金额',
key: 'expenditure',
},
]
})
const tabIndex = ref(0)
const detail = ref({
yesday_ledger: {},

View File

@ -16,7 +16,7 @@
<template v-if="checkPermission(['admin'])">
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">支出</view>
<view class="td">兑奖</view>
<view class="td">新增客户</view>
</view>
</template>
@ -35,7 +35,7 @@
</view>
</template>
</view>
<template v-if="checkPermission(['admin','store'])">
<template v-if="checkPermission(['admin']) || isLotteryStore">
<view
class="text-center leading-60rpx w-200rpx flex-none"
v-for="(ty, j) in item.lottery_types"
@ -102,7 +102,7 @@
</view>
<!-- 种类 -->
<template v-if="checkPermission(['admin','store'])">
<template v-if="checkPermission(['admin']) || isLotteryStore">
<template v-for="(ty, j) in item.lottery_types" :key="j">
<view class="w-200rpx flex flex-none">
<view class="flex-1 td h-60rpx flex-center">{{

View File

@ -35,11 +35,11 @@
<view class="text-center flex-1 tr">
<view
class="flex-center h-80rpx"
v-if="!isLotteryStore || checkPermission(['admin'])"
v-if="isLotteryStore || checkPermission(['admin'])"
>
<view>支出金额</view>
<view>兑奖金额</view>
</view>
<view class="flex-center h-80rpx" v-else></view>
<view class="flex-center h-80rpx" v-else></view>
<view class="font-600 flex-center h-80rpx">{{
ledger.expenditure
}}</view>