'company-management', 'title' => '公司管理', 'icon' => 'business', 'pages' => [ [ 'slug' => 'subject-operating-report', 'title' => '主体维度经营报表', 'directory' => [ 'icon' => 'query_stats', 'status' => '收入汇总', 'description' => '按主体生效、失效日期归属账单收入;当前页面一行一个主体,收入来自 SQLite bills.income。', 'empty' => '经营报表尚未同步。完成店铺主体和销量镜像接入后,这里会显示可追溯的主体数据。', 'fields' => [ ['name' => 'city', 'label' => '市'], ['name' => 'entity', 'label' => '主体'], ['name' => 'company_type', 'label' => '公司类型'], ['name' => 'rolling_12m_income', 'label' => '最近12个月累计收入', 'kind' => 'number'], ...array_map(static fn (int $month): array => ['name' => sprintf('income_%02d', $month), 'label' => $month . '月收入', 'kind' => 'number'], range(1, 12)), ['name' => 'can_change_entity', 'label' => '能否变更主体'], ['name' => 'plan', 'label' => '规划'], ['name' => 'new_entity', 'label' => '新主体(变更流程同步新主体)'], ], ], ], [ 'slug' => 'basic-information', 'title' => '公司基础信息', 'directory' => [ 'icon' => 'business', 'status' => '既有只读上游', 'description' => '优先读取共享业务镜像中的公司资料;未匹配的城市等字段保留为空。', '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' => 'trademark-management', 'title' => '商标管理', 'icon' => 'verified', 'pages' => [ [ 'slug' => 'information', 'title' => '商标基础信息', 'directory' => [ 'icon' => 'verified', 'status' => '既有只读上游', 'description' => '优先读取共享业务镜像中的商标权属、有效期和保管资料。', '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' => 'rules-information', 'title' => '规则信息', 'directory' => [ 'icon' => 'rule', 'status' => '规则待定义', 'description' => '规则信息分组,包含主体商标规则和店铺变更规则。', 'empty' => '请选择下方具体规则页面。', 'fields' => [], ], 'children' => [ [ 'slug' => 'subject-trademark-rules', 'title' => '主体商标规则', 'directory' => [ 'icon' => 'rule', 'status' => '规则待定义', 'description' => '主体商标规则页面位置已建立,待补充正式规则字段和业务数据。', 'empty' => '主体商标规则尚未定义或同步。', 'fields' => [], ], ], [ 'slug' => 'store-change-rules', 'title' => '店铺变更规则', 'directory' => [ 'icon' => 'rule', 'status' => '规则待定义', 'description' => '店铺变更规则页面位置已建立,待补充正式规则字段和业务数据。', 'empty' => '店铺变更规则尚未定义或同步。', 'fields' => [], ], ], ], ], ], ], [ 'slug' => 'store-management', 'title' => '店铺管理', 'icon' => 'storefront', 'pages' => [ [ 'slug' => 'store-report', 'title' => '店铺维度报表', 'directory' => [ 'icon' => 'query_stats', 'status' => '共享镜像', 'description' => '店铺资料、主体生效区间和平台账单统一读取团队共享业务镜像;销量按账单收入汇总。', 'empty' => '店铺维度报表尚未完成共享数据导入。', 'fields' => [ ['name' => 'erp_store_name', 'label' => 'ERP系统店铺名称'], ['name' => 'store_name', 'label' => '店铺名称'], ['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' => '优先读取共享业务镜像中的店铺资料、店铺 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' => 'store-accounts', 'title' => '店铺账号密码', 'directory' => [ 'icon' => 'key', 'status' => '共享镜像', 'description' => '账号资料来自共享镜像。拥有本页面权限的用户可直接查看当前页密码,密码不会随表格导出。', 'empty' => '共享镜像中暂未读取到店铺账号数据,请检查账号数据同步状态。', 'fields' => [ ['name' => 'store_name', 'label' => '店铺名称'], ['name' => 'operation_owner', 'label' => '店铺运营负责人'], ['name' => 'operation_department_head', 'label' => '店铺运营部门负责人'], ['name' => 'operation_director', 'label' => '店铺运营总监'], ['name' => 'profit_center', 'label' => '店铺所属利润中心'], ['name' => 'account_type', 'label' => '账号类型'], ['name' => 'account', 'label' => '账号'], ['name' => 'password_configured', 'label' => '密码', 'kind' => 'secret_status'], ['name' => 'bound_phone', 'label' => '绑定手机号'], ['name' => 'verification_contact', 'label' => '手机号验证码对接人'], ['name' => 'account_group_name', 'label' => '账号分组名称'], ['name' => 'created_at', 'label' => '店铺创建时间', 'kind' => 'date'], ['name' => 'updated_at', 'label' => '店铺修改时间', 'kind' => 'date'], ], ], ], [ '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' => 'basic-data', 'title' => '基础数据', 'icon' => 'folder', 'pages' => [], ], [ 'slug' => 'product-inventory', 'title' => '商品价格管理', 'icon' => 'inventory_2', 'pages' => [ ['slug' => 'normal-products', 'title' => '普通商品资料'], ['slug' => 'online-daifa-price', 'title' => '线上代发价格'], ], ], [ 'slug' => 'fund-management', 'title' => '资金管理', 'icon' => 'account_balance_wallet', 'pages' => [ [ 'slug' => 'store-receiving-accounts', 'title' => '店铺收款账户', 'tabs' => [ ['slug' => 'taobao', 'title' => '淘宝', 'icon' => 'shopping_bag'], ['slug' => 'jd', 'title' => '京东', 'icon' => 'account_balance_wallet'], ['slug' => 'douyin', 'title' => '抖音小店', 'icon' => 'smart_display'], ['slug' => 'pinduoduo', 'title' => '拼多多', 'icon' => 'storefront'], ], ], ['slug' => 'bank-accounts', 'title' => '银行账户'], ['slug' => 'shared-company-accounts', 'title' => '公司公用账户'], ['slug' => 'fund-forecast', 'title' => '资金预测表'], ['slug' => 'withdrawal-management', 'title' => '提现管理'], ], ], [ 'slug' => 'billing-transactions', 'title' => '账单流水数据', 'icon' => 'receipt_long', 'pages' => [ ['slug' => 'bank-transactions', 'title' => '银行账户流水'], [ 'slug' => 'store-receiving-bills', 'title' => '店铺收款账户账单', 'tabs' => [ ['slug' => 'taobao-alipay', 'title' => '淘系支付宝账户'], ['slug' => 'taobao-wechat', 'title' => '淘系微信账户'], ['slug' => 'pinduoduo', 'title' => '拼多多账户'], ['slug' => 'jd-wallet', 'title' => '京东网银钱包账户'], ['slug' => 'jd-transactions', 'title' => '京东流水'], ['slug' => 'douyin', 'title' => '抖音账户'], ['slug' => 'dewu', 'title' => '得物账户'], ], ], [ 'slug' => 'marketing-account-bills', 'title' => '店铺营销账户账单', 'tabs' => [ ['slug' => 'taobao-alipay', 'title' => '淘系支付宝账户'], ['slug' => 'taobao-wechat', 'title' => '淘系微信账户'], ['slug' => 'pinduoduo', 'title' => '拼多多账户'], ['slug' => 'jd-wallet', 'title' => '京东网银钱包账户'], ['slug' => 'jd-promotion', 'title' => '京东京准通'], ['slug' => 'douyin-promotion', 'title' => '抖音千川'], ['slug' => 'dewu-promotion', 'title' => '得物推广账户'], ['slug' => 'vip-promotion', 'title' => '唯品会推广流水'], ], ], [ 'slug' => 'deposit-account-bills', 'title' => '店铺保证金账户账单', 'tabs' => [ ['slug' => 'taobao-alipay', 'title' => '淘系支付宝账户'], ['slug' => 'taobao-wechat', 'title' => '淘系微信账户'], ['slug' => 'pinduoduo', 'title' => '拼多多账户'], ['slug' => 'jd-wallet', 'title' => '京东网银钱包账户'], ['slug' => 'douyin', 'title' => '抖音账户'], ['slug' => 'dewu', 'title' => '得物账户'], ['slug' => 'vipshop', 'title' => '唯品会账户'], ], ], ], ], [ 'slug' => 'account-balance-data', 'title' => '账单余额数据', 'icon' => 'account_balance_wallet', 'pages' => [ ['slug' => 'bank-balance', 'title' => '银行账户余额'], ['slug' => 'store-receiving-balance', 'title' => '店铺收款账户余额'], [ 'slug' => 'marketing-account-balance', 'title' => '店铺营销账户余额', 'tabs' => [ ['slug' => 'taobao-alipay', 'title' => '淘系账户'], ['slug' => 'taobao-wechat', 'title' => '阿里巴巴账户'], ['slug' => 'pinduoduo', 'title' => '拼多多账户'], ['slug' => 'jd-wallet', 'title' => '京东账户'], ['slug' => 'douyin', 'title' => '抖音账户'], ['slug' => 'dewu', 'title' => '得物账户'], ['slug' => 'vipshop', 'title' => '唯品会账户'], ], ], ['slug' => 'deposit-account-balance', 'title' => '店铺保证金账户余额'], ], ], [ 'slug' => 'invoice-management', 'title' => '票务管理', 'icon' => 'request_quote', 'pages' => [ ['slug' => 'automatic-invoicing', 'title' => '自动开票'], ['slug' => 'basic-information', 'title' => '发票基础信息'], [ 'slug' => 'invoice-reports', 'title' => '发票数据报表', 'tabs' => [ ['slug' => 'input', 'title' => '进项报表', 'icon' => 'download'], ['slug' => 'output', 'title' => '销项报表', 'icon' => 'upload'], ], ], ['slug' => 'store-backend-invoicing', 'title' => '店铺后台开票'], ], ], [ 'slug' => 'order-data', 'title' => '订单数据', 'icon' => 'receipt_long', 'pages' => [ [ 'slug' => 'raw-data', 'title' => '原始数据', 'tabs' => [ ['slug' => 'after-sales-expenses', 'title' => '订单售后费用明细'], ['slug' => 'promotion-expenses', 'title' => '商品推广费用明细'], ], ], ['slug' => 'bill-offset', 'title' => '账单冲减'], ], ], [ 'slug' => 'refunds', 'title' => '退款数据', 'icon' => 'assignment_return', 'pages' => [ ['slug' => 'jingxi-refund-data', 'title' => '京喜退款数据'], ['slug' => 'non-jingxi-refund-data', 'title' => '售后(退货退款)'], ], ], [ 'slug' => 'store-receivables', 'title' => '店铺应收账款', 'icon' => 'payments', 'pages' => [ ['slug' => 'actual-reconciliation', 'title' => '真实应收对账'], ['slug' => 'zhongcai-reconciliation', 'title' => '种菜应收对账'], ['slug' => 'order-receivables-report', 'title' => '订单应收报表'], ['slug' => 'deposit-reconciliation', 'title' => '保证金应收对账'], ['slug' => 'deposit-receivables-report', 'title' => '保证金应收报表'], ], ], [ 'slug' => 'supplier-payables-final', 'title' => '供应商应付(终版)', 'icon' => 'local_shipping', 'pages' => [], ], [ 'slug' => 'courier-payables-final', 'title' => '快递应付(终版)', 'icon' => 'local_shipping', 'pages' => [], ], [ 'slug' => 'supplier-payables', 'title' => '供应商应付', 'icon' => 'local_shipping', 'pages' => [ ['slug' => 'product-prices', 'title' => '商品价格'], ['slug' => 'payment-reconciliation', 'title' => '货款对账'], ['slug' => 'return-reconciliation', 'title' => '退货对账'], ['slug' => 'invoice-deductions', 'title' => '发票扣款'], ['slug' => 'board-deductions', 'title' => '板材扣款'], ['slug' => 'compensation-details', 'title' => '赔偿明细'], ['slug' => 'advance-details', 'title' => '借支明细'], ['slug' => 'sample-deductions', 'title' => '样品扣款'], ['slug' => 'other-adjustments', 'title' => '其他扣款补款'], [ 'slug' => 'unpriced-details', 'title' => '未定价明细', 'children' => [ ['slug' => 'delivery-unpriced', 'title' => '送货未定价'], ['slug' => 'return-unpriced', 'title' => '退货未定价'], ], ], ['slug' => 'dropshipping-express', 'title' => '代发快递'], ['slug' => 'supplier-payables-report', 'title' => '供应商应付表'], ], ], [ 'slug' => 'courier-payables', 'title' => '快递应付', 'icon' => 'local_shipping', 'pages' => [ ['slug' => 'quote-management', 'title' => '报价管理'], ['slug' => 'courier-information', 'title' => '快递资料'], ['slug' => 'agreement-signing', 'title' => '协议签署'], ['slug' => 'freight-reconciliation', 'title' => '运费对账'], ['slug' => 'shipping-data', 'title' => '发货数据'], ['slug' => 'third-party-warehouse-storage', 'title' => '三方仓进销存'], ['slug' => 'bookkeeping-details', 'title' => '记账明细'], ['slug' => 'compensation-details', 'title' => '赔偿明细'], ['slug' => 'advance-details', 'title' => '借支明细'], ['slug' => 'other-adjustments', 'title' => '其他扣款补款'], ['slug' => 'courier-surcharge', 'title' => '附加费报价维护'], ['slug' => 'payable-cloud-warehouse-vehicle-fee', 'title' => '应付云仓车费'], ['slug' => 'courier-payables-report', 'title' => '快递应付表'], ], ], [ 'slug' => 'raw-board-payables', 'title' => '原材料-素板应付', 'icon' => 'view_module', 'pages' => [ ['slug' => 'board-prices', 'title' => '素板价格'], ['slug' => 'board-reconciliation', 'title' => '素板对账'], ['slug' => 'compensation-details', 'title' => '赔付明细'], ['slug' => 'board-payables-report', 'title' => '素板应付表'], ], ], [ 'slug' => 'lamination-factory-payables', 'title' => '原材料-压贴厂应付', 'icon' => 'factory', 'pages' => [ ['slug' => 'lamination-prices', 'title' => '压贴费价格'], ['slug' => 'finished-board-prices', 'title' => '成品板价格'], ['slug' => 'lamination-fees', 'title' => '压贴费'], ['slug' => 'finished-board-freight', 'title' => '成品板运费'], ['slug' => 'paper-stock-in', 'title' => '入库纸张'], ['slug' => 'paper-stock-out', 'title' => '出库纸张'], ['slug' => 'factory-raw-boards', 'title' => '压贴厂的素板'], ['slug' => 'raw-board-freight', 'title' => '素板运费'], ['slug' => 'invoice-tax-points', 'title' => '发票(税点)'], ['slug' => 'factory-compensation', 'title' => '赔付明细(压贴厂)'], ['slug' => 'factory-payables-details', 'title' => '压贴厂应付明细表'], ['slug' => 'factory-payables-report', 'title' => '压贴厂应付表'], ], ], [ 'slug' => 'paper-materials', 'title' => '原材料-纸张', 'icon' => 'article', 'pages' => [ ['slug' => 'paper-prices', 'title' => '纸张价格'], ['slug' => 'paper-details', 'title' => '纸张明细(入库纸张)'], ['slug' => 'penalty-details', 'title' => '赔付明细(违约金)'], ['slug' => 'paper-factory-payables', 'title' => '纸厂应付表'], ], ], [ 'slug' => 'edge-banding-materials', 'title' => '原材料-封边条', 'icon' => 'straighten', 'pages' => [ ['slug' => 'edge-banding-prices', 'title' => '封边条价格'], ['slug' => 'details', 'title' => '明细数据'], ['slug' => 'compensation', 'title' => '赔偿'], ['slug' => 'edge-banding-payables', 'title' => '封边条应付表'], ], ], [ 'slug' => 'inventory-management', 'title' => '原材料-库存管理', 'icon' => 'inventory_2', 'pages' => [ ['slug' => 'board-inventory-details', 'title' => '板材库存明细'], ['slug' => 'board-inventory-analysis', 'title' => '板材库存分析'], ], ], [ 'slug' => 'financial-operations', 'title' => '财务经营报表', 'icon' => 'analytics', 'pages' => [ ['slug' => 'performance-details', 'title' => '业绩明细'], ['slug' => 'product-costs', 'title' => '商品成本'], ['slug' => 'courier-freight', 'title' => '快递运费'], ['slug' => 'installation-details', 'title' => '安装明细'], ['slug' => 'promotion-expenses', 'title' => '推广费用'], ['slug' => 'advertising-expenses', 'title' => '广告费用'], ['slug' => 'marketing-expenses', 'title' => '营销费用'], ['slug' => 'after-sales-expenses', 'title' => '售后费用'], ['slug' => 'small-payment-work-orders', 'title' => '小额打款'], ['slug' => 'management-expenses', 'title' => '管理费用'], ['slug' => 'labor-expenses', 'title' => '人工费用'], ['slug' => 'bookkeeping-details', 'title' => '记账明细'], ['slug' => 'non-operating-expenses', 'title' => '营业外支出'], ['slug' => 'financial-analysis', 'title' => '财务经营分析表'], ], ], [ 'slug' => 'financial-sw', 'title' => '财务SW报表', 'icon' => 'query_stats', 'pages' => [ ['slug' => 'planning', 'title' => '财务SW规划表'], ['slug' => 'actual-statistics', 'title' => '实际SW统计表'], ], ], [ 'slug' => 'data-monitoring', 'title' => '数据监控', 'icon' => 'analytics', 'pages' => [ ['slug' => 'business-process-statistics', 'title' => '业务流程统计表'], ['slug' => 'payment-process-statistics', 'title' => '付款流程统计表'], ], ], [ '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' => '关闭人/日期'], ], ], ], ], ], ]; // Keep the requested finance-data sections together while preserving every other section's order. $requestedSectionOrder = [ 'basic-data', 'invoice-management', 'fund-management', 'order-data', 'refunds', 'billing-transactions', 'account-balance-data', 'product-inventory', ]; $requestedSections = []; $otherSections = []; $insertAt = null; foreach ($navigation as $section) { if (in_array($section['slug'], $requestedSectionOrder, true)) { if ($insertAt === null) { $insertAt = count($otherSections); } $requestedSections[$section['slug']] = $section; continue; } $otherSections[] = $section; } $orderedRequestedSections = array_values(array_filter( array_map(static fn (string $slug): ?array => $requestedSections[$slug] ?? null, $requestedSectionOrder) )); return array_values(array_merge( array_slice($otherSections, 0, $insertAt ?? count($otherSections)), $orderedRequestedSections, array_slice($otherSections, $insertAt ?? count($otherSections)) ));