Permalink
Browse files

修改了carrying_bills_controller查询请求的错误

  • Loading branch information...
1 parent 8d67421 commit 7bf3c1d1348f007df917e2dce3d9f175e3aa0467 @chengdh committed May 2, 2012
View
@@ -1,4 +1,5 @@
#coding: utf-8
+require 'ruby-pinyin/pinyin'
class GoodsCat < ActiveRecord::Base
acts_as_tree :order => :order_by
default_scope includes(:goods_cat_promotions)
@@ -7,8 +8,14 @@ class GoodsCat < ActiveRecord::Base
validates_associated :goods_cat_promotions
accepts_nested_attributes_for :goods_cat_promotions
after_initialize :build_goods_cat_promotions
+ before_create :gen_py
private
def build_goods_cat_promotions
(10 - self.goods_cat_promotions.size).times { self.goods_cat_promotions.build }
end
+ def gen_py
+ py = PinYin.instance
+ self.py = py.to_pinyin_abbr(self.name)
+ end
+
end
@@ -1,6 +1,6 @@
<hr/>
<div class='actions-bar text-right'>
- <%= link_to image_tag("plus-white.png") + "选择要分货的运单", search_carrying_bills_path(:hide_fields => '.carrying_fee,.insured_fee',:show_fields => '.carrying_fee_th',:bill_date_lte => 'load_list_reached_date_lte',:bill_date_gte => 'load_list_reached_date_gte'),:class => 'fancybox tipsy sexybutton sexysimple sexyblue',:title => "录入查询条件,查询要分货的运单" %>
+ <%= link_to image_tag("plus-white.png") + "选择要分货的运单", search_carrying_bills_path(:format => :js,:hide_fields => '.carrying_fee,.insured_fee',:show_fields => '.carrying_fee_th',:bill_date_lte => 'load_list_reached_date_lte',:bill_date_gte => 'load_list_reached_date_gte'),:class => 'fancybox tipsy sexybutton sexysimple sexyblue',:title => "录入查询条件,查询要分货的运单" %>
</div>
<hr/>
<div id="table_wrap"></div>
@@ -1,6 +1,6 @@
<hr/>
<div class='actions-bar text-right'>
- <%= link_to image_tag("plus-white.png") + "选择要装车的运单", search_carrying_bills_path(:set_disable => 1),:id =>"btn_generate_load_list",:class => 'fancybox tipsy sexybutton sexysimple sexyblue',:title => "录入查询条件,查询要装车的运单" %>
+ <%= link_to image_tag("plus-white.png") + "选择要装车的运单", search_carrying_bills_path(:format => :js,:set_disable => 1),:id =>"btn_generate_load_list",:class => 'fancybox tipsy sexybutton sexysimple sexyblue',:title => "录入查询条件,查询要装车的运单" %>
</div>
<hr/>
<div id="table_wrap"></div>

0 comments on commit 7bf3c1d

Please sign in to comment.