<template>
  <view>
    <view class="page_title"> 开票类型 </view>
    <view class="issue_invoice_card">
      <view class="item" @click="toPage('/INDEX/parking_payment_record/index')">
        <view class="icon"><up-icon name="car" size="20" color="#2A7EFB"></up-icon></view>
        <view class="name"> 停车费 </view>
      </view>
      <view class="item" @click="toPage('')">
        <view class="icon"><up-icon name="red-packet" size="20" color="#2A7EFB"></up-icon></view>
        <view class="name"> 物业费 </view>
      </view>
      <view class="item" @click="toPage('')">
        <view class="icon"><up-icon name="integral" size="20" color="#2A7EFB"></up-icon></view>
        <view class="name"> 月卡 </view>
      </view>
      <view class="item" @click="toPage('')">
        <view class="icon"><up-icon name="calendar" size="20" color="#2A7EFB"></up-icon></view>
        <view class="name"> 充电 </view>
      </view>
    </view>
  </view>
</template>
<script lang="ts" setup>
const toPage = (url: string) => {
  if (!url) {
    uni.showModal({
      title: '提示',
      content: '该功能在当前项目暂未开放，敬请期待',
      confirmColor: '#0082FA',
      showCancel: false,
      success: function (res) {
        if (res.confirm) {
          console.log('用户点击确定')
        } else if (res.cancel) {
          console.log('用户点击取消')
        }
      }
    })
    return
  }
  uni.navigateTo({
    url
  })
}
</script>
<style lang="scss">
@import './style.scss';
</style>
