年度
<%= select_tag "years", options_for_select(@years, @year), {'lay-filter': 'year'} %>
<% if can? :sale_trends, EducodeSales::SaleTrend %> <% end %>
商机目标

<%=@sale_trend.present? ? @sale_trend.chance_money : EducodeSales::SaleTrend.sum(:chance_money)%>万

<% if can? :sale_trends, EducodeSales::SaleTrend %> <% end %>
中标目标

<%=@sale_trend.present? ? @sale_trend.ballot_money : EducodeSales::SaleTrend.sum(:ballot_money)%>万

<% if can? :sale_trends, EducodeSales::SaleTrend %> <% end %>
签单目标

<%=@sale_trend.present? ? @sale_trend.sign_money : EducodeSales::SaleTrend.sum(:sign_money)%>万

<% if can? :sale_trends, EducodeSales::SaleTrend %> <% end %>
回款目标

<%=@sale_trend.present? ? @sale_trend.returned_money : EducodeSales::SaleTrend.sum(:returned_money)%>万

现有商机查看商机

<%= @business_amount %>万

已中标(总额)查看商机

<%= @goal_amount %>万

已签单(总额)查看商机

<%= @service_amount %>万

已回款查看商机

<%= @return_amount %>万

A类商机查看商机

<%= @a_amount %>万

已中标(合同额)查看商机

<%= @actual_goal_amount %>万

已签单(合同额)查看商机

<%= @actual_service_amount %>万

B类商机查看商机

<%= @b_amount %>万


<%= select_tag "follow_count_range", options_for_select([['按天','day'],['按周','week'],['按月','month'],['按年','year']],params[:follow_count_range] || 'week'), {'lay-filter': 'follow_count'}%>


<%= select_tag "count_type", options_for_select([['按合同额统计','actual_amount'],['按总额统计','total_amount']],params[:count_type]), {'lay-filter': 'count_type'}%>
<%= select_tag "goal_count_range", options_for_select([['按月','month'],['按年','year']],params[:goal_count_range]), {'lay-filter': 'goal_count'}%>
" autocomplete="off">


<%= select_tag "business_count_type", options_for_select([['按商机总额统计','money'],['按商机数量统计','count']],params[:goal_count_range]), {'lay-filter': 'goal_count'}%>
<%= select_tag "business_type", options_for_select(EducodeSales::Common.where(clazz: 'business_type').where.not(extras: "x_class").pluck(:name, :id), params[:clazz_id]), { 'lay-filter': 'clazz_id', include_blank: true } %>
<%= select_tag "customer_count_type", options_for_select([['按跟进客户数统计','money'],['按跟进客户次数统计','count']],params[:goal_count_range]), {'lay-filter': 'goal_count'}%>
<% options = [['上周','last_week'],['本周','this_week'],['上月','last_month'],['本月','this_month'],['去年','last_year'],['今年','this_year'],['全部','all'],['自定义','diy']]%> <%= select_tag "customer_time_range", options_for_select(options,'this_year'), { 'lay-filter': 'customer_time_range'} %>