2024-03-04 07:10:11 +00:00
|
|
|
<template>
|
2024-05-07 05:41:43 +00:00
|
|
|
<NavBar :count="0" :title="'数据统计'"></NavBar>
|
2024-04-12 07:53:44 +00:00
|
|
|
<Box
|
|
|
|
v-if="
|
|
|
|
isShowModule(list[0].child.concat(list[1].child).concat(list[2].child))
|
|
|
|
"
|
2024-05-07 05:41:43 +00:00
|
|
|
:isShow="true"
|
2024-04-12 07:53:44 +00:00
|
|
|
>
|
|
|
|
<view
|
|
|
|
v-for="(item, index) in list"
|
|
|
|
:key="index"
|
|
|
|
v-show="isShowModule(item.child)"
|
|
|
|
>
|
2024-03-04 07:10:11 +00:00
|
|
|
<view class="title">
|
|
|
|
<Title :title="item.title" />
|
|
|
|
</view>
|
|
|
|
<view class="box-content">
|
2024-04-11 03:12:19 +00:00
|
|
|
<view
|
|
|
|
v-for="(child, index) in item.child"
|
|
|
|
:key="index"
|
|
|
|
@click="(child as any).fn(child)"
|
2024-05-07 05:41:43 +00:00
|
|
|
v-show="isShowModule([{ title: child.title }])"
|
|
|
|
:class="{ box: isShowModule([{ title: child.title }]) }"
|
2024-04-11 03:12:19 +00:00
|
|
|
>
|
2024-05-07 05:41:43 +00:00
|
|
|
<view v-if="isShowModule([{ title: child.title }])">
|
2024-03-04 07:10:11 +00:00
|
|
|
<up-image
|
2024-04-11 03:12:19 +00:00
|
|
|
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesStatistics/${child.icon}`"
|
2024-03-04 07:10:11 +00:00
|
|
|
mode="aspectFill"
|
2024-03-14 03:14:12 +00:00
|
|
|
width="60rpx"
|
|
|
|
height="60rpx"
|
2024-03-04 07:10:11 +00:00
|
|
|
></up-image>
|
|
|
|
</view>
|
2024-05-07 05:41:43 +00:00
|
|
|
<view v-if="isShowModule([{ title: child.title }])">{{
|
|
|
|
child.title
|
|
|
|
}}</view>
|
2024-03-04 07:10:11 +00:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
2024-04-11 03:12:19 +00:00
|
|
|
<view class="line" v-show="index < list.length - 1"></view>
|
2024-03-04 07:10:11 +00:00
|
|
|
</view>
|
|
|
|
</Box>
|
2024-05-07 05:41:43 +00:00
|
|
|
|
2024-04-12 07:53:44 +00:00
|
|
|
<!-- 当收货 出货 常用app全部为空 显示暂无权限 -->
|
|
|
|
<up-empty
|
|
|
|
v-else
|
|
|
|
mode="permission"
|
|
|
|
icon="http://cdn.uviewui.com/uview/empty/permission.png"
|
|
|
|
:text="'暂无相关权限, 请联系管理员'"
|
|
|
|
>
|
|
|
|
</up-empty>
|
2024-04-11 03:12:19 +00:00
|
|
|
<TabBar></TabBar>
|
2024-03-04 07:10:11 +00:00
|
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
2024-03-11 05:30:11 +00:00
|
|
|
import Box from "@/components/Box/index.vue";
|
|
|
|
import Title from "@/components/Title/index.vue";
|
2024-04-11 03:12:19 +00:00
|
|
|
import TabBar from "@/components/TabBar/index.vue";
|
2024-04-12 07:53:44 +00:00
|
|
|
import { useMemberStore } from "@/store/index";
|
|
|
|
import { ProfileApi } from "@/services";
|
2024-05-09 02:45:07 +00:00
|
|
|
import pinia from '@/store'
|
2024-05-07 05:41:43 +00:00
|
|
|
|
2024-05-09 02:45:07 +00:00
|
|
|
const store = useMemberStore(pinia);
|
2024-03-04 07:10:11 +00:00
|
|
|
const list = reactive([
|
|
|
|
{
|
|
|
|
title: "收货",
|
|
|
|
child: [
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "01.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "收货汇总",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/receivePanel", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "02.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "供应商排行",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/supplierRanking", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "出货",
|
|
|
|
child: [
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "03.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "出货汇总",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/shipmentPanel", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "04.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "客户排行",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/customerRanking", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "账本",
|
|
|
|
child: [
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "05.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "经营概况",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/businessOverview", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "06.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "供应商对账",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/supplierChecking", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
{
|
2024-03-14 03:14:12 +00:00
|
|
|
icon: "07.png",
|
2024-03-04 07:10:11 +00:00
|
|
|
title: "客户对账",
|
|
|
|
fn: (item: any) => {
|
|
|
|
uni.navigateTo({
|
2024-03-11 05:30:11 +00:00
|
|
|
url: "/pagesStatistics/customerChecking", // 要跳转到的页面路径
|
2024-04-11 03:12:19 +00:00
|
|
|
});
|
|
|
|
},
|
2024-03-04 07:10:11 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]);
|
2024-04-12 07:53:44 +00:00
|
|
|
|
|
|
|
// 收货、出货、常用app是否显示
|
|
|
|
const isShowModule = (list: any) => {
|
|
|
|
let flag = false;
|
|
|
|
list.forEach((item: any) => {
|
|
|
|
if (store.profile.menusNameList.indexOf(item.title) > -1) {
|
|
|
|
flag = true;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return flag;
|
|
|
|
};
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
// 重新获取权限
|
2024-05-07 05:41:43 +00:00
|
|
|
ProfileApi.getUserInfo().then((res: any) => {
|
2024-04-12 07:53:44 +00:00
|
|
|
if (res.code === 200) {
|
2024-05-07 05:41:43 +00:00
|
|
|
store.setProfile({ ...res.data, token: store.profile.token });
|
2024-04-12 07:53:44 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2024-03-04 07:10:11 +00:00
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.title {
|
|
|
|
line-height: 80rpx;
|
2024-03-14 03:14:12 +00:00
|
|
|
padding: 0rpx 20rpx;
|
2024-03-04 07:10:11 +00:00
|
|
|
}
|
|
|
|
.box-content {
|
|
|
|
display: flex;
|
2024-03-14 03:14:12 +00:00
|
|
|
margin: 22rpx 0rpx;
|
|
|
|
padding: 0rpx 20rpx;
|
2024-04-12 07:53:44 +00:00
|
|
|
.box {
|
2024-03-14 03:14:12 +00:00
|
|
|
width: 142rpx;
|
|
|
|
height: 142rpx;
|
2024-03-04 07:10:11 +00:00
|
|
|
background: #f9f9f9;
|
|
|
|
border-radius: 26rpx;
|
|
|
|
// text-align: center;
|
|
|
|
// vertical-align: middle;
|
|
|
|
// display: grid;
|
|
|
|
font-family: Source Han Sans CN;
|
|
|
|
font-weight: 400;
|
2024-03-14 03:14:12 +00:00
|
|
|
font-size: 26rpx;
|
2024-03-04 07:10:11 +00:00
|
|
|
color: #000000;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-evenly;
|
|
|
|
flex-direction: column;
|
|
|
|
> view {
|
|
|
|
display: grid;
|
|
|
|
place-content: center;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
2024-04-12 07:53:44 +00:00
|
|
|
> .box + .box {
|
2024-03-14 03:14:12 +00:00
|
|
|
margin-left: 32rpx;
|
2024-03-04 07:10:11 +00:00
|
|
|
}
|
|
|
|
::v-deep .u-transition {
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.line {
|
|
|
|
height: 18rpx;
|
|
|
|
background: #f8f8f8;
|
|
|
|
}
|
|
|
|
</style>
|