crm-uniapp/pages/msg/index.vue
2024-12-07 11:18:03 +08:00

81 lines
2.6 KiB
Vue

<template>
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
<template v-slot:left>
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
</template>
<template v-slot:center>
<text style="color:#ffffff">{{title}}</text>
</template>
</uv-navbar>
<view class="bg-white">
<uv-cell-group>
<uv-cell icon="http://sys.znkjfw.com/imgs/crmimages/16.png" title="待办事项" label="待办事项消息提现" isLink
url="/pages/components/pages/msg/wait" iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
<template v-slot:right-icon>
<view class="flex align-center">
<uv-badge type="error" max="99" :value="waitCount"></uv-badge>
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</template>
</uv-cell>
<uv-cell icon="http://sys.znkjfw.com/imgs/crmimages/15.png" title="审批管理" label="审批消息提现" isLink
url="/pages/components/pages/msg/exam" iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
<template v-slot:right-icon>
<view class="flex align-center">
<uv-badge type="error" max="99" :value="checkCount"></uv-badge>
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</template>
</uv-cell>
<uv-cell icon="http://sys.znkjfw.com/imgs/crmimages/23.png" title="通知管理" label="系统公告通知" isLink
url="/pages/components/pages/mine/list" iconStyle="height:70rpx;width:70rpx;margin-right:10rpx">
<template v-slot:right-icon>
<view class="flex align-center">
<uv-badge type="error" max="99" :value="noticeCount"></uv-badge>
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</template>
<script setup>
import {
ref,
computed
} from 'vue'
import {
useMainStore
} from '@/store/store'
import {
storeToRefs
} from 'pinia'
import {
onLoad,
onShow
} from '@dcloudio/uni-app'
const main = useMainStore()
const {
indexCount
} = storeToRefs(main)
const title = ref('消息')
const cart = ref([])
const uToast = ref()
const waitCount = ref(0)
const checkCount = ref(0)
const noticeCount = ref(0)
onShow(() => {
noticeCount.value = indexCount.value.brieCountVO?.count13 || 0
waitCount.value = indexCount.value.followBusinessCount + indexCount.value.followCluesCount + indexCount.value
.followCustomerCount
checkCount.value = indexCount.value.contractCheckCount + indexCount.value.invoiceCheckCount + indexCount.value
.receivablesCheckCount
})
</script>
<style lang="scss" scoped>
</style>