diff --git a/app/views/stores/_search_bar.html.erb b/app/views/stores/_search_bar.html.erb
new file mode 100644
index 000000000..3221bd5b2
--- /dev/null
+++ b/app/views/stores/_search_bar.html.erb
@@ -0,0 +1,6 @@
+
+ <%= form_tag( search_stores_path, method: 'post') do %>
+ <%= text_field_tag 'name', params[:name], size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar', :required => true %>
+ <%= submit_tag l(:label_search), :class => "enterprise"%>
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/stores/index.html.erb b/app/views/stores/index.html.erb
index e2d65c326..a253ea330 100644
--- a/app/views/stores/index.html.erb
+++ b/app/views/stores/index.html.erb
@@ -1,10 +1,5 @@
<% content_for :top_field do%>
-
- <%= form_tag( search_stores_path, method: 'post') do %>
- <%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :class => 'blueinputbar', :required => true %>
- <%= submit_tag l(:label_search), :class => "enterprise"%>
- <% end %>
-
+ <%= render 'search_bar' %>
<% end %>
diff --git a/app/views/stores/search.html.erb b/app/views/stores/search.html.erb
index ae152d478..42cf0cd28 100644
--- a/app/views/stores/search.html.erb
+++ b/app/views/stores/search.html.erb
@@ -2,12 +2,7 @@
<% content_for :top_field do%>
-
- <%= form_tag( search_stores_path, method: 'post') do %>
- <%= text_field_tag 'name', nil, size:"100", placeholder:'请输入要搜索的关键字', :value => params[:name] , :class => 'blueinputbar', :required => true %>
- <%= submit_tag l(:label_search), :class => "enterprise"%>
- <% end %>
-
+ <%= render 'search_bar' %>
<% end %>
<% @searched_attach.each do |result| %>