dev_local
SylorHuang 6 years ago
commit 8ffdad5447

@ -1174,6 +1174,7 @@ end
def partners def partners
@menu_type = 6 @menu_type = 6
@sub_type = 3 @sub_type = 3
<<<<<<< HEAD
@partners = Partner.includes(:school) @partners = Partner.includes(:school)
@limit = 10 @limit = 10
@page = params['page'] || 1 @page = params['page'] || 1
@ -1181,6 +1182,9 @@ end
@total_pages = (@partners_count / 10.0).ceil @total_pages = (@partners_count / 10.0).ceil
@partners = paginateHelper @partners, @limit @partners = paginateHelper @partners, @limit
=======
@partners = Partner.includes(:school).order("created_at desc")
>>>>>>> 0aec53dda74a8e3e3ac8c0f2cd70e38a65bfecbe
end end
def all_partners def all_partners
@ -1223,6 +1227,7 @@ end
school.save school.save
end end
render :json => {status: 1, message: "创建成功!"} render :json => {status: 1, message: "创建成功!"}
redirects_to partners_path
end end
end end
@ -1257,6 +1262,22 @@ end
end end
end end
# 添加合作伙伴管理员- 弹框
def add_partner_member_box
@partner = Partner.first
@members =
if params[:search]
User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%'")
else
User.where(:certification => 1)
end
@members = paginateHelper @members, 8
end
def add_partner_member
end
# check 部门 identifier是否重复 # check 部门 identifier是否重复
def check_depart_identifier def check_depart_identifier
logger.info("###############{params}") logger.info("###############{params}")

@ -1,29 +1,9 @@
<div class="task-popup" style="width: 572px;"> <div class="task-popup" style="width: 572px;">
<div class="task-popup-title clearfix">添加管理员</div> <div class="task-popup-title clearfix">添加管理员</div>
<div class="task_popup_con"> <div class="task_popup_con">
<div class="clearfix mb20" id="add_major_manager"> <div class="df mb20" id="add_major_manager">
<li class=""> <input type="text" class="input-flex-35 color-grey-3" placeholder="输入用户的姓名、单位、职位尽情搜索"/>
<input id="object_id" type="hidden" value=""> <a href="javascript:void(0);" onclick="submit_search_user()" class="white-btn mt6 edu-blueback-btn ml15">搜索</a>
<input id="object_type" type="hidden" value="">
<p class="clearfix mb15">
<span class="fl">姓名:<input placeholder="请输入真实姓名" type="text" name="name" class="winput-120-30 greyInput"/></span>
<span class="ml20 fl">单位:<input placeholder="请输入单位名称" name="school" value="" type="text" class="winput-240-30 greyInput"/></span>
</p>
<div class="df">
<span class="fl lineh-35">职业:</span>
<div class="pr flex1" select-for>
<input type="hidden" name="identity">
<input type="text" class="input-100-35 color-grey-3" readonly value="请选择职业" placeholder="请选择职业"/>
<div class="down-select bor-grey-e user_bg_shadow" id="vecation_option">
<p>请选择职业</p>
<p data-shixun-value="0">教师</p>
<p data-shixun-value="1">学生</p>
<p data-shixun-value="2">专业人士</p>
</div>
</div>
<a href="javascript:void(0);" onclick="submit_search_user()" class="white-btn mt6 edu-blueback-btn fl ml15">搜索</a>
</div>
</li>
</div> </div>
<div class="mb20 clearfix"> <div class="mb20 clearfix">
<p class="pl10 color-grey-6 clearfix"> <p class="pl10 color-grey-6 clearfix">
@ -33,24 +13,22 @@
<span class="fl edu-txt-w100 edu-txt-center">手机号</span> <span class="fl edu-txt-w100 edu-txt-center">手机号</span>
</p> </p>
<div class="edu-back-skyblue clearfix pl10 over280" id="serch_user_list"> <div class="edu-back-skyblue clearfix pl10 over280" id="serch_user_list">
<p class="clearfix">
<span class="fl edu-txt-w90"> <%= form_for "", :url => add_partner_member_managements_path,:html => {:id => 'add_partner_member_form', :remote => true, :method => :post} do |f| %>
<input type="checkbox" name="user_id[]" value="12545" id="user_12545" class="magic-checkbox"> <% @members.each do |member| %>
<label for="user_12545">李健</label> <p class="clearfix">
</span> <span class="fl edu-txt-w90">
<span class="fl edu-txt-w90 mt5 edu-txt-center color-grey-6 pointer">学生</span> <input type="checkbox" name="partner_member[]" value="<%= member.id %>" id="user_<%= member.id %>" class="magic-checkbox">
<span class="fl task-hide edu-txt-w200 mt5 edu-txt-left color-grey-9">湖北工业大学 </span> <label for="user_<%= member.id %>"><%= member.show_real_name %></label>
<span class="fl edu-txt-w100 mt5 edu-txt-center color-grey-9">156****9087</span> </span>
</p> <span class="fl edu-txt-w90 mt5 edu-txt-center color-grey-6 pointer"><%= member.identity %></span>
<p class="clearfix"> <span class="fl task-hide edu-txt-w200 mt5 edu-txt-left color-grey-9"><%= member.school_name %> </span>
<span class="fl edu-txt-w90"> <span class="fl edu-txt-w100 mt5 edu-txt-center color-grey-9"><%= member.phone %></span>
<input type="checkbox" name="user_id[]" value="12545" id="user_12545" class="magic-checkbox"> </p>
<label for="user_12545">李健</label> <% end %>
</span> <% end %>
<span class="fl edu-txt-w90 mt5 edu-txt-center color-grey-6 pointer">学生</span>
<span class="fl task-hide edu-txt-w200 mt5 edu-txt-left color-grey-9">湖北工业大学 </span>
<span class="fl edu-txt-w100 mt5 edu-txt-center color-grey-9"></span>
</p>
</div> </div>
</div> </div>
<p class="color-orange-tip" id="form_notice"></p> <p class="color-orange-tip" id="form_notice"></p>

