<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 isLink url="/pages/components/pages/contract/index" icon="https://sys.znkjfw.com/imgs/crmimages/22.png"
				title="合同审批" 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="indexCount.contractCheckCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
			<uv-cell isLink url="/pages/components/pages/receivables/index"
				icon="https://sys.znkjfw.com/imgs/crmimages/21.png" title="回款审批"
				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="indexCount.receivablesCheckCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
			<uv-cell isLink url="/pages/components/pages/invoice/index" icon="https://sys.znkjfw.com/imgs/crmimages/20.png"
				title="发票审批" 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="indexCount.invoiceCheckCount"></uv-badge>
						<uv-icon size="30rpx" name="arrow-right"></uv-icon>
					</view>
				</template>
			</uv-cell>
		</uv-cell-group>
	</view>
</template>

<script setup>
	import {
		ref
	} 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('待办事项')
</script>

<style lang="scss">

</style>