<% id = 0 %> <% EducodeSales::Permission.all.order(position: :asc).group_by{ |d| d.clazz}.each do |k, d| %>
<% d.each do |p| %> <% id += 1 %> <%= check_box_tag "permission[#{p.subject}][]", p.action, @permissions.include?(p.id), {title: p.name, id: "#{id}_" } %> <% end %>
<% end %>
<%= radio_button_tag("business", "自己", @areas.include?("商机管理-自己"), { title: '本人创建列表', id: 1 }) %> <%= radio_button_tag("business", "区域", @areas.include?("商机管理-区域"), { title: '本人负责区域及监管院校列表', id: 2 }) %> <%= radio_button_tag("business", "全部", @areas.include?("商机管理-全部"), { title: '全部列表', id: 3 }) %>
<%= radio_button_tag("contract", "自己", @areas.include?("合同管理-自己"), { title: '本人创建列表' }) %> <%= radio_button_tag("contract", "区域", @areas.include?("合同管理-区域"), { title: '本人负责区域及监管院校列表' }) %> <%= radio_button_tag("contract", "全部", @areas.include?("合同管理-全部"), { title: '全部列表' }) %>
<%= radio_button_tag("money_plan", "自己", @areas.include?("回款管理-自己"), { title: '本人负责列表', id: 16 }) %> <%= radio_button_tag("money_plan", "区域", @areas.include?("回款管理-区域"), { title: '本人负责区域及监管院校列表', id: 17 }) %> <%= radio_button_tag("money_plan", "全部", @areas.include?("回款管理-全部"), { title: '全部列表', id: 18 }) %>
<%= radio_button_tag("customer", "自己", @areas.include?("客户管理-自己"), { title: '本人负责列表', id: 13 }) %> <%= radio_button_tag("customer", "区域", @areas.include?("客户管理-区域"), { title: '本人负责区域及监管院校列表', id: 14 }) %> <%= radio_button_tag("customer", "全部", @areas.include?("客户管理-全部"), { title: '全部列表', id: 15 }) %>
<%= radio_button_tag("assessments_setting", "自己", @areas.include?("绩效考核-自己"), { title: '本人绩效列表', id: 31 }) %> <%= radio_button_tag("assessments_setting", "区域", @areas.include?("绩效考核-区域"), { title: '本人负责区域人员绩效列表', id: 32 }) %> <%= radio_button_tag("assessments_setting", "全部", @areas.include?("绩效考核-全部"), { title: '全部人员绩效', id: 33 }) %>
<%= radio_button_tag("sale_plan", "自己", @areas.include?("销售计划-自己"), { title: '本人创建列表', id: 4 }) %> <%= radio_button_tag("sale_plan", "区域", @areas.include?("销售计划-区域"), { title: '本人负责区域及监管院校列表', id: 5 }) %> <%= radio_button_tag("sale_plan", "全部", @areas.include?("销售计划-全部"), { title: '全部列表', id: 6 }) %>
<%= radio_button_tag("teacher", "自己", @areas.include?("教师运营-自己"), { title: '本人创建列表', id: 7 }) %> <%= radio_button_tag("teacher", "区域", @areas.include?("教师运营-区域"), { title: '本人负责区域及监管院校列表', id: 8 }) %> <%= radio_button_tag("teacher", "全部", @areas.include?("教师运营-全部"), { title: '全部列表', id: 9 }) %>
<%= radio_button_tag("operation", "自己", @areas.include?("运营计划-自己"), { title: '本人创建列表', id: 10 }) %> <%= radio_button_tag("operation", "区域", @areas.include?("运营计划-区域"), { title: '本人负责区域及监管院校列表', id: 11 }) %> <%= radio_button_tag("operation", "全部", @areas.include?("运营计划-全部"), { title: '全部列表', id: 12 }) %>
<%= radio_button_tag("idea", "自己", @areas.include?("方案管理-自己"), { title: '本人创建列表', id: 101 }) %> <%= radio_button_tag("idea", "区域", @areas.include?("方案管理-区域"), { title: '本人负责区域及监管院校列表', id: 102 }) %> <%= radio_button_tag("idea", "全部", @areas.include?("方案管理-全部"), { title: '全部列表', id: 103 }) %>