🍷 葡月ERP管理系统
{% if page == 'home' %}
{{ stats.total_sales }}
销售总额(元)
{{ stats.total_profit }}
销售利润(元)
{{ stats.total_orders }}
订单数量
{{ stats.total_quantity }}
销售箱数
{{ stats.total_customers }}
客户数
🏆 销售排行 TOP5
| 商品 | 销量 | 利润 |
{% for p in top_products %}| {{ p.name[:20] }}... | {{ p.quantity }}箱 | ¥{{ p.profit }} |
{% endfor %}
👥 客户排行
| 客户 | 销量 | 利润 |
{% for c in top_customers %}| {{ c.name[:15] }} | {{ c.quantity }}箱 | ¥{{ c.profit }} |
{% endfor %}
{% if warnings %}
⚠️ 库存预警
| 商品 | 当前库存 | 安全库存 | 状态 |
{% for w in warnings %}| {{ w.name[:30] }} | {{ w.quantity }}箱 | {{ w.min_stock }}箱 | 库存不足 |
{% endfor %}
{% else %}
{% endif %}
{% endif %}
{% if page == 'purchase' %}
📥 采购订单
| 订单号 | 日期 | 商品 | 数量 | 单价 | 金额 | 付款状态 | 收货状态 | 操作 |
{% for p in purchase_orders %}| #{{ p.id }} | {{ p.date }} | {{ p.product[:25] }} | {{ p.quantity }}箱 | ¥{{ p.unit_price }} | ¥{{ p.total_amount }} | {{ p.payment_status }} | {{ p.delivery_status }} | {% if p.payment_status!='已付款' %}{% else %}{% endif %} {% if p.delivery_status!='已收货' %}{% else %}{% endif %}{% if p.payment_status=='未付款' and p.delivery_status=='未收货' %} {% endif %} |
{% endfor %}
¥{{ purchase_stats.total }}
采购总金额
{{ purchase_stats.orders }}
采购订单数
{{ purchase_stats.quantity }}
采购箱数
{% endif %}
{% if page == 'inventory' %}
📦 当前库存
| 商品名称 | 规格 | 库存(箱) | 库存(瓶) | 成本(瓶) | 库存总值 | 安全库存 |
{% for p in products %}| {{ p.name }} | {{ p.spec }} | {{ p.quantity }} | {{ p.quantity * (6 if '6瓶' in p.spec else 4) }} | ¥{{ p.cost }} | ¥{{ p.quantity * p.cost * (6 if '6瓶' in p.spec else 4) }} | {{ p.get('min_stock', 0) }}箱 |
{% endfor %}| 📦 合计 | {{ total_quantity }}箱 | {{ total_bottles }}瓶 | | ¥{{ total_value }} | |
{% endif %}
{% if page == 'stock_check' %}
📋 盘点记录
{% if stock_check_records %}
| 序号 | 时间 | 商品 | 原库存 | 盘点后 | 差异 |
{% for r in stock_check_records %}| #{{ r.id }} | {{ r.date }} | {{ r.product[:20] }} | {{ r.old_quantity }}箱 | {{ r.new_quantity }}箱 | {{ r.diff }}箱 |
{% endfor %}
{% else %}
暂无盘点记录
{% endif %}
{% endif %}
{% if page in ['sales','analysis','product_analysis'] %}
{% if page == 'sales' %}
📋 销售订单
| 订单号 | 日期 | 客户 | 商品 | 数量 | 金额 | 收款状态 | 发货状态 | 操作 |
{% for order in orders %}| #{{ order.id }} | {{ order.date }} | {{ order.customer }} | {{ order.product[:20] }} | {{ order.quantity }}箱 | ¥{{ order.total_amount }} | {{ order.payment_status }} | {{ order.delivery_status }} | {% if order.payment_status!='已收款' %}{% else %}{% endif %} {% if order.delivery_status!='已发货' %}{% else %}{% endif %}{% if order.payment_status=='未收款' and order.delivery_status=='未发货' %} {% endif %} |
{% endfor %}
{% endif %}
{% if page == 'analysis' %}
📈 销售趋势分析
| 时间 | 订单数 | 销量(箱) | 销售额 | 利润 | 环比 |
{% for d in trend_data %}| {{ d.period }} | {{ d.orders }} | {{ d.quantity }} | ¥{{ d.sales }} | ¥{{ d.profit }} | {{ d.growth }}% |
{% endfor %}
按客户
| 客户 | 销量 | 销售额 | 利润 |
{% for c in customer_stats %}| {{ c.name }} | {{ c.quantity }}箱 | ¥{{ c.sales }} | ¥{{ c.profit }} |
{% endfor %}
按商品
| 商品 | 销量 | 销售额 | 利润 |
{% for p in product_stats %}| {{ p.name[:15] }} | {{ p.quantity }}箱 | ¥{{ p.sales }} | ¥{{ p.profit }} |
{% endfor %}
{% endif %}
{% if page == 'product_analysis' %}
🍷 商品销售分析
| 商品 | 销量 | 销售额 | 利润 | 单位利润 | 占比 |
{% for p in product_stats %}| {{ p.name[:20] }} | {{ p.quantity }}箱 | ¥{{ p.sales }} | ¥{{ p.profit }} | ¥{{ p.unit_profit }} | {{ p.percent }}% |
{% endfor %}
{% endif %}
{% endif %}
{% if page == 'add_sale' %}
{% endif %}
{% if page == 'customers' %}
{{ customer_stats.total }}
总客户数
{{ customer_stats.active }}
活跃客户
{{ customer_stats.inactive }}
沉默客户
{{ customer_stats.repeat_rate }}%
复购率
{% if page == 'customers' %}
👥 客户列表
| ID | 名称 | 类型 | 等级 | 联系方式 |
{% for c in customers %}| {{ c.id }} | {{ c.name }} | {{ c.type }} | {{ c.level }} | {{ c.contact or '-' }} / {{ c.phone or '-' }} |
{% endfor %}
{% endif %}
{% if page == 'customer_analysis' %}
👤 客户价值分析
| 客户 | 类型 | 等级 | 销量 | 销售额 | 利润 | 订单数 | 最后下单 | 状态 |
{% for c in customer_detail %}| {{ c.name }} | {{ c.type }} | {{ c.level }} | {{ c.quantity }}箱 | ¥{{ c.sales }} | ¥{{ c.profit }} | {{ c.order_count }} | {{ c.last_order }} | {{ c.status }} |
{% endfor %}
{% endif %}
{% endif %}
{% if page == 'analysis' %}
📈 销售趋势分析
| 时间 | 订单数 | 销量(箱) | 销售额 | 利润 | 环比 |
{% for d in trend_data %}| {{ d.period }} | {{ d.orders }} | {{ d.quantity }} | ¥{{ d.sales }} | ¥{{ d.profit }} | {{ d.growth }}% |
{% endfor %}
按客户
| 客户 | 销量 | 销售额 | 利润 |
{% for c in customer_stats %}| {{ c.name }} | {{ c.quantity }}箱 | ¥{{ c.sales }} | ¥{{ c.profit }} |
{% endfor %}
按商品
| 商品 | 销量 | 销售额 | 利润 |
{% for p in product_stats %}| {{ p.name[:15] }} | {{ p.quantity }}箱 | ¥{{ p.sales }} | ¥{{ p.profit }} |
{% endfor %}
{% endif %}
{% if page == 'customer_analysis' %}
{{ customer_stats.total }}
总客户数
{{ customer_stats.active }}
活跃客户
{{ customer_stats.inactive }}
沉默客户
{{ customer_stats.repeat_rate }}%
复购率
👤 客户价值分析
| 客户 | 类型 | 等级 | 销量 | 销售额 | 利润 | 订单数 | 最后下单 | 状态 |
{% for c in customer_detail %}| {{ c.name }} | {{ c.type }} | {{ c.level }} | {{ c.quantity }}箱 | ¥{{ c.sales }} | ¥{{ c.profit }} | {{ c.order_count }} | {{ c.last_order }} | {{ c.status }} |
{% endfor %}
{% endif %}
{% if page == 'financial' %}
¥{{ financial.sales }}
销售总额(已收款)
¥{{ financial.cost }}
销售成本
¥{{ financial.profit }}
毛利润
{{ financial.margin }}%
毛利率
¥{{ financial.purchase }}
采购支出(已付款)
¥{{ financial.stock_value }}
库存资产
¥{{ financial.corporate }}
对公账户余额
¥{{ financial.cash }}
现金账户余额
¥{{ financial.capital }}
注册资本
¥{{ financial.receivable }}
应收账款
¥{{ financial.payable }}
应付账款
📊 资产负债表
| 资产 | 金额 | 负债及权益 | 金额 | 付款状态 | 收货状态 | 操作 |
|---|
| 库存商品 | ¥{{ financial.stock_value }} | 注册资本 | ¥{{ financial.capital }} |
| 应收账款 | ¥{{ financial.receivable }} | 未分配利润 | ¥{{ financial.retained }} |
| 资产合计 | ¥{{ financial.total_assets }} | 权益合计 | ¥{{ financial.total_equity }} |
💵 成本结构
| 商品 | 单位成本 | 销量 | 总成本 |
{% for c in cost_structure %}| {{ c.name[:20] }} | ¥{{ c.unit_cost }} | {{ c.quantity }}箱 | ¥{{ c.total_cost }} |
{% endfor %}
💳 账户交易流水
| 日期 | 类型 | 账户 | 金额 | 关联单号 | 备注 |
{% for t in transactions %}| {{ t.date }} | {{ t.type }} | {{ t.account }} | {{ '+' if t.amount > 0 else '' }}¥{{ t.amount|int }} | {{ t.ref }} | {{ t.customer[:15] }} |
{% endfor %}
{% endif %}
{% if page == 'inventory_warning' %}
{% if warnings %}{% for w in warnings %}
{{ w.name[:30] }} 库存不足!当前: {{ w.quantity }}箱,安全: {{ w.min_stock }}箱,建议补货: {{ w.suggest }}箱
{% endfor %}{% else %}
{% endif %}
📊 库存周转分析
| 商品 | 当前库存 | 日均销量 | 可销售天数 | 状态 |
{% for t in turnover %}| {{ t.name[:20] }} | {{ t.quantity }}箱 | {{ t.daily_sales }}箱 | {{ t.days }}天 | {{ t.status }} |
{% endfor %}
{% endif %}
{% if page == 'receive_payment' %}
{% endif %}
{% if page == 'pay_purchase' %}
{% endif %}
{% if page == 'backup' %}
📂 备份历史
{% if backups %}
| 文件名 | 大小 | 创建时间 | 操作 |
{% for b in backups %}| {{ b.name }} | {{ b.size }} | {{ b.time }} | |
{% endfor %}
{% else %}
暂无备份记录
{% endif %}
{% endif %}