<template>
    <global-page padding="0 24rpx" title="收费单" auto :localData="list">
        <template #default="{ item }">
            <global-card :title="item.title" titleSuffix="查看详情" :rightWidth="180" @handleTitleClick="goTo(item.url)">
                描述：{{ item.desc }}
            </global-card>
        </template>
    </global-page>
</template>

<script setup>
import { navigateTo } from 'mocp/utils/jump'
import { list } from './constants/list.compositions'
import useElectronicBillStore from 'mocp/store/electronicBill'
import { onLoad } from '@dcloudio/uni-app'
import { checkPermi } from 'mocp/utils/permission'

const goTo = (url) => {
    if (checkPermi('/ElectronBill/edit')) {
        navigateTo(url)
    } else {
        uni.$mocpMessage.warning('暂无权限')
    }
}
const electronicBillStore = useElectronicBillStore()
onLoad(() => {
    electronicBillStore.init()
})
</script>
<style lang="scss" scoped></style>
