From c56a997403bbfa167e883487ab0db1f6b2501372 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 4 Apr 2019 14:45:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=88=E4=BD=9C=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 7 +- .../managements/_partner_addManage.html.erb | 89 ++++++++++++------- .../managements/_partner_addUnit.html.erb | 28 +++--- .../_partner_member_search_list.html.erb | 11 +++ .../managements/_partner_search_form.html.erb | 6 +- .../managements/add_partner_member_box.js.erb | 5 +- 6 files changed, 93 insertions(+), 53 deletions(-) create mode 100644 app/views/managements/_partner_member_search_list.html.erb diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index c92ae34d..75ee3edf 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1202,7 +1202,7 @@ end @schools = @schools.where("name like ?", "%#{@search}%") end - if params[:province] + if params[:province] && params[:province] != '0' @schools = @schools.where("province like ?", "%#{@province}%") end @@ -1276,7 +1276,7 @@ end # 添加合作伙伴管理员- 弹框 def add_partner_member_box - @partner = Partner.first + @partner = Partner.where(:id => params[:partner]).first @members = if params[:search] User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%'") @@ -1284,6 +1284,9 @@ end User.where(:certification => 1) end @members = paginateHelper @members, 8 + respond_to do |format| + format.js + end end # 合作伙伴添加管理员 diff --git a/app/views/managements/_partner_addManage.html.erb b/app/views/managements/_partner_addManage.html.erb index e6de3cec..9c8769ae 100644 --- a/app/views/managements/_partner_addManage.html.erb +++ b/app/views/managements/_partner_addManage.html.erb @@ -2,7 +2,7 @@
- - - - - <%= member.identity %> - <%= member.school_name %> - <%= member.phone %> -
- <% end %> - <% end %> - - -请至少选择一个用户
+ + + + + <%= member.identity %> + <%= member.school_name %> + <%= member.phone %> +
+<% end %> \ No newline at end of file diff --git a/app/views/managements/_partner_search_form.html.erb b/app/views/managements/_partner_search_form.html.erb index 35e3e8c9..cf6d9450 100644 --- a/app/views/managements/_partner_search_form.html.erb +++ b/app/views/managements/_partner_search_form.html.erb @@ -1,11 +1,11 @@ <%= form_for "", :url => {:controller=> 'managements', :action => 'all_partners', :type => @type}, :html => {:id => 'partners_search_form'}, :method => "get", :remote => true do |f| %>