{% extends "base.html" %} {% block title %}统计分析 - 本地贷款CRM{% endblock %} {% block header_title %}统计分析{% endblock %} {% block content %}

客户阶段漏斗

{% set max_cnt = funnel_data|map(attribute='cnt')|max|default(1) %} {% for f in funnel_data %}
{{ f.cnt }}
{{ f.avatar_stage }}
{% endfor %}

贷款申请结果

{{ app_result.disbursed or 0 }}
已放款
{{ app_result.rejected or 0 }}
已拒绝
{{ app_result.ongoing or 0 }}
进行中

画像完整度

{% set total = profile_stats.total or 1 %}
{% set fields = [ ('has_income', '收入范围'), ('has_willingness', '贷款意愿'), ('has_credit', '征信等级'), ('has_asset', '资产信息'), ('has_rate', '利率敏感度'), ('has_purpose', '资金用途') ] %} {% for key, label in fields %}
{{ label }}
{% set pct = (profile_stats[key] / total * 100)|int if total > 0 else 0 %}
{{ pct }}%
{% endfor %}

拒绝原因分布

{% for r in rejection_data %} {% if r.cnt > 0 %}
{{ r.category }} {{ r.sub_category }} {{ r.cnt }}
{% endif %} {% endfor %} {% if rejection_data|selectattr('cnt', 'gt', 0)|list|length == 0 %}

暂无拒绝记录

{% endif %}

近30天沟通方式

{% set total_comm = comm_data|map(attribute='cnt')|sum|default(1) %} {% for c in comm_data %}
{{ c.comm_type }}
{% set pct = (c.cnt / total_comm * 100)|int %}
{{ c.cnt }}次
{% endfor %} {% if not comm_data %}

暂无近期沟通

{% endif %}

近6月新增客户

{% set max_m = monthly_data|map(attribute='cnt')|max|default(1) %}
{% for m in monthly_data %}
{{ m.cnt }}
{{ m.month }}
{% endfor %} {% if not monthly_data %}

暂无数据

{% endif %}

来源渠道分布

{% for s in source_data %}
{{ s.source }}
{% set total_src = source_data|map(attribute='cnt')|sum|default(1) %} {% set pct = (s.cnt / total_src * 100)|int %}
{{ s.cnt }}个
{% endfor %}

标签使用排行

{% for t in tag_data %}
{{ t.category }}· {{ t.name }} {{ t.cnt }}
{% endfor %}
{% endblock %}