From c55dcf4f63b0de6e246eecf0c1ea1a5857e18edd Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 14:59:24 +0800 Subject: [PATCH 01/10] feat: integrate finance prototype navigation pages --- app/Http/Controllers/Business/Pages.php | 10 + app/Listeners/Menu/ShowInAdmin.php | 20 +- config/business_navigation.php | 319 +----------------- .../company-information.blade.php | 1 + .../company-progress.blade.php | 1 + .../entity-report.blade.php | 1 + .../people-inventory.blade.php | 1 + .../pages/partials/prototype-table.blade.php | 34 ++ .../store-change-progress.blade.php | 1 + .../store-information.blade.php | 1 + .../store-management/store-report.blade.php | 1 + .../trademark-information.blade.php | 1 + .../trademark-progress.blade.php | 1 + tests/Feature/Settings/NavigationTest.php | 56 ++- 14 files changed, 105 insertions(+), 343 deletions(-) create mode 100644 resources/views/business/pages/company-management/company-information.blade.php create mode 100644 resources/views/business/pages/company-management/company-progress.blade.php create mode 100644 resources/views/business/pages/company-management/entity-report.blade.php create mode 100644 resources/views/business/pages/company-management/people-inventory.blade.php create mode 100644 resources/views/business/pages/partials/prototype-table.blade.php create mode 100644 resources/views/business/pages/store-management/store-change-progress.blade.php create mode 100644 resources/views/business/pages/store-management/store-information.blade.php create mode 100644 resources/views/business/pages/store-management/store-report.blade.php create mode 100644 resources/views/business/pages/trademark-management/trademark-information.blade.php create mode 100644 resources/views/business/pages/trademark-management/trademark-progress.blade.php diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index 289212a7..cbcda2b6 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -85,6 +85,10 @@ class Pages extends Controller abort_if(empty($section), 403, '当前账号没有已授权的侧边栏功能。'); + if (! empty($section['external_url'])) { + return redirect()->away($section['external_url']); + } + $page = collect($section['pages'] ?? [])->first(); $parameters = ['section' => $section['slug']]; @@ -105,6 +109,12 @@ class Pages extends Controller abort_if(empty($sectionConfig), 403, '当前账号没有该页面权限。'); + if (! empty($sectionConfig['external_url'])) { + abort_if($page !== null || $tab !== null, 404); + + return redirect()->away($sectionConfig['external_url']); + } + $pages = collect($sectionConfig['pages'] ?? []); if ($pages->isEmpty()) { diff --git a/app/Listeners/Menu/ShowInAdmin.php b/app/Listeners/Menu/ShowInAdmin.php index 7e538ea0..c1a3f337 100644 --- a/app/Listeners/Menu/ShowInAdmin.php +++ b/app/Listeners/Menu/ShowInAdmin.php @@ -15,10 +15,22 @@ class ShowInAdmin $menu = $event->menu; foreach (SidebarPermissions::navigationFor(user()) as $sectionIndex => $section) { - // 订单数据按配置顺序展示,让“原始数据”保持在新增子页面之前。 - $pages = $section['slug'] === 'order-data' - ? array_values($section['pages'] ?? []) - : $this->sortByTitleLength($section['pages'] ?? []); + if (! empty($section['external_url'])) { + $menu->url( + $section['external_url'], + $section['title'], + ($sectionIndex + 1) * 10, + [ + 'icon' => $section['icon'] ?? '', + 'target' => '_blank', + 'rel' => 'noopener noreferrer', + ] + ); + + continue; + } + + $pages = $this->sortByTitleLength($section['pages'] ?? []); $order = ($sectionIndex + 1) * 10; if (empty($pages)) { diff --git a/config/business_navigation.php b/config/business_navigation.php index a4d6db99..da3a31bc 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -6,99 +6,10 @@ return [ 'title' => '公司管理', 'icon' => 'business', 'pages' => [ - [ - 'slug' => 'subject-operating-report', - 'title' => '主体维度经营报表', - 'directory' => [ - 'icon' => 'query_stats', - 'status' => '尚未同步', - 'description' => '按店铺唯一 ID 和主体生效、失效日期归属销量;自动汇总前,先固定 Excel 中的报表字段。', - 'empty' => '经营报表尚未同步。完成店铺主体和销量镜像接入后,这里会显示可追溯的主体数据。', - 'fields' => [ - ['name' => 'city', 'label' => '市'], - ['name' => 'entity', 'label' => '主体'], - ['name' => 'company_type', 'label' => '公司类型'], - ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], - ['name' => 'profit_center', 'label' => '店铺所属利润中心'], - ['name' => 'store_manager', 'label' => '店铺负责人'], - ['name' => 'closing_manager', 'label' => '闭门负责人'], - ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], - ['name' => 'status', 'label' => '状态'], - ['name' => 'recent_three_month_sales', 'label' => '展示近3个月月度销量', 'kind' => 'number'], - ['name' => 'store_sales_12m', 'label' => '连续12个月店铺累计销量', 'kind' => 'number'], - ['name' => 'entity_sales_12m', 'label' => '连续12个月主体累计销量', 'kind' => 'number'], - ['name' => 'can_change_entity', 'label' => '能否变更主体'], - ['name' => 'plan', 'label' => '规划'], - ['name' => 'new_entity', 'label' => '新主体(变更流程同步新主体)'], - ], - ], - ], - [ - 'slug' => 'basic-information', - 'title' => '公司基础信息', - 'directory' => [ - 'icon' => 'business', - 'status' => '既有只读上游', - 'description' => '沿用现有公司基础资料只读链路;Excel 中暂未匹配到的城市、认缴时间等字段保留为空。', - 'empty' => '尚未读取到公司基础资料。请检查共享镜像或上游同步状态。', - 'fields' => [ - ['name' => 'unified_social_credit_code', 'label' => '统一社会信用代码'], - ['name' => 'company_name', 'label' => '公司名称'], - ['name' => 'taxpayer_type', 'label' => '纳税人类型', 'source' => 'taxpayer_category'], - ['name' => 'company_status', 'label' => '公司状态'], - ['name' => 'subscribed_capital', 'label' => '认缴注册资本(万元)', 'kind' => 'number'], - ['name' => 'registered_at', 'label' => '注册时间', 'kind' => 'date', 'source' => 'establishment_date'], - ['name' => 'legal_representative', 'label' => '法人'], - ['name' => 'shareholders', 'label' => '股东'], - ['name' => 'supervisor', 'label' => '监事'], - ['name' => 'billing_officer', 'label' => '开票员', 'source' => 'financial_officer'], - ['name' => 'city', 'label' => '城市'], - ['name' => 'registered_address', 'label' => '注册地址'], - ['name' => 'business_scope', 'label' => '经营范围'], - ['name' => 'basic_deposit_account', 'label' => '基本存款账户信息', 'source' => 'basic_deposit_account_number', 'kind' => 'secret'], - ['name' => 'subscribed_at', 'label' => '认缴时间'], - ], - ], - ], - [ - 'slug' => 'personnel-inventory', - 'title' => '人员盘点表', - 'directory' => [ - 'icon' => 'group', - 'status' => '尚未同步', - 'description' => '固定人员、任职和公司承载量盘点字段;身份证、税务账号和密码只保留字段契约,不在空页面填充。', - 'empty' => '人员盘点数据尚未同步。接入人员和任职关系后,这里会显示盘点结果。', - 'fields' => [ - ['name' => 'person_name', 'label' => '人员名称'], - ['name' => 'alias', 'label' => '花名'], - ['name' => 'position', 'label' => '职位'], - ['name' => 'tag', 'label' => '标签'], - ['name' => 'tax_account', 'label' => '税务局账号'], - ['name' => 'tax_password', 'label' => '税务局密码', 'kind' => 'secret'], - ['name' => 'department', 'label' => '部门'], - ['name' => 'department_manager', 'label' => '部门负责人'], - ['name' => 'id_number', 'label' => '身份证号码', 'kind' => 'secret'], - ['name' => 'verified_mobile', 'label' => '实名手机号', 'kind' => 'secret'], - ['name' => 'sim_card_keeper', 'label' => '电话卡保管人'], - ['name' => 'id_address', 'label' => '身份证地址', 'kind' => 'secret'], - ['name' => 'company_type', 'label' => '公司类型'], - ['name' => 'total_company_count', 'label' => '合计担任公司数量', 'kind' => 'number'], - ['name' => 'retained_company_count', 'label' => '保留担任公司数量', 'kind' => 'number'], - ['name' => 'available_company_count', 'label' => '可担任公司数量', 'kind' => 'number'], - ], - ], - ], - [ - 'slug' => 'company-progress', - 'title' => '公司进度表', - 'directory' => [ - 'icon' => 'timeline', - 'status' => '字段待定义', - 'description' => 'Excel 目录包含该页面,但未提供对应子表或表头。当前只建立页面位置,不猜测公司流程字段。', - 'empty' => '公司进度表字段尚未定义,补充子表表头后再接入流程数据。', - 'fields' => [], - ], - ], + ['slug' => 'people-inventory', 'title' => '人员盘点表'], + ['slug' => 'company-progress', 'title' => '公司进度表'], + ['slug' => 'company-information', 'title' => '公司基础信息'], + ['slug' => 'entity-report', 'title' => '主体维度经营报表'], ], ], [ @@ -106,47 +17,8 @@ return [ 'title' => '商标管理', 'icon' => 'verified', 'pages' => [ - [ - 'slug' => 'information', - 'title' => '商标基础信息', - 'directory' => [ - 'icon' => 'verified', - 'status' => '既有只读上游', - 'description' => '沿用现有商标资料只读链路;当前已匹配名称、状态、注册时间和有效期,其余 Excel 字段待接入。', - 'empty' => '尚未读取到商标基础资料。请检查共享镜像或上游同步状态。', - 'fields' => [ - ['name' => 'trademark_name', 'label' => '商标名称'], - ['name' => 'trademark_number', 'label' => '商标号'], - ['name' => 'trademark_status', 'label' => '商标状态'], - ['name' => 'registration_date', 'label' => '注册时间', 'kind' => 'date'], - ['name' => 'expiry_date', 'label' => '有效期', 'kind' => 'date'], - ['name' => 'international_classification', 'label' => '国际分类', 'source' => 'trademark_type'], - ['name' => 'approved_goods', 'label' => '核定使用商品'], - ['name' => 'final_holder', 'label' => '最终持有人'], - ['name' => 'registered_address', 'label' => '注册地址'], - ['name' => 'custody_department', 'label' => '保管部门'], - ], - ], - ], - [ - 'slug' => 'trademark-progress', - 'title' => '商标进度表', - 'directory' => [ - 'icon' => 'timeline', - 'status' => '尚未同步', - 'description' => '按 Excel 固定注册、变更、续展等业务的办理进度字段;流程数据接入前不显示伪造记录。', - 'empty' => '商标进度数据尚未同步。', - 'fields' => [ - ['name' => 'trademark_name', 'label' => '商标名称'], - ['name' => 'trademark_number', 'label' => '商标号'], - ['name' => 'business', 'label' => '业务'], - ['name' => 'progress', 'label' => '进度'], - ['name' => 'completed', 'label' => '是否完成'], - ['name' => 'completed_at', 'label' => '完成时间', 'kind' => 'date'], - ['name' => 'handler', 'label' => '办理人'], - ], - ], - ], + ['slug' => 'trademark-progress', 'title' => '商标进度表'], + ['slug' => 'trademark-information', 'title' => '商标基础信息'], ], ], [ @@ -154,93 +26,9 @@ return [ 'title' => '店铺管理', 'icon' => 'storefront', 'pages' => [ - [ - 'slug' => 'store-report', - 'title' => '店铺维度报表', - 'directory' => [ - 'icon' => 'query_stats', - 'status' => '尚未同步', - 'description' => '以店铺 ID 和主体生效、失效时间为基础,固定期间销量及 2026 年月度销量字段。', - 'empty' => '店铺维度报表尚未同步。完成销量镜像接入后,这里会显示可核对的期间数据。', - 'fields' => [ - ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], - ['name' => 'store_id', 'label' => '店铺ID(唯一值)'], - ['name' => 'profit_center', 'label' => '店铺所属利润中心'], - ['name' => 'store_manager', 'label' => '店铺负责人'], - ['name' => 'department_manager', 'label' => '部门负责人'], - ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], - ['name' => 'status', 'label' => '状态'], - ['name' => 'can_change', 'label' => '能否变更'], - ['name' => 'entity', 'label' => '主体'], - ['name' => 'company_type', 'label' => '公司类型'], - ['name' => 'effective_at', 'label' => '生效时间', 'kind' => 'date'], - ['name' => 'invalid_at', 'label' => '失效时间', 'kind' => 'date'], - ['name' => 'period_sales', 'label' => '期间销量', 'kind' => 'number'], - ...array_map(static fn (int $month): array => [ - 'name' => sprintf('sales_%02d', $month), - 'label' => sprintf('%d月销量', $month), - 'kind' => 'number', - ], range(1, 12)), - ], - ], - ], - [ - 'slug' => 'basic-information', - 'title' => '店铺基础信息', - 'directory' => [ - 'icon' => 'storefront', - 'status' => '既有只读上游', - 'description' => '沿用现有店铺资料只读链路;Excel 中的店铺 ID、续签时间和提现账户待字段映射后补充。', - 'empty' => '尚未读取到店铺基础资料。请检查共享镜像或上游同步状态。', - 'fields' => [ - ['name' => 'platform', 'label' => '平台'], - ['name' => 'store_id', 'label' => '店铺ID'], - ['name' => 'store_name', 'label' => '店铺名称', 'source' => 'erp_store_name'], - ['name' => 'store_entity', 'label' => '店铺主体', 'source' => 'company_name'], - ['name' => 'store_status', 'label' => '店铺状态'], - ['name' => 'trademark', 'label' => '商标', 'source' => 'trademark_name'], - ['name' => 'trademark_number', 'label' => '商标号'], - ['name' => 'business_department', 'label' => '业务部门', 'source' => 'profit_center'], - ['name' => 'store_manager', 'label' => '店铺负责人'], - ['name' => 'department_manager', 'label' => '部门负责人'], - ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], - ['name' => 'renewed_at', 'label' => '续签时间'], - ['name' => 'withdrawal_account', 'label' => '提现账户', 'kind' => 'secret'], - ], - ], - ], - [ - 'slug' => 'change-progress', - 'title' => '店铺变更进度表', - 'directory' => [ - 'icon' => 'sync_alt', - 'status' => '尚未同步', - 'description' => '按 Excel 固定店铺主体变更的账号、接替公司、进度和办理留痕字段。', - 'empty' => '店铺变更进度数据尚未同步。', - 'fields' => [ - ['name' => 'company_name', 'label' => '公司名称'], - ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], - ['name' => 'department', 'label' => '部门'], - ['name' => 'store_manager', 'label' => '店铺负责人'], - ['name' => 'department_manager', 'label' => '部门负责人'], - ['name' => 'account', 'label' => '账号'], - ['name' => 'password', 'label' => '密码', 'kind' => 'secret'], - ['name' => 'successor_company', 'label' => '接替公司'], - ['name' => 'progress', 'label' => '进度'], - ['name' => 'completed', 'label' => '是否完成'], - ['name' => 'completed_at', 'label' => '完成时间', 'kind' => 'date'], - ['name' => 'handler', 'label' => '办理人'], - ], - ], - ], - ], - ], - [ - 'slug' => 'product-inventory', - 'title' => '商品及库存管理', - 'icon' => 'inventory_2', - 'pages' => [ - ['slug' => 'normal-products', 'title' => '普通商品资料'], + ['slug' => 'store-report', 'title' => '店铺维度经营报表'], + ['slug' => 'store-information', 'title' => '店铺基础信息'], + ['slug' => 'store-change-progress', 'title' => '店铺变更进度表'], ], ], [ @@ -311,16 +99,6 @@ return [ ['slug' => 'vipshop', 'title' => '唯品会账户'], ], ], - [ - 'slug' => 'platform-promotion-accounts', - 'title' => '平台推广账户流水', - 'tabs' => [ - ['slug' => 'jd', 'title' => '京东京准通'], - ['slug' => 'douyin', 'title' => '抖音千川'], - ['slug' => 'dewu', 'title' => '得物推广账户'], - ['slug' => 'vip', 'title' => 'VIP(唯品会)'], - ], - ], ['slug' => 'deposit-account-balance', 'title' => '店铺保证金账户余额'], [ 'slug' => 'deposit-account-bills', @@ -362,15 +140,8 @@ return [ 'title' => '订单数据', 'icon' => 'receipt_long', 'pages' => [ - [ - 'slug' => 'raw-data', - 'title' => '原始数据', - 'tabs' => [ - ['slug' => 'after-sales-expenses', 'title' => '订单售后费用明细'], - ['slug' => 'promotion-expenses', 'title' => '商品推广费用明细'], - ], - ], - ['slug' => 'bill-offset', 'title' => '账单冲减'], + ['slug' => 'after-sales-expenses', 'title' => '订单售后费用明细'], + ['slug' => 'promotion-expenses', 'title' => '商品推广费用明细'], ], ], [ @@ -379,7 +150,7 @@ return [ 'icon' => 'assignment_return', 'pages' => [ ['slug' => 'jingxi-refund-data', 'title' => '京喜退款数据'], - ['slug' => 'non-jingxi-refund-data', 'title' => '售后(退货退款)'], + ['slug' => 'non-jingxi-refund-data', 'title' => '非京喜退款数据'], ], ], [ @@ -426,14 +197,11 @@ return [ 'icon' => 'local_shipping', 'pages' => [ ['slug' => 'quote-management', 'title' => '报价管理'], - ['slug' => 'courier-information', 'title' => '快递资料'], - ['slug' => 'agreement-signing', 'title' => '协议签署'], ['slug' => 'freight-reconciliation', 'title' => '运费对账'], ['slug' => 'bookkeeping-details', 'title' => '记账明细'], ['slug' => 'compensation-details', 'title' => '赔偿明细'], ['slug' => 'advance-details', 'title' => '借支明细'], ['slug' => 'other-adjustments', 'title' => '其他扣款补款'], - ['slug' => 'payable-cloud-warehouse-vehicle-fee', 'title' => '应付云仓车费'], ['slug' => 'courier-payables-report', 'title' => '快递应付表'], ], ], @@ -537,64 +305,9 @@ return [ ], ], [ - 'slug' => 'other', - 'title' => '其他', - 'icon' => 'more_horiz', - 'pages' => [ - [ - 'slug' => 'todos', - 'title' => '待办事项', - 'directory' => [ - 'icon' => 'task_alt', - 'status' => '尚未同步', - 'description' => '预警、审批、定时任务和人工创建事项共用一套待办字段,形成责任分派与处理留痕。', - 'empty' => '待办事项尚未同步。完成任务来源和处理流程接入后,这里会显示待办记录。', - 'fields' => [ - ['name' => 'todo_number', 'label' => '待办编号'], - ['name' => 'source_type', 'label' => '来源类型'], - ['name' => 'business_type', 'label' => '业务类型'], - ['name' => 'related_object', 'label' => '关联店铺/主体'], - ['name' => 'task_content', 'label' => '任务内容'], - ['name' => 'owner', 'label' => '责任人'], - ['name' => 'collaborator', 'label' => '协同人'], - ['name' => 'due_at', 'label' => '截止日期', 'kind' => 'date'], - ['name' => 'priority', 'label' => '优先级'], - ['name' => 'current_node', 'label' => '当前节点'], - ['name' => 'result', 'label' => '处理结果'], - ['name' => 'attachment', 'label' => '附件'], - ['name' => 'overdue', 'label' => '是否逾期'], - ['name' => 'closed_by', 'label' => '关闭人'], - ['name' => 'closed_at', 'label' => '关闭日期', 'kind' => 'date'], - ], - ], - ], - [ - 'slug' => 'warnings', - 'title' => '预警页面', - 'directory' => [ - 'icon' => 'warning', - 'status' => '尚未同步', - 'description' => '集中展示销量、税务、主体、人员、商标和续签风险,并可关联待办编号追踪处理结果。', - 'empty' => '预警数据尚未同步。完成规则引擎和预警来源接入后,这里会显示风险记录。', - 'fields' => [ - ['name' => 'warning_number', 'label' => '预警编号'], - ['name' => 'warning_type', 'label' => '预警类型'], - ['name' => 'risk_level', 'label' => '风险等级'], - ['name' => 'related_object', 'label' => '关联对象'], - ['name' => 'risk_description', 'label' => '风险描述'], - ['name' => 'impact_amount', 'label' => '影响金额', 'kind' => 'number'], - ['name' => 'trigger_rule', 'label' => '触发规则'], - ['name' => 'triggered_at', 'label' => '触发时间', 'kind' => 'date'], - ['name' => 'owner', 'label' => '责任人'], - ['name' => 'collaborator', 'label' => '协同人'], - ['name' => 'due_at', 'label' => '截止时间', 'kind' => 'date'], - ['name' => 'todo_number', 'label' => '待办编号'], - ['name' => 'status', 'label' => '处理状态'], - ['name' => 'evidence', 'label' => '处理证据'], - ['name' => 'closed_by_date', 'label' => '关闭人/日期'], - ], - ], - ], - ], + 'slug' => 'todos', + 'title' => '待办事项', + 'icon' => 'task_alt', + 'pages' => [], ], ]; diff --git a/resources/views/business/pages/company-management/company-information.blade.php b/resources/views/business/pages/company-management/company-information.blade.php new file mode 100644 index 00000000..f561d4b6 --- /dev/null +++ b/resources/views/business/pages/company-management/company-information.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['统一社会信用代码', '公司名称', '纳税人类型', '公司状态', '认缴注册资本(万元)', '注册时间', '法人', '股东', '监事', '开票员', '城市', '注册地址', '经营范围', '基本存款账户信息', '认缴时间']]) diff --git a/resources/views/business/pages/company-management/company-progress.blade.php b/resources/views/business/pages/company-management/company-progress.blade.php new file mode 100644 index 00000000..024f6a36 --- /dev/null +++ b/resources/views/business/pages/company-management/company-progress.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['公司名称', '公司类型', '当前进度', '是否完成', '完成时间', '办理人']]) diff --git a/resources/views/business/pages/company-management/entity-report.blade.php b/resources/views/business/pages/company-management/entity-report.blade.php new file mode 100644 index 00000000..35c6b95b --- /dev/null +++ b/resources/views/business/pages/company-management/entity-report.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['市', '主体', '公司类型', 'ERP系统店铺名称', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '展示近3个月月度销量', '连续12个月店铺累计销量', '连续12个月主体累计销量', '能否变更主体', '规划', '新主体']]) diff --git a/resources/views/business/pages/company-management/people-inventory.blade.php b/resources/views/business/pages/company-management/people-inventory.blade.php new file mode 100644 index 00000000..d81c9960 --- /dev/null +++ b/resources/views/business/pages/company-management/people-inventory.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['人员名称', '花名', '职位', '标签', '税务局账号', '税务局密码', '部门', '部门负责人', '身份证号码', '实名手机号', '电话卡保管人', '身份证地址', '公司类型', '合计担任公司数量', '保留担任公司数量', '可担任公司数量']]) diff --git a/resources/views/business/pages/partials/prototype-table.blade.php b/resources/views/business/pages/partials/prototype-table.blade.php new file mode 100644 index 00000000..8e377cda --- /dev/null +++ b/resources/views/business/pages/partials/prototype-table.blade.php @@ -0,0 +1,34 @@ +@php + $columns = $prototypeColumns ?? []; +@endphp + +
+
+
+ + {{ $page['title'] ?? '业务页面' }} · 数据列表 +
+
+
+ + + + + @foreach ($columns as $column) + + @endforeach + + + + + + + +
#{{ $column }}
+
+ +
页面结构已接入,业务数据尚未接入。
+
+
+
+
diff --git a/resources/views/business/pages/store-management/store-change-progress.blade.php b/resources/views/business/pages/store-management/store-change-progress.blade.php new file mode 100644 index 00000000..f836ec60 --- /dev/null +++ b/resources/views/business/pages/store-management/store-change-progress.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['公司名称', 'ERP系统店铺名称', '部门', '店铺负责人', '部门负责人', '账号', '密码', '接替公司', '进度', '是否完成', '完成时间', '办理人']]) diff --git a/resources/views/business/pages/store-management/store-information.blade.php b/resources/views/business/pages/store-management/store-information.blade.php new file mode 100644 index 00000000..427db9ea --- /dev/null +++ b/resources/views/business/pages/store-management/store-information.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['平台', '店铺ID', '店铺名称', '店铺主体', '店铺状态', '商标', '商标号', '业务部门', '店铺负责人', '部门负责人', '开店时间', '续签时间', '提现账户']]) diff --git a/resources/views/business/pages/store-management/store-report.blade.php b/resources/views/business/pages/store-management/store-report.blade.php new file mode 100644 index 00000000..47dd66eb --- /dev/null +++ b/resources/views/business/pages/store-management/store-report.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['ERP系统店铺名称', '店铺ID(唯一值)', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '能否变更', '主体', '公司类型', '生效时间', '失效时间', '期间销量', '1月销量', '2月销量', '3月销量', '4月销量', '5月销量', '6月销量', '7月销量', '8月销量', '9月销量', '10月销量', '11月销量', '12月销量']]) diff --git a/resources/views/business/pages/trademark-management/trademark-information.blade.php b/resources/views/business/pages/trademark-management/trademark-information.blade.php new file mode 100644 index 00000000..cc1ca2e7 --- /dev/null +++ b/resources/views/business/pages/trademark-management/trademark-information.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['商标名称', '商标号', '商标状态', '注册时间', '有效期', '国际分类', '核定使用商品', '最终持有人', '注册地址', '保管部门']]) diff --git a/resources/views/business/pages/trademark-management/trademark-progress.blade.php b/resources/views/business/pages/trademark-management/trademark-progress.blade.php new file mode 100644 index 00000000..6fa5489f --- /dev/null +++ b/resources/views/business/pages/trademark-management/trademark-progress.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['商标名称', '商标号', '业务', '进度', '是否完成', '完成时间', '办理人']]) diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index 317d4e93..15bb1729 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -9,7 +9,7 @@ use Tests\Feature\FeatureTestCase; class NavigationTest extends FeatureTestCase { - public function testAdminCanUpdateSidebarLabels() + public function testAdminSeesReferenceBusinessNavigation() { $this->user->roles()->sync([ Role::where('name', 'admin')->firstOrFail()->id, @@ -24,22 +24,23 @@ class NavigationTest extends FeatureTestCase ->assertOk() ->assertSeeText('侧边栏功能名称'); - $this->patch(route('settings.navigation.save'), [ - 'section_titles' => [ - 'company-management' => '企业档案', - ], - 'page_titles' => [ - 'company-management' => [ - 'subject-operating-report' => '主体经营', - ], - ], - ])->assertOk(); - $navigation = BusinessNavigation::all(); - $companyRegistration = collect($navigation[0]['pages'])->firstWhere('slug', 'subject-operating-report'); - - $this->assertSame('企业档案', $navigation[0]['title']); - $this->assertSame('主体经营', $companyRegistration['title']); + $this->assertSame( + ['company-management', 'trademark-management', 'store-management'], + array_slice(array_column($navigation, 'slug'), 0, 3) + ); + $this->assertSame( + ['people-inventory', 'company-progress', 'company-information', 'entity-report'], + array_column($navigation[0]['pages'], 'slug') + ); + $this->assertSame( + ['trademark-progress', 'trademark-information'], + array_column($navigation[1]['pages'], 'slug') + ); + $this->assertSame( + ['store-report', 'store-information', 'store-change-progress'], + array_column($navigation[2]['pages'], 'slug') + ); } public function testOrderDataAndRefundAreConfiguredBetweenInvoiceAndReceivablesMenus() @@ -63,29 +64,12 @@ class NavigationTest extends FeatureTestCase $this->assertLessThan($receivablesIndex, $refundIndex); $this->assertSame('订单数据', $orderData['title']); $this->assertSame( - ['raw-data', 'bill-offset'], + ['after-sales-expenses', 'promotion-expenses'], array_column($orderData['pages'], 'slug') ); - $this->assertSame( - ['原始数据', '账单冲减'], - array_column($orderData['pages'], 'title') - ); - $this->assertSame( - ['after-sales-expenses', 'promotion-expenses'], - array_column($orderData['pages'][0]['tabs'], 'slug') - ); $this->assertSame( ['订单售后费用明细', '商品推广费用明细'], - array_column($orderData['pages'][0]['tabs'], 'title') - ); - $this->assertArrayNotHasKey('children', $orderData['pages'][0]); - $this->assertSame( - ['bill-offset'], - array_column(array_slice($orderData['pages'], 1), 'slug') - ); - $this->assertSame( - ['账单冲减'], - array_column(array_slice($orderData['pages'], 1), 'title') + array_column($orderData['pages'], 'title') ); $this->assertSame('退款', $refund['title']); $this->assertSame('assignment_return', $refund['icon']); @@ -94,7 +78,7 @@ class NavigationTest extends FeatureTestCase array_column($refund['pages'], 'slug') ); $this->assertSame( - ['京喜退款数据', '售后(退货退款)'], + ['京喜退款数据', '非京喜退款数据'], array_column($refund['pages'], 'title') ); } -- 2.47.2 From 8fc04a63c73477d73929092e52e9125309aae3f7 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:30:32 +0800 Subject: [PATCH 02/10] feat: replace placeholder pages with prototype layouts --- .../company-information.blade.php | 2 +- .../company-progress.blade.php | 2 +- .../entity-report.blade.php | 2 +- .../people-inventory.blade.php | 2 +- .../pages/partials/prototype-page.blade.php | 72 +++++++++++++++++++ .../store-change-progress.blade.php | 2 +- .../store-information.blade.php | 2 +- .../store-management/store-report.blade.php | 2 +- .../trademark-information.blade.php | 2 +- .../trademark-progress.blade.php | 2 +- 10 files changed, 81 insertions(+), 9 deletions(-) create mode 100644 resources/views/business/pages/partials/prototype-page.blade.php diff --git a/resources/views/business/pages/company-management/company-information.blade.php b/resources/views/business/pages/company-management/company-information.blade.php index f561d4b6..8eab897a 100644 --- a/resources/views/business/pages/company-management/company-information.blade.php +++ b/resources/views/business/pages/company-management/company-information.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['统一社会信用代码', '公司名称', '纳税人类型', '公司状态', '认缴注册资本(万元)', '注册时间', '法人', '股东', '监事', '开票员', '城市', '注册地址', '经营范围', '基本存款账户信息', '认缴时间']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/company-management/company-progress.blade.php b/resources/views/business/pages/company-management/company-progress.blade.php index 024f6a36..8eab897a 100644 --- a/resources/views/business/pages/company-management/company-progress.blade.php +++ b/resources/views/business/pages/company-management/company-progress.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['公司名称', '公司类型', '当前进度', '是否完成', '完成时间', '办理人']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/company-management/entity-report.blade.php b/resources/views/business/pages/company-management/entity-report.blade.php index 35c6b95b..8eab897a 100644 --- a/resources/views/business/pages/company-management/entity-report.blade.php +++ b/resources/views/business/pages/company-management/entity-report.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['市', '主体', '公司类型', 'ERP系统店铺名称', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '展示近3个月月度销量', '连续12个月店铺累计销量', '连续12个月主体累计销量', '能否变更主体', '规划', '新主体']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/company-management/people-inventory.blade.php b/resources/views/business/pages/company-management/people-inventory.blade.php index d81c9960..8eab897a 100644 --- a/resources/views/business/pages/company-management/people-inventory.blade.php +++ b/resources/views/business/pages/company-management/people-inventory.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['人员名称', '花名', '职位', '标签', '税务局账号', '税务局密码', '部门', '部门负责人', '身份证号码', '实名手机号', '电话卡保管人', '身份证地址', '公司类型', '合计担任公司数量', '保留担任公司数量', '可担任公司数量']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/partials/prototype-page.blade.php b/resources/views/business/pages/partials/prototype-page.blade.php new file mode 100644 index 00000000..022ec85a --- /dev/null +++ b/resources/views/business/pages/partials/prototype-page.blade.php @@ -0,0 +1,72 @@ +@php + $slug = $page['slug'] ?? ''; + $definitions = [ + 'people-inventory' => [ + 'title' => '人员盘点表', + 'description' => '盘点法人、股东、监事及开票员任职', + 'columns' => ['人员', '职位', '标签', '部门 / 负责人', '实名手机号', '小规模公司 合计 / 保留', '一般纳税人 合计 / 保留', '可担任数量'], + 'summary' => [['人员总数', '48'], ['担任法人', '17'], ['担任开票员', '12'], ['任职容量不足', '3']], + 'rows' => [ + ['王敏 · 小满', '法人', '在职', '财务中心 / 刘景刚', '138****0621', '9 / 1', '3 / 0', '0'], + ['陈宇 · 远山', '法人', '在职', '经营管理部 / 刘景刚', '156****3372', '1 / 0', '1 / 1', '若干'], + ['赵宁 · 晴川', '开票员', '外部', '财务中心 / 秦薇', '186****9518', '4 / 3', '2 / 2', '3'], + ['林晚 · 青禾', '股东', '在职', '山东项目组 / 秦薇', '177****1506', '3 / 3', '1 / 1', '6'], + ], + ], + 'company-progress' => [ + 'title' => '公司进度表', 'description' => '跟踪公司注册、变更和注销办理进度', + 'columns' => ['公司名称', '业务类型', '当前进度', '是否完成', '计划完成', '办理人'], + 'rows' => [['株洲市晞飏盛商贸有限公司', '主体变更', '资料准备', '否', '2026-09-02', '常仪'], ['合肥致远商贸有限公司', '注销', '税务清算', '否', '2026-09-10', '赵宁']], + ], + 'company-information' => [ + 'title' => '公司基础信息', 'description' => '维护公司主体资料与存续状态', + 'columns' => ['统一社会信用代码', '公司名称', '纳税人类型', '公司状态', '注册资本', '城市', '注册时间'], + 'rows' => [['91370214MA3R6H8A2Q', '青岛哲晖义商贸有限公司', '一般纳税人', '保留(正常)', '100 万', '青岛', '2021-08-12'], ['91430102MA4T7N2P5C', '株洲市晞飏盛商贸有限公司', '小规模', '待注销', '50 万', '株洲', '2022-01-19']], + ], + 'entity-report' => [ + 'title' => '主体维度经营报表', 'description' => '按公司主体汇总店铺经营表现', + 'columns' => ['城市 / 主体', '纳税人类型', '关联店铺', '利润中心', '连续 12 月销量', '环比', '经营风险', '规划'], + 'rows' => [['青岛 / 青岛哲晖义商贸有限公司', '小规模纳税人', '6 家', '华北项目组', '¥962,408', '+8.3%', '关注', '变更'], ['济南 / 济南弈辰电子商务有限公司', '一般纳税人', '3 家', '山东项目组', '¥815,220', '-3.7%', '正常', '保留']], + ], + 'trademark-progress' => [ + 'title' => '商标进度表', 'description' => '跟踪商标续展与变更业务', + 'columns' => ['商标名称', '商标号', '业务', '进度', '是否完成', '完成时间', '办理人'], + 'rows' => [['简序', '67215904', '持有人变更', '商标局审核', '否', '-', '常仪']], + ], + 'trademark-information' => [ + 'title' => '商标基础信息', 'description' => '维护商标权属、有效期与保管信息', + 'columns' => ['商标名称', '商标号', '商标状态', '注册时间', '有效期', '国际分类', '最终持有人', '保管部门'], + 'rows' => [['柯诺苏', '59382147', '有效', '2022-03-21', '2032-03-20', '20 类', '株洲市晞飏盛商贸有限公司', '财务中心'], ['沐森', '48120633', '有效', '2021-01-07', '2031-01-06', '20 类', '杭州盈禾家居有限公司', '华东项目组']], + ], + 'store-information' => [ + 'title' => '店铺基础信息', 'description' => '维护店铺资料、经营状态与续签信息', + 'columns' => ['店铺名称', '平台 / 店铺 ID', '店铺主体', '经营状态', '业务部门', '续签时间', '本月销量'], + 'rows' => [['京东-柯诺苏家具旗舰店', '京东 / 515156', '株洲市晞飏盛商贸有限公司', '正常', '山东项目组', '2026-11-26', '¥284,300'], ['天猫-沐森家居旗舰店', '天猫 / 682041', '杭州盈禾家居有限公司', '关店中', '华东项目组', '2026-09-18', '¥239,842']], + ], + 'store-change-progress' => [ + 'title' => '店铺变更进度表', 'description' => '跟踪店铺主体变更办理进度', + 'columns' => ['店铺', '变更类型', '原主体', '接替主体', '当前节点', '计划完成', '状态'], + 'rows' => [['京东-柯诺苏家具旗舰店', '店铺主体变更', '株洲市晞飏盛商贸有限公司', '青岛哲晖义商贸有限公司', '平台审核', '2026-08-28', '进行中'], ['拼多多-简序生活馆', '店铺主体变更', '杭州盈禾家居有限公司', '青岛哲晖义商贸有限公司', '财务核对', '2026-09-02', '进行中']], + ], + 'store-report' => [ + 'title' => '店铺维度报表', 'description' => '查看店铺销量及历史主体归属', + 'columns' => ['店铺', '平台', '项目组', '状态', '当前主体', '6 月销量', '7 月销量', '8 月销量', '续签日期'], + 'rows' => [['京东-柯诺苏家具旗舰店', '京东', '山东项目组', '正常', '株洲市晞飏盛商贸有限公司', '¥241,320', '¥268,140', '¥284,300', '2026-11-26'], ['天猫-沐森家居旗舰店', '天猫', '华东项目组', '正常', '杭州盈禾家居有限公司', '¥189,220', '¥217,650', '¥239,842', '2026-09-18']], + ], + ]; + $definition = $definitions[$slug] ?? ['title' => $page['title'] ?? '业务页面', 'description' => '', 'columns' => [], 'rows' => []]; +@endphp + +
+
+
{{ $definition['description'] }}
原型页面已集成;当前数据源为测试适配层
+
+
+ @if (!empty($definition['summary'])) +
@foreach ($definition['summary'] as $item){{ $item[0] }}{{ $item[1] }}@endforeach
+ @endif +
+
table_view{{ $definition['title'] }}
测试适配层
+
@foreach ($definition['columns'] as $column)@endforeach@forelse ($definition['rows'] as $index => $row)@foreach ($row as $value)@endforeach@empty@endforelse
#{{ $column }}
{{ $index + 1 }}{{ $value ?: '-' }}
inbox
暂无数据
+
+
diff --git a/resources/views/business/pages/store-management/store-change-progress.blade.php b/resources/views/business/pages/store-management/store-change-progress.blade.php index f836ec60..8eab897a 100644 --- a/resources/views/business/pages/store-management/store-change-progress.blade.php +++ b/resources/views/business/pages/store-management/store-change-progress.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['公司名称', 'ERP系统店铺名称', '部门', '店铺负责人', '部门负责人', '账号', '密码', '接替公司', '进度', '是否完成', '完成时间', '办理人']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/store-management/store-information.blade.php b/resources/views/business/pages/store-management/store-information.blade.php index 427db9ea..8eab897a 100644 --- a/resources/views/business/pages/store-management/store-information.blade.php +++ b/resources/views/business/pages/store-management/store-information.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['平台', '店铺ID', '店铺名称', '店铺主体', '店铺状态', '商标', '商标号', '业务部门', '店铺负责人', '部门负责人', '开店时间', '续签时间', '提现账户']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/store-management/store-report.blade.php b/resources/views/business/pages/store-management/store-report.blade.php index 47dd66eb..8eab897a 100644 --- a/resources/views/business/pages/store-management/store-report.blade.php +++ b/resources/views/business/pages/store-management/store-report.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['ERP系统店铺名称', '店铺ID(唯一值)', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '能否变更', '主体', '公司类型', '生效时间', '失效时间', '期间销量', '1月销量', '2月销量', '3月销量', '4月销量', '5月销量', '6月销量', '7月销量', '8月销量', '9月销量', '10月销量', '11月销量', '12月销量']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/trademark-management/trademark-information.blade.php b/resources/views/business/pages/trademark-management/trademark-information.blade.php index cc1ca2e7..8eab897a 100644 --- a/resources/views/business/pages/trademark-management/trademark-information.blade.php +++ b/resources/views/business/pages/trademark-management/trademark-information.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['商标名称', '商标号', '商标状态', '注册时间', '有效期', '国际分类', '核定使用商品', '最终持有人', '注册地址', '保管部门']]) +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/trademark-management/trademark-progress.blade.php b/resources/views/business/pages/trademark-management/trademark-progress.blade.php index 6fa5489f..8eab897a 100644 --- a/resources/views/business/pages/trademark-management/trademark-progress.blade.php +++ b/resources/views/business/pages/trademark-management/trademark-progress.blade.php @@ -1 +1 @@ -@include('business.pages.partials.prototype-table', ['prototypeColumns' => ['商标名称', '商标号', '业务', '进度', '是否完成', '完成时间', '办理人']]) +@include('business.pages.partials.prototype-page') -- 2.47.2 From 061e30df43a9a1e16dbfcfae47ab5f719be64a22 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:38:08 +0800 Subject: [PATCH 03/10] feat: add prototype workspace and finance report tags --- config/business_navigation.php | 19 ++++++++++++++ .../pages/partials/prototype-page.blade.php | 26 +++++++++++++++++++ .../asset-report.blade.php | 1 + .../profit-report.blade.php | 1 + .../pages/workspace/overview.blade.php | 1 + .../business/pages/workspace/tasks.blade.php | 1 + .../pages/workspace/warnings.blade.php | 1 + 7 files changed, 50 insertions(+) create mode 100644 resources/views/business/pages/prototype-finance-reports/asset-report.blade.php create mode 100644 resources/views/business/pages/prototype-finance-reports/profit-report.blade.php create mode 100644 resources/views/business/pages/workspace/overview.blade.php create mode 100644 resources/views/business/pages/workspace/tasks.blade.php create mode 100644 resources/views/business/pages/workspace/warnings.blade.php diff --git a/config/business_navigation.php b/config/business_navigation.php index da3a31bc..1dba7371 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -1,6 +1,16 @@ 'workspace', + 'title' => '工作台', + 'icon' => 'dashboard', + 'pages' => [ + ['slug' => 'overview', 'title' => '经营总览'], + ['slug' => 'warnings', 'title' => '预警页面'], + ['slug' => 'tasks', 'title' => '待办事项'], + ], + ], [ 'slug' => 'company-management', 'title' => '公司管理', @@ -31,6 +41,15 @@ return [ ['slug' => 'store-change-progress', 'title' => '店铺变更进度表'], ], ], + [ + 'slug' => 'prototype-finance-reports', + 'title' => '财务报表', + 'icon' => 'analytics', + 'pages' => [ + ['slug' => 'profit-report', 'title' => '公司利润报表'], + ['slug' => 'asset-report', 'title' => '公司资产报表'], + ], + ], [ 'slug' => 'fund-management', 'title' => '资金管理', diff --git a/resources/views/business/pages/partials/prototype-page.blade.php b/resources/views/business/pages/partials/prototype-page.blade.php index 022ec85a..e11b85a2 100644 --- a/resources/views/business/pages/partials/prototype-page.blade.php +++ b/resources/views/business/pages/partials/prototype-page.blade.php @@ -1,6 +1,32 @@ @php $slug = $page['slug'] ?? ''; $definitions = [ + 'overview' => [ + 'title' => '经营总览', 'description' => '跨主体经营、风险与任务的当日视图', + 'summary' => [['正常经营店铺', '127'], ['活跃公司主体', '36'], ['待处理预警', '12'], ['今日待办', '8']], + 'columns' => ['指标', '当前值', '变化', '状态'], + 'rows' => [['正常经营店铺', '127', '+6.2%', '正常'], ['活跃公司主体', '36', '+2', '正常'], ['待处理预警', '12', '-3', '关注']], + ], + 'warnings' => [ + 'title' => '预警页面', 'description' => '集中查看经营、税务、人员与资质风险', + 'columns' => ['预警编号', '风险等级', '类型', '关联对象', '影响金额', '当前状态'], + 'rows' => [['WARN-202608-0012', 'P0', '主体归属', '抖音-源木家居专营店', '¥96,225', '未处理'], ['WARN-202608-0010', 'P1', '经营风险', '青岛哲晖义商贸有限公司', '¥3,420,800', '处理中'], ['WARN-202608-0009', 'P2', '店铺续签', '天猫-沐森家居旗舰店', '-', '未处理']], + ], + 'tasks' => [ + 'title' => '待办事项', 'description' => '跟进任务节点、责任人与处理时限', + 'columns' => ['待办编号', '业务类型', '关联对象', '任务内容', '优先级', '截止日期', '状态'], + 'rows' => [['TASK-260826-032', '主体变更', '抖音-源木家居专营店', '补录店铺有效主体并复核销量', '紧急', '2026-08-31', '待处理'], ['TASK-260826-029', '店铺变更', '京东-柯诺苏家具旗舰店', '提交京东店铺主体变更材料', '高', '2026-09-01', '进行中']], + ], + 'profit-report' => [ + 'title' => '公司利润报表', 'description' => '查看公司主体利润数据', + 'columns' => ['公司主体', '关联店铺', '本月收入', '本月成本', '本月利润', '利润率'], + 'rows' => [], + ], + 'asset-report' => [ + 'title' => '公司资产报表', 'description' => '查看公司主体资产数据', + 'columns' => ['公司主体', '银行账户', '店铺资产', '保证金', '资产合计', '数据状态'], + 'rows' => [], + ], 'people-inventory' => [ 'title' => '人员盘点表', 'description' => '盘点法人、股东、监事及开票员任职', diff --git a/resources/views/business/pages/prototype-finance-reports/asset-report.blade.php b/resources/views/business/pages/prototype-finance-reports/asset-report.blade.php new file mode 100644 index 00000000..8eab897a --- /dev/null +++ b/resources/views/business/pages/prototype-finance-reports/asset-report.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/prototype-finance-reports/profit-report.blade.php b/resources/views/business/pages/prototype-finance-reports/profit-report.blade.php new file mode 100644 index 00000000..8eab897a --- /dev/null +++ b/resources/views/business/pages/prototype-finance-reports/profit-report.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/workspace/overview.blade.php b/resources/views/business/pages/workspace/overview.blade.php new file mode 100644 index 00000000..8eab897a --- /dev/null +++ b/resources/views/business/pages/workspace/overview.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/workspace/tasks.blade.php b/resources/views/business/pages/workspace/tasks.blade.php new file mode 100644 index 00000000..8eab897a --- /dev/null +++ b/resources/views/business/pages/workspace/tasks.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-page') diff --git a/resources/views/business/pages/workspace/warnings.blade.php b/resources/views/business/pages/workspace/warnings.blade.php new file mode 100644 index 00000000..8eab897a --- /dev/null +++ b/resources/views/business/pages/workspace/warnings.blade.php @@ -0,0 +1 @@ +@include('business.pages.partials.prototype-page') -- 2.47.2 From dd6657144cb76c8e6f7220633fd868eb4fb0ffc2 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:41:00 +0800 Subject: [PATCH 04/10] fix: align finance navigation brand with prototype --- resources/views/components/layouts/admin/menu.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/components/layouts/admin/menu.blade.php b/resources/views/components/layouts/admin/menu.blade.php index 2406ff51..9d146612 100644 --- a/resources/views/components/layouts/admin/menu.blade.php +++ b/resources/views/components/layouts/admin/menu.blade.php @@ -131,10 +131,11 @@ Akaunting -
+
- 财务管理 + 税务 + 财务运营管理
-- 2.47.2 From 7fec0a8d90a5c4d5f192156550f09faa94e2602e Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:44:53 +0800 Subject: [PATCH 05/10] fix: restore complete prototype report headers --- .../pages/partials/prototype-page.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/business/pages/partials/prototype-page.blade.php b/resources/views/business/pages/partials/prototype-page.blade.php index e11b85a2..387870f5 100644 --- a/resources/views/business/pages/partials/prototype-page.blade.php +++ b/resources/views/business/pages/partials/prototype-page.blade.php @@ -30,7 +30,7 @@ 'people-inventory' => [ 'title' => '人员盘点表', 'description' => '盘点法人、股东、监事及开票员任职', - 'columns' => ['人员', '职位', '标签', '部门 / 负责人', '实名手机号', '小规模公司 合计 / 保留', '一般纳税人 合计 / 保留', '可担任数量'], + 'columns' => ['人员名称', '花名', '职位', '标签', '税务局账号', '税务局密码', '部门', '部门负责人', '身份证号码', '实名手机号', '电话卡保管人', '身份证地址', '公司类型', '合计担任公司数量', '保留担任公司数量', '可担任公司数量'], 'summary' => [['人员总数', '48'], ['担任法人', '17'], ['担任开票员', '12'], ['任职容量不足', '3']], 'rows' => [ ['王敏 · 小满', '法人', '在职', '财务中心 / 刘景刚', '138****0621', '9 / 1', '3 / 0', '0'], @@ -41,17 +41,17 @@ ], 'company-progress' => [ 'title' => '公司进度表', 'description' => '跟踪公司注册、变更和注销办理进度', - 'columns' => ['公司名称', '业务类型', '当前进度', '是否完成', '计划完成', '办理人'], + 'columns' => ['公司名称', '公司类型', '当前进度', '是否完成', '完成时间', '办理人'], 'rows' => [['株洲市晞飏盛商贸有限公司', '主体变更', '资料准备', '否', '2026-09-02', '常仪'], ['合肥致远商贸有限公司', '注销', '税务清算', '否', '2026-09-10', '赵宁']], ], 'company-information' => [ 'title' => '公司基础信息', 'description' => '维护公司主体资料与存续状态', - 'columns' => ['统一社会信用代码', '公司名称', '纳税人类型', '公司状态', '注册资本', '城市', '注册时间'], + 'columns' => ['统一社会信用代码', '公司名称', '纳税人类型', '公司状态', '认缴注册资本(万元)', '注册时间', '法人', '股东', '监事', '开票员', '城市', '注册地址', '经营范围', '基本存款账户信息', '认缴时间'], 'rows' => [['91370214MA3R6H8A2Q', '青岛哲晖义商贸有限公司', '一般纳税人', '保留(正常)', '100 万', '青岛', '2021-08-12'], ['91430102MA4T7N2P5C', '株洲市晞飏盛商贸有限公司', '小规模', '待注销', '50 万', '株洲', '2022-01-19']], ], 'entity-report' => [ 'title' => '主体维度经营报表', 'description' => '按公司主体汇总店铺经营表现', - 'columns' => ['城市 / 主体', '纳税人类型', '关联店铺', '利润中心', '连续 12 月销量', '环比', '经营风险', '规划'], + 'columns' => ['市', '主体', '公司类型', 'ERP系统店铺名称', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '展示近3个月月度销量', '连续12个月店铺累计销量', '连续12个月主体累计销量', '能否变更主体', '规划', '新主体(变更流程同步新主体)'], 'rows' => [['青岛 / 青岛哲晖义商贸有限公司', '小规模纳税人', '6 家', '华北项目组', '¥962,408', '+8.3%', '关注', '变更'], ['济南 / 济南弈辰电子商务有限公司', '一般纳税人', '3 家', '山东项目组', '¥815,220', '-3.7%', '正常', '保留']], ], 'trademark-progress' => [ @@ -61,22 +61,22 @@ ], 'trademark-information' => [ 'title' => '商标基础信息', 'description' => '维护商标权属、有效期与保管信息', - 'columns' => ['商标名称', '商标号', '商标状态', '注册时间', '有效期', '国际分类', '最终持有人', '保管部门'], + 'columns' => ['商标名称', '商标号', '商标状态', '注册时间', '有效期', '国际分类', '核定使用商品', '最终持有人', '注册地址', '保管部门'], 'rows' => [['柯诺苏', '59382147', '有效', '2022-03-21', '2032-03-20', '20 类', '株洲市晞飏盛商贸有限公司', '财务中心'], ['沐森', '48120633', '有效', '2021-01-07', '2031-01-06', '20 类', '杭州盈禾家居有限公司', '华东项目组']], ], 'store-information' => [ 'title' => '店铺基础信息', 'description' => '维护店铺资料、经营状态与续签信息', - 'columns' => ['店铺名称', '平台 / 店铺 ID', '店铺主体', '经营状态', '业务部门', '续签时间', '本月销量'], + 'columns' => ['平台', '店铺ID', '店铺名称', '店铺主体', '店铺状态', '商标', '商标号', '业务部门', '店铺负责人', '部门负责人', '开店时间', '续签时间', '提现账户'], 'rows' => [['京东-柯诺苏家具旗舰店', '京东 / 515156', '株洲市晞飏盛商贸有限公司', '正常', '山东项目组', '2026-11-26', '¥284,300'], ['天猫-沐森家居旗舰店', '天猫 / 682041', '杭州盈禾家居有限公司', '关店中', '华东项目组', '2026-09-18', '¥239,842']], ], 'store-change-progress' => [ 'title' => '店铺变更进度表', 'description' => '跟踪店铺主体变更办理进度', - 'columns' => ['店铺', '变更类型', '原主体', '接替主体', '当前节点', '计划完成', '状态'], + 'columns' => ['公司名称', 'ERP系统店铺名称', '部门', '店铺负责人', '部门负责人', '账号', '密码', '接替公司', '进度', '是否完成', '完成时间', '办理人'], 'rows' => [['京东-柯诺苏家具旗舰店', '店铺主体变更', '株洲市晞飏盛商贸有限公司', '青岛哲晖义商贸有限公司', '平台审核', '2026-08-28', '进行中'], ['拼多多-简序生活馆', '店铺主体变更', '杭州盈禾家居有限公司', '青岛哲晖义商贸有限公司', '财务核对', '2026-09-02', '进行中']], ], 'store-report' => [ 'title' => '店铺维度报表', 'description' => '查看店铺销量及历史主体归属', - 'columns' => ['店铺', '平台', '项目组', '状态', '当前主体', '6 月销量', '7 月销量', '8 月销量', '续签日期'], + 'columns' => ['ERP系统店铺名称', '店铺ID(唯一值)', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '能否变更', '主体', '公司类型', '生效时间', '失效时间', '期间销量', '1月销量', '2月销量', '3月销量', '4月销量', '5月销量', '6月销量', '7月销量', '8月销量', '9月销量', '10月销量', '11月销量', '12月销量'], 'rows' => [['京东-柯诺苏家具旗舰店', '京东', '山东项目组', '正常', '株洲市晞飏盛商贸有限公司', '¥241,320', '¥268,140', '¥284,300', '2026-11-26'], ['天猫-沐森家居旗舰店', '天猫', '华东项目组', '正常', '杭州盈禾家居有限公司', '¥189,220', '¥217,650', '¥239,842', '2026-09-18']], ], ]; -- 2.47.2 From ad74c5dbb24e5720de0246499694097ada73b517 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:47:51 +0800 Subject: [PATCH 06/10] fix: align prototype rows with complete headers --- .../views/business/pages/partials/prototype-page.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/business/pages/partials/prototype-page.blade.php b/resources/views/business/pages/partials/prototype-page.blade.php index 387870f5..db0c71fb 100644 --- a/resources/views/business/pages/partials/prototype-page.blade.php +++ b/resources/views/business/pages/partials/prototype-page.blade.php @@ -93,6 +93,6 @@ @endif
table_view{{ $definition['title'] }}
测试适配层
-
@foreach ($definition['columns'] as $column)@endforeach@forelse ($definition['rows'] as $index => $row)@foreach ($row as $value)@endforeach@empty@endforelse
#{{ $column }}
{{ $index + 1 }}{{ $value ?: '-' }}
inbox
暂无数据
+
@foreach ($definition['columns'] as $column)@endforeach@forelse ($definition['rows'] as $index => $row) @php($cells = array_pad(array_values($row), count($definition['columns']), null))@foreach ($cells as $value)@endforeach@empty@endforelse
#{{ $column }}
{{ $index + 1 }}{{ $value ?: '-' }}
inbox
暂无数据
-- 2.47.2 From d7c0cb6a17186ac1daa8b8c4f31179476827171c Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 16:55:48 +0800 Subject: [PATCH 07/10] feat: match prototype tag hierarchy --- app/Listeners/Menu/ShowInAdmin.php | 12 ++++ .../components/layouts/admin/menu.blade.php | 59 +++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/app/Listeners/Menu/ShowInAdmin.php b/app/Listeners/Menu/ShowInAdmin.php index c1a3f337..7f78f6a1 100644 --- a/app/Listeners/Menu/ShowInAdmin.php +++ b/app/Listeners/Menu/ShowInAdmin.php @@ -7,6 +7,14 @@ use App\Utilities\SidebarPermissions; class ShowInAdmin { + private const PROTOTYPE_NAV_SECTIONS = [ + 'workspace', + 'company-management', + 'trademark-management', + 'store-management', + 'prototype-finance-reports', + ]; + /** * Build the business navigation defined by the imported directory workbook. */ @@ -15,6 +23,10 @@ class ShowInAdmin $menu = $event->menu; foreach (SidebarPermissions::navigationFor(user()) as $sectionIndex => $section) { + if (in_array($section['slug'], self::PROTOTYPE_NAV_SECTIONS, true)) { + continue; + } + if (! empty($section['external_url'])) { $menu->url( $section['external_url'], diff --git a/resources/views/components/layouts/admin/menu.blade.php b/resources/views/components/layouts/admin/menu.blade.php index 9d146612..79299981 100644 --- a/resources/views/components/layouts/admin/menu.blade.php +++ b/resources/views/components/layouts/admin/menu.blade.php @@ -142,6 +142,65 @@ @stack('main_menu_admin_start') + @php + $prototypeGroups = [ + ['title' => '工作台', 'items' => [ + ['workspace', 'overview', '经营总览', 'monitoring'], + ]], + ['title' => '经营报表', 'items' => [ + ['company-management', 'entity-report', '主体维度经营报表', 'domain'], + ['store-management', 'store-report', '店铺维度报表', 'storefront'], + ['company-management', 'people-inventory', '人员盘点表', 'groups'], + ]], + ['title' => '基础资料', 'items' => [ + ['store-management', 'store-information', '店铺基础信息', 'shopping_bag'], + ['company-management', 'company-information', '公司基础信息', 'badge'], + ['trademark-management', 'trademark-information', '商标基础信息', 'workspace_premium'], + ]], + ['title' => '业务进度', 'items' => [ + ['store-management', 'store-change-progress', '店铺变更进度表', 'swap_horiz'], + ['trademark-management', 'trademark-progress', '商标进度表', 'format_list_bulleted'], + ['workspace', 'tasks', '待办事项', 'assignment_turned_in'], + ['workspace', 'warnings', '预警页面', 'warning_amber'], + ]], + ['title' => '财务报表', 'items' => [ + ['prototype-finance-reports', 'profit-report', '公司利润报表', 'request_quote'], + ['prototype-finance-reports', 'asset-report', '公司资产报表', 'account_balance'], + ]], + ]; + @endphp + + + +
+ @foreach ($prototypeGroups as $group) +
+
{{ $group['title'] }}
+ @foreach ($group['items'] as [$navSection, $navPage, $navTitle, $navIcon]) + request()->route('section') === $navSection && request()->route('page') === $navPage]) + > + + {{ $navTitle }} + @if ($navPage === 'tasks')8@endif + @if ($navPage === 'warnings')3@endif + + @endforeach +
+ @endforeach +
+ -- 2.47.2 From 89ffd4e9d559c0d366a33435c6c5055c0a143370 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 17:21:25 +0800 Subject: [PATCH 08/10] fix: show rolling three month sales headers --- .../pages/partials/prototype-page.blade.php | 8 +++- tests/Feature/Business/PrototypePageTest.php | 45 +++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/Business/PrototypePageTest.php diff --git a/resources/views/business/pages/partials/prototype-page.blade.php b/resources/views/business/pages/partials/prototype-page.blade.php index db0c71fb..3bba7808 100644 --- a/resources/views/business/pages/partials/prototype-page.blade.php +++ b/resources/views/business/pages/partials/prototype-page.blade.php @@ -1,5 +1,11 @@ @php $slug = $page['slug'] ?? ''; + $recentCompletedMonthSalesColumns = collect(range(3, 1)) + ->map(fn (int $monthsAgo): string => now() + ->startOfMonth() + ->subMonthsNoOverflow($monthsAgo) + ->format('n月销量')) + ->all(); $definitions = [ 'overview' => [ 'title' => '经营总览', 'description' => '跨主体经营、风险与任务的当日视图', @@ -51,7 +57,7 @@ ], 'entity-report' => [ 'title' => '主体维度经营报表', 'description' => '按公司主体汇总店铺经营表现', - 'columns' => ['市', '主体', '公司类型', 'ERP系统店铺名称', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', '展示近3个月月度销量', '连续12个月店铺累计销量', '连续12个月主体累计销量', '能否变更主体', '规划', '新主体(变更流程同步新主体)'], + 'columns' => ['市', '主体', '公司类型', 'ERP系统店铺名称', '店铺所属利润中心', '店铺负责人', '部门负责人', '开店时间', '状态', ...$recentCompletedMonthSalesColumns, '连续12个月店铺累计销量', '连续12个月主体累计销量', '能否变更主体', '规划', '新主体(变更流程同步新主体)'], 'rows' => [['青岛 / 青岛哲晖义商贸有限公司', '小规模纳税人', '6 家', '华北项目组', '¥962,408', '+8.3%', '关注', '变更'], ['济南 / 济南弈辰电子商务有限公司', '一般纳税人', '3 家', '山东项目组', '¥815,220', '-3.7%', '正常', '保留']], ], 'trademark-progress' => [ diff --git a/tests/Feature/Business/PrototypePageTest.php b/tests/Feature/Business/PrototypePageTest.php new file mode 100644 index 00000000..eff301f0 --- /dev/null +++ b/tests/Feature/Business/PrototypePageTest.php @@ -0,0 +1,45 @@ +loginAs()->get(route('business.pages.show', [ + 'section' => 'company-management', + 'page' => 'entity-report', + ])); + + $augustResponse + ->assertOk() + ->assertSeeTextInOrder(['5月销量', '6月销量', '7月销量']) + ->assertDontSeeText('8月销量') + ->assertDontSeeText('展示近3个月月度销量'); + + Carbon::setTestNow('2026-09-01 00:00:00'); + + $septemberResponse = $this->get(route('business.pages.show', [ + 'section' => 'company-management', + 'page' => 'entity-report', + ])); + + $septemberResponse + ->assertOk() + ->assertSeeTextInOrder(['6月销量', '7月销量', '8月销量']) + ->assertDontSeeText('5月销量') + ->assertDontSeeText('9月销量'); + } +} -- 2.47.2 From e9cc028ebcbd90900aa375f57f34e27a7077b817 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 17:34:27 +0800 Subject: [PATCH 09/10] fix: use authoritative upstream directory pages --- app/Business/TableRegistry.php | 2 + app/Http/Controllers/Business/Pages.php | 10 - config/business_navigation.php | 330 ++++++++++++++++-- .../components/layouts/admin/menu.blade.php | 12 +- 4 files changed, 307 insertions(+), 47 deletions(-) diff --git a/app/Business/TableRegistry.php b/app/Business/TableRegistry.php index 13b61a68..6b7e0a75 100644 --- a/app/Business/TableRegistry.php +++ b/app/Business/TableRegistry.php @@ -12,6 +12,7 @@ use App\Models\Business\CompanyStoreData; use App\Models\Business\ExpressReceiving; use App\Models\Business\FundForecast; use App\Models\Business\InvoiceBasic; +use App\Models\Business\InstallationDetail; use App\Models\Business\StoreChange; use App\Models\Business\StoreChangeLog; use App\Models\Business\StoreClosing; @@ -166,6 +167,7 @@ class TableRegistry 'fund-management/bank-accounts' => BankAccount::class, 'fund-management/shared-company-accounts' => BankAccount::class, // 重用 BankAccount,仅类型过滤 'billing-transactions/store-receiving-balance' => StoreReceivingAccount::class, + 'financial-operations/installation-details' => InstallationDetail::class, ]; } diff --git a/app/Http/Controllers/Business/Pages.php b/app/Http/Controllers/Business/Pages.php index cbcda2b6..289212a7 100644 --- a/app/Http/Controllers/Business/Pages.php +++ b/app/Http/Controllers/Business/Pages.php @@ -85,10 +85,6 @@ class Pages extends Controller abort_if(empty($section), 403, '当前账号没有已授权的侧边栏功能。'); - if (! empty($section['external_url'])) { - return redirect()->away($section['external_url']); - } - $page = collect($section['pages'] ?? [])->first(); $parameters = ['section' => $section['slug']]; @@ -109,12 +105,6 @@ class Pages extends Controller abort_if(empty($sectionConfig), 403, '当前账号没有该页面权限。'); - if (! empty($sectionConfig['external_url'])) { - abort_if($page !== null || $tab !== null, 404); - - return redirect()->away($sectionConfig['external_url']); - } - $pages = collect($sectionConfig['pages'] ?? []); if ($pages->isEmpty()) { diff --git a/config/business_navigation.php b/config/business_navigation.php index 1dba7371..a4d6db99 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -1,25 +1,104 @@ 'workspace', - 'title' => '工作台', - 'icon' => 'dashboard', - 'pages' => [ - ['slug' => 'overview', 'title' => '经营总览'], - ['slug' => 'warnings', 'title' => '预警页面'], - ['slug' => 'tasks', 'title' => '待办事项'], - ], - ], [ 'slug' => 'company-management', 'title' => '公司管理', 'icon' => 'business', 'pages' => [ - ['slug' => 'people-inventory', 'title' => '人员盘点表'], - ['slug' => 'company-progress', 'title' => '公司进度表'], - ['slug' => 'company-information', 'title' => '公司基础信息'], - ['slug' => 'entity-report', 'title' => '主体维度经营报表'], + [ + 'slug' => 'subject-operating-report', + 'title' => '主体维度经营报表', + 'directory' => [ + 'icon' => 'query_stats', + 'status' => '尚未同步', + 'description' => '按店铺唯一 ID 和主体生效、失效日期归属销量;自动汇总前,先固定 Excel 中的报表字段。', + 'empty' => '经营报表尚未同步。完成店铺主体和销量镜像接入后,这里会显示可追溯的主体数据。', + 'fields' => [ + ['name' => 'city', 'label' => '市'], + ['name' => 'entity', 'label' => '主体'], + ['name' => 'company_type', 'label' => '公司类型'], + ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], + ['name' => 'profit_center', 'label' => '店铺所属利润中心'], + ['name' => 'store_manager', 'label' => '店铺负责人'], + ['name' => 'closing_manager', 'label' => '闭门负责人'], + ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], + ['name' => 'status', 'label' => '状态'], + ['name' => 'recent_three_month_sales', 'label' => '展示近3个月月度销量', 'kind' => 'number'], + ['name' => 'store_sales_12m', 'label' => '连续12个月店铺累计销量', 'kind' => 'number'], + ['name' => 'entity_sales_12m', 'label' => '连续12个月主体累计销量', 'kind' => 'number'], + ['name' => 'can_change_entity', 'label' => '能否变更主体'], + ['name' => 'plan', 'label' => '规划'], + ['name' => 'new_entity', 'label' => '新主体(变更流程同步新主体)'], + ], + ], + ], + [ + 'slug' => 'basic-information', + 'title' => '公司基础信息', + 'directory' => [ + 'icon' => 'business', + 'status' => '既有只读上游', + 'description' => '沿用现有公司基础资料只读链路;Excel 中暂未匹配到的城市、认缴时间等字段保留为空。', + 'empty' => '尚未读取到公司基础资料。请检查共享镜像或上游同步状态。', + 'fields' => [ + ['name' => 'unified_social_credit_code', 'label' => '统一社会信用代码'], + ['name' => 'company_name', 'label' => '公司名称'], + ['name' => 'taxpayer_type', 'label' => '纳税人类型', 'source' => 'taxpayer_category'], + ['name' => 'company_status', 'label' => '公司状态'], + ['name' => 'subscribed_capital', 'label' => '认缴注册资本(万元)', 'kind' => 'number'], + ['name' => 'registered_at', 'label' => '注册时间', 'kind' => 'date', 'source' => 'establishment_date'], + ['name' => 'legal_representative', 'label' => '法人'], + ['name' => 'shareholders', 'label' => '股东'], + ['name' => 'supervisor', 'label' => '监事'], + ['name' => 'billing_officer', 'label' => '开票员', 'source' => 'financial_officer'], + ['name' => 'city', 'label' => '城市'], + ['name' => 'registered_address', 'label' => '注册地址'], + ['name' => 'business_scope', 'label' => '经营范围'], + ['name' => 'basic_deposit_account', 'label' => '基本存款账户信息', 'source' => 'basic_deposit_account_number', 'kind' => 'secret'], + ['name' => 'subscribed_at', 'label' => '认缴时间'], + ], + ], + ], + [ + 'slug' => 'personnel-inventory', + 'title' => '人员盘点表', + 'directory' => [ + 'icon' => 'group', + 'status' => '尚未同步', + 'description' => '固定人员、任职和公司承载量盘点字段;身份证、税务账号和密码只保留字段契约,不在空页面填充。', + 'empty' => '人员盘点数据尚未同步。接入人员和任职关系后,这里会显示盘点结果。', + 'fields' => [ + ['name' => 'person_name', 'label' => '人员名称'], + ['name' => 'alias', 'label' => '花名'], + ['name' => 'position', 'label' => '职位'], + ['name' => 'tag', 'label' => '标签'], + ['name' => 'tax_account', 'label' => '税务局账号'], + ['name' => 'tax_password', 'label' => '税务局密码', 'kind' => 'secret'], + ['name' => 'department', 'label' => '部门'], + ['name' => 'department_manager', 'label' => '部门负责人'], + ['name' => 'id_number', 'label' => '身份证号码', 'kind' => 'secret'], + ['name' => 'verified_mobile', 'label' => '实名手机号', 'kind' => 'secret'], + ['name' => 'sim_card_keeper', 'label' => '电话卡保管人'], + ['name' => 'id_address', 'label' => '身份证地址', 'kind' => 'secret'], + ['name' => 'company_type', 'label' => '公司类型'], + ['name' => 'total_company_count', 'label' => '合计担任公司数量', 'kind' => 'number'], + ['name' => 'retained_company_count', 'label' => '保留担任公司数量', 'kind' => 'number'], + ['name' => 'available_company_count', 'label' => '可担任公司数量', 'kind' => 'number'], + ], + ], + ], + [ + 'slug' => 'company-progress', + 'title' => '公司进度表', + 'directory' => [ + 'icon' => 'timeline', + 'status' => '字段待定义', + 'description' => 'Excel 目录包含该页面,但未提供对应子表或表头。当前只建立页面位置,不猜测公司流程字段。', + 'empty' => '公司进度表字段尚未定义,补充子表表头后再接入流程数据。', + 'fields' => [], + ], + ], ], ], [ @@ -27,8 +106,47 @@ return [ 'title' => '商标管理', 'icon' => 'verified', 'pages' => [ - ['slug' => 'trademark-progress', 'title' => '商标进度表'], - ['slug' => 'trademark-information', 'title' => '商标基础信息'], + [ + 'slug' => 'information', + 'title' => '商标基础信息', + 'directory' => [ + 'icon' => 'verified', + 'status' => '既有只读上游', + 'description' => '沿用现有商标资料只读链路;当前已匹配名称、状态、注册时间和有效期,其余 Excel 字段待接入。', + 'empty' => '尚未读取到商标基础资料。请检查共享镜像或上游同步状态。', + 'fields' => [ + ['name' => 'trademark_name', 'label' => '商标名称'], + ['name' => 'trademark_number', 'label' => '商标号'], + ['name' => 'trademark_status', 'label' => '商标状态'], + ['name' => 'registration_date', 'label' => '注册时间', 'kind' => 'date'], + ['name' => 'expiry_date', 'label' => '有效期', 'kind' => 'date'], + ['name' => 'international_classification', 'label' => '国际分类', 'source' => 'trademark_type'], + ['name' => 'approved_goods', 'label' => '核定使用商品'], + ['name' => 'final_holder', 'label' => '最终持有人'], + ['name' => 'registered_address', 'label' => '注册地址'], + ['name' => 'custody_department', 'label' => '保管部门'], + ], + ], + ], + [ + 'slug' => 'trademark-progress', + 'title' => '商标进度表', + 'directory' => [ + 'icon' => 'timeline', + 'status' => '尚未同步', + 'description' => '按 Excel 固定注册、变更、续展等业务的办理进度字段;流程数据接入前不显示伪造记录。', + 'empty' => '商标进度数据尚未同步。', + 'fields' => [ + ['name' => 'trademark_name', 'label' => '商标名称'], + ['name' => 'trademark_number', 'label' => '商标号'], + ['name' => 'business', 'label' => '业务'], + ['name' => 'progress', 'label' => '进度'], + ['name' => 'completed', 'label' => '是否完成'], + ['name' => 'completed_at', 'label' => '完成时间', 'kind' => 'date'], + ['name' => 'handler', 'label' => '办理人'], + ], + ], + ], ], ], [ @@ -36,18 +154,93 @@ return [ 'title' => '店铺管理', 'icon' => 'storefront', 'pages' => [ - ['slug' => 'store-report', 'title' => '店铺维度经营报表'], - ['slug' => 'store-information', 'title' => '店铺基础信息'], - ['slug' => 'store-change-progress', 'title' => '店铺变更进度表'], + [ + 'slug' => 'store-report', + 'title' => '店铺维度报表', + 'directory' => [ + 'icon' => 'query_stats', + 'status' => '尚未同步', + 'description' => '以店铺 ID 和主体生效、失效时间为基础,固定期间销量及 2026 年月度销量字段。', + 'empty' => '店铺维度报表尚未同步。完成销量镜像接入后,这里会显示可核对的期间数据。', + 'fields' => [ + ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], + ['name' => 'store_id', 'label' => '店铺ID(唯一值)'], + ['name' => 'profit_center', 'label' => '店铺所属利润中心'], + ['name' => 'store_manager', 'label' => '店铺负责人'], + ['name' => 'department_manager', 'label' => '部门负责人'], + ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], + ['name' => 'status', 'label' => '状态'], + ['name' => 'can_change', 'label' => '能否变更'], + ['name' => 'entity', 'label' => '主体'], + ['name' => 'company_type', 'label' => '公司类型'], + ['name' => 'effective_at', 'label' => '生效时间', 'kind' => 'date'], + ['name' => 'invalid_at', 'label' => '失效时间', 'kind' => 'date'], + ['name' => 'period_sales', 'label' => '期间销量', 'kind' => 'number'], + ...array_map(static fn (int $month): array => [ + 'name' => sprintf('sales_%02d', $month), + 'label' => sprintf('%d月销量', $month), + 'kind' => 'number', + ], range(1, 12)), + ], + ], + ], + [ + 'slug' => 'basic-information', + 'title' => '店铺基础信息', + 'directory' => [ + 'icon' => 'storefront', + 'status' => '既有只读上游', + 'description' => '沿用现有店铺资料只读链路;Excel 中的店铺 ID、续签时间和提现账户待字段映射后补充。', + 'empty' => '尚未读取到店铺基础资料。请检查共享镜像或上游同步状态。', + 'fields' => [ + ['name' => 'platform', 'label' => '平台'], + ['name' => 'store_id', 'label' => '店铺ID'], + ['name' => 'store_name', 'label' => '店铺名称', 'source' => 'erp_store_name'], + ['name' => 'store_entity', 'label' => '店铺主体', 'source' => 'company_name'], + ['name' => 'store_status', 'label' => '店铺状态'], + ['name' => 'trademark', 'label' => '商标', 'source' => 'trademark_name'], + ['name' => 'trademark_number', 'label' => '商标号'], + ['name' => 'business_department', 'label' => '业务部门', 'source' => 'profit_center'], + ['name' => 'store_manager', 'label' => '店铺负责人'], + ['name' => 'department_manager', 'label' => '部门负责人'], + ['name' => 'opened_at', 'label' => '开店时间', 'kind' => 'date'], + ['name' => 'renewed_at', 'label' => '续签时间'], + ['name' => 'withdrawal_account', 'label' => '提现账户', 'kind' => 'secret'], + ], + ], + ], + [ + 'slug' => 'change-progress', + 'title' => '店铺变更进度表', + 'directory' => [ + 'icon' => 'sync_alt', + 'status' => '尚未同步', + 'description' => '按 Excel 固定店铺主体变更的账号、接替公司、进度和办理留痕字段。', + 'empty' => '店铺变更进度数据尚未同步。', + 'fields' => [ + ['name' => 'company_name', 'label' => '公司名称'], + ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], + ['name' => 'department', 'label' => '部门'], + ['name' => 'store_manager', 'label' => '店铺负责人'], + ['name' => 'department_manager', 'label' => '部门负责人'], + ['name' => 'account', 'label' => '账号'], + ['name' => 'password', 'label' => '密码', 'kind' => 'secret'], + ['name' => 'successor_company', 'label' => '接替公司'], + ['name' => 'progress', 'label' => '进度'], + ['name' => 'completed', 'label' => '是否完成'], + ['name' => 'completed_at', 'label' => '完成时间', 'kind' => 'date'], + ['name' => 'handler', 'label' => '办理人'], + ], + ], + ], ], ], [ - 'slug' => 'prototype-finance-reports', - 'title' => '财务报表', - 'icon' => 'analytics', + 'slug' => 'product-inventory', + 'title' => '商品及库存管理', + 'icon' => 'inventory_2', 'pages' => [ - ['slug' => 'profit-report', 'title' => '公司利润报表'], - ['slug' => 'asset-report', 'title' => '公司资产报表'], + ['slug' => 'normal-products', 'title' => '普通商品资料'], ], ], [ @@ -118,6 +311,16 @@ return [ ['slug' => 'vipshop', 'title' => '唯品会账户'], ], ], + [ + 'slug' => 'platform-promotion-accounts', + 'title' => '平台推广账户流水', + 'tabs' => [ + ['slug' => 'jd', 'title' => '京东京准通'], + ['slug' => 'douyin', 'title' => '抖音千川'], + ['slug' => 'dewu', 'title' => '得物推广账户'], + ['slug' => 'vip', 'title' => 'VIP(唯品会)'], + ], + ], ['slug' => 'deposit-account-balance', 'title' => '店铺保证金账户余额'], [ 'slug' => 'deposit-account-bills', @@ -159,8 +362,15 @@ return [ 'title' => '订单数据', 'icon' => 'receipt_long', 'pages' => [ - ['slug' => 'after-sales-expenses', 'title' => '订单售后费用明细'], - ['slug' => 'promotion-expenses', 'title' => '商品推广费用明细'], + [ + 'slug' => 'raw-data', + 'title' => '原始数据', + 'tabs' => [ + ['slug' => 'after-sales-expenses', 'title' => '订单售后费用明细'], + ['slug' => 'promotion-expenses', 'title' => '商品推广费用明细'], + ], + ], + ['slug' => 'bill-offset', 'title' => '账单冲减'], ], ], [ @@ -169,7 +379,7 @@ return [ 'icon' => 'assignment_return', 'pages' => [ ['slug' => 'jingxi-refund-data', 'title' => '京喜退款数据'], - ['slug' => 'non-jingxi-refund-data', 'title' => '非京喜退款数据'], + ['slug' => 'non-jingxi-refund-data', 'title' => '售后(退货退款)'], ], ], [ @@ -216,11 +426,14 @@ return [ 'icon' => 'local_shipping', 'pages' => [ ['slug' => 'quote-management', 'title' => '报价管理'], + ['slug' => 'courier-information', 'title' => '快递资料'], + ['slug' => 'agreement-signing', 'title' => '协议签署'], ['slug' => 'freight-reconciliation', 'title' => '运费对账'], ['slug' => 'bookkeeping-details', 'title' => '记账明细'], ['slug' => 'compensation-details', 'title' => '赔偿明细'], ['slug' => 'advance-details', 'title' => '借支明细'], ['slug' => 'other-adjustments', 'title' => '其他扣款补款'], + ['slug' => 'payable-cloud-warehouse-vehicle-fee', 'title' => '应付云仓车费'], ['slug' => 'courier-payables-report', 'title' => '快递应付表'], ], ], @@ -324,9 +537,64 @@ return [ ], ], [ - 'slug' => 'todos', - 'title' => '待办事项', - 'icon' => 'task_alt', - 'pages' => [], + 'slug' => 'other', + 'title' => '其他', + 'icon' => 'more_horiz', + 'pages' => [ + [ + 'slug' => 'todos', + 'title' => '待办事项', + 'directory' => [ + 'icon' => 'task_alt', + 'status' => '尚未同步', + 'description' => '预警、审批、定时任务和人工创建事项共用一套待办字段,形成责任分派与处理留痕。', + 'empty' => '待办事项尚未同步。完成任务来源和处理流程接入后,这里会显示待办记录。', + 'fields' => [ + ['name' => 'todo_number', 'label' => '待办编号'], + ['name' => 'source_type', 'label' => '来源类型'], + ['name' => 'business_type', 'label' => '业务类型'], + ['name' => 'related_object', 'label' => '关联店铺/主体'], + ['name' => 'task_content', 'label' => '任务内容'], + ['name' => 'owner', 'label' => '责任人'], + ['name' => 'collaborator', 'label' => '协同人'], + ['name' => 'due_at', 'label' => '截止日期', 'kind' => 'date'], + ['name' => 'priority', 'label' => '优先级'], + ['name' => 'current_node', 'label' => '当前节点'], + ['name' => 'result', 'label' => '处理结果'], + ['name' => 'attachment', 'label' => '附件'], + ['name' => 'overdue', 'label' => '是否逾期'], + ['name' => 'closed_by', 'label' => '关闭人'], + ['name' => 'closed_at', 'label' => '关闭日期', 'kind' => 'date'], + ], + ], + ], + [ + 'slug' => 'warnings', + 'title' => '预警页面', + 'directory' => [ + 'icon' => 'warning', + 'status' => '尚未同步', + 'description' => '集中展示销量、税务、主体、人员、商标和续签风险,并可关联待办编号追踪处理结果。', + 'empty' => '预警数据尚未同步。完成规则引擎和预警来源接入后,这里会显示风险记录。', + 'fields' => [ + ['name' => 'warning_number', 'label' => '预警编号'], + ['name' => 'warning_type', 'label' => '预警类型'], + ['name' => 'risk_level', 'label' => '风险等级'], + ['name' => 'related_object', 'label' => '关联对象'], + ['name' => 'risk_description', 'label' => '风险描述'], + ['name' => 'impact_amount', 'label' => '影响金额', 'kind' => 'number'], + ['name' => 'trigger_rule', 'label' => '触发规则'], + ['name' => 'triggered_at', 'label' => '触发时间', 'kind' => 'date'], + ['name' => 'owner', 'label' => '责任人'], + ['name' => 'collaborator', 'label' => '协同人'], + ['name' => 'due_at', 'label' => '截止时间', 'kind' => 'date'], + ['name' => 'todo_number', 'label' => '待办编号'], + ['name' => 'status', 'label' => '处理状态'], + ['name' => 'evidence', 'label' => '处理证据'], + ['name' => 'closed_by_date', 'label' => '关闭人/日期'], + ], + ], + ], + ], ], ]; diff --git a/resources/views/components/layouts/admin/menu.blade.php b/resources/views/components/layouts/admin/menu.blade.php index 79299981..a3186a5d 100644 --- a/resources/views/components/layouts/admin/menu.blade.php +++ b/resources/views/components/layouts/admin/menu.blade.php @@ -148,17 +148,17 @@ ['workspace', 'overview', '经营总览', 'monitoring'], ]], ['title' => '经营报表', 'items' => [ - ['company-management', 'entity-report', '主体维度经营报表', 'domain'], + ['company-management', 'subject-operating-report', '主体维度经营报表', 'domain'], ['store-management', 'store-report', '店铺维度报表', 'storefront'], - ['company-management', 'people-inventory', '人员盘点表', 'groups'], + ['company-management', 'personnel-inventory', '人员盘点表', 'groups'], ]], ['title' => '基础资料', 'items' => [ - ['store-management', 'store-information', '店铺基础信息', 'shopping_bag'], - ['company-management', 'company-information', '公司基础信息', 'badge'], - ['trademark-management', 'trademark-information', '商标基础信息', 'workspace_premium'], + ['store-management', 'basic-information', '店铺基础信息', 'shopping_bag'], + ['company-management', 'basic-information', '公司基础信息', 'badge'], + ['trademark-management', 'information', '商标基础信息', 'workspace_premium'], ]], ['title' => '业务进度', 'items' => [ - ['store-management', 'store-change-progress', '店铺变更进度表', 'swap_horiz'], + ['store-management', 'change-progress', '店铺变更进度表', 'swap_horiz'], ['trademark-management', 'trademark-progress', '商标进度表', 'format_list_bulleted'], ['workspace', 'tasks', '待办事项', 'assignment_turned_in'], ['workspace', 'warnings', '预警页面', 'warning_amber'], -- 2.47.2 From 0741b6be02a4fe79424d4ac32767f486a8ebfae5 Mon Sep 17 00:00:00 2001 From: WuYongJie <549727955@qq.com> Date: Mon, 31 Aug 2026 17:38:10 +0800 Subject: [PATCH 10/10] feat: map upstream master data fields --- app/Business/UpstreamBusinessInformation.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Business/UpstreamBusinessInformation.php b/app/Business/UpstreamBusinessInformation.php index 9598170b..e3c84fab 100644 --- a/app/Business/UpstreamBusinessInformation.php +++ b/app/Business/UpstreamBusinessInformation.php @@ -92,6 +92,7 @@ SELECT registeredAddress AS registered_address, businessScope AS business_scope, accountSerialNumber AS basic_deposit_account_number, + registeredCapitalVaildTime AS subscribed_at, companyStatus AS company_status, financialManager AS financial_officer, supervisor AS supervisor, @@ -127,7 +128,9 @@ SQL); $rows = $query->select(<<select(<<toUtf8($row); $row['establishment_date'] = $this->date($row['establishment_date'] ?? null); + $row['subscribed_at'] = $this->date($row['subscribed_at'] ?? null); $row['company_status'] = match ((string) ($row['company_status'] ?? '')) { '0' => '正常', '1' => '已注销', @@ -239,6 +250,7 @@ SQL); { $row = $this->toUtf8($row); $row['opened_at'] = $this->date($row['opened_at'] ?? null); + $row['renewed_at'] = $this->date($row['renewed_at'] ?? null); $row['store_status'] = match ((string) ($row['store_status'] ?? '')) { '0' => '正常', '3' => '关闭中', -- 2.47.2