<script lang="ts" setup>
/**
 * 已废弃：仓侧提现与财务中心共用 views/finance/withdrawal/index
 * 菜单 225 已指向共用页；本文件仅作兼容重定向，避免旧路由 404
 */
import { onMounted } from 'vue';
import { useRouter } from 'vue-router';

import { Page } from '@vben/common-ui';

const router = useRouter();

onMounted(() => {
  // 优先跳到仓菜单配置的提现路径；找不到则落到财务提现
  const routes = router.getRoutes();
  const hit = routes.find(
    (r) =>
      typeof r.path === 'string' &&
      r.path.includes('delivery-warehouse') &&
      r.path.includes('withdrawal') &&
      !r.path.includes('delivery-warehouse-withdrawal'),
  );
  router.replace(hit?.path || '/finance/withdrawal');
});
</script>

<template>
  <Page title="提现申请">
    <div class="text-[hsl(var(--muted-foreground))]">正在跳转至提现管理…</div>
  </Page>
</template>
