优化构架

This commit is contained in:
2026-08-03 18:49:18 +08:00
parent 1241d11c01
commit 44c33a6280
133 changed files with 651 additions and 603 deletions
@@ -0,0 +1,30 @@
<script setup lang="ts">
defineProps<{
title: string
description: string
}>()
</script>
<template>
<div class="business-page prototype-module-page">
<section class="surface-panel prototype-module-panel">
<div>
<h2>{{ title }}</h2>
<p>{{ description }}</p>
</div>
<div class="prototype-module-empty" role="status">
<strong>暂无业务数据</strong>
<span>页面基础已就绪,后续按对应业务契约接入。</span>
</div>
</section>
</div>
</template>
<style scoped>
.prototype-module-panel { display: grid; min-height: 260px; align-content: start; gap: 28px; padding: 24px; }
.prototype-module-panel h2 { margin: 0; color: var(--cc-text); font-size: 18px; line-height: 1.4; }
.prototype-module-panel p { margin: 8px 0 0; color: var(--cc-muted); font-size: 13px; line-height: 1.65; }
.prototype-module-empty { display: grid; min-height: 120px; place-items: center; align-content: center; gap: 6px; border: 1px dashed var(--cc-border); color: var(--cc-muted); text-align: center; }
.prototype-module-empty strong { color: var(--cc-text); font-size: 14px; }
.prototype-module-empty span { font-size: 13px; }
</style>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
@@ -0,0 +1,5 @@
<script setup lang="ts">
import PrototypeModuleView from '@/prototype/components/PrototypeModuleView.vue'
defineProps<{ title: string; description: string }>()
</script>
<template><PrototypeModuleView v-bind="$props" /></template>
+135
View File
@@ -0,0 +1,135 @@
import type { RouteRecordRaw } from 'vue-router'
import type { Component } from 'vue'
type PrototypeRoute = readonly [path: string, name: string, title: string]
type ModuleView = () => Promise<Component>
const moduleViews = {
dashboard: () => import('@/prototype/modules/dashboard/ModuleView.vue'),
customerManagement: () => import('@/prototype/modules/customer-management/ModuleView.vue'),
domesticWarehouse: () => import('@/prototype/modules/domestic-warehouse/ModuleView.vue'),
overseasDelivery: () => import('@/prototype/modules/overseas-delivery/ModuleView.vue'),
overseasInventory: () => import('@/prototype/modules/overseas-inventory/ModuleView.vue'),
serviceCenter: () => import('@/prototype/modules/service-center/ModuleView.vue'),
supplierCenter: () => import('@/prototype/modules/supplier-center/ModuleView.vue'),
containerManagement: () => import('@/prototype/modules/container-management/ModuleView.vue'),
overseasBusiness: () => import('@/prototype/modules/overseas-business/ModuleView.vue'),
overseasWarehouseOrders: () => import('@/prototype/modules/overseas-warehouse-orders/ModuleView.vue'),
fbaReturns: () => import('@/prototype/modules/fba-returns/ModuleView.vue'),
finance: () => import('@/prototype/modules/finance/ModuleView.vue'),
vehicleManagement: () => import('@/prototype/modules/vehicle-management/ModuleView.vue'),
reports: () => import('@/prototype/modules/reports/ModuleView.vue'),
general: () => import('@/prototype/modules/general/ModuleView.vue'),
sales: () => import('@/prototype/modules/sales/ModuleView.vue'),
messages: () => import('@/prototype/modules/messages/ModuleView.vue'),
systemManagement: () => import('@/prototype/modules/system-management/ModuleView.vue'),
} satisfies Record<string, ModuleView>
function createRoutes(view: ModuleView, routes: PrototypeRoute[]): RouteRecordRaw[] {
return routes.map(([path, name, title]) => ({
path,
name,
component: view,
props: { title, description: `用于承载${title}相关业务信息` },
meta: { title, description: `用于承载${title}相关业务信息` },
}))
}
export const prototypeModuleRoutes: RouteRecordRaw[] = [
...createRoutes(moduleViews.dashboard, [['dashboard', 'dashboard', '首页数据看板']]),
...createRoutes(moduleViews.customerManagement, [
['prototype/customer-management/warehouse-tier-fee', 'warehouse-tier-fee', '海外仓阶梯费用'],
]),
...createRoutes(moduleViews.domesticWarehouse, [
['prototype/domestic-warehouse/inbound-list', 'inbound-list', '入库单列表'],
['prototype/domestic-warehouse/inbound-dedup', 'inbound-dedup', '入库单测量'],
['prototype/domestic-warehouse/inbound-measure', 'inbound-measure', '测量数据审核'],
['prototype/domestic-warehouse/inbound-receive', 'inbound-receive', '接收审核'],
['prototype/domestic-warehouse/location-management', 'domestic-location-management', '库位管理'],
['prototype/domestic-warehouse/pallet-management', 'domestic-pallet-management', '托盘管理'],
]),
...createRoutes(moduleViews.overseasDelivery, [
['prototype/overseas-delivery/dispatch-list', 'outbound-dispatch', '派送单列表'],
['prototype/overseas-delivery/vehicle-scheduling', 'outbound-vehicle', '排车列表'],
['prototype/overseas-delivery/bol', 'outbound-bol', 'BOL'],
['prototype/overseas-delivery/self-pickup', 'outbound-selfpick', '自提单'],
]),
...createRoutes(moduleViews.overseasInventory, [
['prototype/overseas-inventory/stock-list', 'overseas-stock', '库存列表'],
['prototype/overseas-inventory/inbound-orders', 'overseas-inbound', '海外入库单'],
['prototype/overseas-inventory/outbound-orders', 'overseas-outbound', '出库单'],
['prototype/overseas-inventory/relabel-orders', 'overseas-relabel', '换标订单'],
]),
...createRoutes(moduleViews.serviceCenter, [
['prototype/service-center/booking-list', 'booking-list', '订舱列表'],
['prototype/service-center/truck-list', 'truck-list', '拖车列表'],
]),
...createRoutes(moduleViews.supplierCenter, [
['prototype/supplier-center/supplier-list', 'supplier-list', '供应商列表'],
]),
...createRoutes(moduleViews.containerManagement, [
['prototype/container-management/container-list', 'container-list', '货柜列表'],
['prototype/container-management/manifest', 'container-manifest', '装柜清单'],
['prototype/container-management/preload-list', 'container-preload', '预装清单'],
]),
...createRoutes(moduleViews.overseasBusiness, [
['prototype/overseas-business/users', 'overseas-users', '用户管理'],
['prototype/overseas-business/purchase-orders', 'overseas-purchase', '采购订单'],
['prototype/overseas-business/local-truck', 'overseas-truck', '本土卡车'],
['prototype/overseas-business/local-looseboard', 'overseas-looseboard', '本土散板'],
]),
...createRoutes(moduleViews.overseasWarehouseOrders, [
['prototype/overseas-warehouse-orders/return-inbound', 'overseas-order-inbound', '退货入库'],
['prototype/overseas-warehouse-orders/return-relabel', 'overseas-order-relabel', '退货换标'],
['prototype/overseas-warehouse-orders/return-outbound', 'overseas-order-outbound', '退货出库'],
]),
...createRoutes(moduleViews.fbaReturns, [
['prototype/fba-returns/inbound-orders', 'fba-inbound-order', '入库单'],
['prototype/fba-returns/relabel-orders', 'fba-relabel-order', '换标单'],
['prototype/fba-returns/outbound-orders', 'fba-outbound-order', '出库单'],
['prototype/fba-returns/pallet-management', 'fba-pallet', '托盘管理'],
['prototype/fba-returns/carton-management', 'fba-carton', '箱号管理'],
['prototype/fba-returns/product-catalog', 'fba-product', '产品库'],
['prototype/fba-returns/return-stock', 'fba-return-stock', '退货库存'],
]),
...createRoutes(moduleViews.finance, [
['prototype/finance/customer-arap', 'customer-arap', '客户应收应付'],
['prototype/finance/customer-reconciliation', 'customer-recon-stmt', '客户对账单'],
['prototype/finance/settlement-ar', 'settlement-ar', '结算单应收'],
['prototype/finance/settlement-ap', 'settlement-ap', '结算单应付'],
['prototype/finance/cost-analysis', 'finance-cost', '费用分析'],
['prototype/finance/profit-report', 'profit', '利润表'],
]),
...createRoutes(moduleViews.vehicleManagement, [
['prototype/vehicle-management/vehicle-list', 'vehicle-list', '车辆列表'],
]),
...createRoutes(moduleViews.reports, [
['prototype/reports/overview', 'report-overview', '报表总览'],
['prototype/reports/income-expense', 'report-income', '收支报表'],
['prototype/reports/ar-aging', 'report-ar-aging', '应收账龄分析'],
['prototype/reports/cost-composition', 'report-cost', '费用构成分析'],
['prototype/reports/freight', 'report-freight', '运费报表'],
['prototype/reports/business-statistics', 'report-business', '业务统计报表'],
]),
...createRoutes(moduleViews.general, [
['prototype/general/product-information', 'general-product', '产品信息'],
['prototype/general/fee-items', 'general-fee', '费用项目'],
['prototype/general/fba-address', 'general-fba', 'FBA编码地址'],
['prototype/general/pallet-management', 'general-pallet', '托盘管理'],
['prototype/general/location-management', 'general-location', '库位/货架管理'],
['prototype/general/voyage-price-list', 'general-voyage', '船期价格表'],
]),
...createRoutes(moduleViews.sales, [
['prototype/sales/visit-records', 'sales-visits', '拜访记录'],
['prototype/sales/commission', 'sales-commission', '销售提成'],
]),
...createRoutes(moduleViews.messages, [
['prototype/messages/management', 'message-management', '消息管理'],
['prototype/messages/templates', 'message-template', '模板管理'],
['prototype/messages/my-messages', 'my-messages', '我的消息'],
]),
...createRoutes(moduleViews.systemManagement, [
['prototype/system-management/tenant-management', 'tenant-management', '租户管理'],
['prototype/system-management/brand-settings', 'brand-settings', '品牌设置'],
]),
]