@ -0,0 +1,7 @@
<% if params[:search] || params[:page] %>
$("#depart_member_search_list").html("<%= j(render :partial => "depart_member_search_list") %>")
<% else %>
var html="<%= escape_javascript(render :partial => "managements/partner_addManage") %>";
pop_box_new(html,572,500);
<% end %>

@ -21,7 +21,9 @@
<div class="clearfix"> <div class="clearfix">
<span class="mr45 color-grey-9 fl">管理员</span> <span class="mr45 color-grey-9 fl">管理员</span>
<ul class="manageList"> <ul class="manageList">
<li><a href="javascript:void(0)" class="addManage">+</a></li> <li>
<%= link_to '+', add_partner_member_box_managements_path(:partner => 1), :remote => true, :class => "addManage" %>
</li>
<li><img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=105293018,2500805440&fm=27&gp=0.jpg"/><a href="javascript:void(0)" class="removeImg"><i class="iconfont icon-htmal5icon19 color-grey-9"></i></a></li> <li><img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=105293018,2500805440&fm=27&gp=0.jpg"/><a href="javascript:void(0)" class="removeImg"><i class="iconfont icon-htmal5icon19 color-grey-9"></i></a></li>
</ul> </ul>
</div> </div>
@ -60,9 +62,18 @@
$(this).parents("li").remove(); $(this).parents("li").remove();
}) })
<<<<<<< HEAD
$(".manageList").on("click",".addManage",function(){ $(".manageList").on("click",".addManage",function(){
var html="<%= escape_javascript(render :partial => "managements/partner_addManage") %>"; var html="<%= escape_javascript(render :partial => "managements/partner_addManage") %>";
pop_box_new(html,572,500); pop_box_new(html,572,500);
}) })
=======
$(".addOperation").on("click",function(){
var html="<%= escape_javascript(render :partial => "managements/partner_addUnit") %>";
pop_box_new(html,572,500);
})
>>>>>>> 0aec53dda74a8e3e3ac8c0f2cd70e38a65bfecbe
}) })
</script> </script>

@ -554,6 +554,8 @@ RedmineApp::Application.routes.draw do ## oauth相关
post 'import_departments' post 'import_departments'
match 'departments', :via => [:get, :post] match 'departments', :via => [:get, :post]
get 'partners' get 'partners'
get 'add_partner_member_box'
post 'add_partner_member'
get 'all_partners' get 'all_partners'
post 'add_partner' post 'add_partner'
delete 'delete_depart_member' delete 'delete_depart_member'

Loading…
Cancel
Save