Compare commits

..

No commits in common. "3a980c0f20618a1101f683f5a8573811e00cb381" and "28b235691efcea1317e258235b5842dfa88c608f" have entirely different histories.

3 changed files with 80 additions and 282 deletions

View File

@ -1,159 +0,0 @@
<template>
<view class="relative">
<uv-scroll-list
:indicator="true"
indicatorColor="#fff0f0"
indicatorActiveColor="#f56c6c"
>
<view>
<template v-for="(item, i) in list" :key="i">
<view v-if="i == 0" class="flex items-center w-full text-24rpx">
<view
class="w-140rpx text-center flex-none h-120rpx flex-center td"
>
<!-- 日期 -->
</view>
<view class="w-400rpx text-center leading-60rpx flex-none">
<view class="h-60rpx td">总账</view>
<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>
</template>
<template v-else-if="isLotteryStore">
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">兑奖</view>
<view class="td">新增客户</view>
</view>
</template>
<template v-else>
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">支出</view>
<view class="td">新增客户</view>
</view>
</template>
</view>
<view
class="text-center leading-60rpx w-200rpx flex-none"
v-for="(ty, j) in item.lottery_types"
:key="j"
>
<view class="td">{{ ty.name }}</view>
<view class="grid grid-cols-2">
<view class="td">销售</view>
<view class="td">兑奖</view>
</view>
</view>
</view>
<view
class="flex justify-between text-center text-24rpx items-center card-shadow bg-white rounded-19rpx"
>
<view class="flex-1 w-140rpx flex-none td flex-center h-60rpx">
<!-- {{ timeFormat(item.date, 'mm-dd') }} -->
</view>
<!-- 总账 -->
<view class="w-400rpx flex flex-none">
<template v-if="checkPermission(['admin'])">
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
<template v-else-if="isLotteryStore">
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
<template v-else>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
</view>
<!-- 种类 -->
<template v-for="(ty, j) in item.lottery_types" :key="j">
<view class="flex-1 td h-60rpx flex-center">{{ ty.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{
ty.expenditure
}}</view>
</template>
</view>
</template>
</view>
</uv-scroll-list>
<view>
<view class="absolute left-0 right-0 top-0 bottom-0 pointer-events-none">
<template v-for="(item, i) in list" :key="i">
<view v-if="i == 0" class="flex items-center w-full text-24rpx">
<view
class="w-140rpx text-center flex-none h-120rpx flex-center td bg-white"
>
日期
</view>
</view>
<view
class="flex justify-between text-center text-24rpx items-center rounded-19rpx"
>
<view
class="flex-1 w-140rpx flex-none td flex-center h-60rpx bg-white"
>{{ timeFormat(item.date, 'mm-dd') }}</view
>
</view>
</template>
</view>
</view>
<view class="h-90vh"></view>
</view>
</template>
<script setup>
import checkPermission from '@/utils/permission'
import { timeFormat } from '@climblee/uv-ui/libs/function'
import { computed } from 'vue'
import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore()
const isLotteryStore = computed(
() => userStore.userInfo?.store?.is_lottery_store
)
const props = defineProps({
list: {
type: Array,
default: () => [],
},
})
</script>
<style lang="scss" scoped>
.tr {
border: 0.5px solid #f5f5f5;
}
.td {
border: 0.5px solid #f5f5f5;
}
</style>

View File

@ -1,135 +1,91 @@
<template>
<view class="relative">
<uv-scroll-list
:indicator="true"
indicatorColor="#fff0f0"
indicatorActiveColor="#f56c6c"
>
<view>
<template v-for="(item, i) in list" :key="i">
<view v-if="i == 0" class="flex items-center w-full text-24rpx">
<view
class="w-140rpx text-center flex-none h-120rpx flex-center td"
>
<!-- 日期 -->
</view>
<uv-scroll-list
:indicator="true"
indicatorColor="#fff0f0"
indicatorActiveColor="#f56c6c"
>
<view>
<template v-for="(item, i) in list" :key="i">
<view
v-if="i == 0"
class="flex items-center w-full text-24rpx"
>
<view class="w-140rpx text-center flex-none h-120rpx flex-center td"> 日期 </view>
<view class="w-400rpx text-center leading-60rpx flex-none">
<view class="h-60rpx td">总账</view>
<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>
</template>
<template v-else-if="isLotteryStore">
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">兑奖</view>
<view class="td">新增客户</view>
</view>
</template>
<template v-else>
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">支出</view>
<view class="td">新增客户</view>
</view>
</template>
</view>
<view
class="text-center leading-60rpx w-200rpx flex-none"
v-for="(ty, j) in item.lottery_types"
:key="j"
>
<view class="td">{{ ty.name }}</view>
<view class="grid grid-cols-2">
<view
class="w-400rpx text-center leading-60rpx flex-none "
>
<view class="h-60rpx td">总账</view>
<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>
</template>
<template v-else-if="isLotteryStore">
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">兑奖</view>
<view class="td">新增客户</view>
</view>
</template>
<template v-else>
<view class="h-60rpx grid grid-cols-3">
<view class="td">销售</view>
<view class="td">支出</view>
<view class="td">新增客户</view>
</view>
</view>
</view>
</template>
<template v-for="(item, i) in list" :key="i">
<view
class="flex justify-between text-center text-24rpx items-center card-shadow bg-white rounded-19rpx"
>
<view class="flex-1 w-140rpx flex-none td flex-center h-60rpx">
<!-- {{ timeFormat(item.date, 'mm-dd') }} -->
</view>
<!-- 总账 -->
<view class="w-400rpx flex flex-none">
<template v-if="checkPermission(['admin'])">
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
<template v-else-if="isLotteryStore">
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
<template v-else>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.sales
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.expenditure
}}</view>
<view class="flex-1 td h-60rpx flex-center">{{
item.ledger.new_customers
}}</view>
</template>
</view>
<!-- 种类 -->
<template v-for="(ty, j) in item.lottery_types" :key="j">
<view class="flex-1 td h-60rpx flex-center">{{ ty.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{
ty.expenditure
}}</view>
</template>
</view>
</template>
</view>
</uv-scroll-list>
<view>
<view class="absolute left-0 right-0 top-0 bottom-0 pointer-events-none">
<template v-for="(item, i) in list" :key="i">
<view v-if="i == 0" class="flex items-center w-full text-24rpx">
<view
class="w-140rpx text-center flex-none h-120rpx flex-center td bg-white"
>
日期
<view
class="text-center leading-60rpx w-200rpx flex-none"
v-for="(ty, j) in item.lottery_types"
:key="j"
>
<view class="td">{{ ty.name }}</view>
<view class="grid grid-cols-2">
<view class="td">销售</view>
<view class="td">兑奖</view>
</view>
</view>
<view
class="flex justify-between text-center text-24rpx items-center rounded-19rpx"
>
<view
class="flex-1 w-140rpx flex-none td flex-center h-60rpx bg-white"
>{{ timeFormat(item.date, 'mm-dd') }}</view
>
</view>
<view
class="flex justify-between text-center text-24rpx items-center card-shadow bg-white rounded-19rpx"
>
<view class="flex-1 w-140rpx flex-none td flex-center h-60rpx">{{
timeFormat(item.date, 'mm-dd')
}}</view>
<!-- 总账 -->
<view class="w-400rpx flex flex-none">
<template v-if="checkPermission(['admin'])">
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.expenditure }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.new_customers }}</view>
</template>
<template v-else-if="isLotteryStore">
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.expenditure }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.new_customers }}</view>
</template>
<template v-else>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.expenditure }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ item.ledger.new_customers }}</view>
</template>
</view>
</template>
</view>
<!-- 种类 -->
<template v-for="(ty, j) in item.lottery_types" :key="j">
<view class="flex-1 td h-60rpx flex-center">{{ ty.sales }}</view>
<view class="flex-1 td h-60rpx flex-center">{{ ty.expenditure }}</view>
</template>
</view>
</template>
</view>
<view class="h-90vh"></view>
</view>
</uv-scroll-list>
</template>
<script setup>
@ -154,7 +110,7 @@ const props = defineProps({
.tr {
border: 0.5px solid #f5f5f5;
}
.td {
.td{
border: 0.5px solid #f5f5f5;
}
</style>
</style>

View File

@ -2,6 +2,7 @@ export default function(){
//当应用无访问摄像头/相册权限,引导跳到设置界面
uni.addInterceptor('chooseImage', {
fail(e) { // 失败回调拦截 更多拦截器用法 [详情](https://uniapp.dcloud.io/api/interceptor?id=addinterceptor)
console.log(e);
if (uni.getSystemInfoSync().platform == "android" && e.errMsg == 'chooseImage:fail No Permission') {
if (e.code === 11) {
uni.showModal({