From 962269895386555743b93629073ce946002a3f57 Mon Sep 17 00:00:00 2001 From: jasder Date: Thu, 4 Apr 2019 16:50:40 +0800 Subject: [PATCH] FIX --- app/controllers/managements_controller.rb | 1 + app/views/managements/partners.html.erb | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 69f7bdbc..6db6647d 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1175,6 +1175,7 @@ end @menu_type = 6 @sub_type = 3 @partners = Partner.includes(:school).order("created_at desc") + @partners = @partners.where("concat(schools.name) like ? ", "%#{params[:search]}%") unless params[:search].blank? @current_partner = nil if params[:partner] diff --git a/app/views/managements/partners.html.erb b/app/views/managements/partners.html.erb index 7ba9fecb..f2805058 100644 --- a/app/views/managements/partners.html.erb +++ b/app/views/managements/partners.html.erb @@ -1,7 +1,7 @@
- - 搜索 + + 搜索 清除
@@ -75,4 +75,8 @@ }) + + function submit_search_partner(){ + $.get("/managements/partners?search="+$("#partner_search").val()); + } \ No newline at end of file